|
460 | 460 | <lineContent>header = config.getProperty(HEADER_PROPERTY);</lineContent> |
461 | 461 | </mutation> |
462 | 462 |
|
463 | | - <mutation unstable="false"> |
464 | | - <sourceFile>Header.java</sourceFile> |
465 | | - <mutatedClass>org.checkstyle.autofix.recipe.Header</mutatedClass> |
466 | | - <mutatedMethod>extractLicenseHeader</mutatedMethod> |
467 | | - <mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator</mutator> |
468 | | - <description>replaced call to org/checkstyle/autofix/recipe/Header::toLfLineEnding with argument</description> |
469 | | - <lineContent>header = toLfLineEnding(Files.readString(Path.of(headerFilePath), charsetToUse));</lineContent> |
470 | | - </mutation> |
471 | | - |
472 | 463 | <mutation unstable="false"> |
473 | 464 | <sourceFile>Header.java</sourceFile> |
474 | 465 | <mutatedClass>org.checkstyle.autofix.recipe.Header</mutatedClass> |
|
505 | 496 | <lineContent>return "Header recipe";</lineContent> |
506 | 497 | </mutation> |
507 | 498 |
|
508 | | - <mutation unstable="false"> |
509 | | - <sourceFile>Header.java</sourceFile> |
510 | | - <mutatedClass>org.checkstyle.autofix.recipe.Header</mutatedClass> |
511 | | - <mutatedMethod>toLfLineEnding</mutatedMethod> |
512 | | - <mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator> |
513 | | - <description>replaced call to java/lang/String::replaceAll with receiver</description> |
514 | | - <lineContent>return text.replaceAll("(?x)\\\\r(?=\\\\n)|\\r(?=\\n)", "");</lineContent> |
515 | | - </mutation> |
516 | | - |
517 | 499 | <mutation unstable="false"> |
518 | 500 | <sourceFile>Header.java</sourceFile> |
519 | 501 | <mutatedClass>org.checkstyle.autofix.recipe.Header$HeaderVisitor</mutatedClass> |
|
523 | 505 | <lineContent>return violations.removeIf(violation -> {</lineContent> |
524 | 506 | </mutation> |
525 | 507 |
|
526 | | - <mutation unstable="false"> |
527 | | - <sourceFile>Header.java</sourceFile> |
528 | | - <mutatedClass>org.checkstyle.autofix.recipe.Header$HeaderVisitor</mutatedClass> |
529 | | - <mutatedMethod>lambda$extractCurrentHeader$0</mutatedMethod> |
530 | | - <mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.ArgumentPropagationMutator</mutator> |
531 | | - <description>replaced call to org/checkstyle/autofix/recipe/Header::toLfLineEnding with argument</description> |
532 | | - <lineContent>+ toLfLineEnding(comment.getSuffix());</lineContent> |
533 | | - </mutation> |
534 | | - |
535 | 508 | <mutation unstable="false"> |
536 | 509 | <sourceFile>Header.java</sourceFile> |
537 | 510 | <mutatedClass>org.checkstyle.autofix.recipe.Header$HeaderVisitor</mutatedClass> |
538 | 511 | <mutatedMethod>lambda$extractCurrentHeader$0</mutatedMethod> |
539 | 512 | <mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator> |
540 | 513 | <description>removed call to org/checkstyle/autofix/recipe/Header$HeaderVisitor::getCursor</description> |
541 | | - <lineContent>return comment.printComment(getCursor())</lineContent> |
| 514 | + <lineContent>return comment.printComment(getCursor()) + comment.getSuffix();</lineContent> |
542 | 515 | </mutation> |
543 | 516 |
|
544 | 517 | <mutation unstable="false"> |
|
730 | 703 | <lineContent>J.Literal result = super.visitLiteral(literal, executionContext);</lineContent> |
731 | 704 | </mutation> |
732 | 705 |
|
| 706 | + <mutation unstable="false"> |
| 707 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 708 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile</mutatedClass> |
| 709 | + <mutatedMethod>getDescription</mutatedMethod> |
| 710 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator</mutator> |
| 711 | + <description>replaced return value with "" for org/checkstyle/autofix/recipe/NewlineAtEndOfFile::getDescription</description> |
| 712 | + <lineContent>return "Some tools work better when files end with an empty line.";</lineContent> |
| 713 | + </mutation> |
| 714 | + |
| 715 | + <mutation unstable="false"> |
| 716 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 717 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile</mutatedClass> |
| 718 | + <mutatedMethod>getDisplayName</mutatedMethod> |
| 719 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator</mutator> |
| 720 | + <description>replaced return value with "" for org/checkstyle/autofix/recipe/NewlineAtEndOfFile::getDisplayName</description> |
| 721 | + <lineContent>return "End files with a single newline";</lineContent> |
| 722 | + </mutation> |
| 723 | + |
| 724 | + <mutation unstable="false"> |
| 725 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 726 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 727 | + <mutatedMethod>determineLineEnding</mutatedMethod> |
| 728 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator> |
| 729 | + <description>removed call to org/checkstyle/autofix/recipe/NewlineAtEndOfFile$NewLineAtEndOfFileVisitor::getAutodetectedLineEnding</description> |
| 730 | + <lineContent>case "lf_cr_crlf" -> getAutodetectedLineEnding(sourceFile);</lineContent> |
| 731 | + </mutation> |
| 732 | + |
| 733 | + <mutation unstable="false"> |
| 734 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 735 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 736 | + <mutatedMethod>determineLineEnding</mutatedMethod> |
| 737 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator> |
| 738 | + <description>removed call to java/lang/System::lineSeparator</description> |
| 739 | + <lineContent>case "system" -> System.lineSeparator();</lineContent> |
| 740 | + </mutation> |
| 741 | + |
| 742 | + <mutation unstable="false"> |
| 743 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 744 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 745 | + <mutatedMethod>determineLineEnding</mutatedMethod> |
| 746 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.RemoveSwitchMutator_2</mutator> |
| 747 | + <description>RemoveSwitch 2 (case value 2)</description> |
| 748 | + <lineContent>return switch (lineSeparatorConfig) {</lineContent> |
| 749 | + </mutation> |
| 750 | + |
| 751 | + <mutation unstable="false"> |
| 752 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 753 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 754 | + <mutatedMethod>determineLineEnding</mutatedMethod> |
| 755 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.RemoveSwitchMutator_3</mutator> |
| 756 | + <description>RemoveSwitch 3 (case value 3)</description> |
| 757 | + <lineContent>return switch (lineSeparatorConfig) {</lineContent> |
| 758 | + </mutation> |
| 759 | + |
| 760 | + <mutation unstable="false"> |
| 761 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 762 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 763 | + <mutatedMethod>determineLineEnding</mutatedMethod> |
| 764 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.RemoveSwitchMutator_4</mutator> |
| 765 | + <description>RemoveSwitch 4 (case value 4)</description> |
| 766 | + <lineContent>return switch (lineSeparatorConfig) {</lineContent> |
| 767 | + </mutation> |
| 768 | + |
| 769 | + <mutation unstable="false"> |
| 770 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 771 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 772 | + <mutatedMethod>getAutodetectedLineEnding</mutatedMethod> |
| 773 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator> |
| 774 | + <description>removed call to org/openrewrite/style/Style::from</description> |
| 775 | + <lineContent>Style.from(GeneralFormatStyle.class, sourceFile, () -> {</lineContent> |
| 776 | + </mutation> |
| 777 | + |
| 778 | + <mutation unstable="false"> |
| 779 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 780 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 781 | + <mutatedMethod>getAutodetectedLineEnding</mutatedMethod> |
| 782 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator> |
| 783 | + <description>removed call to org/openrewrite/style/GeneralFormatStyle::newLine</description> |
| 784 | + <lineContent>return generalFormatStyle.newLine();</lineContent> |
| 785 | + </mutation> |
| 786 | + |
| 787 | + <mutation unstable="false"> |
| 788 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 789 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 790 | + <mutatedMethod>getAutodetectedLineEnding</mutatedMethod> |
| 791 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator</mutator> |
| 792 | + <description>replaced return value with "" for org/checkstyle/autofix/recipe/NewlineAtEndOfFile$NewLineAtEndOfFileVisitor::getAutodetectedLineEnding</description> |
| 793 | + <lineContent>return generalFormatStyle.newLine();</lineContent> |
| 794 | + </mutation> |
| 795 | + |
| 796 | + <mutation unstable="false"> |
| 797 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 798 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 799 | + <mutatedMethod>hasViolation</mutatedMethod> |
| 800 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator</mutator> |
| 801 | + <description>replaced boolean return with true for org/checkstyle/autofix/recipe/NewlineAtEndOfFile$NewLineAtEndOfFileVisitor::hasViolation</description> |
| 802 | + <lineContent>return violations.stream()</lineContent> |
| 803 | + </mutation> |
| 804 | + |
| 805 | + <mutation unstable="false"> |
| 806 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 807 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 808 | + <mutatedMethod>lambda$getAutodetectedLineEnding$1</mutatedMethod> |
| 809 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator> |
| 810 | + <description>removed call to org/openrewrite/java/format/AutodetectGeneralFormatStyle::autodetectGeneralFormatStyle</description> |
| 811 | + <lineContent>.autodetectGeneralFormatStyle(sourceFile);</lineContent> |
| 812 | + </mutation> |
| 813 | + |
| 814 | + <mutation unstable="false"> |
| 815 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 816 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 817 | + <mutatedMethod>lambda$getAutodetectedLineEnding$1</mutatedMethod> |
| 818 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator</mutator> |
| 819 | + <description>replaced return value with null for org/checkstyle/autofix/recipe/NewlineAtEndOfFile$NewLineAtEndOfFileVisitor::lambda$getAutodetectedLineEnding$1</description> |
| 820 | + <lineContent>return AutodetectGeneralFormatStyle</lineContent> |
| 821 | + </mutation> |
| 822 | + |
| 823 | + <mutation unstable="false"> |
| 824 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 825 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 826 | + <mutatedMethod>lambda$hasViolation$2</mutatedMethod> |
| 827 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator</mutator> |
| 828 | + <description>replaced boolean return with true for org/checkstyle/autofix/recipe/NewlineAtEndOfFile$NewLineAtEndOfFileVisitor::lambda$hasViolation$2</description> |
| 829 | + <lineContent>.anyMatch(violation -> violation.getFilePath().endsWith(filePath));</lineContent> |
| 830 | + </mutation> |
| 831 | + |
| 832 | + <mutation unstable="false"> |
| 833 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 834 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 835 | + <mutatedMethod>mapLast</mutatedMethod> |
| 836 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator> |
| 837 | + <description>removed call to java/util/List::isEmpty</description> |
| 838 | + <lineContent>if (comments != null && !comments.isEmpty()) {</lineContent> |
| 839 | + </mutation> |
| 840 | + |
| 841 | + <mutation unstable="false"> |
| 842 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 843 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 844 | + <mutatedMethod>mapLast</mutatedMethod> |
| 845 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> |
| 846 | + <description>removed conditional - replaced equality check with true</description> |
| 847 | + <lineContent>if (comments != null && !comments.isEmpty()) {</lineContent> |
| 848 | + </mutation> |
| 849 | + |
| 850 | + <mutation unstable="false"> |
| 851 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 852 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 853 | + <mutatedMethod>mapLast</mutatedMethod> |
| 854 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> |
| 855 | + <description>removed conditional - replaced equality check with true</description> |
| 856 | + <lineContent>if (last != newLast) {</lineContent> |
| 857 | + </mutation> |
| 858 | + |
| 859 | + <mutation unstable="false"> |
| 860 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 861 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 862 | + <mutatedMethod>visit</mutatedMethod> |
| 863 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator> |
| 864 | + <description>replaced call to java/nio/file/Path::toAbsolutePath with receiver</description> |
| 865 | + <lineContent>final Path filePath = sourceFile.getSourcePath().toAbsolutePath();</lineContent> |
| 866 | + </mutation> |
| 867 | + |
| 868 | + <mutation unstable="false"> |
| 869 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 870 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 871 | + <mutatedMethod>visit</mutatedMethod> |
| 872 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator> |
| 873 | + <description>removed call to org/openrewrite/java/tree/Space::getLastWhitespace</description> |
| 874 | + <lineContent>final String lastWhitespace = eof.getLastWhitespace();</lineContent> |
| 875 | + </mutation> |
| 876 | + |
| 877 | + <mutation unstable="false"> |
| 878 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 879 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 880 | + <mutatedMethod>visit</mutatedMethod> |
| 881 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator> |
| 882 | + <description>removed call to java/lang/String::equals</description> |
| 883 | + <lineContent>if (!expectedLineEnding.equals(lastWhitespace)) {</lineContent> |
| 884 | + </mutation> |
| 885 | + |
| 886 | + <mutation unstable="false"> |
| 887 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 888 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 889 | + <mutatedMethod>visit</mutatedMethod> |
| 890 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> |
| 891 | + <description>removed conditional - replaced equality check with true</description> |
| 892 | + <lineContent>if (!expectedLineEnding.equals(lastWhitespace)) {</lineContent> |
| 893 | + </mutation> |
| 894 | + |
| 895 | + <mutation unstable="false"> |
| 896 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 897 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 898 | + <mutatedMethod>visit</mutatedMethod> |
| 899 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> |
| 900 | + <description>removed conditional - replaced equality check with true</description> |
| 901 | + <lineContent>if (hasViolation(filePath)) {</lineContent> |
| 902 | + </mutation> |
| 903 | + |
| 904 | + <mutation unstable="false"> |
| 905 | + <sourceFile>NewlineAtEndOfFile.java</sourceFile> |
| 906 | + <mutatedClass>org.checkstyle.autofix.recipe.NewlineAtEndOfFile$NewLineAtEndOfFileVisitor</mutatedClass> |
| 907 | + <mutatedMethod>visit</mutatedMethod> |
| 908 | + <mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator> |
| 909 | + <description>removed conditional - replaced equality check with true</description> |
| 910 | + <lineContent>if (tree instanceof JavaSourceFile sourceFile) {</lineContent> |
| 911 | + </mutation> |
| 912 | + |
733 | 913 | <mutation unstable="false"> |
734 | 914 | <sourceFile>PositionHelper.java</sourceFile> |
735 | 915 | <mutatedClass>org.checkstyle.autofix.PositionHelper</mutatedClass> |
|
0 commit comments