ConcernBERT: Learning Responsibilities Using Class Membership

IF 6 1区 计算机科学 Q1 COMPUTER SCIENCE, SOFTWARE ENGINEERING
IEEE Transactions on Software Engineering Pub Date : 2026-10-01 Epub Date: 2026-06-26 DOI:10.1109/TSE.2026.3707727
Jason Lefever;Jiahao Xu;Yuanfang Cai;Rick Kazman;Ernst Pisch
{"title":"ConcernBERT: Learning Responsibilities Using Class Membership","authors":"Jason Lefever;Jiahao Xu;Yuanfang Cai;Rick Kazman;Ernst Pisch","doi":"10.1109/TSE.2026.3707727","DOIUrl":null,"url":null,"abstract":"The principles of <italic>separation of concerns</i>, <italic>high cohesion</i>, and <italic>single responsibility</i> are among the most well-known in software design. However, their application often remains philosophical rather than actionable, relying heavily on developers’ intuition and experience. Many software tasks, such as god class decomposition, extract class refactoring, and cohesion measurement, depend on techniques for identifying cohesive groups of program entities, that is, entities that collectively fulfill a common responsibility. Yet reliably identifying such groups remains a challenge. In this paper, we propose ConcernBERT, a BERT-based embedding model trained at the entity level that uses triplet loss to directly optimize the relative positioning of methods and attributes in the embedding space, and uses class-membership context to learn responsibilities and concerns. We also contribute a large-scale replication dataset for training and evaluation. Our dataset spans over two million Java files across more than six thousand repositories. To evaluate ConcernBERT, we merge methods from two or more classes into unlabeled groups and test the model’s ability to recover the original class memberships. ConcernBERT achieves significantly higher performance than existing models, demonstrating its effectiveness at encoding concern-level semantics and establishing a strong foundation for downstream tasks such as architecture recovery, extract class refactoring, and cohesion measurement.","PeriodicalId":13324,"journal":{"name":"IEEE Transactions on Software Engineering","volume":"52 10","pages":"3040-3054"},"PeriodicalIF":6.0000,"publicationDate":"2026-10-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/11581324/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/6/26 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

The principles of separation of concerns, high cohesion, and single responsibility are among the most well-known in software design. However, their application often remains philosophical rather than actionable, relying heavily on developers’ intuition and experience. Many software tasks, such as god class decomposition, extract class refactoring, and cohesion measurement, depend on techniques for identifying cohesive groups of program entities, that is, entities that collectively fulfill a common responsibility. Yet reliably identifying such groups remains a challenge. In this paper, we propose ConcernBERT, a BERT-based embedding model trained at the entity level that uses triplet loss to directly optimize the relative positioning of methods and attributes in the embedding space, and uses class-membership context to learn responsibilities and concerns. We also contribute a large-scale replication dataset for training and evaluation. Our dataset spans over two million Java files across more than six thousand repositories. To evaluate ConcernBERT, we merge methods from two or more classes into unlabeled groups and test the model’s ability to recover the original class memberships. ConcernBERT achieves significantly higher performance than existing models, demonstrating its effectiveness at encoding concern-level semantics and establishing a strong foundation for downstream tasks such as architecture recovery, extract class refactoring, and cohesion measurement.
关注:利用班级成员学习责任
关注点分离、高内聚和单一职责的原则是软件设计中最著名的原则。然而,它们的应用往往是哲学性的,而不是可操作的,严重依赖于开发人员的直觉和经验。许多软件任务,如god类分解、提取类重构和内聚度量,都依赖于识别内聚的程序实体组的技术,也就是说,这些实体共同履行一个共同的职责。然而,可靠地识别这些群体仍然是一项挑战。本文提出了一种基于bert的实体级训练嵌入模型ConcernBERT,该模型利用三重损失直接优化方法和属性在嵌入空间中的相对定位,并利用类隶属度上下文学习责任和关注点。我们还提供了用于训练和评估的大规模复制数据集。我们的数据集跨越了六千多个存储库中的200多万个Java文件。为了评估ConcernBERT,我们将来自两个或更多类的方法合并到未标记的组中,并测试模型恢复原始类成员关系的能力。ConcernBERT实现了比现有模型更高的性能,证明了它在编码关注级语义方面的有效性,并为下游任务(如架构恢复、提取类重构和内聚度量)建立了坚实的基础。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
IEEE Transactions on Software Engineering
IEEE Transactions on Software Engineering 工程技术-工程:电子与电气
CiteScore
9.70
自引率
10.80%
发文量
724
审稿时长
6 months
期刊介绍: 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.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书