MLinter: Learning Coding Practices from Examples-Dream or Reality? - Archive ouverte HAL Accéder directement au contenu
Communication Dans Un Congrès Année : 2023

MLinter: Learning Coding Practices from Examples-Dream or Reality?

Résumé

Coding practices are increasingly used by software companies. Their use promotes consistency, readability, and maintainability, which contribute to software quality. Coding practices were initially enforced by general-purpose linters, but companies now tend to design and adopt their own company-specific practices. However, these company-specific practices are often not automated, making it challenging to ensure they are shared and used by developers. Converting these practices into linter rules is a complex task that requires extensive static analysis and language engineering expertise. In this paper, we seek to answer the following question: can coding practices be learned automatically from examples manually tagged by developers? We conduct a feasibility study using CodeBERT, a state-of-the-art machine learning approach, to learn linter rules. Our results show that, although the resulting classifiers reach high precision and recall scores when evaluated on balanced synthetic datasets, their application on real-world, unbalanced codebases, while maintaining excellent recall, suffers from a severe drop in precision that hinders their usability.
Fichier principal
Vignette du fichier
main.pdf (549.06 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03951403 , version 1 (23-01-2023)

Identifiants

  • HAL Id : hal-03951403 , version 1

Citer

Corentin Latappy, Quentin Perez, Thomas Degueule, Jean-Rémy Falleri, Christelle Urtado, et al.. MLinter: Learning Coding Practices from Examples-Dream or Reality?. 30th IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER), Mar 2023, Macao SAR, Macau SAR China. ⟨hal-03951403⟩
78 Consultations
69 Téléchargements

Partager

Gmail Facebook X LinkedIn More