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

Nemania Borovits (Corresponding author-nrf), Indika Kumara, Dario Di Nucci, Parvathy Krishnan, Stefano Dalla Palma, Fabio Palomba, Damian A Tamburri, Willem-Jan van den Heuvel

    Research output: Contribution to journalArticleAcademicpeer-review

    13 Citations (Scopus)
    1 Downloads (Pure)

    Abstract

    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.
    Original languageEnglish
    Article number178
    Number of pages30
    JournalEmpirical Software Engineering
    Volume27
    Issue number7
    DOIs
    Publication statusPublished - 2022

    Fingerprint

    Dive into the research topics of 'FindICI: Using machine learning to detect linguistic inconsistencies between code and natural language descriptions in infrastructure-as-code'. Together they form a unique fingerprint.

    Cite this