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 条
  • [41] Digesting Digital Health: A Study of Appropriateness and Readability of ChatGPT-Generated Gastroenterological Information
    Toiv, Avi
    Saleh, Zachary
    Ishak, Angela
    Alsheik, Eva
    Venkat, Deepak
    Nandi, Neilanjan
    Zuchelli, Tobias E.
    CLINICAL AND TRANSLATIONAL GASTROENTEROLOGY, 2024, 15 (11)
  • [42] Man vs. machine: identifying chatGPT-generated abstracts in gynecology and urogynecology
    Pan, E.
    Florian-Rodriguez, M.
    AMERICAN JOURNAL OF OBSTETRICS AND GYNECOLOGY, 2024, 230 (04) : S1151 - S1152
  • [43] The Impact of ChatGPT on Students' Learning Programming Languages
    Aviv, Itzhak
    Leiba, Moshe
    Rika, Havana
    Shani, Yogev
    LEARNING AND COLLABORATION TECHNOLOGIES, PT III, LCT 2024, 2024, 14724 : 207 - 219
  • [44] ChatGPT-generated literature review: Quod erat demonstrandum or ends justifying the means?
    Palagani, Divya Sai Snehith Reddy
    Counter, Paul
    James, Tobias
    CLINICAL OTOLARYNGOLOGY, 2023, 48 (06) : 929 - 930
  • [45] Differentiating ChatGPT-Generated and Human-Written Medical Texts: Quantitative Study
    Liao, Wenxiong
    Liu, Zhengliang
    Dai, Haixing
    Xu, Shaochen
    Wu, Zihao
    Zhang, Yiyang
    Huang, Xiaoke
    Zhu, Dajiang
    Cai, Hongmin
    Li, Quanzheng
    Liu, Tianming
    Li, Xiang
    JMIR MEDICAL EDUCATION, 2023, 9
  • [47] Evaluation of ChatGPT-Generated Differential Diagnosis for Common Diseases With Atypical Presentation: Descriptive Research
    Shikino, Kiyoshi
    Shimizu, Taro
    Otsuka, Yuki
    Tago, Masaki
    Takahashi, Hiromizu
    Watari, Takashi
    Sasaki, Yosuke
    Iizuka, Gemmei
    Tamura, Hiroki
    Nakashima, Koichi
    Kunitomo, Kotaro
    Suzuki, Morika
    Aoyama, Sayaka
    Kosaka, Shintaro
    Kawahigashi, Teiko
    Matsumoto, Tomohiro
    Orihara, Fumina
    Morikawa, Toru
    Nishizawa, Toshinori
    Hoshina, Yoji
    Yamamoto, Yu
    Matsuo, Yuichiro
    Unoki, Yuto
    Kimura, Hirofumi
    Tokushima, Midori
    Watanuki, Satoshi
    Saito, Takuma
    Otsuka, Fumio
    Tokuda, Yasuharu
    JMIR MEDICAL EDUCATION, 2024, 10
  • [48] A large-scale comparison of human-written versus ChatGPT-generated essays
    Herbold S.
    Hautli-Janisz A.
    Heuer U.
    Kikteva Z.
    Trautsch A.
    Scientific Reports, 13 (1)
  • [49] Translating programming languages into executable codes
    Department of Informatics, University Lucian Blaga of Sibiu, 5-7 Dr. Ioan Ratiu Street, Sibiu, Romania
    WSEAS Trans. Inf. Sci. Appl., 2007, 1 (145-152):
  • [50] Evaluating the quality and readability of ChatGPT-generated patient-facing medical information in rhinology
    Alexander Z. Fazilat
    Camille Brenac
    Danae Kawamoto-Duran
    Charlotte E. Berry
    Jennifer Alyono
    Michael T. Chang
    David T. Liu
    Zara M. Patel
    Stéphane Tringali
    Derrick C. Wan
    Maxime Fieux
    European Archives of Oto-Rhino-Laryngology, 2025, 282 (4) : 1911 - 1920