Hybrid particle swarm optimisation with mutation for code smell detection

被引:11
作者
Saranya, G. [1 ]
Nehemiah, H. Khanna [1 ]
Kannan, A. [2 ]
机构
[1] Anna Univ, Ramanujan Comp Ctr, Madras 600025, Tamil Nadu, India
[2] Anna Univ, Dept Informat Sci & Technol, Madras 600025, Tamil Nadu, India
关键词
search-based software engineering; code smell; evolutionary algorithms; software maintenance; software metrics; particle swarm optimisation; PSO; hybrid particle swarm optimisation; cohesion; coupling; open source software; DEFECTS DETECTION;
D O I
10.1504/IJBIC.2018.10015872
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Code smells are characterised as the structural defects in the software which indicate a poor software design and in turn makes the software hard to maintain. However, detecting and fixing the code smell in the software is a time consuming process, and it is difficult to fix manually. In this paper, an algorithm named as hybrid particle swarm optimisation with mutation (HPSOM) is used for identification of code smell by automatic generation of rules which represent the combination of metrics and threshold. Moreover, an empirical evaluation to compare HPSOM with other evolutionary approaches such as the parallel evolutionary algorithm (PEA), genetic algorithm (GA), genetic programming (GP) and particle swarm optimisation (PSO) to detect the code smell is done. The analysis shows that the HPSOM algorithm performs better than other approaches when applied on nine open source projects, namely, JfreeChart, GanttProject, ApacheAnt 5.2, ApacheAnt 7.0, Hutch, Log4J, Lucene, Xerces-J and Rhino. HPSOM approach has achieved precision of 94% and recall of 92% on five different types of code smells namely, blob, data class, spaghetti code, functional decomposition and feature envy.
引用
收藏
页码:186 / 195
页数:10
相关论文
共 37 条
  • [1] Abran A., 1993, Journal of Software Maintenance: Research and Practice, V5, P63, DOI 10.1002/smr.4360050202
  • [2] [Anonymous], 2016, SOFTW QUALITY J
  • [3] [Anonymous], 1999, MODERN INFORM RETRIE
  • [4] [Anonymous], 1998, AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis
  • [5] [Anonymous], ACT 12 C LANG MOD OB
  • [6] [Anonymous], 1992, GENETIC PROGRAMMING
  • [7] Parameter tuning or default values? An empirical investigation in search-based software engineering
    Arcuri, Andrea
    Fraser, Gordon
    [J]. EMPIRICAL SOFTWARE ENGINEERING, 2013, 18 (03) : 594 - 623
  • [8] Dexun J., 2013, Int. J. Softw. Eng. Appl, V4, P1, DOI DOI 10.5121/ijsea.2013.4501
  • [9] Esmin AAA, 2013, INT J INNOV COMPUT I, V9, P1919
  • [10] Comparing and experimenting machine learning techniques for code smell detection
    Fontana, Francesca Arcelli
    Mantyla, Mika V.
    Zanoni, Marco
    Marino, Alessandro
    [J]. EMPIRICAL SOFTWARE ENGINEERING, 2016, 21 (03) : 1143 - 1191