Enhancing Code Quality Using Pre-trained Language Models: A Fine-Tuning Approach for Code Refinement
摘要
The rapid growth in software development has led to difficulty maintaining high-quality and secure code. The reason for this is the increasing complexity of modern software systems. Traditional methods like static analysis and manual code review and refinement are time-consuming and prone to human errors which states the necessity of finding advanced automated solutions. Our study uses buggy and fixed Java code snippets to fine-tune various pre-trained Large Language Models (LLMs) and compare them based on their performance on code refinement tasks. Models like CodeT5, CodeGen2, and PolyCoder were compared using BLEU, ROUGE, and Exact Match metrics. CodeGen2 and PolyCoder achieved the highest BLEU and ROUGE scores. Hence, this paper highlights the potential of LLMs in automating code refinement tasks and provides insights for future improvements in this field.