Tightly coupled and interdependent systems inhibit productivity by requiring developers to carefully coordinate their changes, even when modifying subsystems that should be independent of one another. Poor architectural decisions frequently lead to the presence of large, change-prone source files that are at the center of complexes of technical debt. This kind of technical debt quickly incurs interest both through coordination costs and error-proneness. In this paper, we present a new approach for decomposing these ``large-active'' files to pay down critical technical debt. We package our approach as a refactoring recommendation system. Each recommendation is determined by analyzing patterns of co-change and mutual dependency among files. Each recommendation corresponds to a responsibility the large-active file has in relation to the rest of the system. By moving recommended functionality from the large-active file into smaller files, developers can reduce the impact of a debt-laden file and clarify its essential responsibilities. A key advantage of this approach over prior work is that we better focus effort; we avoid spending developer effort refactoring code that is only superficially problematic. We achieve this by incorporating revision history into both determining and ranking recommendations. Each recommendation corresponds to some change-prone responsibility. We present some examples of this approach in action and outline our future plans.
翻译:高度耦合且相互依赖的系统会阻碍生产力,要求开发人员在修改本应相互独立的子系统时,仍需仔细协调变更。不良架构决策常导致大型、易变源代码文件的出现,这些文件处于技术债务复合体的核心。此类技术债务会通过协调成本和易错性迅速产生利息。本文提出一种分解这类"大型活跃"文件以偿还关键技术债务的新方法。我们将该方法封装为重构建议系统,通过分析文件间的共变模式和相互依赖关系生成每条建议。每条建议对应大型活跃文件与系统其他部分相关联的职责。通过将建议功能从大型活跃文件迁移至更小的文件,开发人员可降低高负债文件的影响范围并明确其核心职责。相较于先前研究,本方法的关键优势在于能更精准地聚焦投入:避免将开发人员精力浪费在仅存在表面问题的代码重构上。我们通过将修订历史纳入建议生成与排序过程实现此目标,每条建议对应某个易变职责。本文展示了该方法的部分应用实例,并概述了未来研究计划。