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 条
  • [1] Complexity and Similarity Analysis of ChatGPT-Generated Text
    Duran, Gael H.
    Chavez, Rafael
    Flores, Rosemberg
    Caraveo Mena, Camilo
    Cervantes Huerta, Leticia
    Ramirez-Noriega, Alan
    2023 11TH INTERNATIONAL CONFERENCE IN SOFTWARE ENGINEERING RESEARCH AND INNOVATION, CONISOFT 2023, 2023, : 220 - 228
  • [2] Validity of ChatGPT-generated musculoskeletal images
    Ajmera, P.
    Nischal, N.
    Ariyaratne, S.
    Botchu, B.
    Bhamidipaty, K. D. P.
    Iyengar, K. P.
    Ajmera, S. R.
    Jenko, N.
    Botchu, R.
    SKELETAL RADIOLOGY, 2024, 53 (08) : 1583 - 1593
  • [3] Using ChatGPT-generated essays in library instruction
    Johnson, Stacy
    Owens, Erin
    Menendez, Hannah
    Kim, Dianna
    JOURNAL OF ACADEMIC LIBRARIANSHIP, 2024, 50 (02):
  • [4] Disclosure of Artificial Intelligence/ChatGPT-Generated Manuscripts
    Tulandi, Togas
    JOURNAL OF OBSTETRICS AND GYNAECOLOGY CANADA, 2023, 45 (08) : 543 - 544
  • [5] ChatGPT-Generated and Student-Written Historical Narratives: A Comparative Analysis
    Kindenberg, Bjorn
    EDUCATION SCIENCES, 2024, 14 (05):
  • [6] Evaluating the psychometric properties of ChatGPT-generated questions
    Bhandari, Shreya
    Liu, Yunting
    Kwak, Yerin
    Pardos, Zachary A.
    Computers and Education: Artificial Intelligence, 2024, 7
  • [7] A Multimetric Approach for Evaluation of ChatGPT-Generated Text Summaries
    Arnold, Jonas Benedikt
    Horauf, Dominik
    IEEE Engineering Management Review, 2024, 52 (03): : 43 - 53
  • [8] Artificial Intelligence/ ChatGPT-Generated Manuscripts and Disclosure: Comment
    Kleebayoon, Amnuay
    Wiwanitkit, Viroj
    JOURNAL OF OBSTETRICS AND GYNAECOLOGY CANADA, 2023, 45 (12)
  • [9] Evaluation of ChatGPT-generated medical responses: A systematic review and meta-analysis
    Wei, Qiuhong
    Yao, Zhengxiong
    Cui, Ying
    Wei, Bo
    Jin, Zhezhen
    Xu, Ximing
    JOURNAL OF BIOMEDICAL INFORMATICS, 2024, 151
  • [10] A Comparative Analysis of ChatGPT-Generated and Human-Written Use Case Descriptions
    Oguz, Evin Aslan
    Kuester, Jochen M.
    ACM/IEEE 27TH INTERNATIONAL CONFERENCE ON MODEL DRIVEN ENGINEERING LANGUAGES AND SYSTEMS: COMPANION PROCEEDINGS, MODELS 2024, 2024, : 533 - 540