On the Density and Diversity of Degradation Symptoms in Refactored Classes: A Multi-case Study

Root canal refactoring is a software development activity that is intended to improve dependability-related attributes such as modifiability and reusability. Despite being an activity that contributes to these attributes, deciding when applying root canal refactoring is far from trivial. In fact, finding which elements should be refactored is not a cut-and-dried task. One of the main reasons is the lack of consensus on which characteristics indicate the presence of structural degradation. Thus, we evaluated whether the density and diversity of multiple automatically detected symptoms can be used as consistent indicators of the need for root canal refactoring. To achieve our goal, we conducted a multi-case exploratory study involving 6 open source systems and 2 systems from our industry partners. For each system, we identified the classes that were changed through one or more root canal refactorings. After that, we compared refactored and non-refactored classes with respect to the density and diversity of degradation symptoms. We also investigated if the most recurrent combinations of symptoms in refactored classes can be used as strong indicators of structural degradation. Our results show that refactored classes usually present higher density and diversity of symptoms than non-refactored classes. However, root canal refactorings that are performed by developers in practice may not be enough for reducing degradation, since the vast majority had little to no impact on the density and diversity of symptoms. Finally, we observed that symptom combinations in refactored classes are similar to the combinations in non-refactored classes. Based on our findings, we elicited an initial set of requirements for automatically recommending root canal refactorings.

[1]  Andrew P. Black,et al.  Seven habits of a highly effective smell detector , 2008, RSSE '08.

[2]  Andrew P. Black,et al.  How we refactor, and how we know it , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[3]  Danny Dig,et al.  Accurate and Efficient Refactoring Detection in Commit History , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[4]  Alessandro F. Garcia,et al.  Identifying Architectural Problems through Prioritization of Code Smells , 2016, 2016 X Brazilian Symposium on Software Components, Architectures and Reuse (SBCARS).

[5]  Nenad Medvidovic,et al.  Are automatically-detected code anomalies relevant to architectural modularity?: an exploratory analysis of evolving systems , 2012, AOSD.

[6]  Peng Liang,et al.  A systematic mapping study on technical debt and its management , 2015, J. Syst. Softw..

[7]  Michael W. Godfrey,et al.  Secrets from the Monster: Extracting Mozilla’s Software Architecture , 2000 .

[8]  Diomidis Spinellis,et al.  A survey on software smells , 2018, J. Syst. Softw..

[9]  Robert C. Martin,et al.  Agile Principles, Patterns, and Practices in C# (Robert C. Martin) , 2006 .

[10]  Aiko Fallas Yamashita,et al.  Do code smells reflect important maintainability aspects? , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[11]  Gabriele Bavota,et al.  An experimental investigation on the innate relationship between quality and refactoring , 2015, J. Syst. Softw..

[12]  Andrew P. Black,et al.  An interactive ambient visualization for code smells , 2010, SOFTVIS '10.

[13]  Baldoino Fonseca dos Santos Neto,et al.  A Quantitative Study on Characteristics and Effect of Batch Refactoring on Code Smells , 2019, 2019 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM).

[14]  Jan Bosch,et al.  Time to Pay Up: Technical Debt from a Software Quality Perspective , 2017, CIbSE.

[15]  Zarour Mohammad,et al.  AN EMPIRICAL STUDY OF BAD SMELLS DURING SOFTWARE EVOLUTION USING DESIGNITE TOOL , 2018 .

[16]  Yann-Gaël Guéhéneuc,et al.  DECOR: A Method for the Specification and Detection of Code and Design Smells , 2010, IEEE Transactions on Software Engineering.

[17]  Foutse Khomh,et al.  An Empirical Study of the Impact of Two Antipatterns, Blob and Spaghetti Code, on Program Comprehension , 2011, 2011 15th European Conference on Software Maintenance and Reengineering.

[18]  Alessandro F. Garcia,et al.  On the relationship of code-anomaly agglomerations and architectural problems , 2015, Journal of Software Engineering Research and Development.

[19]  Alessandro F. Garcia,et al.  Code Anomalies Flock Together: Exploring Code Anomaly Agglomerations for Locating Design Problems , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

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

[21]  Stephen R. Schach,et al.  Maintainability of the Linux kernel , 2002, IEE Proc. Softw..

[22]  Carlos José Pereira de Lucena,et al.  Identifying Design Problems in the Source Code: A Grounded Theory , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[23]  Alessandro F. Garcia,et al.  Ranking architecturally critical agglomerations of code smells , 2019, Sci. Comput. Program..

[24]  Girish Suryanarayana,et al.  Refactoring for Software Design Smells: Managing Technical Debt , 2014 .

[25]  Lori L. Pollock,et al.  Automatic generation of natural language summaries for Java classes , 2013, 2013 21st International Conference on Program Comprehension (ICPC).

[26]  Jan Bosch,et al.  Design erosion: problems and causes , 2002, J. Syst. Softw..

[27]  Carolyn B. Seaman,et al.  A Balancing Act: What Software Practitioners Have to Say about Technical Debt , 2012, IEEE Softw..

[28]  Yuanfang Cai,et al.  Identifying and Quantifying Architectural Debt , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[29]  Nenad Medvidovic,et al.  An Empirical Study of Architectural Decay in Open-Source Software , 2018, 2018 IEEE International Conference on Software Architecture (ICSA).

[30]  E. Murphy-Hill,et al.  Refactoring Tools: Fitness for Purpose , 2006, IEEE Software.

[31]  Francesca Arcelli Fontana,et al.  Inter-smell relations in industrial and open source systems: A replication and comparative analysis , 2015, 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[32]  Alessandro F. Garcia,et al.  How does refactoring affect internal quality attributes?: A multi-project study , 2017, SBES'17.

[33]  Alessandro F. Garcia,et al.  Removal of Design Problems through Refactorings: Are We Looking at the Right Symptoms? , 2019, 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC).

[34]  Tushar Sharma,et al.  Designite - A Software Design Quality Assessment Tool , 2016, 2016 IEEE/ACM 1st International Workshop on Bringing Architectural Design Thinking Into Developers' Daily Activities (BRIDGE).

[35]  Carlos José Pereira de Lucena,et al.  On the identification of design problems in stinky code: experiences and tool support , 2018, Journal of the Brazilian Computer Society.

[36]  Alessandro F. Garcia,et al.  On the Relevance of Code Anomalies for Identifying Architecture Degradation Symptoms , 2012, 2012 16th European Conference on Software Maintenance and Reengineering.

[37]  Yuanfang Cai,et al.  Hotspot Patterns: The Formal Definition and Automatic Detection of Architecture Smells , 2015, 2015 12th Working IEEE/IFIP Conference on Software Architecture.

[38]  Baldoino Fonseca dos Santos Neto,et al.  Understanding the impact of refactoring on smells: a longitudinal study of 23 software projects , 2017, ESEC/SIGSOFT FSE.

[39]  Alan MacCormack,et al.  Exploring the Structure of Complex Software Designs: An Empirical Study of Open Source and Proprietary Code , 2006, Manag. Sci..

[40]  Alessandro F. Garcia,et al.  Supporting the identification of architecturally-relevant code anomalies , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[41]  Andreas Zeller,et al.  Where Should We Fix This Bug? A Two-Phase Recommendation Model , 2013, IEEE Transactions on Software Engineering.