Design Defects Detection and Correction by Example

被引:70
作者
Kessentini, Marouane [1 ]
Kessentini, Wael [1 ]
Sahraoui, Houari [1 ]
Boukadoum, Mounir [2 ]
Ouni, Ali [1 ]
机构
[1] Univ Montreal, DIRO, Montreal, PQ H3C 3J7, Canada
[2] Univ Quebec, DI, Montreal, PQ, Canada
来源
2011 IEEE 19TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC) | 2011年
关键词
design defects; software maintenance; search-based software engineering; by example; OPTIMIZATION;
D O I
10.1109/ICPC.2011.22
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Detecting and fixing defects make programs easier to understand by developers. We propose an automated approach for the detection and correction of various types of design defects in source code. Our approach allows to automatically find detection rules, thus relieving the designer from doing so manually. Rules are defined as combinations of metrics/thresholds that better conform to known instances of design defects (defect examples). The correction solutions, a combination of refactoring operations, should minimize, as much as possible, the number of defects detected using the detection rules. In our setting, we use genetic programming for rule extraction. For the correction step, we use genetic algorithm. We evaluate our approach by finding and fixing potential defects in four open-source systems. For all these systems, we found, in average, more than 80% of known defects, a better result when compared to a state-of-the-art approach, where the detection rules are manually or semiautomatically specified. The proposed corrections fix, in average, more than 78% of detected defects.
引用
收藏
页码:81 / 90
页数:10
相关论文
共 28 条
  • [1] Alikacem H., 2006, ACT 12 C LMO
  • [2] [Anonymous], 1998, AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis
  • [3] [Anonymous], 2003, Genetic programming IV: routine human-competitive machine intelligence
  • [4] Dhambri K, 2008, CSMR 2008: 12TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING, P279
  • [5] Eberhart RC, 2001, IEEE C EVOL COMPUTAT, P81, DOI 10.1109/CEC.2001.934374
  • [6] Fenton N., 1997, SOFTWARE METRICS RIG
  • [7] Fowler M., 2018, Refactoring: Improving the Design of Existing Code
  • [8] Gaffney J.E., 1981, P ACM 81 C, P126
  • [9] Goldberg DE., 1989, GENETIC ALGORITHMS S, V13
  • [10] Metrics are fitness functions too
    Harman, M
    Clark, J
    [J]. 10TH INTERNATIONAL SYMPOSIUM ON SOFTWARE METRICS, PROCEEDINGS, 2004, : 58 - 69