Skip to content

Issue #13109: Kill mutation for OneStatmentPerLineCheck-3#13278

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:OS1
Jun 24, 2023
Merged

Issue #13109: Kill mutation for OneStatmentPerLineCheck-3#13278
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:OS1

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Jun 20, 2023

Issue #13109: Kill mutation for OneStatmentPerLineCheck-3


Check

https://checkstyle.org/config_coding.html#OneStatementPerLine


Mutation

<mutation unstable="false">
<sourceFile>OneStatementPerLineCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck</mutatedClass>
<mutatedMethod>beginTree</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.MemberVariableMutator</mutator>
<description>Removed assignment to member variable forStatementEnd</description>
<lineContent>forStatementEnd = -1;</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>OneStatementPerLineCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck</mutatedClass>
<mutatedMethod>beginTree</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.MemberVariableMutator</mutator>
<description>Removed assignment to member variable inForHeader</description>
<lineContent>inForHeader = false;</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>OneStatementPerLineCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck</mutatedClass>
<mutatedMethod>beginTree</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.MemberVariableMutator</mutator>
<description>Removed assignment to member variable isInLambda</description>
<lineContent>isInLambda = false;</lineContent>
</mutation>


Explaination

This all are getting their origin value at the time of init while leaving token. so no need to reset


Regression

Diff Regression config: https://gist.githubusercontent.com/Kevin222004/3bd236a24ed8eacd760e6b12b47f7455/raw/97d7a64aa97fc35488a6db5d7345ee23ae9b9507/olc.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/9600f179b602d4c971bdb0a050099005/raw/360a95ed7bb60d7a0956e531199d484c4d6f6617/test-projects.properties
Report label: Regression-2

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

@github-actions
Copy link
Copy Markdown
Contributor

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

@github-actions
Copy link
Copy Markdown
Contributor

@Kevin222004
Copy link
Copy Markdown
Contributor Author

both regressions are different I forget to change label

Copy link
Copy Markdown
Member

@rdiachenko rdiachenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Copy Markdown
Member

@Vyom-Yadav Vyom-Yadav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Vyom-Yadav Vyom-Yadav assigned romani and unassigned romani and Vyom-Yadav Jun 23, 2023
@romani romani merged commit 1976aad into checkstyle:master Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants