Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 1.67 KB

README.md

File metadata and controls

65 lines (50 loc) · 1.67 KB

Styler : Learning Formatting Conventions to Repair Checkstyle Errors

Abstract

Styler is an automatic repair tool to fix formatting errors raised by Checkstyle, a highly configurable formatting-checker for Java. Styler learns fixes for formatting errors and predicts repairs for new errors using machine learning.

Reference: Styler: Learning Formatting Conventions to Repair Checkstyle Violations (Benjamin Loriot, Fernanda Madeiral, Martin Monperrus), Empirical Software Engineering, 2022, DOI:10.1007/s10664-021-10107-0.

Quickstart

Don't forget to clone the submodules :

git clone --recursive [repo]

or after clonning :

git submodule init
git submodule update

Workflow

Sample output

For exemple

...
static class RootModule {
  final A a;
  RootModule(A a) {
    this.a = a;
  }
  @Provides A provideA() { return a; } // <Checkstyle error : "'{' at column 28 should have line break after.">
}
...
...
static class RootModule {
  final A a;
  RootModule(A a) {
    this.a = a;
  }
  @Provides A provideA() {
    return a;
  }

}
...

Content of the repository

This repository is organized as follows:

  • python contains the source of Styler and a guide for it's usage.
  • datasets contains all the datasets used for the experiments in the paper.
  • jars contains the jars of Codebuff, Naturalize and Checkstyle used during the experiments.
  • results contains some results of the experiments conducted on Styler.

Each directory contains its own Readme explaining its own internal organization.

License

This repository is under the MIT license.