skip to main content
10.1145/2884781.2884868acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Code anomalies flock together: exploring code anomaly agglomerations for locating design problems

Published: 14 May 2016 Publication History

Abstract

Design problems affect every software system. Diverse software systems have been discontinued or reengineered due to design problems. As design documentation is often informal or nonexistent, design problems need to be located in the source code. The main difficulty to identify a design problem in the implementation stems from the fact that such problem is often scattered through several program elements. Previous work assumed that code anomalies -- popularly known as code smells -- may provide sufficient hints about the location of a design problem. However, each code anomaly alone may represent only a partial embodiment of a design problem. In this paper, we hypothesize that code anomalies tend to "flock together" to realize a design problem. We analyze to what extent groups of inter-related code anomalies, named agglomerations, suffice to locate design problems. We analyze more than 2200 agglomerations found in seven software systems of different sizes and from different domains. Our analysis indicates that certain forms of agglomerations are consistent indicators of both congenital and evolutionary design problems, with accuracy often higher than 80%.

References

[1]
M. Abbes, F. Khomh, Y.-G. Guéhéneuc, and G. Antoniol. An empirical study of the impact of two antipatterns, blob and spaghetti code, on program comprehension. In Software Maintenance and Reengineering (CSMR), 2011 15th European Conference on, pages 181--190, March 2011.
[2]
I. M. Bertrán. On the Detection of Architecturally-Relevant Code Anomalies in Software Systems. PhD thesis, Pontifical Catholic University of Rio de Janeiro (PUC-Rio), Rio de Janeiro, Brazil, 2013.
[3]
V. Bloomfield. Using R for Numerical Analysis in Science and Engineering. Chapman & Hall/CRC The R Series. Taylor & Francis, 2014.
[4]
J. Cornfield. A method of estimating comparative rates from clinical data; applications to cancer of the lung, breast, and cervix. Journal of the National Cancer Institute, 11(6):1269--1275, June 1951.
[5]
M. D'Ambros, A. Bacchelli, and M. Lanza. On the impact of design flaws on software defects. In Quality Software (QSIC), 2010 10th International Conference on, pages 23--31, July 2010.
[6]
R. A. Fisher. On the interpretation of χ2 from contingency tables, and the calculation of p. Journal of the Royal Statistical Society, 85(1):pp. 87--94, 1922.
[7]
M. Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston, MA, USA, 1999.
[8]
S. G. Ganesh, T. Sharma, and G. Suryanarayana. Towards a principle-based classification of structural design smells. Journal of Object Technology, pages 1--29, 2013.
[9]
J. Garcia, I. Ivkovic, and N. Medvidovic. A comparative analysis of software architecture recovery techniques. In Automated Software Engineering (ASE), 2013 IEEE/ACM 28th International Conference on, pages 486--496, Nov 2013.
[10]
J. Garcia, D. Popescu, G. Edwards, and N. Medvidovic. Identifying architectural bad smells. In Software Maintenance and Reengineering, 2009. CSMR '09. 13th European Conference on, pages 255--258, March 2009.
[11]
T. Girba, S. Ducasse, A. Kuhn, R. Marinescu, and R. Daniel. Using concept analysis to detect co-change patterns. In Ninth International Workshop on Principles of Software Evolution: In Conjunction with the 6th ESEC/FSE Joint Meeting, IWPSE '07, pages 83--89, New York, NY, USA, 2007. ACM.
[12]
M. W. Godfrey and E. H. S. Lee. Secrets from the monster: Extracting Mozilla's software architecture. In Proc. of the Second Intl. Symposium on Constructing Software Engineering Tools (CoSET-00), June 2000.
[13]
E. Juergens, F. Deissenboeck, B. Hummel, and S. Wagner. Do code clones matter? In Software Engineering, 2009. ICSE 2009. IEEE 31st International Conference on, pages 485--495, May 2009.
[14]
C. J. Kapser and M. W. Godfrey. Cloning considered harmful" considered harmful: Patterns of cloning in software. Empirical Softw. Engg., 13(6):645--692, Dec. 2008.
[15]
R. Kazman, Y. Cai, R. Mo, Q. Feng, L. Xiao, S. Haziyev, V. Fedak, and A. Shapochka. A case study in locating the architectural roots of technical debt. In Proceedings of the 37th International Conference on Software Engineering - Volume 2, ICSE '15, pages 179--188, Piscataway, NJ, USA, 2015. IEEE Press.
[16]
F. Khomh, M. Di Penta, and Y. Guãihãineuc. An exploratory study of the impact of code smells on software change-proneness. In Reverse Engineering, 2009. WCRE '09. 16th Working Conference on, pages 75--84, Oct 2009.
[17]
F. Khomh, M. D. Penta, Y.-G. Guéhéneuc, and G. Antoniol. An exploratory study of the impact of antipatterns on class change- and fault-proneness. Empirical Software Engineering, 17(3):243--275, 2012.
[18]
M. Kim, V. Sazawal, D. Notkin, and G. Murphy. An empirical study of code clone genealogies. In Proceedings of the 10th European Software Engineering Conference Held Jointly with 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering, ESEC/FSE-13, pages 187--196, New York, NY, USA, 2005. ACM.
[19]
M. Lanza, R. Marinescu, and S. Ducasse. Object-Oriented Metrics in Practice. Springer-Verlag New York, Inc., Secaucus, NJ, USA, 2005.
[20]
W. Li and R. Shatnawi. An empirical study of the bad smells and class error probability in the post-release object-oriented system evolution. Journal of Systems and Software, 80(7):1120--1128, 2007.
[21]
A. Lozano and M. Wermelinger. Assessing the effect of clones on changeability. In Software Maintenance, 2008. ICSM 2008. IEEE International Conference on, pages 227--236, Sept 2008.
[22]
A. MacCormack, J. Rusnak, and C. Y. Baldwin. Exploring the structure of complex software designs: An empirical study of open source and proprietary code. Manage. Sci., 52(7):1015--1030, July 2006.
[23]
I. Macia, R. Arcoverde, E. Cirilo, A. Garcia, and A. von Staa. Supporting the identification of architecturally-relevant code anomalies. In Software Maintenance (ICSM), 2012 28th IEEE International Conference on, pages 662--665, Sept 2012.
[24]
I. Macia, R. Arcoverde, A. Garcia, C. Chavez, and A. von Staa. On the relevance of code anomalies for identifying architecture degradation symptoms. In Software Maintenance and Reengineering (CSMR), 2012 16th European Conference on, pages 277--286, March 2012.
[25]
I. Macia, J. Garcia, D. Popescu, A. Garcia, N. Medvidovic, and A. von Staa. Are automatically-detected code anomalies relevant to architectural modularity?: An exploratory analysis of evolving systems. In Proceedings of the 11th Annual International Conference on Aspect-oriented Software Development, AOSD '12, pages 167--178, New York, NY, USA, 2012. ACM.
[26]
R. C. Martin. Agile Software Development: Principles, Patterns, and Practices. Prentice Hall PTR, Upper Saddle River, NJ, USA, 2003.
[27]
C. A. Mattmann, D. J. Crichton, N. Medvidovic, and S. Hughes. A software architecture-based framework for highly distributed and data intensive scientific applications. In Proceedings of the 28th International Conference on Software Engineering, ICSE '06, pages 721--730, New York, NY, USA, 2006. ACM.
[28]
A. K. McCallum. Mallet: A machine learning for language toolkit. http://mallet.cs.umass.edu, 2002.
[29]
R. Mo, Y. Cai, R. Kazman, and L. Xiao. Hotspot patterns: The formal definition and automatic detection of architecture smells. In Software Architecture (WICSA), 2015 12th Working IEEE/IFIP Conference on, pages 51--60, May 2015.
[30]
N. Moha, Y. Guéhéneuc, L. Duchien, and A. Le Meur. Decor: A method for the specification and detection of code and design smells. Software Engineering, IEEE Transactions on, 36(1):20--36, Jan 2010.
[31]
W. Oizumi. Opus research group: Supplementary material, 2015. Availabel at http://www.les.inf.puc-rio.br/opus/anomaliesFlockTogether.
[32]
S. Olbrich, D. Cruzes, and D. I. Sjoberg. Are all code smells harmful? a study of god classes and brain classes in the evolution of three open source systems. In Software Maintenance (ICSM), 2010 IEEE International Conference on, pages 1--10, Sept 2010.
[33]
D. E. Perry and A. L. Wolf. Foundations for the study of software architecture. SIGSOFT Softw. Eng. Notes, 17(4):40--52, Oct. 1992.
[34]
S. Schach, B. Jin, D. Wright, G. Heller, and A. Offutt. Maintainability of the linux kernel. Software, IEE Proceedings -, 149(1):18--23, Feb 2002.
[35]
R. Schwanke, L. Xiao, and Y. Cai. Measuring architecture quality by structure plus history analysis. In Proceedings of the 2013 International Conference on Software Engineering, ICSE '13, pages 891--900, Piscataway, NJ, USA, 2013. IEEE Press.
[36]
D. Sjoberg, A. Yamashita, B. Anda, A. Mockus, and T. Dyba. Quantifying the effect of code smells on maintenance effort. Software Engineering, IEEE Transactions on, 39(8):1144--1156, Aug 2013.
[37]
S. Soares, E. Laureano, and P. Borba. Implementing distribution and persistence aspects with aspectj. In Proceedings of the 17th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA '02, pages 174--190, New York, NY, USA, 2002. ACM.
[38]
G. Suryanarayana, G. Samarthyam, and T. Sharma. Refactoring for Software Design Smells: Managing Technical Debt. Morgan Kaufmann, 2014.
[39]
M. Tufano, F. Palomba, G. Bavota, R. Oliveto, M. Di Penta, A. De Lucia, and D. Poshyvanyk. When and why your code starts to smell bad. In Proceedings of the 37th International Conference on Software Engineering, ICSE '15, New York, NY, USA, 2015. ACM.
[40]
J. van Gurp and J. Bosch. Design erosion: problems and causes. Journal of Systems and Software, 61(2):105--119, 2002.
[41]
S. Wong, Y. Cai, M. Kim, and M. Dalton. Detecting software modularity violations. In Proceedings of the 33rd International Conference on Software Engineering, ICSE '11, pages 411--420, New York, NY, USA, 2011. ACM.
[42]
L. Xiao, Y. Cai, and R. Kazman. Titan: A toolset that connects software architecture with quality analysis. In Proceedings of the 22Nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2014, pages 763--766, New York, NY, USA, 2014. ACM.
[43]
A. Yamashita and L. Moonen. Do code smells reflect important maintainability aspects? In Software Maintenance (ICSM), 2012 28th IEEE International Conference on, pages 306--315, Sept 2012.
[44]
A. Yamashita and L. Moonen. Exploring the impact of inter-smell relations on software maintainability: An empirical study. In Software Engineering (ICSE), 2013 35th International Conference on, pages 682--691, May 2013.
[45]
T. J. Young. Using aspectj to build a software product line for mobile devices. Master's thesis, University of British Columbia, 2015.

Cited By

View all
  • (2024)Study of Code Smells: A Review and Research AgendaInternational Journal of Mathematical, Engineering and Management Sciences10.33889/IJMEMS.2024.9.3.0259:3(472-498)Online publication date: 1-Jun-2024
  • (2024)Optimization of Resource Allocation for Detection of Software Architectural Defects2024 11th International Conference on Computing for Sustainable Global Development (INDIACom)10.23919/INDIACom61295.2024.10498952(889-892)Online publication date: 28-Feb-2024
  • (2024)Machine learning technique for generation of human readable rules to detect software code smells in open-source softwareLife Cycle Reliability and Safety Engineering10.1007/s41872-024-00261-x13:3(277-291)Online publication date: 20-Jul-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE '16: Proceedings of the 38th International Conference on Software Engineering
May 2016
1235 pages
ISBN:9781450339001
DOI:10.1145/2884781
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 May 2016

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article

Funding Sources

Conference

ICSE '16
Sponsor:

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)16
  • Downloads (Last 6 weeks)0
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Study of Code Smells: A Review and Research AgendaInternational Journal of Mathematical, Engineering and Management Sciences10.33889/IJMEMS.2024.9.3.0259:3(472-498)Online publication date: 1-Jun-2024
  • (2024)Optimization of Resource Allocation for Detection of Software Architectural Defects2024 11th International Conference on Computing for Sustainable Global Development (INDIACom)10.23919/INDIACom61295.2024.10498952(889-892)Online publication date: 28-Feb-2024
  • (2024)Machine learning technique for generation of human readable rules to detect software code smells in open-source softwareLife Cycle Reliability and Safety Engineering10.1007/s41872-024-00261-x13:3(277-291)Online publication date: 20-Jul-2024
  • (2024)An exploratory evaluation of code smell agglomerationsSoftware Quality Journal10.1007/s11219-024-09680-632:4(1375-1412)Online publication date: 11-Jul-2024
  • (2023)Is your code harmful too? Understanding harmful code through transfer learningProceedings of the XXII Brazilian Symposium on Software Quality10.1145/3629479.3629512(42-51)Online publication date: 7-Nov-2023
  • (2023)An Approach to Regression Testing Selection based on Code Changes and SmellsProceedings of the 8th Brazilian Symposium on Systematic and Automated Software Testing10.1145/3624032.3624036(25-34)Online publication date: 25-Sep-2023
  • (2023)Don’t Forget the Exception! : Considering Robustness Changes to Identify Design Problems2023 IEEE/ACM 20th International Conference on Mining Software Repositories (MSR)10.1109/MSR59073.2023.00064(417-429)Online publication date: May-2023
  • (2023)Beyond the Code: Investigating the Effects of Pull Request Conversations on Design Decay2023 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM)10.1109/ESEM56168.2023.10304805(1-12)Online publication date: 26-Oct-2023
  • (2023)Understanding code smells in Elixir functional languageEmpirical Software Engineering10.1007/s10664-023-10343-628:4Online publication date: 7-Jul-2023
  • (2022)Smell Patterns as Indicators of Design DegradationProceedings of the XXXVI Brazilian Symposium on Software Engineering10.1145/3555228.3555243(311-320)Online publication date: 5-Oct-2022
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media