大型语言模型能否取代静态分析工具

Han Cui
{"title":"大型语言模型能否取代静态分析工具","authors":"Han Cui","doi":"10.1117/12.3031920","DOIUrl":null,"url":null,"abstract":"Static analysis tools are widely used to ensure code quality and security, especially in large software projects. Recently, the advent of Large Language Models (LLM), such as the Generative Pre-trained Transformer (GPT), seems to present a strong ability to handle tasks about static code analysis. This paper aims to answer the question, can large language model replace static analysis tools? We present an extensive evaluation of ChatGPT’s capabilities in identifying and analyzing issues detectable by three well-known Java static analysis tools: PMD, SpotBugs, and SonarQube. Through a series of experiments, we assess the performance of two versions of GPT, GPT-3.5 and GPT-4, across various categories of code issues. We conduct a detailed analysis of the experiment results and discuss the limitation of using ChatGPT to perform as a static analysis tool. The findings during our research suggest that while GPT, especially GPT-4 performs outstanding marks on the dataset we chose, it is improper to fully replace the static code analyzers at the time. Working as the supplementary of static code analyzers can be a nice way to enhance the code quality ensuring projects.","PeriodicalId":198425,"journal":{"name":"Other Conferences","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-06-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Can large language model replace static analysis tools\",\"authors\":\"Han Cui\",\"doi\":\"10.1117/12.3031920\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Static analysis tools are widely used to ensure code quality and security, especially in large software projects. Recently, the advent of Large Language Models (LLM), such as the Generative Pre-trained Transformer (GPT), seems to present a strong ability to handle tasks about static code analysis. This paper aims to answer the question, can large language model replace static analysis tools? We present an extensive evaluation of ChatGPT’s capabilities in identifying and analyzing issues detectable by three well-known Java static analysis tools: PMD, SpotBugs, and SonarQube. Through a series of experiments, we assess the performance of two versions of GPT, GPT-3.5 and GPT-4, across various categories of code issues. We conduct a detailed analysis of the experiment results and discuss the limitation of using ChatGPT to perform as a static analysis tool. The findings during our research suggest that while GPT, especially GPT-4 performs outstanding marks on the dataset we chose, it is improper to fully replace the static code analyzers at the time. Working as the supplementary of static code analyzers can be a nice way to enhance the code quality ensuring projects.\",\"PeriodicalId\":198425,\"journal\":{\"name\":\"Other Conferences\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-06-06\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Other Conferences\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1117/12.3031920\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Other Conferences","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1117/12.3031920","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

静态分析工具被广泛用于确保代码质量和安全性,尤其是在大型软件项目中。最近,大型语言模型(LLM)的出现,如生成预训练变换器(GPT),似乎展示了处理静态代码分析任务的强大能力。本文旨在回答这样一个问题:大型语言模型能否取代静态分析工具?我们对 ChatGPT 在识别和分析三种著名 Java 静态分析工具所检测到的问题方面的能力进行了广泛评估:PMD、SpotBugs 和 SonarQube。通过一系列实验,我们评估了两个版本的 GPT(GPT-3.5 和 GPT-4)在各类代码问题上的性能。我们对实验结果进行了详细分析,并讨论了将 ChatGPT 用作静态分析工具的局限性。我们的研究结果表明,虽然 GPT,尤其是 GPT-4 在我们选择的数据集上表现出色,但它目前还不能完全取代静态代码分析器。作为静态代码分析器的辅助工具,GPT 可以很好地提高代码质量,确保项目的顺利进行。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Can large language model replace static analysis tools
Static analysis tools are widely used to ensure code quality and security, especially in large software projects. Recently, the advent of Large Language Models (LLM), such as the Generative Pre-trained Transformer (GPT), seems to present a strong ability to handle tasks about static code analysis. This paper aims to answer the question, can large language model replace static analysis tools? We present an extensive evaluation of ChatGPT’s capabilities in identifying and analyzing issues detectable by three well-known Java static analysis tools: PMD, SpotBugs, and SonarQube. Through a series of experiments, we assess the performance of two versions of GPT, GPT-3.5 and GPT-4, across various categories of code issues. We conduct a detailed analysis of the experiment results and discuss the limitation of using ChatGPT to perform as a static analysis tool. The findings during our research suggest that while GPT, especially GPT-4 performs outstanding marks on the dataset we chose, it is improper to fully replace the static code analyzers at the time. Working as the supplementary of static code analyzers can be a nice way to enhance the code quality ensuring projects.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Small data in model calibration for optical tissue phantom validation New approaches of supersmooth surfaces diagnostics by using carbon nanoparticles Uses of 3D printing technologies in opto-mechanics and opto-mechatronics for laboratory instruments Integrated approach to precision instrumentation: design, modeling, and experimental validation of a compliant mechanical amplifier for laser scalpel prototype Laser-induced periodic surface structures on TiAl6V4 surfaces by picosecond laser processing for dental abutments
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1