{"id":{"repo_id":"ohiolink","oai_identifier":"oai:etd.ohiolink.edu:miami1784763275584884"},"canonical_url":"https://search.ndltd.org/etd/ohiolink/oai:etd.ohiolink.edu:miami1784763275584884","repository":{"repo_id":"ohiolink","name":"OhioLINK","base_url":"https://etd.ohiolink.edu/acprod/odb_etd/ws/oai/oai"},"display":{"title":"Evaluating Iterative Feedback Mechanisms for Secure and Functional LLM Code Generation","abstract":"The increasing adoption of Large Language Models (LLMs) as software development assistants has transformed modern programming by enabling developers to generate complete applications from natural language specifications. Despite their impressive capabilities, LLM-generated code frequently contains security vulnerabilities and functional defects that limit its safe deployment in real-world systems. This thesis investigates whether iterative feedback mechanisms can improve the security and functional correctness of LLM-generated backend applications. Two refinement strategies are evaluated: static-analysis-driven refinement using the Bandit security scanner and execution-based refinement using automated functional and security test suites. Experiments were conducted using five frontier language models, Claude Sonnet 4.5, Claude Opus 4.7, GPT-4o, GPT-5, and GPT-5.5, on the BaxBench and SecCodePLT benchmark datasets. Results demonstrate that execution-based unit-test feedback consistently improves both functional correctness (pass@1) and secure functional correctness (sec-pass@1) across all evaluated models, with several models achieving over 90% sec-pass@1 on BaxBench. In contrast, static-analysis-driven refinement generally produced limited improvements and, in several cases, reduced functional correctness despite identifying potential vulnerabilities. These findings demonstrate that execution-based iterative refinement is substantially more effective than static-analysis-driven refinement for improving LLM-generated code and highlight the importance of incorporating automated execution feedback into AI-assisted software development workflows.","abstract_html":"The increasing adoption of Large Language Models (LLMs) as software development assistants has transformed modern programming by enabling developers to generate complete applications from natural language specifications. Despite their impressive capabilities, LLM-generated code frequently contains security vulnerabilities and functional defects that limit its safe deployment in real-world systems. This thesis investigates whether iterative feedback mechanisms can improve the security and functional correctness of LLM-generated backend applications. Two refinement strategies are evaluated: static-analysis-driven refinement using the Bandit security scanner and execution-based refinement using automated functional and security test suites. Experiments were conducted using five frontier language models, Claude Sonnet 4.5, Claude Opus 4.7, GPT-4o, GPT-5, and GPT-5.5, on the BaxBench and SecCodePLT benchmark datasets. Results demonstrate that execution-based unit-test feedback consistently improves both functional correctness (pass@1) and secure functional correctness (sec-pass@1) across all evaluated models, with several models achieving over 90% sec-pass@1 on BaxBench. In contrast, static-analysis-driven refinement generally produced limited improvements and, in several cases, reduced functional correctness despite identifying potential vulnerabilities. These findings demonstrate that execution-based iterative refinement is substantially more effective than static-analysis-driven refinement for improving LLM-generated code and highlight the importance of incorporating automated execution feedback into AI-assisted software development workflows.","abstract_has_math":false,"creators":["Acharya, Prashant"],"institution":"Miami University","degree_name":"Master of Science in Computer Science","degree_level":"masters","degree_discipline":"Computer Science","degree_department":null,"school":null,"contributors":[],"advisors":["Walden, James"],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026-07-28","date_published":"2026-07-28","updated_at":"2026-11-27T05:03:15Z","subjects":["Computer Science","Engineering","Artificial Intelligence","Large Language Models, LLMs, Secure Code Generation, Iterative Refinement, Automated Feedback, Test-Driven Refinement, Static Analysis, Software Security, Cybersecurity, Prompt Engineering, Code Generation, Artificial Intelligence, Machine Learning, Bandit, Secure Software Engineering, Large Language Model Security, Automated Program Repair"],"languages":["English"],"rights":["restricted--full text unavailable until 2028-07-28","This thesis or dissertation is protected by copyright: all rights reserved. It may not be copied or redistributed beyond the terms of applicable copyright laws."],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"http://rave.ohiolink.edu/etdc/view?acc_num=miami1784763275584884","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"http://rave.ohiolink.edu/etdc/view?acc_num=miami1784763275584884","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Aohiolink%3Aoai%3Aetd.ohiolink.edu%3Amiami1784763275584884","prefix":"oai_dc"},"source_record":{"url":"https://etd.ohiolink.edu/acprod/odb_etd/ws/oai/oai?verb=GetRecord&metadataPrefix=oai_etdms&identifier=oai%3Aetd.ohiolink.edu%3Amiami1784763275584884","prefix":"oai_etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Walden, James"]},{"key":"dc:creator","label":"Author","values":["Acharya, Prashant"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2026-07-28"]},{"key":"dc:publisher","label":"Institution","values":["Miami University / OhioLINK"]},{"key":"dc:type","label":"Dc Type","values":["Electronic Thesis or Dissertation"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Computer Science"]},{"key":"thesis:degree_level","label":"Degree Level","values":["masters"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science in Computer Science"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Miami University"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Computer Science","Engineering","Artificial Intelligence","Large Language Models, LLMs, Secure Code Generation, Iterative Refinement, Automated Feedback, Test-Driven Refinement, Static Analysis, Software Security, Cybersecurity, Prompt Engineering, Code Generation, Artificial Intelligence, Machine Learning, Bandit, Secure Software Engineering, Large Language Model Security, Automated Program Repair"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["English"]},{"key":"dc:rights","label":"Dc Rights","values":["restricted--full text unavailable until 2028-07-28","This thesis or dissertation is protected by copyright: all rights reserved. It may not be copied or redistributed beyond the terms of applicable copyright laws."]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["http://rave.ohiolink.edu/etdc/view?acc_num=miami1784763275584884"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["The increasing adoption of Large Language Models (LLMs) as software development assistants has transformed modern programming by enabling developers to generate complete applications from natural language specifications. Despite their impressive capabilities, LLM-generated code frequently contains security vulnerabilities and functional defects that limit its safe deployment in real-world systems. This thesis investigates whether iterative feedback mechanisms can improve the security and functional correctness of LLM-generated backend applications. Two refinement strategies are evaluated: static-analysis-driven refinement using the Bandit security scanner and execution-based refinement using automated functional and security test suites. Experiments were conducted using five frontier language models, Claude Sonnet 4.5, Claude Opus 4.7, GPT-4o, GPT-5, and GPT-5.5, on the BaxBench and SecCodePLT benchmark datasets. Results demonstrate that execution-based unit-test feedback consistently improves both functional correctness (pass@1) and secure functional correctness (sec-pass@1) across all evaluated models, with several models achieving over 90% sec-pass@1 on BaxBench. In contrast, static-analysis-driven refinement generally produced limited improvements and, in several cases, reduced functional correctness despite identifying potential vulnerabilities. These findings demonstrate that execution-based iterative refinement is substantially more effective than static-analysis-driven refinement for improving LLM-generated code and highlight the importance of incorporating automated execution feedback into AI-assisted software development workflows."]},{"key":"dc:format","label":"Dc Format","values":["application/pdf","p.90","6.02 MB"]},{"key":"dc:title","label":"Title","values":["Evaluating Iterative Feedback Mechanisms for Secure and Functional LLM Code Generation"]}]}],"canonical_facts":{"dc:contributor.advisor":["Walden, James"],"dc:creator":["Acharya, Prashant"],"dc:date":["2026-07-28"],"dc:description":["The increasing adoption of Large Language Models (LLMs) as software development assistants has transformed modern programming by enabling developers to generate complete applications from natural language specifications. Despite their impressive capabilities, LLM-generated code frequently contains security vulnerabilities and functional defects that limit its safe deployment in real-world systems. This thesis investigates whether iterative feedback mechanisms can improve the security and functional correctness of LLM-generated backend applications. Two refinement strategies are evaluated: static-analysis-driven refinement using the Bandit security scanner and execution-based refinement using automated functional and security test suites. Experiments were conducted using five frontier language models, Claude Sonnet 4.5, Claude Opus 4.7, GPT-4o, GPT-5, and GPT-5.5, on the BaxBench and SecCodePLT benchmark datasets. Results demonstrate that execution-based unit-test feedback consistently improves both functional correctness (pass@1) and secure functional correctness (sec-pass@1) across all evaluated models, with several models achieving over 90% sec-pass@1 on BaxBench. In contrast, static-analysis-driven refinement generally produced limited improvements and, in several cases, reduced functional correctness despite identifying potential vulnerabilities. These findings demonstrate that execution-based iterative refinement is substantially more effective than static-analysis-driven refinement for improving LLM-generated code and highlight the importance of incorporating automated execution feedback into AI-assisted software development workflows."],"dc:format":["application/pdf","p.90","6.02 MB"],"dc:identifier":["http://rave.ohiolink.edu/etdc/view?acc_num=miami1784763275584884"],"dc:language":["English"],"dc:publisher":["Miami University / OhioLINK"],"dc:rights":["restricted--full text unavailable until 2028-07-28","This thesis or dissertation is protected by copyright: all rights reserved. It may not be copied or redistributed beyond the terms of applicable copyright laws."],"dc:subject":["Computer Science","Engineering","Artificial Intelligence","Large Language Models, LLMs, Secure Code Generation, Iterative Refinement, Automated Feedback, Test-Driven Refinement, Static Analysis, Software Security, Cybersecurity, Prompt Engineering, Code Generation, Artificial Intelligence, Machine Learning, Bandit, Secure Software Engineering, Large Language Model Security, Automated Program Repair"],"dc:title":["Evaluating Iterative Feedback Mechanisms for Secure and Functional LLM Code Generation"],"dc:type":["Electronic Thesis or Dissertation"],"thesis:degree_discipline":["Computer Science"],"thesis:degree_level":["masters"],"thesis:degree_name":["Master of Science in Computer Science"],"thesis:institution_name":["Miami University"]},"updated_at":"2026-11-27T05:03:15Z"}