Do We Have a Chance to Fix Bugs When Refactoring Code Smells?

被引:13
作者
Ma, Wanwangying [1 ]
Chen, Lin [1 ]
Zhou, Yuming [1 ]
Xu, Baowen [1 ]
机构
[1] Nanjing Univ, State Key Lab Novel Software Technol, Nanjing, Jiangsu, Peoples R China
来源
2016 INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, TESTING AND EVOLUTION (SATE 2016) | 2016年
关键词
Code smell; refactoring; refactoring prioritization; fault prediction; BAD SMELLS;
D O I
10.1109/SATE.2016.11
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Code smells are used to describe code structures that may cause detrimental effects on software and should be refactored. Previous studies show that some code smells have significant effect on faults. However, how to refactor code smells to reduce bugs still needs more concern. We investigate the possibility of prioritizing code smell refactoring with the help of fault prediction results. We also investigate the possibility of improving the performance of fault prediction by using code smell detection results. We use Cohen's Kappa statistic to report agreements between results of code smell detections and fault predictions. We use fault prediction result as an indicator to guide code smell refactoring. Our results show that refactoring Blob, Long Parameter List, and Refused Parent Be Request may have a good chance to detect and fix bugs, and some code smells are particularly useful for improving the recall of fault prediction.
引用
收藏
页码:24 / 29
页数:6
相关论文
共 35 条
  • [1] [Anonymous], 2014, AUTOM SOFTW ENG, DOI DOI 10.1007/S10515-014-0175-X
  • [2] [Anonymous], 2004, Applied linear regression models
  • [3] A systematic and comprehensive investigation of methods to build and evaluate fault prediction models
    Arisholm, Erik
    Briand, Lionel C.
    Johannessen, Eivind B.
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2010, 83 (01) : 2 - 17
  • [4] A hierarchical model for object-oriented design quality assessment
    Bansiya, J
    Davis, CG
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2002, 28 (01) : 4 - 17
  • [5] Brown H W, 1998, ANTIPATTERNS REFACTO
  • [6] Merits of Using Repository Metrics in Defect Prediction for Open Source Projects
    Caglayan, Bora
    Bener, Ayse
    Koch, Stefan
    [J]. 2009 ICSE WORKSHOP ON EMERGING TRENDS IN FREE-LIBRE-OPEN SOURCE SOFTWARE RESEARCH AND DEVELOPMENT, 2009, : 31 - +
  • [7] A METRICS SUITE FOR OBJECT-ORIENTED DESIGN
    CHIDAMBER, SR
    KEMERER, CF
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1994, 20 (06) : 476 - 493
  • [8] A COEFFICIENT OF AGREEMENT FOR NOMINAL SCALES
    COHEN, J
    [J]. EDUCATIONAL AND PSYCHOLOGICAL MEASUREMENT, 1960, 20 (01) : 37 - 46
  • [9] D'Ambros Marco, 2010, Proceedings of the Tenth International Conference on Quality Software (QSIC 2010), P23, DOI 10.1109/QSIC.2010.58
  • [10] Fowler M., 1999, Refactoring: Improving the design of existing code