Analysis of ChatGPT-Generated Codes Across Multiple Programming Languages

被引:0
|
作者
Almanasra, Sally [1 ]
Suwais, Khaled [1 ]
机构
[1] Arab Open Univ, Fac Comp Studies, Riyadh 11681, Saudi Arabia
来源
IEEE ACCESS | 2025年 / 13卷
关键词
Codes; Programming; Encoding; Chatbots; Runtime; !text type='Python']Python[!/text; Software development management; !text type='Java']Java[!/text; Complexity theory; Standards; Artificial intelligence; software development; ChatGPT; large language model; programming;
D O I
10.1109/ACCESS.2025.3538050
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Our research focuses on the intersection of artificial intelligence (AI) and software development, particularly the role of AI models in automating code generation. With advancements in large language models like ChatGPT, developers can now generate code from natural language prompts, a task that traditionally required significant manual input and expertise. AI-generated code promises to boost productivity by enabling faster prototyping and automating repetitive coding tasks. However, as these models are increasingly adopted in real-world applications, questions surrounding their efficiency and code quality become critical. This research investigates ChatGPT-4o, a state-of-the-art language model, and its ability to generate functional, high-quality code in different programming languages. By comparing performance between Python and Java, the study seeks to shed light on AI's capabilities and limitations in code generation, addressing not only functional correctness but also broader software engineering concerns such as memory usage, runtime efficiency, and maintainability. The study addresses key questions related to the performance, code quality, and error management of AI-generated code by analyzing solutions for 300 data structure problems and 300 problems from the LeetCode platform. The findings reveal notable performance differences between the two languages: Java demonstrated superior runtime performance, particularly for medium and hard problems, while Python exhibited better memory efficiency across all complexity levels. The research also highlighted significant gaps in code quality, with both languages showing deficiencies in documentation and exception management. This study contributes to the literature by offering a comprehensive cross-language analysis of ChatGPT-4o's programming capabilities, addressing a gap in the evaluation of AI-generated code performance.
引用
收藏
页码:23580 / 23596
页数:17
相关论文
共 50 条
  • [21] Early prediction of sepsis using chatGPT-generated summaries and structured data
    Li, Qiang
    Ma, Hanbo
    Song, Dan
    Bai, Yunpeng
    Zhao, Lina
    Xie, Keliang
    MULTIMEDIA TOOLS AND APPLICATIONS, 2024, 83 (41) : 89521 - 89543
  • [22] ChatGPT-Generated Case-Based Learning Cases Come at a Cost…
    Patera, Eleni
    Mozu-Simpson, Fanny
    MEDICAL SCIENCE EDUCATOR, 2025, 35 (01) : 589 - 590
  • [23] Quality of ChatGPT-Generated Therapy Recommendations for Breast Cancer Treatment in Gynecology
    Stalp, Jan Lennart
    Denecke, Agnieszka
    Jentschke, Matthias
    Hillemanns, Peter
    Klapdor, Ruediger
    CURRENT ONCOLOGY, 2024, 31 (07) : 3845 - 3854
  • [24] Gaze-Driven Adaptive Learning System With ChatGPT-Generated Summaries
    Santhosh, Jayasankar
    Dengel, Andreas
    Ishimaru, Shoya
    IEEE ACCESS, 2024, 12 : 173714 - 173733
  • [25] Human vs machine: identifying ChatGPT-generated abstracts in Gynecology and Urogynecology
    Pan, Evelyn T.
    Florian-Rodriguez, Maria
    AMERICAN JOURNAL OF OBSTETRICS AND GYNECOLOGY, 2024, 231 (02) : 276e1 - 276e10
  • [26] ASSESSMENT OF CHATGPT-GENERATED PATIENT-CENTERED PROSTATE BIOPSY REPORTS
    Proctor, Erin S.
    Nusbaum, David J.
    Raster, Gregory
    Glaser, Alexander P.
    Labbate, Craig V.
    Higgins, Andrew
    Helfand, Brian T.
    Benirschke, Robert C.
    Groth, John V.
    Kearns, James T.
    JOURNAL OF UROLOGY, 2024, 211 (05): : E968 - E968
  • [27] Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issues
    Liu, Yue
    Le-Cong, Thanh
    Widyasari, Ratnadira
    Tantithamthavorn, Chakkrit
    Li, Li
    Le, Xuan-Bach D.
    Lo, David
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2024, 33 (05)
  • [28] Discriminating Human-authored from ChatGPT-Generated Code Via Discernable Feature Analysis
    Li, Ke
    Hong, Sheng
    Fu, Cai
    Zhang, Yunhe
    Liu, Ming
    2023 IEEE 34TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING WORKSHOPS, ISSREW, 2023, : 120 - 127
  • [29] Human-written vs ChatGPT-generated abstract: some concerns
    Matsubara, Shigeki
    AMERICAN JOURNAL OF OBSTETRICS AND GYNECOLOGY, 2024, 231 (06) : e222 - e222
  • [30] Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issues
    Liu, Yue
    Le-Cong, Thanh
    Widyasari, Ratnadira
    Tantithamthavorn, Chakkrit
    Li, Li
    Le, Xuan-Bach D.
    Lo, David
    arXiv, 2023,