Design smells in multi-language systems and bug-proneness: a survival analysis | Empirical Software Engineering
Skip to main content

Advertisement

Design smells in multi-language systems and bug-proneness: a survival analysis

  • Published:
Empirical Software Engineering Aims and scope Submit manuscript

Abstract

Modern applications are often developed using a combination of programming languages and technologies. Multi-language systems offer opportunities for code reuse and the possibility to leverage the strengths of multiple programming languages. However, multi-language development may also impede code comprehension and increase maintenance overhead. As a result of this, developers may introduce design smells by making poor design and implementation choices. Studies on mono-language systems suggest that design smells may increase the risk of bugs and negatively impact software quality. However, the impacts of multi-language smells on software quality are still under-investigated. In this paper, we aim to examine the impacts of multi-language smells on software quality, bug-proneness in particular. We performed survival analysis comparing the time until a bug occurrence in files with and without multi-language design smells. To have qualitative insights into the impacts of multi-language design smells on software bug-proneness, we performed topic modeling and manual investigations, to capture the categories and characteristics of bugs that frequently occur in files with multi-language smells. Our investigation shows that (1) files with multi-language smells experience bugs faster than files without those smells, and non-smelly files have hazard rates 87.5% lower than files with smells, (2) files with some specific types of smells experience bugs faster than the other smells, and (3) bugs related to “programming errors”, “external libraries and features support issues”, and “memory issues” are the most dominant types of bugs that occur in files with multi-language smells. Through this study, we aim to raise the awareness of developers about the impacts of multi-language design smells, and help them prioritize maintenance activities.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
¥17,985 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price includes VAT (Japan)

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

Data Availability

The datasets generated and analysed during the current study are available in the Survival_Analysis repository, https://github.com/ResearchMLS/Survival_Analysis

Notes

  1. https://bugzilla.redhat.com/show_bug.cgi?id=1536762

  2. https://hal.archives-ouvertes.fr/hal-01277940/document

  3. https://github.com/java-native-access/jna

  4. https://github.com/facebook/rocksdb/

  5. https://github.com/bytedeco/javacpp

  6. https://github.com/realm/realm-java

  7. https://github.com/tada/pljava

  8. https://github.com/frostwire/frostwire

  9. https://github.com/google/conscrypt

  10. https://github.com/objectcomputing/OpenDDS

  11. https://www.srcml.org/

  12. https://github.com/ResearchMLS/Survival_Analysis

  13. https://www.ibm.com/developerworks/library/j-transparentaccel/index.html

  14. https://medium.com/swlh/introduction-to-java-native-interface-establishing-a-bridge-between-java-and-c-c-1cc16d95426a

  15. https://github.com/facebook/rocksdb/commit/c6d464a9da7291e776b5a017f0a5d33d61f2518b

  16. https://codingforsmarties.wordpress.com/2017/04/02/breaking-changes/

  17. https://www.databasedevelop.com/article/12233882/How+to+resolve+dll+dependency+with+external+library

  18. https://www.tutorialfor.com/blog-219186.htm

References

  • Abbes M, Khomh F, Gueheneuc YG, Antoniol G (2011) 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. IEEE, pp 181–190

  • Abidi M, Grichi M, Khomh F (2019a) Behind the scenes: developers’ perception of multilanguage practices. In: Proceedings of the 29th annual international conference on computer science and software engineering. IBM Corp., pp 72–81

  • Abidi M, Grichi M, Khomh F, Guéhéneuc YG (2019b) Code smells for multi-language systems. In: Proceedings of the 24th European conference on pattern languages of programs. ACM, p 12

  • Abidi M, Khomh F, Guéhéneuc YG (2019c) Anti-patterns for multi-language systems. In: Proceedings of the 24th European conference on pattern languages of programs. ACM, p 42

  • Abidi M, Rahman MS, Openja M, Khomh F (2020) Are multi-language design smells fault-prone? an empirical study. ACM Trans Softw Eng Methodol (TOSEM) 30

  • Abidi M, Rahman MS, Openja M, Khomh F (2020) Are multi-language design smells fault-prone? an empirical study. ACM Trans Softw Eng Methodol (TOSEM)(to appear). arXiv:2010.14331

  • Alexander C, Ishikawa S, Silverstein M, i Ramió JR, Jacobson M, Fiksdahl-King I (1977) A pattern language. Gustavo Gili

  • Antoniol G, Ayari K, Di Penta M, Khomh F, Guéhéneuc YG (2008) Is it a bug or an enhancement? a text-based approach to classify change requests. In: Proceedings of the 2008 conference of the center for advanced studies on collaborative research: meeting of minds, pp 304–318

  • Asuncion HU, Asuncion AU, Taylor RN (2010) Software traceability with topic modeling. In: 2010 ACM/IEEE 32nd International conference on software engineering, vol 1. IEEE, pp 95–104

  • Blei DM, Ng AY, Jordan MI (2003) Latent dirichlet allocation. J Mach Learn Res 3(Jan):993–1022

    Google Scholar 

  • Borrelli A, Nardone V, Di Lucca GA, Canfora G, Di Penta M (2020) Detecting video game-specific bad smells in unity projects. In: Proceedings of the 17th international conference on mining software repositories, pp 198–208

  • Brown WH, Malveau RC, McCormick HW, Mowbray TJ (1998) AntiPatterns: refactoring software, architectures, and projects in crisis. John Wiley & Sons Inc

    Google Scholar 

  • Castelluccio M, An L, Khomh F (2019) An empirical study of patch uplift in rapid release development pipelines. Empir Softw Eng 24(5):3008–3044. https://doi.org/10.1007/s10664-018-9665-y

    Article  Google Scholar 

  • Cleves M, Gould W, Gould WW, Gutierrez R, Marchenko Y (2008) An introduction to survival analysis using Stata. Stata press

  • Di Nucci D, Palomba F, Tamburri DA, Serebrenik A, De Lucia A (2018) Detecting code smells using machine learning techniques: are we there yet? In: 2018 ieee 25th international conference on software analysis, evolution and reengineering (saner). IEEE, pp 612–621

  • Fisher LD, Lin DY (1999) Time-dependent covariates in the cox proportional-hazards regression model. Annu Rev Public Health 20(1):145–157

    Article  Google Scholar 

  • Fowler M, Beck K (1999) Refactoring: improving the design of existing code. Addison-Wesley Professional

    Google Scholar 

  • Gamma E, Helm R, Johnson R, Vlissides J (1995) Design patterns: elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc, Boston, MA, USA

    Google Scholar 

  • Geman S, Geman D (1984) Stochastic relaxation, gibbs distributions, and the bayesian restoration of images. IEEE Trans Pattern Anal Mach Intell PAMI–6(6):721–741

    Article  Google Scholar 

  • Goedicke M, Neumann G, Zdun U (2000) Object system layer. 5th European conference on pattern languages of programms (EuroPLoP ’2000)

  • Goedicke M, Neumann G, Zdun U (2001) Message redirector. 6th European conference on pattern languages of programms (EuroPLoP ’2001)

  • Goedicke M, Zdun U (2002) Piecemeal legacy migrating with an architectural pattern language: a case study. J Softw Maint Evol: Research and Practice 14(1):1–30

    Article  Google Scholar 

  • Gurcan F, Cagiltay NE (2019) Big data software engineering: analysis of knowledge domains and skill sets using lda-based topic modeling. IEEE Access 7:82541–82552

    Article  Google Scholar 

  • Habchi S, Rouvoy R, Moha N (2019) On the survival of android code smells in the wild. In: 2019 IEEE/ACM 6th international conference on mobile software engineering and systems (MOBILESoft). IEEE, pp 87–98

  • Habibi M, Popescu-Belis A (2015) Keyword extraction and clustering for document recommendation in conversations. IEEE/ACM Trans Audio Speech Lang Process 23(4):746–759

    Article  Google Scholar 

  • Hunt J (1999) Java for practitioners: an introduction and reference to Java and object orientation, 1st edn. Springer-Verlag, New York Inc, Secaucus, NJ, USA

    Book  Google Scholar 

  • Jelodar H, Wang Y, Yuan C, Feng X, Jiang X, Li Y, Zhao L (2019) Latent dirichlet allocation (lda) and topic modeling: models, applications, a survey. Multimed Tools Appl 78(11):15169–15211

    Article  Google Scholar 

  • Johannes D, Khomh F, Antoniol G (2019) A large-scale empirical study of code smells in javascript projects. Softw Qual J 27(3):1271–1314

    Article  Google Scholar 

  • Jones TC (1998) Estimating software costs. McGraw-Hill, Inc

  • Khomh F, Di Penta M, Gueheneuc YG (2009) An exploratory study of the impact of code smells on software change-proneness. In: Reverse engineering, 2009. WCRE’09. 16th working conference on. IEEE, pp 75–84

  • Khomh F, Di Penta M, Guéhéneuc YG, Antoniol G (2012) An exploratory study of the impact of antipatterns on class change-and fault-proneness. Empir Softw Eng 17(3):243–275

    Article  Google Scholar 

  • Khomh F, Vaucher S, Guéhéneuc YG, Sahraoui H (2009) A bayesian approach for the detection of code and design smells. In: Quality software, 2009. QSIC’09. 9th international conference on. IEEE, pp 305–314

  • Kochhar PS, Wijedasa D, Lo D (2016) A large scale study of multiple programming languages and code quality. In: 2016 IEEE 23rd International conference on software analysis, evolution, and reengineering (SANER), vol 1. IEEE, pp 563–573

  • Kondoh G, Onodera T (2008) Finding bugs in java native interface programs. In: Proceedings of the 2008 international symposium on software testing and analysis, ISSTA ’08. ACM, New York, NY, USA, pp 109–118

  • Kontogiannis K, Linos P, Wong K (2006) Comprehension and maintenance of large-scale multi-language software applications. In: Software maintenance, 2006. ICSM’06. 22nd IEEE international conference on. IEEE, pp 497–500

  • Koru AG, El Emam K, Zhang D, Liu H, Mathew D (2008) Theory of relative defect proneness. Empir Softw Eng 13(5):473

    Article  Google Scholar 

  • Kullbach B, Winter A, Dahm P, Ebert J (1998) Program comprehension in multilanguage systems. In: Reverse engineering, 1998. Proceedings. Fifth working conference on. IEEE, pp 135–143

  • Lee B, Hirzel M, Grimm R, McKinley KS (2009) Debug all your code: portable mixedenvironment debugging. SIGPLAN Not 44(10):207–226

    Article  Google Scholar 

  • Lenarduzzi V, Saarimäki N, Taibi D (2019) The technical debt dataset. In: Proceedings of the fifteenth international conference on predictive models and data analytics in software engineering, pp 2–11

  • Li S, Tan G (2009) Finding bugs in exceptional situations of jni programs. In: Proceedings of the 16th ACM conference on computer and communications security, CCS ’09. ACM, New York, NY, USA, pp 442–452

  • Liang S (1999) Java native interface: programmer’s guide and reference, 1st edn. Addison-Wesley Longman Publishing Co., Inc, Boston, MA, USA

    Google Scholar 

  • Lima R, Souza J, Fonseca B, Teixeira L, Gheyi R, Ribeiro M, Garcia A, de Mello R (2020) Understanding and detecting harmful code. In: Proceedings of the 34th Brazilian symposium on software engineering, pp 223–232

  • Lin D (1989) Goodness-of-fit tests and robust statistical inference for the Cox proportional hazards model. University of Michigan

  • Linares-Vásquez M, Klock S, McMillan C, Sabané A, Poshyvanyk D, Guéhéneuc YG (2014) Domain matters: bringing further evidence of the relationships among antipatterns, application domains, and quality-related metrics in java mobile apps. In: Proceedings of the 22nd international conference on program comprehension. ACM, pp 232–243

  • Linos PK (1995) Polycare: a tool for re-engineering multi-language program integrations. In: Proceedings of First IEEE international conference on engineering of complex computer systems. ICECCS’95. IEEE, pp 338–341

  • Linos PK, Chen Zh, Berrier S, O’Rourke B (2003) A tool for understanding multilanguage program dependencies. In: Program comprehension, 2003. 11th IEEE International workshop on. IEEE, pp 64–72

  • Long F, Mohindra D, Seacord RC, Sutherland DF, Svoboda D (2013) Java coding guidelines: 75 recommendations for reliable and secure programs. Addison-Wesley

    Google Scholar 

  • McCallum A (2019) A machine learning for language toolkit; 2002. http://mallet.cs.umass.edu/. Accessed 05 Apr 2015. [WebCite Cache ID 6XZgiQKil]

  • Mockus A, Votta LG (2000) Identifying reasons for software changes using historic databases. In: icsm, pp 120–130

  • Morales R, McIntosh S, Khomh F (2015) Do code review practices impact design quality? a case study of the qt, vtk, and itk projects. In: 2015 IEEE 22nd international conference on software analysis, evolution, and reengineering (SANER), pp 171–180. https://doi.org/10.1109/SANER.2015.7081827

  • Muse BA, Rahman MM, Nagy C, Cleve A, Khomh F, Antoniol G (2020) On the prevalence, impact, and evolution of sql code smells in data-intensive systems. In: Proceedings of the 17th international conference on mining software repositories, pp 327–338

  • Mushtaq Z, Rasool G (2015) Multilingual source code analysis: state of the art and challenges. In: Open source systems & technologies (ICOSST), 2015 International conference on. IEEE, pp 170–175

  • Mushtaq Z, Rasool G (2015) Multilingual source code analysis: state of the art and challenges. In: 2015 International conference on open source systems technologies (ICOSST), pp 170–175

  • Neitsch A, Wong K, Godfrey MW (2012) Build system issues in multilanguage software. In: Software maintenance (ICSM), 2012 28th IEEE international conference on. IEEE, pp 140–149

  • Olbrich S, Cruzes DS, Basili V, Zazworka N (2009) The evolution and impact of code smells: A case study of two open source systems. In: Proceedings of the 2009 3rd international symposium on empirical software engineering and measurement. IEEE Computer Society, pp 390–400

  • Palomba F, Bavota G, Di Penta M, Oliveto R, De Lucia A (2014a) Do they really smell bad? a study on developers’ perception of bad code smells. In: 2014 IEEE international conference on software maintenance and evolution. IEEE, pp 101–110

  • Palomba F, Bavota G, Di Penta M, Oliveto R, Poshyvanyk D, De Lucia A (2014b) Mining version histories for detecting code smells. IEEE Trans Softw Eng 41(5):462–489

    Article  Google Scholar 

  • Palomba F, Panichella A, Zaidman A, Oliveto R, De Lucia A (2017) The scent of a smell: an extensive comparison between textual and structural smells. IEEE Trans Softw Eng 44(10):977–1000

    Article  Google Scholar 

  • Pfeiffer RH, Wa̧sowski A (2012) Texmo: a multi-language development environment. In: Proceedings of the 8th European conference on modelling foundations and applications, ECMFA’12. Springer-Verlag, Berlin, Heidelberg, pp 178–193

  • Politowski C, Khomh F, Romano S, Scanniello G, Petrillo F, Guéhéneuc YG, Maiga A (2020) A large scale empirical study of the impact of spaghetti code and blob anti-patterns on program comprehension. Inf Softw Technol 122. https://doi.org/10.1016/j.infsof.2020.106278. https://www.sciencedirect.com/science/article/pii/S0950584920300288

  • Porter MF (2001) Snowball: a language for stemming algorithms

  • Radu A, Nadi S (2019) A dataset of non-functional bugs. In: 2019 IEEE/ACM 16th International conference on mining software repositories (MSR). IEEE, pp 399–403

  • Ray B, Posnett D, Filkov V, Devanbu P (2014) A large scale study of programming languages and code quality in github. In: Proceedings of the 22nd ACM SIGSOFT International symposium on foundations of software engineering. ACM, pp 155–165

  • Romano D, Raila P, Pinzger M, Khomh F (2012) Analyzing the impact of antipatterns on change-proneness using fine-grained source code changes. In: Reverse engineering (WCRE), 2012 19th Working conference on. IEEE, pp 437–446

  • Rosen C, Shihab E (2016) What are mobile developers asking about? a large scale study using stack overflow. Empir Softw Eng 21(3):1192–1223

    Article  Google Scholar 

  • Saboury A, Musavi P, Khomh F, Antoniol G (2017) An empirical study of code smells in javascript projects. In: 2017 IEEE 24th international conference on software analysis, evolution and reengineering (SANER). IEEE, pp 294–305

  • Samoladas I, Angelis L, Stamelos I (2010) Survival analysis on the duration of open source projects. Inf Softw Technol 52(9):902–922

    Article  Google Scholar 

  • Selim GM, Barbour L, Shang W, Adams B, Hassan AE, Zou Y (2010) Studying the impact of clones on software defects. In: 2010 17th Working conference on reverse engineering. IEEE, pp 13–21

  • Soh Z, Yamashita A, Khomh F, Guéhéneuc YG (2016) Do code smells impact the effort of different maintenance programming activities? In: 2016 IEEE 23rd International conference on software analysis, evolution, and reengineering (SANER), vol 1. IEEE, pp 393–402

  • Spadini D, Aniche M, Bacchelli A (2018) Pydriller: python framework for mining software repositories. In: Proceedings of the 2018 26th ACM joint meeting on European software engineering conference and symposium on the foundations of software engineering. ACM, pp 908–911

  • Tan CM, Wang YF, Lee CD (2002) The use of bigrams to enhance text categorization. Inf Process Manage 38(4):529–546

    Article  Google Scholar 

  • Tan G, Chakradhar S, Srivaths R, Wang RD (2006) Safe java native interface. In: In Proceedings of the 2006 IEEE international symposium on secure software engineering, pp 97–106

  • Tan G, Croft J (2008) An empirical security study of the native code in the jdk. In: Proceedings of the 17th conference on security symposium, SS’08. USENIX Association, Berkeley, CA, USA, pp 365–377

  • Thomas SW (2011) Mining software repositories using topic models. In: Proceedings of the 33rd international conference on software engineering, pp 1138–1139

  • Thongtanunam P, Hassan AE (2020) Review dynamics and their impact on software quality. IEEE Trans Softw Eng

  • Till Q (2019) How to ship product with a quarterly product roadmap and sprintbased execution. In: website. https://www.getshipit.com/blog/how-to-ship-product-with-a-quarterly-product-roadmap/

  • Tomassetti F, Torchiano M (2014) An empirical assessment of polyglot-ism in github. In: Proceedings of the 18th international conference on evaluation and assessment in software engineering, EASE ’14. ACM, New York, NY, USA, pp 17:1–17:4

  • Treude C, Wagner M (2019) Predicting good configurations for github and stack overflowtopic models. In: 2019 IEEE/ACM 16th International conference on mining software repositories (MSR), pp 84–95

  • Tufano M, Palomba F, Bavota G, Oliveto R, Di Penta M, De Lucia A, Poshyvanyk D (2017) When and why your code starts to smell bad (and whether the smells go away). IEEE Trans Softw Eng 43(11):1063–1088

    Article  Google Scholar 

  • Yamashita A, Moonen L (2012) Do code smells reflect important maintainability aspects? In: Software maintenance (ICSM), 2012 28th IEEE International conference on. IEEE, pp 306–315

  • Yamashita A, Moonen L (2013) Do developers care about code smells? an exploratory survey. In: 2013 20th Working conference on reverse engineering (WCRE). IEEE, pp 242–251

  • Yin RK (2002) Applications of case study research 2nd edn. Applied Social Research Methods Series, vol 34. Sage Publications, Inc

Download references

Acknowledgements

This work has been partially supported by the Natural Sciences and Engineering Research Council of Canada and the Fonds de Recherche du Québec.

Funding

The authors have no relevant financial or non-financial interests to disclose.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mouna Abidi.

Ethics declarations

Conflicts of interest

Not Applicable.

Competing interests

The authors have no competing interests to declare that are relevant to the content of this article.

Additional information

Communicated by: Bibi Stamatia, Bowen Xu, Xiaofei Xie and Maxime Cordy

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This article belongs to the Topical Collection: Special Issue on Machine Learning Techniques for Software Quality Evaluation (MaLTeSQuE).

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Abidi, M., Rahman, M., Openja, M. et al. Design smells in multi-language systems and bug-proneness: a survival analysis. Empir Software Eng 29, 106 (2024). https://doi.org/10.1007/s10664-024-10476-2

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10664-024-10476-2

Keywords