Iterative Refactoring of Real-World Open-Source Programs with Large Language Models

被引:0
|
作者
Choi, Jinsu [1 ]
An, Gabin [1 ]
Yoo, Shin [1 ]
机构
[1] Korea Adv Inst Sci & Technol, Daejeon, South Korea
关键词
Code Refactoring; Large Language Model; Cyclomatic Complexity;
D O I
10.1007/978-3-031-64573-0_4
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Code refactoring is a critical task for improving software quality, but it is traditionally a manual, time-consuming process. This paper demonstrates an approach to automate project-level code refactoring using Large Language Models (LLMs). The key idea is to iteratively identify methods with high cyclomatic complexity, and then use LLMs to generate refactored implementations that reduce complexity. Our evaluation using 17 open-source projects shows that the proposed automated refactoring can reduce average cyclomatic complexity by up to 10.4% within 20 iterations. These results suggest that automated project-level code refactoring is feasible using LLMs with tailored prompts.
引用
收藏
页码:49 / 55
页数:7
相关论文
共 50 条
  • [1] Servicing open-source large language models for oncology
    Ray, Partha Pratim
    ONCOLOGIST, 2024,
  • [2] A tutorial on open-source large language models for behavioral science
    Hussain, Zak
    Binz, Marcel
    Mata, Rui
    Wulff, Dirk U.
    BEHAVIOR RESEARCH METHODS, 2024, : 8214 - 8237
  • [3] Using Design Patterns for Refactoring Real-World Models
    Shahir, Hamed Yaghoubi
    Kouroshfar, Ehsan
    Ramsin, Raman
    2009 35TH EUROMICRO CONFERENCE ON SOFTWARE ENGINEERING AND ADVANCED APPLICATIONS, PROCEEDINGS, 2009, : 436 - 441
  • [4] Preliminary Systematic Review of Open-Source Large Language Models in Education
    Lin, Michael Pin-Chuan
    Chang, Daniel
    Hall, Sarah
    Jhajj, Gaganpreet
    GENERATIVE INTELLIGENCE AND INTELLIGENT TUTORING SYSTEMS, PT I, ITS 2024, 2024, 14798 : 68 - 77
  • [5] PharmaLLM: A Medicine Prescriber Chatbot Exploiting Open-Source Large Language Models
    Ayesha Azam
    Zubaira Naz
    Muhammad Usman Ghani Khan
    Human-Centric Intelligent Systems, 2024, 4 (4): : 527 - 544
  • [6] Automated Essay Scoring and Revising Based on Open-Source Large Language Models
    Song, Yishen
    Zhu, Qianta
    Wang, Huaibo
    Zheng, Qinhua
    IEEE TRANSACTIONS ON LEARNING TECHNOLOGIES, 2024, 17 : 1920 - 1930
  • [7] Open-source large language models in action: A bioinformatics chatbot for PRIDE database
    Bai, Jingwen
    Kamatchinathan, Selvakumar
    Kundu, Deepti J.
    Bandla, Chakradhar
    Vizcaino, Juan Antonio
    Perez-Riverol, Yasset
    PROTEOMICS, 2024,
  • [8] Open-source large language models in medical education: Balancing promise and challenges
    Ray, Partha Pratim
    ANATOMICAL SCIENCES EDUCATION, 2024, 17 (06) : 1361 - 1362
  • [9] RAN Intelligent Controller (RIC): From open-source implementation to real-world validation
    V. Ngo, Mao
    Tran, Nguyen-Bao-Long
    Yoo, Hyun-Min
    Pua, Yong-Hao
    Le, Thanh-Long
    Liang, Xian-Loong
    Chen, Binbin
    Hong, Een-Kee
    Quek, Tony Q. S.
    ICT EXPRESS, 2024, 10 (03): : 680 - 691
  • [10] Accessible Russian Large Language Models: Open-Source Models and Instructive Datasets for Commercial Applications
    Kosenko, D. P.
    Kuratov, Yu. M.
    Zharikova, D. R.
    DOKLADY MATHEMATICS, 2023, 108 (SUPPL 2) : S393 - S398