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 2016Publication 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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  3. V. Bloomfield. Using R for Numerical Analysis in Science and Engineering. Chapman & Hall/CRC The R Series. Taylor & Francis, 2014.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  7. M. Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston, MA, USA, 1999.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Lanza, R. Marinescu, and S. Ducasse. Object-Oriented Metrics in Practice. Springer-Verlag New York, Inc., Secaucus, NJ, USA, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. R. C. Martin. Agile Software Development: Principles, Patterns, and Practices. Prentice Hall PTR, Upper Saddle River, NJ, USA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. A. K. McCallum. Mallet: A machine learning for language toolkit. http://mallet.cs.umass.edu, 2002.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. W. Oizumi. Opus research group: Supplementary material, 2015. Availabel at http://www.les.inf.puc-rio.br/opus/anomaliesFlockTogether.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. G. Suryanarayana, G. Samarthyam, and T. Sharma. Refactoring for Software Design Smells: Managing Technical Debt. Morgan Kaufmann, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. J. van Gurp and J. Bosch. Design erosion: problems and causes. Journal of Systems and Software, 61(2):105--119, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. T. J. Young. Using aspectj to build a software product line for mobile devices. Master's thesis, University of British Columbia, 2015.Google ScholarGoogle Scholar

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • 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

    Copyright © 2016 ACM

    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]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 14 May 2016

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • research-article

    Acceptance Rates

    Overall Acceptance Rate276of1,856submissions,15%

    Upcoming Conference

    ICSE 2025

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader