TL;DR
Styler is a machine learning tool that automatically repairs Checkstyle formatting violations in Java code, reducing manual effort and improving code consistency based on project-specific rules.
Contribution
It introduces a novel ML-based approach for automatically fixing formatting violations tailored to individual project conventions, outperforming existing tools in repair size and speed.
Findings
Repaired 41% of violations across 104 GitHub projects
Fixes are smaller and faster than competing tools
Effective across diverse Checkstyle rules
Abstract
Ensuring the consistent usage of formatting conventions is an important aspect of modern software quality assurance. While formatting convention violations can be automatically detected by format checkers implemented in linters, there is no satisfactory solution for repairing them. Manually fixing formatting convention violations is a waste of developer time and code formatters do not take into account the conventions adopted and configured by developers for the used linter. In this paper, we present Styler, a tool dedicated to fixing formatting rule violations raised by format checkers using a machine learning approach. For a given project, Styler first generates training data by injecting violations of the project-specific rules in violation-free source code files. Then, it learns fixes by feeding long short-term memory neural networks with the training data encoded into token…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
