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 条
  • [41] JuCify: A Step Towards Android Code Unification for Enhanced Static Analysis
    Samhi, Jordan
    Gao, Jun
    Daoudi, Nadia
    Graux, Pierre
    Hoyez, Henri
    Sun, Xiaoyu
    Allix, Kevin
    Bissyande, Tegawende F.
    Klein, Jacques
    [J]. 2022 ACM/IEEE 44TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2022), 2022, : 1232 - 1244
  • [42] Embedding Java']Java Classes with code2vec: Improvements from Variable Obfuscation
    Compton, Rhys
    Frank, Eibe
    Patros, Panos
    Koay, Abigail
    [J]. 2020 IEEE/ACM 17TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2020, : 243 - 253
  • [43] Estimating the client costs of addiction treatment:: first findings from the client drug abuse treatment cost analysis program (Client DATCAP)
    Salomé, HJ
    French, MT
    Miller, M
    McLellan, AT
    [J]. DRUG AND ALCOHOL DEPENDENCE, 2003, 71 (02) : 195 - 206
  • [44] From Query to Usable Code: An Analysis of Stack Overflow Code Snippets
    Yang, Di
    Hussain, Aftab
    Lopes, Cristina Videira
    [J]. 13TH WORKING CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR 2016), 2016, : 391 - 401
  • [45] Improvements in National Code Red transfusion practice in Scotland after adoption of recommendations from the Scottish National Code Red 2015 review
    Reed, Matthew J.
    Cooke, Claire
    McMahon, Niall
    Hands, Katherine
    Henderson, Susan
    Knight, Eleanor
    Littlewood, Nicola
    Latif, Munsoor
    Tod, Naomi
    McGarvey, Margaret
    Hughes, Neil
    Donald, Michael
    Rowley, Megan
    Innes, Catherine
    Lockhart, Symon
    [J]. INJURY-INTERNATIONAL JOURNAL OF THE CARE OF THE INJURED, 2020, 51 (04): : 913 - 918
  • [46] TOWARDS SEQUENTIAL PLAN ANALYSIS (SPA) - A METHOD FOR THE DYNAMICAL ANALYSIS OF INTERACTIONAL PLANS WITHIN THE CLIENT THERAPIST RELATIONSHIP
    RICHTER, K
    SCHIEPEK, G
    KOHLER, M
    SCHUTZ, A
    [J]. PSYCHOTHERAPIE PSYCHOSOMATIK MEDIZINISCHE PSYCHOLOGIE, 1995, 45 (01) : 24 - 36
  • [47] Towards Code Generation from BDD Test Case Specifications: A Vision
    Chemnitz, Leon
    Reichenbach, David
    Aldebes, Hani
    Naveed, Mariam
    Narasimhan, Krishna
    Mezini, Mira
    [J]. 2023 IEEE/ACM 2ND INTERNATIONAL CONFERENCE ON AI ENGINEERING - SOFTWARE ENGINEERING FOR AI, CAIN, 2023, : 139 - 144
  • [48] Towards Translating Mixed-Code Comments from Social Media
    Singh, Thoudam Doren
    Solorio, Thamar
    [J]. COMPUTATIONAL LINGUISTICS AND INTELLIGENT TEXT PROCESSING, CICLING 2017, PT II, 2018, 10762 : 457 - 468
  • [49] Towards Qualifiable Code Generation from a Clocked Synchronous Subset of Modelica
    Thiele, B.
    Knoll, A.
    Fritzson, P.
    [J]. MODELING IDENTIFICATION AND CONTROL, 2015, 36 (01) : 23 - 52
  • [50] Towards Explainability in Automated Medical Code Prediction from Clinical Records
    Uma, Kanimozhi
    Francis, Sumam
    Sun, Wei
    Moens, Marie-Francine
    [J]. INTELLIGENT SYSTEMS AND APPLICATIONS, VOL 4, INTELLISYS 2023, 2024, 825 : 593 - 637