diff --git a/.ci/pitest-survival-check.groovy b/.ci/pitest-survival-check.groovy new file mode 100644 index 0000000..12cf4ef --- /dev/null +++ b/.ci/pitest-survival-check.groovy @@ -0,0 +1,347 @@ +import groovy.io.FileType +import groovy.transform.EqualsAndHashCode +import groovy.transform.Immutable +import groovy.xml.XmlUtil + +int exitCode = checkPitestReport() +System.exit(exitCode) + +/** + * Check the generated pitest report. Parse the surviving and suppressed mutations and compare + * them. + * + * @return {@code 0} if pitest report is as expected, {@code 1} otherwise + */ +private static int checkPitestReport() { + final XmlParser xmlParser = new XmlParser() + File mutationReportFile = null + final String suppressedMutationFileUri = ".${File.separator}config${File.separator}" + + "pitest-suppressions.xml" + + final File pitReports = + new File(".${File.separator}target${File.separator}pit-reports") + + if (!pitReports.exists()) { + throw new IllegalStateException( + "Pitest report directory does not exist, generate pitest report first") + } + + pitReports.eachFileRecurse(FileType.FILES) { + if (it.name == 'mutations.xml') { + mutationReportFile = it + } + } + final Node mutationReportNode = xmlParser.parse(mutationReportFile) + final Set survivingMutations = getSurvivingMutations(mutationReportNode) + + final File suppressionFile = new File(suppressedMutationFileUri) + Set suppressedMutations = new TreeSet<>() + if (suppressionFile.exists()) { + final Node suppressedMutationNode = xmlParser.parse(suppressedMutationFileUri) + suppressedMutations = getSuppressedMutations(suppressedMutationNode) + } + + if (survivingMutations.isEmpty()) { + if (suppressionFile.exists()) { + suppressionFile.delete() + } + } + else { + final StringBuilder suppressionFileContent = new StringBuilder(1024) + suppressionFileContent.append( + '\n\n') + + survivingMutations.each { + suppressionFileContent.append(it.toXmlString()) + } + suppressionFileContent.append('\n') + + if (!suppressionFile.exists()) { + suppressionFile.createNewFile() + } + suppressionFile.write(suppressionFileContent.toString()) + } + + return printComparisonToConsole(survivingMutations, suppressedMutations) +} + +/** + * Get the surviving mutations. All child nodes of the main {@code mutations} node + * are parsed. + * + * @param mainNode the main {@code mutations} node + * @return A set of surviving mutations + */ +private static Set getSurvivingMutations(Node mainNode) { + + final List children = mainNode.children() + final Set survivingMutations = new TreeSet<>() + + children.each { node -> + final Node mutationNode = node as Node + + final String mutationStatus = mutationNode.attribute("status") + + if (mutationStatus == "SURVIVED" || mutationStatus == "NO_COVERAGE") { + survivingMutations.add(getMutation(mutationNode)) + } + } + return survivingMutations +} + +/** + * Get the suppressed mutations. All child nodes of the main {@code suppressedMutations} node + * are parsed. + * + * @param mainNode the main {@code suppressedMutations} node + * @return A set of suppressed mutations + */ +private static Set getSuppressedMutations(Node mainNode) { + final List children = mainNode.children() + final Set suppressedMutations = new TreeSet<>() + + children.each { node -> + final Node mutationNode = node as Node + suppressedMutations.add(getMutation(mutationNode)) + } + return suppressedMutations +} + +/** + * Construct the {@link Mutation} object from the {@code mutation} XML node. + * The {@code mutations.xml} file is parsed to get the {@code mutationNode}. + * + * @param mutationNode the {@code mutation} XML node + * @return {@link Mutation} object represented by the {@code mutation} XML node + */ +private static Mutation getMutation(Node mutationNode) { + final List childNodes = mutationNode.children() + + String sourceFile = null + String mutatedClass = null + String mutatedMethod = null + String mutator = null + String lineContent = null + String description = null + String mutationClassPackage = null + int lineNumber = 0 + childNodes.each { + final Node childNode = it as Node + final String text = childNode.name() + + final String childNodeText = XmlUtil.escapeXml(childNode.text()) + switch (text) { + case "sourceFile": + sourceFile = childNodeText + break + case "mutatedClass": + mutatedClass = childNodeText + mutationClassPackage = mutatedClass.split("[A-Z]")[0] + break + case "mutatedMethod": + mutatedMethod = childNodeText + break + case "mutator": + mutator = childNodeText + break + case "description": + description = childNodeText + break + case "lineNumber": + lineNumber = Integer.parseInt(childNodeText) + break + case "lineContent": + lineContent = childNodeText + break + } + } + if (lineContent == null) { + final String mutationFileName = mutationClassPackage + sourceFile + final String startingPath = + ".${File.separator}src${File.separator}main${File.separator}java${File.separator}" + final String javaExtension = ".java" + final String mutationFilePath = startingPath + mutationFileName + .substring(0, mutationFileName.length() - javaExtension.length()) + .replace(".", File.separator) + javaExtension + + final File file = new File(mutationFilePath) + lineContent = XmlUtil.escapeXml(file.readLines().get(lineNumber - 1).trim()) + } + if (lineNumber == 0) { + lineNumber = -1 + } + + final String unstableAttributeValue = mutationNode.attribute("unstable") + final boolean isUnstable = Boolean.parseBoolean(unstableAttributeValue) + + return new Mutation(sourceFile, mutatedClass, mutatedMethod, mutator, description, + lineContent, lineNumber, isUnstable) +} + +/** + * Compare surviving and suppressed mutations. The comparison passes successfully (i.e. returns 0) + * when: + *
    + *
  1. Surviving and suppressed mutations are equal.
  2. + *
  3. There are extra suppressed mutations but they are unstable + * i.e. {@code unstable="true"}.
  4. + *
+ * The comparison fails (i.e. returns 1) when: + *
    + *
  1. Surviving mutations are not present in the suppressed list.
  2. + *
  3. There are mutations in the suppression list that are not there is surviving list.
  4. + *
+ * + * @param survivingMutations A set of surviving mutations + * @param suppressedMutations A set of suppressed mutations + * @return {@code 0} if comparison passes successfully + */ +private static int printComparisonToConsole(Set survivingMutations, + Set suppressedMutations) { + final Set survivingUnsuppressedMutations = + setDifference(survivingMutations, suppressedMutations) + final Set extraSuppressions = + setDifference(suppressedMutations, survivingMutations) + + final int exitCode + if (survivingMutations == suppressedMutations) { + exitCode = 0 + println 'No new surviving mutation(s) found.' + } + else if (survivingUnsuppressedMutations.isEmpty() + && hasOnlyUnstableMutations(extraSuppressions)) { + exitCode = 0 + println 'No new surviving mutation(s) found.' + } + else { + if (!survivingUnsuppressedMutations.isEmpty()) { + println "New surviving mutation(s) found:" + survivingUnsuppressedMutations.each { + println it + } + } + if (!extraSuppressions.isEmpty() + && extraSuppressions.any { !it.isUnstable() }) { + println "\nUnnecessary suppressed mutation(s) found and should be removed:" + extraSuppressions.each { + if (!it.isUnstable()) { + println it + } + } + } + exitCode = 1 + } + return exitCode +} + +/** + * Whether a set has only unstable mutations. + * + * @param mutations A set of mutations + * @return {@code true} if a set has only unstable mutations + */ +private static boolean hasOnlyUnstableMutations(Set mutations) { + return mutations.every { it.isUnstable() } +} + +/** + * Determine the difference between 2 sets. The result is {@code setOne - setTwo}. + * + * @param setOne The first set in the difference + * @param setTwo The second set in the difference + * @return {@code setOne - setTwo} + */ +private static Set setDifference(final Set setOne, + final Set setTwo) { + final Set result = new TreeSet<>(setOne) + result.removeIf { mutation -> setTwo.contains(mutation) } + return result +} + +/** + * A class to represent the XML {@code mutation} node. + */ +@EqualsAndHashCode(excludes = ["lineNumber", "unstable"]) +@Immutable +class Mutation implements Comparable { + + /** + * Mutation nodes present in suppressions file do not have a {@code lineNumber}. + * The {@code lineNumber} is set to {@code -1} for such mutations. + */ + private static final int LINE_NUMBER_NOT_PRESENT_VALUE = -1 + + String sourceFile + String mutatedClass + String mutatedMethod + String mutator + String description + String lineContent + int lineNumber + boolean unstable + + @Override + String toString() { + String toString = """ + Source File: "${getSourceFile()}" + Class: "${getMutatedClass()}" + Method: "${getMutatedMethod()}" + Line Contents: "${getLineContent()}" + Mutator: "${getMutator()}" + Description: "${getDescription()}" + """.stripIndent() + if (getLineNumber() != LINE_NUMBER_NOT_PRESENT_VALUE) { + toString += 'Line Number: ' + getLineNumber() + } + return toString + } + + @Override + int compareTo(Mutation other) { + int i = getSourceFile() <=> other.getSourceFile() + if (i != 0) { + return i + } + + i = getMutatedClass() <=> other.getMutatedClass() + if (i != 0) { + return i + } + + i = getMutatedMethod() <=> other.getMutatedMethod() + if (i != 0) { + return i + } + + i = getLineContent() <=> other.getLineContent() + if (i != 0) { + return i + } + + i = getMutator() <=> other.getMutator() + if (i != 0) { + return i + } + + return getDescription() <=> other.getDescription() + } + + /** + * XML format of the mutation. + * + * @return XML format of the mutation + */ + String toXmlString() { + return """ + + ${getSourceFile()} + ${getMutatedClass()} + ${getMutatedMethod()} + ${getMutator()} + ${getDescription()} + ${getLineContent()} + + """.stripIndent(10) + } + +} diff --git a/.ci/pitest.sh b/.ci/pitest.sh new file mode 100755 index 0000000..0d1d232 --- /dev/null +++ b/.ci/pitest.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# Attention, there is no "-x" to avoid problems on CircleCI +set -e + +echo "Generation of pitest report:" +echo "./mvnw -e --no-transfer-progress -Ppitest clean test-compile org.pitest:pitest-maven:mutationCoverage" +set +e +./mvnw -e --no-transfer-progress -Ppitest clean test-compile org.pitest:pitest-maven:mutationCoverage +EXIT_CODE=$? +set -e +echo "Execution of comparison of suppressed mutations survivals and current survivals:" +echo "groovy .ci/pitest-survival-check.groovy" +groovy .ci/pitest-survival-check.groovy +exit $EXIT_CODE diff --git a/.github/workflows/pitest.yml b/.github/workflows/pitest.yml new file mode 100644 index 0000000..dce6bf0 --- /dev/null +++ b/.github/workflows/pitest.yml @@ -0,0 +1,43 @@ +name: Pitest + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + pitest: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'corretto' + + - name: Install Groovy + run: | + sudo apt-get update + sudo apt-get install -y groovy + + - name: Setup Maven cache + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + + - name: Run Pitest with suppression check + run: ./.ci/pitest.sh + + - name: Upload Pitest Report on Failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: pitest-report + path: target/pit-reports/ + retention-days: 7 diff --git a/config/pitest-suppressions.xml b/config/pitest-suppressions.xml new file mode 100644 index 0000000..fe74ac4 --- /dev/null +++ b/config/pitest-suppressions.xml @@ -0,0 +1,1155 @@ + + + + + CheckConfiguration.java + org.checkstyle.autofix.parser.CheckConfiguration + getProperty + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (properties.containsKey(key)) { + + + + CheckConfiguration.java + org.checkstyle.autofix.parser.CheckConfiguration + getProperty + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/util/Map::get + result = globalProperties.get(key); + + + + CheckConfiguration.java + org.checkstyle.autofix.parser.CheckConfiguration + getPropertyOrDefault + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/checkstyle/autofix/parser/CheckConfiguration::getProperty + String result = getProperty(key); + + + + CheckConfiguration.java + org.checkstyle.autofix.parser.CheckConfiguration + getPropertyOrDefault + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (result == null) { + + + + CheckConfiguration.java + org.checkstyle.autofix.parser.CheckConfiguration + hasProperty + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/util/Map::containsKey + return properties.containsKey(key) || globalProperties.containsKey(key); + + + + CheckConfiguration.java + org.checkstyle.autofix.parser.CheckConfiguration + hasProperty + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE + removed conditional - replaced equality check with false + return properties.containsKey(key) || globalProperties.containsKey(key); + + + + CheckConfiguration.java + org.checkstyle.autofix.parser.CheckConfiguration + hasProperty + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + return properties.containsKey(key) || globalProperties.containsKey(key); + + + + CheckConfiguration.java + org.checkstyle.autofix.parser.CheckConfiguration + setGlobalProperty + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/util/Map::put + globalProperties.put(key, value); + + + + CheckConfiguration.java + org.checkstyle.autofix.parser.CheckConfiguration + setGlobalProperty + org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator + replaced call to java/util/Map::put with argument + globalProperties.put(key, value); + + + + CheckstyleAutoFix.java + org.checkstyle.autofix.CheckstyleAutoFix + createReportParser + org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator + negated conditional + else if (path.endsWith(".sarif") || path.endsWith(".sarif.json")) { + + + + CheckstyleAutoFix.java + org.checkstyle.autofix.CheckstyleAutoFix + createReportParser + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/lang/String::endsWith + else if (path.endsWith(".sarif") || path.endsWith(".sarif.json")) { + + + + CheckstyleAutoFix.java + org.checkstyle.autofix.CheckstyleAutoFix + createReportParser + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE + removed conditional - replaced equality check with false + else if (path.endsWith(".sarif") || path.endsWith(".sarif.json")) { + + + + CheckstyleAutoFix.java + org.checkstyle.autofix.CheckstyleAutoFix + createReportParser + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + else if (path.endsWith(".sarif") || path.endsWith(".sarif.json")) { + + + + CheckstyleAutoFix.java + org.checkstyle.autofix.CheckstyleAutoFix + getDescription + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/CheckstyleAutoFix::getDescription + return "Automatically fixes Checkstyle violations."; + + + + CheckstyleAutoFix.java + org.checkstyle.autofix.CheckstyleAutoFix + getDisplayName + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/CheckstyleAutoFix::getDisplayName + return "Checkstyle autoFix"; + + + + CheckstyleAutoFix.java + org.checkstyle.autofix.CheckstyleAutoFix + loadCheckstyleConfiguration + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/checkstyle/autofix/CheckstyleAutoFix::getPropertiesPath + return ConfigurationLoader.loadConfiguration(getConfigurationPath(), getPropertiesPath()); + + + + CheckstyleRecipeRegistry.java + org.checkstyle.autofix.CheckstyleRecipeRegistry + createRecipe + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (checkConfig != null) { + + + + CheckstyleRecipeRegistry.java + org.checkstyle.autofix.CheckstyleRecipeRegistry + getRecipes + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to java/util/stream/Stream::filter with receiver + .filter(Objects::nonNull) + + + + ConfigurationLoader.java + org.checkstyle.autofix.parser.ConfigurationLoader + lambda$mapConfiguration$1 + org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator + removed call to java/util/Map::forEach + inherited.forEach(childConfig::setGlobalProperty); + + + + ConfigurationLoader.java + org.checkstyle.autofix.parser.ConfigurationLoader + loadConfiguration + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (propFile == null) { + + + + ConfigurationLoader.java + org.checkstyle.autofix.parser.ConfigurationLoader + loadConfiguration + org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator + removed call to java/util/Properties::load + props.load(input); + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable + getDescription + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/recipe/FinalLocalVariable::getDescription + return "Adds 'final' modifier to local variables that never have their values changed."; + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable + getDisplayName + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/recipe/FinalLocalVariable::getDisplayName + return "FinalLocalVariable recipe"; + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$FinalLocalVariableMarker + <init> + org.pitest.mutationtest.engine.gregor.mutators.experimental.MemberVariableMutator + Removed assignment to member variable id + this.id = uuid; + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$FinalLocalVariableMarker + getId + org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator + replaced return value with null for org/checkstyle/autofix/recipe/FinalLocalVariable$FinalLocalVariableMarker::getId + return id; + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$FinalLocalVariableMarker + withId + org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator + replaced return value with null for org/checkstyle/autofix/recipe/FinalLocalVariable$FinalLocalVariableMarker::withId + return (M) new FinalLocalVariableMarker(uuid); + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + <init> + org.pitest.mutationtest.engine.gregor.mutators.experimental.MemberVariableMutator + Removed assignment to member variable this$0 + private final class LocalVariableVisitor extends JavaIsoVisitor<ExecutionContext> { + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + addFinalModifier + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/openrewrite/Tree::randomId + modifiers.add(new J.Modifier(Tree.randomId(), finalPrefix, + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + addFinalModifier + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/util/List::addAll + modifiers.addAll(varDecl.getModifiers()); + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + handleMultiVariableDeclaration + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/util/List::isEmpty + if (violationsList.isEmpty()) { + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + handleMultiVariableDeclaration + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE + removed conditional - replaced equality check with false + if (violationsList.isEmpty()) { + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + handleMultiVariableDeclaration + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to org/openrewrite/java/tree/J$VariableDeclarations$NamedVariable::withPrefix with receiver + nonViolations.add(variable.withPrefix(Space.SINGLE_SPACE)); + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + isVariableDeclaration + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to org/openrewrite/Cursor::getParentTreeCursor with receiver + && !(getCursor().getParentTreeCursor() + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + isVariableDeclaration + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && varDecl.getTypeExpression() != null + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + isVariableDeclaration + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_ORDER_IF + removed conditional - replaced comparison check with true + && varDecl.getVariables().size() > 1 + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + isVariableDeclaration + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/openrewrite/Cursor::getValue + .getValue() instanceof J.ClassDeclaration); + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + isVariableDeclaration + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + .getValue() instanceof J.ClassDeclaration); + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + visitVariableDeclarations + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && declarations.getTypeExpression() != null + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + visitVariableDeclarations + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/openrewrite/Cursor::getValue + if (!(getCursor().getParentTreeCursor().getValue() instanceof J.ClassDeclaration) + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + visitVariableDeclarations + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (!(getCursor().getParentTreeCursor().getValue() instanceof J.ClassDeclaration) + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$LocalVariableVisitor + visitVariableDeclarations + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to org/openrewrite/Cursor::getParentTreeCursor with receiver + if (!(getCursor().getParentTreeCursor().getValue() instanceof J.ClassDeclaration) + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$MarkViolationVisitor + lambda$isAtViolationLocation$0 + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && absolutePath.endsWith(sourcePath) + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$MarkViolationVisitor + lambda$isAtViolationLocation$0 + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to java/nio/file/Path::toAbsolutePath with receiver + final Path absolutePath = violation.getFilePath().toAbsolutePath(); + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$MarkViolationVisitor + visitCompilationUnit + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to java/nio/file/Path::toAbsolutePath with receiver + this.sourcePath = cu.getSourcePath().toAbsolutePath(); + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$MarkViolationVisitor + visitVariableDeclarations + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/openrewrite/Cursor::getValue + if (!(getCursor().getParentTreeCursor().getValue() instanceof J.ClassDeclaration) + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$MarkViolationVisitor + visitVariableDeclarations + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (!(getCursor().getParentTreeCursor().getValue() instanceof J.ClassDeclaration) + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$MarkViolationVisitor + visitVariableDeclarations + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to org/openrewrite/Cursor::getParentTreeCursor with receiver + if (!(getCursor().getParentTreeCursor().getValue() instanceof J.ClassDeclaration) + + + + FinalLocalVariable.java + org.checkstyle.autofix.recipe.FinalLocalVariable$MarkViolationVisitor + visitVariableDeclarations + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/util/UUID::randomUUID + new FinalLocalVariableMarker(UUID.randomUUID())))); + + + + Header.java + org.checkstyle.autofix.recipe.Header + extractLicenseHeader + org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator + replaced call to org/checkstyle/autofix/parser/CheckConfiguration::getPropertyOrDefault with argument + .getPropertyOrDefault(CHARSET_PROPERTY, Charset.defaultCharset().name())); + + + + Header.java + org.checkstyle.autofix.recipe.Header + extractLicenseHeader + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/checkstyle/autofix/parser/CheckConfiguration::getProperty + header = config.getProperty(HEADER_PROPERTY); + + + + Header.java + org.checkstyle.autofix.recipe.Header + extractLicenseHeader + org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator + replaced call to org/checkstyle/autofix/parser/CheckConfiguration::getProperty with argument + header = config.getProperty(HEADER_PROPERTY); + + + + Header.java + org.checkstyle.autofix.recipe.Header + extractLicenseHeader + org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator + replaced call to org/checkstyle/autofix/recipe/Header::toLfLineEnding with argument + header = toLfLineEnding(Files.readString(Path.of(headerFilePath), charsetToUse)); + + + + Header.java + org.checkstyle.autofix.recipe.Header + extractLicenseHeader + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/checkstyle/autofix/parser/CheckConfiguration::hasProperty + if (config.hasProperty(HEADER_PROPERTY)) { + + + + Header.java + org.checkstyle.autofix.recipe.Header + extractLicenseHeader + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE + removed conditional - replaced equality check with false + if (config.hasProperty(HEADER_PROPERTY)) { + + + + Header.java + org.checkstyle.autofix.recipe.Header + getDescription + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/recipe/Header::getDescription + return "Adds headers to Java source files when missing."; + + + + Header.java + org.checkstyle.autofix.recipe.Header + getDisplayName + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/recipe/Header::getDisplayName + return "Header recipe"; + + + + Header.java + org.checkstyle.autofix.recipe.Header + toLfLineEnding + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to java/lang/String::replaceAll with receiver + return text.replaceAll("(?x)\\\\r(?=\\\\n)|\\r(?=\\n)", ""); + + + + Header.java + org.checkstyle.autofix.recipe.Header$HeaderVisitor + hasViolation + org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator + replaced boolean return with true for org/checkstyle/autofix/recipe/Header$HeaderVisitor::hasViolation + return violations.removeIf(violation -> { + + + + Header.java + org.checkstyle.autofix.recipe.Header$HeaderVisitor + lambda$extractCurrentHeader$0 + org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator + replaced call to org/checkstyle/autofix/recipe/Header::toLfLineEnding with argument + + toLfLineEnding(comment.getSuffix()); + + + + Header.java + org.checkstyle.autofix.recipe.Header$HeaderVisitor + lambda$extractCurrentHeader$0 + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/checkstyle/autofix/recipe/Header$HeaderVisitor::getCursor + return comment.printComment(getCursor()) + + + + Header.java + org.checkstyle.autofix.recipe.Header$HeaderVisitor + lambda$hasViolation$1 + org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator + replaced boolean return with true for org/checkstyle/autofix/recipe/Header$HeaderVisitor::lambda$hasViolation$1 + return violation.getFilePath().endsWith(filePath); + + + + Header.java + org.checkstyle.autofix.recipe.Header$HeaderVisitor + visit + org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator + replaced call to org/openrewrite/java/JavaIsoVisitor::visit with argument + J result = super.visit(tree, executionContext); + + + + Header.java + org.checkstyle.autofix.recipe.Header$HeaderVisitor + visit + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to java/nio/file/Path::toAbsolutePath with receiver + final Path filePath = sourceFile.getSourcePath().toAbsolutePath(); + + + + Header.java + org.checkstyle.autofix.recipe.Header$HeaderVisitor + visit + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (hasViolation(filePath) && !currentHeader.startsWith(licenseHeader)) { + + + + Header.java + org.checkstyle.autofix.recipe.Header$HeaderVisitor + visit + org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator + replaced call to org/openrewrite/java/JavaIsoVisitor::visit with argument + result = super.visit(sourceFile, executionContext); + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase + getDescription + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/recipe/HexLiteralCase::getDescription + return "Replace HexLiteral lowercase (a-f) with UpperCase (A-F) " + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase + getDisplayName + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/recipe/HexLiteralCase::getDisplayName + return "HexLiteralCase Recipe"; + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + isAtViolationLocation + org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator + replaced boolean return with true for org/checkstyle/autofix/recipe/HexLiteralCase$HexLiteralCaseVisitor::isAtViolationLocation + return violations.stream().anyMatch(violation -> { + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + lambda$isAtViolationLocation$0 + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && absolutePath.endsWith(sourcePath); + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + lambda$isAtViolationLocation$0 + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && violation.getColumn() == column + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + lambda$isAtViolationLocation$0 + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to java/nio/file/Path::toAbsolutePath with receiver + final Path absolutePath = violation.getFilePath().toAbsolutePath(); + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + lambda$isAtViolationLocation$0 + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + return violation.getLine() == line + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + lambda$isAtViolationLocation$0 + org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator + replaced boolean return with true for org/checkstyle/autofix/recipe/HexLiteralCase$HexLiteralCaseVisitor::lambda$isAtViolationLocation$0 + return violation.getLine() == line + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + shouldProcessLiteral + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE + removed conditional - replaced equality check with false + && (literal.getType() == JavaType.Primitive.Long + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + shouldProcessLiteral + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE + removed conditional - replaced equality check with false + && (valueSource.startsWith(HEX_PREFIX) + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + shouldProcessLiteral + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && isAtViolationLocation(literal); + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + shouldProcessLiteral + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + return valueSource != null + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + shouldProcessLiteral + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + || literal.getType() == JavaType.Primitive.Int) + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + shouldProcessLiteral + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + || valueSource.startsWith(HEX_PREFIX.toUpperCase(Locale.ROOT))) + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + visitCompilationUnit + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to java/nio/file/Path::toAbsolutePath with receiver + this.sourcePath = cu.getSourcePath().toAbsolutePath(); + + + + HexLiteralCase.java + org.checkstyle.autofix.recipe.HexLiteralCase$HexLiteralCaseVisitor + visitLiteral + org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator + replaced call to org/openrewrite/java/JavaIsoVisitor::visitLiteral with argument + J.Literal result = super.visitLiteral(literal, executionContext); + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper + calculateColumnOffset + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE + removed conditional - replaced equality check with false + if (lineBreakIndex == -1) { + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper + calculateColumnOffset + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/lang/String::length + result = out.length(); + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper + computePosition + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (exception.getCause() instanceof CancellationException) { + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper + computePosition + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to org/openrewrite/Cursor::getParentOrThrow with receiver + printer.visit(tree, capture, cursor.getParentOrThrow()); + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper + computePosition + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/lang/Integer::intValue + result = positionCalculator.apply(capture.getOut()); + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper + computePosition + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/util/function/Function::apply + result = positionCalculator.apply(capture.getOut()); + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper + computePosition + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/openrewrite/PrintOutputCapture::getOut + result = positionCalculator.apply(capture.getOut()); + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper + computePosition + org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator + replaced call to java/util/function/Function::apply with argument + result = positionCalculator.apply(capture.getOut()); + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper + computePosition + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/lang/String::valueOf + throw new IllegalStateException("Target element: " + targetElement + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper + lambda$computeColumnPosition$2 + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && literal.getValue() instanceof Number + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper + lambda$computeColumnPosition$2 + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && literal.getValueSource() != null + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper$1 + <init> + org.pitest.mutationtest.engine.gregor.mutators.experimental.MemberVariableMutator + Removed assignment to member variable val$cursor + new PrintOutputCapture<>(printer) { + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper$1 + append + org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator + replaced return value with null for org/checkstyle/autofix/PositionHelper$1::append + return super.append(text); + + + + PositionHelper.java + org.checkstyle.autofix.PositionHelper$1 + append + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/openrewrite/java/tree/Comment::printComment + super.append(comment.printComment(cursor) + comment.getSuffix()); + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport + getDescription + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/recipe/RedundantImport::getDescription + return "Remove duplicate imports, java.lang imports, and same package imports"; + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport + getDisplayName + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/recipe/RedundantImport::getDisplayName + return "Remove redundant imports"; + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport$RemoveRedundantImportsVisitor + getCurrentPackage + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (compilationUnit.getPackageDeclaration() != null) { + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport$RemoveRedundantImportsVisitor + isAtViolationLocation + org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator + replaced boolean return with true for org/checkstyle/autofix/recipe/RedundantImport$RemoveRedundantImportsVisitor::isAtViolationLocation + return violations.removeIf(violation -> { + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport$RemoveRedundantImportsVisitor + isRedundant + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/openrewrite/java/tree/J$Import::isStatic + else if (currentPackage != null && !importStmt.isStatic() + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport$RemoveRedundantImportsVisitor + isRedundant + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + else if (currentPackage != null && !importStmt.isStatic() + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport$RemoveRedundantImportsVisitor + isRedundant + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to org/openrewrite/java/tree/J$Import::isStatic + if (!importStmt.isStatic() && importName.startsWith(JAVA_LANG_PREFIX)) { + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport$RemoveRedundantImportsVisitor + isRedundant + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (!importStmt.isStatic() && importName.startsWith(JAVA_LANG_PREFIX)) { + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport$RemoveRedundantImportsVisitor + lambda$isAtViolationLocation$1 + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && absolutePath.endsWith(sourcePath); + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport$RemoveRedundantImportsVisitor + lambda$isAtViolationLocation$1 + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && violation.getColumn() == column + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport$RemoveRedundantImportsVisitor + lambda$isAtViolationLocation$1 + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to java/nio/file/Path::toAbsolutePath with receiver + final Path absolutePath = violation.getFilePath().toAbsolutePath(); + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport$RemoveRedundantImportsVisitor + lambda$visitCompilationUnit$0 + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_ELSE + removed conditional - replaced equality check with false + currentPackage) || !isAtViolationLocation(importStmt); }) + + + + RedundantImport.java + org.checkstyle.autofix.recipe.RedundantImport$RemoveRedundantImportsVisitor + visitCompilationUnit + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to java/nio/file/Path::toAbsolutePath with receiver + this.sourcePath = cu.getSourcePath().toAbsolutePath(); + + + + SarifReportParser.java + org.checkstyle.autofix.parser.SarifReportParser + createViolation + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to de/jcup/sarif_2_1_0/model/Result$Level::name + final String severity = result.getLevel().name(); + + + + SarifReportParser.java + org.checkstyle.autofix.parser.SarifReportParser + getFilePath + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (uri.startsWith(FILE_PREFIX)) { + + + + SarifReportParser.java + org.checkstyle.autofix.parser.SarifReportParser + getFilePath + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/nio/file/Path::of + result = Path.of(uri); + + + + SarifReportParser.java + org.checkstyle.autofix.parser.SarifReportParser + parse + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (run.getResults() != null) { + + + + SarifReportParser.java + org.checkstyle.autofix.parser.SarifReportParser + parse + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/lang/String::valueOf + throw new IllegalArgumentException("Failed to parse report: " + reportPath, exception); + + + + UpperEll.java + org.checkstyle.autofix.recipe.UpperEll + getDescription + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/recipe/UpperEll::getDescription + return "Replace lowercase 'l' suffix in long literals with uppercase 'L' " + + + + UpperEll.java + org.checkstyle.autofix.recipe.UpperEll + getDisplayName + org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator + replaced return value with "" for org/checkstyle/autofix/recipe/UpperEll::getDisplayName + return "UpperEll recipe"; + + + + UpperEll.java + org.checkstyle.autofix.recipe.UpperEll$UpperEllVisitor + lambda$isAtViolationLocation$0 + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && absolutePath.endsWith(sourcePath); + + + + UpperEll.java + org.checkstyle.autofix.recipe.UpperEll$UpperEllVisitor + lambda$isAtViolationLocation$0 + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to java/nio/file/Path::toAbsolutePath with receiver + final Path absolutePath = violation.getFilePath().toAbsolutePath(); + + + + UpperEll.java + org.checkstyle.autofix.recipe.UpperEll$UpperEllVisitor + visitCompilationUnit + org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator + replaced call to java/nio/file/Path::toAbsolutePath with receiver + this.sourcePath = cu.getSourcePath().toAbsolutePath(); + + + + UpperEll.java + org.checkstyle.autofix.recipe.UpperEll$UpperEllVisitor + visitLiteral + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + && result.getType() == JavaType.Primitive.Long + + + + UpperEll.java + org.checkstyle.autofix.recipe.UpperEll$UpperEllVisitor + visitLiteral + org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator + replaced call to org/openrewrite/java/JavaIsoVisitor::visitLiteral with argument + J.Literal result = super.visitLiteral(literal, executionContext); + + + + UpperEll.java + org.checkstyle.autofix.recipe.UpperEll$UpperEllVisitor + visitLiteral + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (valueSource != null && valueSource.endsWith(LOWERCASE_L) + + + + XmlReportParser.java + org.checkstyle.autofix.parser.XmlReportParser + parse + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/util/Objects::requireNonNull + Objects.requireNonNull(filename, "File name can not be null"); + + + + XmlReportParser.java + org.checkstyle.autofix.parser.XmlReportParser + parse + org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator + replaced call to java/util/Objects::requireNonNull with argument + Objects.requireNonNull(filename, "File name can not be null"); + + + + XmlReportParser.java + org.checkstyle.autofix.parser.XmlReportParser + parse + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/lang/String::valueOf + throw new IllegalArgumentException("Failed to parse checkstyle XML report from: " + + + + XmlReportParser.java + org.checkstyle.autofix.parser.XmlReportParser + parseErrorTag + org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator + removed call to java/util/Optional::empty + Optional<CheckstyleCheck> source = Optional.empty(); + + + + XmlReportParser.java + org.checkstyle.autofix.parser.XmlReportParser + parseErrorTag + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (source.isPresent()) { + + + + XmlReportParser.java + org.checkstyle.autofix.parser.XmlReportParser + parseFileTag + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + if (FILENAME_ATTR.equals(attribute.getName().getLocalPart())) { + + + + XmlReportParser.java + org.checkstyle.autofix.parser.XmlReportParser + parseFileTag + org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF + removed conditional - replaced equality check with true + while (attributes.hasNext()) { + + diff --git a/pom.xml b/pom.xml index 2c1d0d1..f99e112 100644 --- a/pom.xml +++ b/pom.xml @@ -46,6 +46,10 @@ 3.6.0 12.1.0 + + + 1.22.0 + 1.2.3 @@ -278,4 +282,71 @@ + + + pitest + + + + org.pitest + pitest-maven + ${pitest.version} + + + org.pitest + pitest-junit5-plugin + ${pitest.junit5.version} + + + + + org.checkstyle.* + + + org.checkstyle.* + + + + INVERT_NEGS + MATH + NEGATE_CONDITIONALS + NON_VOID_METHOD_CALLS + REMOVE_CONDITIONALS_EQUAL_ELSE + REMOVE_CONDITIONALS_EQUAL_IF + REMOVE_CONDITIONALS_ORDER_ELSE + REMOVE_CONDITIONALS_ORDER_IF + VOID_METHOD_CALLS + EXPERIMENTAL_ARGUMENT_PROPAGATION + EXPERIMENTAL_BIG_DECIMAL + EXPERIMENTAL_BIG_INTEGER + EXPERIMENTAL_MEMBER_VARIABLE + EXPERIMENTAL_NAKED_RECEIVER + REMOVE_INCREMENTS + EXPERIMENTAL_SWITCH + REMOVE_SWITCH + FALSE_RETURNS + TRUE_RETURNS + EMPTY_RETURNS + NULL_RETURNS + PRIMITIVE_RETURNS + + + + XML + HTML + + + 4 + 10 + 50000 + + 85 + 90 + + + + + + +