Recent advances in automated test generation utilises language models to produce unit tests. While effective, language models tend to generate many incorrect tests with respect to both syntax and semantics. Although such incorrect tests can be easily detected and discarded, they constitute a "missed opportunity" -- if fixed, they are often valuable as they directly add testing value (they effectively target the underlying program logic to be tested) and indirectly form good seeds for generating additional tests. To this end, we propose a simple technique for repairing some of these incorrect tests through a combination of rule-based static analysis and re-prompting. We evaluate this simple approach, named YATE, on a set of 6 open-source projects and show that it can effectively produce tests that cover on average 32.06% more lines and kill 21.77% more mutants than a plain LLM-based method. We also compare YATE with four other LLM-based methods, namely HITS, SYMPROMPT, TESTSPARK and COVERUP and show that it produces tests that cover substantially more code. YATE achieves 22% higher line coverage, 20% higher branch coverage and kill 20% more mutants at a comparable cost (number of calls to LLMs).
Metamodel-Guided Model Generation with Layered Constraints
University of Science and Technology of China(中国科学技术大学);Hefei Institutes of Physical Science, Chinese Academy of Sciences(中国科学院合肥物质科学研究院);Anhui University(安徽大学)
GeoContra: From Fluent GIS Code to Verifiable Spatial Analysis with Geography-Grounded Repair
School of Big Data and Artificial Intelligence, Guangdong University of Finance and Economics(大数据与人工智能学院,广东财经大学);School of Geography and Environment Economics, Guangdong University of Finance & Economics(地理与环境经济学院,广东财经大学);Guangdong Engineering Research Center of Low-Altitude Remote Sensing Intelligent Monitoring(低空遥感智能监测工程研究中心)
University of California at Riverside(加州大学河滨分校);CISPA Helmholtz Center for Information Security(CISPA亥姆霍兹信息安全中心);New Jersey Institute of Technology(新泽西理工学院)
Integrating Various Software Artifacts for Better LLM-based Bug Localization and Program Repair
Nanjing University of Science and Technology(南京理工大学);State Key Lab. for Novel Software Technology, Nanjing University(南京大学新型软件技术国家重点实验室);School of Computer Science, Wuhan University(武汉大学计算机学院)
SPARC: Scenario Planning and Reasoning for Automated C Unit Test Generation
Bangladesh University of Engineering and Technology(孟加拉工程科技大学);National Taiwan University(台湾国立大学);University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)