Skip to content
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 #7800: Resolve Pitest Issues - AvoidStarImportCheck(2) #7840

Merged
merged 1 commit into from Mar 15, 2020

Conversation

HuGanghui
Copy link
Contributor

@HuGanghui HuGanghui commented Mar 13, 2020

Issue #7800: Resolve Pitest Issues - AvoidStaticImportCheck(2)

As described as in #7800:

Pitest report

Link: https://huganghui.github.io/7800-AvoidStarImportCheck(2)/before-pit-reports/202003131405/
Surviving mutations:
on line 188: removed conditional - replaced equality check with false → SURVIVED I am focusing on it.
on line 224: removed conditional - replaced equality check with true → SURVIVED referenced by #7799, wilcoln is focusing on it.

Hardcoded mutation

mutation cs branch: HuGanghui@1578ac0
comment:
Looking at the pitest report, we can see that the surviving mutation is the one for which removed conditional - replaced equality check with false → SURVIVED, this is equivalent as simply removing the entire condition and keeping only the else body. Which I did.

Regression diff report

Used only guava and elastic-search, but there is no diff found.
Link: https://huganghui.github.io/7800-AvoidStarImportCheck(2)/hardcoded-reports/diff/

Code Logic Analysis

Although there is no diff found in Regression diff report, I find that the reason why the surviving mutation exists is maybe a small oversight in an existing UT , details as follows:

"java.io,java.lang,javax.swing.WindowConstants.*, javax.swing.WindowConstants");

javax.swing.WindowConstants is redundant in this UT, so I remove this import and do Pitest, report shows it can kill the mutation.

Pitest report after removing redundant code in the UT mentioned above

Link: https://huganghui.github.io/7800-AvoidStarImportCheck(2)/after-pit-reports/202003131742/
now on line 188, is KILLED
on line 188: removed conditional - replaced equality check with false → KILLED

@strkkk
Copy link
Member

strkkk commented Mar 13, 2020

Regression diff report
Used only guava and elastic-search, but there is no diff found.
Link: https://huganghui.github.io//7800-AvoidStarImportCheck(2)/hardcoded-reports/diff/

@HuGanghui
Everything looks good so far, but please generate regression report for as much projects as possible, 2 is not enough.

@HuGanghui
Copy link
Contributor Author

@strkkk ok, I will update regression report with more projects later.

@HuGanghui
Copy link
Contributor Author

@strkkk I have updated the regression report.

@rnveach rnveach requested a review from strkkk March 14, 2020 10:47
@HuGanghui HuGanghui changed the title Issue #7800: Resolve Pitest Issues - AvoidStaticImportCheck(2) Issue #7800: Resolve Pitest Issues - AvoidStarImportCheck(2) Mar 14, 2020
@strkkk strkkk merged commit 5ec8cfe into checkstyle:master Mar 15, 2020
@HuGanghui HuGanghui deleted the 7800-test branch March 15, 2020 12:10
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.

None yet

3 participants