{"title":"What Characterizes Pairwise Modular Smells?","authors":"Chenxing Zhong;Daniel Feitosa;Paris Avgeriou;Huang Huang;Wei Song;He Zhang","doi":"10.1109/TSE.2026.3704291","DOIUrl":null,"url":null,"abstract":"Enhancing the modular structure of existing systems has attracted substantial research interest, primarily through (1) software modularization and (2) identifying design issues (<i>e</i>.<i>g</i>., smells) as refactoring opportunities; however, both approaches often prove impractical to guide effective improvement. Inspired by both aforementioned approaches, our previous study introduced a novel and practical architectural smell – called <i>Pairwise Modular Smell</i> (or <i>PairSmell</i>) – for identifying flawed architectural decisions that necessitate further examination. <i>PairSmell</i> is defined as the deviations between the actual modular relation (MR) and the ‘apt MR’– an MR agreed on by multiple modularization tools (as raters). Although <i>PairSmell</i> has shown its relevance, the reliance on external modularization tools makes it a relatively obscure concept within the community, which in turn may threaten its validity to be used in inspecting software module structure. The objective of this study is to explain <i>PairSmell</i> from the perspective of pair characteristics. To this end, we first conduct a rapid review to collect and synthesize 19 pair characteristics that have been used in the literature to represent relationships between two entities. The collected characteristics are then used to train machine learning models for predicting two forms of <i>PairSmell</i> – inapt separated pairs <inline-formula><tex-math>$\\boldsymbol{InSep}$</tex-math></inline-formula> and inapt collocated pairs <inline-formula><tex-math>$\\boldsymbol{InCol}$</tex-math></inline-formula>, based on a curated dataset of over 6,135,000 pairs of entities derived from 11 open-source Java projects. The trained models achieve up to a 58.6% improvement in ROC-AUC over the baselines. The interpretation of the models reveals that the most influential features for <inline-formula><tex-math>$\\boldsymbol{InSep}$</tex-math></inline-formula> are out-going dependencies, terms shared with others, and declared fields; while those for <inline-formula><tex-math>$\\boldsymbol{InCol}$</tex-math></inline-formula> include semantic similarity based on tf-idf, terms shared between the pair, terms shared with others, and in-going dependencies. We complement the work with a series of practical examples to illustrate how the influential pair characteristics impact the occurrence of <i>PairSmell</i>. Among our findings, a high number of out-going dependencies of a separated pair may raise questions about the separation, while a low level of shared terms may not justify collocating the two entities.","PeriodicalId":13324,"journal":{"name":"IEEE Transactions on Software Engineering","volume":"52 9","pages":"2838-2854"},"PeriodicalIF":6.0000,"publicationDate":"2026-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Software Engineering","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11568190/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/6/16 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Enhancing the modular structure of existing systems has attracted substantial research interest, primarily through (1) software modularization and (2) identifying design issues (e.g., smells) as refactoring opportunities; however, both approaches often prove impractical to guide effective improvement. Inspired by both aforementioned approaches, our previous study introduced a novel and practical architectural smell – called Pairwise Modular Smell (or PairSmell) – for identifying flawed architectural decisions that necessitate further examination. PairSmell is defined as the deviations between the actual modular relation (MR) and the ‘apt MR’– an MR agreed on by multiple modularization tools (as raters). Although PairSmell has shown its relevance, the reliance on external modularization tools makes it a relatively obscure concept within the community, which in turn may threaten its validity to be used in inspecting software module structure. The objective of this study is to explain PairSmell from the perspective of pair characteristics. To this end, we first conduct a rapid review to collect and synthesize 19 pair characteristics that have been used in the literature to represent relationships between two entities. The collected characteristics are then used to train machine learning models for predicting two forms of PairSmell – inapt separated pairs $\boldsymbol{InSep}$ and inapt collocated pairs $\boldsymbol{InCol}$, based on a curated dataset of over 6,135,000 pairs of entities derived from 11 open-source Java projects. The trained models achieve up to a 58.6% improvement in ROC-AUC over the baselines. The interpretation of the models reveals that the most influential features for $\boldsymbol{InSep}$ are out-going dependencies, terms shared with others, and declared fields; while those for $\boldsymbol{InCol}$ include semantic similarity based on tf-idf, terms shared between the pair, terms shared with others, and in-going dependencies. We complement the work with a series of practical examples to illustrate how the influential pair characteristics impact the occurrence of PairSmell. Among our findings, a high number of out-going dependencies of a separated pair may raise questions about the separation, while a low level of shared terms may not justify collocating the two entities.
期刊介绍:
IEEE Transactions on Software Engineering seeks contributions comprising well-defined theoretical results and empirical studies with potential impacts on software construction, analysis, or management. The scope of this Transactions extends from fundamental mechanisms to the development of principles and their application in specific environments. Specific topic areas include:
a) Development and maintenance methods and models: Techniques and principles for specifying, designing, and implementing software systems, encompassing notations and process models.
b) Assessment methods: Software tests, validation, reliability models, test and diagnosis procedures, software redundancy, design for error control, and measurements and evaluation of process and product aspects.
c) Software project management: Productivity factors, cost models, schedule and organizational issues, and standards.
d) Tools and environments: Specific tools, integrated tool environments, associated architectures, databases, and parallel and distributed processing issues.
e) System issues: Hardware-software trade-offs.
f) State-of-the-art surveys: Syntheses and comprehensive reviews of the historical development within specific areas of interest.