Refactoring packages of object-oriented software using genetic algorithm based community detection technique

Refactoring is regarded as an effective way to address the software quality deterioration problem. Although many refactoring approaches have been proposed, there is little work at the package level. This paper proposes to use the community detection technique to refactor the packages of object-oriented software. It uses software class network to represent classes and their dependencies, proposes a genetic algorithm based community detection algorithm to obtain the optimised package structures, and finally provides a list of classes that should be moved by comparing the optimised package structures with the real package structures. The empirical evaluation of the proposed approach has been performed in two open source Java projects, and the benefits of our approach are illustrated in comparison with the only one software refactoring approach at the package level viz. adaptive k-nearest neighbour algorithm, and other five community detection algorithms used in the complex networks literature.

[1]  M E J Newman,et al.  Fast algorithm for detecting community structure in networks. , 2003, Physical review. E, Statistical, nonlinear, and soft matter physics.

[2]  Stijn van Dongen,et al.  Graph Clustering Via a Discrete Uncoupling Process , 2008, SIAM J. Matrix Anal. Appl..

[3]  Jing Liu,et al.  Class structure refactoring of object-oriented softwares using community detection in dependency networks , 2009, Frontiers of Computer Science in China.

[4]  Edwin Hautus,et al.  IMPROVING JAVA SOFTWARE THROUGH PACKAGE STRUCTURE ANALYSIS , 2002 .

[5]  Gary D. Bader,et al.  An automated method for finding molecular complexes in large protein interaction networks , 2003, BMC Bioinformatics.

[6]  Tor Guimaraes,et al.  Managing application program maintenance expenditures , 1983, CACM.

[7]  Xiaohui Liu,et al.  Variable grouping in multivariate time series via correlation , 2001, IEEE Trans. Syst. Man Cybern. Part B.

[8]  Weixiong Zhang,et al.  Identifying network communities with a high resolution. , 2007, Physical review. E, Statistical, nonlinear, and soft matter physics.

[9]  Clemens A. Szyperski,et al.  Component software - beyond object-oriented programming , 2002 .

[10]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[11]  Patrick Madden,et al.  Circular Layout in the Graph Layout Toolkit , 1996, GD.

[12]  Ralph Weischedel,et al.  PERFORMANCE MEASURES FOR INFORMATION EXTRACTION , 2007 .

[13]  Emden R. Gansner,et al.  Using automatic clustering to produce high-level system organizations of source code , 1998, Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).

[14]  Tom Mens,et al.  A survey of software refactoring , 2004, IEEE Transactions on Software Engineering.

[15]  Huawang Shi,et al.  Particle swarm optimisation-based support vector machine for intelligent fault diagnosis , 2012, Int. J. Comput. Appl. Technol..

[16]  William M. Rand,et al.  Objective Criteria for the Evaluation of Clustering Methods , 1971 .

[17]  Melanie Mitchell,et al.  An introduction to genetic algorithms , 1996 .

[18]  James Noble,et al.  Scale-free geometry in OO programs , 2005, CACM.

[19]  Ewan D. Tempero,et al.  The CRSS Metric for Package Design Quality , 2007, ACSC.

[20]  Ewan D. Tempero,et al.  Identifying refactoring opportunities by identifying dependency cycles , 2006, ACSC.

[21]  Ling Qin,et al.  An ant colony optimisation algorithm for constructing phylogenetic tree , 2012, Int. J. Comput. Appl. Technol..

[22]  Christopher R. Myers,et al.  Software systems as complex networks: structure, function, and evolvability of software collaboration graphs , 2003, Physical review. E, Statistical, nonlinear, and soft matter physics.

[23]  Mohammad Alshayeb,et al.  Software refactoring at the package level using clustering techniques , 2011, IET Softw..

[24]  Stephen S. Yau,et al.  Design Stability Measures for Software Maintenance , 1985, IEEE Transactions on Software Engineering.

[25]  Johannes Stammel,et al.  Search-based determination of refactorings for improving the class structure of object-oriented systems , 2006, GECCO.

[26]  Thomas J. Mowbray,et al.  AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis , 1998 .

[27]  John H. Holland,et al.  Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence , 1992 .

[28]  Yutao Ma,et al.  Measuring Structural Quality of Object-Oriented Softwares via Bug Propagation Analysis on Weighted Software Networks , 2010, Journal of Computer Science and Technology.

[29]  Yanan Li,et al.  Greedy continuous particle swarm optimisation algorithm for the knapsack problems , 2012, Int. J. Comput. Appl. Technol..