一句话:提出以代码可理解性为引导原则的自动重构研究框架,并构建可理解性代理与预测模型。
代码理解是重构等众多软件工程任务的基础,但现有自动重构技术均未将代码可理解性作为显式引导原则。本论文旨在实现可理解性引导的自动重构,并指出现有理解研究面临三大挑战:缺乏严谨且以专家为依据的可理解性代理指标;已有代理度量本身存在噪声;现有特征集与模型难以刻画人类代码理解的认知复杂度。为此,论文建立经过验证的可理解性代理指标,开发更稳健的相对可理解性模型,并评估包括大语言模型在内的现代学习方法对代码可理解性的预测能力,从而为将代码可理解性视为重构混杂因素的自动重构技术提供可靠基础。
Code comprehension is essential for many software engineering tasks, including code refactoring. Although numerous techniques exist for automated refactoring, none explicitly incorporate code comprehensibility as a guiding principle. The goal of this thesis is to enable comprehensibility-guided automated refactoring. To achieve this, we identify three fundamental challenges in current comprehension research: (1) the lack of rigorous, expert-grounded comprehension proxies; (2) the inherent noise in existing proxy measurements; and (3) limitations in current feature sets and models for capturing the cognitive complexity of human code understanding. This thesis addresses these challenges by establishing validated comprehension proxies, developing more robust relative comprehensibility models, and evaluating modern learning methods—including large language models—for predicting code comprehensibility. Ultimately, this work aims to provide a reliable foundation for automated refactoring techniques that explicitly consider the code understandability as a confounding factor for refactoring code.