Skip to content

Issue #13328: Kill mutation for HiddenField#13182

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:HFC1
Aug 1, 2023
Merged

Issue #13328: Kill mutation for HiddenField#13182
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:HFC1

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Jun 8, 2023

Issue #13328: Kill mutation for HiddenField


Check:-

https://checkstyle.org/checks/coding/hiddenfield.html#HiddenField


Mutations

<mutation unstable="false">
<sourceFile>HiddenFieldCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.HiddenFieldCheck$FieldFrame</mutatedClass>
<mutatedMethod>containsInstanceField</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator>
<description>removed conditional - replaced equality check with true</description>
<lineContent>return instanceFields.contains(field)</lineContent>
</mutation>


Explaination

Tried various ways but no test cases were found.


Regression

Report-1 :- https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/76d0b0f_2023195339/reports/diff/index.html

Report-2 :- https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/76d0b0f_2023170225/reports/diff/index.html


Diff Regression config: https://gist.githubusercontent.com/Kevin222004/e922f9f79f4b5245caba9b44cd2d1f0d/raw/50a61d0d72c5a09bd74a383907fe0021d28f1763/hidden.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

github-actions bot commented Jun 8, 2023

Report generation failed on phase "make_report",
step "Generate report".
Link: https://github.com/checkstyle/checkstyle/actions/runs/5213953279

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 8, 2023

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

@github-actions
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 changed the title Issue #13109: Kill mutation for HiddenField Issue #13328: Kill mutation for HiddenField Jul 23, 2023
@Kevin222004 Kevin222004 marked this pull request as ready for review July 23, 2023 13:18
Copy link
Copy Markdown
Contributor

@nrmancuso nrmancuso left a comment

Choose a reason for hiding this comment

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

Fields should always have a parent, regression turned up nothing, I am good to merge.

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

@romani romani requested a review from rdiachenko July 29, 2023 18:16
@romani romani assigned rdiachenko and unassigned romani Jul 29, 2023
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

@rdiachenko
Copy link
Copy Markdown
Member

rebased

@romani
Copy link
Copy Markdown
Member

romani commented Jul 30, 2023

Pitest failure test (common) https://github.com/checkstyle/checkstyle/actions/runs/5705747270/job/15460721241?pr=13182#step:7:24

diff --git a/config/pitest-suppressions/pitest-common-suppressions.xml b/config/pitest-suppressions/pitest-common-suppressions.xml
index 1ed5890..3b8d487 100644
--- a/config/pitest-suppressions/pitest-common-suppressions.xml
+++ b/config/pitest-suppressions/pitest-common-suppressions.xml
@@ -45,6 +45,15 @@
     <lineContent>final String stripped = CommonUtil.relativizeAndNormalizePath(basedir, fileName);</lineContent>
   </mutation>
 
+  <mutation unstable="false">
+    <sourceFile>Checker.java</sourceFile>
+    <mutatedClass>com.puppycrawl.tools.checkstyle.Checker</mutatedClass>
+    <mutatedMethod>finishLocalSetup</mutatedMethod>
+    <mutator>org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator</mutator>
+    <description>removed call to com/puppycrawl/tools/checkstyle/LocalizedMessage::setLocale</description>
+    <lineContent>LocalizedMessage.setLocale(locale);</lineContent>
+  </mutation>
+

Very strange.
Need to be restarted few times.

@romani
Copy link
Copy Markdown
Member

romani commented Jul 30, 2023

pitest is green, restarted one more time .

@romani
Copy link
Copy Markdown
Member

romani commented Jul 30, 2023

@rdiachenko , restart it one more time on your next code review time.

@rdiachenko
Copy link
Copy Markdown
Member

@rdiachenko , restart it one more time on your next code review time.

done

@romani romani merged commit 2bd1a8b into checkstyle:master Aug 1, 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