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
Issue #12282: Resolve Pitest suppression for ParenPad #12318
Conversation
Github, generate report |
Tests are failing, no need for report. |
Report generation job failed on phase "make_report", step "Generate report". |
Suppressions: checkstyle/.ci/pitest-suppressions/pitest-whitespace-suppressions.xml Lines 93 to 109 in fa68569
There are 11 cases, 5 groups. We are looking for a 3 and a 7 (0 index). case 0 fails tests. My local bytecode:
Looking at the table, you can identify that the bytecode switch mapping does not correlate to the source. 67 and 155 actually represent token IDs. 67 = So it is all confirmed. Also to note, the cases are ordered ascending by token ID. |
@Kevin222004 I believe the issue is ordering. This does actually have a bytecode connection as the internals of the switch have a different order than the source. We will need to update our wiki with this information. I believe the tokens you want to investigate are |
Error that failed report is:
This may show that CI can't handle big loads and you may have to trim the projects or use your local with more memory. I normally have to give regression 4 gigs of RAM. One thought is for tokens, I don't believe you need to separate out individual tokens. They all could have been set as all the acceptable tokens. |
Am I understand this correctly?
Means 3rd group of cases in switch have survavals. If there are few cases, some of them. |
No. It doesn't count by groups, only by |
Imagine you have source like:
Pitest actually sees and counts:
Groups only matter for code being executed when case matches. Order of cases is based on how it lays them out, which seems to be by number, sorted. |
Thanks a lot, I placed note to https://github.com/checkstyle/checkstyle/wiki/How-to-Generate-and-Analyze-Pitest-Reports#experimental-switch-mutator |
@rnveach thanks for the lots of information
can you please tell how you decided it that the int 67 is for LITERAL_SYNCHRONIZED and same for 155 Is it expected that if we make changes and test tare not failing the mutation will kill |
I didn't decide, I determined. ANTLR is the one that decides on the numbering.
Either System.out the value of these tokens or you can look in
If you apply the mutation, and tests are failing, then either the mutation should have been killed, or there is other factors at play (like caching).
Please do things in order. |
Github, generate report |
@rnveach all the unit test are passing but all the it testing are failing. I am looking for it that why it is happening |
Only |
Сcan you copy code from https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/6aa50c2_2022192038/reports/diff/java-design-patterns/index.html#A1 to our Inputs to recheck is pitest is become killed |
@romani I have created the test file as you asked but it is throwing all the time exception that AST is null. All the things are looking good, but i don't understand that, I am updating the branch |
@Kevin222004 Every case of NullPointerException (or any other failure in the check) is a new test case that kills your mutation :) |
@nrmancuso Yes, the issue has been resolved i will update the branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Items
src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheck.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Items
...com/puppycrawl/tools/checkstyle/checks/whitespace/parenpad/InputParenPadForSynchronized.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok to merge
Issue #12282: Resolve Pitest suppression for ParenPad
Diff Regression config: https://gist.githubusercontent.com/Kevin222004/e206f8b15b0d8c04e1d6b1fbded90dbe/raw/6b6a30c0a864caad500abed316e2e7a51d99c59b/config.xml