Code quality assessment using transformers

Mosleh Mahamud, Isak Samsten
9/17/2023
cs.CLcs.SE

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Automatically evaluate the correctness of programming assignments is rather straightforward using unit and integration tests. However, programming tasks can be solved in multiple ways, many of which, although correct, are inelegant. For instance, excessive branching, poor naming or repetitiveness make the code hard to understand and maintain. These subjective qualities of code are hard to automatically assess using current techniques. In this work we investigate the use of CodeBERT to automatically assign quality score to Java code. We experiment with different models and training paradigms. We explore the accuracy of the models on a novel dataset for code quality assessment. Finally, we assess the quality of the predictions using saliency maps. We find that code quality to some extent is predictable and that transformer based models using task adapted pre-training can solve the task more efficiently than other techniques.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{mahamud2023code,
  title  = {Code quality assessment using transformers},
  author = {Mosleh Mahamud and Isak Samsten},
  year   = {2023},
  eprint = {2309.09264},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.09264v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.09264.svg)](https://codeofpaper.com/paper/2309.09264)

Discussion