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 条
  • [21] Towards a factor analysis of the code alternating/subjunctive
    Amsili, Pascal
    Guida, Floriane
    [J]. 4E CONGRES MONDIAL DE LINGUISTIQUE FRANCAISE, 2014, 8
  • [22] Community attitudes towards emergency research and exception from informed consent
    Biros, Michelle H.
    Sargent, Corey
    Miller, Kathleen
    [J]. RESUSCITATION, 2009, 80 (12) : 1382 - 1387
  • [23] Improvements and validation of the transient analysis code MOREL for molten salt reactors
    Zhuang, Kun
    Zheng, Youqi
    Cao, Liangzhi
    Hu, Tianliang
    Wu, Hongchun
    [J]. JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY, 2017, 54 (08) : 878 - 890
  • [24] OBJECTIVE PERFORMANCE ANALYSIS OF ARTIFICIAL HANDS TOWARDS IMPROVEMENTS OF FUNCTION
    GILAD, I
    [J]. ERGONOMICS, 1986, 29 (04) : 553 - 561
  • [25] Towards Multi-Language Static Code Analysis
    Siddiqui, Sanaa
    Metta, Ravindra
    Madhukar, Kumar
    [J]. 2023 IEEE 34TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING WORKSHOPS, ISSREW, 2023, : 81 - 82
  • [26] Client Importance, Institutional Improvements, and Audit Quality in China: An Office and Individual Auditor Level Analysis
    Chen, Shimin
    Sun, Sunny Y. J.
    Wu, Donghui
    [J]. ACCOUNTING REVIEW, 2010, 85 (01): : 127 - 158
  • [27] An ethical analysis of exception from informed consent regulations
    Morris, MC
    [J]. ACADEMIC EMERGENCY MEDICINE, 2005, 12 (11) : 1113 - 1119
  • [28] Improvements to the modelling of two-phase flow in a transient reactor analysis code
    Gao, S
    Leslie, DC
    Hewitt, GF
    [J]. MULTIPHASE, NON-NEWTONIAN AND REACTING FLOWS, VOL 2, PROCEEDINGS, 2004, : 228 - 232
  • [29] Workplace improvements to support safe and sustained return to work: Suggestions from a survey of workers with permanent impairments
    Sears, Jeanne M.
    Edmonds, Amy T.
    MacEachen, Ellen
    Fulton-Kehoe, Deborah
    [J]. AMERICAN JOURNAL OF INDUSTRIAL MEDICINE, 2021, 64 (09) : 731 - 743
  • [30] Improvements on Evaluation Functions of a Probabilistic Fracture Mechanics Analysis Code for Reactor Pressure Vessels
    Lu, Kai
    Katsuyama, Jinya
    Li, Yinsheng
    [J]. JOURNAL OF PRESSURE VESSEL TECHNOLOGY-TRANSACTIONS OF THE ASME, 2020, 142 (02):