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 条
  • [1] DECOR: A Method for the Specification and Detection of Code and Design Smells
    Moha, Naouel
    Gueheneuc, Yann-Gael
    Duchien, Laurence
    Le Meur, Anne-Francoise
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2010, 36 (01) : 20 - 36
  • [2] DynAMICS: A Tool-Based Method for the Specification and Dynamic Detection of Android Behavioral Code Smells
    Prestat, Dimitri
    Moha, Naouel
    Villemaire, Roger
    Avellaneda, Florent
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2024, 50 (04) : 765 - 784
  • [3] A domain analysis to specify design defects and generate detection algorithms
    Moha, Naouel
    Gueheneuc, Yann-Gael
    Le Meur, Anne-Francoise
    Duchien, Laurence
    FUNDAMENTAL APPROACHES TO SOFTWARE ENGINEERING, PROCEEDINGS, 2008, 4961 : 276 - +
  • [4] Refused Bequest Code Smells Detection on Software Design
    Firdaus, Muhammad Faishal
    Priyambadha, Bayu
    Pradana, Fajar
    PROCEEDINGS OF 2018 3RD INTERNATIONAL CONFERENCE ON SUSTAINABLE INFORMATION ENGINEERING AND TECHNOLOGY (SIET 2018), 2018, : 288 - 291
  • [5] An empirical study of Android behavioural code smells detection
    Prestat, Dimitri
    Moha, Naouel
    Villemaire, Roger
    EMPIRICAL SOFTWARE ENGINEERING, 2022, 27 (07)
  • [6] An empirical study of Android behavioural code smells detection
    Dimitri Prestat
    Naouel Moha
    Roger Villemaire
    Empirical Software Engineering, 2022, 27
  • [7] A Lightweight Approach for Detection of Code Smells
    Ghulam Rasool
    Zeeshan Arshad
    Arabian Journal for Science and Engineering, 2017, 42 : 483 - 506
  • [8] A Lightweight Approach for Detection of Code Smells
    Rasool, Ghulam
    Arshad, Zeeshan
    ARABIAN JOURNAL FOR SCIENCE AND ENGINEERING, 2017, 42 (02) : 483 - 506
  • [9] Code Smells Analysis Mechanisms, Detection Issues, and Effect on Software Maintainability
    Lafi, Mohammed
    Botros, Joseph Wassily
    Kafaween, Hamzah
    Al-Dasoqi, Ahmad Bassam
    Al-Tamimi, Abdelfatah
    2019 IEEE JORDAN INTERNATIONAL JOINT CONFERENCE ON ELECTRICAL ENGINEERING AND INFORMATION TECHNOLOGY (JEEIT), 2019, : 663 - 666
  • [10] Code smells incidence: does it depend on the application domain?
    dos Reis, Jose Pereira
    Brito e Abreu, Fernando
    Carneiro, Glauco de F.
    PROCEEDINGS 2016 10TH INTERNATIONAL CONFERENCE ON THE QUALITY OF INFORMATION AND COMMUNICATIONS TECHNOLOGY (QUATIC), 2016, : 172 - 177