arrow
Return

Does ChatGPT Help Novice Programmers Write Better Code? Results From Static Code Analysis

delete2024-01-01
delete2
delete
OA
AI
P
Philipp Haindl *
G
Gerald Weinberger
DOI:10.1109/ACCESS.2024.3445432delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
In the realm of AI-enhanced programming education, there is growing interest in using such tools to help students understand good coding principles. This study investigates the impact of ChatGPT on code quality among part-time undergraduate students in introductory Java programming courses, who lack prior Java experience. The source code of 16 students from the control group (without ChatGPT) and 22 students from the treatment group (with ChatGPT) who completed identical programming exercises focused on coding conventions was analyzed. Static code analysis tools assessed adherence to a common coding convention ruleset and calculated cyclomatic and cognitive complexity metrics. The comparative analysis shows that the ChatGPT-assisted group significantly improved code quality, with fewer rule violations and reduced cyclomatic and cognitive complexities. The treatment group adhered more closely to coding standards and produced less complex code. Violations primarily occurred in line length, final parameters, and the extensibility of object-oriented programming (OOP). These findings suggest that ChatGPT can be beneficial in programming education by helping students write cleaner, less complex code and adhere to coding conventions. However, the study's limitations, such as the small sample size and novice status of participants, call for further research with larger, more diverse populations and different educational contexts.
Keywords:
Codes
Chatbots
Programming
Programming profession
Education
Complexity theory
Java
Programming education
ChatGPT large language models
static code analysis
errShare
errSave
errShare
errSave
errShare
errSave
Navigating the Pitfalls: Analyzing the Behavior of LLMs as a Coding Assistant for Computer Science Students-A Systematic Review of the Literature
err2024-01-01
err4
errOAAI
errPirzado, Farman Ali; Ahmed, Awais; Mendoza-Urdiales, Roman Alejandro; Terashima-Marin, Hugo
errShare
errSave
SOBO: A Feedback Bot to Nudge Code Quality in Programming Courses
err2024-03-01
err2
errOAAI
errBobadilla, Sofia; Glassey, Richard; Bergel, Alexandre; Monperrus, Martin
errShare
errSave
Uncovering Determinants of Code Quality in Education via Static Code Analysis
err2024-01-01
err0
errOAAI
errNikolic, Danilo; Stefanovic, Darko; Nikolic, Miroslav; Dakic, Dusanka; Stefanovic, Miroslav; Koprivica, Sara
errShare
errSave
Analysis of Learning Behavior in an Automated Programming Assessment Environment: A Code Quality Perspective
err2020-01-01
err20
errOAAI
errChen, Hsi-Min; Nguyen, Bao-An; Yan, Yi-Xiang; Dow, Chyi-Ren
errShare
errSave
errShare
errSave

Journal

IEEE Access cover
IEEE Access
IF:
3.6
Papers:
10.1W
Citations:
36.3W

Organization

S
St. Polten University of Applied Sciences
Scholars:
6
Papers: 3
Citations: 54
Cited Papers

Cited Papers

Identification of early fruit development reference genes in plum
err2020-04-17
err0
errOAAI
errKelsey Galimba; Roberta Tosetti; Karen Loerich; Leann Michael; Savita Pabhakar; Cynthia Dove; Chris Dardick; Ann Callahan
errShare
errSave
Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issues
err2024-06-04
err8
errOAAI
errLiu, Yue; Le-Cong, Thanh; Widyasari, Ratnadira; Tantithamthavorn, Chakkrit; Li, Li; Le, Xuan-Bach D.; Lo, David
errShare
errSave
Bracka’s staged repair of proximal hypospadias - revisiting a versatile technique
err2012-02-01
err0
PREAI
errYew-Wei Tan; Nakul Patel; Alexandra Scarlett; John Clibbon; Milind Kulkarni; Azad Mathur
errShare
errSave
Controlled partial embedding of carbon nanotubes within flexible transparent layers
err2007-12-13
err0
PREAI
errElijah B Sansom; Derek Rinderknecht; Morteza Gharib
errShare
errSave
The long-term protective effects of short-interval postconditioning in testicular ischemia-reperfusion injury in rats
err2012-04-01
err0
PREAI
errSezen Ozkisacik; Ali Onur Erdem; Ozge Durmaz; Nil Culhaci; Harun Gursoy; Mesut Yazici
errShare
errSave
Assessment of DNA Barcoding for the Identification of Chenopodium murale L. (Chenopodiaceae)
err2012-09-21
err0
errOAAI
errSameera O. Bafeel; Ibrahim A. Arif; Ali A. Al-Homaidan; Haseeb A. Khan; Anis Ahamed; Mohammad A. Bakir
errShare
errSave
Refining Prehospital Physical Assessment Skills: A New Teaching Technique
err1994-04-01
err0
PREAI
errJoshua S. Vayer; John H. Hagmann; Craig H. Llewellyn
errShare
errSave
researcher View more