{"id":{"repo_id":"sask","oai_identifier":"oai:harvest.usask.ca:10388/17566"},"canonical_url":"https://search.ndltd.org/etd/sask/oai:harvest.usask.ca:10388/17566","repository":{"repo_id":"sask","name":"University of Saskatchewan","base_url":"https://harvest.usask.ca/server/oai/request"},"display":{"title":"Large Language Models for Code Generation and Program Comprehension: Exploring Capabilities, Context, and Developer Adaptation","abstract":"Program comprehension and code generation are central to modern software engineering, influencing tasks such as problem solving, documentation, and long-term maintenance. With the rapid advancement of Large Language Models (LLMs), understanding their capabilities across both code generation and comprehensionoriented activities has become a core research priority. This thesis examines the role of LLMs in supporting software development through three interconnected empirical studies, spanning code generation, contextual understanding, and developer-adaptive summarization. The first study evaluates the code generation, and problem-solving abilities of advanced LLMs across competitive programming platforms, including LeetCode, Codeforces, and HackerRank. Using 224 problems spanning 15 categories, we compare three conversational LLMs, ChatGPT, Gemini, and Meta AI, against human programmers. Results show that LLMs achieved a 71.43% success rate on structured LeetCode problems and performed competitively in reasoning-based tasks, demonstrating human-comparable comprehension of programming logic, control flow, and problem intent. While their performance declines on more complicated, time-constrained challenges, the findings confirm that LLMs possess foundational semantic understanding essential for higher-level comprehension tasks such as summarization and documentation generation. The second study introduces HelpCOM, a dependency-aware method-level comment generation technique designed to address the contextual limitations of existing models. Analyzing 647K Java methods from ten popular GitHub repositories, we found that dependent methods constitute 69.25% of all methods and are more change-prone than independent ones. Experimental results show that HelpCOM outperforms state-ofthe-art baselines (e.g., CodeT5+, CodeBERT, and ASAP) by 5.6%–50.4% across syntactic, semantic, and LLM-based evaluation metrics. A practitioner survey involving 156 developers further confirmed HelpCOM’s effectiveness in producing more complete and comprehensible documentation for dependent methods. The third study extends this work toward Developer-Adaptive Code Summarization, where summaries are personalized to the reader’s expertise level. Adaptive prompts were integrated into GitHub Copilot Chat, enabling real-time generation of novice- and expert-oriented summaries. Semantic similarity analysis showed strong alignment between Copilot-based and API-based outputs (69% for novice and 77% for expert summaries). Additionally, interviews with five experienced developers validated the approach’s practicality and usefulness, noting that adaptive summaries enhanced clarity, reduced cognitive effort, and improved integration into daily workflows. Collectively, these studies offer a comprehensive perspective on how LLMs can support both code generation and program comprehension, from solving complex programming tasks to generating context-aware and expertise-adaptive documentation. The results highlight the promise and current limitations of LLMs, paving the way for future research on building intelligent, context-sensitive, and human-aligned tools for software engineering.","abstract_html":"Program comprehension and code generation are central to modern software engineering, influencing tasks such as problem solving, documentation, and long-term maintenance. With the rapid advancement of Large Language Models (LLMs), understanding their capabilities across both code generation and comprehensionoriented activities has become a core research priority. This thesis examines the role of LLMs in supporting software development through three interconnected empirical studies, spanning code generation, contextual understanding, and developer-adaptive summarization. The first study evaluates the code generation, and problem-solving abilities of advanced LLMs across competitive programming platforms, including LeetCode, Codeforces, and HackerRank. Using 224 problems spanning 15 categories, we compare three conversational LLMs, ChatGPT, Gemini, and Meta AI, against human programmers. Results show that LLMs achieved a 71.43% success rate on structured LeetCode problems and performed competitively in reasoning-based tasks, demonstrating human-comparable comprehension of programming logic, control flow, and problem intent. While their performance declines on more complicated, time-constrained challenges, the findings confirm that LLMs possess foundational semantic understanding essential for higher-level comprehension tasks such as summarization and documentation generation. The second study introduces HelpCOM, a dependency-aware method-level comment generation technique designed to address the contextual limitations of existing models. Analyzing 647K Java methods from ten popular GitHub repositories, we found that dependent methods constitute 69.25% of all methods and are more change-prone than independent ones. Experimental results show that HelpCOM outperforms state-ofthe-art baselines (e.g., CodeT5+, CodeBERT, and ASAP) by 5.6%–50.4% across syntactic, semantic, and LLM-based evaluation metrics. A practitioner survey involving 156 developers further confirmed HelpCOM’s effectiveness in producing more complete and comprehensible documentation for dependent methods. The third study extends this work toward Developer-Adaptive Code Summarization, where summaries are personalized to the reader’s expertise level. Adaptive prompts were integrated into GitHub Copilot Chat, enabling real-time generation of novice- and expert-oriented summaries. Semantic similarity analysis showed strong alignment between Copilot-based and API-based outputs (69% for novice and 77% for expert summaries). Additionally, interviews with five experienced developers validated the approach’s practicality and usefulness, noting that adaptive summaries enhanced clarity, reduced cognitive effort, and improved integration into daily workflows. Collectively, these studies offer a comprehensive perspective on how LLMs can support both code generation and program comprehension, from solving complex programming tasks to generating context-aware and expertise-adaptive documentation. The results highlight the promise and current limitations of LLMs, paving the way for future research on building intelligent, context-sensitive, and human-aligned tools for software engineering.","abstract_has_math":false,"creators":["Billah, Md Mustakim"],"institution":"University of Saskatchewan","degree_name":"Master of Science (M.Sc.)","degree_level":"Masters","degree_discipline":"Computer Science","degree_department":"Computer Science","school":null,"contributors":[],"advisors":["Roy, Banani"],"committee_chairs":[],"committee_members":["Yeh, Yen-Ting (Allen)","Eager, Derek"],"year":2025,"date_issued":"2025-11-25","date_published":"2025-11-25","updated_at":"2026-11-19T10:12:45Z","subjects":["Program Comprehension","Code Generation"],"languages":["en"],"rights":[],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[{"key":"person:identifier.orcid","label":"ORCID","values":["0009-0007-0654-151X"],"render_values":[{"text":"0009-0007-0654-151X","href":"https://orcid.org/0009-0007-0654-151X","code":true}]}]},"links":{"outbound_url":"https://hdl.handle.net/10388/17566","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/10388/17566","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","download_url":null,"download_label":null,"download_source":null,"access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"https://harvest.usask.ca/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Aharvest.usask.ca%3A10388%2F17566","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Roy, Banani"]},{"key":"dc:contributor.committeemember","label":"Committee Member","values":["Yeh, Yen-Ting (Allen)","Eager, Derek"]},{"key":"dc:creator","label":"Author","values":["Billah, Md Mustakim"]},{"key":"person:identifier.orcid","label":"ORCID","values":["0009-0007-0654-151X"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2025-11-25T21:22:55Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2025-11-25T21:22:55Z"]},{"key":"dc:date.copyright","label":"Dc Date Copyright","values":["2025"]},{"key":"dc:date.created","label":"Dc Date Created","values":["2025-11"]},{"key":"dc:date.issued","label":"Date","values":["2025-11-25"]},{"key":"dc:date.submitted","label":"Dc Date Submitted","values":["November 2025"]},{"key":"dc:date.updated","label":"Dc Date Updated","values":["2025-11-25T21:22:56Z"]},{"key":"dc:type","label":"Dc Type","values":["Thesis","text"]},{"key":"thesis:degree_department","label":"Department","values":["Computer Science"]},{"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 (M.Sc.)"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["University of Saskatchewan"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Program Comprehension","Code Generation"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/10388/17566"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Program comprehension and code generation are central to modern software engineering, influencing tasks such as problem solving, documentation, and long-term maintenance. With the rapid advancement of Large Language Models (LLMs), understanding their capabilities across both code generation and comprehensionoriented activities has become a core research priority. This thesis examines the role of LLMs in supporting software development through three interconnected empirical studies, spanning code generation, contextual understanding, and developer-adaptive summarization. The first study evaluates the code generation, and problem-solving abilities of advanced LLMs across competitive programming platforms, including LeetCode, Codeforces, and HackerRank. Using 224 problems spanning 15 categories, we compare three conversational LLMs, ChatGPT, Gemini, and Meta AI, against human programmers. Results show that LLMs achieved a 71.43% success rate on structured LeetCode problems and performed competitively in reasoning-based tasks, demonstrating human-comparable comprehension of programming logic, control flow, and problem intent. While their performance declines on more complicated, time-constrained challenges, the findings confirm that LLMs possess foundational semantic understanding essential for higher-level comprehension tasks such as summarization and documentation generation. The second study introduces HelpCOM, a dependency-aware method-level comment generation technique designed to address the contextual limitations of existing models. Analyzing 647K Java methods from ten popular GitHub repositories, we found that dependent methods constitute 69.25% of all methods and are more change-prone than independent ones. Experimental results show that HelpCOM outperforms state-ofthe-art baselines (e.g., CodeT5+, CodeBERT, and ASAP) by 5.6%–50.4% across syntactic, semantic, and LLM-based evaluation metrics. A practitioner survey involving 156 developers further confirmed HelpCOM’s effectiveness in producing more complete and comprehensible documentation for dependent methods. The third study extends this work toward Developer-Adaptive Code Summarization, where summaries are personalized to the reader’s expertise level. Adaptive prompts were integrated into GitHub Copilot Chat, enabling real-time generation of novice- and expert-oriented summaries. Semantic similarity analysis showed strong alignment between Copilot-based and API-based outputs (69% for novice and 77% for expert summaries). Additionally, interviews with five experienced developers validated the approach’s practicality and usefulness, noting that adaptive summaries enhanced clarity, reduced cognitive effort, and improved integration into daily workflows. Collectively, these studies offer a comprehensive perspective on how LLMs can support both code generation and program comprehension, from solving complex programming tasks to generating context-aware and expertise-adaptive documentation. The results highlight the promise and current limitations of LLMs, paving the way for future research on building intelligent, context-sensitive, and human-aligned tools for software engineering."]},{"key":"dc:format.mimetype","label":"Dc Format Mimetype","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Large Language Models for Code Generation and Program Comprehension: Exploring Capabilities, Context, and Developer Adaptation"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.advisor":["Roy, Banani"],"dc:contributor.committeemember":["Yeh, Yen-Ting (Allen)","Eager, Derek"],"dc:creator":["Billah, Md Mustakim"],"dc:date.accessioned":["2025-11-25T21:22:55Z"],"dc:date.available":["2025-11-25T21:22:55Z"],"dc:date.copyright":["2025"],"dc:date.created":["2025-11"],"dc:date.issued":["2025-11-25"],"dc:date.submitted":["November 2025"],"dc:date.updated":["2025-11-25T21:22:56Z"],"dc:description.abstract":["Program comprehension and code generation are central to modern software engineering, influencing tasks such as problem solving, documentation, and long-term maintenance. With the rapid advancement of Large Language Models (LLMs), understanding their capabilities across both code generation and comprehensionoriented activities has become a core research priority. This thesis examines the role of LLMs in supporting software development through three interconnected empirical studies, spanning code generation, contextual understanding, and developer-adaptive summarization. The first study evaluates the code generation, and problem-solving abilities of advanced LLMs across competitive programming platforms, including LeetCode, Codeforces, and HackerRank. Using 224 problems spanning 15 categories, we compare three conversational LLMs, ChatGPT, Gemini, and Meta AI, against human programmers. Results show that LLMs achieved a 71.43% success rate on structured LeetCode problems and performed competitively in reasoning-based tasks, demonstrating human-comparable comprehension of programming logic, control flow, and problem intent. While their performance declines on more complicated, time-constrained challenges, the findings confirm that LLMs possess foundational semantic understanding essential for higher-level comprehension tasks such as summarization and documentation generation. The second study introduces HelpCOM, a dependency-aware method-level comment generation technique designed to address the contextual limitations of existing models. Analyzing 647K Java methods from ten popular GitHub repositories, we found that dependent methods constitute 69.25% of all methods and are more change-prone than independent ones. Experimental results show that HelpCOM outperforms state-ofthe-art baselines (e.g., CodeT5+, CodeBERT, and ASAP) by 5.6%–50.4% across syntactic, semantic, and LLM-based evaluation metrics. A practitioner survey involving 156 developers further confirmed HelpCOM’s effectiveness in producing more complete and comprehensible documentation for dependent methods. The third study extends this work toward Developer-Adaptive Code Summarization, where summaries are personalized to the reader’s expertise level. Adaptive prompts were integrated into GitHub Copilot Chat, enabling real-time generation of novice- and expert-oriented summaries. Semantic similarity analysis showed strong alignment between Copilot-based and API-based outputs (69% for novice and 77% for expert summaries). Additionally, interviews with five experienced developers validated the approach’s practicality and usefulness, noting that adaptive summaries enhanced clarity, reduced cognitive effort, and improved integration into daily workflows. Collectively, these studies offer a comprehensive perspective on how LLMs can support both code generation and program comprehension, from solving complex programming tasks to generating context-aware and expertise-adaptive documentation. The results highlight the promise and current limitations of LLMs, paving the way for future research on building intelligent, context-sensitive, and human-aligned tools for software engineering."],"dc:format.mimetype":["application/pdf"],"dc:identifier.uri":["https://hdl.handle.net/10388/17566"],"dc:language.iso":["en"],"dc:subject":["Program Comprehension","Code Generation"],"dc:title":["Large Language Models for Code Generation and Program Comprehension: Exploring Capabilities, Context, and Developer Adaptation"],"dc:type":["Thesis","text"],"others:access_status":["open.access"],"person:identifier.orcid":["0009-0007-0654-151X"],"thesis:degree_department":["Computer Science"],"thesis:degree_discipline":["Computer Science"],"thesis:degree_level":["Masters"],"thesis:degree_name":["Master of Science (M.Sc.)"],"thesis:institution_name":["University of Saskatchewan"]},"updated_at":"2026-11-19T10:12:45Z"}