Skip to main content
Log in

Multi-language design smells: a backstage perspective

  • Published:
Empirical Software Engineering Aims and scope Submit manuscript

Abstract

Multi-language systems became prevalent with technological advances. Developers opt for the combination of programming languages to build a single application. Such combinations of programming languages allow the reuse of existing code and libraries without re-implementing the code from scratch. Software quality is achieved by following good software development practices and avoiding the bad ones. However, most of the practices in the literature apply to mono-language systems only and do not consider the interaction between programming languages. We previously defined a catalog of bad practices i.e., design smells related to multi-language systems. This paper aims to provide empirical evidence on the relevance of multi-language design smells and their perceived impacts on software quality. We analysed eight open source projects to detect occurrences of 15 types of multi-language design smells. We also extracted information about the developers that contributed to those systems. We performed an open and a closed survey targeting developers in general but also developers who contributed to those systems. We surveyed developers about the perceived prevalence of multi-language design smells their severity, and their impact on software quality attributes. We report that most of the studied design smells are perceived as design or implementation problems. Our results suggest that the studied design smells could be introduced mainly during refactoring and maintenance activities, and during regular development tasks. Our results also point that multi-language design smells are perceived as harmful and have negative impacts on software quality. The perceived prevalence of design smells and their impact varies from one specific smell type to the others. We believe that our findings are important for developers and researchers interested in improving the quality of multi-language systems as it can help them prioritize design smells during maintenance activities.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Listing 1
Listing 2
Listing 3
Listing 4
Fig. 2
Fig. 3
Listing 5
Listing 6
Listing 7
Listing 8
Listing 9
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

Notes

  1. https://www.ibm.com/developerworks/library/j-jni/index.html

  2. https://github.com/objectcomputing/OpenDDS/blob/945a0df6f4a2e52be9eb766d7b717d146d1649f1/java/idl2jni/runtime/i2jrt_TAOObject.cpp

  3. https://android.googlesource.com/platform/frameworks/base/+/ba34751/core/jni/android_opengl_GLES10Ext.cpp

  4. https://github.com/oracle/graal/issues/1388

  5. https://github.com/sosy-lab/java-smt/issues/87

  6. https://github.com/zeromq/zmq-jni/commit/6b0d25dd45de42680c965ec8c27f7596661bb6fa

  7. https://github.com/google/conscrypt/blob/23c2ce258afd5a43258b685df4279eaa2ee0e15c/common/src/main/java/org/conscrypt/NativeCrypto.java

  8. https://www.developer.com/java/data/jni-data-type-mapping-to-cc.html

  9. https://github.com/java-native-access/jna/commit/a77f47fb297dd33a8cec4c88ae4777186882f472

  10. https://github.com/google/conscrypt/blob/master/common/src/jni/main/cpp/conscrypt/native_crypto.cc

  11. https://www.linkedin.com/

  12. https://share.polymtl.ca/alfresco/service/api/node/content/workspace/SpacesStore/b7fbaa9e-8055-41cc-b016-dac345f6cb97?a=false&guest=true

  13. https://www.checkmarket.com/

  14. https://s-ca.chkmkt.com/?e=189517&h=B445656A9769E90&l=en

  15. https://spectrum.ieee.org/at-work/innovation/the-2018-top-programming-languages

  16. https://osf.io/6yqv5/?view_only=4cca6dc961b44303833917c236e2d667

  17. https://github.com/ResearchML/Replication_EMSE

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 multi-language 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, Openja M, Khomh F (2020) Multi-language design smells: a backstage perspective. In: Proceedings of the 17th international conference on mining software repositories, pp 615–618

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

    Article  Google Scholar 

  • Arcoverde R, Garcia A, Figueiredo E (2011) Understanding the longevity of code smells: preliminary results of an explanatory survey. In: Proceedings of the 4th workshop on refactoring tools, pp 33–36

  • Baltes S, Diehl S (2016) Worse than spam: Issues in sampling software developers. In: Proceedings of the 10th ACM/IEEE international symposium on empirical software engineering and measurement, pp 1–6

  • Binkley D (2007) Source code analysis: a road map. In: Future of software engineering, 2007. FOSE ’07

  • 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

  • Burow BD (1996) Mixed language programming. In: Computing in high energy physics’ 95: CHEP’95. World Scientific, pp 610–614

  • Emerson P (2013) The original borda count and partial voting. Soc Choice Welf 40(2):353–358

    Article  MathSciNet  Google Scholar 

  • Fink A (2003) The survey handbook, vol 1 Sage

  • Flores E, Barrón-Cedeño A, Rosso P, Moreno L (2011) Towards the detection of cross-language source code reuse. In: Proceedings of the 16th international conference on natural language processing and information systems. Springer

  • Fontana FA, Braione P, Zanoni M (2012) Automatic detection of bad smells in code: an experimental assessment. Journal of Object Technology 11(2):5–1

    Google Scholar 

  • Goedicke M, Neumann G, Zdun U (2000) Object system layer. 5th European Conference on Pattern Languages of Programms (euroPLop ’2000)

  • Goedicke M, Zdun U (2002) Piecemeal legacy migrating with an architectural pattern language: a case study. Journal of Software Maintenance and Evolution: Research and Practice 14(1):1–30

    Article  Google Scholar 

  • Gravetter F (2012) Forzano lab research methods for the behavioral sciences

  • Harman M (2010) Why source code analysis and manipulation will always be important. In: 2010 10Th IEEE working conference on source code analysis and manipulation, pp 7–19

  • Hunt J (1999) Java for Practitioners: An Introduction and Reference to Java and Object Orientation, 1st edn. Springer New York, Inc., Secaucus, NJ USA

  • 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, Guéhéneuc YG (2008) Do design patterns impact software quality positively?. In: Software maintenance and reengineering, 2008. CSMR 2008. 12th european conference on. IEEE, pp 274–278

  • 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

  • Kienle HM, Kraft J, Müller HA (2012) Software reverse engineering in the domain of complex embedded systems. In: Reverse engineering-recent advances and applications. intech

  • 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, 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

  • Kullbach B, Winter A, Dahm P, Ebert J (1998) Program comprehension in multi-language 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 mixed-environment debugging. SIGPLAN Not 44(10):207–226

    Article  Google Scholar 

  • 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, USA, pp 442–452

  • Li S, Tan G (2011) Jet: Exception checking in the java native interface. In: Proceedings of the 2011 ACM international conference on object oriented programming systems languages and applications, OOPSLA ’11. ACM, pp 345–358

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

    Google Scholar 

  • 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 multi-language program dependencies. In: Program comprehension, 2003. 11th IEEE international workshop on. IEEE, pp 64–72

  • Lippert M, Roock S (2006) Refactoring in large software projects: performing complex restructurings successfully. Wiley, Hoboken

    Google Scholar 

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

    Google Scholar 

  • Mayer P, Kirsch M, Le MA (2017) On multi-language software development, cross-language links and accompanying tools: a survey of professional software developers. Journal of Software Engineering Research and Development, 5

  • Mayer P, Schroeder A (2012) Cross-language code analysis and refactoring. In: Source code analysis and manipulation (SCAM), 2012 IEEE 12th international working conference on. IEEE, pp 94–103

  • Mouna A, Foutse K, Guéhéneuc YG (2019) Anti-patterns for multi-language systems. In: 24Th european conference on pattern languages of programs (euroPLop ’19), july 3–7. Irsee, ACM, p 2019

  • Mouna A, Manel G, Foutse K (2019) Behind the scenes: Developers’ perception of multi-language practices. In: 29Th annual international conference on computer science and software engineering (CASCON’2019). ACM

  • Mouna A, Manel G, Foutse K, Yann-Gaël G (2019) Code smells for multi-language systems. In: 24Th european conference on pattern languages of programs (euroPLop ’19), july 3–7. Irsee, ACM, p 2019

  • 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

  • Palomba F, Bavota G, Di Penta M, Oliveto R, De Lucia A (2014) 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

  • 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, Berlin, pp 178–193

  • 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

  • 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

  • Sheskin DJ (2020) Handbook of parametric and nonparametric statistical procedures. CRC Press, Boca Raton

    Book  Google Scholar 

  • 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

  • Synytskyy N, Cordy JR, Dean TR (2003) Robust multilingual parsing using island grammars. In: Proceedings of the 2003 conference of the centre for advanced studies on collaborative research, CASCON ’03. IBM Press, pp 266–278

  • Tan G, Chakradhar S, Srivaths R, Wang RD (2006) Safe java native interface. 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, pp 365–377

  • 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, pp 17:1–17:4

  • Tufano M, Palomba F, Bavota G, Oliveto R, Di Penta M, De Lucia A, Poshyvanyk D (2015) When and why your code starts to smell bad. In: 2015 IEEE/ACM 37Th IEEE international conference on software engineering, vol 1. IEEE, pp 403–414

  • Xu B, An L, Thung F, Khomh F, Lo D (2020) Why reinventing the wheels? an empirical study on library reuse and re-implementation. Empir Softw Eng 25(1):755–789

    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 volume 34). Sage Publications Inc, Thousand Oaks

    Google Scholar 

  • Zhang C, Budgen D (2012) What do we know about the effectiveness of software design patterns? IEEE Trans Softw Eng 38(5):1213–1231

    Article  Google Scholar 

Download references

Acknowledgements

Our sincere gratitude goes to the anonymous respondents who answered the open and closed surveys. We also thank the anonymous reviewers for their comments and suggestions that significantly improved this paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mouna Abidi.

Additional information

Communicated by: Neil Ernst

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: Registered Reports

Appendix

Appendix

We provide in this section the details about the detection results and the smell occurrences detected in our subject systems presented in Table 1. We also highlight the total number of responses sent and received from running the survey.

Table 11 provides the smells occurrences detected when running MLSInspect (Abidi et al. 2021) on the 270 snapshots of our subject systems described in Section 3. The columns reported in Table 11 reflects the subject systems analysed. The first row (#Snap) reports the number of snapshots in each system, while the rest of the rows describe the occurrences of smells detected in each system.

Table 11 Overview of the Detected Smell Occurrences in the Studied Systems

Table 12 summarizes the total number of surveys that we sent, the number of answers received, and the number of answers we kept for the analysis of this paper. Note that we did not keep answers that contain information related only to the background section as those participants did not fill any of the sections related to the purpose of this study. Another important point is that in this study, we initially aimed to capture results for nine systems as stated in our initial protocol (Abidi et al. 2020). However, the results we received are only for eight systems as shown in Table 12.

Table 12 Survey Responses Overview

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Abidi, M., Rahman, M.S., Openja, M. et al. Multi-language design smells: a backstage perspective. Empir Software Eng 27, 116 (2022). https://doi.org/10.1007/s10664-022-10161-2

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10664-022-10161-2

Keywords

Navigation