Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #11665: Create a robust method of surviving mutation suppression
- Loading branch information
1 parent
c0c0fc0
commit c7de5b5
Showing
15 changed files
with
1,385 additions
and
714 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<suppressedMutations> | ||
<mutation unstable="false"> | ||
<sourceFile>CheckstyleAntTask.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask</mutatedClass> | ||
<mutatedMethod>execute</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.MathMutator</mutator> | ||
<description>Replaced long subtraction with addition</description> | ||
<lineContent>log("Total execution took " + (endTime - startTime) + TIME_SUFFIX,</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>CheckstyleAntTask.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask</mutatedClass> | ||
<mutatedMethod>processFiles</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.MathMutator</mutator> | ||
<description>Replaced long subtraction with addition</description> | ||
<lineContent>log("To locate the files took " + (endTime - startTime) + TIME_SUFFIX,</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>CheckstyleAntTask.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask</mutatedClass> | ||
<mutatedMethod>processFiles</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.MathMutator</mutator> | ||
<description>Replaced long subtraction with addition</description> | ||
<lineContent>log("To process the files took " + (processingEndTime - processingStartTime)</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>CheckstyleAntTask.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask$Formatter</mutatedClass> | ||
<mutatedMethod>createDefaultLogger</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>if (toFile == null || !useFile) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>CheckstyleAntTask.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask$Formatter</mutatedClass> | ||
<mutatedMethod>createXmlLogger</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>if (toFile == null || !useFile) {</lineContent> | ||
</mutation> | ||
</suppressedMutations> |
137 changes: 137 additions & 0 deletions
137
.ci/pitest-suppressions/pitest-coding-1-suppressions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<suppressedMutations> | ||
<mutation unstable="false"> | ||
<sourceFile>UnnecessaryParenthesesCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.UnnecessaryParenthesesCheck</mutatedClass> | ||
<mutatedMethod>isLambdaSingleParameterSurrounded</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>if (firstChild != null && firstChild.getType() == TokenTypes.LPAREN) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>UnnecessaryParenthesesCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.UnnecessaryParenthesesCheck</mutatedClass> | ||
<mutatedMethod>leaveToken</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE</mutator> | ||
<description>removed conditional - replaced equality check with false</description> | ||
<lineContent>if (type != TokenTypes.ASSIGN</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>UnnecessaryParenthesesCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.UnnecessaryParenthesesCheck</mutatedClass> | ||
<mutatedMethod>leaveToken</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>|| parent.getType() != TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>UnnecessaryParenthesesCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.UnnecessaryParenthesesCheck</mutatedClass> | ||
<mutatedMethod>visitToken</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>else if (type != TokenTypes.ASSIGN</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>UnnecessaryParenthesesCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.UnnecessaryParenthesesCheck</mutatedClass> | ||
<mutatedMethod>visitToken</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>if (type == TokenTypes.LAMBDA && isLambdaSingleParameterSurrounded(ast)) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass> | ||
<mutatedMethod>calculateDistanceInSingleScope</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>&& currentAst.getType() != TokenTypes.RCURLY) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass> | ||
<mutatedMethod>calculateDistanceInSingleScope</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE</mutator> | ||
<description>removed conditional - replaced equality check with false</description> | ||
<lineContent>if (!firstUsageFound) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass> | ||
<mutatedMethod>getFirstNodeInsideForWhileDoWhileBlocks</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE</mutator> | ||
<description>removed conditional - replaced equality check with false</description> | ||
<lineContent>if (currentNodeType == TokenTypes.SLIST) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass> | ||
<mutatedMethod>getFirstNodeInsideIfBlock</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE</mutator> | ||
<description>removed conditional - replaced equality check with false</description> | ||
<lineContent>else if (isChild(currentNode, variable)) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass> | ||
<mutatedMethod>getFirstNodeInsideIfBlock</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE</mutator> | ||
<description>removed conditional - replaced equality check with false</description> | ||
<lineContent>if (currentNode.getType() == TokenTypes.LITERAL_IF) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass> | ||
<mutatedMethod>getFirstNodeInsideTryCatchFinallyBlocks</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>&& currentNode.getType() == TokenTypes.LITERAL_CATCH) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass> | ||
<mutatedMethod>isChild</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>if (curNode.getType() == ast.getType() && curNode.getText().equals(ast.getText())) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass> | ||
<mutatedMethod>isInitializationSequence</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>while (result</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass> | ||
<mutatedMethod>isVariableInOperatorExpr</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>if (!isVarInOperatorDeclaration && operator.getType() == TokenTypes.LITERAL_IF) {</lineContent> | ||
</mutation> | ||
|
||
<mutation unstable="false"> | ||
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile> | ||
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass> | ||
<mutatedMethod>searchVariableUsageExpressions</mutatedMethod> | ||
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> | ||
<description>removed conditional - replaced equality check with true</description> | ||
<lineContent>&& currentStatementAst.getType() != TokenTypes.RCURLY) {</lineContent> | ||
</mutation> | ||
</suppressedMutations> |
Oops, something went wrong.