{"id":{"repo_id":"oxford-brookes","oai_identifier":"tle:57c10d80-1ac4-4d30-bc58-a1a320c8bebc:d6bd9758-527a-46cd-bfe2-c433766e8fca:1"},"canonical_url":"https://search.dev.ndltd.org/etd/oxford-brookes/tle:57c10d80-1ac4-4d30-bc58-a1a320c8bebc:d6bd9758-527a-46cd-bfe2-c433766e8fca:1","repository":{"repo_id":"oxford-brookes","name":"Oxford Brookes University","base_url":"https://radar.brookes.ac.uk/radar/oai"},"display":{"title":"Testing and evaluation of machine learning’s capability of generating program code","abstract":"With rapid advances in machine learning, large language models (LLMs) are increasingly used for code generation, yet systematically evaluating their capabilities remains challenging. This thesis proposes a datamorphic, scenario-based testing framework for LLM code generation, featuring an extensible and automatable system that integrates diverse analysis tools. Based on this framework, the thesis evaluates multiple quality attributes, including functional correctness, syntactic closeness, code complexity, and code smells, and further examines usability in multi-attempt code generation and robustness of LLMs. Overall, this thesis moves the field, from single-score evaluation to scenario-aware, multi-attribute, automated testing. Extensive experiments demonstrate the framework’s effectiveness and reveal previously unreported behaviors of state-of-the-art LLMs. To support scenario-based evaluation, this work introduces ScenEval, a large-scale benchmark of 12,864 Java programming tasks with reference solutions and metadata. A bidirectional JUnit-based testing framework is proposed to detect both omission and commission errors, improving the reliability of functional correctness evaluation. Motivated by Ziegler et al.’s observation that developers value a code’s potential for further development, this thesis investigates syntactic closeness with respect to user intent. Results show that structural similarity metrics based on ASTs, DFGs, and PDGs strongly correlate with functional correctness, making them effective measures of syntactic closeness. The thesis also presents a systematic analysis of code complexity and code smells in LLM-generated programs. Using size-based, cyclomatic, and cognitive metrics, it finds that correctly generated code is often more complex than professional reference solutions, while incorrect code from some models tends to be simpler. Moreover, LLM-generated programs exhibit more code smell violations, which increase with task complexity. For robustness evaluation, the thesis introduces scenario domain analysis, a micro-level method showing that state-of-the-art LLMs remain robust under mild paraphrasing of task descriptions. Finally, the usability in multi-attempt generation process is automated using functional correctness and code smell feedback for prompt refinement and termination. Results indicate that while LLMs are usable for simpler tasks, usability degrades significantly for advanced and high-complexity programming tasks.","abstract_html":"With rapid advances in machine learning, large language models (LLMs) are increasingly used for code generation, yet systematically evaluating their capabilities remains challenging. This thesis proposes a datamorphic, scenario-based testing framework for LLM code generation, featuring an extensible and automatable system that integrates diverse analysis tools. Based on this framework, the thesis evaluates multiple quality attributes, including functional correctness, syntactic closeness, code complexity, and code smells, and further examines usability in multi-attempt code generation and robustness of LLMs. Overall, this thesis moves the field, from single-score evaluation to scenario-aware, multi-attribute, automated testing. Extensive experiments demonstrate the framework’s effectiveness and reveal previously unreported behaviors of state-of-the-art LLMs. To support scenario-based evaluation, this work introduces ScenEval, a large-scale benchmark of 12,864 Java programming tasks with reference solutions and metadata. A bidirectional JUnit-based testing framework is proposed to detect both omission and commission errors, improving the reliability of functional correctness evaluation. Motivated by Ziegler et al.’s observation that developers value a code’s potential for further development, this thesis investigates syntactic closeness with respect to user intent. Results show that structural similarity metrics based on ASTs, DFGs, and PDGs strongly correlate with functional correctness, making them effective measures of syntactic closeness. The thesis also presents a systematic analysis of code complexity and code smells in LLM-generated programs. Using size-based, cyclomatic, and cognitive metrics, it finds that correctly generated code is often more complex than professional reference solutions, while incorrect code from some models tends to be simpler. Moreover, LLM-generated programs exhibit more code smell violations, which increase with task complexity. For robustness evaluation, the thesis introduces scenario domain analysis, a micro-level method showing that state-of-the-art LLMs remain robust under mild paraphrasing of task descriptions. Finally, the usability in multi-attempt generation process is automated using functional correctness and code smell feedback for prompt refinement and termination. Results indicate that while LLMs are usable for simpler tasks, usability degrades significantly for advanced and high-complexity programming tasks.","abstract_has_math":false,"creators":["Ghosh Paul, Debalina"],"institution":"Oxford Brookes University","degree_name":null,"degree_level":null,"degree_discipline":null,"degree_department":null,"school":null,"contributors":["Zhu, Hong","Bayley, Ian"],"advisors":[],"committee_chairs":[],"committee_members":[],"year":null,"date_issued":"","date_published":null,"updated_at":"2026-07-24T03:42:02Z","subjects":[],"languages":["en"],"rights":["All rights reserved"],"rights_urls":[],"identifier_entries":[]},"links":{"outbound_url":"https://doi.org/10.24384/h46a-zg76","outbound_label":"DOI","outbound_source":"dc:identifier"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor","label":"Contributor","values":["Ghosh Paul, Debalina","Zhu, Hong","Bayley, Ian"]},{"key":"dc:creator","label":"Author","values":["Ghosh Paul, Debalina"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:publisher","label":"Institution","values":["Oxford Brookes University"]},{"key":"dc:type","label":"Dc Type","values":["thesis"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["All rights reserved"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://doi.org/10.24384/h46a-zg76","https://radar.brookes.ac.uk/radar/file/57c10d80-1ac4-4d30-bc58-a1a320c8bebc/1/Thesis_LLM Evaluation On Code Generation_Debalina Ghosh Paul.pdf"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["With rapid advances in machine learning, large language models (LLMs) are increasingly used for code generation, yet systematically evaluating their capabilities remains challenging. This thesis proposes a datamorphic, scenario-based testing framework for LLM code generation, featuring an extensible and automatable system that integrates diverse analysis tools. Based on this framework, the thesis evaluates multiple quality attributes, including functional correctness, syntactic closeness, code complexity, and code smells, and further examines usability in multi-attempt code generation and robustness of LLMs. Overall, this thesis moves the field, from single-score evaluation to scenario-aware, multi-attribute, automated testing. Extensive experiments demonstrate the framework’s effectiveness and reveal previously unreported behaviors of state-of-the-art LLMs. To support scenario-based evaluation, this work introduces ScenEval, a large-scale benchmark of 12,864 Java programming tasks with reference solutions and metadata. A bidirectional JUnit-based testing framework is proposed to detect both omission and commission errors, improving the reliability of functional correctness evaluation. Motivated by Ziegler et al.’s observation that developers value a code’s potential for further development, this thesis investigates syntactic closeness with respect to user intent. Results show that structural similarity metrics based on ASTs, DFGs, and PDGs strongly correlate with functional correctness, making them effective measures of syntactic closeness. The thesis also presents a systematic analysis of code complexity and code smells in LLM-generated programs. Using size-based, cyclomatic, and cognitive metrics, it finds that correctly generated code is often more complex than professional reference solutions, while incorrect code from some models tends to be simpler. Moreover, LLM-generated programs exhibit more code smell violations, which increase with task complexity. For robustness evaluation, the thesis introduces scenario domain analysis, a micro-level method showing that state-of-the-art LLMs remain robust under mild paraphrasing of task descriptions. Finally, the usability in multi-attempt generation process is automated using functional correctness and code smell feedback for prompt refinement and termination. Results indicate that while LLMs are usable for simpler tasks, usability degrades significantly for advanced and high-complexity programming tasks."]},{"key":"dc:format","label":"Dc Format","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Testing and evaluation of machine learning’s capability of generating program code"]}]}],"canonical_facts":{"dc:contributor":["Ghosh Paul, Debalina","Zhu, Hong","Bayley, Ian"],"dc:creator":["Ghosh Paul, Debalina"],"dc:description":["With rapid advances in machine learning, large language models (LLMs) are increasingly used for code generation, yet systematically evaluating their capabilities remains challenging. This thesis proposes a datamorphic, scenario-based testing framework for LLM code generation, featuring an extensible and automatable system that integrates diverse analysis tools. Based on this framework, the thesis evaluates multiple quality attributes, including functional correctness, syntactic closeness, code complexity, and code smells, and further examines usability in multi-attempt code generation and robustness of LLMs. Overall, this thesis moves the field, from single-score evaluation to scenario-aware, multi-attribute, automated testing. Extensive experiments demonstrate the framework’s effectiveness and reveal previously unreported behaviors of state-of-the-art LLMs. To support scenario-based evaluation, this work introduces ScenEval, a large-scale benchmark of 12,864 Java programming tasks with reference solutions and metadata. A bidirectional JUnit-based testing framework is proposed to detect both omission and commission errors, improving the reliability of functional correctness evaluation. Motivated by Ziegler et al.’s observation that developers value a code’s potential for further development, this thesis investigates syntactic closeness with respect to user intent. Results show that structural similarity metrics based on ASTs, DFGs, and PDGs strongly correlate with functional correctness, making them effective measures of syntactic closeness. The thesis also presents a systematic analysis of code complexity and code smells in LLM-generated programs. Using size-based, cyclomatic, and cognitive metrics, it finds that correctly generated code is often more complex than professional reference solutions, while incorrect code from some models tends to be simpler. Moreover, LLM-generated programs exhibit more code smell violations, which increase with task complexity. For robustness evaluation, the thesis introduces scenario domain analysis, a micro-level method showing that state-of-the-art LLMs remain robust under mild paraphrasing of task descriptions. Finally, the usability in multi-attempt generation process is automated using functional correctness and code smell feedback for prompt refinement and termination. Results indicate that while LLMs are usable for simpler tasks, usability degrades significantly for advanced and high-complexity programming tasks."],"dc:format":["application/pdf"],"dc:identifier":["https://doi.org/10.24384/h46a-zg76","https://radar.brookes.ac.uk/radar/file/57c10d80-1ac4-4d30-bc58-a1a320c8bebc/1/Thesis_LLM Evaluation On Code Generation_Debalina Ghosh Paul.pdf"],"dc:language":["en"],"dc:publisher":["Oxford Brookes University"],"dc:rights":["All rights reserved"],"dc:title":["Testing and evaluation of machine learning’s capability of generating program code"],"dc:type":["thesis"]},"updated_at":"2026-07-24T03:42:02Z"}