Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Mouna Abidi
1. Identification and Analysis of the Impact of Patterns on the Quality
of Multi-language Systems
Mouna Abidi and Yann-Gaël Guéhéneuc
GIGL, Polytechnique Montréal
2- Objectives
We want to
• Collect and categorize the different sets of programming languages
existing in the literature and systems developed with more than one
programming language.
• Detect the existence of design patterns in multi-language programs
to be able to track bugs, conclude a pattern catalog specified for
these systems types and to provide best practices to develop well
with more than one language and avoid bugs.
• Identify automatically design patterns and design defects in multi-
language systems
• Study the impact of design patterns on the quality of these systems
and their possible resolution of identified problems.
3- Contributions
Thus, we can
• Provide a catalog of multi-language design patterns and design
defects.
• Propose a detection tool for multi-language design patterns and
design defects.
• Study the impact of those occurrences on software quality attributes.
6- Work in progress
• We are working on one hand on a systematic literature review to find the
most important sets of combinations of programming languages studied in
the literature. On the other hand, we are performing an empirical study in
OpenHub to find the sets of languages used by developers. We will
contrast these sets with the literature.
• We aim to find out the patterns used in mutli-language systems to provide
a catalog with the best and bad practices to adopt to ensure good quality in
multi-language.
• We are studying how anti-patterns impact developers efforts at
maintenance activities.
1- Introduction
Multi-language systems become prevalent with the technological
advances. Many systems with which we interact daily like Android
Applications, Google, Facebook... are build using more than one
programming language.
However, multi-language systems introduce different challenges and
bugs that developers must deal with. Due to the complex interactions
and the heterogeneity of the languages, multi-language systems may
have inconsistencies, dependency issues, and bugs and needs more
effort for comprehension and maintenance. In addition, the detection of
occurrences of design patterns and design defects and their impacts on
multi-language systems is not well established in the literature.
5- Preliminary results
7- Conclusion and Future Works
The objective of this research project is to define and establish the best
practices to be adopted and bad practices to avoid to improve the quality
of multi-language systems. We plan to provide a tool that can
automatically detect occurrences of multi-language patterns and
investigate their impact on the quality of multi-language systems.
4- Methodology
Build Pattern Model
2- Detection of patterns occurrences
Correspondence Matching
Patterns OccurencesPOM Metrics (Ptidej)
1-Definition and identification of patterns in multi-language systems
3- Impact of patterns
Systematic Literature Review (Mouna Abidi, Manel Grichi, Diana Masri, and Yann-GaelGuéhéneuc)
State of practices of JNI Usage (Mouna Abidi, Manel Grichi, and Yann-GaelGuéhéneuc)
Practice Description
AccessController to
load libraries.
A safe way to make sure the library cannot be loaded by code which do not have permissions.
Take care of the
Strings
It is the developer’s responsibility to release the character arrays explicitly using the
ReleaseString or ReleaseStringUTF functions.
Always check return
values
Instead of Exceptions the JNI API functions rely on their return values to indicate any errors
during the execution of the API call.
Never Cache Local
References
JVM garbage collectors boundaries are limited to the Java space only. So the JVM garbage
collector cannot free the memory that application allocates in the native space.
Use List of Probable
Paths
When bundling dynamic library within the JAR it is necessary to extract the library into file
system before loading it.
Mix in JNI Mixing JNI with business/platform code makes it harder to share common code.
Binaries in repo Without using a proper dependency resolver, the library sources will need to be found and
rebuilt whenever a new OS is to be supported.
JNI implementation
functions
Use of JNIEnv, JNICALL, macros. Use of JNI_OnLoad.
Qualitative Analysis
AST
Output
8- References
[1] B. Lee, M. Hirzel, R. Grimm, and K. S. McKinley, “Debug all your code: portable mixed-environment
debugging,” in Proc. ACM, Oct. 2009.
[2] P. K. Linos, Z. hong Chen, S. Berrier, and B. O’Rourke, “A
tool for understanding multi-language program dependencies,” in
IWPC ’03. USA: IEEE Computer Society, 2003, p. 64.
[3] G. Tan and J. Croft. An empirical security study of the native code in the JDK. In 17th Usenix Security
Symposium, pages 365–377, 2008.
Training
Validation
Testing
Fig: Return types analysis
Fig: Modifier analysis
Fig: Set of programming languages in practiceFig: Multi-language Mechanisms
Fig: Category of multi-language papers
THE CONSORTIUM FOR SOFTWARE ENGINEERING RESEARCH (CSER) 2018 FALL MEETING, LONDON ONTARIO, CANADA