Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves Pitest for VariableDeclarationUsageDistanceCheck #13095

Closed
Kevin222004 opened this issue May 29, 2023 · 2 comments
Closed

Resolves Pitest for VariableDeclarationUsageDistanceCheck #13095

Kevin222004 opened this issue May 29, 2023 · 2 comments
Assignees
Milestone

Comments

@Kevin222004
Copy link
Collaborator

Part of #13089

This issue will cover all the suppressed mutation for VariableDeclarationUsageDistanceCheck.

<mutation unstable="false">
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass>
<mutatedMethod>calculateDistanceBetweenScopes</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator</mutator>
<description>replaced call to java/util/Objects::requireNonNullElse with argument</description>
<lineContent>Objects.requireNonNullElse(exprWithVariableUsage, blockWithVariableUsage);</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass>
<mutatedMethod>calculateDistanceBetweenScopes</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.RemoveSwitchMutator_4</mutator>
<description>RemoveSwitch 4 (case value 85)</description>
<lineContent>switch (blockWithVariableUsage.getType()) {</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass>
<mutatedMethod>getDistToVariableUsageInChildNode</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.RemoveSwitchMutator_1</mutator>
<description>RemoveSwitch 1 (case value 10)</description>
<lineContent>switch (examineNode.getType()) {</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>VariableDeclarationUsageDistanceCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck</mutatedClass>
<mutatedMethod>getDistToVariableUsageInChildNode</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.RemoveSwitchMutator_6</mutator>
<description>RemoveSwitch 6 (case value 91)</description>
<lineContent>switch (examineNode.getType()) {</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.NonVoidMethodCallMutator</mutator>
<description>removed call to com/puppycrawl/tools/checkstyle/api/DetailAST::getText</description>
<lineContent>.findFirstToken(TokenTypes.IDENT).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.experimental.NakedReceiverMutator</mutator>
<description>replaced call to com/puppycrawl/tools/checkstyle/api/DetailAST::findFirstToken with receiver</description>
<lineContent>.findFirstToken(TokenTypes.IDENT).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.NonVoidMethodCallMutator</mutator>
<description>removed call to java/lang/String::equals</description>
<lineContent>isUsedVariableDeclarationFound = variableName.equals(currentVariableName);</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.experimental.NakedReceiverMutator</mutator>
<description>replaced call to com/puppycrawl/tools/checkstyle/api/DetailAST::getNextSibling with receiver</description>
<lineContent>DetailAST exprBetweenBrackets = openingBracket.getNextSibling();</lineContent>
</mutation>

@Kevin222004
Copy link
Collaborator Author

I am on it.

Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue May 29, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue May 29, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue May 29, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue May 29, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue May 29, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue May 29, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue May 29, 2023
@github-actions github-actions bot added this to the 10.12.1 milestone May 29, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue May 29, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue May 29, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue May 29, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 1, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 1, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 1, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 1, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 1, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 1, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 1, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 1, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 1, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 1, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 2, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 2, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 7, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 12, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 13, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 19, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 19, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 20, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 23, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 23, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 23, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 24, 2023
Kevin222004 added a commit to Kevin222004/checkstyle that referenced this issue Jun 26, 2023
romani pushed a commit to Kevin222004/checkstyle that referenced this issue Jun 29, 2023
@github-actions github-actions bot modified the milestones: 10.12.1, 10.12.2 Jul 1, 2023
@romani
Copy link
Member

romani commented Jul 2, 2023

Resolved at scope of #13109

Point 6)

@romani romani closed this as completed Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants