FRANC: A Lightweight Framework for High-Quality Code Generation
Mohammed Latif Siddiq, Beatrice Casey, and Joanna C. S. Santos

TL;DR
FRANC is a lightweight framework that enhances transformer-based code generation by filtering, ranking, and repairing code snippets to improve security, quality, and compilability efficiently.
Contribution
It introduces a static filter, quality-aware ranking, and prompt engineering techniques to improve code quality without retraining large models.
Findings
Static filter improves Java suggestions by up to 46% and Python suggestions by up to 43%.
Ranking system increases NDCG@10 score by 0.0763 on average.
Prompt repairing fixes up to 80% of quality issues.
Abstract
In recent years, the use of automated source code generation utilizing transformer-based generative models has expanded, and these models can generate functional code according to the requirements of the developers. However, recent research revealed that these automatically generated source codes can contain vulnerabilities and other quality issues. Despite researchers' and practitioners' attempts to enhance code generation models, retraining and fine-tuning large language models is time-consuming and resource-intensive. Thus, we describe FRANC, a lightweight framework for recommending more secure and high-quality source code derived from transformer-based code generation models. FRANC includes a static filter to make the generated code compilable with heuristics and a quality-aware ranker to sort the code snippets based on a quality score. Moreover, the framework uses prompt…
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 · Software Testing and Debugging Techniques · Software Reliability and Analysis Research
MethodsRepair
