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

Wanwangying Ma,Lin Chen,Yuming Zhou,Baowen Xu
DOI: https://doi.org/10.1109/SATE.2016.11
2016-01-01
Abstract: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.
What problem does this paper attempt to address?