Towards Code Improvements Suggestions from Client Exception Analysis

被引:0
|
作者
Marcilio, Diego [1 ]
Furia, Carlo A. [1 ]
机构
[1] USI Univ Svizzera Italiana, Software Inst, Lugano, Switzerland
关键词
D O I
10.1109/ICSME58846.2023.00046
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Modern software development heavily relies on reusing third-party libraries; this makes developers more productive, but may also lead to misuses or other kinds of design issues. In this paper, we focus on the exceptional behavior of library methods, and propose to detect client code that may trigger such exceptional behavior. As we demonstrate on several examples of open-source projects, exceptional behavior in clients often naturally suggests improvements to the documentation, tests, runtime checks, and annotations of the clients. In order to automatically detect client calls that may trigger exceptional behavior in library methods, we show how to repurpose existing techniques to extract a method's exception precondition-the condition under which the method throws an exception. To demonstrate the feasibility of our approach, we applied it to 1,523 open-source Java projects, where it found 4,115 cases of calls to library methods that may result in an exception. We manually analyzed 100 of these cases, confirming that the approach is capable of uncovering several interesting opportunities for code improvements.
引用
收藏
页码:363 / 368
页数:6
相关论文
共 50 条
  • [1] Planares: analysis and suggestions for improvements
    Terranova, Camilo
    Biazini Filho, Francisco Luiz
    [J]. REVISTA TECNOLOGIA E SOCIEDADE, 2022, 18 (53):
  • [2] Code Improvements Towards Implementing HEVC Decoder
    Israr, Adeel
    Nazir, Sajid
    Kaleem, Muhammad
    [J]. 2018 3RD INTERNATIONAL CONFERENCE ON EMERGING TRENDS IN ENGINEERING, SCIENCES AND TECHNOLOGY (ICEEST), 2018,
  • [3] Downtime analysis of drilling machines and suggestions for improvements
    Al-Chalabi, Hussan S.
    Lundberg, Jan
    Wijaya, Andi
    Ghodrati, Behzad
    [J]. JOURNAL OF QUALITY IN MAINTENANCE ENGINEERING, 2014, 20 (04) : 306 - +
  • [4] Analysis of recurrent network training and suggestions for improvements
    De Jesús, O
    Horn, JM
    Hagan, MT
    [J]. IJCNN'01: INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS, VOLS 1-4, PROCEEDINGS, 2001, : 2632 - 2637
  • [5] An analysis of problems of coexistence in schools in Catalunya. Suggestions for improvements
    Jacas, Nuri Felip
    Apelluz, Joan Puiggali
    Cid, Montserrat Tesouro
    [J]. REVISTA ELECTRONICA INTERUNIVERSITARIA DE FORMACION DEL PROFESORADO, 2023, 27 (01): : 225 - 239
  • [6] Suggestions for Public Accountant's Analysis of Client's Personal Insurance
    Heinsimer, Robert
    [J]. JOURNAL OF ACCOUNTANCY, 1949, 87 (06): : 489 - 490
  • [7] Towards natural image denoising by sparse code shrinkage: Improvements and applications
    Yu, Ying
    Yang, Jian
    Xu, Dan
    [J]. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON INTELLIGENT SYSTEMS AND KNOWLEDGE ENGINEERING (ISKE 2007), 2007,
  • [8] RESTful API Analysis, Recommendation, and Client Code Retrieval
    Ma, Shang-Pin
    Hsu, Ming-Jen
    Chen, Hsiao-Jung
    Lin, Chuan-Jie
    [J]. ELECTRONICS, 2023, 12 (05)
  • [9] Automated Refactoring Suggestions Using the Results of Code Analysis Tools
    Herbold, Steffen
    Grabowski, Jens
    Neukirchen, Helmut
    [J]. 2009 FIRST INTERNATIONAL CONFERENCE ON ADVANCES IN SYSTEM TESTING AND VALIDATION LIFECYCLE, 2009, : 104 - +
  • [10] ALFITeX: A Code Introducing Improvements in the Analysis of Alpha Spectra
    Caro Marroyo, B.
    Martin Sanchez, A.
    Jurado Vargas, M.
    [J]. LA RABIDA 2012 INTERNATIONAL SCIENTIFIC MEETING ON NUCLEAR PHYSICS: BASIC CONCEPTS IN NUCLEAR PHYSICS: THEORY, EXPERIMENTS, AND APPLICATIONS, 2013, 1541 : 142 - 143