{"title":"当重构有异味的代码时,我们有机会修复bug吗?","authors":"Wanwangying Ma, Lin Chen, Yuming Zhou, Baowen Xu","doi":"10.1109/SATE.2016.11","DOIUrl":null,"url":null,"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.","PeriodicalId":344531,"journal":{"name":"2016 International Conference on Software Analysis, Testing and Evolution (SATE)","volume":"171 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-11-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"15","resultStr":"{\"title\":\"Do We Have a Chance to Fix Bugs When Refactoring Code Smells?\",\"authors\":\"Wanwangying Ma, Lin Chen, Yuming Zhou, Baowen Xu\",\"doi\":\"10.1109/SATE.2016.11\",\"DOIUrl\":null,\"url\":null,\"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.\",\"PeriodicalId\":344531,\"journal\":{\"name\":\"2016 International Conference on Software Analysis, Testing and Evolution (SATE)\",\"volume\":\"171 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2016-11-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"15\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2016 International Conference on Software Analysis, Testing and Evolution (SATE)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/SATE.2016.11\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2016 International Conference on Software Analysis, Testing and Evolution (SATE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SATE.2016.11","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 15
摘要
代码气味用于描述可能对软件造成有害影响的代码结构,应该对其进行重构。以前的研究表明,某些代码气味对错误有显著的影响。然而,如何重构代码气味以减少bug仍然需要更多的关注。我们研究了在故障预测结果的帮助下对代码气味重构进行优先级排序的可能性。我们还研究了利用代码气味检测结果提高故障预测性能的可能性。我们使用Cohen的Kappa统计来报告代码气味检测结果和故障预测之间的一致性。我们使用故障预测结果作为指标来指导代码气味重构。我们的结果表明,重构Blob、Long Parameter List和Refused Parent Be Request可能有很好的机会检测和修复bug,并且一些代码气味对于提高故障预测的召回率特别有用。
Do We Have a Chance to Fix Bugs When Refactoring Code Smells?
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.