ABSTRACT
The different ways of representing a source code in different programming languages create a heterogeneous context. In addition, the use of multiple programming languages in a single source code (polyglot programming) brings a wide choice of terms from different languages, libraries and structures. These facts prevent the direct exchange of information between source codes of different programming languages, requiring specialized knowledge of the programming languages involved. In this article, we present an ontology-based method for source code interoperability that provides an alternative to mitigate heterogeneity problems, aiming to semantically represent the source code written in different programming languages and apply it from different perspectives in a unified way. In this sense, the method is applied in a lab experiment with the objective of validating its methodological aspects, instantiating their respective phases in different subdomains (object orientation and object/relational mapping) and programming languages (Java and Python) in the code smells detection perspective. In addition, the code smell detector produced is evaluated with a set of real-world software projects written in Java and Python.
Supplemental Material
Available for Download
Presentation for Source Code Interoperability based on Ontology
- Suelen Goularte Carvalho, Maurício Aniche, Júlio Veríssimo, Rafael S. Durelli, and Marco Aurélio Gerosa. 2019. An empirical catalog of code smells for the presentation layer of Android apps. Empirical Software Engineering 24, 6 (dec 2019), 3546–3586.Google ScholarCross Ref
- Luis Paulo da Silva Carvalho, Renato Lima Novais, Laís do Nascimento Salvador, and Manoel Gomes de Mendonça Neto. 2017. An Ontology-based Approach to Analyzing the Occurrence of Code Smells in Software. In Prof. of the 19th International Conference on Enterprise Information Systems - Volume 2: ICEIS. ScitePress, 155–165.Google ScholarCross Ref
- Phongphan Danphitsanuphan and Thanitta Suwantada. 2012. Code smell detecting tool and code smell-structure bug relationship. In 2012 Spring Congress on Engineering and Technology. IEEE, 1–5.Google ScholarCross Ref
- Camila Zacché de Aguiar, Ricardo de Almeida Falbo, and Vítor E Silva Souza. 2019. OOC-O: A reference ontology on object-oriented code. In International Conference on Conceptual Modeling. Springer, 13–27.Google ScholarDigital Library
- Ricardo A. Falbo. 2014. SABiO: Systematic Approach for Building Ontologies. In Proc. of the 1st Joint Workshop ONTO.COM / ODISE on Ontologies in Conceptual Modeling and Information Systems Engineering. CEUR, Rio de Janeiro, RJ, Brasil.Google Scholar
- J Gosling, B Joy, G Steele, G Bracha, A Buckley, and D Smith. 2018. The Java language specification: Java SE 10 edition, 20 February 2018.Google Scholar
- Giancarlo Guizzardi. 2005. Ontological Foundations for Structural Conceptual Models. PhD Thesis. University of Twente, The Netherlands.Google ScholarDigital Library
- Giancarlo Guizzardi. 2019. Ontology, Ontologies and the “I” of FAIR Giancarlo. Data Intelligence 23, November (2019), 0–2. https://doi.org/10.1162/dintGoogle Scholar
- Giancarlo Guizzardi and Gerd Wagner. 2004. A Unified Foundational Ontology and some Applications of it in Business Modeling. In Proc. of the 2004 Open InterOp Workshop on Enterprise Modelling and Ontologies for Interoperability. CEUR.Google Scholar
- Christoph Kiefer, Abraham Bernstein, and Jonas Tappolet. 2007. Analyzing software with iSPARQL. In Proc. of the 3rd International Workshop on Semantic Web Enabled Software Engineering. 1–15.Google Scholar
- Rohit Kumar and Jaspreet Singh. 2016. A unique code smell detection and refactoring scheme for evaluating software maintainability. International Journal of Latest Trends in Engineering and Technology 7 (2016), 421–436.Google Scholar
- Naouel Moha, Yann-Gael Gueheneuc, Laurence Duchien, and Anne-Francoise Le Meur. 2009. Decor: A method for the specification and detection of code and design smells. IEEE Transactions on Software Engineering 36, 1 (2009), 20–36.Google ScholarDigital Library
- Ghulam Rasool and Zeeshan Arshad. 2017. A lightweight approach for detection of code smells. Arabian Journal for Science and Engineering 42, 2 (2017), 483–506.Google ScholarCross Ref
- Amit P. Sheth. 1999. Changing Focus on Interoperability in Information Systems: from Systems, Syntax, Structures to Semantics. Interoperating Geographic Information Systems (1999).Google Scholar
- Rudi Studer, V Richard Benjamins, and Dieter Fensel. 1998. Knowledge engineering: principles and methods. Data & knowledge engineering 25, 1-2 (1998), 161–197.Google Scholar
- Ewan Tempero, Craig Anslow, Jens Dietrich, Ted Han, Jing Li, Markus Lumpe, Hayden Melton, and James Noble. 2010. Qualitas Corpus: A Curated Collection of Java Code for Empirical Studies. In Proc. of the 2010 Asia Pacific Software Engineering Conference (APSEC2010). IEEE, 336–345.Google ScholarDigital Library
- Claes Wohlin, Per Runeson, Martin Höst, Magnus C Ohlsson, Björn Regnell, and Anders Wesslén. 2012. Experimentation in software engineering. Springer.Google ScholarCross Ref
- Félix Luiz Zanetti, Camila Zacche de Aguiar, and Vıtor E Silva Souza. 2019. Representacao ontologica de frameworks de mapeamento objeto/relacional. In Proc. of the 12th Seminar on Ontology Research in Brazil (ONTOBRAS 2019). CEUR, Porto Alegre, RS, Brasil.Google Scholar
Recommendations
An ontology-based taxonomy of bad code smells
ACST'07: Proceedings of the third conference on IASTED International Conference: Advances in Computer Science and Technology"Bad code smell" or "spaghetti code" is a jargon used among programmers to refer to source code that is difficult to maintain, evolve, and change. We consider them as symptoms of poor software engineering practice. This paper presents an application of ...
Do bugs lead to unnaturalness of source code?
ESEC/FSE 2022: Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software EngineeringTexts in natural languages are highly repetitive and predictable because of the naturalness of natural languages. Recent research validated that source code in programming languages is also repetitive and predictable, and naturalness is an inherent ...
Automatic detection of Long Method and God Class code smells through neural source code embeddings
Highlights- We compare machine learning approaches against heuristics for code smell detection.
AbstractCode smells are structures in code that often harm its quality. Manually detecting code smells is challenging, so researchers proposed many automatic detectors. Traditional code smell detectors employ metric-based heuristics, but ...
Comments