paperbot · PL 论文追踪

全部论文 待读 收藏

P2 PairSmell: A Novel Perspective Inspecting Software Modular Structure

PairSmell:一种审视软件模块结构的新视角
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 2/10 · 论文关注软件模块化结构与重构设计缺陷,属于软件工程/程序设计领域,但与用户核心方向(LLM/Agent 与静态分析交叉、浮点程序分析、贝叶斯程序分析)几乎没有直接关联。它既不涉及 LLM/Agent,也不涉及浮点或贝叶斯分析,仅泛泛涉及程序分析/模块化工具的应用。引用 1 inbox
Chenxing Zhong, Daniel Feitosa, Paris Avgeriou, Huang Huang, Yue Li, He Zhang
crossref: 2026-09-12

AI 速览

一句话:提出 PairSmell,用多款模块化工具识别实体对的不当分离/共置,将粗粒度设计问题细化为可指导重构的模块关系缺陷。

现有模块化改造常需大幅修改原模块,而识别出的设计问题又过于粗粒度,难以指导重构。本文提出 PairSmell,聚焦模块关系(MR):一对实体应分离还是共置。若实体实际 MR 与多个模块化工具共识的“apt MR”不一致,则视为可能有缺陷的架构决策。作者在 20 个 C/C++ 与 Java 项目上,用 4 个模块化工具识别 InSep 与 InCol 两类 PairSmell。对 260,003 个实例的实证分析显示:平均 14.60% 和 20.44% 的实体分别涉及 InSep 与 InCol;InSep 对的共同变更比正确分离对多 190%,InCol 对则比正确共置对少 35%,且两类问题持续存在于软件演化中。结果表明 PairSmell 能提供细粒度、基础性的模块结构审视,提升模块化设计改进效率。

问题
模块化改造需大量修改原模块,且现有设计问题识别过粗,难以为重构提供细粒度依据。
方法
提出 PairSmell,用多个模块化工具对实体对的模块关系(分离/共置)进行共识判定,将实际 MR 与 apt MR 不一致的实体对视为 InSep 或 InCol 缺陷。
评估
在 20 个 C/C++ 和 Java 项目、260,003 个实例上,用 4 个模块化工具识别两类 PairSmell,并分析实体占比、共同变更差异及演化持续性。
原文摘要(Abstract)

Enhancing the modular structure of existing systems has attracted substantial research interest, focusing on two main methods: (1) software modularization and (2) identifying design issues (e.g., smells) as refactoring opportunities. However, remodularization solutions often require extensive modifications to the original modules, and the design issues identified are generally too coarse to guide refactoring strategies. Combining the above two methods, this paper introduces a novel concept, PairSmell, which exploits modularization to pinpoint design issues necessitating refactoring. We concentrate on a granular but fundamental aspect of modularity principles-modular relation (MR), i.e., whether a pair of entities are separated or collocated. The main assumption is that, if the actual MR of a pair violates its ‘apt MR’, i.e., an MR agreed on by multiple modularization tools (as raters), it can be deemed likely a flawed architectural decision that necessitates further examination. To quantify and evaluate PairSmell, we conduct an empirical study on 20 C/C++ and Java projects, using 4 established modularization tools to identify two forms of PairSmell: inapt separated pairs$InSep$and inapt collocated pairs$InCol$. Our study on 260,003 instances reveals that their architectural impacts are substantial: (1) on average, 14.60 % and 20.44 % of software entities are involved in$InSep$and$InCol$MRs respectively; (2)$InSep$pairs are associated with 190 % more co-changes than properly separated pairs, while$InCol$pairs are associated with 35% fewer co-changes than properly collocated pairs, both indicating a successful identification of modular structures detrimental to software quality; and (3) both forms of PairSmell persist across software evolution. This evidence strongly suggests that PairSmell can provide meaningful insights for inspecting modular structure, with the identified issues being both granular and fundamental, making the enhancement of modular design more efficient.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot8760,
  title = {PairSmell: A Novel Perspective Inspecting Software Modular Structure},
  author = {Chenxing Zhong and Daniel Feitosa and Paris Avgeriou and Huang Huang and Yue Li and He Zhang},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00072}
}