Busca avançada
Ano de início
Entree
(Referência obtida automaticamente do Web of Science, por meio da informação sobre o financiamento pela FAPESP e o número do processo correspondente, incluída na publicação pelos autores.)

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

Texto completo
Autor(es):
Pinheiro, Pedro [1] ; Viana, Jose Carlos [1] ; Ribeiro, Marcio [1] ; Fernandes, Leo [2] ; Ferrari, Fabiano [3] ; Gheyi, Rohit [4] ; Fonseca, Baldoino [1]
Número total de Autores: 7
Afiliação do(s) autor(es):
[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
Número total de Afiliações: 4
Tipo de documento: Artigo Científico
Fonte: SCIENCE OF COMPUTER PROGRAMMING; v. 191, JUN 1 2020.
Citações Web of Science: 0
Resumo

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)

Processo FAPESP: 16/21251-0 - Investigação e Automatização de Técnicas de Redução de Custo do Teste de Mutação
Beneficiário:Fabiano Cutigi Ferrari
Modalidade de apoio: Bolsas no Exterior - Pesquisa