Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3424771.3424792acmotherconferencesArticle/Chapter ViewAbstractPublication PageseuroplopConference Proceedingsconference-collections
research-article

Towards the Definition of Patterns and Code Smells for Multi-language Systems

Published: 17 December 2020 Publication History

Abstract

Developers often combine multiple programming languages to build large-scale applications. They choose programming languages properly for their tasks at hand instead of solving all of their problems with a single language. Foreign Functions Interface allow code written in one programming language to access features available in another programming language. Multi-language systems benefits from several advantages. However, they also introduce challenges related to the development, comprehension, and maintenance of such systems. Software quality is achieved partly by following good practices---architectural styles, design patterns, idioms---and avoiding bad practices---design anti-patterns and code smells. Yet, a review of the literature shows that there are a few works that study developers' practices among multi-language systems. The heterogeneity of components introduces code smells at the source code level. While design patterns are defined as good solutions to a recurrent problem, code smells are defined as poor design and coding choices that can negatively impact the quality of a software program despite satisfying functional requirements. In this paper, we report four patterns and five code smells related to multi-language systems. Those patterns and code smells were extracted from open-source systems, developers' documentation, and bug reports. We encoded these practices in the form of patterns and code smells in the context of Java Native Interface systems.

References

[1]
P. S. Kochhar, D. Wijedasa, and D. Lo, "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, 2016, pp. 563--573.
[2]
Z. Mushtaq and G. Rasool, "Multilingual source code analysis: State of the art and challenges," in Open Source Systems & Technologies (ICOSST), 2015 International Conference on. IEEE, 2015, pp. 170--175.
[3]
M. Abidi, M. Openja, and F. Khomh, "Multi-language design smells: A backstage perspective," in Proceedings of the 17th International Conference on Mining Software Repositories, 2020, pp. 615--618.
[4]
M. Furr and J. S. Foster, "Checking type safety of foreign function calls," in Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, ser. PLDI '05. ACM, 2005, pp. 62--72.
[5]
G. Tan and J. Croft, "An empirical security study of the native code in the jdk," in Proceedings of the 17th Conference on Security Symposium, ser. SS'08. Berkeley, CA, USA: USENIX Association, 2008, pp. 365--377.
[6]
S. Sotiriadis, O. Omosebi, A. Ayapbergenova, and N. P. Saparkhojayev, "Evaluating the java native interface (jni): Data types and strings," International Journal of Distributed Systems and Technologies (IJDST), vol. 9, no. 2, pp. 27--38, 2018.
[7]
"Evaluating the java native interface (jni): Leveraging existing native code, libraries and threads to a running java virtual machine," International Journal of Distributed Systems and Technologies (IJDST), vol. 9, no. 2, pp. 39--61, 2018.
[8]
B. Lee, M. Hirzel, R. Grimm, and K. S. McKinley, "Debugging mixed-environment programs with blink," Softw. Pract. Exper., vol. 45, no. 9, pp. 1277--1306, 2015.
[9]
S. Li and G. Tan, "Finding bugs in exceptional situations of jni programs," in Proceedings of the 16th ACM Conference on Computer and Communications Security, ser. CCS '09. New York, NY, USA: ACM, 2009, pp. 442--452.
[10]
K. Kontogiannis, P. Linos, and K. Wong, "Comprehension and maintenance of large-scale multi-language software applications," in Software Maintenance, 2006. ICSM'06. 22nd IEEE International Conference on. IEEE, 2006, pp. 497--500.
[11]
P. K. Linos, Z.-h. Chen, S. Berrier, and B. O'Rourke, "A tool for understanding multi-language program dependencies," in Program Comprehension, 2003. 11th IEEE International Workshop on. IEEE, 2003, pp. 64--72.
[12]
S. Li and G. Tan, "Jet: Exception checking in the java native interface," in Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, ser. OOPSLA '11. ACM, 2011, pp. 345--358.
[13]
G. Tan, S. Chakradhar, R. Srivaths, and R. D. Wang, "Safe Java Native Interface," in In Proceedings of the 2006 IEEE International Symposium on Secure Software Engineering, 2006, pp. 97--106.
[14]
P. Mayer and A. Schroeder, "Cross-language code analysis and refactoring," in Source Code Analysis and Manipulation (SCAM), 2012 IEEE 12th International Working Conference on. IEEE, 2012, pp. 94--103.
[15]
F. Palomba, G. Bavota, M. Di Penta, R. Oliveto, and A. De Lucia, "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, 2014, pp. 101--110.
[16]
F. Khomh and Y.-G. Guéhéneuc, "Do design patterns impact software quality positively?" in Software Maintenance and Reengineering, 2008. CSMR 2008. 12th European Conference on. IEEE, 2008, pp. 274--278.
[17]
M. Abidi, F. Khomh, and Y.-G. Guéhéneuc, "Anti-patterns for multi-language systems," in Proceedings of the 24th European Conference on Pattern Languages of Programs. ACM, 2019, p. 42.
[18]
M. Abidi, M. Grichi, F. Khomh, and Y.-G. Guéhéneuc, "Code smells for multi-language systems," in Proceedings of the 24th European Conference on Pattern Languages of Programs. ACM, 2019, p. 12.
[19]
F. Tomassetti and M. Torchiano, "An empirical assessment of polyglot-ism in github," in Proceedings of the 18th International Conference on Evaluation and Assessment in Software Engineering, ser. EASE '14. New York, NY, USA: ACM, R@2014, pp. 17:1-17:4.
[20]
R.-H. Pfeiffer and A. Wąsowski, "Texmo: A multi-language development environment," in Proceedings of the 8th European Conference on Modelling Foundations and Applications, ser. ECMFA'12. Berlin, Heidelberg: Springer-Verlag, 2012, pp. 178--193.
[21]
Z. Mushtaq and G. Rasool, "Multilingual source code analysis: State of the art and challenges," in 2015 International Conference on Open Source Systems Technologies (ICOSST), Dec 2015, pp. 170--175.
[22]
S. Liang, Java Native Interface: Programmer's Guide and Reference, 1st ed. Boston, MA, USA: Addison-Wesley Longman Publishing Co., Inc., 1999.
[23]
J. Hunt, Java for Practitioners: An Introduction and Reference to Java and Object Orientation, 1st ed. Secaucus, NJ, USA: Springer-Verlag New York, Inc., 1999.
[24]
C.Alexander, S. Ishikawa, M. Silverstein, J.R. i Ramió, M.Jacobson, and I. Fiksdahl-King, A pattern language. Gustavo Gili, 1977.
[25]
E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns: Elements of Reusable Object-oriented Software. Boston, MA, USA: Addison-Wesley Longman Publishing Co., Inc., 1995.
[26]
W. H. Brown, R. C. Malveau, H. W. McCormick, and T. J. Mowbray, Anti Patterns: refactoring software, architectures, and projects in crisis. John Wiley & Sons, Inc., 1998.
[27]
M. Fowler and K. Beck, Refactoring: improving the design of existing code. Addison-Wesley Professional, 1999.
[28]
M. Goedicke and U. Zdun, "Piecemeal legacy migrating with an architectural pattern language: A case study," Journal of Software Maintenance and Evolution: Research and Practice, vol. 14, no. 1, pp. 1--30, 2002.
[29]
M. Abidi, M. Grichi, and F. Khomh, "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., 2019, pp. 72--81.
[30]
P. K. Linos, "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, 1995, pp. 338--341.
[31]
M. Goedicke, G. Neumann, and U. Zdun, "Object system layer," 5th European Conference on Pattern Languages of Programms (EuroPLoP '2000), 2000.
[32]
--, "Message redirector," 6th European Conference on Pattern Languages of Programms (EuroPLoP '2001), 2001.
[33]
G. Kondoh and T. Onodera, "Finding bugs in java native interface programs," in Proceedings of the 2008 International Symposium on Software Testing and Analysis, ser. ISSTA '08. New York, NY, USA: ACM, 2008, pp. 109--118.
[34]
A. Neitsch, K. Wong, and M. W. Godfrey, "Build system issues in multilanguage software," in Software Maintenance (ICSM), 2012 28th IEEE International Conference on. IEEE, 2012, pp. 140--149.

Cited By

View all
  • (2024)Multi-language Software Development in the LLM Era: Insights from Practitioners’ Conversations with ChatGPTProceedings of the 18th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement10.1145/3674805.3690755(489-495)Online publication date: 24-Oct-2024
  • (2024)Detection of Unused Native Methods code smells in Multi-Language Systems2024 4th International Conference on Information Communication and Software Engineering (ICICSE)10.1109/ICICSE61805.2024.10625688(44-50)Online publication date: 10-May-2024
  • (2024)Challenges of Multilingual Program Specification and AnalysisLeveraging Applications of Formal Methods, Verification and Validation. Specification and Verification10.1007/978-3-031-75380-0_8(124-143)Online publication date: 30-Oct-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Other conferences
EuroPLoP '20: Proceedings of the European Conference on Pattern Languages of Programs 2020
July 2020
434 pages
ISBN:9781450377690
DOI:10.1145/3424771
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]

In-Cooperation

  • Hillside Europe: Hillside Europe

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 17 December 2020

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Code smells
  2. JNI
  3. multi-language systems
  4. patterns
  5. software quality

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

EuroPLoP '20

Acceptance Rates

EuroPLoP '20 Paper Acceptance Rate 37 of 58 submissions, 64%;
Overall Acceptance Rate 216 of 354 submissions, 61%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)17
  • Downloads (Last 6 weeks)1
Reflects downloads up to 18 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Multi-language Software Development in the LLM Era: Insights from Practitioners’ Conversations with ChatGPTProceedings of the 18th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement10.1145/3674805.3690755(489-495)Online publication date: 24-Oct-2024
  • (2024)Detection of Unused Native Methods code smells in Multi-Language Systems2024 4th International Conference on Information Communication and Software Engineering (ICICSE)10.1109/ICICSE61805.2024.10625688(44-50)Online publication date: 10-May-2024
  • (2024)Challenges of Multilingual Program Specification and AnalysisLeveraging Applications of Formal Methods, Verification and Validation. Specification and Verification10.1007/978-3-031-75380-0_8(124-143)Online publication date: 30-Oct-2024
  • (2023)Analyzing the Impact of Code Commenting on Software Quality2023 14th International Conference on Computing Communication and Networking Technologies (ICCCNT)10.1109/ICCCNT56998.2023.10307948(1-6)Online publication date: 6-Jul-2023
  • (2023)A decade of code comment quality assessmentJournal of Systems and Software10.1016/j.jss.2022.111515195:COnline publication date: 8-Feb-2023

View Options

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