Skip to content

Automatic repair system for Checkstyle errors based on machine learning. http://arxiv.org/pdf/1904.01754

Notifications You must be signed in to change notification settings

ASSERT-KTH/styler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Automatic repair system for Checkstyle errors based on machine learning. http://arxiv.org/pdf/1904.01754

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •