Skip to content

Issue #13501: Kill mutation for DetailAstImpl-4#13649

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:DetailAstImpl
Sep 6, 2023
Merged

Issue #13501: Kill mutation for DetailAstImpl-4#13649
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:DetailAstImpl

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Aug 27, 2023

Issue #13501: Kill mutation for DetailAstImpl-4

https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/DetailAstImpl.java


Mutations

<mutation unstable="false">
<sourceFile>DetailAstImpl.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.DetailAstImpl</mutatedClass>
<mutatedMethod>addChild</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator>
<description>removed call to com/puppycrawl/tools/checkstyle/DetailAstImpl::getLastChild</description>
<lineContent>astImpl.previousSibling = (DetailAstImpl) getLastChild();</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>DetailAstImpl.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.DetailAstImpl</mutatedClass>
<mutatedMethod>addChild</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.MemberVariableMutator</mutator>
<description>Removed assignment to member variable previousSibling</description>
<lineContent>astImpl.previousSibling = (DetailAstImpl) getLastChild();</lineContent>
</mutation>


Explaination

astImpl.previousSibling = (DetailAstImpl) getLastChild();

This line is mutated.

The similar reason #13391 and #13390 (comment)

((DetailAstImpl) temp).setNextSibling(child);

here the next sibiling will be set


Regression

No DIff

Report-1 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-17-02-02/part3-report/index.html

Report-2 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-17-02-02/sevntu-check-regression_part_1-report/index.html

Report-3 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-17-02-02/checks-nonjavadoc-error-report/index.html

Report-4 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-17-02-02/sevntu-check-regression_part_2-report/index.html

Report-5 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-17-02-02/checks-only-javadoc-error-report/index.html

Report-6 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-17-02-02/part1-report/index.html

Report-7 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-17-02-02/part5-report/index.html

Report-8 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-17-02-02/part6-report/index.html

Report-9 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-17-02-02/part4-report/index.html

Report-10 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-17-02-02/antlr-report/index.html

Report-11 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-17-02-02/part2-report/index.html

Report-12 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-21-10-43/part3-report/index.html

Report-13 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-21-10-43/sevntu-check-regression_part_1-report/index.html

Report-14 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-21-10-43/checks-nonjavadoc-error-report/index.html

Report-15 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-21-10-43/sevntu-check-regression_part_2-report/index.html

Report-16 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-21-10-43/checks-only-javadoc-error-report/index.html

Report-17 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-21-10-43/part1-report/index.html

Report-18 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-21-10-43/part5-report/index.html

Report-19 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-21-10-43/part6-report/index.html

Report-20 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-21-10-43/part4-report/index.html

Report-21 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-21-10-43/antlr-report/index.html

Report-22 :- https://kevin222004.github.io/reports/DetailAstImpl/2023-08-27-T-21-10-43/part2-report/index.html

@Kevin222004 Kevin222004 changed the title Issue #13501: Kill mutation for DetailAstImpl-3 Issue #13501: Kill mutation for DetailAstImpl-4 Aug 27, 2023
@Kevin222004 Kevin222004 marked this pull request as ready for review August 27, 2023 09:47
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.

Ok to merge

secondChild.setText("SecondChild");
parent.addChild(secondChild);

assertWithMessage("")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please put a proper message, check other tests to get an idea.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

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 Vyom-Yadav Sep 5, 2023
@romani romani merged commit dbcbd67 into checkstyle:master Sep 6, 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