Detecting Model View Controller Architectural Layers using Clustering in Mobile Codebases

Mobile applications are one of the most common software projects written nowadays. The software architectures used for building those type of products heavily impacts their lifecycle as the architectural issues affect the internal quality of a software system hindering its maintainability and extensibility. We are presenting a novel approach, Clustering ARchitecture Layers (CARL), for detecting architectural layers using an automatic method that could represent the first step in the identification and elimination of various architectural smells. Unlike supervised Machine Learning approaches, the involved clustering method does not require any initial training data or modelling phase to set up the detecting system. As a further key of novelty, the method works by considering as codebase’s hybrid features the information inferred from both module dependency graph and the mobile SDKs. Our approach considers and fuses various types of structural as well as lexical dependencies extracted from the codebase, it analyses the types of the components, their methods signatures as well as their properties. Our method is a generic one and can be applied to any presentational applications that use SDKs for building their user interfaces. We assess the effectiveness of our proposed layer detection approach over three public and private codebases of various dimensions and complexities. External and internal clustering metrics were used to evaluate the detection quality, obtaining an Average Accuracy of 77,95%. Moreover, the Precision measure was computed for each layer of the investigated codebase architectures and the average of this metric (over all layers and codebases) is 79,32% while the average Recall on all layers obtained is

[1]  Santonu Sarkar,et al.  Discovery of architectural layers and measurement of layering violations in source code , 2009, J. Syst. Softw..

[2]  Emden R. Gansner,et al.  Bunch: a clustering tool for the recovery and maintenance of software system structures , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[3]  Naouel Moha,et al.  An exploratory study of MVC-based architectural patterns in Android apps , 2019, SAC.

[4]  David M. W. Powers,et al.  Characterization and evaluation of similarity measures for pairs of clusterings , 2009, Knowledge and Information Systems.

[5]  Vineet Sinha,et al.  Using dependency models to manage complex software architecture , 2005, OOPSLA '05.

[6]  Peter Norvig,et al.  Artificial Intelligence: A Modern Approach , 1995 .

[7]  Jurriaan Hage,et al.  A search-based approach to multi-view clustering of software systems , 2015, 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[8]  Nenad Medvidovic,et al.  An Empirical Study of Architectural Change in Open-Source Software Systems , 2015, 2015 IEEE/ACM 12th Working Conference on Mining Software Repositories.

[9]  Giuseppe Scanniello,et al.  Using the Kleinberg Algorithm and Vector Space Model for Software System Clustering , 2010, 2010 IEEE 18th International Conference on Program Comprehension.

[10]  Richard C. Holt,et al.  ACCD: an algorithm for comprehension-driven clustering , 2000, Proceedings Seventh Working Conference on Reverse Engineering.

[11]  Hausi A. Müller,et al.  A reverse-engineering approach to subsystem structure identification , 1993, J. Softw. Maintenance Res. Pract..

[12]  Spiros Mancoridis,et al.  On the evaluation of the Bunch search-based software modularization algorithm , 2007, Soft Comput..

[13]  Vladimir I. Levenshtein,et al.  Binary codes capable of correcting deletions, insertions, and reversals , 1965 .

[14]  Stéphane Ducasse,et al.  Semantic clustering: Identifying topics in source code , 2007, Inf. Softw. Technol..

[15]  Hafedh Mili,et al.  The Layered Architecture revisited: Is it an Optimization Problem? , 2013, SEKE.

[16]  Tom Fawcett,et al.  An introduction to ROC analysis , 2006, Pattern Recognit. Lett..

[17]  Nicolas Anquetil,et al.  Recovering software architecture from the names of source files , 1999, J. Softw. Maintenance Res. Pract..

[18]  Nenad Medvidovic,et al.  A comparative analysis of software architecture recovery techniques , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[19]  Ioannis Stamelos,et al.  Towards Open Source Software System Architecture Recovery Using Design Metrics , 2011, 2011 15th Panhellenic Conference on Informatics.