Abstract
The quality of internetware software is significantly associated with class structure. As software evolves, changes often introduce many unrelated responsibilities to the same classes or distribute tightly-related methods in different classes. These changes make the classes difficult to understand and maintain. Extract class refactoring is an effective technique to improve the quality of software structure by decomposing unrelated methods in one class to create new classes or extracting tightly-related methods from different classes. In this paper, we propose a novel approach for class extraction from internetware source codes. This approach leverages a community structure detection technique to partition software into clusters and extracts classes from the resulting clusters. Our experimental results, which investigate the public well-known internetware PKUAS, indicate that: (1) the proposed approach is much faster than existing search-based clustering approaches (Hillclimbing and Genetic algorithm) and is thus applicable for large-scale internetware; (2) the proposed approach can identify meaningful class extractions for internetware; and (3) Extract Class refactoring candidates identified by the proposed approach significantly improve class cohesion of internetware.
Similar content being viewed by others
References
Mei H, Huang G, Zhao H Y, et al. A software architecture centric engineering approach for internetware. Sci China Ser-F Inf Sci, 2006, 49: 702–730
Lv J, Ma X X, Tao X P, et al. Explicit environmental constructs for Internetware. Sci Sin Inform, 2013, 43: 1–23
Fowler M. Refactoring: Improving the Design of Existing Code. Indianapolis: Addison-Wesley, 1999
Mens T, Tourwe T. A survey of software refactoring. IEEE Trans Softw Eng, 2004, 30: 126–139
Tsantalis N, Chatzigeorgiou A. Identification of move method refactoring opportunities. IEEE Trans Softw Eng, 2009, 35: 347–367
Fokaefsa M, Tsantalisa N, Stroulia E, et al. Identification and application of extract class refactorings in object-oriented systems. J Syst Software, 2012, 85: 2241–2260
De Lucia A, Oliveto R, Vorraro L. Using structural and semantic metrics to improve class cohesion. In: Proceedings of IEEE International Conference on Software Maintenance, Beijing, 2008. 27–36
Bavota G, De Lucia A, Oliveto R. Identifying extract class refactoring opportunities using structural and semantic cohesion measures. J Syst Software, 2011, 84: 397–414
Bavota G, De Lucia A, Marcus A, et al. A two-step technique for extract class refactoring. In: Proceedings of IEEE/ACM International Conference on Automated Software Engineering, New York, 2010. 151–154
Bavota G, Oliveto R, De Lucia A, et al. Playing with refactoring: identifying extract class opportunities through game theory. In: Proceedings of IEEE International Conference on Software Maintenance (ICSM), Timisoara, 2010. 1–5
e Abreu F B, Poels G, Sahraoui H A, et al. Quantitative Approaches in Object-Oriented Software Engineering. London: Hermes Penton Science, 2003
O’Keeffe M, Ó Cinnéide M. Search-based refactoring for software maintenance. J Syst Software, 2008, 81: 502–516
Seng O, Stammel J, Burkhart D. Search-based determination of refactorings for improving the class structure of object-oriented systems. In: Proceedings of the 8th Annual Conference on Genetic and Evolutionary Computation (GECCO’06), New York, 2006. 1909–1916
Newman M E J. Modularity and community structure in networks. Proc Natl Acad Sci, 2006, 103: 8577–8582
Rosvall M, Bergstrom C T. An information-theoretic framework for resolving community structure in complex networks. Proc Natl Acad Sci, 2007, 104: 7327–7331
Rosvall M, Bergstrom C T. Maps of information flow reveal community structure in complex networks. Proc Natl Acad Sci, 2008, 105: 1118–1123
Maruyama K, Shima K. Automatic method refactoring using weighted dependence graphs. In: Proceedings of 21st International Conference on Software Engineering, Los Angeles, 1999. 236–245
Chidamber S R, Kemerer C F. A metrics suite for object oriented design. IEEE Trans Softw Eng, 1994, 20: 476–493
Al Dallal J, Briand L C. A precise method-method interaction based cohesion metrics for object-oriented classes. ACM Trans Softw Eng Meth, 2012, 21: 8–34
Huang G, Sun L S. An access control framework for reflective middleware. J Comput Sci Technol, 2008, 23: 895–904
Mitchell B S, Mancoridis S. On the automatic modularization of software systems using the bunch tool. IEEE Trans Softw Eng, 2006, 32: 193–208
Opdyke W F. Refactoring Object-Oriented Frameworks. PhD Thesis. University of Illinois at Urbana-Champaign, 1992
Simon F, Steinbruckner F, Lewerentz C. Metrics based refactoring. In: Proceedings of 5th European Conference on Software Maintenance and Reengineering, Lisbon, 2001. 30–38
Pan W F, Li B, Ma Y T, et al. Class structure refactoring of object-oriented softwares using community detection in dependency networks. Front Comput Sci Chi, 2009, 3: 396–404
Author information
Authors and Affiliations
Corresponding author
Electronic supplementary material
Rights and permissions
About this article
Cite this article
Chen, L., Qian, J., Zhou, Y. et al. Identifying extract class refactoring opportunities for internetware. Sci. China Inf. Sci. 57, 1–18 (2014). https://doi.org/10.1007/s11432-013-5024-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11432-013-5024-1