Studying and fixing buggy code using ChatGPT
As software projects become more and more complex, bugs are inevitably introduced. Bugs may lead to undesirable consequences such as software reliability issues or vulnerabilities in the code. Which may then lead to other undesirable financial issues. Hence, bug fixing tasks are important in the sof...
Saved in:
Main Author: | |
---|---|
Other Authors: | |
Format: | Final Year Project |
Language: | English |
Published: |
Nanyang Technological University
2024
|
Subjects: | |
Online Access: | https://hdl.handle.net/10356/175119 |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Nanyang Technological University |
Language: | English |
id |
sg-ntu-dr.10356-175119 |
---|---|
record_format |
dspace |
spelling |
sg-ntu-dr.10356-1751192024-04-26T15:40:36Z Studying and fixing buggy code using ChatGPT Ling, Yin Liu Yang School of Computer Science and Engineering yangliu@ntu.edu.sg Computer and Information Science As software projects become more and more complex, bugs are inevitably introduced. Bugs may lead to undesirable consequences such as software reliability issues or vulnerabilities in the code. Which may then lead to other undesirable financial issues. Hence, bug fixing tasks are important in the software development cycle as this is an important step in identifying defects or undesirable behaviour in the software. However, bug fixing is a difficult task, typically due to the complexity of software that is built over time. Hence, many automated methods have been experimented with to improve the efficiency of bug fixing tasks. In this project, ChatGPT’s ability to do bug fixing is examined. The results show that ChatGPT performs well in bug fixing tasks, with 85% of the programs in the QuixBugs dataset being fixed correctly. However, the performance in test case generation tasks is subpar. In addition, a novel approach that includes test case generation to do bug fixing is played around with. Yet, it was found that generating test cases before generating bug fixes does improve the bug fixing performance of the model. Bachelor's degree 2024-04-22T01:06:47Z 2024-04-22T01:06:47Z 2024 Final Year Project (FYP) Ling, Y. (2024). Studying and fixing buggy code using ChatGPT. Final Year Project (FYP), Nanyang Technological University, Singapore. https://hdl.handle.net/10356/175119 https://hdl.handle.net/10356/175119 en SCSE23-0681 application/pdf Nanyang Technological University |
institution |
Nanyang Technological University |
building |
NTU Library |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
NTU Library |
collection |
DR-NTU |
language |
English |
topic |
Computer and Information Science |
spellingShingle |
Computer and Information Science Ling, Yin Studying and fixing buggy code using ChatGPT |
description |
As software projects become more and more complex, bugs are inevitably introduced. Bugs may lead to undesirable consequences such as software reliability issues or vulnerabilities in the code. Which may then lead to other undesirable financial issues. Hence, bug fixing tasks are important in the software development cycle as this is an important step in identifying defects or undesirable behaviour in the software. However, bug fixing is a difficult task, typically due to the complexity of software that is built over time. Hence, many automated methods have been experimented with to improve the efficiency of bug fixing tasks.
In this project, ChatGPT’s ability to do bug fixing is examined. The results show that ChatGPT
performs well in bug fixing tasks, with 85% of the programs in the QuixBugs dataset being fixed
correctly. However, the performance in test case generation tasks is subpar. In addition, a novel
approach that includes test case generation to do bug fixing is played around with. Yet, it was found that generating test cases before generating bug fixes does improve the bug fixing performance of the model. |
author2 |
Liu Yang |
author_facet |
Liu Yang Ling, Yin |
format |
Final Year Project |
author |
Ling, Yin |
author_sort |
Ling, Yin |
title |
Studying and fixing buggy code using ChatGPT |
title_short |
Studying and fixing buggy code using ChatGPT |
title_full |
Studying and fixing buggy code using ChatGPT |
title_fullStr |
Studying and fixing buggy code using ChatGPT |
title_full_unstemmed |
Studying and fixing buggy code using ChatGPT |
title_sort |
studying and fixing buggy code using chatgpt |
publisher |
Nanyang Technological University |
publishDate |
2024 |
url |
https://hdl.handle.net/10356/175119 |
_version_ |
1800916260571054080 |