From a domain analysis to the specification and detection of code and design smells

被引:33
作者
Moha, Naouel [1 ,2 ,4 ]
Gueheneuc, Yann-Gael [3 ]
Le Meur, Anne-Francoise [2 ]
Duchien, Laurence [2 ]
Tiberghien, Alban [2 ]
机构
[1] Univ Montreal, Ptidej Team, GEODES, DIRO, Montreal, PQ, Canada
[2] Univ Sci & Technol Lille, CNRS, LIFL UMR 8022, Adam Team,INRIA Lille Nord Europe, Villeneuve Dascq, France
[3] Ecole Polytech Montreal, Ptidej Team, DGIGL, Montreal, PQ, Canada
[4] INRIA Rennes Bretagne Atlantique, Triskell Team, IRISA, F-35042 Rennes, France
关键词
Design smells; Antipatterns; Code smells; Domain-specific language; Algorithm generation; Detection; !text type='Java']Java[!/text;
D O I
10.1007/s00165-009-0115-x
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Code and design smells are recurring design problems in software systems that must be identified to avoid their possible negative consequences on development and maintenance. Consequently, several smell detection approaches and tools have been proposed in the literature. However, so far, they allow the detection of predefined smells but the detection of new smells or smells adapted to the context of the analysed systems is possible only by implementing new detection algorithms manually. Moreover, previous approaches do not explain the transition from specifications of smells to their detection. Finally, the validation of the existing approaches and tools has been limited on few proprietary systems and on a reduced number of smells. In this paper, we introduce an approach to automate the generation of detection algorithms from specifications written using a domain-specific language. This language is defined from a thorough domain analysis. It allows the specification of smells using high-level domain-related abstractions. It allows the adaptation of the specifications of smells to the context of the analysed systems. We specify 10 smells, generate automatically their detection algorithms using templates, and validate the algorithms in terms of precision and recall on Xerces v2.7.0 and GanttProject v1.10.2, two open-source object-oriented systems. We also compare the detection results with those of a previous approach, iPlasma.
引用
收藏
页码:345 / 361
页数:17
相关论文
共 50 条
  • [31] Code Smells in Elixir: Early Results from a Grey Literature Review
    da Matta Vegi, Lucas Francisco
    Valente, Marco Tulio
    30TH IEEE/ACM INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2022), 2022, : 580 - 584
  • [32] Improving accuracy of code smells detection using machine learning with data balancing techniques
    Khleel, Nasraldeen Alnor Adam
    Nehez, Karoly
    JOURNAL OF SUPERCOMPUTING, 2024, 80 (14) : 21048 - 21093
  • [33] Do Developers Care about Code Smells? A Replicated Study from Chile
    Ancan, Oscar
    Cares, Carlos
    2017 CHILEAN CONFERENCE ON ELECTRICAL, ELECTRONICS ENGINEERING, INFORMATION AND COMMUNICATION TECHNOLOGIES (CHILECON), 2017,
  • [34] Investigating the Social Representations of the Identification of Code Smells by Practitioners and Students from Brazil
    de Mello, Rafael
    Uchoa, Anderson
    Oliveira, Roberto
    Oliveira, Daniel
    Oizumi, Willian
    Souza, Jairo
    Fonseca, Baldoino
    Garcia, Alessandro
    PROCEEDINGS OF THE XXXIII BRAZILIAN SYMPOSIUM ON SOFTWARE ENGINEERING, SBES 2019, 2019, : 457 - 466
  • [35] Design smells in multi-language systems and bug-proneness: a survival analysis
    Abidi, Mouna
    Rahman, Md Saidur
    Openja, Moses
    Khomh, Foutse
    EMPIRICAL SOFTWARE ENGINEERING, 2024, 29 (05)
  • [36] A Cooperative Parallel Search-Based Software Engineering Approach for Code-Smells Detection
    Kessentini, Wael
    Kessentini, Marouane
    Sahraoui, Houari
    Bechikh, Slim
    Ouni, Ali
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2014, 40 (09) : 841 - 861
  • [37] Impact on energy consumption of design patterns, code smells and refactoring techniques: A systematic mapping study
    Poy, Olivia
    Angeles Moraga, Ma
    Garcia, Felix
    Calero, Coral
    JOURNAL OF SYSTEMS AND SOFTWARE, 2025, 222
  • [38] Software Metric Based Impact Analysis of Code Smells - A Large Scale Empirical Study
    Rahman, Md. Masudur
    Satter, Abdus
    Joarder, Md. Mahbubul Alam
    Sakib, Kazi
    SOFTWARE-PRACTICE & EXPERIENCE, 2025,
  • [39] Tracking Design Smells: Lessons from a Study of God Classes
    Vaucher, Stephane
    Khomh, Foutse
    Moha, Naouel
    Gueheneuc, Yann-Gael
    16TH WORKING CONFERENCE ON REVERSE ENGINEERING (WCRE 2009), 2009, : 145 - 154
  • [40] Technical Debt Resulting from Architectural Degradation and Code Smells: A Systematic Mapping Study
    Das, Dipta
    Al Maruf, Abdullah
    Islam, Rofiqul
    Lambaria, Noah
    Kim, Samuel
    Abdelfattah, Amr S.
    Cerny, Tomas
    Frajtak, Karel
    Bures, Miroslav
    Tisnovsky, Pavel
    APPLIED COMPUTING REVIEW, 2021, 21 (04): : 20 - 36