计算机科学 > 程序设计语言
[提交于 2024年3月26日]
标题:Java Classes with "-Er" and "-Utils" Suffixes Have Higher Complexity
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:In object-oriented programming languages, a belief exists that classes with -Er/-Or and -Utils suffixes are "code smells" because they take over a lot of functional responsibility, turning out to be bulky and complicated, and therefore making it more difficult to maintain the code. In order to validate this intuition, we analyzed complexity and cohesion of 13,861 Java classes from 212 unique open-source GitHub repositories. We found out that average values of Cyclomatic Complexity and Cognitive Complexity metrics are at least 2.5 times higher when suffixes are present.
提交历史
来自:Yegor Bugayenko[v1] 2024年3月26日 星期二 06:55:13 UTC