Discovery of Modularity in Monolithic Java Project Codes Using Complex Networks

Authors

  • Marcos Cordeiro de Brito Jr Graduate Program in Electrical Engineering and Computing, Mackenzie Presbyterian University, São Paulo, Brazil, 01.302-907
  • Calebe P. Bianchini Graduate Program in Electrical Engineering and Computing, Mackenzie Presbyterian University, São Paulo, Brazil, 01.302-907
  • Leandro A. Silva Graduate Program in Electrical Engineering and Computing, Mackenzie Presbyterian University, São Paulo, Brazil, 01.302-907

DOI:

https://doi.org/10.13052/jwe1540-9589.2463

Keywords:

Monolithic, modules, complex network, Java, complexity, static analysis

Abstract

Monolithic architecture is a software design which brings significant difficulties to system developers when it comes to maintenance or expanding the scope of a project. On the other hand, a modular project consists of several similar entities, or modules, which are the object of similar functions or processes that, applied repeatedly, have well-defined classes and smaller modules to work, bringing benefits such as reduced project development time and increased productivity for the system developers. This work proposes the use of complex networks through the NetworkX library in Python, using modularity detection algorithms for the static analysis of Java code. The goal is to discover modules by analyzing dependencies between classes, indicating the best way to identify code clusters to be treated as modules automatically. The outcomes of applying the Greedy Modularity, Louvain, K-Clique, and Girvan Newman algorithms to two open-source projects will be presented. A comparative analysis of these results will be illustrated using generated graphs and a distribution map, emphasizing the number of communities identified by each algorithm.

Downloads

Download data is not yet available.

Author Biographies

Marcos Cordeiro de Brito Jr, Graduate Program in Electrical Engineering and Computing, Mackenzie Presbyterian University, São Paulo, Brazil, 01.302-907

Marcos Cordeiro de Brito Jr received his Master’s degree in Electrical Engineering and Computing from Universidade Presbiteriana Mackenzie in June 2023. Currently, he is the Head of Technology at SPC Grafeno, São Paulo, Brazil. He has had extensive experience in systems and software development since 2000. His skills include technical leadership, agile development, and continuous integration with tools like Jenkins, Docker, Kubernetes, and Git. Marcos is proficient in various programming languages, including Java, Python, and C#, and has strong knowledge of frameworks such as Spring Boot, Django, and Flask. Additionally, he has experience in agile methodologies, TDD, BDD, and cloud architectures using Google Cloud and AWS. He has also served as a professor at Paulista Faculty of Informatics and Administration (FIAP), teaching topics such as Spring Boot, MVC architecture, and Hibernate. Throughout his career, Marcos has participated in numerous national and international projects, significantly contributing to software innovation and quality in the organizations he has worked for.

Calebe P. Bianchini, Graduate Program in Electrical Engineering and Computing, Mackenzie Presbyterian University, São Paulo, Brazil, 01.302-907

Calebe P. Bianchini holds a Bachelor’s degree in Computer Science from UFSCar, Brazil, where he also obtained his Master’s degree. He completed his Ph.D. in Computer Engineering at POLI/USP, Brazil, in 2009. With a combined experience of over 19 years in high-performance computing, he has contributed to numerous research and development projects with Petrobras, Shell, Intel, and CERN, among others. Currently, he is an Associate Professor and researcher at Mackenzie Presbyterian University, where he also heads the MackCloud Lab, a Scientific Computing Center. He is an active member of the Brazilian High-Performance Computing community, particularly in organizing competitions and challenges in this domain. Additionally, he is an Ambassador for the NVIDIA Deep Learning Institute, where he conducts courses related to high-performance computing on NVIDIA GPUs.

Leandro A. Silva, Graduate Program in Electrical Engineering and Computing, Mackenzie Presbyterian University, São Paulo, Brazil, 01.302-907

Leandro A. Silva has a degree in Computer Engineering, a Master’s degree and a Ph.D. from the USP Polytechnic School. He is currently a Professor at the Faculty of Computing and Informatics (FCI), in the Stricto-Sensu Academic Postgraduate Program in Electrical and Computer Engineering (PPGEEC), and in the Stricto-Sensu Professional Postgraduate Program in Applied Computing (PPGCA) and Coordinator Funding for Research (CFP) of the Dean of Research and Postgraduate Studies (PRPG) of Universidade Presbiteriana Mackenzie (UPM). At UPM he has already held administrative activities as FCI Extension Coordinator and PPGEEC Coordinator. As for research activities, he participates in Program Committees for national and international conferences and also provides services as a technical reviewer for conferences and specialized journals. As a line of research, he has worked mainly in areas involving data science such as artificial neural networks, machine learning, data mining, big data, and pattern recognition. In these areas, he has regularly published scientific articles in the main national and international congresses, as well as in specialized journals. He is the main author of the textbook on Data Mining by Elsevier. Finally, Prof. Leandro Augusto co-leads the Laboratory and Research Group Big MAAp – Big Data and Applied Analytical Methods, where he develops Research and Development Projects with support from public agencies and companies from different segments of the production sector.

References

Omar Al-Debagy and Peter Martinek. A comparative review of microservices and monolithic architectures. In 2018 IEEE 18th International Symposium on Computational Intelligence and Informatics (CINTI), pages 000149–000154. IEEE, 2018.

Punam Bedi and Chhavi Sharma. Community detection in social networks. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 6(3):115–135, 2016.

Moritz Beller, Radjino Bholanath, Shane McIntosh, and Andy Zaidman. Analyzing the state of static analysis: A large-scale evaluation in open source software. In 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), volume 1, pages 470–481, 2016.

Vincent D Blondel, Jean-Loup Guillaume, Renaud Lambiotte, and Etienne Lefebvre. Fast unfolding of communities in large networks. Journal of statistical mechanics: theory and experiment, 2008(10):P10008, 2008.

Luís Cavique, Armando B Mendes, and Jorge Santos. An algorithm to discover the k-clique cover in networks. In Portuguese Conference on Artificial Intelligence, pages 363–373. Springer, 2009.

Mingming Chen, Konstantin Kuzmin, and Boleslaw K Szymanski. Community detection via maximization of modularity and its variants. IEEE Transactions on Computational Social Systems, 1(1):46–65, 2014.

Thamires Lopes das Mercês. Análise de métodos de detecção de comunidades em redes complexas.

Ljiljana Despalatović, Tanja Vojković, and Damir Vukicević. Community structure in networks: Girvan-newman algorithm improvement. In 2014 37th international convention on information and communication technology, electronics and microelectronics (MIPRO), pages 997–1002. IEEE, 2014.

Saru Dhir, Deepak Kumar, and VB Singh. Success and failure factors that impact on project implementation using agile software development methodology. In Software engineering, pages 647–654. Springer, 2019.

Eric Evans. Domain-driven design: tackling complexity in the heart of software. Addison-Wesley Professional, United States of America; Massachusetts, 3 edition, 2004.

Santo Fortunato and Darko Hric. Community detection in networks: A user guide. Physics Reports, 659:1–44, 2016.

Martin Fowler. Monolithfirst, 2015.

Enrico Gregori, Luciano Lenzini, and Simone Mainardi. Parallel k-clique community detection on large-scale networks. IEEE Transactions on Parallel and Distributed Systems, 24(8):1651–1660, 2012.

Jesse Griffin. Hexagonal-driven development. In Domain-Driven Laravel, pages 521–544. Springer, 2021.

Darko Hric, Richard K Darst, and Santo Fortunato. Community detection in networks: Structural communities versus ground truth. Physical Review E, 90(6):062805, 2014.

Daniel Izquierdo-Cortazar, Gregorio Robles, Felipe Ortega, and Jesus M Gonzalez-Barahona. Using software archaeology to measure knowledge loss in software projects due to developer turnover. In 2009 42nd Hawaii International Conference on System Sciences, pages 1–10. IEEE, 2009.

James Lewis and Martin Fowler. Microservices, 2014.

P. Louridas. Static code analysis. IEEE Software, 23(4):58–61, 2006.

Robert C Martin, James Grenning, Simon Brown, Kevlin Henney, and Jason Gorman. Clean architecture: a craftsman’s guide to software structure and design. Prentice Hall, 2018.

Harvey Maylor and Neil Turner. Understand, reduce, respond: project complexity management theory and practice. International Journal of Operations & Production Management, 2017.

Brian S. Mitchell and Spiros Mancoridis. On the automatic modularization of software systems using the bunch tool. IEEE Transactions on Software Engineering, 32(3):193–208, 2006.

NetworkX Developers. Networkx. https://networkx.org/, 2023. Accessed: April 04, 2023.

M. E. J. Newman. The structure and function of complex networks. SIAM Review, 45(2):167–256, 2003.

M. E. J. Newman. Modularity and community structure in networks. Proceedings of the National Academy of Sciences, 103(23):8577–8582, 2006.

Gergely Palla, Imre Derényi, Illés Farkas, and Tamás Vicsek. Uncovering the overlapping community structure of complex networks in nature and society. Nature, 435(7043):814–818, 2005.

Weifeng Pan, Bing Li, Yutao Ma, and Jing Liu. Multi-granularity evolution analysis of software using complex network theory. Journal of Systems Science and Complexity, 24(6):1068–1082, 2011.

Leo Pruijt, Christian Köppe, Jan Martijn van der Werf, and Sjaak Brinkkemper. The accuracy of dependency analysis in static architecture compliance checking. Software: practice and Experience, 47(2):273–309, 2017.

Lifeng Qian, Jing Li, Xudong He, Rongbin Gu, Jiawei Shao, and Yuqi Lu. Microservice extraction using graph deep clustering based on dual view fusion. Information and Software Technology, 158:107171, 2023.

Martin Rosvall and Carl T. Bergstrom. Maps of random walks on complex networks reveal community structure. Proceedings of the National Academy of Sciences, 105(4):1118–1123, 2008.

Samuel Santos and António Rito Silva. Microservices identification in monolith systems: functionality redesign complexity and evaluation of similarity measures. Journal of Web Engineering, 21(5):1543–1582, 2022.

K Sathiyakumari and MS Vijaya. Community detection based on girvan newman algorithm and link analysis of social media. In Digital Connectivity–Social Impact: 51st Annual Convention of the Computer Society of India, CSI 2016, Coimbatore, India, December 8-9, 2016, Proceedings 51, pages 223–234. Springer, 2016.

Lars van Asseldonk. From a monolith to microservices: the effect of multi-view clustering. Master’s thesis, Utrecht University, 2021. Accessed: 2024-06-15.

Ding Yanrui, Zhang Zhen, Wang Wenchao, and Cai Yujie. Identifying the communities in the metabolic network using’component’definition and girvan-newman algorithm. In 2015 14th International Symposium on Distributed Computing and Applications for Business Engineering and Science (DCABES), pages 42–45. IEEE, 2015.

Downloads

Published

2025-09-25

How to Cite

Brito Jr, M. C. de ., Bianchini, C. P. ., & Silva, L. A. . (2025). Discovery of Modularity in Monolithic Java Project Codes Using Complex Networks. Journal of Web Engineering, 24(06), 911–942. https://doi.org/10.13052/jwe1540-9589.2463

Issue

Section

Articles