Coherent clusters in source code

被引:10
作者
Islam, Syed [1 ]
Krinke, Jens [1 ]
Binkley, David [2 ]
Harman, Mark [1 ]
机构
[1] UCL, London WC1E 6BT, England
[2] Loyola Univ Maryland, Baltimore, MD 21210 USA
基金
英国工程与自然科学研究理事会;
关键词
Dependence analysis; Program comprehension; Software clustering; PROGRAM DEPENDENCE GRAPH; SOFTWARE; TOOL;
D O I
10.1016/j.jss.2013.07.040
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This paper presents the results of a large scale empirical study of coherent dependence clusters. All statements in a coherent dependence cluster depend upon the same set of statements and affect the same set of statements; a coherent cluster's statements have 'coherent' shared backward and forward dependence. We introduce an approximation to efficiently locate coherent clusters and show that it has a minimum precision of 97.76%. Our empirical study also finds that, despite their tight coherence constraints, coherent dependence clusters are in abundance: 23 of the 30 programs studied have coherent clusters that contain at least 10% of the whole program. Studying patterns of clustering in these programs reveals that most programs contain multiple substantial coherent clusters. A series of subsequent case studies uncover that all clusters of significant size map to a logical functionality and correspond to a program structure. For example, we show that for the program acct, the top five coherent clusters all map to specific, yet otherwise non-obvious, functionality. Cluster visualization also brings out subtle deficiencies in program structure and identifies potential refactoring candidates. A study of inter-cluster dependence is used to highlight how coherent clusters are connected to each other, revealing higher-level structures, which can be used in reverse engineering. Finally, studies are presented to illustrate how clusters are not correlated with program faults as they remain stable during most system evolution. (C) 2013 The Authors. Published by Elsevier Inc. All rights reserved.
引用
收藏
页码:1 / 24
页数:24
相关论文
共 50 条
[1]  
Acharya M, 2011, 2011 33RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), P746, DOI 10.1145/1985793.1985898
[2]   A Systematic Review of the Application and Empirical Investigation of Search-Based Test Case Generation [J].
Ali, Shaukat ;
Briand, Lionel C. ;
Hemmati, Hadi ;
Panesar-Walawege, Rajwinder K. .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2010, 36 (06) :742-762
[3]  
Anderson Paul., 2001, P 1 WORKSHOP INSPECT, P1
[4]  
[Anonymous], 9419 DIKU U COP
[5]  
[Anonymous], 1999, Handbook of Combinatorial Optimization, DOI [DOI 10.1007/978-1-4757-3023-4_1, 10.1007/978-1-4757-3023-41]
[6]   SPACE-FILLING SOFTWARE VISUALIZATION [J].
BAKER, MJ ;
EICK, SG .
JOURNAL OF VISUAL LANGUAGES AND COMPUTING, 1995, 6 (02) :119-133
[7]  
Bastian M., 2009, INT AAAI C WEBL SOC, DOI DOI 10.13140/2.1.1341.1520
[8]   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
[9]  
Beszédes A, 2007, PROC IEEE INT CONF S, P254
[10]  
Beyer D, 2008, ICSE'08 PROCEEDINGS OF THE THIRTIETH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, P967