Issue #13999: Resolve Pitest suppression for ancestor.getType() == TokenTypes.LITERAL_TRY of JavadocMethod#14410
Merged
nrmancuso merged 1 commit intoFeb 12, 2024
Conversation
Contributor
Author
|
GitHub, generate report |
Contributor
|
@sktpy How did you get that exclamation icon in your post? |
d114536 to
4e720b7
Compare
ancestor.getType() == TokenTypes.LITERAL_TRY of JavadocMethod
Contributor
Author
|
@rnveach GitHub supports rendering of emojis in Markdown, which extends to the comments as well. Another way is github's emoji markup, which would be |
360059d to
d5c7146
Compare
…ype() == TokenTypes.LITERAL_TRY` of JavadocMethod
d5c7146 to
2c6df13
Compare
Contributor
Author
|
GitHub, generate report |
rnveach
reviewed
Feb 6, 2024
rnveach
approved these changes
Feb 9, 2024
53 tasks
romani
approved these changes
Feb 9, 2024
romani
left a comment
Member
There was a problem hiding this comment.
thanks a lot for wide explanation.
I placed your PR as example to issue description to let others do similar.
Contributor
Author
|
The pleasure was all mine, mutant hunting is a lot of fun 👾 👾 👾 |
nrmancuso
approved these changes
Feb 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #13999
(Check Documentation)
Mutation:
checkstyle/config/pitest-suppressions/pitest-javadoc-suppressions.xml
Lines 111 to 118 in 943576f
Definitions:
ancestor.getType() == TokenTypes.LITERAL_TRYancestor.findFirstToken(TokenTypes.LITERAL_CATCH) != nulltrue.Why mutant survives:
LITERAL_CATCHcannot exist without being the child ofLITERAL_TRY.trueimplicitly means that the type ofancestorisLITERAL_TRY.Why mutant cannot be killed:
LITERAL_CATCHexist without a precedingLITERAL_TRYblockWhy not remove second-operand:
throwis inside atryblock which has a correspondingcatchblock.catchblock, which cannot exist without atryblock,tryblock can exist without acatchblock.ancestoris notLITERAL_TRY,findFirstToken()is not only useless for the reason that it won't find aLITERAL_CATCH;ancestorhas a significant number of children.Change:
Updated the code as Pitest mutated, except it is now the last operand of the or-statement to help mitigate the performance impact by a bit.
(Although this shifting of operands may produce negligible performance gains, still better than none)
Usage:
Definition and the only usage for the method with mutant is in
JavadocMethodCheck. (1 usage)JavadocMethodCheckdoes not affect any other class.Call Stack:
Regression:
Result: No differences found. (Report)
Diff Regression config: https://gist.githubusercontent.com/sktpy/44a31ea4e946a0755fa3e331fd65de98/raw/233b4d68f7cd46f957ee37e94813922d5fd1733c/check.xml
Diff Regression projects: https://gist.githubusercontent.com/sktpy/49239940660ceaef88d224d6abc8878e/raw/058cbb1b662c9276e934fdffbb99cec760332398/projects-to-test-on.properties