Hotspot Patterns: The Formal Definition and Automatic Detection of Architecture Smells

In this paper, we propose and empirically validate a suite of hotspot patterns: recurring architecture problems that occur in most complex systems and incur high maintenance costs. In particular, we introduce two novel hotspot patterns, Unstable Interface and Implicit Cross-module Dependency. These patterns are defined based on Baldwin and Clark's design rule theory, and detected by the combination of history and architecture information. Through our tool-supported evaluations, we show that these patterns not only identify the most error-prone and change-prone files, they also pinpoint specific architecture problems that may be the root causes of bug-proneness and change-proneness. Significantly, we show that 1) these structure-history integrated patterns contribute more to error- and change-proneness than other hotspot patterns, and 2) the more hotspot patterns a file is involved in, the more error- and change-prone it is. Finally, we report on an industrial case study to demonstrate the practicality of these hotspot patterns. The architect and developers confirmed that our hotspot detector discovered the majority of the architecture problems causing maintenance pain, and they have started to improve the system's maintainability by refactoring and fixing the identified architecture issues.

[1]  Rick Kazman,et al.  Decision-making techniques for software architecture design: A comparative survey , 2011, CSUR.

[2]  Yuanfang Cai,et al.  Leveraging design rules to improve software architecture recovery , 2013, QoSA '13.

[3]  Witold Pedrycz,et al.  A comparative analysis of the efficiency of change metrics and static code attributes for defect prediction , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[4]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[5]  Shinji Kusumoto,et al.  Refactoring Support Based on Code Clone Analysis , 2004, PROFES.

[6]  Andreas Zeller,et al.  Mining metrics to predict component failures , 2006, ICSE.

[7]  Philippe Kruchten,et al.  The 4+1 View Model of Architecture , 1995, IEEE Softw..

[8]  Yuanfang Cai,et al.  Titan: a toolset that connects software architecture with quality analysis , 2014, SIGSOFT FSE.

[9]  Yuanfang Cai,et al.  Modularity Analysis of Logical Design Models , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).

[10]  Victor R. Basili,et al.  Analyzing Error-Prone System Structure , 1991, IEEE Trans. Software Eng..

[11]  Yuanfang Cai,et al.  Detecting software modularity violations , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[12]  Yuanfang Cai,et al.  A Case Study in Locating the Architectural Roots of Technical Debt , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[13]  Xiangyu Zhang,et al.  Locating faulty code using failure-inducing chops , 2005, ASE.

[14]  Elaine J. Weyuker,et al.  Predicting the location and number of faults in large software systems , 2005, IEEE Transactions on Software Engineering.

[15]  Yuanfang Cai,et al.  Design rule spaces: a new form of architecture insight , 2014, ICSE.

[16]  Richard N. Taylor,et al.  Software architecture: foundations, theory, and practice , 2009, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[17]  Nenad Medvidovic,et al.  Identifying Architectural Bad Smells , 2009, 2009 13th European Conference on Software Maintenance and Reengineering.

[18]  Kim B. Clark,et al.  The Option Value of Modularity in Design: An Example From Design Rules, Volume 1: The Power of Modularity , 2000 .

[19]  Chao Liu,et al.  SOBER: statistical model-based bug localization , 2005, ESEC/FSE-13.

[20]  Audris Mockus,et al.  Software Dependencies, Work Dependencies, and Their Impact on Failures , 2009, IEEE Transactions on Software Engineering.

[21]  Harald C. Gall,et al.  Detection of logical coupling based on product release history , 1998, Proceedings. International Conference on Software Maintenance (Cat. No. 98CB36272).

[22]  Alexander Chatzigeorgiou,et al.  Identification of Move Method Refactoring Opportunities , 2009, IEEE Transactions on Software Engineering.

[23]  John T. Stasko,et al.  Visualization of test information to assist fault localization , 2002, ICSE '02.

[24]  Yuanfang Cai,et al.  Design Rule Hierarchies and Parallelism in Software Development Tasks , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[25]  Andrew Koenig,et al.  Patterns and Antipatterns , 1998, J. Object Oriented Program..

[26]  Kim B. Clark,et al.  The power of modularity , 2000 .

[27]  Yann-Gaël Guéhéneuc,et al.  A Domain Analysis to Specify Design Defects and Generate Detection Algorithms , 2008, FASE.

[28]  青島 矢一,et al.  書評 カーリス Y. ボールドウィン/キム B. クラーク著 安藤晴彦訳『デザイン・ルール:モジュール化パワー』 Carliss Y. Baldwin & Kim B. Clark/Design Rules, Vol. 1: The Power of Modularity , 2005 .

[29]  Harvey P. Siy,et al.  Predicting Fault Incidence Using Software Change History , 2000, IEEE Trans. Software Eng..

[30]  Paul Clements,et al.  Software architecture in practice , 1999, SEI series in software engineering.

[31]  William G. Griswold,et al.  The structure and value of modularity in software design , 2001, ESEC/FSE-9.

[32]  Yuanfang Cai,et al.  Measuring architecture quality by structure plus history analysis , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[33]  Mark Klein,et al.  Experience with performing architecture tradeoff analysis , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[34]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).