Skip to content

Issue #13328: Kill mutation for OneStatmentPerLineCheck-4#13281

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:OneLast
Jun 30, 2023
Merged

Issue #13328: Kill mutation for OneStatmentPerLineCheck-4#13281
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:OneLast

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Jun 21, 2023

Issue #13328: Kill mutation for OneStatmentPerLineCheck-4


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 lastVariableResourceStatementEnd</description>
<lineContent>lastVariableResourceStatementEnd = -1;</lineContent>
</mutation>


Explaination

Test added


Regression

Diff Regression config: https://gist.githubusercontent.com/Kevin222004/3bd236a24ed8eacd760e6b12b47f7455/raw/97d7a64aa97fc35488a6db5d7345ee23ae9b9507/olc.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/21e3934e85f802e2fbd48af06d122364/raw/604256badd733d8568064f371d55657c04b00dfd/test-projects-2.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

@Vyom-Yadav Vyom-Yadav requested review from Vyom-Yadav and romani and removed request for Vyom-Yadav and romani June 23, 2023 11:02
@Vyom-Yadav
Copy link
Copy Markdown
Member

@romani
Copy link
Copy Markdown
Member

romani commented Jun 27, 2023

@Kevin222004 , please rebase and use extend input by case in diff report.

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Only one single diff is found from the whole regression. once again I have spent hours to figure out this but I really don't find anything.

So after making an assumption I go to Intellij repo to find what was the previous file of it and I found
the code something like https://github.com/JetBrains/intellij-community/blob/master/plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/try_finally_can_be_try_with_resources/Catch.java

  void m() throws IOException {
    InputStream in = null;
    try<caret> {
      in = new FileInputStream("filename");
    }catch (Exception e) {
    }finally{
      in.close();
    }
  }

I am suspecting that diff is because of this code. I have not done extra testing to prove this but will provide soon.

@Kevin222004 Kevin222004 changed the title Issue #13109: Kill mutation for OneStatmentPerLineCheck-4 Issue #13328: Kill mutation for OneStatmentPerLineCheck-4 Jun 30, 2023
@Kevin222004
Copy link
Copy Markdown
Contributor Author

@romani Test added :)

Copy link
Copy Markdown
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

The best form of PR for Pitest.
Quick merge

@romani romani merged commit c3ab3fd into checkstyle:master Jun 30, 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.

3 participants