How Slim Will My System Be? Estimating Refactored Code Size by Merging Clones

被引:3
作者
Yoshida, Norihiro [1 ]
Ishizu, Takuya [2 ]
Edwards, Bufurod, III [2 ]
Inoue, Katsuro [2 ]
机构
[1] Nagoya Univ, Nagoya, Aichi, Japan
[2] Osaka Univ, Suita, Osaka, Japan
来源
2018 IEEE/ACM 26TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2018) | 2018年
关键词
Code Clone; Refactoring; Size Estimation; SOFTWARE; OPPORTUNITIES;
D O I
10.1145/3196321.3196353
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We have been doing code clone analysis with industry collaborators for a long time, and have been always asked a question, "OK, I understand my system contains a lot of code clones, but how slim will it be after merging redundant code clones?" As a software system evolves for long period, it would increasingly contain many code clones due to quick bug fix and new feature addition. Industry collaborators would recognize decay of initial design simplicity, and try to evaluate current system from the view point of maintenance effort and cost. As one of resources for the evaluation, the estimated code size by merging code clone is very important for them. In this paper, we formulate this issue as "slimming" problem, and present three different slimming methods, Basic, Complete, and Heuristic Methods, each of which gives a lower bound, upper bound, and modest reduction rates, respectively. Application of these methods to OSS systems written in C/C++ showed that the reduction rate is at most 5.7% of the total size, and to a commercial COBOL system, it is at most 15.4%. For this approach, we have gotten initial but very positive feedback from industry collaborators.
引用
收藏
页码:352 / 360
页数:9
相关论文
共 36 条
[1]  
Balazinska M., 1999, Proceedings Sixth International Software Metrics Symposium (Cat. No.PR00403), P292, DOI 10.1109/METRIC.1999.809750
[2]   Advanced clone-analysis to support object-oriented system refactoring [J].
Balazinska, M ;
Merlo, E ;
Dagenais, M ;
Lagüe, B ;
Kontogiannis, K .
SEVENTH WORKING CONFERENCE ON REVERSE ENGINEERING - PROCEEDINGS, 2000, :98-107
[3]   A Data Mining Approach for Detecting Higher-Level Clones in Software [J].
Basit, Hamid Abdul ;
Jarzabek, Stan .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2009, 35 (04) :497-514
[4]   Clone detection using abstract syntax trees [J].
Baxter, ID ;
Yahin, A ;
Moura, L ;
Sant'Anna, M ;
Bier, L .
INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, PROCEEDINGS, 1998, :368-377
[5]   Comparison and evaluation of clone detection tools [J].
Bellon, Stefan ;
Koschke, Rainer ;
Antoniol, Giuliano ;
Krinke, Jens ;
Merlo, Ettore .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2007, 33 (09) :577-591
[6]  
Chen WK, 2003, LECT NOTES COMPUT SC, V2694, P401
[7]  
Choi E., 2011, PROC 5 INT WORKSHOP, P7
[8]  
Cordy JR, 2003, PROG COMPREHEN, P196
[9]  
De Sutter B, 2003, COMMUN ACM, V46, P33
[10]   Compiler techniques for code compaction [J].
Debray, SK ;
Evans, W ;
Muth, R ;
De Sutter, B .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2000, 22 (02) :378-415