A New Metric for Package Cohesion Measurement Based on Complex Network

  • Yanran Mi
  • Yanxi Zhou
  • Liangyu ChenEmail author
Conference paper
Part of the Studies in Computational Intelligence book series (SCI, volume 881)


With software evolution and code expansion, software structure becomes more and more complex. Refactoring can be used to improve the structure design and decrease the complexity of software. In this paper, we propose a cohesive metric that can be used for package refactoring. It considers not only the dependencies of intra-package and inter-package, but also the backward dependencies of inter-package. After theoretical verification and empirical verification on multiple open source softwares, our metric is proved to effectively measure software structure.


Software dependency network Software refactoring Package cohesion measurement Software metric 


  1. 1.
    Tom, E., Aurum, A., Vidgen, R.: An exploration of technical debt. J. Syst. Softw. 86(6), 1498–1516 (2013)CrossRefGoogle Scholar
  2. 2.
    Wang, L., Yu, P., Wang, Z., Yang, C., Ye, Q.: On the evolution of linux kernels: a complex network perspective. J. softw. Evol. Process 25(5), 439–458 (2013)CrossRefGoogle Scholar
  3. 3.
    Myers, C.R.: Software systems as complex networks: structure, function, and evolvability of software collaboration graphs. Phys. Rev. E 68(4), 046116 (2003)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Fowler, M.: Refactoring: improving the design of existing code. In: 11th European Conference. Jyväskylä, Finland (1997)Google Scholar
  5. 5.
    Chidamber, S.R., Kemerer, C.F.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20(6), 476–493 (1994)CrossRefGoogle Scholar
  6. 6.
    Harrison, R., Counsell, S.J., Nithi, R.V.: An evaluation of the mood set of object-oriented software metrics. IEEE Trans. Softw. Eng. 24(6), 491–496 (1998)CrossRefGoogle Scholar
  7. 7.
    Bieman, J.M., Kang, B.-K.: Cohesion and reuse in an object-oriented system. In: ACM SIGSOFT Software Engineering Notes, vol. 20, no. SI, pp. 259–262 (1995)Google Scholar
  8. 8.
    Briand, L.C., Morasca, S., Basili, V.R.: Defining and validating measures for object-based high-level design. IEEE Trans. Softw. Eng. 25(5), 722–743 (1999)CrossRefGoogle Scholar
  9. 9.
    Briand, L.C., Morasca, S., Basili, V.R.: Property-based software engineering measurement. IEEE Trans. Softw. Eng. 22(1), 68–86 (1996) CrossRefGoogle Scholar
  10. 10.
    Counsell, S., Mendes, E., Swift, S.: Comprehension of object-oriented software cohesion: the empirical quagmire. In: Proceedings 10th International Workshop on Program Comprehension, pp. 33–42. IEEE (2002)Google Scholar
  11. 11.
    Badri, L., Badri, M., Toure, F.: Exploring empirically the relationship between lack of cohesion and testability in object-oriented systems. In: International Conference on Advanced Software Engineering and Its Applications, pp. 78–92. Springer (2010)Google Scholar
  12. 12.
    Misic, V.B.: Cohesion is structural, coherence is functional: different views, different measures. In: Proceedings of Seventh International Conference on Software Metrics Symposium, METRICS 2001, pp. 135–144. IEEE (2001)Google Scholar
  13. 13.
    Abdeen, H., Ducasse, S., Sahraoui, H., Alloui, I.: Automatic package coupling and cycle minimization. In: 2009 16th Working Conference on Reverse Engineering, WCRE 2009, pp. 103–112. IEEE (2009)Google Scholar
  14. 14.
    Gupta, V., Chhabra, J.K.: Package level cohesion measurement in object-oriented software. J. Braz. Comput. Soc. 18(3), 251–266 (2012)CrossRefGoogle Scholar
  15. 15.
    Shen, P., Chen, L.: Complex network analysis in Java application systems. J. East Chin. Normal Univ. 38–51 (2017)Google Scholar
  16. 16.
    Newman, M.E., Girvan, M.: Finding and evaluating community structure in networks. Phys. Rev. E 69(2), 026113 (2004)CrossRefGoogle Scholar
  17. 17.
    Pan, W., Li, B., Jiang, B., Liu, K.: Recode: software package refactoring via community detection in bipartite software networks. Adv. Complex Syst. 17(07n08), 1450006 (2014)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.Shanghai Key Laboratory of Trustworthy ComputingEast China Normal UniversityShanghaiChina

Personalised recommendations