Inferring and Applying Def-Use Like Configuration Couplings in Deployment Descriptors

Inferring and Applying Def-Use Like Configuration Couplings in Deployment Descriptors
复制标题

DOI:
10.1145/3324884.3416577
复制
发表时间:
2020-09
期刊:
2020 35th IEEE/ACM International Conference on Automated Software Engineering (ASE)
影响因子:
--
通讯作者:
Chengyuan Wen;Yaxuan Zhang;Xiao He;Na Meng
Chengyuan Wen;Yaxuan Zhang;Xiao He;Na Meng
中科院分区:
其他
文献类型:
--
作者:
Chengyuan Wen;Yaxuan Zhang;Xiao He;Na Meng

文献摘要

相似文献

在 Java 框架(例如 Spring)上构建企业应用程序时,开发人员通常使用一种名为“部署描述符 (DD)”的特殊 XML 文件来指定组件和配置操作。维护此类 XML 文件既困难又耗时;因为 (1) 正确的配置语义是特定于领域的,但通常记录得很模糊,(2) 现有的编译器和程序分析工具很少检查 XML 文件。为了帮助开发人员确保DD的质量,本文提出了一种新颖的方法——XEDITOR——从DD中提取配置耦合(即频繁共现的配置),并采用耦合规则来验证新的或更新的文件。 Xeditor 有两个阶段:耦合提取和错误检测。为了识别耦合,Xeditor 首先在开源项目中挖掘 DD,并提取 (i) 经常共存于相同文件中并且 (ii) 至少保存一次相同数据的 XML 实体对。然后,Xeditor 将定制的关联规则挖掘应用于提取的对。对于错误检测,给定一个新的 XML 文件,Xeditor 检查该文件是否违反任何耦合;如果是,Xeditor 会报告违规行为。为了进行评估,我们首先创建了两个数据集,其中包含从 1,137 个 GitHub 项目中挖掘的 4,248 个 DD。根据这些数据集的实验,Xeditor 提取耦合的精度很高(73%);它以 92% 的精确度、96% 的召回率和 94% 的准确率检测到错误。此外,我们还将 Xeditor 应用于另外 478 个 GitHub 项目的版本历史记录。 Xeditor 发现了 25 个非常可疑的 XML 更新,其中 15 个后来被开发人员修复。
When building enterprise applications on Java frameworks (e.g., Spring), developers often specify components and configure operations with a special kind of XML files named “deployment descriptors (DD)”. Maintaining such XML files is challenging and time-consuming; because (1) the correct configuration semantics is domain-specific but usually vaguely documented, and (2) existing compilers and program analysis tools rarely examine XML files. To help developers ensure the quality of DD, this paper presents a novel approach-XEDITOR-that extracts configuration couplings (i.e., frequently co-occurring configurations) from DD, and adopts the coupling rules to validate new or updated files. Xeditor has two phases: coupling extraction and bug detection. To identify couplings, Xeditor first mines DD in open-source projects, and extracts XML entity pairs that (i) frequently coexist in the same files and (ii) hold the same data at least once. Xeditor then applies customized association rule mining to the extracted pairs. For bug detection, given a new XML file, Xeditor checks whether the file violates any coupling; if so, Xeditor reports the violation(s). For evaluation, we first created two data sets with the 4,248 DD mined from 1,137 GitHub projects. According to the experiments with these data sets, Xeditor extracted couplings with high precision (73%); it detected bugs with 92% precision, 96% recall, and 94% accuracy. Additionally, we applied Xeditor to the version history of another 478 GitHub projects. Xeditor identified 25 very suspicious XML updates, 15 of which were later fixed by developers.