...
首页> 外文期刊>Science of Computer Programming >Mutating code annotations: An empirical evaluation on Java and C# programs
【24h】

Mutating code annotations: An empirical evaluation on Java and C# programs

机译:突变代码注释:对Java和C#程序的经验评估

获取原文
获取原文并翻译 | 示例
   

获取外文期刊封面封底 >>

       

摘要

Mutation testing injects code changes to check whether tests can detect them. Mutation testing tools use mutation operators that modify program elements such as operators, names, and entire statements. Most existing mutation operators focus on imperative and object-oriented language constructs. However, many current projects use meta-programming through code annotations. In a previous work, we have proposed nine mutation operators for code annotations focused on the Java programming language. In this article, we extend our previous work by mapping the operators to the C# language. Moreover, we enlarge the empirical evaluation. In particular, we mine Java and C# projects that make heavy use of annotations to identify annotation-related faults. We analyzed 200 faults and categorized them as "misuse," when the developer did not appear to know how to use the code annotations properly, and "wrong annotation parsing" when the developer incorrectly parsed annotation code (by using reflection, for example). Our operators mimic 95% of the 200 mined faults. In particular, three operators can mimic 82% of the faults in Java projects and 84% of the faults in C# projects. In addition, we provide an extended and improved repository hosted on GitHub with the 200 code annotation faults we analyzed. We organize the repository according to the type of errors made by the programmers while dealing with code annotations, and to the mutation operator that can mimic the faults. Last but not least, we also provide a mutation engine, based on these operators, which is publicly available and can be incorporated into existing or new mutation tools. The engine works for Java and C#. As implications for practice, our operators can help developers to improve test suites and parsers of annotated code.
机译:变异测试会注入代码更改,以检查测试是否可以检测到它们。变异测试工具使用变异运算符来修改程序元素,例如运算符,名称和整个语句。现有的大多数变异运算符都集中在命令式和面向对象的语言构造上。但是,当前许多项目都通过代码注释使用元编程。在先前的工作中,我们针对Java编程语言的代码注释提出了九种变异运算符。在本文中,我们通过将运算符映射到C#语言来扩展以前的工作。此外,我们扩大了实证评估。特别是,我们挖掘Java和C#项目,这些项目大量使用批注来标识与批注相关的故障。当开发人员似乎不知道如何正确使用代码注释时,我们分析了200个错误并将其归类为“滥用”,而当开发人员错误地解析了注释代码(例如,通过使用反射)时,我们将其分类为“错误的注释解析”。我们的运营商模仿了200个已开采断层中的95%。特别是,三个操作员可以模仿Java项目中的82%故障和C#项目中的84%故障。此外,我们提供了托管在GitHub上的扩展和改进的存储库,其中包含我们分析的200条代码注释错误。我们根据程序员在处理代码注释时所犯错误的类型以及可以模仿错误的变异运算符来组织存储库。最后但并非最不重要的一点是,我们还基于这些运算符提供了一个突变引擎,该引擎是公开可用的,可以合并到现有或新的突变工具中。该引擎适用于Java和C#。作为实践的暗示,我们的操作员可以帮助开发人员改善带注释的代码的测试套件和解析器。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号