Date of Award
8-2025
Document Type
Thesis
Degree Name
Master of Science (MS)
College/School
School of Computing
Department/Program
School of Computing
Thesis Sponsor/Dissertation Chair/Project Chair
Kazi Zakia Sultana
Committee Member
John Jenq
Committee Member
Raina Samuel
Abstract
AI-generated code, while rapidly producing functional solutions, often falls short in aspects like comprehensive error handling, robust documentation, and optimal architectural design, areas where human expertise excels. Conversely, humans can greatly benefit from AI's rapid code generation capabilities. This project proposes and evaluates "A Framework to Improve Code Quality by Utilizing Generative AI Coding Along With Human-Written Code", designed to create a synergy between AI and human intelligence for enhanced software development. Conducted over four weeks, the research leverages BigCodeBench as its core dataset to rigorously investigate how human intervention can improve AI-generated code quality, identify the most effective human-AI collaboration patterns, and determine the optimal balance between human effort and quality improvement. The framework explores three distinct collaboration models: AI-First Refinement, where AI generates and humans refine; Human-Guided Generation, with human-defined structure and quality requirements; and Iterative Co-Creation, involving repetitive AI generation and human modification. Code quality is quantified using a comprehensive suite of automated static analysis metrics, including Cyclomatic Complexity, Lines of Code, and PEP 8 compliance, complemented by LLM-as-a-Judge evaluations assessing readability, maintainability, robustness, and efficiency. A key success criterion is achieving a ≥25% improvement in code quality metrics with < 5 minutes of human input per task. Initial analyses suggest significant improvements in code robustness and maintainability through collaborative refinement. This thesis details the framework's architecture, methodologies, and empirical results, contributing valuable insights into effective human-AI collaboration for superior code quality.
File Format
Recommended Citation
Ravi, Siddhardha, "Human-AI-Collaboration-For-Coding" (2025). Theses, Dissertations and Culminating Projects. 1580.
https://digitalcommons.montclair.edu/etd/1580