paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Breaking Strong Encapsulation: A Comprehensive Study of Java Module Abuse

打破强封装:Java 模块滥用的一项综合研究
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 2/10 · 论文是 Java 模块系统强封装破坏的实证研究,属于软件工程/语言设计范畴,与用户关注的静态分析、LLM/Agent、浮点程序分析和贝叶斯程序分析等核心方向没有直接交叉;仅在程序语言与模块系统背景上有弱关联。引用 1 inbox
Yirui He, Yongbo Chen, Jessy Ayala, Yecheng Zhou, Qiran Wang, Joshua Garcia
crossref: 2026-09-12

AI 速览

一句话:首个针对 Java 模块系统强封装被破坏(BSE)问题的实证研究,基于 4,079 个 GitHub issue 刻画其症状、来源与解决方式。

随着软件系统规模达到数亿行代码,仅靠代码级抽象已难以维护,Java 平台模块系统(JPMS)因此提供架构级抽象,让工程师控制模块所需与所提供的接口。然而,尽管 JPMS 强制实施强封装,开发者仍会突破封装以访问模块内部元素,这种行为被称为“破坏强封装”(BSE)。它不仅使向 Java 9 等新版本的迁移复杂化,也威胁软件项目的完整性与安全性,但该问题此前研究不足。本文开展首个实证研究:作者收集了包含 4,079 个 GitHub issue 的综合数据集,并从症状、滥用来源、期望功能与解决方式等多个视角进行分析。研究揭示了 Java 模块系统中的张力——模块开发者希望强制强封装,而模块使用者却频繁试图突破封装,并强调实践者与研究者需制定有效缓解策略,为后续检测与修复工作提供对 BSE 特征的理解。

问题
开发者在使用 JPMS 时经常破坏强封装以访问模块内部元素(BSE),这不仅阻碍向 Java 9 及更新版本迁移,也威胁项目的完整性与安全性,而该问题此前缺乏系统性研究。
方法
作者构建了包含 4,079 个 GitHub issue 的综合性数据集,并从症状、滥用来源、期望功能与解决方式等多个维度对这些 issue 进行实证分析。
评估
通过对大规模真实 issue 数据集的多视角分类与统计,刻画 BSE 问题的分布与特征,揭示模块开发者与使用者之间的根本张力,并为检测与修复提供依据。
原文摘要(Abstract)

As an increasing number of software systems reach sizes of hundreds of millions of lines of code, relying solely on code-level abstractions is impractical, posing profound challenges to software maintenance. Java Platform Module System (JPMS) provides architectural abstractions that enable Java engineers to control the required and provided interfaces of a module. Despite numerous advantages of enforced strong encapsulation provided by JPMS, developers still break those encapsulations to access the internal elements of a module. Such practice is referred to as Breaking the Strong Encapsulation (BSE). This behavior not only complicates the migration to newer versions (e.g., Java 9) but also threatens the integrity and safety of software projects. Since the BSE problem is still underexplored, in this work, we conduct the first empirical study to identify and characterize this widespread and impactful problem. We first collect a comprehensive dataset containing 4,079 GitHub issues and then investigate those issues from various perspectives, including symptoms, abuse sources, desired functionalities, and resolutions. Our empirical study highlights a tension in the Java module system: module developers aim to enforce strong encapsulation while module users frequently attempt to break the encapsulation. Our finding also emphasizes the need for both practitioners and researchers to develop effective strategies to mitigate these problems, offering an understanding of BSE characteristics to inform future detection and repair efforts.

链接与引用

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

BibTeX
@inproceedings{paperbot11936,
  title = {Breaking Strong Encapsulation: A Comprehensive Study of Java Module Abuse},
  author = {Yirui He and Yongbo Chen and Jessy Ayala and Yecheng Zhou and Qiran Wang and Joshua Garcia},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3764526}
}