Styler: Learning Formatting Conventions to Repair Checkstyle Errors

04/03/2019
by   Benjamin Loriot, et al.
0

Formatting coding conventions play an important role on code readability. In this paper, we present Styler, an automatic repair tool dedicated to fix formatting-related errors raised by Checkstyle, a highly configurable format checker for Java. To fix formatting errors in a given project, Styler learns fixes based on the Checkstyle ruleset defined in the project and predicts repairs for the current errors using machine learning. In an empirical evaluation, we found that Styler repaired 24 mined from five GitHub projects. Moreover, in a comparison of Styler with the state-of-the-art machine learning code formatters Naturalize and CodeBuff, we found that Styler is the tool that fixes more real Checkstyle errors and also generates smaller repairs. Finally, we conclude that Styler is promising to be used in IDEs and in a Continuous Integration environment to repair Checkstyle errors.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/22/2020

DevReplay: Automatic Repair with Editable Fix Pattern

Static analysis tools, or linters, detect violation of source code conve...
research
09/02/2019

Targeted Example Generation for Compilation Errors

We present TEGCER, an automated feedback tool for novice programmers. TE...
research
01/29/2020

TarTar: A Timed Automata Repair Tool

We present TarTar, an automatic repair analysis tool that, given a timed...
research
07/22/2019

Learning the Relation between Code Features and Code Transforms with Structured Prediction

We present in this paper the first approach for structurally predicting ...
research
10/14/2019

Learning Lenient Parsing Typing via Indirect Supervision

Both professional coders and teachers frequently deal with imperfect (fr...
research
06/11/2021

Break-It-Fix-It: Unsupervised Learning for Program Repair

We consider repair tasks: given a critic (e.g., compiler) that assesses ...
research
04/19/2018

Reducing Cascading Parsing Errors Through Fast Error Recovery

Syntax errors are generally easy to fix for humans, but not for parsers:...

Please sign up or login with your details

Forgot password? Click here to reset