Learning Program Component Order
Steven P. Reiss, Qi Xin

TL;DR
This paper introduces a learnable model for ordering program components, aiding code maintenance and style consistency by automatically determining component placement and allowing programmer customization.
Contribution
It presents a novel model for learning component orderings from sample code, improving code organization tools and supporting personalized programming styles.
Findings
Model accurately learns component orderings from sample code.
The approach effectively inserts components into code files.
The model can be fine-tuned by programmers for personalized style.
Abstract
Successful programs are written to be maintained. One aspect to this is that programmers order the components in the code files in a particular way. This is part of programming style. While the conventions for ordering are sometimes given as part of a style guideline, such guidelines are often incomplete and programmers tend to have their own more comprehensive orderings in mind. This paper defines a model for ordering program components and shows how this model can be learned from sample code. Such a model is a useful tool for a programming environment in that it can be used to find the proper location for inserting new components or for reordering files to better meet the needs of the programmer. The model is designed so that it can be fine- tuned by the programmer. The learning framework is evaluated both by looking at code with known style guidelines and by testing whether it…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Advanced Software Engineering Methodologies · Logic, programming, and type systems
