一句话:首个大规模细粒度 Java 类型变更实证研究,挖掘 29.7 万次类型变更并给出工具与启示。
开发者在性能、安全、并发、库迁移或可维护性等需求下经常修改程序元素的类型并更新其所有引用。尽管类型变更是常见的程序变换,其自动化程度与研究程度却最低,导致研究者、工具构建者、语言与库设计者及开发者均缺乏可靠依据。为填补这一空白,本文开展了首个大规模、最细粒度的 Java 类型变更实证研究。作者开发了先进的静态挖掘工具,从 129 个 Java 项目、416,652 次提交中挖掘出 297,543 次类型变更及其后续代码适配,并基于该丰富数据集回答关于类型变更实践的研究问题。研究发现之一是在实际开发中类型变更比重命名更常见,而当前研究与工具对类型变更的支持明显不足。基于广泛可靠的数据,论文还提出了具有可操作性和实证依据的启示。
Developers frequently change the type of a program element and update all its references for performance, security, concurrency,library migration, or better maintainability. Despite type changes being a common program transformation, it is the least automated and the least studied. With this knowledge gap, researchers miss opportunities to improve the state of the art in automation for software evolution, tool builders do not invest resources where automation is most needed, language and library designers can-not make informed decisions when introducing new types, and developers fail to use common practices when changing types. To fill this gap, we present the first large-scale and most fine-grained empirical study on type changes in Java. We develop state-of-the-art tools to statically mine 297,543 type changes and their subsequent code adaptations from a diverse corpus of 129 Java projects containing 416,652 commits. With this rich data set we answer research questions about the practice of type changes. Among others, we found that type changes are actually more common than renaming,but the current research and tools for type changes are inadequate.Based on our extensive and reliable data, we present actionable,empirically-justified implications.