Advanced search
Start date
Betweenand
(Reference retrieved automatically from Web of Science through information on FAPESP grant and its corresponding number as mentioned in the publication by the authors.)

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

Full text
Author(s):
Pinheiro, Pedro [1] ; Viana, Jose Carlos [1] ; Ribeiro, Marcio [1] ; Fernandes, Leo [2] ; Ferrari, Fabiano [3] ; Gheyi, Rohit [4] ; Fonseca, Baldoino [1]
Total Authors: 7
Affiliation:
[1] Univ Fed Alagoas, Comp Inst, Maceio, AL - Brazil
[2] IFAL, Informat Coord, Maceio, AL - Brazil
[3] Univ Fed Sao Carlos, Comp Dept, Sao Carlos, SP - Brazil
[4] Univ Fed Campina Grande, Dept Comp & Syst, Campina Grande, PB - Brazil
Total Affiliations: 4
Document type: Journal article
Source: SCIENCE OF COMPUTER PROGRAMMING; v. 191, JUN 1 2020.
Web of Science Citations: 0
Abstract

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. (C) 2020 Elsevier B.V. All rights reserved. (AU)

FAPESP's process: 16/21251-0 - Investigation and Automation of Cost Reduction Techniques for Mutation Testing
Grantee:Fabiano Cutigi Ferrari
Support Opportunities: Scholarships abroad - Research