Discovery of Modularity in Monolithic Java Project Codes Using Complex Networks
DOI:
https://doi.org/10.13052/jwe1540-9589.2463Keywords:
Monolithic, modules, complex network, Java, complexity, static analysisAbstract
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
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.

