Mutate R code.
We currently support the following mutations (in no particular order):
- Arithmetic operator replacement:
Original Mutation 1 Mutation 2 Mutation 3 +-*/-+*/*+-//+-* - Branch condition replacement:
- Conditions of
ifstatements andwhileloops are replaced byTRUEorFALSE
- Conditions of
- Condition boundary mutation:
Original Mutation >>=>=><<=<=< - Function name replacement:
Original Mutation 1 Mutation 2 lapplysapplyvapplysapplylapplyvapplysapplyisTRUEisFALSEisFALSEisTRUE[[[anyallallany==identicalidentical==unionintersectsetdiffintersectunionsetdiffsetdiffunionintersect - Literal mutation:
- Numeric literals are replaced by
NAor in- or decremented by 1 - Logical literals are replaced by their negation
- Character literals are modified by appending to the end, removing the first character, or by replacing it with an empty string
- This is only done when the string does not appear inside typical logging functions, like
print,cat,message, orlog_trace
- This is only done when the string does not appear inside typical logging functions, like
- Numeric literals are replaced by
- Logic operator replacement:
Original Mutation &||&&&||||&& - Relational operator replacement:
Original Mutation ==!=!===><=>=<<>=<=> - Sign replacement:
Original Mutation +--+ - Function replacement
- Calls whose result is not assigned by
<-,<<-,->,->>, or=are removed - Calls to
lengthare replaced by0,1, and5 - "is"-checkes (
is.character,is.logical, ... , and relation operators) are replaced byTRUEandFALSE
- Calls whose result is not assigned by
- Return value replacement:
Original Mutation NULL42everything else NULL - Vector modification:
- Wenn the function
cis called, we either remove and element, add an additional, or remove all elements
- Wenn the function
- Call insertion
- A call to
stoporwarningis inserted into blocks ({ ... })
- A call to