Queen's University at Kingston
Knowledge Units of Programming Languages - A Novel Perspective for Leveraging Source Code to Support Software Engineering Tasks
Abstract
dc:description.abstractTraditional code metrics (e.g., LOC and cyclomatic complexity) do not reveal system traits that are tied to certain building blocks of a given programming language. We conjecture that taking these building blocks of a programming language into account when studying software systems can lead to further insights about software systems. In this vein, we introduce Knowledge Units (KUs), a novel perspective of the source code of software systems. We define a KU as a cohesive set of key capabilities that are offered by one or more building blocks of a given programming language. This thesis investigates whether KUs can serve as an effective lens to study several core dimensions of software engineering: code, process, human, and the emerging domain of Foundation Models and Large Language Models (FM/LLMs). We conceptualize and operationalize KUs for the Java and Python programming languages and present a framework demonstrating how KUs can be applied to study the source code of software systems and support the automation of various software engineering tasks. Specifically, we examine the use of KUs for supporting four important software engineering tasks. First, we show that KU-based features are different from traditional metrics and effective in predicting post-release defects. Second, we design KUREC, a KU-based reviewer recommender that models developers’ expertise and improves reviewer assignment in pull requests. Third, we propose KULTC, a KU-based prediction model that links developers' programming language expertise to their likelihood of becoming long-time contributors in OSS projects. Finally, we conduct the first study examining the representativeness of code-generation benchmarks for FM/LLMs through the lens of KUs, revealing significant gaps in how existing benchmarks capture real-world programming language concepts. We further introduce a framework for automatically generating KU-based tasks to augment and improve the representativeness of benchmark datasets for FM/LLMs. Our extensive empirical studies and evaluation results demonstrate that KUs offer an effective and conceptually grounded lens for analyzing the source code of software systems and supporting a wide range of software engineering tasks. Beyond their practical utility, KUs also open a promising new direction for software engineering research.
Degree
thesis:*- Department dc:contributor.department
- Computing
- Grantor
- Queen's University at Kingston
- Year dc:date.issued
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Ahasanuzzaman, Md
- Advisor dc:contributor.supervisor
-
- Hassan, Ahmed E.
Subjects
dc:subject × 11Rights
dc:rights- Statement dc:rights
-
- Attribution 4.0 International
- Licence dc:rights.uri
- Language dc:language.iso
- eng
Identifiers
dc:identifier.*- Handle dc:identifier.uri
- https://hdl.handle.net/1974/36109