skip to main content
10.1145/2701319.2701321acmotherconferencesArticle/Chapter ViewAbstractPublication PagesvamosConference Proceedingsconference-collections
research-article

Code Smells Revisited: A Variability Perspective

Published:21 January 2015Publication History

ABSTRACT

Highly-configurable software systems (also called software product lines) gain momentum in both, academia and industry. For instance, the Linux kernel comes with over 12 000 configuration options and thus, can be customized to run on nearly every kind of system. To a large degree, this configurability is achieved through variable code structures, for instance, using conditional compilation. Such source code variability adds a new dimension of complexity, thus giving rise to new possibilities for design flaws. Code smells are an established concept to describe design flaws or decay in source code. However, existing smells have no notion of variability and thus do not support flaws regarding variable code structures. In this paper, we propose an initial catalog of four variability-aware code smells. We discuss the appearance and negative effects of these smells and present code examples from real-world systems. To evaluate our catalog, we have conducted a survey amongst 15 researchers from the field of software product lines. The results confirm that our proposed smells (a) have been observed in existing product lines and (b) are considered to be problematic for common software development activities, such as program comprehension, maintenance, and evolution.

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 CSMR. IEEE, 2011, pp. 181--190. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. Apel, D. Batory, C. Kästner, and G. Saake, Feature-Oriented Software Product Lines. Springer, 2013. Google ScholarGoogle ScholarCross RefCross Ref
  3. S. Apel, C. Kästner, and C. Lengauer, "Language-independent and automated software composition: The FeatureHouse experience," IEEE Trans. Softw. Eng., vol. 39, no. 1, pp. 63--79, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. Batory, "Feature models, grammars, and propositional formulas," in SPLC. Springer, 2005, pp. 7--20. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. Batory, J. N. Sarvela, and A. Rauschmayer, "Scaling step-wise refinement," IEEE Trans. Softw. Eng., vol. 30, no. 6, pp. 355--371, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. I. D. Baxter and M. Mehlich, "Preprocessor conditional removal by simple partial evaluation," in WCRE. IEEE, 2001, pp. 281--290. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. W. H. Brown, R. C. Malveau, and T. J. Mowbray, AntiPatterns: refactoring software, architectures, and projects in crisis. Wiley & Sons, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. K. Czarnecki and U. W. Eisenecker, Generative Programming. Addison Wesley, 2000.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. H. S. de Andrade, E. Almeida, and I. Crnkovic, "Architectural bad smells in software product lines: An exploratory study," in WICSA Companion Volume. ACM, 2014, pp. 12:1--12:6. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. D. Ernst, G. J. Badros, and D. Notkin, "An empirical analysis of C preprocessor use," IEEE Trans. Softw. Eng., vol. 28, no. 12, pp. 1146--1170, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. Feigenspan, C. Kastner, J. Liebig, S. Apel, and S. Hanenberg, "Measuring programming experience," in ICPC. IEEE, 2012, pp. 73--82.Google ScholarGoogle Scholar
  12. M. Fowler, K. Beck, J. Brant, and W. Opdyke, Refactoring: Improving the Design of Existing Code. Addison-Wesley, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. L. Griss, "Implementing product-line features by composing aspects," in SPLC. Kluwer Academic Publishers, 2000, pp. 271--288. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. E. Guimaraes, A. Garcia, E. Figueiredo, and Y. Cai, "Prioritizing software anomalies with software metrics and architecture blueprints," in MiSE. IEEE, 2013, pp. 82--88. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. E. Jürgens, F. Deissenboeck, B. Hummel, and S. Wagner, "Do code clones matter?" in ICSE. IEEE, 2009, pp. 485--495. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. K. C. Kang, S. G. Cohen, J. A. Hess, W. E. Novak, and A. S. Peterson, "Feature-oriented domain analysis (FODA) feasibility study," SEI, USA, Tech. Rep. CMU/SEI-90-TR-21, 1990.Google ScholarGoogle Scholar
  17. C. Kapser and M. W. Godfrey, ""Cloning considered harmful" considered harmful: Patterns of cloning in software," Empir. Softw. Eng., vol. 13, no. 6, pp. 645--692, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. C. Kästner and S. Apel, "Virtual separation of concerns -- a second chance for preprocessors," J. Object Technology, vol. 8, no. 6, pp. 59--78, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  19. C. Kästner, S. Apel, and M. Kuhlemann, "Granularity in software product lines," in ICSE. ACM, 2008, pp. 311--320. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. Kerievsky, Refactoring to Patterns. Pearson Higher Education, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. F. Khomh, M. Di Penta, and Y. Gueheneuc, "An exploratory study of the impact of code smells on software change-proneness," in WCRE. IEEE, 2009, pp. 75--84. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Lanza, R. Marinescu, and S. Ducasse, Object-Oriented Metrics in Practice. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Z. Li, S. Lu, S. Myagmar, and Y. Zhou, "CP-Miner: Finding copy-paste and related bugs in large-scale software code," IEEE Trans. Softw. Eng., vol. 32, no. 3, pp. 176--192, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. J. Liebig, S. Apel, C. Lengauer, C. Kästner, and M. Schulze, "An analysis of the variability in forty preprocessor-based software product lines," in ICSE. ACM, 2010, pp. 105--114. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. R. E. Lopez-Herrejon and D. Batory, "A standard problem for evaluating product-line methodologies," in GCSE. Springer, 2001, pp. 10--24. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 AOSD. ACM, 2012, pp. 167--178. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. I. Macia Bertran, A. Garcia, and A. von Staa, "An exploratory study of code smells in evolving aspect-oriented systems," in AOSD, 2011, pp. 203--214. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. R. C. Martin and M. Martin, Agile Principles, Patterns, and Practices in C#. Prentice Hall, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. N. Moha, "Detection and correction of design defects in object-oriented designs," in OOPSLA. ACM, 2007, pp. 949--950. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. N. Moha, Y.-G. Guéhéneuc, A.-F. Le Meur, and L. Duchien, "A domain analysis to specify design defects and generate detection algorithms," in FASE. Springer, 2008, pp. 276--291. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. P. Monteiro and J. a. M. Fernandes, "Towards a catalogue of refactorings and code smells for AspectJ," Trans. Aspect-Oriented Softw. Dev. I, vol. 3880, pp. 214--258, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. T. Patzke, M. Becker, M. Steffens, K. Sierszecki, J. E. Savolainen, and T. Fogdal, "Identifying improvement potential in evolving product line infrastructures: 3 case studies," in SPLC. ACM, 2012, pp. 239--248. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. C. Prehofer, "Feature-oriented programming: A fresh look at objects," in ECOOP. Springer, 1997, pp. 419--443.Google ScholarGoogle Scholar
  34. M. Rosenmüller, M. Kuhlemann, N. Siegmund, and H. Schirmeier, "Avoiding variability of method signatures in software product lines: A case study," in GPCE Workshop on Aspect-Oriented Product Line Engineering, 2007, pp. 20--25.Google ScholarGoogle Scholar
  35. C. K. Roy and J. R. Cordy, "A survey on software clone detection research," Queen's University at Kingston, Canada, Tech. Rep. 541, 2007.Google ScholarGoogle Scholar
  36. S. Schulze, S. Apel, and C. Kästner, "Code clones in feature-oriented software product lines," in GPCE. ACM, 2010, pp. 103--112. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. S. Schulze, E. Jürgens, and J. Feigenspan, "Analyzing the effect of preprocessor annotations on code clones," in SCAM. IEEE, 2011, pp. 115--124. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. S. Schulze, J. Liebig, J. Siegmund, and S. Apel, "Does the discipline of preprocessor annotations matter? A controlled experiment," in GPCE. ACM, 2013, pp. 65--74. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. S. Schulze, O. Richers, and I. Schaefer, "Refactoring delta-oriented software product lines," in AOSD. ACM, 2013, pp. 73--84. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. D. C. Sharp, "Reducing avionics software cost through component based product line development," in DASC, vol. 2. IEEE, 1998, pp. G32/1--G32/8.Google ScholarGoogle Scholar
  41. H. Spencer and G. Collyer, "#ifdef considered harmful, or portability experience with C News," in USENIX Tech. Conf. USENIX association, 1992.Google ScholarGoogle Scholar
  42. T. Thüm, C. Kästner, F. Benduhn, J. Meinicke, G. Saake, and T. Leich, "FeatureIDE: An extensible framework for feature-oriented software development," Sci. Comp. Prog., vol. 79, pp. 70--85, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. E. Van Emden and L. Moonen, "Java quality assurance by detecting code smells," in WCRE. IEEE, 2002, pp. 97--106. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. A. Yamashita, "How good are code smells for evaluating software maintainability? results from a comparative case study," in ICSM. IEEE, 2013, pp. 566--571. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Code Smells Revisited: A Variability Perspective

    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 Other conferences
      VaMoS '15: Proceedings of the 9th International Workshop on Variability Modelling of Software-Intensive Systems
      January 2015
      127 pages
      ISBN:9781450332736
      DOI:10.1145/2701319

      Copyright © 2015 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: 21 January 2015

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed limited

      Acceptance Rates

      VaMoS '15 Paper Acceptance Rate16of34submissions,47%Overall Acceptance Rate66of147submissions,45%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader