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 条
  • [21] Handling uncertainty in SBSE: a possibilistic evolutionary approach for code smells detection
    Boutaib, Sofien
    Elarbi, Maha
    Bechikh, Slim
    Palomba, Fabio
    Ben Said, Lamjed
    EMPIRICAL SOFTWARE ENGINEERING, 2022, 27 (06)
  • [22] Crowdsmelling: A preliminary study on using collective knowledge in code smells detection
    dos Reis, Jose Pereira
    Brito e Abreu, Fernando
    Carneiro, Glauco de Figueiredo
    EMPIRICAL SOFTWARE ENGINEERING, 2022, 27 (03)
  • [23] IDS: An Immune-inspired Approach for the Detection of Software Design Smells
    Hassaine, Salima
    Khomh, Foutse
    Gueheneuc, Yann-Gael
    Hamel, Sylvie
    QUATIC 2010: SEVENTH INTERNATIONAL CONFERENCE ON THE QUALITY OF INFORMATION AND COMMUNICATIONS TECHNOLOGY, 2010, : 343 - 348
  • [24] Handling uncertainty in SBSE: a possibilistic evolutionary approach for code smells detection
    Sofien Boutaib
    Maha Elarbi
    Slim Bechikh
    Fabio Palomba
    Lamjed Ben Said
    Empirical Software Engineering, 2022, 27
  • [25] Machine Learning Techniques for Code Smells Detection: A Systematic Mapping Study
    Caram, Frederico Luiz
    De Oliveira Rodrigues, Bruno Rafael
    Campanelli, Amadeu Silveira
    Parreiras, Fernando Silva
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2019, 29 (02) : 285 - 316
  • [26] Droidlens: Robust and Fine-Grained Detection for Android Code Smells
    Mao, Chenguang
    Wang, Hao
    Han, Gaojie
    Zhang, Xiaofang
    2020 INTERNATIONAL SYMPOSIUM ON THEORETICAL ASPECTS OF SOFTWARE ENGINEERING (TASE 2020), 2020, : 161 - 168
  • [27] Refactoring Android Source Code Smells From Android Applications
    Fawad, Muhammad
    Rasool, Ghulam
    Riaz, Muhammad Bilal
    IEEE ACCESS, 2025, 13 : 14122 - 14150
  • [28] Python']Python code smells detection using conventional machine learning models
    Sandouka, Rana
    Aljamaan, Hamoud
    PEERJ COMPUTER SCIENCE, 2023, 9
  • [29] ENSESMELLS : Deep ensemble and programming language models for automated code smells detection
    Ho, Anh
    Bui, Anh M. T.
    Nguyen, Phuong T.
    Di Salle, Amleto
    Le, Bach
    JOURNAL OF SYSTEMS AND SOFTWARE, 2025, 224
  • [30] ANN Modelling on Vulnerabilities Detection in Code Smells-Associated Android Applications
    Gupta, Aakanshi
    Sharma, Deepanshu
    Phulli, Kritika
    FOUNDATIONS OF COMPUTING AND DECISION SCIENCES, 2022, 47 (01) : 3 - 26