Skip to main content
Log in

Class structure refactoring of object-oriented softwares using community detection in dependency networks

  • Research Article
  • Published:
Frontiers of Computer Science in China Aims and scope Submit manuscript

Abstract

The quality of a software system is largely determined by its internal structures which always degrade over the software evolution. Therefore, the structures have to be reconditioned from time to time. However, the existing methods are very complex and resource-consuming when doing this task. In this paper, we present an approach to recondition the class structures of object-oriented (OO) software systems. It uses attribute-method networks and method-method networks to represent attributes, methods and dependencies between them; It proposes a guided community detection algorithm to obtain the optimized community structures in the method-method networks, which also correspond to the optimized class structures; It also provides a list of refactorings by comparing the optimized class structures with the real class structure in software systems and inspecting the attribute-method networks. The approach is evaluated using the open-source case study, JHotDraw 5.1, and the advantages of our approach are illustrated in comparison with existing methods.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Seng O, Stanmmel J, Burkhart D. Search-based determination of refactoring for improving the class structure of object-oriented system. In: Proceedings of Genetic and Evolutionary Computation Conference. 2006, 1235–1248

  2. Mens T, Tourwé T. A survey of software refactoring. IEEE Transaction on Software Engineering, 2004, 30(2): 126–139

    Article  Google Scholar 

  3. Fowler M. Refactoring-Improving the Design of Existing Code. New York: Addison Wesley, 1990

    Google Scholar 

  4. Coleman DM, Ash D, Lowther B, et al. Using metrics to evaluate software system maintainability. IEEE Computer Society, 1994, 27(8): 44–49

    Google Scholar 

  5. Guimaraes T. Managing application program maintenance expenditure. Communications of ACM, 1983, 26(10): 739–746

    Article  Google Scholar 

  6. Fowler M. Improving the Design of Existing Code. New York: Addison Wesley, 1999

    Google Scholar 

  7. Brown WH, Malveau R, McCormick H, et al. Antipatterns: Refactoring Software, Architectures, and Projects in Crises. New York: John Wiley and Sons, 1998

    Google Scholar 

  8. Radicchi F, Castellano C, Cecconi F, et al. Defining and identifying communities in networks. In: Proceedings of the National Academy of Science of the United States of America. 2004, 101(9): 2658–2663

    Article  Google Scholar 

  9. Newman M E J. Fast algorithm for detecting community structure in networks. Physical Review E, 2004, 69: 066133

    Article  Google Scholar 

  10. Kang B, Bieman J M. A quantitative framework for software restructuring. Journal of Software Maintenance: Research and Practice Software Focus, 1999, 11(4): 245–284

    Article  Google Scholar 

  11. Ivkovic I, Kontogiannis K. A framework for software architecture refactoring using model transformations and semantic annotations. In: Proceedings of the Conference on Software Maintenance and Reengineering. 2006, 135–144

  12. Dudzikan T, Wlodka J. Tool-supported discovery and refactoring of structural weakness. Dissertaion for the master’s degree. Berlin: TU Berlin, 2002

    Google Scholar 

  13. Czibula I G, Serban G. Improving system design using a clustering approach. International Journal of Computer Science and Network Security, 2006, 6(12): 40–49

    Google Scholar 

  14. Watts D J, Strogatz S H. Collective dynamics of small world networks. Nature, 1998, 393: 400–442

    Article  Google Scholar 

  15. Barabási, Albert R. Emergence of scaling in random networks. Science, 1999, 286: 509–512

    Article  MathSciNet  Google Scholar 

  16. Kernighan B W, Lin S. An efficient heuristic procedure for portioning graphs. Bell System Technical Journal, 1970, 49: 291–307

    Google Scholar 

  17. Fiedler M. Algebraic connectivity of graphs. Czechoslovak Mathematical Journal, 1973, 23(98): 298–305

    MathSciNet  Google Scholar 

  18. Scott J. Social network analysis: a handbook. London: Sage Publications Ltd, 2000

    Google Scholar 

  19. Girvan M, Newman M E J. Community structure in social and biological networks. In: Proceedings of Natl. Acad. Sci USA. 2002, 99(12): 7821–7826

    Article  MATH  MathSciNet  Google Scholar 

  20. Newman M E J, Girvan M. Finding and evaluating community structure in networks. Physical Review, 2004, 69: 026113

    Google Scholar 

  21. Newman M E J. Fast algorithm for detecting community structure in networks. Physical Review, 2004, 69: 066133

    Google Scholar 

  22. Wu F, Huberman B A. Finding communities in linear time: a physics approach. Euro. Phys J B, 2003, 38: 331–338

    Article  Google Scholar 

  23. Li Bing, Ma Yutao, Liu Jing, et al. Advances in the Studies on Complex Networks of Software Systems. Advances in Mechanics, 2008, 38(6): 805–814

    Google Scholar 

  24. Bauer M, Trifu M. Architecture-aware adaptive clustering of OO systems. In: Proceedings of the 8th European Conference on Software Maintenance and Reengineering. 2004, 3–14

  25. Fortunato S, Barthelemy M. Resolution limit in community detection. In: Proceedings of the National Academy of Science of the USA. 2007, 104: 36–41

    Article  Google Scholar 

  26. Mancoridis S, Mitchell BS, Rorres C, et al. Using automatic clustering to produce high-level system organizations of source code. In: Proceedings of 6th International Workshop on Program Comprehension. 1998, 45–53

  27. Tucker A, Swift S, Liu X. Grouping multivariate time series via correlation. IEEE Transaction on Systems, Man, and Cybernetics. Part B. Cybernetics, 2001, 31(2): 235–245

    Article  Google Scholar 

  28. Srivastava A, Schertz C. Efficient integration testing using dependency analysis. Microsoft Research-Technical Report, MSR-TR-2005-94, 2005

  29. Borgatti S P, Everett M G, Freeman L C. Ucinet for windows: software for social network analysis. Analytic Technologies, Harvard, MA, 2002

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bing Li.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Pan, W., Li, B., Ma, Y. et al. Class structure refactoring of object-oriented softwares using community detection in dependency networks. Front. Comput. Sci. China 3, 396–404 (2009). https://doi.org/10.1007/s11704-009-0054-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11704-009-0054-y

Keywords

Navigation