{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,1,9]],"date-time":"2026-01-09T10:54:45Z","timestamp":1767956085670,"version":"3.49.0"},"reference-count":22,"publisher":"MDPI AG","issue":"1","license":[{"start":{"date-parts":[[2026,1,9]],"date-time":"2026-01-09T00:00:00Z","timestamp":1767916800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Entropy"],"abstract":"<jats:p>Code coverage-guided unit test generation (CGTG) and large language model-based test generation (LLMTG) are two principal approaches for the generation of unit tests. Each of these approaches has its inherent advantages and drawbacks. Tests generated by CGTG have been shown to exhibit high code coverage and high executability. However, they lack the capacity to comprehend code intent, which results in an inability to identify deviations between code implementation and design intent (i.e., functional defects). Conversely, although LLMTG demonstrates an advantage in terms of code intent analysis, it is generally characterized by low executability and necessitates iterative debugging. In order to enhance the ability of unit test generation to identify functional defects, a novel framework has been proposed, entitled the intent analysis-guided unit test generation and refinement (IGTG&amp;R) model. The IGTG&amp;R model consists of a two-stage process for test generation. In the first stage, we introduce coverage path entropy to enhance CGTG to achieve high executability and code coverage of test cases. The second stage refines the test cases using LLMs to identify functional defects. We quantify and verify the interference of incorrect code implementation on intent analysis through conditional entropy. In order to reduce this interference, the focal method body is excluded from the code context information during intent analysis. Using these two-stage process, IGTG&amp;R achieves a more profound comprehension of the intent of the code and the identification of functional defects. The IGTG&amp;R model has been demonstrated to achieve an identification rate of functional defects ranging from 65% to 89%, with an execution success rate of 100% and a code coverage rate of 75.8%. This indicates that IGTG&amp;R is superior to the CGTG and LLMTG approaches in multiple aspects.<\/jats:p>","DOI":"10.3390\/e28010074","type":"journal-article","created":{"date-parts":[[2026,1,9]],"date-time":"2026-01-09T09:25:02Z","timestamp":1767950702000},"page":"74","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["IGTG&amp;R: An Intent Analysis-Guided Unit Test Generation and Refinement Framework"],"prefix":"10.3390","volume":"28","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-0666-4102","authenticated-orcid":false,"given":"Xiaojian","family":"Liu","sequence":"first","affiliation":[{"name":"College of Computer Science, Beijing University of Technology, Beijing 100124, China"}]},{"given":"Yangyang","family":"Zhang","sequence":"additional","affiliation":[{"name":"China Electronics Standardization Institute, Beijing 100007, China"}]}],"member":"1968","published-online":{"date-parts":[[2026,1,9]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Alonso, J.C., Segura, S., and Ruiz-Cort\u00e9s, A. (2023, January 17\u201321). AGORA: Automated generation of test oracles for REST APIs. Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis, Seattle, WA, USA.","DOI":"10.1145\/3597926.3598114"},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Yuan, Z., Lou, Y., Liu, M., Ding, S., Wang, K., Chen, Y., and Peng, X. (2023). No more manual tests? evaluating and improving ChatGPT for unit test generation. arXiv.","DOI":"10.1145\/3660783"},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Alshahwan, N., Chheda, J., Finogenova, A., Gokkaya, B., Harman, M., Harper, I., Marginean, A., Sengupta, S., and Wang, E. (2024, January 15\u201319). Automated unit test improvement using large language models at meta. Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering, Porto de Galinhas, Brazil.","DOI":"10.1145\/3663529.3663839"},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"105","DOI":"10.1002\/stvr.294","article-title":"Search-based Software Test Data Generation: A Survey","volume":"14","author":"McMinn","year":"2004","journal-title":"J. Softw. Testing, Verif. Reliab."},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Fraser, G., and Arcuri, A. (2011, January 5\u20139). EvoSuite: Automatic test suite generation for object-oriented software. Proceedings of the SIGSOFT\/FSE\u201911 19th ACM SIGSOFT Symposium on the Foundations of Software Engineering (FSE-19) and ESEC\u201911: 13th European Software Engineering Conference (ESEC-13), Szeged, Hungary.","DOI":"10.1145\/2025113.2025179"},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"438","DOI":"10.1109\/TSE.1984.5010257","article-title":"An Evaluation of Random Testing","volume":"10","author":"Duran","year":"1984","journal-title":"IEEE Trans. Softw. Eng."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Csallner, C., Tillmann, N., and Smaragdakis, Y. (2008, January 10\u201318). DySy: Dynamic symbolic execution for invariant inference. Proceedings of the 30th International Conference on Software Engineering (ICSE 2008), Leipzig, Germany.","DOI":"10.1145\/1368088.1368127"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"35","DOI":"10.1016\/j.scico.2007.01.015","article-title":"The Daikon system for dynamic detection of likely invariants","volume":"69","author":"Ernst","year":"2007","journal-title":"Sci. Comput. Program."},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Gao, S., Wen, X., Gao, C., Wang, W., Zhang, H., and Lyu, M.R. (2023, January 11\u201315). What Makes Good In-Context Demonstrations for Code Intelligence Tasks with LLMs?. Proceedings of the 38th IEEE\/ACM International Conference on Automated Software Engineering, ASE 2023, Luxembourg.","DOI":"10.1109\/ASE56229.2023.00109"},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Pacheco, C., Lahiri, S.K., Ernst, M.D., and Ball, T. (2007, January 20\u201326). Feedback-Directed Random Test Generation. Proceedings of the International Conference on Software Engineering (ICSE), Minneapolis, MN, USA.","DOI":"10.1109\/ICSE.2007.37"},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Lukasczyk, S., and Fraser, G. (2022, January 21\u201329). Pynguin: Automated unit test generation for python. Proceedings of the ACM\/IEEE 44th International Conference on Software Engineering: Companion Proceedings, Pittsburgh, PA, USA.","DOI":"10.1145\/3510454.3516829"},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"Mastropaolo, A., Scalabrino, S., Cooper, N., Nader-Palacio, D., Poshyvanyk, D., Oliveto, R., and Bavota, G. (2021, January 22\u201330). Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks. Proceedings of the 43rd IEEE\/ACM International Conference on Software Engineering, ICSE 2021, Madrid, Spain.","DOI":"10.1109\/ICSE43902.2021.00041"},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Nie, P., Banerjee, R., Li, J.J., Mooney, R.J., and Gligoric, M. (2023, January 14\u201320). Learning Deep Semantics for Test Completion. Proceedings of the 45th IEEE\/ACM International Conference on Software Engineering, ICSE 2023, Melbourne, Australia.","DOI":"10.1109\/ICSE48619.2023.00178"},{"key":"ref_14","unstructured":"Watson, C., Tufano, M., Moran, K., Bavota, G., and Poshyvanyk, D. (July, January 27). On learning meaningful assert statements for unit test cases. Proceedings of the ICSE \u201920: 42nd International Conference on Software Engineering, Seoul, Republic of Korea."},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Chen, Y., Hu, Z., Zhi, C., Han, J., Deng, S., and Yin, J. (2024, January 15\u201319). Chatunitest: A framework for llm-based test generation. Proceedings of the Companion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering, Porto de Galinhas, Brazil.","DOI":"10.1145\/3663529.3663801"},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Peng, Y., Wang, C., Wang, W., Gao, C., and Lyu, M.R. (2023). Generative Type Inference for Python. arXiv.","DOI":"10.1109\/ASE56229.2023.00031"},{"key":"ref_17","unstructured":"(2024, July 30). ChatGPT. Available online: https:\/\/chat.openai.com\/."},{"key":"ref_18","unstructured":"(2024, July 30). CodeLlama. Available online: https:\/\/ollama.com\/library\/codellama."},{"key":"ref_19","unstructured":"(2024, July 30). DeepSeek. Available online: https:\/\/www.deepseek.com\/."},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"34","DOI":"10.1109\/MS.2025.3549628","article-title":"From code generation to software testing: AI Copilot with context-based RAG","volume":"42","author":"Wang","year":"2025","journal-title":"IEEE Softw."},{"key":"ref_21","first-page":"27730","article-title":"Training language models to follow instructions with human feedback","volume":"35","author":"Ouyang","year":"2022","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Wong, M.F., and Tan, C.W. (2024). Aligning crowd-sourced human feedback for reinforcement learning on code generation by large language models. IEEE Trans. Big Data, 1\u201312.","DOI":"10.1109\/TBDATA.2024.3524104"}],"container-title":["Entropy"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1099-4300\/28\/1\/74\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,1,9]],"date-time":"2026-01-09T09:26:48Z","timestamp":1767950808000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1099-4300\/28\/1\/74"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,1,9]]},"references-count":22,"journal-issue":{"issue":"1","published-online":{"date-parts":[[2026,1]]}},"alternative-id":["e28010074"],"URL":"https:\/\/doi.org\/10.3390\/e28010074","relation":{},"ISSN":["1099-4300"],"issn-type":[{"value":"1099-4300","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,1,9]]}}}