Cargando…

FindICI: Using machine learning to detect linguistic inconsistencies between code and natural language descriptions in infrastructure-as-code

Linguistic anti-patterns are recurring poor practices concerning inconsistencies in the naming, documentation, and implementation of an entity. They impede the readability, understandability, and maintainability of source code. This paper attempts to detect linguistic anti-patterns in Infrastructure...

Descripción completa

Detalles Bibliográficos
Autores principales: Borovits, Nemania, Kumara, Indika, Di Nucci, Dario, Krishnan, Parvathy, Palma, Stefano Dalla, Palomba, Fabio, Tamburri, Damian A., Heuvel, Willem-Jan van den
Formato: Online Artículo Texto
Lenguaje:English
Publicado: Springer US 2022
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9489593/
https://www.ncbi.nlm.nih.gov/pubmed/36159893
http://dx.doi.org/10.1007/s10664-022-10215-5
_version_ 1784792917159706624
author Borovits, Nemania
Kumara, Indika
Di Nucci, Dario
Krishnan, Parvathy
Palma, Stefano Dalla
Palomba, Fabio
Tamburri, Damian A.
Heuvel, Willem-Jan van den
author_facet Borovits, Nemania
Kumara, Indika
Di Nucci, Dario
Krishnan, Parvathy
Palma, Stefano Dalla
Palomba, Fabio
Tamburri, Damian A.
Heuvel, Willem-Jan van den
author_sort Borovits, Nemania
collection PubMed
description Linguistic anti-patterns are recurring poor practices concerning inconsistencies in the naming, documentation, and implementation of an entity. They impede the readability, understandability, and maintainability of source code. This paper attempts to detect linguistic anti-patterns in Infrastructure-as-Code (IaC) scripts used to provision and manage computing environments. In particular, we consider inconsistencies between the logic/body of IaC code units and their short text names. To this end, we propose FindICI a novel automated approach that employs word embedding and classification algorithms. We build and use the abstract syntax tree of IaC code units to create code embeddings used by machine learning techniques to detect inconsistent IaC code units. We evaluated our approach with two experiments on Ansible tasks systematically extracted from open source repositories for various word embedding models and classification algorithms. Classical machine learning models and novel deep learning models with different word embedding methods showed comparable and satisfactory results in detecting inconsistent Ansible tasks related to the top-10 used Ansible modules.
format Online
Article
Text
id pubmed-9489593
institution National Center for Biotechnology Information
language English
publishDate 2022
publisher Springer US
record_format MEDLINE/PubMed
spelling pubmed-94895932022-09-22 FindICI: Using machine learning to detect linguistic inconsistencies between code and natural language descriptions in infrastructure-as-code Borovits, Nemania Kumara, Indika Di Nucci, Dario Krishnan, Parvathy Palma, Stefano Dalla Palomba, Fabio Tamburri, Damian A. Heuvel, Willem-Jan van den Empir Softw Eng Article Linguistic anti-patterns are recurring poor practices concerning inconsistencies in the naming, documentation, and implementation of an entity. They impede the readability, understandability, and maintainability of source code. This paper attempts to detect linguistic anti-patterns in Infrastructure-as-Code (IaC) scripts used to provision and manage computing environments. In particular, we consider inconsistencies between the logic/body of IaC code units and their short text names. To this end, we propose FindICI a novel automated approach that employs word embedding and classification algorithms. We build and use the abstract syntax tree of IaC code units to create code embeddings used by machine learning techniques to detect inconsistent IaC code units. We evaluated our approach with two experiments on Ansible tasks systematically extracted from open source repositories for various word embedding models and classification algorithms. Classical machine learning models and novel deep learning models with different word embedding methods showed comparable and satisfactory results in detecting inconsistent Ansible tasks related to the top-10 used Ansible modules. Springer US 2022-09-20 2022 /pmc/articles/PMC9489593/ /pubmed/36159893 http://dx.doi.org/10.1007/s10664-022-10215-5 Text en © The Author(s) 2022 https://creativecommons.org/licenses/by/4.0/Open AccessThis article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/ (https://creativecommons.org/licenses/by/4.0/) .
spellingShingle Article
Borovits, Nemania
Kumara, Indika
Di Nucci, Dario
Krishnan, Parvathy
Palma, Stefano Dalla
Palomba, Fabio
Tamburri, Damian A.
Heuvel, Willem-Jan van den
FindICI: Using machine learning to detect linguistic inconsistencies between code and natural language descriptions in infrastructure-as-code
title FindICI: Using machine learning to detect linguistic inconsistencies between code and natural language descriptions in infrastructure-as-code
title_full FindICI: Using machine learning to detect linguistic inconsistencies between code and natural language descriptions in infrastructure-as-code
title_fullStr FindICI: Using machine learning to detect linguistic inconsistencies between code and natural language descriptions in infrastructure-as-code
title_full_unstemmed FindICI: Using machine learning to detect linguistic inconsistencies between code and natural language descriptions in infrastructure-as-code
title_short FindICI: Using machine learning to detect linguistic inconsistencies between code and natural language descriptions in infrastructure-as-code
title_sort findici: using machine learning to detect linguistic inconsistencies between code and natural language descriptions in infrastructure-as-code
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9489593/
https://www.ncbi.nlm.nih.gov/pubmed/36159893
http://dx.doi.org/10.1007/s10664-022-10215-5
work_keys_str_mv AT borovitsnemania findiciusingmachinelearningtodetectlinguisticinconsistenciesbetweencodeandnaturallanguagedescriptionsininfrastructureascode
AT kumaraindika findiciusingmachinelearningtodetectlinguisticinconsistenciesbetweencodeandnaturallanguagedescriptionsininfrastructureascode
AT dinuccidario findiciusingmachinelearningtodetectlinguisticinconsistenciesbetweencodeandnaturallanguagedescriptionsininfrastructureascode
AT krishnanparvathy findiciusingmachinelearningtodetectlinguisticinconsistenciesbetweencodeandnaturallanguagedescriptionsininfrastructureascode
AT palmastefanodalla findiciusingmachinelearningtodetectlinguisticinconsistenciesbetweencodeandnaturallanguagedescriptionsininfrastructureascode
AT palombafabio findiciusingmachinelearningtodetectlinguisticinconsistenciesbetweencodeandnaturallanguagedescriptionsininfrastructureascode
AT tamburridamiana findiciusingmachinelearningtodetectlinguisticinconsistenciesbetweencodeandnaturallanguagedescriptionsininfrastructureascode
AT heuvelwillemjanvanden findiciusingmachinelearningtodetectlinguisticinconsistenciesbetweencodeandnaturallanguagedescriptionsininfrastructureascode