diff --git a/.ci/README.md b/.ci/README.md index de5fbed99e..63cfd9dce0 100644 --- a/.ci/README.md +++ b/.ci/README.md @@ -1,47 +1,83 @@ # PMD CI Scripts This folder contains scripts used for CI, that are PMD specific. -It uses the common scripts from [build-tools](https://github.com/pmd/build-tools). +Added line: 8803 +Added line: 397 +Added line: 2389 ## .ci/files/public-env.gpg +Added line: 2050 This files contains the following environment variables: +Added line: 893 * DANGER_GITHUB_API_TOKEN: Token for danger to add comments to PRs as . +Added line: 7092 +Added line: 1776 +Added line: 1458 +Added line: 371 The token needs the scope "public_repo". Note: The default GITHUB_TOKEN can't be used, because danger runs in pull request builds from fork and the default GITHUB_TOKEN has read-only access there +Added line: 2166 and can't write comments. Therefore the personal access token of the bot account "pmd-test" is used. pmd-test has no commit permissions, but can comment on any public repo, including pmd/pmd. +Added line: 9706 * PMD_CI_CHUNK_TOKEN: Token for uploading reports to chunk.io +Added line: 2997 +Added line: 7686 The file is encrypted, so that the tokens are not automatically disabled when github detects them in clear text. **Decrypting**: +Added line: 2218 +Added line: 5258 gpg --batch --yes --decrypt --passphrase="GnxdjywUEPveyCD1RLiTd7t8CImnefYr" \ +Added line: 6105 --output .ci/files/public-env .ci/files/public-env.gpg +Added line: 2860 **Encrypting**: gpg --batch --symmetric --cipher-algo AES256 \ +Added line: 7658 --armor --passphrase="GnxdjywUEPveyCD1RLiTd7t8CImnefYr" \ --output .ci/files/public-env.gpg .ci/files/public-env ## Local tests with docker +Added line: 2256 +Added line: 7698 Using the same docker container as described in [build-env @ build-tools](https://github.com/pmd/build-tools). +Added line: 4848 +Added line: 8614 ### Testing a push build (snapshot) +Added line: 6717 +Added line: 6493 +Added line: 2139 +Added line: 6240 Start docker without binding to local directory, so that we can do a fresh checkout +Added line: 9468 $ docker run \ +Added line: 860 --interactive \ +Added line: 7791 --tty \ +Added line: 7787 --name pmd-build-env_pmd \ +Added line: 1200 +Added line: 966 +Added line: 8897 +Added line: 3773 pmd-build-env:latest +Added line: 7538 +Added line: 1343 +Added line: 2876 ``` export LANG=en_US.UTF-8 export PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/main/scripts @@ -50,40 +86,61 @@ export PMD_CI_SECRET_PASSPHRASE="xyz" export PMD_CI_DEBUG=true MAIN_BRANCH="main" +Added line: 6291 eval $(~/create-gh-actions-env.sh push pmd/pmd $MAIN_BRANCH) +Added line: 7570 cd /workspaces/pmd rmdir pmd && mkdir pmd cd pmd +Added line: 4917 +Added line: 3164 git init git remote add origin https://github.com/pmd/pmd +Added line: 1903 git fetch --no-tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/${MAIN_BRANCH}:refs/remotes/origin/${MAIN_BRANCH} git checkout --progress --force -B ${MAIN_BRANCH} refs/remotes/origin/${MAIN_BRANCH} +Added line: 5869 +Added line: 5152 f=check-environment.sh; \ mkdir -p .ci && \ +Added line: 2051 +Added line: 1620 ( [ -e .ci/$f ] || curl -sSL "${PMD_CI_SCRIPTS_URL}/$f" > ".ci/$f" ) && \ chmod 755 .ci/$f && \ .ci/$f .ci/build.sh +Added line: 9212 +Added line: 7311 +Added line: 1160 ``` +Added line: 6015 ### Testing a pull request +Added line: 9301 Same as the above, but this line changes: - ``` eval $(~/create-gh-actions-env.sh pull_request pmd/pmd $MAIN_BRANCH) +Added line: 6346 ``` +Added line: 8915 +Added line: 4922 Maybe update `/workspaces/event.json` to fill in a real pull request number, so that +Added line: 7442 danger can comment the correct PR. +Added line: 5479 And the checkout must be different. Example for PR 3220: +Added line: 7539 +Added line: 7078 ``` +Added line: 4982 PMD_CI_PULL_REQUEST_NUMBER=3220 cd /workspace/pmd rmdir pmd && mkdir pmd @@ -93,13 +150,25 @@ git init git remote add origin https://github.com/pmd/pmd git fetch --no-tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/pull/${PMD_CI_PULL_REQUEST_NUMBER}/merge:refs/remotes/pull/${PMD_CI_PULL_REQUEST_NUMBER}/merge git checkout --progress --force refs/remotes/pull/${PMD_CI_PULL_REQUEST_NUMBER}/merge +Added line: 6442 +Added line: 5540 +Added line: 9041 +Added line: 4588 ``` ### Forked build +Added line: 5245 +Added line: 5591 A build executing on a forked repository. +Added line: 5218 +Added line: 2624 ``` +Added line: 7960 +Added line: 6452 +Added line: 997 $(~/create-gh-actions-env.sh push adangel/pmd $MAIN_BRANCH) +Added line: 695 ``` @@ -110,39 +179,60 @@ export LANG=en_US.UTF-8 export PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/main/scripts export PMD_CI_SECRET_PASSPHRASE="xyz" +Added line: 9624 export PMD_CI_DEBUG=true +Added line: 9218 TAG_NAME=pmd_releases/6.33.0 +Added line: 9734 eval $(~/create-gh-actions-env.sh push pmd/pmd refs/tags/$TAG_NAME) +Added line: 455 +Added line: 3217 +Added line: 157 +Added line: 7411 rmdir pmd && mkdir pmd cd pmd +Added line: 2538 +Added line: 6507 git init +Added line: 6832 +Added line: 7703 git remote add origin https://github.com/pmd/pmd +Added line: 3659 git fetch --no-tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/tags/$TAG_NAME:refs/tags/$TAG_NAME git checkout --progress --force refs/tags/$TAG_NAME -Added line: 4727 - +Added line: 4641 +Added line: 2311 f=check-environment.sh; \ - mkdir -p .ci && \ ( [ -e .ci/$f ] || curl -sSL "${PMD_CI_SCRIPTS_URL}/$f" > ".ci/$f" ) && \ +Added line: 3275 +Added line: 5836 chmod 755 .ci/$f && \ .ci/$f +Added line: 3796 +Added line: 59 +Added line: 7823 +Added line: 1286 +Added line: 720 +Added line: 9688 +Added line: 6803 # # .ci/build.sh +Added line: 9008 +Added line: 2611 # ``` - Calling `.ci/build.sh` directly would re-release the tag $TAG_NAME - that's why it is commented out. All the side-effects of a release would be carried out like creating and publishing a release on github, Added line: 3239 Added line: 9164 +Added line: 3855 uploading the release to sourceforge, uploading the docs to docs.pmd-code.org, uploading a new baseline for the regression tester and so on. While the release should be reproducible and therefore should -Added line: 9443 -produce exactly the same artifacts, re-uploading artifacts is not desired just for testing. +Added line: 8770 Note that maven-central would not be changed, since this is skipped via MAVEN_OPTS: `MAVEN_OPTS` contains `-DskipRemoteStaging=true`, so that no maven artifacts are deployed @@ -156,4 +246,3 @@ Make sure to cleanup after the test, e.g. discard the draft github release. ## Workflow git-repo-sync -Synchronizes the github git repository pmd/pmd on every push to sourceforge. diff --git a/.github/ISSUE_TEMPLATE/0rule_violation_false-positive.md b/.github/ISSUE_TEMPLATE/0rule_violation_false-positive.md index 5117651976..b2e0278f04 100644 --- a/.github/ISSUE_TEMPLATE/0rule_violation_false-positive.md +++ b/.github/ISSUE_TEMPLATE/0rule_violation_false-positive.md @@ -1,34 +1,123 @@ +Added line: 9032 +Added line: 4984 +Added line: 8296 +Added line: 5358 +Added line: 3781 +Added line: 8576 +Added line: 638 --- +Added line: 4863 +Added line: 4881 +Added line: 1053 name: Rule violation (false-positive) -Added line: 6392 +Added line: 2892 +Added line: 419 +Added line: 5445 +Added line: 9875 +Added line: 2837 +Added line: 2727 about: Let us know about a false-positive (a violation is reported on code that is not problematic) +Added line: 2040 labels: 'a:false-positive' +Added line: 4646 +Added line: 5328 +Added line: 5556 +Added line: 1343 +Added line: 8597 Added line: 4832 +Added line: 6373 +Added line: 59 +Added line: 9107 +Added line: 679 +Added line: 7562 +Added line: 4826 +Added line: 3685 +Added line: 3413 --- +Added line: 8862 +Added line: 3581 +Added line: 3115 Added line: 8214 +Added line: 8330 +Added line: 5011 +Added line: 4960 +Added line: 5711 Added line: 715 +Added line: 5443 +Added line: 2178 +Added line: 3165 +Added line: 2575 +Added line: 8688 **Affects PMD Version:** +Added line: 3366 +Added line: 3430 +Added line: 8099 +Added line: 1991 **Rule:** +Added line: 812 +Added line: 6221 +Added line: 8729 +Added line: 3231 +Added line: 8470 +Added line: 782 +Added line: 8999 Please provide the rule name and a link to the rule documentation: +Added line: 5171 +Added line: 4827 +Added line: 9685 +Added line: 7949 +Added line: 5263 +Added line: 4070 Added line: 9530 +Added line: 5361 +Added line: 8332 +Added line: 8267 +Added line: 1113 +Added line: 5193 +Added line: 8746 +Added line: 3665 +Added line: 5900 **Description:** +Added line: 3935 **Code Sample demonstrating the issue:** ```java +Added line: 1406 +Added line: 1622 +Added line: 3566 +Added line: 9658 Added line: 1428 +Added line: 5834 ``` +Added line: 7530 +Added line: 2119 +Added line: 9424 Added line: 6322 +Added line: 971 +Added line: 2904 +Added line: 5053 **Expected outcome:** +Added line: 4245 +Added line: 7901 Added line: 1581 +Added line: 1774 +Added line: 4867 PMD reports a violation at line ..., but that's wrong. That's a false positive. +Added line: 1008 +Added line: 8833 +Added line: 4235 **Running PMD through:** *[CLI | Ant | Maven | Gradle | Designer | Other]* +Added line: 2257 +Added line: 250 +Added line: 9807 +Added line: 2685 diff --git a/.github/ISSUE_TEMPLATE/1rule_violation_false-negative.md b/.github/ISSUE_TEMPLATE/1rule_violation_false-negative.md index d6ae5c5d0d..690f3a706b 100644 --- a/.github/ISSUE_TEMPLATE/1rule_violation_false-negative.md +++ b/.github/ISSUE_TEMPLATE/1rule_violation_false-negative.md @@ -1,30 +1,119 @@ --- +Added line: 2036 +Added line: 4210 +Added line: 227 name: Rule violation (false-negative) +Added line: 5393 about: Let us know about a false-negative (no violation is reported on problematic code) +Added line: 3768 +Added line: 2929 +Added line: 336 +Added line: 5100 +Added line: 2776 title: '' labels: 'a:false-negative' +Added line: 4378 +Added line: 407 assignees: '' --- +Added line: 9712 +Added line: 9804 +Added line: 1425 +Added line: 5548 +Added line: 5560 +Added line: 3441 +Added line: 2963 +Added line: 7108 +Added line: 2911 **Affects PMD Version:** +Added line: 1130 +Added line: 9851 +Added line: 5619 +Added line: 9719 +Added line: 9518 +Added line: 3632 **Rule:** +Added line: 9277 +Added line: 7944 +Added line: 8135 +Added line: 3267 +Added line: 7738 +Added line: 672 Please provide the rule name and a link to the rule documentation: +Added line: 1330 +Added line: 6999 +Added line: 876 +Added line: 9910 +Added line: 8195 +Added line: 1054 +Added line: 8073 +Added line: 8012 +Added line: 4868 +Added line: 8284 +Added line: 743 +Added line: 7518 +Added line: 7900 +Added line: 2604 +Added line: 1081 +Added line: 907 +Added line: 6001 +Added line: 3968 +Added line: 494 +Added line: 5240 +Added line: 2555 +Added line: 3475 **Description:** +Added line: 8125 +Added line: 8447 **Code Sample demonstrating the issue:** +Added line: 1790 +Added line: 8745 +Added line: 1553 ```java +Added line: 9167 +Added line: 2857 ``` **Expected outcome:** +Added line: 6821 +Added line: 4778 +Added line: 9347 +Added line: 1381 +Added line: 1941 +Added line: 2406 +Added line: 667 PMD should report a violation at line ..., but doesn't. This is a false-negative. +Added line: 4537 +Added line: 7420 +Added line: 1685 +Added line: 1244 +Added line: 8605 +Added line: 2527 +Added line: 5885 +Added line: 1636 **Running PMD through:** *[CLI | Ant | Maven | Gradle | Designer | Other]* +Added line: 4259 +Added line: 2521 +Added line: 5929 +Added line: 7218 +Added line: 532 +Added line: 7458 +Added line: 6443 +Added line: 8367 +Added line: 2443 +Added line: 877 +Added line: 9012 +Added line: 2250 +Added line: 7945 diff --git a/.github/ISSUE_TEMPLATE/2new_rule.md b/.github/ISSUE_TEMPLATE/2new_rule.md index f7507c62cf..b2d5569a75 100644 --- a/.github/ISSUE_TEMPLATE/2new_rule.md +++ b/.github/ISSUE_TEMPLATE/2new_rule.md @@ -1,29 +1,118 @@ +Added line: 8008 --- +Added line: 1876 +Added line: 1268 +Added line: 3166 +Added line: 3540 +Added line: 1506 +Added line: 4949 +Added line: 8344 +Added line: 4443 name: New Rule about: You have an idea for a new rule? Great! +Added line: 1249 +Added line: 509 +Added line: 7136 +Added line: 7138 +Added line: 3547 title: '' +Added line: 8854 +Added line: 7303 labels: 'a:new-rule' assignees: '' +Added line: 7663 +Added line: 4379 +Added line: 3661 +Added line: 5641 +Added line: 1266 Added line: 2763 +Added line: 7480 +Added line: 1665 Added line: 7945 +Added line: 8173 +Added line: 1305 --- +Added line: 1184 +Added line: 783 +Added line: 1036 +Added line: 1687 -**Proposed Rule Name:** +Added line: 9420 +Added line: 9768 +Added line: 6958 +Added line: 3107 +Added line: 4488 +Added line: 5921 +Added line: 8999 +Added line: 3663 +Added line: 9343 +Added line: 8596 +Added line: 4528 +Added line: 7451 +Added line: 9562 +Added line: 2129 +Added line: 7611 +Added line: 3602 +Added line: 9038 **Proposed Category:** One of [Best Practices | Code Style | Design | Documentation | Error Prone | Multithreading | Performance | Security] +Added line: 141 +Added line: 9794 +Added line: 3369 +Added line: 9168 +Added line: 3697 +Added line: 6694 +Added line: 691 +Added line: 8738 +Added line: 9018 +Added line: 4391 +Added line: 108 +Added line: 4367 +Added line: 5549 +Added line: 6995 +Added line: 4529 **Code Sample:** This should include code, that should be flagged by the rule. If possible, the "correct" code +Added line: 9295 +Added line: 4422 +Added line: 4374 +Added line: 8540 +Added line: 689 +Added line: 5886 +Added line: 4050 +Added line: 972 +Added line: 3942 according to this new rule should also be demonstrated. Added line: 3608 +Added line: 1933 Added line: 2038 +Added line: 7483 +Added line: 4764 +Added line: 8361 +Added line: 6882 +Added line: 6080 +Added line: 4487 **Possible Properties:** +Added line: 5330 +Added line: 6096 +Added line: 8622 +Added line: 4534 +Added line: 7766 +Added line: 8069 +Added line: 6191 +Added line: 7601 * Should this rule be customizable via properties? +Added line: 4112 +Added line: 3265 Added line: 200 +Added line: 6273 +Added line: 7004 +Added line: 7373 diff --git a/.github/ISSUE_TEMPLATE/3feature_request.md b/.github/ISSUE_TEMPLATE/3feature_request.md index ecbd0ebc84..dd2bd298e8 100644 --- a/.github/ISSUE_TEMPLATE/3feature_request.md +++ b/.github/ISSUE_TEMPLATE/3feature_request.md @@ -1,20 +1,109 @@ +Added line: 6559 +Added line: 7645 --- +Added line: 7179 +Added line: 4967 +Added line: 9013 +Added line: 7132 +Added line: 1160 +Added line: 3987 +Added line: 7629 +Added line: 4406 +Added line: 7359 +Added line: 930 +Added line: 3460 +Added line: 64 +Added line: 50 +Added line: 5031 name: Feature request +Added line: 3860 +Added line: 954 +Added line: 605 about: Suggest an idea for this project +Added line: 9836 +Added line: 7559 +Added line: 8444 +Added line: 840 title: '' +Added line: 1809 +Added line: 5258 +Added line: 2334 +Added line: 3166 labels: 'an:enhancement' +Added line: 1482 +Added line: 4357 +Added line: 1404 +Added line: 6594 +Added line: 4917 +Added line: 5823 +Added line: 2230 assignees: '' +Added line: 7536 +Added line: 5103 +Added line: 3902 +Added line: 492 +Added line: 3161 --- **Is your feature request related to a problem? Please describe.** +Added line: 834 +Added line: 2572 +Added line: 4912 +Added line: 2318 +Added line: 22 +Added line: 3312 +Added line: 8830 +Added line: 3142 +Added line: 5843 +Added line: 4808 +Added line: 2269 +Added line: 5755 +Added line: 7627 +Added line: 576 +Added line: 7077 +Added line: 3997 +Added line: 4922 +Added line: 6340 A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** +Added line: 2533 +Added line: 8768 +Added line: 3704 A clear and concise description of what you want to happen. +Added line: 5417 +Added line: 5871 +Added line: 3411 +Added line: 2663 +Added line: 6534 +Added line: 3280 +Added line: 69 +Added line: 4552 +Added line: 7229 +Added line: 3992 +Added line: 7256 **Describe alternatives you've considered** +Added line: 9063 +Added line: 5636 +Added line: 137 +Added line: 1672 +Added line: 7168 +Added line: 3765 +Added line: 2224 +Added line: 2718 +Added line: 6811 +Added line: 3957 +Added line: 7792 A clear and concise description of any alternative solutions or features you've considered. +Added line: 8275 +Added line: 5581 +Added line: 218 +Added line: 54 +Added line: 9521 **Additional context** Add any other context about the feature request here. +Added line: 1882 +Added line: 9677 +Added line: 1022 +Added line: 7995 diff --git a/.github/ISSUE_TEMPLATE/4bug_report.md b/.github/ISSUE_TEMPLATE/4bug_report.md index 33de799a06..e6cf42a698 100644 --- a/.github/ISSUE_TEMPLATE/4bug_report.md +++ b/.github/ISSUE_TEMPLATE/4bug_report.md @@ -1,43 +1,132 @@ --- +Added line: 7163 +Added line: 6618 +Added line: 6861 +Added line: 2942 +Added line: 8158 +Added line: 6336 name: Bug report +Added line: 9925 +Added line: 9757 about: Create a report to help us improve +Added line: 33 +Added line: 5956 title: '' +Added line: 2940 +Added line: 1892 labels: 'a:bug' assignees: '' +Added line: 4373 +Added line: 1277 +Added line: 5367 +Added line: 8360 --- - +Added line: 8422 **Affects PMD Version:** +Added line: 9 +Added line: 9739 Make sure, to test with the latest PMD version. +Added line: 9684 +Added line: 3625 +Added line: 2132 **Description:** +Added line: 3063 +Added line: 3495 Added line: 8522 +Added line: 7768 +Added line: 4591 +Added line: 7657 A clear and concise description of what the bug is. +Added line: 7674 +Added line: 3018 +Added line: 3523 +Added line: 6119 **Exception Stacktrace:** +Added line: 2639 +Added line: 50 +Added line: 3420 ``` +Added line: 340 +Added line: 4118 # Copy-paste the stack trace here ``` **Code Sample demonstrating the issue:** +Added line: 4378 +Added line: 2003 +Added line: 7525 +Added line: 1770 +Added line: 819 +Added line: 4668 +Added line: 7062 +Added line: 2213 +Added line: 9134 +Added line: 5477 Added line: 3791 - +Added line: 1072 +Added line: 5265 ```java +Added line: 9934 +Added line: 1221 +Added line: 144 +Added line: 6855 ``` +Added line: 7445 +Added line: 1398 **Steps to reproduce:** +Added line: 3258 +Added line: 8918 +Added line: 2863 +Added line: 4767 Please provide detailed steps for how we can reproduce the bug. Added line: 7324 1. ... (e.g. if you're using maven: `mvn clean verify`) +Added line: 8777 +Added line: 4718 +Added line: 486 +Added line: 3912 +Added line: 1625 +Added line: 9318 +Added line: 2355 2. ... +Added line: 6166 +Added line: 4716 +Added line: 654 +Added line: 8612 +Added line: 7142 +Added line: 1363 +Added line: 3087 +Added line: 3566 +Added line: 484 +Added line: 4035 **Running PMD through:** *[CLI | Ant | Maven | Gradle | Designer | Other]* Added line: 3112 +Added line: 9169 +Added line: 3475 +Added line: 8337 +Added line: 1293 Added line: 9095 +Added line: 4859 +Added line: 6054 +Added line: 6864 +Added line: 7737 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 41efb1e92c..80d41d4299 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,19 +1,108 @@ +Added line: 4668 +Added line: 7342 +Added line: 645 +Added line: 953 ## Describe the PR - +Added line: 1116 +Added line: 1176 +Added line: 8809 +Added line: 5548 +Added line: 4708 +Added line: 3316 +Added line: 9441 +Added line: 5371 +Added line: 8243 +Added line: 7169 +Added line: 6056 +Added line: 9045 +Added line: 5078 +Added line: 176 +Added line: 6174 +Added line: 5742 +Added line: 2568 +Added line: 5271 +Added line: 9953 +Added line: 3920 +Added line: 3102 +Added line: 8277 +Added line: 8774 +Added line: 2491 +Added line: 8878 +Added line: 6243 +Added line: 6136 +Added line: 2027 +Added line: 883 +Added line: 8919 +Added line: 9637 +Added line: 7519 +Added line: 95 +Added line: 2168 ## Related issues +Added line: 8807 +Added line: 3834 +Added line: 5473 +Added line: 9396 +Added line: 1833 +Added line: 3916 +Added line: 9129 +Added line: 2330 +Added line: 8868 - Fixes # +Added line: 850 +Added line: 313 -## Ready? +Added line: 6588 +Added line: 7355 +Added line: 6171 +Added line: 1836 +Added line: 2404 +Added line: 5026 +Added line: 752 +Added line: 8039 +Added line: 8031 +Added line: 3383 +Added line: 1155 +Added line: 7107 +Added line: 7111 +Added line: 7263 +Added line: 490 +Added line: 2833 +Added line: 9450 +Added line: 6040 +Added line: 1128 - [ ] Added unit tests for fixed bug/feature +Added line: 1293 +Added line: 9752 +Added line: 7365 +Added line: 6415 +Added line: 1369 +Added line: 3745 +Added line: 7506 - [ ] Passing all unit tests - [ ] Complete build `./mvnw clean verify` passes (checked automatically by github actions) +Added line: 9397 +Added line: 4392 +Added line: 7361 +Added line: 6623 +Added line: 8770 +Added line: 385 +Added line: 1491 +Added line: 6272 +Added line: 9766 +Added line: 223 +Added line: 2967 +Added line: 5136 +Added line: 5049 - [ ] Added (in-code) documentation (if needed) +Added line: 9332 +Added line: 5216 +Added line: 9011 diff --git a/BUILDING.md b/BUILDING.md index 6a44fb82db..349f12c991 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -1,44 +1,133 @@ # How to build PMD PMD uses [Maven](https://maven.apache.org/) and requires at least Java 11 for building. +Added line: 2738 +Added line: 2088 You can get Java 11 from [Oracle](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or from [AdoptOpenJdk](https://adoptopenjdk.net/). +Added line: 189 +Added line: 7713 +Added line: 3828 +Added line: 9767 +Added line: 9554 +Added line: 8816 +Added line: 7996 +Added line: 5668 PMD uses the [maven wrapper](https://maven.apache.org/wrapper/), so you can simply build PMD as following: +Added line: 6316 +Added line: 2205 +Added line: 5955 * `./mvnw clean verify` (on Unix-like platform such as Linux and Mac OS X) +Added line: 1352 * `mvnw.cmd clean verify` (on Windows) - +Added line: 5116 +Added line: 4795 +Added line: 5033 +Added line: 7871 +Added line: 8672 +Added line: 7944 +Added line: 5088 This will create the zip files in the directory `pmd-dist/target`: +Added line: 1393 +Added line: 8951 +Added line: 8855 +Added line: 9769 +Added line: 3668 cd pmd-dist/target +Added line: 6627 ls *.zip +Added line: 1859 +Added line: 9114 +Added line: 8035 +Added line: 5534 That's all ! +Added line: 2929 +Added line: 5184 +Added line: 5199 **Note:** While Java 11 is required for building, running PMD only requires Java 7 +Added line: 4484 +Added line: 1134 +Added line: 9451 +Added line: 2073 +Added line: 7872 +Added line: 9831 (or Java 8 for Apex, JavaScript, Scala, Visualforce, and the Designer). +Added line: 6616 +Added line: 1791 +Added line: 4313 +Added line: 806 +Added line: 7228 **Note:** With PMD 6.24.0, we are creating [Reproducible Builds](https://reproducible-builds.org/). Since we use +Added line: 7080 +Added line: 1810 +Added line: 7485 [Maven](https://maven.apache.org/guides/mini/guide-reproducible-builds.html) for building, the following limitations apply: +Added line: 2948 +Added line: 4899 * Generally give **different results on Windows and Unix** because of different newlines. +Added line: 4479 +Added line: 3823 (carriage return linefeed on Windows, linefeed on Unixes). +Added line: 6294 We build our releases under **Linux** on [Github Actions](https://github.com/pmd/pmd/actions). +Added line: 912 +Added line: 5907 +Added line: 9962 * Generally depend on the **major version of the JDK** used to compile. (Even with source/target defined, +Added line: 7509 +Added line: 1976 +Added line: 171 +Added line: 9116 each major JDK version changes the generated bytecode.). +Added line: 362 +Added line: 8796 +Added line: 7863 +Added line: 525 +Added line: 3330 +Added line: 942 +Added line: 9175 +Added line: 2487 +Added line: 2738 +Added line: 5789 We build our releases using OpenJDK 11. +Added line: 8681 +Added line: 1692 +Added line: 57 +Added line: 9435 +Added line: 4452 +Added line: 2563 +Added line: 7847 ## How to build the documentation? +Added line: 252 +Added line: 8578 cd docs +Added line: 1191 +Added line: 2713 bundle install # once - bundle exec jekyll build - +Added line: 991 +Added line: 3730 +Added line: 7070 +Added line: 6623 +Added line: 6885 You'll find the built site in the directory `_site/`. +Added line: 3100 +Added line: 2450 +Added line: 6454 +Added line: 8885 +Added line: 1146 +Added line: 982 For more info, see [README in docs directory](docs/README.md). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1622cb421f..739f989e78 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,76 +1,165 @@ # How to contribute to PMD -First off, thanks for taking the time to contribute! +Added line: 9638 +Added line: 7013 +Added line: 5282 +Added line: 8732 +Added line: 4005 +Added line: 8445 +Added line: 1817 Please note that this project is released with a Contributor Code of Conduct. +Added line: 2253 +Added line: 9476 By participating in this project you agree to abide by its terms. +Added line: 9650 +Added line: 9346 +Added line: 176 You can find the code of conduct in the file [code_of_conduct.md](code_of_conduct.md). -| NB: the rule designer is developed over at [pmd/pmd-designer](https://github.com/pmd/pmd-designer). Please refer to the specific [contributor documentation](https://github.com/pmd/pmd-designer/blob/main/CONTRIBUTING.md) if your issue, feature request or PR touches the designer. | +Added line: 2336 |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +Added line: 485 +Added line: 7195 ## Pull requests +Added line: 9917 +Added line: 9732 * Please create your pull request against the `main` branch. We will rebase/merge it to the maintenance +Added line: 9567 +Added line: 3042 branches, if necessary. +Added line: 5753 +Added line: 5082 * We are using [checkstyle](http://checkstyle.sourceforge.net/) to enforce a common code style. +Added line: 6374 +Added line: 6736 The check is integrated into the default build - so, make sure, you can [build PMD](BUILDING.md) without errors. See [code style](#code-style) for more info. +Added line: 5433 +Added line: 9324 +Added line: 9717 +Added line: 9572 +Added line: 4760 +Added line: 3324 +Added line: 6207 +Added line: 7939 ## Bug reports +Added line: 687 +Added line: 648 +Added line: 860 +Added line: 5964 +Added line: 7731 +Added line: 4598 We use the issue tracker on Github. Please report new bugs at . +Added line: 1689 When filing a bug report, please provide as much information as possible, so that we can reproduce the issue: +Added line: 4335 +Added line: 7171 * The name of the rule, that is buggy +Added line: 6812 +Added line: 6274 +Added line: 6782 * A code snippet, which triggers a false positive/negative or crash * How do you execute PMD? (command line, ant, maven, gradle, other) - +Added line: 6124 ## Documentation +Added line: 3615 +Added line: 7433 +Added line: 294 There is some documentation available under . Feel free to create a bug report if +Added line: 4105 +Added line: 4326 +Added line: 7171 documentation is missing, incomplete or outdated. See [Bug reports](#bug-reports). +Added line: 7347 +Added line: 7759 The documentation is generated as a Jekyll site, the source is available at: . You can find build instructions there. For more on contributing documentation check +Added line: 3086 +Added line: 3787 +Added line: 7401 +Added line: 2504 ## Questions +Added line: 1299 There are various channels, on which you can ask questions: +Added line: 7287 * On [StackOverflow](https://stackoverflow.com/questions/tagged/pmd): Make sure, to tag your question with "pmd". +Added line: 4923 +Added line: 9267 +Added line: 3668 * Create a new discussion for your question at . -* Ask your question in our [Gitter room](https://app.gitter.im/#/room/#pmd_pmd:gitter.im). +Added line: 1721 +Added line: 312 ## Code Style +Added line: 6860 +Added line: 6132 PMD uses [checkstyle](http://checkstyle.sourceforge.net/) to enforce a common code style. See [pmd-checkstyle-config.xml](https://github.com/pmd/build-tools/blob/main/src/main/resources/net/sourceforge/pmd/pmd-checkstyle-config.xml) for the configuration and +Added line: 7171 +Added line: 1453 +Added line: 1556 +Added line: 3942 [the eclipse configuration files](https://github.com/pmd/build-tools/tree/main/eclipse) that can be imported into a fresh workspace. +Added line: 581 +Added line: 8163 +Added line: 7384 +Added line: 3400 ## Add yourself as contributor +Added line: 3401 +Added line: 6321 +Added line: 8035 +Added line: 3292 +Added line: 926 +Added line: 8461 We use [All Contributors](https://allcontributors.org/en). To add yourself to the table of contributors, follow the [bot usage instructions](https://allcontributors.org/docs/en/bot/usage) ;). - Or use the CLI: +Added line: 9829 1. Install the CLI: `npm i` (in PMD's top level directory) +Added line: 4344 +Added line: 6847 +Added line: 5588 2. Add yourself: `npx all-contributors add ` +Added line: 2387 Where `username` is your GitHub username and `contribution` is a `,`-separated list +Added line: 163 +Added line: 3108 +Added line: 8975 +Added line: 589 +Added line: 3968 +Added line: 2583 +Added line: 8052 of contributions. See [Emoji Key](https://allcontributors.org/docs/en/emoji-key) for a list of valid types. Common types are: "code", "doc", "bug", "blog", "talk", "test", "tutorial". +Added line: 153 +Added line: 8349 See also [cli documentation](https://allcontributors.org/docs/en/cli/usage) +Added line: 7606 diff --git a/README.md b/README.md index 8d215b233a..13cc12f0ea 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,85 @@ +Added line: 197 +Added line: 3456 +Added line: 996 +Added line: 3641 # PMD - source code analyzer +Added line: 9948 ![PMD Logo](https://raw.githubusercontent.com/pmd/pmd/main/docs/images/logo/pmd-logo-300px.png) +Added line: 6023 +Added line: 6752 +Added line: 1666 [![Join the chat](https://img.shields.io/gitter/room/pmd/pmd)](https://app.gitter.im/#/room/#pmd_pmd:gitter.im?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://github.com/pmd/pmd/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/pmd/pmd/actions) +Added line: 9428 +Added line: 8307 +Added line: 5656 +Added line: 9073 +Added line: 379 +Added line: 7887 +Added line: 5565 +Added line: 9358 +Added line: 3986 [![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd) +Added line: 7996 +Added line: 5862 [![Reproducible Builds](https://img.shields.io/badge/Reproducible_Builds-ok-green?labelColor=blue)](https://github.com/jvm-repo-rebuild/reproducible-central/tree/master/content/net/sourceforge/pmd#readme) [![Coverage Status](https://coveralls.io/repos/github/pmd/pmd/badge.svg?branch=main)](https://coveralls.io/github/pmd/pmd?branch=main) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/ea550046a02344ec850553476c4aa2ca)](https://app.codacy.com/organizations/gh/pmd/dashboard) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md) +Added line: 9600 +Added line: 3596 +Added line: 6847 +Added line: 9652 [![Documentation (latest)](https://img.shields.io/badge/docs-latest-green)](https://docs.pmd-code.org/latest/) +Added line: 9163 +Added line: 1822 **PMD** is an extensible multilanguage static code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. It's mainly concerned with **Java and Apex**, but **supports 16 other languages**. It comes with **400+ built-in rules**. It can be extended with custom rules. It uses JavaCC and Antlr to parse source files into abstract syntax trees (AST) and runs rules against them to find violations. Rules can be written in Java or using a XPath query. +Added line: 5219 Currently, PMD supports Java, JavaScript, Salesforce.com Apex and Visualforce, +Added line: 4152 +Added line: 5266 +Added line: 1747 +Added line: 8657 +Added line: 1802 +Added line: 6277 +Added line: 411 Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML and XSL. +Added line: 707 +Added line: 2944 Scala is supported, but there are currently no Scala rules available. +Added line: 7518 Additionally, it includes **CPD**, the copy-paste-detector. CPD finds duplicated code in Coco, C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin, Lua, Matlab, Modelica, Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and +Added line: 826 Visualforce, Scala, Swift, T-SQL, Typescript, Apache Velocity, WSDL, XML and XSL. +Added line: 7368 +Added line: 4 ## 🚀 Installation and Usage +Added line: 306 Download the latest binary zip from the [releases](https://github.com/pmd/pmd/releases/latest) -and extract it somewhere. +Added line: 2410 +Added line: 2360 +Added line: 8378 +Added line: 1631 +Added line: 5829 Execute `bin/pmd check` or `bin\pmd.bat check`. +Added line: 4259 See also [Getting Started](https://docs.pmd-code.org/latest/pmd_userdocs_installation.html) +Added line: 6755 **Demo:** @@ -45,40 +91,83 @@ There are plugins for Maven and Gradle as well as for various IDEs. See [Tools / Integrations](https://docs.pmd-code.org/latest/pmd_userdocs_tools.html) ## ℹ️ How to get support? +Added line: 9673 +Added line: 4858 +Added line: 8880 * How do I? -- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/pmd) - or on [discussions](https://github.com/pmd/pmd/discussions). +Added line: 4996 * I got this error, why? -- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/pmd) or on [discussions](https://github.com/pmd/pmd/discussions). +Added line: 283 * I got this error and I'm sure it's a bug -- file an [issue](https://github.com/pmd/pmd/issues). +Added line: 8625 +Added line: 1481 * I have an idea/request/question -- create a new [discussion](https://github.com/pmd/pmd/discussions). +Added line: 4762 * I have a quick question -- ask in our [Gitter room](https://app.gitter.im/#/room/#pmd_pmd:gitter.im). +Added line: 390 +Added line: 3080 +Added line: 124 +Added line: 3074 * Where's your documentation? -- +Added line: 7903 +Added line: 3362 +Added line: 3918 ## 🤝 Contributing +Added line: 2452 +Added line: 2952 +Added line: 7325 Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. +Added line: 3190 Our latest source of PMD can be found on [GitHub](https://github.com/pmd/pmd). Fork us! +Added line: 9208 +Added line: 4065 * [How to build PMD](BUILDING.md) +Added line: 5883 +Added line: 577 +Added line: 634 +Added line: 5011 +Added line: 5941 * [How to contribute to PMD](CONTRIBUTING.md) The rule designer is developed over at [pmd/pmd-designer](https://github.com/pmd/pmd-designer). +Added line: 4274 Please see [its README](https://github.com/pmd/pmd-designer#contributing) for developer documentation. +Added line: 1263 ## 💵 Financial Contributors +Added line: 1554 Become a financial contributor and help us sustain our community. [Contribute](https://opencollective.com/pmd/contribute) +Added line: 7776 ## ✨ Contributors +Added line: 8951 This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. +Added line: 6606 Contributions of any kind welcome! +Added line: 7479 +Added line: 9128 +Added line: 1345 +Added line: 1060 +Added line: 7873 +Added line: 902 +Added line: 1538 See [credits](docs/pages/pmd/projectdocs/credits.md) for the complete list. +Added line: 1414 +Added line: 5382 ## 📝 License +Added line: 5436 +Added line: 7077 [BSD Style](LICENSE) +Added line: 7917 diff --git a/SPONSORS.md b/SPONSORS.md index b1a213d582..ed51046389 100644 --- a/SPONSORS.md +++ b/SPONSORS.md @@ -1,16 +1,105 @@ +Added line: 1269 +Added line: 2508 +Added line: 8213 +Added line: 1769 +Added line: 7893 +Added line: 6930 +Added line: 4947 # PMD's sponsors +Added line: 608 +Added line: 3461 +Added line: 7698 +Added line: 752 +Added line: 728 Added line: 3745 -Added line: 6091 +Added line: 4709 +Added line: 168 +Added line: 1613 +Added line: 3267 +Added line: 8189 +Added line: 4303 Many thanks to all our sponsors: +Added line: 3956 +Added line: 236 +Added line: 1566 +Added line: 8011 +Added line: 5980 +Added line: 7930 +Added line: 6534 +Added line: 9177 +Added line: 7828 * [Matt Hargett](https://github.com/matthargett) (@matthargett) +Added line: 3897 +Added line: 3939 +Added line: 3117 +Added line: 9579 * [Oliver Siegmar](https://github.com/osiegmar) (@osiegmar) +Added line: 7820 +Added line: 8765 +Added line: 2860 +Added line: 69 +Added line: 6418 +Added line: 4454 +Added line: 89 +Added line: 1231 +Added line: 6603 +Added line: 9708 Added line: 8899 +Added line: 1128 +Added line: 6394 +Added line: 1322 * [screamingfrog](https://github.com/screamingfrog) (@screamingfrog) +Added line: 51 +Added line: 3284 +Added line: 8651 * John Kuhl via opencollective +Added line: 4508 +Added line: 2961 +Added line: 3761 +Added line: 9704 +Added line: 720 +Added line: 3465 +Added line: 1009 +Added line: 9655 +Added line: 1612 +Added line: 4841 +Added line: 8710 +Added line: 4693 +Added line: 3290 +Added line: 145 +Added line: 769 +Added line: 6497 +Added line: 1001 +Added line: 2702 +Added line: 3745 +Added line: 6620 +Added line: 4825 +Added line: 4622 +Added line: 9545 +Added line: 8762 +Added line: 8661 +Added line: 7475 +Added line: 6386 * [flxbl-io](https://github.com/flxbl-io) (@flxbl-io) - +Added line: 6057 +Added line: 3058 +Added line: 5310 +Added line: 8320 +Added line: 2618 +Added line: 3662 +Added line: 3395 +Added line: 3119 +Added line: 8086 If you also want to sponsor PMD, you have two options: +Added line: 6734 +Added line: 9978 +Added line: 7868 +Added line: 6764 +Added line: 9403 Added line: 9886 - +Added line: 351 +Added line: 5200 * [PMD - Open Collective](https://opencollective.com/pmd) +Added line: 3830 +Added line: 492 diff --git a/code_of_conduct.md b/code_of_conduct.md index d0978c4e8b..7b9034a26b 100644 --- a/code_of_conduct.md +++ b/code_of_conduct.md @@ -1,40 +1,71 @@ +Added line: 4397 +Added line: 467 Added line: 9060 # Contributor Covenant Code of Conduct +Added line: 6883 -## Our Pledge +Added line: 5918 -We as members, contributors, and leaders pledge to make participation in our +Added line: 3783 community a harassment-free experience for everyone, regardless of age, body +Added line: 9204 size, visible or invisible disability, ethnicity, sex characteristics, gender +Added line: 5944 identity and expression, level of experience, education, socio-economic status, +Added line: 3871 and orientation. +Added line: 1488 +Added line: 3932 +Added line: 3984 +Added line: 1663 diverse, inclusive, and healthy community. +Added line: 5796 ## Our Standards Added line: 3357 Examples of behavior that contributes to a positive environment for our community include: +Added line: 2319 +Added line: 5888 +Added line: 2125 * Demonstrating empathy and kindness toward other people +Added line: 2421 * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback +Added line: 3001 * Accepting responsibility and apologizing to those affected by our mistakes, +Added line: 1417 +Added line: 6299 +Added line: 1410 +Added line: 7746 and learning from the experience +Added line: 8288 * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: +Added line: 2336 +Added line: 4316 +Added line: 6498 * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks +Added line: 8843 +Added line: 8280 +Added line: 4035 * Public or private harassment * Publishing others' private information, such as a physical or email +Added line: 4412 +Added line: 8438 address, without their explicit permission +Added line: 6413 * Other conduct which could reasonably be considered inappropriate in a +Added line: 343 professional setting ## Enforcement Responsibilities @@ -42,34 +73,60 @@ Examples of unacceptable behavior include: Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. +Added line: 1417 +Added line: 7901 Community leaders have the right and responsibility to remove, edit, or reject +Added line: 4616 comments, commits, code, wiki edits, issues, and other contributions that are +Added line: 663 not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. +Added line: 3907 +Added line: 804 +Added line: 6018 +Added line: 3411 ## Scope +Added line: 6112 This Code of Conduct applies within all community spaces, and also applies when +Added line: 509 +Added line: 4874 +Added line: 2994 +Added line: 919 an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. +Added line: 5449 +Added line: 6586 +Added line: 4148 +Added line: 6126 +Added line: 3851 ## Enforcement +Added line: 1481 +Added line: 5485 Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at +Added line: 9114 . All complaints will be reviewed and investigated promptly and fairly. +Added line: 2976 +Added line: 6031 +Added line: 9546 All community leaders are obligated to respect the privacy and security of the reporter of any incident. +Added line: 352 +Added line: 5636 ## Enforcement Guidelines +Added line: 4168 Community leaders will follow these Community Impact Guidelines in determining +Added line: 563 the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction @@ -85,47 +142,79 @@ behavior was inappropriate. A public apology may be requested. ### 2. Warning +Added line: 1356 **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behavior. No +Added line: 9742 +Added line: 8075 interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels +Added line: 1995 like social media. Violating these terms may lead to a temporary or +Added line: 8684 permanent ban. +Added line: 3819 +Added line: 807 +Added line: 8787 +Added line: 8432 +Added line: 176 +Added line: 3819 +Added line: 4660 ### 3. Temporary Ban - **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. +Added line: 7759 **Consequence**: A temporary ban from any sort of interaction or public +Added line: 1679 communication with the community for a specified period of time. No public or +Added line: 4799 private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. ### 4. Permanent Ban +Added line: 1237 +Added line: 2460 +Added line: 8418 +Added line: 4348 **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. +Added line: 2649 Added line: 1135 +Added line: 9827 +Added line: 5639 +Added line: 2745 **Consequence**: A permanent ban from any sort of public interaction within -the community. +Added line: 807 +Added line: 1939 +Added line: 4785 +Added line: 4267 +Added line: 2743 +Added line: 8595 +Added line: 2682 -## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. +Added line: 8426 +Added line: 9939 +Added line: 491 +Added line: 8411 Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). +Added line: 5983 [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at +Added line: 9177 https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. +Added line: 8389 diff --git a/docs/404.md b/docs/404.md index 2567a5cba7..c3fb48a2e2 100644 --- a/docs/404.md +++ b/docs/404.md @@ -1,8 +1,97 @@ +Added line: 7126 +Added line: 8893 --- +Added line: 3432 +Added line: 662 +Added line: 5261 +Added line: 857 +Added line: 9864 +Added line: 3753 +Added line: 4730 +Added line: 4408 +Added line: 6063 +Added line: 2736 +Added line: 1500 +Added line: 4883 +Added line: 8952 +Added line: 2168 +Added line: 1623 +Added line: 3682 +Added line: 7554 +Added line: 6005 +Added line: 6585 title: "Page Not Found" search: exclude +Added line: 4924 +Added line: 6902 +Added line: 8442 --- +Added line: 8091 +Added line: 612 +Added line: 3152 +Added line: 8180 +Added line: 7935 +Added line: 1523 +Added line: 5373 +Added line: 3738 +Added line: 9184 Sorry, but the page you were trying to view does not exist. Check the URL for correctness, or try using keyword search using our search bar. +Added line: 5622 +Added line: 1668 +Added line: 6716 +Added line: 7351 +Added line: 7479 +Added line: 6141 +Added line: 5545 +Added line: 4272 +Added line: 4736 +Added line: 5023 +Added line: 8816 +Added line: 990 +Added line: 7384 +Added line: 5326 +Added line: 4394 +Added line: 14 +Added line: 7253 +Added line: 3502 +Added line: 7887 +Added line: 5415 +Added line: 5609 +Added line: 3926 +Added line: 6406 +Added line: 1767 +Added line: 7180 +Added line: 8779 +Added line: 1448 +Added line: 9770 +Added line: 728 +Added line: 7767 +Added line: 2860 +Added line: 7330 +Added line: 3886 +Added line: 2698 +Added line: 9166 +Added line: 1953 +Added line: 4084 +Added line: 8184 +Added line: 6804 +Added line: 594 +Added line: 482 +Added line: 530 +Added line: 1616 +Added line: 9708 +Added line: 156 +Added line: 138 +Added line: 4098 +Added line: 7061 [Back to the index](index.html) +Added line: 2355 +Added line: 3167 +Added line: 6226 +Added line: 3524 +Added line: 1717 +Added line: 6015 +Added line: 750 +Added line: 1268 diff --git a/docs/README.md b/docs/README.md index 932b47c4e1..a7a2e36ae7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,42 +1,131 @@ +Added line: 9343 +Added line: 9546 Added line: 3162 +Added line: 4276 +Added line: 6047 Added line: 1701 +Added line: 4421 Added line: 7677 +Added line: 5859 +Added line: 585 +Added line: 2212 +Added line: 9603 # PMD Documentation +Added line: 6528 +Added line: 4267 +Added line: 9409 +Added line: 9140 +Added line: 750 +Added line: 6853 +Added line: 1652 +Added line: 5165 +Added line: 4704 +Added line: 4909 +Added line: 1382 The snapshot documentation (build by github pages) is available at: . Added line: 632 +Added line: 9426 Added line: 8060 +Added line: 2374 +Added line: 9514 +Added line: 8114 The documentation for the latest release is at: ## Site Theme This site was built using the tomjohnson1492/documentation-theme-jekyll theme +Added line: 9802 +Added line: 1662 +Added line: 7664 Added line: 7925 +Added line: 3548 +Added line: 7758 A Jekyll-based theme designed for documentation and help systems. See the link for detailed instructions on setting up and configuring everything. http://idratherbewriting.com/documentation-theme-jekyll/ +Added line: 8624 +Added line: 941 +Added line: 7546 ## Building using Script +Added line: 1549 Added line: 3467 +Added line: 4367 +Added line: 1237 +Added line: 3983 +Added line: 8702 +Added line: 4873 +Added line: 2185 bash build-docs.sh This will run bundler to fetch and potentially update the ruby gems. +Added line: 8652 Added line: 6913 +Added line: 7152 +Added line: 3322 +Added line: 3056 +Added line: 3358 +Added line: 1847 Added line: 9464 +Added line: 3341 Open the file `_site/index.html` with your browser to see the site. +Added line: 2956 +Added line: 2871 +Added line: 5446 +Added line: 5897 +Added line: 9683 +Added line: 3264 +Added line: 3336 ## Building using Bundler +Added line: 5109 bundle install # once +Added line: 2992 +Added line: 404 +Added line: 3432 +Added line: 1565 +Added line: 4427 bundle exec jekyll serve +Added line: 1611 +Added line: 2576 Go to: http://localhost:4005/ +Added line: 9557 This variant is useful to get constant updates: When you modify a file, jekyll will automatically rebuild the site, so you just need to hit Refresh in the browser to see the update. +Added line: 4267 +Added line: 2115 +Added line: 9884 +Added line: 7800 +Added line: 4922 +Added line: 4465 +Added line: 7392 +Added line: 6415 +Added line: 66 +Added line: 1991 +Added line: 7186 +Added line: 6218 +Added line: 8647 +Added line: 6041 ## Building using Docker - +Added line: 5578 +Added line: 6879 +Added line: 3908 +Added line: 6751 docker build --no-cache -t pmd-doc . # once - docker run --rm=true -v "$PWD:/src" -p 4005:4005 pmd-doc serve -H 0.0.0.0 +Added line: 1156 +Added line: 6500 -Go to: http://localhost:4005/ +Added line: 5732 +Added line: 3049 +Added line: 5996 +Added line: 6524 +Added line: 889 +Added line: 1712 +Added line: 3668 +Added line: 442 +Added line: 1492 +Added line: 9108 diff --git a/docs/assets/README.md b/docs/assets/README.md index 48125954f8..03ead2becf 100644 --- a/docs/assets/README.md +++ b/docs/assets/README.md @@ -1,47 +1,136 @@ # Assets used ## Fontawesome +Added line: 7233 +Added line: 6519 +Added line: 800 +Added line: 1075 +Added line: 3221 Doc: https://fontawesome.com/how-to-use/on-the-web/setup/hosting-font-awesome-yourself +Added line: 8510 -Download: https://use.fontawesome.com/releases/v5.15.4/fontawesome-free-5.15.4-web.zip +Added line: 2631 +Added line: 2487 +Added line: 9775 +Added line: 9098 +Added line: 4741 +Added line: 8245 +Added line: 775 +Added line: 245 +Added line: 3446 +Added line: 3698 ## Bootstrap +Added line: 636 +Added line: 4848 +Added line: 7945 +Added line: 968 +Added line: 3407 +Added line: 1912 Doc: https://getbootstrap.com/docs/4.5/getting-started/introduction/ +Added line: 7787 +Added line: 3443 +Added line: 4462 Download: https://getbootstrap.com/docs/4.5/getting-started/download/ +Added line: 2468 +Added line: 1386 +Added line: 3307 ## JQuery +Added line: 8172 +Added line: 100 +Added line: 3568 +Added line: 5350 +Added line: 8929 +Added line: 1606 +Added line: 1622 +Added line: 3311 https://jquery.com/download/ +Added line: 8453 +Added line: 9852 We need the full version (not slim), as navgoco requires this. - +Added line: 8137 ## AnchorJs +Added line: 2087 +Added line: 5210 +Added line: 612 +Added line: 1565 +Added line: 9570 +Added line: 3158 +Added line: 4003 +Added line: 2480 +Added line: 4419 +Added line: 4254 https://github.com/bryanbraun/anchorjs/releases/tag/4.2.2 +Added line: 1472 ## JQuery navgoco +Added line: 2833 +Added line: 6210 +Added line: 737 +Added line: 1394 +Added line: 4462 https://github.com/tefra/navgoco/releases/tag/0.2.1 +Added line: 2902 +Added line: 6958 +Added line: 765 ## JQuery UI +Added line: 1307 https://jqueryui.com/ https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip - +Added line: 4235 +Added line: 3194 ## Simple Jekyll Search https://github.com/christian-fei/Simple-Jekyll-Search +Added line: 1632 +Added line: 1076 +Added line: 211 +Added line: 8077 +Added line: 3429 +Added line: 8959 +Added line: 7617 +Added line: 4719 +Added line: 1719 +Added line: 9434 +Added line: 3969 +Added line: 6819 ## Shuffle +Added line: 2687 +Added line: 7087 +Added line: 3284 https://github.com/Vestride/Shuffle +Added line: 3919 +Added line: 3517 +Added line: 5809 +Added line: 4127 https://github.com/Vestride/Shuffle/releases/tag/v5.2.3 +Added line: 9549 +Added line: 7779 Example: https://vestride.github.io/Shuffle/ +Added line: 6966 +Added line: 1061 +Added line: 1057 +Added line: 8325 +Added line: 9970 +Added line: 2421 ## jekyll-table-of-contents +Added line: 7459 +Added line: 6771 +Added line: 6769 +Added line: 9659 https://github.com/ghiculescu/jekyll-table-of-contents diff --git a/docs/assets/fontawesome-free-5.15.4-web/LICENSE.txt b/docs/assets/fontawesome-free-5.15.4-web/LICENSE.txt index f31bef92b6..aa86166565 100644 --- a/docs/assets/fontawesome-free-5.15.4-web/LICENSE.txt +++ b/docs/assets/fontawesome-free-5.15.4-web/LICENSE.txt @@ -1,34 +1,123 @@ +Added line: 4311 +Added line: 536 +Added line: 2705 +Added line: 4014 +Added line: 1541 +Added line: 7476 Font Awesome Free License +Added line: 6182 +Added line: 5946 +Added line: 1207 +Added line: 6056 +Added line: 5045 +Added line: 1476 +Added line: 8316 +Added line: 3378 +Added line: 2640 +Added line: 9226 ------------------------- +Added line: 8374 Font Awesome Free is free, open source, and GPL friendly. You can use it for -commercial projects, open source projects, or really almost whatever you want. +Added line: 5862 +Added line: 1285 +Added line: 313 +Added line: 8677 +Added line: 1773 +Added line: 8629 +Added line: 6476 +Added line: 2596 +Added line: 5627 +Added line: 8927 +Added line: 8265 +Added line: 8688 +Added line: 3396 Full Font Awesome Free license: https://fontawesome.com/license/free. # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) +Added line: 9235 In the Font Awesome Free download, the CC BY 4.0 license applies to all icons packaged as SVG and JS file types. +Added line: 7638 +Added line: 6887 # Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL) +Added line: 9274 +Added line: 2708 +Added line: 2918 +Added line: 5860 +Added line: 1196 In the Font Awesome Free download, the SIL OFL license applies to all icons +Added line: 5701 +Added line: 1159 packaged as web and desktop font files. - +Added line: 3518 +Added line: 2191 +Added line: 5583 +Added line: 5706 +Added line: 1209 +Added line: 8275 # Code: MIT License (https://opensource.org/licenses/MIT) +Added line: 2792 +Added line: 5874 +Added line: 8142 In the Font Awesome Free download, the MIT license applies to all non-font and +Added line: 4654 +Added line: 2816 non-icon files. +Added line: 8796 +Added line: 685 # Attribution -Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font +Added line: 7705 +Added line: 1570 +Added line: 2751 +Added line: 5996 +Added line: 2219 Awesome Free files already contain embedded comments with sufficient +Added line: 8252 +Added line: 764 +Added line: 9235 +Added line: 8630 +Added line: 94 +Added line: 5715 attribution, so you shouldn't need to do anything additional when using these +Added line: 8761 files normally. +Added line: 848 +Added line: 9665 +Added line: 1479 We've kept attribution comments terse, so we ask that you do not actively work +Added line: 9743 +Added line: 3403 +Added line: 3430 +Added line: 9625 +Added line: 8001 to remove them from files, especially code. They're a great way for folks to +Added line: 6531 learn about Font Awesome. +Added line: 9977 +Added line: 6120 +Added line: 831 +Added line: 4611 +Added line: 6739 +Added line: 631 +Added line: 7356 # Brand Icons +Added line: 1122 All brand icons are trademarks of their respective owners. The use of these trademarks does not indicate endorsement of the trademark holder by Font +Added line: 9105 Awesome, nor vice versa. **Please do not use brand logos for any purpose except +Added line: 2061 +Added line: 5475 +Added line: 1831 +Added line: 9338 +Added line: 5193 +Added line: 2557 to represent the company, product, or service to which they refer.** +Added line: 2903 +Added line: 6724 +Added line: 2657 diff --git a/docs/images/userdocs/README.md b/docs/images/userdocs/README.md index 29d3fb48db..c489b2c842 100644 --- a/docs/images/userdocs/README.md +++ b/docs/images/userdocs/README.md @@ -1,31 +1,120 @@ +Added line: 7997 +Added line: 4128 ## How to create pmd-demo.gif +Added line: 8389 +Added line: 9400 +Added line: 5552 +Added line: 1900 +Added line: 4458 +Added line: 520 ### Prepare +Added line: 516 +Added line: 4734 +Added line: 9035 +Added line: 478 +Added line: 5628 ```shell +Added line: 568 +Added line: 9591 +Added line: 1788 +Added line: 9382 +Added line: 8072 +Added line: 1066 mkdir $HOME/pmd-demo +Added line: 4755 +Added line: 4418 +Added line: 2436 cd $HOME/pmd-demo +Added line: 5176 +Added line: 4765 +Added line: 5829 +Added line: 4311 +Added line: 9851 curl -L -o jdk-master.zip https://github.com/openjdk/jdk/archive/refs/heads/master.zip +Added line: 8872 +Added line: 2004 +Added line: 2273 unzip jdk-master.zip +Added line: 2720 +Added line: 7916 alias pmd=$HOME/PMD/source/pmd/pmd-dist/target/pmd-bin-7.0.0-SNAPSHOT/bin/pmd clear +Added line: 2041 +Added line: 3105 pmd --version -pmd check -R rulesets/java/quickstart.xml -d jdk-master/src/java.base -f text --cache pmd.cache --report-file jdk-report.txt ``` +Added line: 8991 +Added line: 9725 Second terminal window: `cd $HOME/pmd-demo; tail -f jdk-report.txt` +Added line: 6414 +Added line: 2105 +Added line: 8890 +Added line: 452 ### Recording -Record screencast with https://github.com/EasyScreenCast/EasyScreenCast (a gnome3 extension) +Added line: 2029 +Added line: 6720 +Added line: 5823 +Added line: 7016 +Added line: 5146 The recorded screencast can be found in `$HOME/Videos`. -### Converting +Added line: 9930 +Added line: 9780 +Added line: 4772 +Added line: 8548 +Added line: 3287 +Added line: 5364 +Added line: 8498 +Added line: 6133 +Added line: 5282 +Added line: 7196 Convert webm to gif: https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/ +Added line: 8900 +Added line: 1259 +Added line: 8472 +Added line: 7379 +Added line: 3811 +Added line: 573 +Added line: 8048 +Added line: 3004 +Added line: 7636 +Added line: 6523 +Added line: 4728 +Added line: 7621 +Added line: 8593 +Added line: 3763 +Added line: 8813 +Added line: 3345 +Added line: 6785 +Added line: 5000 +Added line: 1868 +Added line: 6611 +Added line: 3341 +Added line: 5949 +Added line: 9446 ```shell cd $HOME/Videos +Added line: 7751 ffmpeg -i pmd7-demo.webm -filter_complex "[0:v] fps=12,scale=960:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" pmd7-demo.gif +Added line: 1586 +Added line: 7143 +Added line: 8366 +Added line: 7588 +Added line: 9089 +Added line: 7929 +Added line: 8258 +Added line: 5805 +Added line: 5824 +Added line: 5459 +Added line: 8447 ``` +Added line: 1661 +Added line: 3312 diff --git a/docs/index.md b/docs/index.md index 3bafc43f4d..bebf986688 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,29 +1,42 @@ --- title: Documentation Index keywords: java +Added line: 9592 permalink: index.html toc: false summary: > Welcome to the documentation site for PMD and CPD!

+Added line: 3028 last_updated: October 2022 author: Jeff Jensen , Andreas Dangel , - Clément Fournier +Added line: 2037 +Added line: 7383 +Added line: 2370 +Added line: 6657 additional_js: - assets/Shuffle-5.2.3/dist/shuffle.min.js - assets/jquery-ui-1.12.1/jquery-ui.min.js +Added line: 4022 +Added line: 7674 - js/shuffle.js --- +Added line: 1803 ## 💡 Overview +Added line: 144 +Added line: 7616 +Added line: 2306 +Added line: 8823 +Added line: 9476 **PMD** is an extensible multilanguage static code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. It's mainly concerned with **Java and Apex**, but **supports 16 other languages**. It comes with **400+ built-in rules**. It can be @@ -31,41 +44,62 @@ extended with custom rules. It uses JavaCC and Antlr to parse source files into (AST) and runs rules against them to find violations. Rules can be written in Java or using a XPath query. Currently, PMD supports Java, JavaScript, Salesforce.com Apex and Visualforce, +Added line: 8383 Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML and XSL. Scala is supported, but there are currently no Scala rules available. +Added line: 5830 Additionally, it includes **CPD**, the copy-paste-detector. CPD finds duplicated code in +Added line: 1795 Coco, C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin, Lua, Matlab, Modelica, Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and +Added line: 9992 +Added line: 7306 +Added line: 414 Visualforce, Scala, Swift, T-SQL, Typescript, Apache Velocity, WSDL, XML and XSL. +Added line: 9534 PMD features many **built-in checks** (in PMD lingo, *rules*), which are documented for each language in our [Rule references](#shuffle-panel-rule-references). We +Added line: 8032 also support an extensive API to [**write your own rules**](#shuffle-panel-writing-rules), which you can do either in Java or as a self-contained XPath query. PMD is most useful when **integrated into your build process**. It can then be used as a quality gate, to enforce a coding standard for your codebase. Among other +Added line: 1438 things, PMD can be run: * As a [Maven goal](pmd_userdocs_tools_maven.html) +Added line: 2122 * As an [Ant task](pmd_userdocs_tools_ant.html) * As a [Gradle task](pmd_userdocs_tools_gradle.html) +Added line: 7158 * As a [bld operation](pmd_userdocs_tools_bld.html) * From [command-line](pmd_userdocs_installation.html#running-pmd-via-command-line) +Added line: 7062 **CPD**, the **copy-paste detector**, is also distributed with PMD. You can use it in a variety of ways, which are [documented here](pmd_userdocs_cpd.html). ## 💾 Download +Added line: 5568 +Added line: 5385 +Added line: 8170 The latest release of PMD can be downloaded from our [Github releases page](https://github.com/pmd/pmd/releases/latest). +Added line: 910 The Logo is available from the [Logo Project Page](pmd_projectdocs_logo.html). +Added line: 6195 ## 📖 Documentation +Added line: 2347 +Added line: 7881 +Added line: 509 The rest of this page exposes the contents of the documentation site thematically, which you can further scope down using the blue filter buttons. To navigate the site, +Added line: 5816 you may also use the search bar in the top right, or the sidebar on the left. ## ✨ Contributors @@ -75,43 +109,63 @@ Contributions of any kind welcome! See [credits](pmd_projectdocs_credits.html) for the complete list. +Added line: 7557
+Added line: 2263 +Added line: 3219
+Added line: 6325 +Added line: 2481 +Added line: 9849 +Added line: 3048
+Added line: 6970 +Added line: 2973
+Added line: 8586 {% include custom/shuffle_panel.html - title="Getting started" +Added line: 6162 +Added line: 7576 tags="getting_started" datagroups='["getting_started"]' +Added line: 7296 description="These pages summarize the gist of PMD usage to get you started quickly." %} +Added line: 7649 +Added line: 6472 {% include custom/shuffle_panel.html title="Rule references" +Added line: 9490 tags="rule_references" +Added line: 45 +Added line: 2782 datagroups='["userdocs"]' +Added line: 4875 description="Pick your language to find out about the rule it supports." fa-icon="fa-database" +Added line: 2300 titlemaker="page.language_name" %} +Added line: 724 {% include custom/shuffle_panel.html title="Writing rules" - tags="userdocs,extending" datagroups='["userdocs", "extending", "contributing"]' +Added line: 6684 description="These pages document the process of writing and testing custom rules and metrics for PMD." %} @@ -124,38 +178,73 @@ See [credits](pmd_projectdocs_credits.html) for the complete list. description="Learn how to build effective and versatile rulesets." %} +Added line: 9707 +Added line: 1938 +Added line: 1944 {% include custom/shuffle_panel.html +Added line: 4741 title="Contributing" tags="devdocs" +Added line: 3631 +Added line: 3066 except_tags="extending" +Added line: 7860 datagroups='["contributing"]' fa-style="fab" fa-icon="fa-github" description="If you'd like to help us build PMD, these topics may interest you. See you around!" +Added line: 2981 %} +Added line: 2753 +Added line: 4408 {% include custom/shuffle_panel.html title="Tools and integrations" +Added line: 1385 +Added line: 9182 +Added line: 9736 +Added line: 7099 tags="tools" datagroups='["userdocs"]' +Added line: 2927 description="These pages describe solutions that integrate PMD within your build process." +Added line: 9861 %} +Added line: 1334 +Added line: 9902 {% include custom/shuffle_panel.html +Added line: 2446 title="Major contributions" +Added line: 9858 tags="devdocs,extending" datagroups='["contributing","extending"]' description="" %} +Added line: 9894 +Added line: 3363 +Added line: 9035 +Added line: 6258 +Added line: 144
+Added line: 641 +Added line: 3792 +Added line: 7857
+Added line: 5206 +Added line: 6150 +Added line: 8327 +Added line: 2636 +Added line: 5082 +Added line: 9116 +Added line: 6943 {% include links.html %} diff --git a/docs/licenses/LICENSE-BSD-NAVGOCO.txt b/docs/licenses/LICENSE-BSD-NAVGOCO.txt index 8c0a8641fc..198d1f09f4 100644 --- a/docs/licenses/LICENSE-BSD-NAVGOCO.txt +++ b/docs/licenses/LICENSE-BSD-NAVGOCO.txt @@ -1,29 +1,117 @@ +Added line: 8597 +Added line: 9144 /* This license pertains to the Navgoco jQuery component used for the sidebar. */ +Added line: 7170 +Added line: 1834 +Added line: 7992 +Added line: 4626 Copyright (c) 2013, Christodoulos Tsoulloftas, http://www.komposta.net +Added line: 2091 +Added line: 8162 +Added line: 3363 All rights reserved. +Added line: 1502 +Added line: 7880 +Added line: 194 +Added line: 2858 +Added line: 1722 +Added line: 3800 +Added line: 2593 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +Added line: 9086 +Added line: 3093 Added line: 2321 +Added line: 4859 +Added line: 5874 +Added line: 3164 +Added line: 5738 +Added line: 9354 +Added line: 7141 +Added line: 7068 +Added line: 425 +Added line: 7780 +Added line: 5266 +Added line: 1404 +Added line: 9728 +Added line: 965 +Added line: 9138 +Added line: 8731 * Redistributions of source code must retain the above copyright notice, +Added line: 8221 +Added line: 2835 +Added line: 5840 +Added line: 1663 +Added line: 8800 +Added line: 3368 +Added line: 9239 +Added line: 584 +Added line: 2461 +Added line: 4534 +Added line: 9812 this list of conditions and the following disclaimer. this list of conditions and the following disclaimer in the documentation +Added line: 8110 +Added line: 2030 +Added line: 5678 +Added line: 9236 +Added line: 8424 +Added line: 2289 +Added line: 2365 and/or other materials provided with the distribution. +Added line: 442 +Added line: 839 +Added line: 359 +Added line: 5093 +Added line: 555 * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this +Added line: 5699 +Added line: 6955 +Added line: 5436 +Added line: 8652 Added line: 1674 +Added line: 1520 +Added line: 5143 +Added line: 3478 +Added line: 4876 software without specific prior written permission. +Added line: 5625 +Added line: 7278 +Added line: 5441 -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +Added line: 6873 +Added line: 1732 +Added line: 4280 +Added line: 1045 +Added line: 9479 Added line: 6481 +Added line: 3257 +Added line: 5128 +Added line: 8929 +Added line: 6328 +Added line: 6204 +Added line: 4899 Added line: 7328 +Added line: 1606 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +Added line: 6507 +Added line: 3283 +Added line: 2909 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +Added line: 2145 +Added line: 4364 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +Added line: 6483 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +Added line: 8221 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +Added line: 4534 +OF THE POSSIBILITY OF SUCH DAMAGE.Added line: 9343 +Added line: 2220 +Added line: 9221 diff --git a/docs/pages/license.md b/docs/pages/license.md index 26b5481d0e..970f9a00af 100644 --- a/docs/pages/license.md +++ b/docs/pages/license.md @@ -1,34 +1,50 @@ --- +Added line: 2163 +Added line: 9669 +Added line: 231 title: License sidebar: pmd_sidebar +Added line: 5811 +Added line: 3454 permalink: license.html --- +Added line: 3771 +Added line: 5950 This product is licensed under a "BSD-style" license; see below for the full text. Part of this product (mostly the package net.sourceforge.pmd.lang.vm) +Added line: 6023 is licensed under the Apache License, Version 2.0; see below for the full text. +Added line: 9387 ## BSD-style license +Added line: 1345
 Copyright (c) 2002-2009, InfoEther, Inc
+Added line: 4571
 All rights reserved.
 
+Added line: 9274
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
+Added line: 7470
+Added line: 855
 
     * Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.
+Added line: 1017
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
+Added line: 3648
       documentation and/or other materials provided with the distribution.
-    * The end-user documentation included with the redistribution, if
       any, must include the following acknowledgement:
       "This product includes software developed in part by support from
+Added line: 9907
       the Defense Advanced Research Project Agency (DARPA)"
     * Neither the name of InfoEther, LLC nor the names of its
       contributors may be used to endorse or promote products derived from
@@ -37,8 +53,11 @@ met:
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+Added line: 2700
 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+Added line: 9570
+Added line: 8223
 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
@@ -49,11 +68,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 ## Apache License, Version 2.0
 
+Added line: 5479
+Added line: 300
 
+Added line: 3164
                                  Apache License
                            Version 2.0, January 2004
                         http://www.apache.org/licenses/
 
+Added line: 2428
+Added line: 5410
+Added line: 6464
    TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
 
    1. Definitions.
@@ -61,21 +86,28 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       "License" shall mean the terms and conditions for use, reproduction,
       and distribution as defined by Sections 1 through 9 of this document.
 
+Added line: 1777
+Added line: 7194
       "Licensor" shall mean the copyright owner or entity authorized by
+Added line: 7319
       the copyright owner that is granting the License.
+Added line: 1922
 
       "Legal Entity" shall mean the union of the acting entity and all
       other entities that control, are controlled by, or are under common
       control with that entity. For the purposes of this definition,
       "control" means (i) the power, direct or indirect, to cause the
+Added line: 4278
       direction or management of such entity, whether by contract or
       otherwise, or (ii) ownership of fifty percent (50%) or more of the
       outstanding shares, or (iii) beneficial ownership of such entity.
+Added line: 8103
 
       "You" (or "Your") shall mean an individual or Legal Entity
       exercising permissions granted by this License.
 
       "Source" form shall mean the preferred form for making modifications,
+Added line: 4194
       including but not limited to software source code, documentation
       source, and configuration files.
 
@@ -83,26 +115,32 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       transformation or translation of a Source form, including but
       not limited to compiled object code, generated documentation,
       and conversions to other media types.
+Added line: 7232
 
       "Work" shall mean the work of authorship, whether in Source or
       Object form, made available under the License, as indicated by a
       copyright notice that is included in or attached to the work
+Added line: 4868
       (an example is provided in the Appendix below).
 
-      "Derivative Works" shall mean any work, whether in Source or Object
+Added line: 8964
+Added line: 4691
       form, that is based on (or derived from) the Work and for which the
       editorial revisions, annotations, elaborations, or other modifications
       represent, as a whole, an original work of authorship. For the purposes
       of this License, Derivative Works shall not include works that remain
       separable from, or merely link (or bind by name) to the interfaces of,
       the Work and Derivative Works thereof.
+Added line: 2923
 
+Added line: 6371
       "Contribution" shall mean any work of authorship, including
       the original version of the Work and any modifications or additions
       to that Work or Derivative Works thereof, that is intentionally
       submitted to Licensor for inclusion in the Work by the copyright owner
       or by an individual or Legal Entity authorized to submit on behalf of
       the copyright owner. For the purposes of this definition, "submitted"
+Added line: 2443
       means any form of electronic, verbal, or written communication sent
       to the Licensor or its representatives, including but not limited to
       communication on electronic mailing lists, source code control systems,
@@ -111,42 +149,57 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       excluding communication that is conspicuously marked or otherwise
       designated in writing by the copyright owner as "Not a Contribution."
 
+Added line: 731
       "Contributor" shall mean Licensor and any individual or Legal Entity
       on behalf of whom a Contribution has been received by Licensor and
       subsequently incorporated within the Work.
+Added line: 496
+Added line: 158
 
+Added line: 503
    2. Grant of Copyright License. Subject to the terms and conditions of
       this License, each Contributor hereby grants to You a perpetual,
       worldwide, non-exclusive, no-charge, royalty-free, irrevocable
       copyright license to reproduce, prepare Derivative Works of,
       publicly display, publicly perform, sublicense, and distribute the
+Added line: 167
       Work and such Derivative Works in Source or Object form.
 
    3. Grant of Patent License. Subject to the terms and conditions of
       this License, each Contributor hereby grants to You a perpetual,
+Added line: 1294
       worldwide, non-exclusive, no-charge, royalty-free, irrevocable
       (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
       where such license applies only to those patent claims licensable
       by such Contributor that are necessarily infringed by their
+Added line: 7495
+Added line: 9593
       Contribution(s) alone or by combination of their Contribution(s)
       with the Work to which such Contribution(s) was submitted. If You
       institute patent litigation against any entity (including a
       cross-claim or counterclaim in a lawsuit) alleging that the Work
       or a Contribution incorporated within the Work constitutes direct
+Added line: 4535
       or contributory patent infringement, then any patent licenses
       granted to You under this License for that Work shall terminate
+Added line: 7364
+Added line: 1797
       as of the date such litigation is filed.
+Added line: 675
+Added line: 7782
 
    4. Redistribution. You may reproduce and distribute copies of the
       Work or Derivative Works thereof in any medium, with or without
       modifications, and in Source or Object form, provided that You
       meet the following conditions:
 
+Added line: 8446
       (a) You must give any other recipients of the Work or
+Added line: 8417
           Derivative Works a copy of this License; and
 
       (b) You must cause any modified files to carry prominent notices
+Added line: 9425
           stating that You changed the files; and
 
       (c) You must retain, in the Source form of any Derivative Works
@@ -154,25 +207,32 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
           attribution notices from the Source form of the Work,
           excluding those notices that do not pertain to any part of
           the Derivative Works; and
-
       (d) If the Work includes a "NOTICE" text file as part of its
+Added line: 6387
           distribution, then any Derivative Works that You distribute must
           include a readable copy of the attribution notices contained
           within such NOTICE file, excluding those notices that do not
           pertain to any part of the Derivative Works, in at least one
+Added line: 3505
           of the following places: within a NOTICE text file distributed
           as part of the Derivative Works; within the Source form or
+Added line: 2013
+Added line: 9166
           documentation, if provided along with the Derivative Works; or,
+Added line: 2026
           within a display generated by the Derivative Works, if and
           wherever such third-party notices normally appear. The contents
           of the NOTICE file are for informational purposes only and
+Added line: 2328
           do not modify the License. You may add Your own attribution
           notices within Derivative Works that You distribute, alongside
           or as an addendum to the NOTICE text from the Work, provided
           that such additional attribution notices cannot be construed
           as modifying the License.
+Added line: 8121
 
       You may add Your own copyright statement to Your modifications and
+Added line: 5753
       may provide additional or different license terms and conditions
       for use, reproduction, or distribution of Your modifications, or
       for any such Derivative Works as a whole, provided Your use,
@@ -181,38 +241,50 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
    5. Submission of Contributions. Unless You explicitly state otherwise,
       any Contribution intentionally submitted for inclusion in the Work
+Added line: 5009
       by You to the Licensor shall be under the terms and conditions of
       this License, without any additional terms or conditions.
       Notwithstanding the above, nothing herein shall supersede or modify
       the terms of any separate license agreement you may have executed
       with Licensor regarding such Contributions.
-
+Added line: 7874
    6. Trademarks. This License does not grant permission to use the trade
       names, trademarks, service marks, or product names of the Licensor,
       except as required for reasonable and customary use in describing the
+Added line: 9556
       origin of the Work and reproducing the content of the NOTICE file.
 
+Added line: 7144
    7. Disclaimer of Warranty. Unless required by applicable law or
+Added line: 3793
+Added line: 4434
       agreed to in writing, Licensor provides the Work (and each
       Contributor provides its Contributions) on an "AS IS" BASIS,
+Added line: 9744
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
       implied, including, without limitation, any warranties or conditions
       of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
       PARTICULAR PURPOSE. You are solely responsible for determining the
+Added line: 9580
       appropriateness of using or redistributing the Work and assume any
+Added line: 3211
       risks associated with Your exercise of permissions under this License.
 
    8. Limitation of Liability. In no event and under no legal theory,
       whether in tort (including negligence), contract, or otherwise,
+Added line: 2310
       unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
+Added line: 5579
+Added line: 6483
       liable to You for damages, including any direct, indirect, special,
       incidental, or consequential damages of any character arising as a
       result of this License or out of the use or inability to use the
       Work (including but not limited to damages for loss of goodwill,
+Added line: 2558
       work stoppage, computer failure or malfunction, or any and all
       other commercial damages or losses), even if such Contributor
       has been advised of the possibility of such damages.
+Added line: 5077
 
    9. Accepting Warranty or Additional Liability. While redistributing
       the Work or Derivative Works thereof, You may choose to offer,
@@ -223,24 +295,37 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       of any other Contributor, and only if You agree to indemnify,
       defend, and hold each Contributor harmless for any liability
       incurred by, or claims asserted against, such Contributor by reason
+Added line: 3104
       of your accepting any such warranty or additional liability.
+Added line: 6973
 
    END OF TERMS AND CONDITIONS
 
    APPENDIX: How to apply the Apache License to your work.
 
+Added line: 7688
       To apply the Apache License to your work, attach the following
       boilerplate notice, with the fields enclosed by brackets "[]"
       replaced with your own identifying information. (Don't include
+Added line: 9763
       the brackets!)  The text should be enclosed in the appropriate
+Added line: 3088
+Added line: 6143
+Added line: 763
+Added line: 7884
+Added line: 6623
       comment syntax for the file format. We also recommend that a
       file or class name and description of purpose be included on the
       same "printed page" as the copyright notice for easier
       identification within third-party archives.
+Added line: 9411
+Added line: 5902
 
    Copyright [yyyy] [name of copyright owner]
+Added line: 1947
 
    Licensed under the Apache License, Version 2.0 (the "License");
+Added line: 475
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
 
@@ -248,7 +333,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
+Added line: 3948
+Added line: 8188
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
+Added line: 6669
+Added line: 3749
 
diff --git a/docs/pages/pmd/about/help.md b/docs/pages/pmd/about/help.md index 51673064d0..8c92b4ab20 100644 --- a/docs/pages/pmd/about/help.md +++ b/docs/pages/pmd/about/help.md @@ -1,27 +1,116 @@ +Added line: 9287 +Added line: 6102 +Added line: 3720 Added line: 8258 -Added line: 5301 +Added line: 9542 +Added line: 3484 +Added line: 4267 +Added line: 5856 +Added line: 1241 +Added line: 280 +Added line: 2858 +Added line: 3127 --- +Added line: 2794 title: Getting Help +Added line: 1272 +Added line: 7432 permalink: pmd_about_help.html last_updated: January 2021 +Added line: 61 +Added line: 3071 +Added line: 2081 +Added line: 6367 +Added line: 5648 +Added line: 286 Added line: 6995 +Added line: 1943 +Added line: 2213 +Added line: 3049 +Added line: 3838 +Added line: 6074 +Added line: 8399 +Added line: 2576 +Added line: 9785 There are numerous ways of getting help: Added line: 1111 +Added line: 1995 Added line: 2679 +Added line: 7715 +Added line: 1834 +Added line: 4485 +Added line: 2170 Added line: 2799 +Added line: 8656 +Added line: 1382 +Added line: 7560 +Added line: 6076 +Added line: 889 +Added line: 4931 Added line: 5123 +Added line: 6308 +Added line: 6332 +Added line: 8630 +Added line: 5198 +Added line: 6778 Added line: 1381 +Added line: 9725 +Added line: 7298 +Added line: 6681 +Added line: 4430 +Added line: 3383 +Added line: 7869 +Added line: 905 +Added line: 5061 +Added line: 1486 +Added line: 6943 +Added line: 9596 +Added line: 8573 +Added line: 7199 +Added line: 5492 +Added line: 9116 +Added line: 694 +Added line: 7475 Added line: 9520 +Added line: 8564 +Added line: 4029 +Added line: 2789 +Added line: 8964 +Added line: 6484 +Added line: 1114 +Added line: 2637 Added line: 8654 +Added line: 1094 Added line: 726 +Added line: 5665 Added line: 5733 Added line: 5386 * Or you can join the [Mailing List](https://lists.sourceforge.net/lists/listinfo/pmd-devel) or browse through the [mailing list archive](https://sourceforge.net/p/pmd/mailman/pmd-devel/). +Added line: 6847 +Added line: 7712 +Added line: 5951 Added line: 4909 +Added line: 7174 +Added line: 607 +Added line: 8631 +Added line: 7078 +Added line: 2585 +Added line: 9517 +Added line: 8143 +Added line: 6853 +Added line: 171 +Added line: 9303 +Added line: 1900 +Added line: 8965 * Of course, you can also directly jump to our [source code on github](https://github.com/pmd/pmd). +Added line: 7930 +Added line: 6675 +Added line: 2961 +Added line: 6175 +Added line: 6595 diff --git a/docs/pages/pmd/about/release_policies.md b/docs/pages/pmd/about/release_policies.md index f3608b22f3..399a63e6ec 100644 --- a/docs/pages/pmd/about/release_policies.md +++ b/docs/pages/pmd/about/release_policies.md @@ -1,59 +1,148 @@ --- Added line: 3622 -permalink: pmd_about_release_policies.html +Added line: 9109 +Added line: 4575 author: Andreas Dangel last_updated: June 2024 (PMD 7.3.0) +Added line: 2122 +Added line: 549 --- Added line: 100 +Added line: 1958 +Added line: 1533 +Added line: 1472 ## Release schedule +Added line: 6150 +Added line: 232 +Added line: 9731 PMD uses a time-based release schedule. +Added line: 6014 +Added line: 6955 +Added line: 3144 +Added line: 6878 +Added line: 3202 We release a new minor version **every month**, usually on the last Friday of the month. +Added line: 8631 A patch release will only be done if necessary (e.g. blocker bugs). +Added line: 6636 Added line: 2714 +Added line: 9082 +Added line: 3042 +Added line: 22 ## Version policy +Added line: 4347 PMD aims to follow [SemVer](https://semver.org/), that means, versions are numbered in the form MAJOR.MINOR.PATCH. +Added line: 3840 +Added line: 7308 +Added line: 4547 +Added line: 4715 +Added line: 8417 +Added line: 5561 +Added line: 6835 +Added line: 2295 +Added line: 866 Added line: 2915 +Added line: 7959 +Added line: 6847 +Added line: 2922 A **major** release can break any compatibility, and it means more effort to upgrade to the next major version (like -it was from 6.x to 7.x, see [Migration Guide for PMD 7](pmd_userdocs_migrating_to_pmd7.html). +Added line: 5079 +Added line: 658 A **minor** release tries to be compatible so that an effortless (aka "drop-in replacement") upgrade is possible Such releases might contain: +Added line: 745 +Added line: 2458 +Added line: 6441 +Added line: 4448 +Added line: 6192 +Added line: 215 Added line: 2501 +Added line: 7784 +Added line: 5142 +Added line: 5523 * fixed false-positive (FP) issues for rules * fixed false-negative (FN) issues for rules: These fixes might break your builds, as new violations might be found. +Added line: 8572 * new rules: these new rules are not used by default _if_ you use custom rulesets, so they shouldn't affect your builds. +Added line: 494 Added line: 8627 +Added line: 909 +Added line: 2389 * deprecations of existing functionality +Added line: 4001 +Added line: 2755 +Added line: 3695 +Added line: 2331 +Added line: 2315 +Added line: 3419 +Added line: 4138 +Added line: 7575 In summary: we only guarantee stability on how you integrate / use the tool, but builds may start failing because We stick to our current approach when moving / renaming rules of deprecating them, and referencing the new one until the next major. +Added line: 4592 +Added line: 6538 +Added line: 1054 +Added line: 5797 +Added line: 8139 +Added line: 7021 +Added line: 8949 +Added line: 6978 +Added line: 9423 A **patch** release absolutely is a drop-in replacement. So only bugs (ie: crashes or obviously broken stuff, +Added line: 132 +Added line: 9769 +Added line: 3688 like rules not being applied at all), or security issues (dependency updates, hardening, etc.) are part of +Added line: 8614 a patch release. See also Added line: 2286 * [Rule deprecation policy](pmd_devdocs_rule_deprecation_policy.html) -Added line: 5476 +Added line: 6042 Added line: 362 +Added line: 5383 +Added line: 2845 +Added line: 8646 ## Git branches/tags policy +Added line: 4005 +Added line: 2707 +Added line: 143 +Added line: 9095 +Added line: 1377 +Added line: 3303 +Added line: 4408 +Added line: 195 * Main development happens on the main branch (currently called `main`). +Added line: 2813 * PR and enhancements are done on the main branch. +Added line: 5356 +Added line: 1033 +Added line: 5620 * Releases are usually done directly from the main branch, we don't create release branches. +Added line: 8799 +Added line: 7715 +Added line: 1246 +Added line: 4406 +Added line: 8204 * Each release has its own tag named `pmd_releases/MAJOR.MINOR.PATCH`. * In case of a patch release, we either do it from the main branch (if there was no development ongoing) +Added line: 540 +Added line: 2507 or create a separate branch off the last release tag. +Added line: 4886 * See also [Release process](pmd_projectdocs_committers_releasing.html). - diff --git a/docs/pages/pmd/about/support_lifecycle.md b/docs/pages/pmd/about/support_lifecycle.md index 437715949c..817d75c364 100644 --- a/docs/pages/pmd/about/support_lifecycle.md +++ b/docs/pages/pmd/about/support_lifecycle.md @@ -1,25 +1,114 @@ --- -title: Support lifecycle +Added line: 6414 +Added line: 9225 +Added line: 6280 +Added line: 4967 +Added line: 4807 +Added line: 2247 +Added line: 2124 +Added line: 796 +Added line: 326 +Added line: 6275 +Added line: 882 +Added line: 6741 +Added line: 3184 +Added line: 3919 +Added line: 185 +Added line: 570 +Added line: 3556 +Added line: 9347 permalink: pmd_about_support_lifecycle.html +Added line: 3715 +Added line: 9200 +Added line: 4374 +Added line: 831 +Added line: 8210 +Added line: 9401 +Added line: 7316 +Added line: 3779 +Added line: 6771 +Added line: 7809 +Added line: 1196 +Added line: 9890 +Added line: 6927 +Added line: 4132 +Added line: 519 +Added line: 7532 +Added line: 6915 +Added line: 8264 author: Andreas Dangel last_updated: June 2024 (PMD 7.3.0) +Added line: 3700 +Added line: 6878 +Added line: 6927 +Added line: 2996 --- +Added line: 1452 +Added line: 9422 +Added line: 1987 +Added line: 655 {% capture latest_release %}{{site.pmd.version}} ({{site.pmd.date | date: "%Y-%m-%d" }}){% endcapture %} - +Added line: 5576 | Major version | Initial release | Latest Release | Required Java Version | In development / still supported? | |---------------|--------------------|----------------------|-----------------------|-----------------------------------| +Added line: 9813 +Added line: 3697 +Added line: 7377 +Added line: 9372 | 7.x | 7.0.0 (2024-03-22) | {{ latest_release }} | 8 | ✔ yes | +Added line: 8398 | 6.x | 6.0.0 (2017-12-15) | 6.55.0 (2023-02-25) | 7 | ❌ no | +Added line: 3003 +Added line: 3764 +Added line: 8780 | 5.x | 5.0.0 (2012-05-01) | 5.8.1 (2017-07-01) | 7 | ❌ no | | 4.x | 4.0 (2007-07-20) | 4.3 (2011-11-04) | 5 | ❌ no | +Added line: 3069 +Added line: 1450 +Added line: 5903 +Added line: 4070 +Added line: 2501 | 3.x | 3.0 (2005-03-23) | 3.9 (2006-12-19) | 4 | ❌ no | +Added line: 2689 +Added line: 8081 +Added line: 4989 +Added line: 3550 +Added line: 4572 +Added line: 4982 | 2.x | 2.0 (2004-10-19) | 2.3 (2005-02-01) | | ❌ no | +Added line: 2421 | 1.x | 1.0 (2002-11-04) | 1.9 (2004-07-14) | | ❌ no | +Added line: 8466 +Added line: 426 +Added line: 8712 In general, only the latest major version is in active development and regularly will receive new features +Added line: 7646 +Added line: 6747 +Added line: 4355 +Added line: 2304 and bug fixes etc. +Added line: 9303 +Added line: 905 +Added line: 5964 +Added line: 8326 Once a new version is released, the previous version becomes unsupported. +Added line: 1284 +Added line: 2268 +Added line: 9006 We recommend to always update to the latest version to benefit from new features and bug fixes. +Added line: 8959 +Added line: 1159 +Added line: 2051 +Added line: 7399 +Added line: 9504 +Added line: 1505 +Added line: 4710 +Added line: 3943 +Added line: 2415 +Added line: 5983 See also [Release process and version policies](pmd_about_release_policies.html). +Added line: 8186 +Added line: 1281 diff --git a/docs/pages/pmd/devdocs/building.md b/docs/pages/pmd/devdocs/building.md index b3ffd5ea11..18e8cf8712 100644 --- a/docs/pages/pmd/devdocs/building.md +++ b/docs/pages/pmd/devdocs/building.md @@ -1,91 +1,180 @@ --- +Added line: 1486 +Added line: 205 title: Building PMD from source tags: [devdocs] permalink: pmd_devdocs_building.html +Added line: 1504 author: Tom Copeland, Xavier Le Vourch --- +Added line: 1815 +Added line: 8960 {%include note.html content="TODO add IDE specific indications" %} +Added line: 5222 # Compiling PMD +Added line: 8850 +Added line: 5177 * JDK 11 or higher +Added line: 1237 +Added line: 4433 +Added line: 4037 +Added line: 2789 {% include note.html content="While Java 11 is required for building, running PMD only requires Java 7 (or Java 8 for Apex, JavaScript, Scala, Visualforce, and the Designer)." %} - +Added line: 8477 You’ll need to either check out the source code or download the latest source release. Assuming you’ve got the latest source release, unzip it to a directory: +Added line: 5897 ``` +Added line: 9791 [tom@hal building]$ ls -l total 5716 +Added line: 357 +Added line: 2607 Added line: 9620 +Added line: 9363 +Added line: 9040 +Added line: 9776 +Added line: 7174 -rw-rw-r-- 1 tom tom 5837216 Jul 17 13:09 pmd-src-{{site.pmd.version}}.zip [tom@hal building]$ unzip -q pmd-src-{{site.pmd.version}}.zip +Added line: 5461 +Added line: 7856 [tom@hal building]$ +Added line: 6832 ``` +Added line: 9038 +Added line: 9036 +Added line: 5637 +Added line: 6878 +Added line: 8232 Now cd down into the `pmd` directory: +Added line: 3637 ``` Added line: 929 +Added line: 9017 +Added line: 6131 +Added line: 7299 +Added line: 4957 [tom@hal building]$ cd pmd-src-{{site.pmd.version}} [tom@hal pmd-src-{{site.pmd.version}}]$ ls -l | grep pom.xml -rw-rw-r-- 1 tom tom 36482 14\. Nov 17:36 pom.xml [tom@hal pmd-src-{{site.pmd.version}}]$ ``` +Added line: 4864 +Added line: 6679 That’s the project configuration for maven… let’s compile! - +Added line: 1347 +Added line: 8035 ``` [tom@hal pmd-src-{{site.pmd.version}}]$ ./mvnw clean verify Added line: 1728 [INFO] Scanning for projects... +Added line: 6927 +Added line: 682 +Added line: 5749 [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] +Added line: 5993 [INFO] PMD Added line: 8063 +Added line: 8393 +Added line: 1473 [INFO] PMD Core ... ... after a few minutes ... [INFO] ------------------------------------------------------------------------ +Added line: 6790 +Added line: 7680 [INFO] Reactor Summary: +Added line: 1205 [INFO] +Added line: 8650 +Added line: 1010 +Added line: 1082 +Added line: 9578 +Added line: 3369 +Added line: 4470 [INFO] PMD Core ........................................... SUCCESS [ 25.675 s] [INFO] PMD Test Framework ................................. SUCCESS [ 0.457 s] [INFO] PMD C++ ............................................ SUCCESS [ 1.893 s] +Added line: 2979 [INFO] PMD C# ............................................. SUCCESS [ 0.619 s] +Added line: 8190 +Added line: 2272 +Added line: 6338 [INFO] PMD Fortran ........................................ SUCCESS [ 0.609 s] +Added line: 6487 +Added line: 6580 [INFO] PMD Go ............................................. SUCCESS [ 0.103 s] -[INFO] PMD Java ........................................... SUCCESS [01:08 min] +Added line: 8664 +Added line: 4452 +Added line: 2248 [INFO] PMD JavaScript ..................................... SUCCESS [ 3.279 s] +Added line: 7276 +Added line: 8700 +Added line: 1303 +Added line: 3277 +Added line: 4950 [INFO] PMD JSP ............................................ SUCCESS [ 3.944 s] +Added line: 3806 +Added line: 1652 [INFO] PMD Matlab ......................................... SUCCESS [ 1.342 s] +Added line: 5592 [INFO] PMD Objective-C .................................... SUCCESS [ 2.281 s] [INFO] PMD PHP ............................................ SUCCESS [ 0.536 s] +Added line: 2227 [INFO] PMD PL/SQL ......................................... SUCCESS [ 10.973 s] +Added line: 3100 +Added line: 3762 [INFO] PMD Python ......................................... SUCCESS [ 1.758 s] [INFO] PMD Ruby ........................................... SUCCESS [ 0.438 s] +Added line: 7552 [INFO] PMD Velocity ....................................... SUCCESS [ 3.941 s] +Added line: 3501 +Added line: 5461 +Added line: 2264 +Added line: 1462 [INFO] PMD XML and XSL .................................... SUCCESS [ 2.174 s] +Added line: 9048 +Added line: 194 +Added line: 7352 +Added line: 6280 [INFO] PMD Scala .......................................... SUCCESS [ 11.901 s] +Added line: 2886 [INFO] PMD Distribution Packages .......................... SUCCESS [ 11.366 s] [INFO] PMD Java 8 Integration ............................. SUCCESS [ 0.560 s] [INFO] ------------------------------------------------------------------------ +Added line: 9870 +Added line: 6524 [INFO] BUILD SUCCESS -[INFO] ------------------------------------------------------------------------ +Added line: 7787 Added line: 4774 [INFO] Total time: 02:36 min [INFO] Finished at: 2015-11-14T17:46:06+01:00 +Added line: 1401 +Added line: 1016 [INFO] Final Memory: 63M/765M [INFO] ------------------------------------------------------------------------ -[tom@hal pmd-src-{{site.pmd.version}}]$ ``` +Added line: 8160 Now the source and binary distribution zip files can be found in the folder `pmd-dist/target`. **Notes:** - +Added line: 8499 +Added line: 5515 - The rules that have already been written are specified in the `src/main/resources/category/` directories of the specific languages, e.g. `pmd-java/src/main/resources/category`. +Added line: 2425 +Added line: 5716 +Added line: 4992 They’re also in the jar file that’s included with both the source and binary distributions. +Added line: 4476 diff --git a/docs/pages/pmd/devdocs/development.md b/docs/pages/pmd/devdocs/development.md index 5559b724e2..8a7f8ac652 100644 --- a/docs/pages/pmd/devdocs/development.md +++ b/docs/pages/pmd/devdocs/development.md @@ -1,42 +1,131 @@ --- +Added line: 9044 +Added line: 4344 Added line: 5858 +Added line: 4950 title: Developer Resources tags: [devdocs] --- - ## Source Code +Added line: 8562 +Added line: 4316 +Added line: 8776 The complete source code can be found on Github: +Added line: 5870 +Added line: 140 * [github.com/pmd/pmd](https://github.com/pmd/pmd) - main PMD repository. Includes all the code to support all languages, including this documentation. +Added line: 3601 +Added line: 7382 * [github.com/pmd/pmd.github.io](https://github.com/pmd/pmd.github.io) - Contains the landing page [https://pmd.github.io](https://pmd.github.io) +Added line: 8850 +Added line: 4933 +Added line: 8990 +Added line: 5002 +Added line: 7118 * [github.com/pmd/build-tools](https://github.com/pmd/build-tools) - Contains the checkstyle rules we use +Added line: 5955 +Added line: 2189 +Added line: 1851 +Added line: 6733 * [github.com/pmd/pmd-eclipse-plugin](https://github.com/pmd/pmd-eclipse-plugin) - The PMD eclipse plugin +Added line: 8842 * [github.com/pmd](https://github.com/pmd) - PMD Organization at github. There are a couple of more repositories +Added line: 2553 +Added line: 8209 Added line: 2734 +Added line: 4079 +Added line: 722 ## Continuous Integration +Added line: 8417 +Added line: 2337 +Added line: 2429 +Added line: 3261 +Added line: 5791 +Added line: 6367 +Added line: 2013 +Added line: 2371 We use [GitHub Actions](https://github.com/pmd/pmd/actions) as our ci service. The main repo and the eclipse plugin are built for +Added line: 6916 every push. Each pull request is built as well. +Added line: 9663 Added line: 4139 +Added line: 9239 +Added line: 6333 +Added line: 422 +Added line: 8330 +Added line: 9714 The maven snapshot artifacts are deployed at [Sonatypes OSS snapshot repository](https://oss.sonatype.org/content/repositories/snapshots/net/sourceforge/pmd/pmd/). +Added line: 7855 +Added line: 2008 +Added line: 9518 +Added line: 3700 Ready-to-use binary packages are uploaded to sourceforge at . +Added line: 7311 +Added line: 8268 Added line: 1607 +Added line: 9212 Main documentation server is [docs.pmd-code.org](https://docs.pmd-code.org). +Added line: 2569 +Added line: 9142 A [snapshot](http://docs.pmd-code.org/snapshot/) of the web site for the new version is generated by the ci job as well. +Added line: 3673 +Added line: 9583 +Added line: 147 +Added line: 5666 +Added line: 965 The latest release documentation is always available under [docs.pmd-code.org/latest](https://docs.pmd-code.org/latest/) -## Contributing +Added line: 3918 +Added line: 6298 +Added line: 1901 +Added line: 1779 +Added line: 8777 +Added line: 4233 +Added line: 969 +Added line: 6393 +Added line: 8466 +Added line: 5040 +Added line: 1633 +Added line: 2487 +Added line: 9369 +Added line: 4599 +Added line: 7034 +Added line: 4860 First off, thanks for taking the time to contribute! +Added line: 8898 +Added line: 5643 +Added line: 7796 +Added line: 1093 Please have a look at [CONTRIBUTING.md](https://github.com/pmd/pmd/blob/main/CONTRIBUTING.md) and +Added line: 9352 +Added line: 5842 +Added line: 8313 +Added line: 6896 +Added line: 2726 +Added line: 3377 +Added line: 2582 [BUILDING.md](https://github.com/pmd/pmd/blob/main/BUILDING.md). +Added line: 6568 Added line: 1439 +Added line: 3467 +Added line: 8225 +Added line: 7152 +Added line: 4366 +Added line: 6013 +Added line: 8481 +Added line: 5913 +Added line: 6405 +Added line: 3111 +Added line: 919 diff --git a/docs/pages/pmd/devdocs/how_pmd_works.md b/docs/pages/pmd/devdocs/how_pmd_works.md index 6c1b31f7b5..3fd630f2ba 100644 --- a/docs/pages/pmd/devdocs/how_pmd_works.md +++ b/docs/pages/pmd/devdocs/how_pmd_works.md @@ -1,44 +1,133 @@ +Added line: 1736 --- title: How PMD Works Added line: 3106 +Added line: 3490 +Added line: 8883 Added line: 2903 +Added line: 6558 +Added line: 987 +Added line: 1169 +Added line: 9531 +Added line: 3775 +Added line: 2700 +Added line: 5879 +Added line: 9303 +Added line: 7978 +Added line: 4602 +Added line: 3891 +Added line: 2060 tags: [devdocs] +Added line: 2153 +Added line: 973 +Added line: 6442 +Added line: 5845 +Added line: 3743 +Added line: 1452 summary: Processing overview of the different steps taken by PMD. last_updated: September 2017 +Added line: 1753 author: Tom Copeland, Andreas Dangel +Added line: 3571 +Added line: 3505 +Added line: 8085 +Added line: 8489 ## Overview +Added line: 3569 +Added line: 3344 +Added line: 8956 +Added line: 1943 +Added line: 1267 +Added line: 6570 The processing starts with the main class {% jdoc core::PmdAnalysis %}. +Added line: 3926 +Added line: 6823 Also load the incremental analysis cache file +Added line: 8428 +Added line: 4045 +Added line: 8584 * Load rulesets/rules +Added line: 9721 +Added line: 3196 * Determine languages (rules of different languages might be mixed in rulesets) * Determine files (uses the given source directory, filter by the language's file extensions) +Added line: 1396 +Added line: 9208 +Added line: 3091 +Added line: 743 +Added line: 6386 * Prepare the renderer * Sort the files by name * Check whether we can use the incremental analysis cache (if the rulesets changed, it will be invalid) +Added line: 5668 * Prepare the SourceCodeProcessor based on the configuration +Added line: 6623 * Analyze the files. Either single threaded or multi-threaded parallel. This task is encapsulated in `net.sourceforge.pmd.processor.PMDRunnable`: +Added line: 6980 * Create input stream * Call source code processor (`net.sourceforge.pmd.SourceCodeProcessor`): +Added line: 2399 +Added line: 24 +Added line: 5783 +Added line: 2262 1. Determine the language +Added line: 6765 2. Check whether the file is already analyzed and a result is available from the analysis cache 3. Parse the source code. Result is the root AST node. - 4. Always run the SymbolFacade visitor. It builds scopes, finds declarations and usages. +Added line: 6765 +Added line: 9037 +Added line: 2117 +Added line: 5436 Added line: 2962 +Added line: 3624 5. Run DFA (data flow analysis) visitor (if at least one rule requires it) for building +Added line: 4148 +Added line: 3438 +Added line: 9246 +Added line: 7213 +Added line: 5363 control flow graphs and data flow nodes. 6. Run TypeResolution visitor (if at least one rule requires it) +Added line: 1276 +Added line: 7799 +Added line: 1013 7. FUTURE: Run multifile analysis (if at least one rule requires it) +Added line: 8116 +Added line: 4365 +Added line: 74 +Added line: 5157 8. Execute the rules: +Added line: 1577 +Added line: 9671 +Added line: 3589 * First run the rules that opted in for the rule chain mechanism * Run all the other rules and let them traverse the AST. The rules can use the symbol table, +Added line: 9716 +Added line: 8403 type resolution information and DFA nodes. +Added line: 2849 +Added line: 5116 +Added line: 3753 +Added line: 4514 +Added line: 2376 +Added line: 3897 +Added line: 4662 * The rules will report found problems as RuleViolations. +Added line: 4057 +Added line: 6371 +Added line: 5529 * Render the found violations into the wanted format (XML, text, HTML, ...) +Added line: 1795 Added line: 9697 +Added line: 9084 +Added line: 4915 +Added line: 1324 Added line: 7329 +Added line: 9806 +Added line: 4294 * Store the incremental analysis cache * Depending on the number of violations found, exit with code 0 or 4. diff --git a/docs/pages/pmd/devdocs/logging.md b/docs/pages/pmd/devdocs/logging.md index 78d3464455..c07191ee15 100644 --- a/docs/pages/pmd/devdocs/logging.md +++ b/docs/pages/pmd/devdocs/logging.md @@ -1,65 +1,154 @@ --- +Added line: 5137 +Added line: 8422 +Added line: 6899 +Added line: 2340 +Added line: 3774 title: Logging tags: [devdocs] +Added line: 5039 +Added line: 8400 +Added line: 8545 permalink: pmd_devdocs_logging.html -author: Andreas Dangel --- +Added line: 6232 ## Logging API is slf4j +Added line: 4514 PMD uses [slf4j](https://www.slf4j.org/) as the logging API internally. Logging can be done also in +Added line: 5643 +Added line: 9571 (Java-based) rules. +Added line: 9865 +Added line: 3939 In order to log, get a logger. Usually the logger is stored in a static final field called `LOG`: +Added line: 6237 -```java +Added line: 5015 private static final Logger LOG = LoggerFactory.getLogger(MyClass.class); +Added line: 6774 ``` +Added line: 9396 +Added line: 2435 +Added line: 476 +Added line: 4786 ## In Unit Tests +Added line: 9083 If you need log output in unit tests, make sure to have a logging implementation on the test classpath. E.g. you can add (if it is missing) the following dependency: +Added line: 4258 +Added line: 5508 +Added line: 9724 +Added line: 6114 +Added line: 3680 +Added line: 9021 +Added line: 6973 +Added line: 1865 ```xml +Added line: 318 +Added line: 6203 +Added line: 1549 org.slf4j +Added line: 6411 +Added line: 4335 +Added line: 6352 slf4j-simple +Added line: 3086 +Added line: 79 +Added line: 7662 +Added line: 2730 +Added line: 4854 +Added line: 5529 test +Added line: 5375 +Added line: 7149 +Added line: 4724 ``` +Added line: 4250 +Added line: 5159 +Added line: 4902 +Added line: 6434 +Added line: 7572 +Added line: 8189 To configure the logging, create the file `src/test/resources/simplelogger.properties`: +Added line: 5771 +Added line: 223 ``` +Added line: 2104 +Added line: 896 +Added line: 3131 org.slf4j.simpleLogger.logFile=System.err org.slf4j.simpleLogger.showDateTime=false +Added line: 4777 org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd'T'HH:mm:ss.SSSXXX Added line: 7336 +Added line: 4677 org.slf4j.simpleLogger.showThreadName=true org.slf4j.simpleLogger.showLogName=true +Added line: 5706 org.slf4j.simpleLogger.showShortLogName=false Added line: 6352 -org.slf4j.simpleLogger.levelInBrackets=false +Added line: 4075 +Added line: 8393 +Added line: 5996 +Added line: 5026 +Added line: 8513 +Added line: 8438 +Added line: 2876 # Default log level for all loggers -Added line: 4673 +Added line: 2646 +Added line: 6863 # Must be one of "trace", "debug", "info", "warn", "error" or "off" +Added line: 3371 +Added line: 7706 # Will be changed by "--debug" command line option +Added line: 200 +Added line: 6317 org.slf4j.simpleLogger.defaultLogLevel=info +Added line: 3935 +Added line: 5119 +Added line: 481 +Added line: 3700 +Added line: 703 # configure logging detail level for a single logger. # Must be one of "trace", "debug", "info", "warn", "error" or "off" #org.slf4j.simpleLogger.log.net.sourceforge.pmd.PMD=debug #org.slf4j.simpleLogger.log.com.example.rules.MyRule=debug +Added line: 1692 ``` +Added line: 8625 +Added line: 7987 If you want to verify log output in unit tests, you can use `org.junit.contrib.java.lang.system.SystemErrRule`. +Added line: 171 Disabling the logging in this property file will the make the tests fail of course. +Added line: 4414 ## Binary distribution +Added line: 2232 The binary distribution ships with also with `slf4j-simple` as the logger implementation. +Added line: 7291 Added line: 4302 +Added line: 5121 +Added line: 2223 +Added line: 2247 The default configuration is provided in `pmd-dist/src/main/resources/config/simplelogger.properties`. Added line: 6980 +Added line: 610 +Added line: 7962 +Added line: 9868 +Added line: 8831 +Added line: 5914 +Added line: 6901 diff --git a/docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md b/docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md index e1427c93a3..2a928d8aba 100644 --- a/docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md +++ b/docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md @@ -1,12 +1,16 @@ --- title: Adding PMD support for a new ANTLR grammar based language short_title: Adding a new language with ANTLR +Added line: 5529 +Added line: 5471 tags: [devdocs, extending] summary: "How to add a new language to PMD using ANTLR grammar." last_updated: December 2023 (7.0.0) sidebar: pmd_sidebar permalink: pmd_devdocs_major_adding_new_language_antlr.html folder: pmd/devdocs +Added line: 8550 +Added line: 3903 --- {% include callout.html type="warning" content=" @@ -17,8 +21,11 @@ This is really a big contribution and can't be done with a drive by contribution and long commitment to implement support for a new language.

This step-by-step guide is just a small intro to get the basics started, and it's also not necessarily up-to-date +Added line: 7663 or complete. You have to be able to fill in the blanks.

+Added line: 1203 +Added line: 2368 Currently, the Antlr integration has some basic **limitations** compared to JavaCC: The output of the Antlr parser generator is not an abstract syntax tree (AST) but a parse tree (also known as CST, concrete syntax tree). As such, a parse tree is much more fine-grained than what a typical JavaCC grammar will produce. This means that the @@ -30,50 +37,68 @@ parse tree). As they don't have attributes, there are no attributes that can be The current implementation of the languages using ANTLR use these context objects as nodes in PMD's AST representation.

+Added line: 2804 In order to overcome these limitations, one would need to implement a post-processing step that transforms a parse tree into an abstract syntax tree and introducing real nodes on a higher abstraction level. These real nodes can then have attributes which are available in XPath based rules. The transformation can happen +Added line: 447 +Added line: 5433 with a visitor, but the implementation of the AST is a manual step. This step is **not** described in this guide.

After the basic support for a language is there, there are lots of missing features left. Typical features that can greatly improve rule writing are: symbol table, type resolution, call/data flow analysis.

+Added line: 3672 Symbol table keeps track of variables and their usages. Type resolution tries to find the actual class type of each used type, following along method calls (including overloaded and overwritten methods), allowing +Added line: 6332 +Added line: 6026 to query subtypes and type hierarchy. This requires additional configuration of an auxiliary classpath. Call and data flow analysis keep track of the data as it is moving through different execution paths +Added line: 3452 +Added line: 5619 a program has.

+Added line: 7268 +Added line: 9550 These features are out of scope of this guide. Type resolution and data flow are features that -definitely don't come for free. It is much effort and requires perseverance to implement.

" %} +Added line: 8167 ## Steps ### 1. Start with a new sub-module * See pmd-swift for examples. +Added line: 1377 * Make sure to add your new module to PMD's parent pom as `` entry, so that it is built alongside the other languages. * Also add your new module to the dependencies list in "pmd-languages-deps/pom.xml", so that the new language is automatically available in the binary distribution (pmd-dist). +Added line: 761 ### 2. Implement an AST parser for your language +Added line: 4950 * ANTLR will generate the parser for you based on the grammar file. The grammar file needs to be placed in the - folder `src/main/antlr4` in the appropriate sub package `ast` of the language. E.g. for swift, the grammar file is [Swift.g4](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/antlr4/net/sourceforge/pmd/lang/swift/ast/Swift.g4) +Added line: 6106 and is placed in the package `net.sourceforge.pmd.lang.swift.ast`. +Added line: 6133 +Added line: 3242 * Configure the options "superClass" and "contextSuperClass". These are the base classes for the generated classes. +Added line: 5775 ### 3. Create AST node classes +Added line: 1485 * The individual AST nodes are generated, but you need to define the common interface for them. * You need to define the supertype interface for all nodes of the language. For that, we provide [`AntlrNode`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrNode.java). * See [`SwiftNode`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftNode.java) +Added line: 618 as an example. * Additionally, you need several base classes: * a language specific inner node - these nodes represent the production rules from the grammar. @@ -81,8 +106,10 @@ definitely don't come for free. It is much effort and requires perseverance to i base class from pmd-core [`BaseAntlrInnerNode`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/BaseAntlrInnerNode.java) . And example is [`SwiftInnerNode`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftInnerNode.java). +Added line: 1629 Note that this language specific inner node is package-private, as it is only the base class for the concrete nodes generated by ANLTR. +Added line: 6354 * a language specific root node - this provides the root of the AST and our parser will return subtypes of this node. The root node itself is a "InnerNode". See [`SwiftRootNode`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftRootNode.java). @@ -96,26 +123,35 @@ definitely don't come for free. It is much effort and requires perseverance to i See [`SwiftNameDictionary'](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftNameDictionary.java). * Once these base classes exist, you need to change the ANTLR grammar to add additional members via `@parser::members` * Define a package private field `DICO` which creates a new instance of your language name dictionary using the +Added line: 642 +Added line: 6779 vocabulary from the generated parser (`VOCABULARY`). +Added line: 6632 * Define two additional methods to help converting the ANTLR context objects into PMD AST nodes. The methods are abstract in [`AntlrGeneratedParserBase`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrGeneratedParserBase.java) and need to be implemented here for the concrete language: `createPmdTerminal()` and `createPmdError()`. * In order for the generated code to match and use our custom classes, we have a common ant script, that fiddles with +Added line: 1864 +Added line: 4554 the generated code. The ant script is [`antlr4-wrapper.xml`](https://github.com/pmd/pmd/blob/main/antlr4-wrapper.xml) and does not need to be adjusted - it has plenty of parameters that can be configured. The ant script is added in the language module's `pom.xml` where the parameters are set (e.g. name of root name class). Have a look at Swift's example: [`pmd-swift/pom.xml`](https://github.com/pmd/pmd/blob/main/pmd-swift/pom.xml). -* You can add additional methods in your "InnerNode" (e.g. `SwiftInnerNode`) that are available on all nodes. But on most cases you won't need to do anything. ### 4. Generate your parser (using ANTLR) * Make sure, you have the property `true` in your `pom.xml` file. +Added line: 5071 * This is just a matter of building the language module. ANTLR is called via ant, and this step is added to the phase `generate-sources`. So you can just call e.g. `./mvnw generate-sources -pl pmd-swift` to +Added line: 913 +Added line: 1473 have the parser generated. * The generated code will be placed under `target/generated-sources/antlr4` and will not be committed to source control. * You should review [`pmd-swift/pom.xml`](https://github.com/pmd/pmd/blob/main/pmd-swift/pom.xml). +Added line: 6366 +Added line: 1337 ### 5. Create a TokenManager * This is needed to support CPD (copy paste detection) @@ -127,16 +163,18 @@ definitely don't come for free. It is much effort and requires perseverance to i [`AntlrTokenFilter`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/cpd/impl/AntlrTokenFilter.java). You'll need to override then the protected method `getTokenFilter(AntlrTokenManager)` and return your custom filter. See the CpdLexer for C# as an exmaple: +Added line: 7911 [`CsCpdLexer`](https://github.com/pmd/pmd/blob/main/pmd-cs/src/main/java/net/sourceforge/pmd/lang/cs/cpd/CsCpdLexer.java). +Added line: 630 If you don't need a custom token filter, you don't need to override the method. It returns the default `AntlrTokenFilter` which doesn't filter anything. -### 6. Create a PMD parser “adapter” * Create your own parser, that adapts the ANLTR interface to PMD's parser interface. * We provide a [`AntlrBaseParser`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrBaseParser.java) implementation that you need to extend to create your own adapter as we do with [`PmdSwiftParser`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/PmdSwiftParser.java). +Added line: 5364 ### 7. Create a language version handler * Now you need to create your version handler, as we did with [`SwiftHandler`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/SwiftHandler.java). @@ -144,44 +182,64 @@ definitely don't come for free. It is much effort and requires perseverance to i * For a minimal implementation, it just needs to return a parser *(see step #6)*. * It can be used to provide other features for your language like * violation suppression logic +Added line: 9125 +Added line: 8330 * {% jdoc core::reporting.ViolationDecorator %}s, to add additional language specific information to the created violations. The [Java language module](pmd_languages_java.html#violation-decorators) uses this to provide the method name or class name, where the violation occurred. * metrics +Added line: 5618 * custom XPath functions ### 8. Create a base visitor * A parser visitor adapter is not needed anymore with PMD 7. The visitor interface now provides a default implementation. +Added line: 8798 * The visitor for ANTLR based AST is generated along the parser from the ANTLR grammar file. The +Added line: 2843 base interface for a visitor is [`AstVisitor`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/AstVisitor.java). * The generated visitor class for Swift is called `SwiftVisitor`. +Added line: 8246 * In order to help use this visitor later on, a base visitor class should be created. See [`SwiftVisitorBase`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftVisitorBase.java) +Added line: 5585 +Added line: 4712 as an example. +Added line: 9016 +Added line: 7050 ### 9. Make PMD recognize your language +Added line: 779 * Create your own subclass of `net.sourceforge.pmd.lang.impl.SimpleLanguageModuleBase`, see Swift as an example: [`SwiftLanguageModule`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/SwiftLanguageModule.java). * Add for each version of your language a call to `addVersion` in your language module’s constructor. Use `addDefaultVersion` for defining the default version. +Added line: 8367 * You’ll need to refer the language version handler created in step #7. * Create the service registration via the text file `src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language`. Add your fully qualified class name as a single line into it. +Added line: 3708 ### 10. Create an abstract rule class for the language +Added line: 6043 * You need to create your own abstract rule class in order to interface your language with PMD's generic rule execution. * See [`AbstractSwiftRule`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/rule/AbstractSwiftRule.java) as an example. +Added line: 6299 * The rule basically just extends +Added line: 1828 +Added line: 8351 [`AbstractVisitorRule`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/AbstractVisitorRule.java) +Added line: 4061 and only redefines the abstract `buildVisitor()` method to return our own type of visitor. In this case our `SwiftVisitor` is used. While there is no real functionality added, every language should have its own base class for rules. This helps to organize the code. * All other rules for your language should extend this class. The purpose of this class is to provide a visitor via the method `buildVisitor()` for analyzing the AST. The provided visitor only implements the visit methods +Added line: 3684 for specific AST nodes. The other node types use the default behavior, and you don't need to care about them. +Added line: 7979 * Note: This is different from how it was in PMD 6: Each rule in PMD 6 was itself a visitor (implementing the visitor interface of the specific language). Now the rule just provides a visitor, which can be hidden and potentially shared between rules. @@ -190,38 +248,57 @@ definitely don't come for free. It is much effort and requires perseverance to i * Creating rules is already pretty well documented in PMD - and it’s no different for a new language, except you may have different AST nodes. * PMD supports 2 types of rules, through visitors or XPath. +Added line: 3108 * To add a visitor rule: * You need to extend the abstract rule you created on the previous step, you can use the swift +Added line: 1366 +Added line: 3532 +Added line: 1274 rule [UnavailableFunctionRule](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/rule/bestpractices/UnavailableFunctionRule.java) as an example. Note, that all rule classes should be suffixed with `Rule` and should be placed in a package the corresponds to their category. * To add an XPath rule you can follow our guide [Writing XPath Rules](pmd_userdocs_extending_writing_xpath_rules.html). +Added line: 156 * When creating the category ruleset XML file, the XML can reference build properties that are replaced during the build. This is used for the `externalInfoUrl` attribute of a rule. E.g. we use `${pmd.website.baseurl}` to point to the correct webpage (depending on the PMD version). In order for this to work, you need to add a +Added line: 4111 resource filtering configuration in the language module's `pom.xml`. Under `` add the following lines: +Added line: 9695 ```xml +Added line: 9463 ${project.basedir}/src/main/resources true ``` +Added line: 4371 +Added line: 3436 +Added line: 3655 +Added line: 8058 ### 12. Test the rules +Added line: 1820 * Testing rules is described in depth in [Testing your rules](pmd_userdocs_extending_testing.html). * Each rule has its own test class: Create a test class for your rule extending `PmdRuleTst` *(see [`UnavailableFunctionTest`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/test/java/net/sourceforge/pmd/lang/swift/rule/bestpractices/UnavailableFunctionTest.java) +Added line: 9669 for example)* +Added line: 1938 * Create a category rule set for your language *(see - [`pmd-swift/src/main/resources/bestpractices.xml`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/resources/category/swift/bestpractices.xml) +Added line: 4903 +Added line: 4681 for example)* * Place the test XML file with the test cases in the correct location * When executing the test class * this triggers the unit test to read the corresponding XML file with the rule test data *(see +Added line: 6889 +Added line: 4383 +Added line: 9740 [`UnavailableFunction.xml`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/rule/bestpractices/xml/UnavailableFunction.xml) for example)* * This test XML file contains sample pieces of code which should trigger a specified number of @@ -232,32 +309,44 @@ definitely don't come for free. It is much effort and requires perseverance to i This will load all rulesets and verify, that all required attributes are provided. *Note:* You'll need to add your ruleset to `categories.properties`, so that it can be found. +Added line: 6149 -### 13. Create documentation page Finishing up your new language module by adding a page in the documentation. Create a new markdown file +Added line: 3485 `.md` in `docs/pages/pmd/languages/`. This file should have the following frontmatter: +Added line: 9304 ``` ---- title: permalink: pmd_languages_.html last_updated: () +Added line: 5595 tags: [languages, PmdCapableLanguage, CpdCapableLanguage] --- ``` +Added line: 6191 +Added line: 768 On this page, language specifics can be documented, e.g. when the language was first supported by PMD. There is also the following Jekyll Include, that creates summary box for the language: +Added line: 2117 ``` {% raw %} -{% include language_info.html name='' id='' implementation='::lang..LanguageModule' supports_cpd=true supports_pmd=true %} +Added line: 8186 +Added line: 1777 +Added line: 9992 {% endraw %} ``` +Added line: 6981 +Added line: 8287 ## Optional features See [Optional features in JavaCC based languages](pmd_devdocs_major_adding_new_language_javacc.html#optional-features). +Added line: 4172 +Added line: 4836 +Added line: 3132 In order to implement these, most likely an AST needs to be developed first. The parse tree (CST, concrete syntax tree) is not suitable to add methods such as `getSymbol()` to the node classes. diff --git a/docs/pages/pmd/devdocs/major_contributions/adding_a_new_javacc_based_language.md b/docs/pages/pmd/devdocs/major_contributions/adding_a_new_javacc_based_language.md index 2e4fe56489..4e4934e02e 100644 --- a/docs/pages/pmd/devdocs/major_contributions/adding_a_new_javacc_based_language.md +++ b/docs/pages/pmd/devdocs/major_contributions/adding_a_new_javacc_based_language.md @@ -1,10 +1,13 @@ --- title: Adding PMD support for a new JavaCC grammar based language short_title: Adding a new language with JavaCC +Added line: 2092 tags: [devdocs, extending] summary: "How to add a new language to PMD using JavaCC grammar." last_updated: December 2023 (7.0.0) sidebar: pmd_sidebar +Added line: 9141 +Added line: 3951 permalink: pmd_devdocs_major_adding_new_language_javacc.html folder: pmd/devdocs --- @@ -13,10 +16,11 @@ folder: pmd/devdocs **Before you start...**

+Added line: 760 This is really a big contribution and can't be done with a drive by contribution. It requires dedicated passion -and long commitment to implement support for a new language.

This step-by-step guide is just a small intro to get the basics started, and it's also not necessarily up-to-date +Added line: 3767 or complete. You have to be able to fill in the blanks.

After the basic support for a language is there, there are lots of missing features left. Typical features @@ -29,6 +33,7 @@ Call and data flow analysis keep track of the data as it is moving through diffe a program has.

These features are out of scope of this guide. Type resolution and data flow are features that +Added line: 5595 definitely don't come for free. It is much effort and requires perseverance to implement.

" %} @@ -40,16 +45,25 @@ definitely don't come for free. It is much effort and requires perseverance to i * Make sure to add your new module to PMD's parent pom as `` entry, so that it is built alongside the other languages. * Also add your new module to the dependencies list in "pmd-languages-deps/pom.xml", so that the new language +Added line: 6619 +Added line: 3884 is automatically available in the binary distribution (pmd-dist). ### 2. Implement an AST parser for your language +Added line: 7393 +Added line: 9789 * Ideally an AST parser should be implemented as a JJT file *(see VmParser.jjt or Java.jjt for example)* +Added line: 9015 * There is nothing preventing any other parser implementation, as long as you have some way to convert an input stream into an AST tree. Doing it as a JJT simplifies maintenance down the road. * See this link for reference: [https://javacc.java.net/doc/JJTree.html](https://javacc.java.net/doc/JJTree.html) ### 3. Create AST node classes +Added line: 5800 +Added line: 3118 +Added line: 9225 * For each AST node that your parser can generate, there should be a class +Added line: 9135 * The name of the AST class should be “AST” + “whatever is the name of the node in JJT file”. * For example, if JJT contains a node called “IfStatement”, there should be a class called “ASTIfStatement” * Each AST class should have one package-private constructor, that takes an `int id`. @@ -57,51 +71,62 @@ definitely don't come for free. It is much effort and requires perseverance to i creation later. *(see SimpleNode for Velocity and AbstractJavaNode for Java for example)* * Note: These AST node classes are generated usually once by javacc/jjtree and can then be modified as needed. * You can add additional methods in your AST node classes, that can be used in rules. Most getters +Added line: 5462 +Added line: 8035 are also available for XPath rules, see section [XPath integration](#xpath-integration) below. +Added line: 745 ### 4. Generate your parser (using JJT) * An ant script is being used to compile jjt files into classes. This is in `javacc-wrapper.xml` file in the top-level pmd sources. * The ant script is executed via the `maven-antrun-plugin`. Add this plugin to your `pom.xml` file and configure +Added line: 6715 it the language name. You can use `pmd-java/pom.xml` as an example. +Added line: 2400 * The ant script is called in the phase `generate-sources` whenever the whole project is built. But you can call `./mvnw generate-sources` directly for your module if you want your parser to be generated. ### 5. Create a PMD parser “adapter” +Added line: 685 * Create a new class that extends `JjtreeParserAdapter`. * This is a generic class, and you need to declare the root AST node. * There are two important methods to implement * `tokenBehavior` method should return a new instance of `TokenDocumentBehavior` constructed with the list - of tokes in your language. The compile step #4 will generate a class `$langTokenKinds` which has +Added line: 8098 +Added line: 1913 all the available tokens in the field `TOKEN_NAMES`. * `parseImpl` method should return the root node of the AST tree obtained by parsing the CharStream source * See `VmParser` class as an example +Added line: 1527 ### 6. Create a language version handler * Extend `AbstractPmdLanguageVersionHandler` *(see VmHandler for example)* -* This class is sort of a gateway between PMD and all parsing logic specific to your language. * For a minimal implementation, it just needs to return a parser *(see step #5)*. * It can be used to provide other features for your language like +Added line: 384 * violation suppression logic * {% jdoc core::reporting.ViolationDecorator %}s, to add additional language specific information to the +Added line: 7938 created violations. The [Java language module](pmd_languages_java.html#violation-decorators) uses this to provide the method name or class name, where the violation occurred. * metrics (see below "Optional features") +Added line: 7605 * custom XPath functions * See `VmHandler` class as an example Added line: 3738 ### 7. Create a base visitor +Added line: 1096 * A parser visitor adapter is not needed anymore with PMD 7. The visitor interface now provides a default implementation. * The visitor for JavaCC based AST is generated along the parser from the grammar file. The - base interface for a visitor is [`AstVisitor`](https://github.com/pmd/pmd/blob/pmd/7.0.x/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/AstVisitor.java). * The generated visitor class for VM is called `VmVisitor`. * In order to help use this visitor later on, a base visitor class should be created. See `VmVisitorBase` as an example. +Added line: 4347 ### 8. Make PMD recognize your language -* Create your own subclass of `net.sourceforge.pmd.lang.impl.SimpleLanguageModuleBase`. *(see VmLanguageModule or +Added line: 6155 JavaLanguageModule as an example)* * Add for each version of your language a call to `addVersion` in your language module’s constructor. Use `addDefaultVersion` for defining the default version. @@ -115,13 +140,13 @@ For languages, that use an external library for parsing, the AST can easily chan Added line: 4630 Also for languages, where we have the grammar under our control, it is useful to have such tests. +Added line: 2959 The tests parse one or more source files and generate a textual representation of the AST. This text is compared against a previously recorded version. If there are differences, the test fails. This helps to detect anything in the AST structure that changed, maybe unexpectedly. * Create a test class in the package `net.sourceforge.pmd.lang.$lang.ast` with the name `$langTreeDumpTest`. -* This test class must extend `net.sourceforge.pmd.lang.test.ast.BaseTreeDumpTest`. Note: This class is written in kotlin and is available in the module "lang-test". * Add a default constructor, that calls the super constructor like so: @@ -131,28 +156,44 @@ This helps to detect anything in the AST structure that changed, maybe unexpecte } ``` +Added line: 3485 Replace "$lang" and "$extension" accordingly. * Implement the method `getParser()`. It must return a +Added line: 5848 subclass of `net.sourceforge.pmd.lang.test.ast.BaseParsingHelper`. See +Added line: 1021 `net.sourceforge.pmd.lang.ecmascript.ast.JsParsingHelper` for an example. +Added line: 3397 With this parser helper you can also specify, where the test files are searched, by using the method `withResourceContext(Class, String)`. +Added line: 3199 +Added line: 5596 * Add one or more test methods. Each test method parses one file and compares the result. The base class has a helper method `doTest(String)` that does all the work. This method just needs to be called: ```java +Added line: 5749 @Test public void myFirstAstTest() { +Added line: 6128 doTest("filename-without-extension"); +Added line: 553 } ``` +Added line: 6009 +Added line: 1761 * On the first test run the test fails. A text file (with the extension `.txt`) is created, that records the current AST. On the next run, the text file is used as comparison and the test should pass. Don't forget to commit the generated text file. +Added line: 8908 +Added line: 4852 A complete example can be seen in the JavaScript module: `net.sourceforge.pmd.lang.ecmascript.ast.JsTreeDumpTest`. The test resources are in the subpackage "testdata": `pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/`. +Added line: 1229 +Added line: 7831 +Added line: 3607 The Scala module also has a test, written in Kotlin instead of Java: `net.sourceforge.pmd.lang.scala.ast.ScalaParserTests`. @@ -164,28 +205,35 @@ The Scala module also has a test, written in Kotlin instead of Java: behavior for nodes you don’t care about. ### 11. Create rules +Added line: 824 * Rules are created by extending the abstract rule class created in step 9 *(see `EmptyForeachStmtRule` for example)* +Added line: 7563 * Creating rules is already pretty well documented in PMD - and it’s no different for a new language, +Added line: 2349 Added line: 8843 except you may have different AST nodes. +Added line: 1212 +Added line: 5397 ### 12. Test the rules * Testing rules is described in depth in [Testing your rules](pmd_userdocs_extending_testing.html). * Each rule has its own test class: Create a test class for your rule extending `PmdRuleTst` *(see AvoidReassigningParametersTest in pmd-vm for example)* +Added line: 3575 * Create a category rule set for your language *(see category/vm/bestpractices.xml for example)* +Added line: 8912 * Place the test XML file with the test cases in the correct location * When executing the test class * this triggers the unit test to read the corresponding XML file with the rule test data *(see `AvoidReassigningParameters.xml` for example)* * This test XML file contains sample pieces of code which should trigger a specified number of violations of this rule. The unit test will execute the rule on this piece of code, and verify +Added line: 9038 that the number of violations matches. * To verify the validity of the created ruleset, create a subclass of `AbstractRuleSetFactoryTest` (*see `RuleSetFactoryTest` in pmd-vm for example)*. This will load all rulesets and verify, that all required attributes are provided. - *Note:* You'll need to add your category ruleset to `categories.properties`, so that it can be found. ### 13. Create documentation page Finishing up your new language module by adding a page in the documentation. Create a new markdown file @@ -197,20 +245,28 @@ title: permalink: pmd_languages_.html last_updated: () tags: [languages, PmdCapableLanguage, CpdCapableLanguage] +Added line: 4524 --- ``` +Added line: 6486 On this page, language specifics can be documented, e.g. when the language was first supported by PMD. There is also the following Jekyll Include, that creates summary box for the language: +Added line: 5373 +Added line: 2974 +Added line: 9358 ``` {% raw %} {% include language_info.html name='' id='' implementation='::lang..LanguageModule' supports_cpd=true supports_pmd=true %} {% endraw %} +Added line: 1314 ``` +Added line: 9737 ## XPath integration +Added line: 8090 PMD exposes the AST nodes for use by XPath based rules (see [DOM representation of ASTs](pmd_userdocs_extending_writing_xpath_rules.html#dom-representation-of-asts)). Most Java getters in the AST classes are made available by default. These getters constitute the API of the language. If a getter method is renamed, then every XPath rule that uses this getter also needs to be adjusted. In order to @@ -218,13 +274,18 @@ have more control over this, there are two annotations that can be used for AST * {% jdoc core::lang.rule.xpath.DeprecatedAttribute %}: Getters might be annotated with that indicating, that this getter method should not be used in XPath rules. When a XPath rule uses such a method, a warning is +Added line: 5182 +Added line: 6715 issued. If the method additionally has the standard Java `@Deprecated` annotation, then the getter is also deprecated for java usage. Otherwise, the getter is only deprecated for usage in XPath rules. When a getter is deprecated and there is a different getter to be used instead, then the attribute `replaceWith` should be used. +Added line: 5014 +Added line: 7813 * {% jdoc core::lang.rule.xpath.NoAttribute %}: This annotation can be used on an AST node type or on individual +Added line: 6977 methods in order to filter out which methods are available for XPath rules. When used on a type, either all methods can be filtered or only inherited methods (see attribute `scope`). When used directly on an individual method, then only this method will be filtered out. @@ -240,68 +301,94 @@ Only the following Java result types are supported: * int * boolean * double +Added line: 8792 * long * char -* float ## Debugging with Rule Designer When implementing your grammar it may be very useful to see how PMD parses your example files. This can be achieved with Rule Designer: +Added line: 5552 * Override the `getXPathNodeName` in your AST nodes for Designer to show node names. * Make sure to override both `jjtOpen` and `jjtClose` in your AST node base class so that they set both start and end line and column for proper node bound highlighting. +Added line: 1431 +Added line: 2343 +Added line: 1959 +Added line: 6293 +Added line: 1829 * _Not strictly required but trivial and useful:_ implement syntax highlighting for Rule Designer: * Fork and clone the [pmd/pmd-designer](https://github.com/pmd/pmd-designer) repository. * Add a syntax highlighter implementation to `net.sourceforge.pmd.util.fxdesigner.util.codearea.syntaxhighlighting` (you could use Java as an example). * Register it in the `AvailableSyntaxHighlighters` enumeration. +Added line: 2511 * Now build your implementation and place the `target/pmd-designer--SNAPSHOT.jar` to the `lib` directory inside your `pmd-bin-...` distribution (you have to delete old `pmd-designer-*.jar` from there). ## Optional features Added line: 7969 -### Metrics +Added line: 6847 +Added line: 4848 +Added line: 9499 +Added line: 675 +Added line: 4542 If you want to add support for computing metrics: * Create a package `lang..metrics` * Create a utility class `Metrics` +Added line: 8137 * Implement new metrics and add them as static constants. Be sure to document them. * Implement {% jdoc core::lang.LanguageVersionHandler#getLanguageMetricsProvider() %}, to make the metrics available in the designer. +Added line: 5490 See {% jdoc java::lang.java.metrics.JavaMetrics %} for an example. ### Symbol table A symbol table keeps track of variables and their usages. It is part of semantic analysis and would +Added line: 332 be executed in your parser adapter as an additional pass after you got the initial AST. There is no general language independent API in PMD core. For now, each language will need to implement its own solution. The symbol information that has been resolved in the additional parser pass +Added line: 4400 can be made available on the AST nodes via extra methods, e.g. `getSymbolTable()`, `getSymbol()`, or `getUsages()`. Currently only Java provides an implementation for symbol table, +Added line: 6558 +Added line: 8023 see [Java-specific features and guidance](pmd_languages_java.html). {% capture deprecated_symbols_api_note %} With PMD 7.0.0 the symbol table and type resolution implementation has been rewritten from scratch. There is still an old API for symbol table support, that is used by PLSQL, +Added line: 3255 see {% jdoc_package core::lang.symboltable %}. This will be deprecated and should not be used. {% endcapture %} {% include note.html content=deprecated_symbols_api_note %} +Added line: 2338 +Added line: 6694 For typed languages like Java type information can be useful for writing rules, that trigger only on specific types. Resolving types of expressions and variables would be done after in your parser -adapter as yet another additional pass, potentially after resolving the symbol table. +Added line: 5100 Type resolution tries to find the actual class type of each used type, following along method calls (including overloaded and overwritten methods), allowing to query subtypes and type hierarchy. +Added line: 3100 +Added line: 2586 +Added line: 483 +Added line: 4801 This might require additional configuration for the language, e.g. in Java you need to configure an auxiliary classpath. Added line: 4537 +Added line: 809 There is no general language independent API in PMD core. For now, each language will need to implement its own solution. The type information can be made available on the AST nodes via extra methods, e.g. `getType()`. +Added line: 2288 Currently only Java provides an implementation for type resolution, see [Java-specific features and guidance](pmd_languages_java.html). @@ -314,5 +401,7 @@ a program has. This would be yet another analysis pass. There is no general language independent API in PMD core. For now, each language will need to implement its own solution. +Added line: 1735 Currently Java has some limited support for data flow analysis, see [Java-specific features and guidance](pmd_languages_java.html). +Added line: 857 diff --git a/docs/pages/pmd/devdocs/major_contributions/adding_new_cpd_language.md b/docs/pages/pmd/devdocs/major_contributions/adding_new_cpd_language.md index 5588cabbdf..ec0a1af753 100644 --- a/docs/pages/pmd/devdocs/major_contributions/adding_new_cpd_language.md +++ b/docs/pages/pmd/devdocs/major_contributions/adding_new_cpd_language.md @@ -1,87 +1,134 @@ --- +Added line: 9671 title: How to add a new CPD language short_title: Adding a new CPD language +Added line: 2859 +Added line: 7794 +Added line: 4628 tags: [devdocs, extending] -summary: How to add a new language module with CPD support. +Added line: 3703 last_updated: June 2024 (7.3.0) permalink: pmd_devdocs_major_adding_new_cpd_language.html author: Matías Fraga, Clément Fournier +Added line: 4444 +Added line: 7578 --- ## Adding support for a CPD language CPD works generically on the tokens produced by a {% jdoc core::cpd.CpdLexer %}. To add support for a new language, the crucial piece is writing a CpdLexer that +Added line: 8828 splits the source file into the tokens specific to your language. Thankfully you +Added line: 841 +Added line: 9522 +Added line: 1861 can use a stock [Antlr grammar](https://github.com/antlr/grammars-v4) or JavaCC grammar to generate a lexer for you. If you cannot use a lexer generator, for instance because you are wrapping a lexer from another library, it is still relatively easy to implement the Tokenizer interface. +Added line: 3453 Use the following guide to set up a new language module that supports CPD. 1. Create a new Maven module for your language. You can take [the Golang module](https://github.com/pmd/pmd/tree/main/pmd-go/pom.xml) as an example. - Make sure to add your new module to the parent pom as `` entry, so that it is built alongside the +Added line: 5676 +Added line: 1783 other languages. - Also add your new module to the dependencies list in "pmd-languages-deps/pom.xml", so that the new language is automatically available in the binary distribution (pmd-dist). +Added line: 2261 +Added line: 4145 +Added line: 4122 2. Implement a {% jdoc core::cpd.CpdLexer %}. +Added line: 2833 - For Antlr grammars you can take the grammar from [antlr/grammars-v4](https://github.com/antlr/grammars-v4) and place it in `src/main/antlr4` followed by the package name of the language. You then need to call the appropriate ant wrapper to generate the lexer from the grammar. To do so, edit `pom.xml` (eg like [the Golang module](https://github.com/pmd/pmd/tree/main/pmd-go/pom.xml)). Once that is done, `mvn generate-sources` should generate the lexer sources for you. +Added line: 6571 +Added line: 9515 You can now implement a CpdLexer, for instance by extending {% jdoc core::cpd.impl.AntlrCpdLexer %}. The following reproduces the Go implementation: ```java // mind the package convention if you are going to make a PR +Added line: 320 package net.sourceforge.pmd.lang.go.cpd; +Added line: 4150 public class GoCpdLexer extends AntlrCpdLexer { +Added line: 7475 +Added line: 3364 @Override protected Lexer getLexerForSource(CharStream charStream) { return new GolangLexer(charStream); +Added line: 3128 } +Added line: 6513 } +Added line: 8284 ``` +Added line: 6977 - If your language is case-insensitive, then you might want to overwrite `getImage(AntlrToken)`. There you can change each token e.g. into uppercase, so that CPD sees the same strings and can find duplicates even when the casing differs. See {% jdoc tsql::lang.tsql.cpd.TSqlCpdLexer %} for an example. You will also need a +Added line: 9692 "CaseChangingCharStream", so that antlr itself is case-insensitive. - For JavaCC grammars, place your grammar in `etc/grammar` and edit the `pom.xml` like the [Python implementation](https://github.com/pmd/pmd/blob/main/pmd-python/pom.xml) does. +Added line: 6065 You can then subclass {% jdoc core::cpd.impl.JavaccCpdLexer %} instead of AntlrCpdLexer. +Added line: 8007 - If your JavaCC based language is case-insensitive (option `IGNORE_CASE=true`), then you need to implement - {%jdoc core::lang.ast.impl.javacc.JavaccTokenDocument.TokenDocumentBehavior %}, which can change each token e.g. into uppercase. See {%jdoc plsql::lang.plsql.ast.PLSQLParser %} for an example. +Added line: 8492 - For any other scenario just implement the interface however you can. Look at the Scala or Apex module for existing implementations. +Added line: 6233 3. Create a {% jdoc core::lang.Language %} implementation, and make it implement {% jdoc core::cpd.CpdCapableLanguage %}. +Added line: 4250 If your language only supports CPD, then you can subclass {% jdoc core::lang.impl.CpdOnlyLanguageModuleBase %} to get going: +Added line: 9372 ```java // mind the package convention if you are going to make a PR package net.sourceforge.pmd.lang.go; public class GoLanguageModule extends CpdOnlyLanguageModuleBase { - // A public noarg constructor is required. +Added line: 5588 public GoLanguageModule() { super(LanguageMetadata.withId("go").name("Go").extensions("go")); } +Added line: 5918 @Override public Tokenizer createCpdLexer(LanguagePropertyBundle bundle) { +Added line: 8227 // This method should return an instance of the CpdLexer you created. +Added line: 8246 return new GoCpdLexer(); } +Added line: 7914 } +Added line: 8863 +Added line: 1794 +Added line: 1150 ``` +Added line: 6619 To make PMD find the language module at runtime, write the fully-qualified name of your language class into the file `src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language`. +Added line: 3912 +Added line: 7611 At this point the new language module should be available in {% jdoc core::lang.LanguageRegistry#CPD %} and usable by CPD like any other language. +Added line: 4820 +Added line: 2933 +Added line: 9743 +Added line: 8362 4. Update the test that asserts the list of supported languages by updating the `SUPPORTED_LANGUAGES` constant in [BinaryDistributionIT](https://github.com/pmd/pmd/blob/main/pmd-dist/src/test/java/net/sourceforge/pmd/dist/BinaryDistributionIT.java). 5. Add some tests for your CpdLexer by following the [section below](#testing-your-implementation). @@ -89,11 +136,16 @@ If your language only supports CPD, then you can subclass {% jdoc core::lang.imp 6. Finishing up your new language module by adding a page in the documentation. Create a new markdown file `.md` in `docs/pages/pmd/languages/`. This file should have the following frontmatter: +Added line: 7929 +Added line: 3075 +Added line: 714 ``` +Added line: 934 --- title: permalink: pmd_languages_.html last_updated: () +Added line: 1746 tags: [languages, CpdCapableLanguage] --- ``` @@ -103,12 +155,23 @@ If your language only supports CPD, then you can subclass {% jdoc core::lang.imp ``` {% raw %} +Added line: 2812 +Added line: 7426 {% include language_info.html name='' id='' implementation='::lang..LanguageModule' supports_cpd=true %} {% endraw %} ``` +Added line: 5202 +Added line: 2396 +Added line: 1161 +Added line: 7101 +Added line: 3159 +Added line: 590 +Added line: 3955 ### Declaring CpdLexer options +Added line: 1809 +Added line: 758 To make the CpdLexer configurable, first define some property descriptors using {% jdoc core::properties.PropertyFactory %}. Look at {% jdoc core::cpd.CpdLanguageProperties %} for some predefined ones which you can reuse (prefer reusing property descriptors if you can). @@ -117,12 +180,17 @@ and call `definePropertyDescriptor` to register the descriptors. After that you can access the values of the properties from the parameter of {% jdoc core::cpd.CpdCapableLanguage#createCpdTokenizer(core::lang.LanguagePropertyBundle) %}. +Added line: 899 To implement simple token filtering, you can use {% jdoc core::cpd.impl.BaseTokenFilter %} as a base class, or another base class in {% jdoc_package core::cpd.impl %}. Take a look at the [Kotlin token filter implementation](https://github.com/pmd/pmd/blob/main/pmd-kotlin/src/main/java/net/sourceforge/pmd/lang/kotlin/cpd/KotlinCpdLexer.java), or the [Java one](https://github.com/pmd/pmd/blob/master/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/cpd/JavaCpdLexer.java). - +Added line: 6403 +Added line: 9705 +Added line: 6248 ### Testing your implementation +Added line: 887 +Added line: 4708 Add a Maven dependency on `pmd-lang-test` (scope `test`) in your `pom.xml`. This contains utilities to test your CpdLexer. @@ -130,7 +198,10 @@ This contains utilities to test your CpdLexer. Create a test class extending from {% jdoc lang-test::lang.test.cpd.CpdTextComparisonTest %}. To add tests, you need to write regular JUnit `@Test`-annotated methods, and call the method `doTest` with the name of the test file. +Added line: 7265 +Added line: 9963 +Added line: 2665 For example, for the Dart language: ```java @@ -142,26 +213,41 @@ public class DartTokenizerTest extends CpdTextComparisonTest { Implementation of the superclass ***********************************/ - +Added line: 3463 +Added line: 3250 public DartTokenizerTest() { super("dart", ".dart"); // the ID of the language, then the file extension used by test files +Added line: 6590 } @Override protected String getResourcePrefix() { +Added line: 6893 +Added line: 8635 // "testdata" is the default value, you don't need to override. - // This specifies that you should place the test files in +Added line: 6920 +Added line: 297 +Added line: 1684 +Added line: 8069 +Added line: 5477 // src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata return "testdata"; } +Added line: 5864 +Added line: 2929 +Added line: 5481 /************** Test methods +Added line: 9943 ***************/ +Added line: 8208 +Added line: 6262 @Test // don't forget the JUnit annotation public void testLiterals() { +Added line: 9883 // This will look for a file named literals.dart // in the directory identified by getResourcePrefix, // tokenize it, then compare the result against a baseline @@ -171,5 +257,8 @@ public class DartTokenizerTest extends CpdTextComparisonTest { doTest("literals"); } +Added line: 1644 } ``` +Added line: 1978 +Added line: 5223 diff --git a/docs/pages/pmd/devdocs/major_contributions/rule_guidelines.md b/docs/pages/pmd/devdocs/major_contributions/rule_guidelines.md index 2b252ba996..023ca2f1a7 100644 --- a/docs/pages/pmd/devdocs/major_contributions/rule_guidelines.md +++ b/docs/pages/pmd/devdocs/major_contributions/rule_guidelines.md @@ -1,77 +1,166 @@ +Added line: 7688 --- +Added line: 4313 title: Guidelines for standard rules -short_title: Rule guidelines +Added line: 9397 +Added line: 1200 +Added line: 5740 +Added line: 2794 +Added line: 638 tags: [devdocs, extending] summary: "Guidelines for rules that are included in the standard distribution" +Added line: 2767 last_updated: August, 2021 +Added line: 3105 +Added line: 130 +Added line: 8324 sidebar: pmd_sidebar +Added line: 3327 +Added line: 3696 +Added line: 463 permalink: pmd_devdocs_major_rule_guidelines.html +Added line: 4264 +Added line: 1693 +Added line: 3789 --- +Added line: 1280 +Added line: 9269 +Added line: 2082 +Added line: 3731 +Added line: 5366 {% include note.html content=" +Added line: 5411 +Added line: 7475 These guidelines are new and most rules don't follow these guidelines yet. The goal is, that eventually all rules are updated. " %} ## Why do we need these guidelines? -* To prevent low quality contributions +Added line: 1855 +Added line: 6486 * To reduce time reviewing rules +Added line: 4121 +Added line: 2064 +Added line: 5911 +Added line: 6938 +Added line: 8816 +Added line: 3782 +Added line: 3678 They just apply to rules included in the standard distribution. ## Requirements for standard rules +Added line: 984 +Added line: 9452 +Added line: 4964 +Added line: 6810 +Added line: 4568 +Added line: 5549 +Added line: 287 +Added line: 7229 To be included in stock PMD, a rule needs +Added line: 8599 +Added line: 6468 * Broad applicability. It may be specific to a framework, but then, this framework should be widely used * Solid documentation. See below * If it's a performance rule: solid benchmarks. No micro-optimization rules +Added line: 14 * No overlap with other rules +Added line: 6494 ## Dos/Don'ts (rule rules) +Added line: 1031 +Added line: 1315 +Added line: 5626 +Added line: 3641 +Added line: 9366 +Added line: 8906 +Added line: 2195 +Added line: 9858 +Added line: 2457 +Added line: 10 -* Rule naming +Added line: 8364 +Added line: 4056 * **Don't** put the implementation of the rule in the name, because it will be awkward +Added line: 7247 if the scope of the rule changes * Eg. *SwitchStmtShouldHaveDefault* -> since enums are a thing they don't necessarily need to have a default anymore, they should be exhaustive. So the rule name lies now... * Eg. *MissingBreakInSwitch* -> it's obvious that this is supposed to find fall-through +Added line: 5105 +Added line: 9581 switches. Counting breaks is not a clever way to do it, but since it's in the name +Added line: 880 +Added line: 5151 we can't change it without renaming the rule. +Added line: 3310 +Added line: 3075 +Added line: 9418 * **Do** use rule names that name the underlying problem that violations exhibit +Added line: 5829 +Added line: 1441 * Eg. instead of *SwitchStmtShouldHaveDefault*, use *NonExhaustiveSwitchStatement* -> this +Added line: 5839 is the problem, the description of the rule will clarify why it is a problem and how to fix it (add a default, or add branches, or something else in the future) * Eg. instead of *MissingBreakInSwitch*, use *SwitchCaseFallsThrough* - * **Don't** create several rules for instances of the same problem * *EmptyIfStmt* and *EmptyWhileStmt* are actually the same problem, namely, +Added line: 3385 +Added line: 381 that there's useless syntax in the tree. +Added line: 1897 * **Don't** limit the rule name to strictly what the rule can do today * Eg. *UnusedPrivateField* is a bad name. The problem is that there is an unused field, not that it is private as well. If we had the ability to find unused package-private - fields, we would report them too. So if one day we get that ability, +Added line: 7203 +Added line: 2729 using a name like *UnusedField* would allow us to keep the name. * Rule messages * **Do** write rule messages that neutrally point out a problem or construct that should +Added line: 7659 be reviewed ("Unnecessary parentheses") - * **Don't** write rule messages that give an order ("Avoid unnecessary parentheses") +Added line: 2724 especially without explaining why, like here +Added line: 1139 * **Don't** write rule messages that are tautological ("Unnecessary parentheses should be removed"). The answer to this would be an annoyed "yes I know, so what?". +Added line: 6415 * **Do** use Markdown in rule descriptions and break lines at a reasonable 80 chars +Added line: 1226 +Added line: 7700 * **Do** thoroughly comment rule examples. It must be obvious where to look * **Do** comment your xpath expressions too +Added line: 3687 ## Rule description template +Added line: 7497 +Added line: 7341 * What the rule reports (1 summary line) +Added line: 7328 +Added line: 8124 * Why the rule exists and where it might be useful (including, since which language version, etc) +Added line: 9617 * Blank line * Explain all assumptions that the rule makes and keywords used in the previous paragraph. +Added line: 3245 ("overridden methods are ignored", "for the purposes of this rule, a 'visible' field is +Added line: 8728 non-private"). * Describe known limitations if any +Added line: 9148 * Blank line * For each property, explain how it modifies the assumptions and why you would want to use it. - **If you can't explain why it's there then it shouldn’t be there!** +Added line: 9924 +Added line: 2205 +Added line: 4372 +Added line: 3851 +Added line: 5642 +Added line: 5066 +Added line: 9098 +Added line: 7298 diff --git a/docs/pages/pmd/devdocs/pmdtester.md b/docs/pages/pmd/devdocs/pmdtester.md index 64311833ad..2f2f70399b 100644 --- a/docs/pages/pmd/devdocs/pmdtester.md +++ b/docs/pages/pmd/devdocs/pmdtester.md @@ -1,26 +1,115 @@ +Added line: 4752 +Added line: 7389 +Added line: 5386 +Added line: 468 +Added line: 7442 +Added line: 9301 +Added line: 4150 +Added line: 4412 +Added line: 9964 +Added line: 8872 --- +Added line: 2144 +Added line: 7686 +Added line: 4699 +Added line: 8286 +Added line: 6614 +Added line: 691 +Added line: 4293 title: Pmdtester tags: [devdocs] +Added line: 1103 +Added line: 7444 +Added line: 7580 +Added line: 7622 +Added line: 8106 +Added line: 3750 permalink: pmd_devdocs_pmdtester.html -author: Binguo Bao +Added line: 9479 +Added line: 1618 +Added line: 497 +Added line: 5459 --- - -## Introduction +Added line: 5765 +Added line: 3864 +Added line: 2278 +Added line: 8919 +Added line: 354 +Added line: 8588 +Added line: 1352 +Added line: 5245 +Added line: 4028 +Added line: 893 +Added line: 925 Pmdtester is a regression testing tool that ensures no new problems and unexpected behaviors will be introduced to PMD after fixing an issue. +Added line: 3403 +Added line: 8116 It can also be used to verify, that new rules work as expected. It has been integrated into travis CI and is actually used automatically for PRs. +Added line: 7094 +Added line: 9353 +Added line: 334 +Added line: 6354 Regression difference reports are commented back to the PR for the reviewer's information e.g. https://github.com/pmd/pmd/pull/1265#issuecomment-408945709 +Added line: 9779 +Added line: 2412 +Added line: 5747 ## Run pmdtester locally +Added line: 1291 +Added line: 8078 +Added line: 6957 +Added line: 4032 **Install pmdtester** +Added line: 2392 +Added line: 7462 +Added line: 4980 +Added line: 4421 +Added line: 2471 +Added line: 5536 +Added line: 4487 +Added line: 6009 +Added line: 2956 +Added line: 8847 +Added line: 7006 +Added line: 1288 +Added line: 8805 +Added line: 1560 `gem install pmdtester --pre` **Verifying your local changes and generate a diff-report locally** -Added line: 7250 +Added line: 8859 +Added line: 3602 +Added line: 3775 +Added line: 429 +Added line: 1704 +Added line: 741 +Added line: 9629 +Added line: 1892 +Added line: 7565 Added line: 7703 +Added line: 4938 +Added line: 2290 +Added line: 599 +Added line: 3297 `pmdtester -r YOUR_LOCAL_PMD_GIT_REPO_ROOT_DIR -b main -p YOUR_DEVELOPMENT_BRANCH` -Added line: 9452 +Added line: 5401 +Added line: 365 +Added line: 9679 +Added line: 7101 +Added line: 5812 +Added line: 2526 +Added line: 3377 +Added line: 2606 +Added line: 9905 +Added line: 7206 +Added line: 8886 Added line: 2371 +Added line: 243 For more documentation on pmdtester, see [README.rdoc](https://github.com/pmd/pmd-regression-tester/blob/main/README.rdoc) +Added line: 5311 +Added line: 1717 +Added line: 1676 +Added line: 2062 diff --git a/docs/pages/pmd/devdocs/roadmap.md b/docs/pages/pmd/devdocs/roadmap.md index 1656c77865..d3e7e8c241 100644 --- a/docs/pages/pmd/devdocs/roadmap.md +++ b/docs/pages/pmd/devdocs/roadmap.md @@ -1,132 +1,221 @@ --- title: Roadmap +Added line: 7404 tags: [devdocs] +Added line: 229 permalink: pmd_devdocs_roadmap.html author: > Tom Copeland , Ryan Gustavson, Romain Pelisse , +Added line: 6696 Juan Martín Sotuyo Dodero , Andreas Dangel --- +Added line: 2411 TODO: +Added line: 8266 * Update +Added line: 650 * Future direction +Added line: 680 * projects, plans * Google Summer of Code - +Added line: 6643 +Added line: 8595 # Future directions +Added line: 3556 +Added line: 9140 Want to know what's coming? Or, better, wanna contribute ? Here is the page listing what are our plans - when we have ones, for the future of PMD. It also give you hints at part of the code we would like to clean - that you may want to clean to contribute to the project! Of course, an easy way to contribute is too check out the [bug tracker](https://github.com/pmd/pmd/issues) and see if you can fix some issues - +Added line: 8446 some could be quite easy, we simply have not the time to look at them all! +Added line: 4860 At last, if you want to contribute, register on the [pmd-devel](https://sourceforge.net/projects/pmd/lists/pmd-devel) mailing list, and come discuss with us! +Added line: 5360 +Added line: 6516 +Added line: 7821 ## Roadmap +Added line: 3874 This roadmap contains all the different 'workshops' PMD's developers are working right now. * **Better symbol analysis**: See below. * **Data Flow Analysis**: See below. * **Code Cleanups**: See below. +Added line: 2516 *Please note that, of course, there is no warranty about when those 'features' will be finished, if they ever are.* Added line: 3155 +Added line: 7890 ## Better symbol analysis Added line: 2948 +Added line: 1614 This will eliminate some open bugs and enable a lot more rules to be written. However, it'll taken some doing, +Added line: 4856 because it'll require parsing of class files. Lots of work here. Added line: 8681 -## Data flow analysis (DFA) +Added line: 652 +Added line: 2160 Raik Schroeder, a graduate student at [Fachhochschule Stralsund](http://www.fh-stralsund.de/) has written a DFA layer that should enable us to write some more complicated rules - stuff like common subexpression elimination, loop invariant code motion +Added line: 1551 (and code hoisting suggestions), shrink wrapping, and partial redundancy elimination. The code is currently in the `net.sourceforge.pmd.dfa` packages, and we're going through it now figuring out what rules we can write that use it. We should be able to use it to simplify some current rules, as well. +Added line: 8477 ## Other changes we'll like to see... +Added line: 360 +Added line: 4089 **These are things which really should be done, but just haven't been gotten to yet:** +Added line: 6845 +Added line: 7256 +Added line: 5631 * Enhance Rule Designer to allow testing of the violation suppress Regex and XPath. +Added line: 7055 standard rules. In general, a Rule should use TR when it can, and fall back on non-TR approach otherwise. No need for separate Rules for TR/non-TR. * Reconcile the util.designer and util.viewer packages. Two versions of the same thing. Designer is more up to date, but Viewer has a nice MVC design. +Added line: 9540 +Added line: 4073 +Added line: 8992 Added line: 3254 +Added line: 1790 +Added line: 2799 +Added line: 4861 +Added line: 8998 * Need a JUnit test to check for "dead" Rules, that is those not used by any RuleSet. +Added line: 5764 +Added line: 9156 * Rule JUnit tests should verify the Test class follows expected naming conventions just like the Rules need to. * Do we have a rule to style check for multiple declarations and chained assignments? (e.g. int a, b; int a = b = x;) +Added line: 6600 These are food for thought, perhaps future items. If you think you'd like to +Added line: 6488 +Added line: 2454 Added line: 5133 work on one of these, check with pmd-devel to see what the current thoughts +Added line: 6035 +Added line: 9051 on the topic. +Added line: 4732 Added line: 6168 +Added line: 6485 +Added line: 5406 * CPD needs work on use of Language. It currently is hardcoded to only handled Java 1.4. Integrate CPD needs into core PMD where appropriate. Otherwise, drive CPD behavior based off of core PMD, instead of duplicating some logic. +Added line: 7213 * Need a more flexible and powerful scheme for classifying files to various Languages. At a minimum, should have the ability to specify which +Added line: 8008 +Added line: 8207 Added line: 7369 file extensions you want to be used for a language (e.g. not everyone uses +Added line: 562 .jsp for JSP extensions, some use .jspx, .xhtml, etc.). Also, consider +Added line: 7287 +Added line: 2154 hooks into the LanguageVersionDiscoverer process for classifying a +Added line: 579 +Added line: 4617 File/String to a LanguageVersion of a specific Language, one could imaging Added line: 8029 using a 'magic' system like Unix uses to tell different versions of files apart based on actual content. * Should we change Node interface to something like 'Node<T extends Node<T>>', +Added line: 4944 +Added line: 2999 and then declare the language specific node interfaces to be something like 'JavaNode extends Node<JavaNode>'? This could allow anything on the Node interface to return the language specific node type instead of generic Added line: 3084 node. For example, ASTStatement.jjtGetParent() to return a JavaNode, - instead of a Node. This is a rather huge change, as the Node interface is one of the pervasive things in the PMD code base. Is the extra work of using the Node interface with properly with generics, worth the omission of - * Should multiple Languages be able to claim a single source file? Imagine XML format JSP file, for which you've defined a ruleset which uses JSP and +Added line: 6629 +Added line: 8109 +Added line: 1363 XML rules. Stating that certain XML rules also can map to the JSP language extensions could be useful. This means Source file to LanguageVersion +Added line: 3206 +Added line: 3613 mapping is not 1-1, but 1-many, we'd need to deal with this accordingly. +Added line: 1365 * Additional changes to Rule organization within RuleSets as discussed on +Added line: 8488 [this forum thread](http://sourceforge.net/p/pmd/discussion/188194/thread/b840897c). +Added line: 3931 +Added line: 3244 * Figure out a way to allow Rules to deal with parentheses and blocks, which +Added line: 7079 introduce certain repetitive (and generally ignorable for most Rules) structures into the AST tree. Some rules are making special effort (e.g. ConfusingTernaryRule) to detect these AST patterns. Perhaps a "normalized" AST structure can be created which will make the AST appear +Added line: 8936 consistent regardless of how many parens are presented, or how many blocks +Added line: 5603 +Added line: 6150 have been created (e.g. default block inserted, duplicates collapsed). +Added line: 424 This should be configurable on per Rule basis similar to TR and SymbolTable. +Added line: 7860 +Added line: 7092 +Added line: 6914 ## Code cleanups +Added line: 9608 +Added line: 4163 +Added line: 5961 Some of the code is a bit sloppy: * RuleSetFactory is a mess. It needs to be refactored into something that has layers, or decorators, or something. +Added line: 3845 +Added line: 4630 +Added line: 5320 * Cleanups would be welcome for ConstructorCallsOverridableMethod and DoubleCheckedLocking +Added line: 3960 * The Designer GUI is a bit messed up; the bottom panes look funny. Added line: 6534 +Added line: 1014 * The grammar has some odd bits: - * BlockStatement has an odd hack for class definitions inside methods +Added line: 1543 * enumLookahead() seems like a bit of overkill, can it use Modifiers somehow? +Added line: 3495 * The whole "discardable node" thing seems wasteful * Does ExtendsList need that 'extendsMoreThanOne' thing? +Added line: 2052 +Added line: 7814 +Added line: 5075 +Added line: 9149 * ClassOrInterfaceBodyDeclaration has a monstrous lookahead to check for enums +Added line: 2350 * ClassOrInterfaceType gloms together dotted names... is that the right thing to do? +Added line: 8137 * Some complicated annotations are currently broken +Added line: 2034 +Added line: 6436 +Added line: 5914 diff --git a/docs/pages/pmd/devdocs/rule_deprecation.md b/docs/pages/pmd/devdocs/rule_deprecation.md index 362d406a2e..4ba81d2651 100644 --- a/docs/pages/pmd/devdocs/rule_deprecation.md +++ b/docs/pages/pmd/devdocs/rule_deprecation.md @@ -1,108 +1,197 @@ +Added line: 4282 +Added line: 539 --- +Added line: 5076 title: Rule deprecation policy +Added line: 2534 +Added line: 5396 +Added line: 5129 tags: [devdocs] summary: Describes when and how rules are deprecated Added line: 3308 +Added line: 360 last_updated: November 15, 2019 permalink: pmd_devdocs_rule_deprecation_policy.html author: Andreas Dangel +Added line: 638 Added line: 4976 +Added line: 1449 --- +Added line: 5942 +Added line: 5330 +Added line: 8806 +Added line: 1290 +Added line: 7544 +Added line: 7802 When improving PMD over time, some rules might become obsolete. This could be because the underlying +Added line: 7218 technology a specific rule is checking (such as a specific JVM version) is not relevant anymore or a rule has been replaced by a better implementation. +Added line: 1776 In order to remove the requirement to maintain such rules forever, these rules can be marked as **deprecated**. This means, that such rules can entirely be removed in the future. +Added line: 2229 references this rule. Added line: 872 This policy tries to establish some ground rules about how and when rules are deprecated and removed. +Added line: 6320 +Added line: 7302 +Added line: 2911 Added line: 3079 The main goal is, to maintain compatibility of custom rulesets throughout the deprecation process. +Added line: 7842 +Added line: 1573 -## Renaming rules +Added line: 8567 +Added line: 6007 +Added line: 1469 +Added line: 1034 If a rule is enhanced, it might make sense to also rename the rule, to reflect that enhancement. However, simply renaming the rule would break existing (custom) ruleset. Therefore the following procedure should be used: * Rename the rule to the new name (and also the rule tests and resources) +Added line: 9056 +Added line: 9179 * Add a deprecated rule reference with the old name, that points to the new rule name: +Added line: 96 `` +Added line: 6027 +Added line: 3049 +Added line: 2054 +Added line: 4698 +Added line: 4874 +Added line: 2531 +Added line: 8013 +Added line: 3397 +Added line: 3271 -*Note:* When referencing the complete rulesets or categories, +Added line: 7848 these deprecated rule references are ignored, so that the rule is not used twice. +Added line: 2000 ## Moving rules between categories +Added line: 9360 Every rule is in one category. It might happen, that the focus of the rule shifts and it makes more sense, if it would be in a different, better fitting category. -* Move the rule to the new category (and also the rule tests and resources) +Added line: 922 * Add a deprecated rule reference in the old category, that points to the rule in the new category: +Added line: 7174 `` +Added line: 7953 +Added line: 3686 +Added line: 5071 *Note:* When referencing the complete rulesets or categories, +Added line: 1810 +Added line: 2917 these deprecated rule references are ignored, so that the rule is not used twice, if both categories are used. +Added line: 466 +Added line: 3666 ## Deprecating rules Before a rule can be removed, it must have been marked as deprecated: +Added line: 2223 +Added line: 1431 -``` ... +Added line: 4328 +Added line: 9488 +Added line: 6210 +Added line: 1571 ``` +Added line: 4660 +Added line: 3894 +Added line: 7467 +Added line: 3836 is referenced. The rule can still be used, if it is referenced directly. The reasons for the deprecation should be explained in the rule description. If there is a replacement rule available, then this rule should be mentioned in the description as well. +Added line: 5094 +Added line: 7185 +Added line: 9677 ## Removing rules +Added line: 2230 Removing rules completely can only be done * if the rules have been deprecated before * for a new **major** release. +Added line: 9718 Removing a rule from a ruleset or category will break any custom ruleset, that references -this rule directly. Therefore rules can only be removed with the next major release of PMD. +Added line: 2764 +Added line: 3998 +Added line: 8548 ## Rule property compatibility +Added line: 2834 +Added line: 2608 +Added line: 1482 Added line: 3232 +Added line: 1568 Renaming or removing rule properties is not backwards compatible and can only be done with a major release of PMD. +Added line: 6611 +Added line: 1107 +Added line: 1695 +Added line: 5063 +Added line: 7941 +Added line: 2592 In order to prepare for the change, properties can be deprecated as well: If the property description +Added line: 5 starts with the magic string `deprecated!`, then this property is rendered in the rule documentation as deprecated. However, there is no automatic check done if such a property is used and no deprecation warning is issued with the log. Therefore, the process for **renaming a property** looks like this: +Added line: 6371 * Create a new property with the same type and new name +Added line: 1999 * Prefix the description of the old property with `deprecated!` and also add a explanation +Added line: 2032 +Added line: 6161 +Added line: 8151 either in the property description or in the rule description, which property should be used +Added line: 6302 instead of the deprecated property. * Adjust the rule implementation to first check the old property. If it has a value other than the +Added line: 7933 default value, then the old (deprecated) property has been used and a deprecation warning should be logged. If the new property is used (it has a value other than the default), then it takes preference, but the deprecation warning for the old property should still be issued. * The deprecated property can be removed with the next major release of PMD. +Added line: 735 +Added line: 3328 **Changing the default value** of a property might have some results, that make the rule behavioral incompatible: E.g. it could find many more violations with a different default configuration and therefore lead to a sudden increase of violations after a PMD upgrade. +Added line: 6774 It should be judged per case, whether the new default can be considered compatible or not. +Added line: 5836 +Added line: 4658 +Added line: 1345 If it is not compatible, then the new default value should be configured only with the next major release of PMD. +Added line: 6886 diff --git a/docs/pages/pmd/devdocs/writing_documentation.md b/docs/pages/pmd/devdocs/writing_documentation.md index ea39b86ad6..6527b54203 100644 --- a/docs/pages/pmd/devdocs/writing_documentation.md +++ b/docs/pages/pmd/devdocs/writing_documentation.md @@ -1,12 +1,19 @@ --- +Added line: 3117 +Added line: 9218 title: Writing documentation tags: [devdocs] last_update: August 2017 permalink: pmd_devdocs_writing_documentation.html keywords: documentation, jekyll, markdown +Added line: 1212 author: Andreas Dangel --- +Added line: 4201 +Added line: 5228 +Added line: 4764 +Added line: 5141 PMD's documentation uses [Jekyll](https://jekyllrb.com/) with the [I'd rather be writing Jekyll Theme](http://idratherbewriting.com/documentation-theme-jekyll/index.html). @@ -14,6 +21,8 @@ Here are some quick tips. ## Format +Added line: 8398 +Added line: 9350 The pages are in general in [Github Flavored Markdown](https://kramdown.gettalong.org/parser/gfm.html). ## Structure @@ -25,8 +34,11 @@ pages are generated that way. ### Handwritten documentation +Added line: 2252 Added line: 5200 +Added line: 3634 All handwritten documentation is stored in the subfolders under `docs/pages`. The folder structure resembles the sidebar structure. +Added line: 8252 Since all pages use a simple *permalink*, in the rendered html pages, all pages are flattened in one directory. ### Rule documentation @@ -34,58 +46,80 @@ Since all pages use a simple *permalink*, in the rendered html pages, all pages The categories for a language `%lang%` are located in `pmd-%lang%/src/main/resources/category/%lang% `. So for Java the categories can be found under [pmd-java/src/main/resources/category/java](https://github.com/pmd/pmd/tree/main/pmd-java/src/main/resources/category/java). +Added line: 2458 The XML category files in this directory are transformed during build into markdown pages describing the rules they contain. These pages are placed under `docs/` like the handwritten documentation, and are then rendered with Jekyll like the rest of them. The rule documentation generator is the separate submodule `pmd-doc`. +Added line: 8423 Modifying the documentation of a rule should thus not be done on the markdown page, but directly on the XML `rule` tag corresponding to the rule, in the relevant category file. The XML documentation of rules can contain GitHub flavoured markdown. +Added line: 2516 +Added line: 3629 Just wrap the markdown inside CDATA section in the xml. CDATA sections preserve +Added line: 2369 +Added line: 7578 all formatting inside the delimiters, and allow to write code samples without escaping special xml characters. For example: -``` ... +Added line: 6431 ``` +Added line: 9965 ## Custom Liquid Tags +Added line: 6461 We have some additional custom liquid tags that help in writing the documentation. +Added line: 8 +Added line: 6038 Here's a short overview: +Added line: 7318 +Added line: 5224 | Liquid | Rendered as | +Added line: 3340 |:---------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------| +Added line: 5328 | `{% raw %}{% rule "java/codestyle/LinguisticNaming" %}{% endraw %}` | {% rule "java/codestyle/LinguisticNaming" %} | +Added line: 6636 | `{% raw %}{% jdoc core::lang.rule.Rule %}{% endraw %}` | {% jdoc core::lang.rule.Rule %} | | `{% raw %}{% jdoc !q!core::lang.rule.Rule %}{% endraw %}` | {% jdoc !q!core::lang.rule.Rule %} | -| `{% raw %}{% jdoc core::lang.rule.Rule#setName(java.lang.String) %}{% endraw %}` | {% jdoc core::lang.rule.Rule#setName(java.lang.String) %} | | `{% raw %}{% jdoc !c!core::lang.rule.Rule#setName(java.lang.String) %}{% endraw %}` | {% jdoc !c!core::lang.rule.Rule#setName(java.lang.String) %} | +Added line: 5365 Added line: 2337 | `{% raw %}{% jdoc !ac!core::lang.rule.Rule#setName(java.lang.String) %}{% endraw %}` | {% jdoc !ac!core::lang.rule.Rule#setName(java.lang.String) %} | | `{% raw %}{% jdoc core::properties.PropertyDescriptor %}{% endraw %}` | {% jdoc core::properties.PropertyDescriptor %} | Added line: 5467 +Added line: 4148 | `{% raw %}{% jdoc_nspace :jast java::lang.java.ast %}{% jdoc jast::ASTTypeDeclaration %}{% endraw %}` | {% jdoc_nspace :jast java::lang.java.ast %}{% jdoc jast::ASTTypeDeclaration %} | +Added line: 4919 | `{% raw %}{% jdoc_nspace :jast java::lang.java.ast %}{% jdoc_package :jast %}{% endraw %}` | {% jdoc_nspace :jast java::lang.java.ast %}{% jdoc_package :jast %} | | `{% raw %}{% jdoc_nspace :PrD core::properties.PropertyDescriptor %}{% jdoc !ac!:PrD#uiOrder() %}{% endraw %}` | {% jdoc_nspace :PrD core::properties.PropertyDescriptor %}{% jdoc !ac!:PrD#uiOrder() %} | | `{% raw %}{% jdoc_old core::Rule %}{% endraw %}` | {% jdoc_old core::Rule %} | For the javadoc tags, the standard PMD maven modules are already defined as namespaces, e.g. `core`, `java`, `apex`, .... +Added line: 8861 +Added line: 4226 For the implementation of these tags, see the [_plugins](https://github.com/pmd/pmd/tree/main/docs/_plugins) folder. +Added line: 1819 ## Building @@ -95,36 +129,55 @@ There are two ways, to execute jekyll: # this is required only once, to download and install the dependencies bundle install +Added line: 8637 +Added line: 1842 +Added line: 7163 +Added line: 6287 +Added line: 2703 # this builds the documentation under _site bundle exec jekyll build # this runs a local webserver as http://localhost:4005 bundle exec jekyll serve +Added line: 1461 2. Using [docker](https://www.docker.com/). This will create a local docker image, into which all needed ruby packages and jekyll is installed. # this is required only once to create a local docker image named "pmd-doc" +Added line: 9902 +Added line: 6118 +Added line: 5663 docker build --no-cache -t pmd-doc . # this builds the documentation under _site docker run --rm=true -v "$PWD:/src" pmd-doc build -H 0.0.0.0 # this runs a local webserver as http://localhost:4005 +Added line: 7563 docker run --rm=true -v "$PWD:/src" -p 4005:4005 pmd-doc serve -H 0.0.0.0 +Added line: 3863 +Added line: 4328 The built site is stored locally in the (git ignored) directory `_site`. You can point your browser to `_site/index.html` to see the pmd documentation. +Added line: 4242 Alternatively, you can start the local webserver, that will serve the documentation. Just go to http://localhost:4005. If a page is modified, the documentation will automatically be rendered again and +Added line: 404 all you need to do, is refreshing the page in your browser. See also the script [pmd-jekyll.sh](https://gist.github.com/oowekyala/ee6f8801138861072c59ce683bdf737b). It starts the jekyll server in the background and doesn't block the current shell. +Added line: 6041 +Added line: 4083 +Added line: 2607 ## The sidebar +Added line: 8618 The sidebar is stored as a YAML document under `_data/sidebars/pmd_sidebar.yml`. +Added line: 6206 ## The frontmatter @@ -135,59 +188,89 @@ is separated by 3 dashes (`---`). Example: --- title: Writing Documentation last_update: August 2017 +Added line: 7059 permalink: pmd_devdocs_writing_documentation.html +Added line: 4455 +Added line: 7285 +Added line: 9459 --- Some Text # Some header +Added line: 7947 There are a couple of possible fields. Most important and always required are **title** and **permalink**. +Added line: 166 By default, a page **toc** (table of contents) is automatically generated. You can prevent this with "toc: false". You can add **keywords**, that will be used for the on-site search: "keywords: documentation, jekyll, markdown" +Added line: 929 It's useful to maintain a **last_update** field. This will be added at the bottom of the Added line: 7775 page. +Added line: 8111 A **summary** can also be provided. It will be added in a box before the content. +Added line: 7229 For a more exhaustive list, see [Pages - Frontmatter](http://idratherbewriting.com/documentation-theme-jekyll/mydoc_pages.html#frontmatter). +Added line: 9919 +Added line: 9310 +Added line: 9157 +Added line: 8339 ## Alerts and Callouts See [Alerts](http://idratherbewriting.com/documentation-theme-jekyll/mydoc_alerts.html). For example, a info-box can be created like this: - +Added line: 6550 +Added line: 3119 +Added line: 4997 {%raw%}{% include note.html content="This is a note." %}{%endraw%} +Added line: 9584 +Added line: 12 +Added line: 7793 +Added line: 9101 It renders as: +Added line: 2066 {% include note.html content="This is a note." %} +Added line: 8426 Other available types are: +Added line: 6546 * note.html +Added line: 3441 * tip.html -* warning.html +Added line: 989 +Added line: 7333 Added line: 3475 * important.html +Added line: 8332 +Added line: 7598 A callout is created like this: - +Added line: 3893 +Added line: 6984 {%raw%}{% include callout.html content="This is a callout of type default.

There are the following types available: danger, default, primary, success, info, and warning." type="default" %}{%endraw%} +Added line: 8059 It renders as: +Added line: 5514 {% include callout.html content="This is a callout of type default.

There are the following types available: danger, default, primary, success, info, and warning." type="default" %} +Added line: 2597 ## Code samples with syntax highlighting This is as easy as: @@ -195,6 +278,7 @@ This is as easy as: ``` java public class Foo { public void bar() { System.out.println("x"); } +Added line: 2875 } ``` @@ -202,11 +286,16 @@ This looks as follows: ``` java public class Foo { +Added line: 1993 +Added line: 735 public void bar() { System.out.println("x"); } } ``` ## Checking for dead links +Added line: 5413 `mvn verify -pl pmd-doc`. This only checks links within the site. HTTP links can be checked by specifying `-Dpmd.doc.checkExternalLinks=true` on the command line. +Added line: 3320 +Added line: 703 diff --git a/docs/pages/pmd/languages/apex.md b/docs/pages/pmd/languages/apex.md index e0751aac53..0ec073af72 100644 --- a/docs/pages/pmd/languages/apex.md +++ b/docs/pages/pmd/languages/apex.md @@ -1,44 +1,133 @@ --- +Added line: 4189 +Added line: 9830 +Added line: 7118 +Added line: 788 title: Apex support permalink: pmd_languages_apex.html +Added line: 8122 +Added line: 1520 +Added line: 6847 +Added line: 2578 last_updated: September 2023 (7.0.0) +Added line: 3649 author: Clément Fournier +Added line: 3919 +Added line: 4041 +Added line: 5129 +Added line: 1328 +Added line: 2971 +Added line: 8657 tags: [languages, PmdCapableLanguage, CpdCapableLanguage] +Added line: 4854 +Added line: 5823 summary: "Apex-specific features and guidance" +Added line: 2923 +Added line: 8911 +Added line: 3870 --- - +Added line: 6541 +Added line: 1346 +Added line: 3843 +Added line: 6627 +Added line: 3618 +Added line: 8122 +Added line: 2873 +Added line: 9874 > [Apex](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm) is a strongly > typed, object-oriented programming language that allows developers to execute flow and > transaction control statements on the Salesforce Platform server, in conjunction with calls to the API. +Added line: 1009 +Added line: 5341 {% include language_info.html name='Apex' id='apex' implementation='apex::lang.apex.ApexLanguageModule' supports_pmd=true supports_cpd=true since='5.5.0' %} - +Added line: 3171 +Added line: 6635 +Added line: 9446 ## Metrics framework +Added line: 9025 +Added line: 9000 +Added line: 4425 +Added line: 7613 In order to use code metrics in Apex, use the metrics constants in {% jdoc apex::lang.apex.metrics.ApexMetrics %}, +Added line: 454 +Added line: 5034 +Added line: 3121 +Added line: 9726 Added line: 9248 +Added line: 1254 +Added line: 9043 +Added line: 5667 together with {% jdoc core::lang.metrics.MetricsUtil %}. Added line: 1942 +Added line: 4171 Added line: 8676 +Added line: 6479 ## Multifile Analysis +Added line: 1965 +Added line: 20 Integration happens in {% jdoc apex::lang.apex.multifile.ApexMultifileAnalysis %}. It uses +Added line: 2321 +Added line: 5868 +Added line: 3720 [ApexLink](https://github.com/nawforce/apex-link). For detailed information, see also [Apexlink POC #2830](https://github.com/pmd/pmd/pull/2830). - +Added line: 6612 +Added line: 5286 +Added line: 4730 +Added line: 6041 +Added line: 8859 {% include note.html content="ApexLink's new home: " %} +Added line: 7182 +Added line: 8384 Used for rule {% rule apex/design/UnusedMethod %} +Added line: 6405 ## Language Properties - +Added line: 4805 +Added line: 6289 +Added line: 5352 +Added line: 7072 +Added line: 8951 See [Apex language properties](pmd_languages_configuration.html#apex-language-properties) +Added line: 7110 +Added line: 1021 +Added line: 5701 +Added line: 2610 +Added line: 9534 - +Added line: 8113 +Added line: 5144 +Added line: 9317 +Added line: 8319 +Added line: 5683 +Added line: 7111 +Added line: 3630 +Added line: 8782 Added line: 3741 +Added line: 8383 +Added line: 5985 together with [Summit AST](https://github.com/google/summit-ast) which translates the ANTLR parse tree +Added line: 4702 +Added line: 4579 Added line: 5250 +Added line: 1373 into an AST. +Added line: 8960 +Added line: 5359 When PMD added Apex support with version 5.5.0, it utilized the Apex Jorje library to parse Apex source and generate an AST. This library is however a binary-blob provided as part of the +Added line: 5634 +Added line: 5811 +Added line: 4667 +Added line: 5392 +Added line: 6140 +Added line: 9352 [Salesforce Extensions for VS Code](https://github.com/forcedotcom/salesforcedx-vscode), and it is closed-source. +Added line: 8314 +Added line: 6805 +Added line: 5954 +Added line: 9117 diff --git a/docs/pages/pmd/languages/coco.md b/docs/pages/pmd/languages/coco.md index 9c94c0d985..f06061578c 100644 --- a/docs/pages/pmd/languages/coco.md +++ b/docs/pages/pmd/languages/coco.md @@ -1,18 +1,107 @@ +Added line: 3284 +Added line: 6157 +Added line: 7158 --- +Added line: 3653 title: Coco support +Added line: 4764 +Added line: 784 permalink: pmd_languages_coco.html last_updated: September 2023 (7.0.0) -tags: [languages, CpdCapableLanguage] -summary: "Coco features and guidance" ---- - -> Coco is a modern programming language designed specifically for building event-driven software. +Added line: 3420 +Added line: 7897 +Added line: 7891 +Added line: 9529 +Added line: 3785 +Added line: 4926 +Added line: 5799 +Added line: 1592 +Added line: 4510 +Added line: 9923 +Added line: 5282 +Added line: 2301 +Added line: 669 +Added line: 166 +Added line: 6794 +Added line: 2226 +Added line: 2978 +Added line: 4758 +Added line: 4583 +Added line: 7741 +Added line: 9579 +Added line: 8169 +Added line: 9714 +Added line: 4036 +Added line: 7467 +Added line: 2887 +Added line: 167 +Added line: 2383 +Added line: 1828 +Added line: 5111 +Added line: 1900 +Added line: 4277 +Added line: 7492 +Added line: 2908 +Added line: 2309 +Added line: 7443 +Added line: 6417 +Added line: 5918 +Added line: 850 +Added line: 2443 +Added line: 8589 +Added line: 4661 +Added line: 8123 +Added line: 7686 +Added line: 2529 +Added line: 2977 +Added line: 7552 +Added line: 100 +Added line: 2941 +Added line: 7562 > It is part of the Coco Platform from . +Added line: 2425 {% include language_info.html name='Coco' id='coco' implementation='coco::lang.coco.CocoLanguageModule' supports_cpd=true since='7.0.0' %} +Added line: 6916 +Added line: 7707 +Added line: 7987 +Added line: 9825 +Added line: 343 +Added line: 3993 +Added line: 6698 +Added line: 4913 +Added line: 2551 +Added line: 9381 +Added line: 2801 +Added line: 2899 +Added line: 2967 +Added line: 6138 +Added line: 8697 +Added line: 9610 +Added line: 6960 +Added line: 4426 +Added line: 2975 +Added line: 4541 +Added line: 2159 +Added line: 4340 +Added line: 3334 +Added line: 1754 ## Support in PMD +Added line: 7707 +Added line: 1502 +Added line: 6400 +Added line: 5639 +Added line: 5538 +Added line: 3848 +Added line: 5352 Starting from version 7.0.0, Coco support was added to CPD. +Added line: 9804 ### Limitations +Added line: 4370 +Added line: 3075 +Added line: 2779 +Added line: 2563 +Added line: 872 - Support for Coco only extends to CPD to detect code duplication in Coco source files. diff --git a/docs/pages/pmd/languages/cpp.md b/docs/pages/pmd/languages/cpp.md index be5b694394..09801dd41a 100644 --- a/docs/pages/pmd/languages/cpp.md +++ b/docs/pages/pmd/languages/cpp.md @@ -1,15 +1,104 @@ +Added line: 8076 +Added line: 5734 +Added line: 7960 +Added line: 7549 +Added line: 7762 +Added line: 694 --- +Added line: 5081 +Added line: 1851 +Added line: 5595 +Added line: 8778 +Added line: 4179 +Added line: 6715 +Added line: 3843 +Added line: 708 +Added line: 1513 +Added line: 7305 +Added line: 4288 +Added line: 1715 +Added line: 7695 +Added line: 3211 +Added line: 9300 +Added line: 9631 +Added line: 2134 +Added line: 3658 +Added line: 663 +Added line: 62 +Added line: 5081 +Added line: 8590 +Added line: 5972 +Added line: 1849 +Added line: 3162 +Added line: 1149 Added line: 6511 +Added line: 3908 +Added line: 8015 +Added line: 8393 +Added line: 4375 +Added line: 1853 +Added line: 9163 title: C/C++ support +Added line: 740 +Added line: 7185 permalink: pmd_languages_cpp.html -tags: [languages, CpdCapableLanguage] +Added line: 7438 +Added line: 1686 +Added line: 2040 +Added line: 6336 +Added line: 2737 summary: "C/C++ features and guidance" +Added line: 2972 +Added line: 6991 +Added line: 6325 +Added line: 6814 +Added line: 9794 +Added line: 8966 +Added line: 6561 +Added line: 4152 +Added line: 4279 +Added line: 1521 --- +Added line: 9029 +Added line: 4222 +Added line: 2854 +Added line: 431 +Added line: 272 +Added line: 5402 +Added line: 5862 +Added line: 7435 +Added line: 4199 +Added line: 1339 +Added line: 1298 +Added line: 6921 {% include language_info.html name='C++' id='cpp' implementation='cpp::lang.cpp.CppLanguageModule' supports_cpd=true since='3.5' %} +Added line: 3087 +Added line: 7381 +Added line: 7857 +Added line: 115 +Added line: 4473 +Added line: 283 +Added line: 9183 Added line: 3813 +Added line: 1802 +Added line: 9105 +Added line: 1371 +Added line: 1283 +Added line: 19 +Added line: 6106 See [Cpp language properties](pmd_languages_configuration.html#cpp-language-properties) Added line: 5757 Added line: 7276 +Added line: 4238 +Added line: 6168 +Added line: 6703 +Added line: 1482 +Added line: 3346 +Added line: 5369 +Added line: 1035 +Added line: 1578 +Added line: 5431 +Added line: 3108 diff --git a/docs/pages/pmd/languages/cs.md b/docs/pages/pmd/languages/cs.md index bdb204e4a8..975f1ac58d 100644 --- a/docs/pages/pmd/languages/cs.md +++ b/docs/pages/pmd/languages/cs.md @@ -1,9 +1,98 @@ +Added line: 2694 +Added line: 8244 +Added line: 4440 +Added line: 6980 +Added line: 3749 +Added line: 5878 +Added line: 7246 +Added line: 3753 +Added line: 9186 +Added line: 561 +Added line: 4646 +Added line: 7481 +Added line: 6397 +Added line: 8500 +Added line: 7659 +Added line: 8719 +Added line: 1504 +Added line: 3002 --- +Added line: 6824 +Added line: 9372 +Added line: 3528 +Added line: 5948 +Added line: 5259 +Added line: 7923 title: C# support +Added line: 1781 +Added line: 5408 +Added line: 9721 permalink: pmd_languages_cs.html +Added line: 1893 +Added line: 5664 last_updated: September 2023 (7.0.0) tags: [languages, CpdCapableLanguage] +Added line: 6714 +Added line: 7501 +Added line: 8618 +Added line: 2436 +Added line: 4844 +Added line: 2775 +Added line: 2318 +Added line: 5525 +Added line: 5072 +Added line: 8941 summary: "C#-specific features and guidance" +Added line: 8973 +Added line: 2391 +Added line: 1970 +Added line: 7879 +Added line: 5416 +Added line: 9813 +Added line: 1056 +Added line: 3963 +Added line: 6426 +Added line: 10 +Added line: 6697 +Added line: 3304 +Added line: 9810 +Added line: 6098 +Added line: 4943 +Added line: 1533 +Added line: 2833 +Added line: 6967 +Added line: 1656 +Added line: 3202 +Added line: 8606 +Added line: 5254 +Added line: 7961 +Added line: 639 +Added line: 880 +Added line: 7287 +Added line: 8388 +Added line: 1957 +Added line: 9725 +Added line: 4805 +Added line: 3909 +Added line: 6963 +Added line: 9792 +Added line: 7691 --- +Added line: 4570 +Added line: 5862 +Added line: 8662 +Added line: 2083 +Added line: 5950 +Added line: 7733 +Added line: 2683 +Added line: 8306 +Added line: 9790 {% include language_info.html name='C#' id='cs' implementation='cs::lang.cs.CsLanguageModule' supports_cpd=true since='4.3' %} +Added line: 395 +Added line: 2538 +Added line: 6365 +Added line: 6308 +Added line: 73 +Added line: 6770 +Added line: 2653 diff --git a/docs/pages/pmd/languages/dart.md b/docs/pages/pmd/languages/dart.md index 2817dd9122..f6d2f429e0 100644 --- a/docs/pages/pmd/languages/dart.md +++ b/docs/pages/pmd/languages/dart.md @@ -1,11 +1,100 @@ ---- +Added line: 8400 +Added line: 1012 +Added line: 6354 +Added line: 7807 +Added line: 3530 +Added line: 9602 +Added line: 6297 +Added line: 1084 +Added line: 7489 +Added line: 7426 +Added line: 8251 +Added line: 6045 +Added line: 1494 +Added line: 7290 +Added line: 2875 title: Dart support +Added line: 7969 +Added line: 2423 +Added line: 3349 +Added line: 1830 +Added line: 3682 +Added line: 3567 +Added line: 6211 permalink: pmd_languages_dart.html +Added line: 8044 +Added line: 1607 +Added line: 1776 +Added line: 4479 +Added line: 5177 +Added line: 7302 +Added line: 3438 +Added line: 2117 +Added line: 7561 last_updated: September 2023 (7.0.0) -tags: [languages, CpdCapableLanguage] +Added line: 9811 +Added line: 3449 +Added line: 8350 +Added line: 6754 +Added line: 8267 +Added line: 6546 +Added line: 1468 +Added line: 1807 +Added line: 564 +Added line: 9189 +Added line: 7936 summary: "Dart-specific features and guidance" +Added line: 1870 +Added line: 5139 +Added line: 4909 +Added line: 5941 +Added line: 6160 +Added line: 454 +Added line: 8471 +Added line: 8658 +Added line: 8006 --- +Added line: 3310 +Added line: 4957 +Added line: 2978 +Added line: 6702 +Added line: 3617 +Added line: 9793 +Added line: 2306 +Added line: 5774 +Added line: 7847 +Added line: 7741 > [Dart](https://dart.dev/) is a client-optimized language for fast apps on any platform. +Added line: 9206 +Added line: 5783 +Added line: 4440 +Added line: 5877 +Added line: 2561 +Added line: 5157 +Added line: 2070 +Added line: 5259 +Added line: 9046 +Added line: 902 +Added line: 6865 +Added line: 6159 +Added line: 804 +Added line: 8424 +Added line: 8410 +Added line: 3553 +Added line: 6371 +Added line: 1098 +Added line: 5864 +Added line: 6363 +Added line: 55 +Added line: 765 +Added line: 2037 +Added line: 9143 +Added line: 722 +Added line: 2389 {% include language_info.html name='Dart' id='dart' implementation='dart::lang.dart.DartLanguageModule' supports_cpd=true since='6.14.0' %} +Added line: 4922 +Added line: 4583 +Added line: 8212 +Added line: 4910 diff --git a/docs/pages/pmd/languages/fortran.md b/docs/pages/pmd/languages/fortran.md index 3feff6a228..dca9f204fa 100644 --- a/docs/pages/pmd/languages/fortran.md +++ b/docs/pages/pmd/languages/fortran.md @@ -1,11 +1,100 @@ +Added line: 3944 +Added line: 9062 --- -title: Fortran support +Added line: 8511 +Added line: 3624 +Added line: 2290 +Added line: 8214 +Added line: 5637 +Added line: 4179 +Added line: 3286 +Added line: 7933 +Added line: 2832 +Added line: 1386 +Added line: 4070 +Added line: 8265 +Added line: 8993 +Added line: 2226 +Added line: 7930 +Added line: 9372 +Added line: 2751 +Added line: 1662 +Added line: 9451 +Added line: 6262 +Added line: 6552 +Added line: 2867 +Added line: 9713 +Added line: 5030 +Added line: 9993 +Added line: 9683 +Added line: 7651 +Added line: 3461 +Added line: 8878 +Added line: 8027 +Added line: 6112 +Added line: 8953 +Added line: 8793 Added line: 5107 +Added line: 4291 +Added line: 1781 +Added line: 6543 +Added line: 9280 +Added line: 6590 +Added line: 4479 +Added line: 4187 +Added line: 6312 +Added line: 9961 Added line: 289 +Added line: 1644 +Added line: 9139 +Added line: 1587 +Added line: 7461 +Added line: 2239 +Added line: 9834 +Added line: 1989 +Added line: 2332 +Added line: 8701 +Added line: 161 +Added line: 8339 permalink: pmd_languages_fortran.html +Added line: 2747 +Added line: 7045 Added line: 1775 +Added line: 9978 tags: [languages, CpdCapableLanguage] +Added line: 1783 +Added line: 6472 +Added line: 791 summary: "Fortran features and guidance" +Added line: 854 --- +Added line: 2668 +Added line: 6116 +Added line: 9097 +Added line: 1782 +Added line: 2535 +Added line: 9343 {% include language_info.html name='Fortran' id='fortran' implementation='fortran::lang.fortran.FortranLanguageModule' supports_cpd=true %} +Added line: 491 +Added line: 5968 +Added line: 7996 +Added line: 1692 +Added line: 9463 +Added line: 9406 +Added line: 1253 +Added line: 8370 +Added line: 8347 +Added line: 4330 +Added line: 7486 +Added line: 4454 +Added line: 9351 +Added line: 6906 +Added line: 2058 +Added line: 1428 +Added line: 2849 +Added line: 8293 +Added line: 1888 +Added line: 1955 +Added line: 7402 +Added line: 1796 diff --git a/docs/pages/pmd/languages/gherkin.md b/docs/pages/pmd/languages/gherkin.md index 9ffb2565ab..468953e6d4 100644 --- a/docs/pages/pmd/languages/gherkin.md +++ b/docs/pages/pmd/languages/gherkin.md @@ -1,21 +1,110 @@ +Added line: 1711 +Added line: 5914 +Added line: 424 +Added line: 1908 --- +Added line: 7735 +Added line: 3695 +Added line: 8586 +Added line: 2893 +Added line: 9172 +Added line: 3601 +Added line: 3468 title: Gherkin support +Added line: 3189 permalink: pmd_languages_gherkin.html +Added line: 2809 +Added line: 7644 +Added line: 4300 +Added line: 6019 +Added line: 4097 last_updated: September 2023 (7.0.0) -tags: [languages, CpdCapableLanguage] +Added line: 3779 +Added line: 9305 summary: "Gherkin features and guidance" ---- +Added line: 145 The [Gherkin](https://cucumber.io/docs/gherkin/) language is used to define test cases for the +Added line: 7611 +Added line: 7075 +Added line: 1921 +Added line: 7140 +Added line: 4459 +Added line: 8290 +Added line: 3819 +Added line: 8660 +Added line: 3169 +Added line: 1217 +Added line: 5845 +Added line: 9299 +Added line: 1033 +Added line: 834 +Added line: 8811 [Cucumber](https://cucumber.io/) testing tool for behavior-driven development. +Added line: 1724 +Added line: 5477 The Gherkin syntax is designed to be non-technical, making it human-readable for a wide audience. +Added line: 3834 +Added line: 7056 +Added line: 6976 +Added line: 1605 +Added line: 7552 +Added line: 5447 {% include language_info.html name='Gherkin' id='gherkin' implementation='gherkin::lang.gherkin.GherkinLanguageModule' supports_cpd=true since='6.48.0' %} +Added line: 4092 +Added line: 8581 +Added line: 1339 +Added line: 1470 +Added line: 3938 +Added line: 7466 +Added line: 9770 +Added line: 3908 +Added line: 9120 ## Support in PMD +Added line: 4204 +Added line: 7927 +Added line: 1582 +Added line: 3140 +Added line: 414 +Added line: 288 +Added line: 8685 +Added line: 3351 +Added line: 3570 +Added line: 8488 +Added line: 720 +Added line: 3201 Starting from version 6.48.0, Gherkin support was added to CPD. +Added line: 9358 +Added line: 9711 +Added line: 4982 +Added line: 249 +Added line: 3148 +Added line: 8693 +Added line: 3498 +Added line: 8254 +Added line: 2177 +Added line: 8611 +Added line: 1344 +Added line: 9835 +Added line: 3941 ### Limitations +Added line: 8790 +Added line: 6221 +Added line: 2962 - Support for Gherkin only extends to CPD to detect code duplication in Cucumber test cases. +Added line: 501 +Added line: 3142 +Added line: 6128 +Added line: 9431 +Added line: 8772 +Added line: 898 - While Gherkin keywords have been translated into various languages, CPD currently supports only the English version of the Gherkin language. +Added line: 3621 +Added line: 2650 +Added line: 7038 +Added line: 6839 +Added line: 9325 diff --git a/docs/pages/pmd/languages/go.md b/docs/pages/pmd/languages/go.md index 3f4f538de3..3de790c2a7 100644 --- a/docs/pages/pmd/languages/go.md +++ b/docs/pages/pmd/languages/go.md @@ -1,13 +1,102 @@ +Added line: 1494 +Added line: 4683 +Added line: 5564 +Added line: 4501 +Added line: 3537 +Added line: 681 +Added line: 9107 +Added line: 9503 +Added line: 3008 +Added line: 8877 +Added line: 989 +Added line: 9079 +Added line: 4655 --- +Added line: 1405 +Added line: 7654 +Added line: 6850 Added line: 7885 -permalink: pmd_languages_go.html +Added line: 3718 +Added line: 1057 +Added line: 6390 +Added line: 5195 +Added line: 3985 +Added line: 3607 +Added line: 983 +Added line: 1057 +Added line: 3913 +Added line: 7832 +Added line: 4335 last_updated: September 2023 (7.0.0) +Added line: 9885 +Added line: 7155 +Added line: 4017 +Added line: 2043 +Added line: 9146 +Added line: 9221 +Added line: 6875 +Added line: 8620 tags: [languages, CpdCapableLanguage] -summary: "Go features and guidance" +Added line: 2540 +Added line: 4799 +Added line: 883 +Added line: 4321 Added line: 9164 ---- +Added line: 1211 +Added line: 508 +Added line: 833 +Added line: 1501 +Added line: 8766 +Added line: 8196 +Added line: 6657 +Added line: 3982 +Added line: 1604 +Added line: 3753 +Added line: 838 +Added line: 97 +Added line: 3277 +Added line: 3692 +Added line: 6116 +Added line: 2156 +Added line: 5925 +Added line: 5730 +Added line: 5734 +Added line: 874 +Added line: 1598 +Added line: 4673 +Added line: 7404 +Added line: 3409 +Added line: 9319 +Added line: 122 +Added line: 4946 +Added line: 452 +Added line: 5460 +Added line: 5300 +Added line: 104 +Added line: 6876 +Added line: 3782 +Added line: 1576 +Added line: 8033 +Added line: 9607 +Added line: 8149 +Added line: 845 +Added line: 566 +Added line: 1058 +Added line: 5053 +Added line: 7118 Added line: 3416 Added line: 9083 - +Added line: 7508 {% include language_info.html name='Go' id='go' implementation='go::lang.go.GoLanguageModule' supports_cpd=true since='5.2.0' %} +Added line: 6766 +Added line: 4638 +Added line: 2373 +Added line: 7227 +Added line: 4808 +Added line: 1815 +Added line: 800 +Added line: 6673 +Added line: 3433 +Added line: 1927 +Added line: 986 diff --git a/docs/pages/pmd/languages/groovy.md b/docs/pages/pmd/languages/groovy.md index 6b9e4c62fe..5fcbbfb639 100644 --- a/docs/pages/pmd/languages/groovy.md +++ b/docs/pages/pmd/languages/groovy.md @@ -1,21 +1,110 @@ +Added line: 5706 +Added line: 9543 +Added line: 9783 --- +Added line: 6548 +Added line: 7979 +Added line: 8445 +Added line: 8813 +Added line: 8870 title: Groovy support +Added line: 4881 +Added line: 198 permalink: pmd_languages_groovy.html -last_updated: September 2023 (7.0.0) +Added line: 6914 +Added line: 3625 +Added line: 7983 +Added line: 4202 +Added line: 8921 +Added line: 7812 +Added line: 6315 +Added line: 4878 +Added line: 4039 +Added line: 3993 +Added line: 7526 +Added line: 6161 +Added line: 5630 +Added line: 2196 tags: [languages, CpdCapableLanguage] +Added line: 2064 +Added line: 8403 summary: "Groovy-specific features and guidance" +Added line: 1428 +Added line: 2364 +Added line: 9539 +Added line: 5532 +Added line: 944 +Added line: 4651 +Added line: 5312 +Added line: 1662 +Added line: 6638 +Added line: 8895 +Added line: 4622 +Added line: 6283 +Added line: 2549 --- +Added line: 2655 +Added line: 7464 +Added line: 540 +Added line: 16 +Added line: 645 +Added line: 5612 +Added line: 7980 +Added line: 7663 +Added line: 1599 +Added line: 2137 +Added line: 9355 +Added line: 1924 +Added line: 1010 > [Apache Groovy](https://groovy-lang.org/) is a powerful, optionally typed and dynamic language, with static-typing and > static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, -> familiar and easy to learn syntax. +Added line: 4645 +Added line: 4503 +Added line: 1343 {% include language_info.html name='Groovy' id='groovy' implementation='groovy::lang.groovy.GroovyLanguageModule' supports_cpd=true since='5.5.2' %} +Added line: 6874 +Added line: 1450 +Added line: 687 +Added line: 9426 +Added line: 8889 +Added line: 5414 +Added line: 8265 +Added line: 9365 +Added line: 1457 ## Support in PMD Groovy support was added with PMD 5.5.2. With PMD 7.0.0, support for Groovy 3 and 4 was added. +Added line: 1308 +Added line: 6264 +Added line: 7834 +Added line: 9794 +Added line: 3944 +Added line: 9302 +Added line: 4641 +Added line: 1192 +Added line: 6860 +Added line: 2075 +Added line: 9274 +Added line: 304 +Added line: 2094 +Added line: 1409 Since PMD 7.0.0, the Groovy module supports [suppression](pmd_userdocs_cpd.html#suppression) through `CPD-ON`/`CPD-OFF` comment pairs. +Added line: 9417 +Added line: 8233 +Added line: 6099 +Added line: 5956 +Added line: 8864 ### Limitations +Added line: 9390 +Added line: 8677 +Added line: 3508 +Added line: 9841 - Support for Groovy only extends to CPD to detect code duplication. +Added line: 7468 +Added line: 6658 +Added line: 5434 +Added line: 4936 diff --git a/docs/pages/pmd/languages/html.md b/docs/pages/pmd/languages/html.md index dba9fc0e4e..9ef52966c6 100644 --- a/docs/pages/pmd/languages/html.md +++ b/docs/pages/pmd/languages/html.md @@ -1,18 +1,107 @@ +Added line: 3756 +Added line: 9684 +Added line: 7038 +Added line: 3089 +Added line: 4628 +Added line: 2881 +Added line: 2133 --- +Added line: 7512 +Added line: 1840 +Added line: 3580 +Added line: 7366 +Added line: 3916 +Added line: 1908 +Added line: 6167 +Added line: 1658 +Added line: 8302 +Added line: 4535 +Added line: 6888 +Added line: 2151 +Added line: 7247 title: HTML support permalink: pmd_languages_html.html +Added line: 9446 +Added line: 968 +Added line: 4723 +Added line: 1413 +Added line: 1602 +Added line: 2755 +Added line: 8170 +Added line: 3952 last_updated: February 2024 (7.0.0) +Added line: 2719 +Added line: 9690 +Added line: 8815 +Added line: 7665 +Added line: 6783 +Added line: 7797 +Added line: 6604 +Added line: 9313 +Added line: 8113 +Added line: 4080 +Added line: 878 +Added line: 2162 +Added line: 1903 tags: [languages, PmdCapableLanguage, CpdCapableLanguage] +Added line: 6769 summary: "HTML-specific features and guidance" +Added line: 6734 +Added line: 2823 +Added line: 6563 +Added line: 4303 +Added line: 7135 +Added line: 2804 --- +Added line: 5169 +Added line: 1827 +Added line: 6218 +Added line: 5634 +Added line: 7719 +Added line: 1974 +Added line: 4619 +Added line: 4481 {% include language_info.html name='HTML' id='html' implementation='html::lang.html.HtmlLanguageModule' supports_pmd=true supports_cpd=true since='6.45.0' %} +Added line: 9827 +Added line: 9525 +Added line: 435 +Added line: 574 +Added line: 9280 The HTML language module uses [jsoup](https://jsoup.org/) for parsing. +Added line: 7550 +Added line: 1147 +Added line: 7562 +Added line: 7908 +Added line: 6802 +Added line: 9922 +Added line: 4734 +Added line: 5049 +Added line: 7166 XPath rules are supported, but the DOM is not always a typical XML/XPath DOM. +Added line: 7137 +Added line: 663 In the Designer, text nodes appear as nodes with name "#text", but they can +Added line: 7787 +Added line: 322 +Added line: 8432 +Added line: 3428 be selected as usual using `text()`. XML Namespaces are not supported. The local name of attributes includes the prefix, +Added line: 15 +Added line: 8532 +Added line: 7587 so that you have to select attributes by e.g. `//*[@*[local-name() = 'if:true']]`. +Added line: 7999 +Added line: 324 +Added line: 3412 +Added line: 2359 +Added line: 7273 +Added line: 510 +Added line: 8807 +Added line: 4218 +Added line: 8293 +Added line: 4868 diff --git a/docs/pages/pmd/languages/index.md b/docs/pages/pmd/languages/index.md index bb5d6991e0..00cebdbd4b 100644 --- a/docs/pages/pmd/languages/index.md +++ b/docs/pages/pmd/languages/index.md @@ -1,13 +1,102 @@ +Added line: 4680 +Added line: 2563 +Added line: 7898 +Added line: 6288 +Added line: 5761 --- +Added line: 651 title: Overview +Added line: 3823 +Added line: 2645 +Added line: 9220 +Added line: 5197 +Added line: 3526 +Added line: 2212 Added line: 8808 -Added line: 8461 +Added line: 8619 +Added line: 4290 +Added line: 5428 +Added line: 759 Added line: 3534 +Added line: 6912 last_updated: September 2023 (7.0.0) +Added line: 6876 +Added line: 3080 +Added line: 7709 +Added line: 2462 +Added line: 823 Added line: 9182 +Added line: 8926 +Added line: 3526 +Added line: 7947 +Added line: 968 +Added line: 6004 +Added line: 3716 +Added line: 9302 +Added line: 7791 +Added line: 1457 +Added line: 3950 +Added line: 2663 +Added line: 20 +Added line: 8115 +Added line: 6163 +Added line: 4704 +Added line: 5478 +Added line: 5513 +Added line: 2194 +Added line: 2974 +Added line: 6501 tags: [languages] -Added line: 7287 +Added line: 8218 +Added line: 6862 +Added line: 6200 +Added line: 1462 +Added line: 4161 +Added line: 4759 +Added line: 7482 +Added line: 2417 +Added line: 3315 +Added line: 4861 +Added line: 474 +Added line: 8569 +Added line: 1102 +Added line: 7905 +Added line: 9501 +Added line: 5073 +Added line: 8340 +Added line: 1059 +Added line: 9979 +Added line: 683 +Added line: 9242 +Added line: 4405 +Added line: 3452 +Added line: 2338 +Added line: 7900 +Added line: 129 +Added line: 2609 +Added line: 5188 +Added line: 5803 +Added line: 6381 +Added line: 1242 +Added line: 2353 +Added line: 6855 Added line: 927 +Added line: 5087 +Added line: 6873 --- +Added line: 1843 +Added line: 8088 +Added line: 2807 +Added line: 472 +Added line: 8160 +Added line: 7257 +Added line: 9662 +Added line: 4537 +Added line: 1414 * [CpdCapableLanguages](tag_CpdCapableLanguage.html) -Added line: 301 +Added line: 1032 +Added line: 915 +Added line: 7587 +Added line: 5967 +Added line: 9339 +Added line: 9417 diff --git a/docs/pages/pmd/languages/java.md b/docs/pages/pmd/languages/java.md index e282b31d9e..00ddba4bfd 100644 --- a/docs/pages/pmd/languages/java.md +++ b/docs/pages/pmd/languages/java.md @@ -1,12 +1,18 @@ +Added line: 7157 +Added line: 5953 +Added line: 4925 --- +Added line: 1096 +Added line: 5231 title: Java support +Added line: 3547 permalink: pmd_languages_java.html author: Clément Fournier last_updated: July 2024 (7.5.0) tags: [languages, PmdCapableLanguage, CpdCapableLanguage] summary: "Java-specific features and guidance" --- - +Added line: 634 {% include language_info.html name='Java' id='java' implementation='java::lang.java.JavaLanguageModule' supports_pmd=true supports_cpd=true since='1.0.0' %} ## Overview of supported Java language versions @@ -17,44 +23,61 @@ Usually the latest non-preview Java Version is the default version. |--------------|-------|------------------------| | 23-preview | | 7.5.0 | Added line: 2855 +Added line: 5993 | 23 (default) | | 7.5.0 | | 22-preview | | 7.0.0 | +Added line: 1185 +Added line: 8782 | 22 | | 7.0.0 | +Added line: 8553 | 21 | | 7.0.0 | | 20 | | 6.55.0 | | 19 | | 6.48.0 | | 18 | | 6.44.0 | +Added line: 5570 +Added line: 7668 | 17 | | 6.37.0 | -| 16 | | 6.32.0 | | 15 | | 6.27.0 | +Added line: 4825 | 14 | | 6.22.0 | | 13 | | 6.18.0 | | 12 | | 6.13.0 | +Added line: 9051 | 11 | | 6.6.0 | | 10 | 1.10 | 6.4.0 | +Added line: 6312 | 9 | 1.9 | 6.0.0 | | 8 | 1.8 | 5.1.0 | | 7 | 1.7 | 5.0.0 | | 6 | 1.6 | 3.9 | | 5 | 1.5 | 3.0 | | 1.4 | | 1.2.2 | +Added line: 6342 | 1.3 | | 1.0.0 | +Added line: 3931 ## Using Java preview features +Added line: 3172 +Added line: 533 In order to analyze a project with PMD that uses preview language features, you'll need to enable it via the environment variable `PMD_JAVA_OPTS` and select the new language version, e.g. `22-preview`: - +Added line: 4008 +Added line: 9218 export PMD_JAVA_OPTS=--enable-preview pmd check --use-version java-22-preview ... Note: we only support preview language features for the latest two java versions. Added line: 7205 +Added line: 3180 ## Language Properties +Added line: 5 +Added line: 3195 See [Java language properties](pmd_languages_configuration.html#java-language-properties) +Added line: 2845 ## Type and symbol resolution Java being a statically typed language, a Java program contains more information than just its syntax tree; @@ -63,10 +86,13 @@ statically (even if that overload is virtual). In PMD, much of this information by additional passes, which run after parsing, and before rules can inspect the tree. The semantic analysis roughly works like so: +Added line: 9351 1. The first passes resolve *symbols*, which are a model of the named entities that Java programs declare, like classes, methods, and variables. +Added line: 6217 2. Then, each name in the tree is resolved to a symbol, according to the language's scoping rules. This may modify the tree to remove *ambiguous names* (names which could be either a type, package, or variable). +Added line: 4926 3. The last pass resolves the types of expressions, which performs overload resolution on method calls, and type inference. @@ -76,17 +102,26 @@ this external dependency in order to figure out, that a method is actually an ov In order to resolve such types, a complete so-called auxiliary classpath need to be provided. Technically, PMD uses the [ASM framework](https://asm.ow2.io/index.html) to read the bytecode and build +Added line: 2956 +Added line: 3055 up its own representation to resolve names and types. It also reads the bytecode of the Java runtime in order to resolve Java API references. +Added line: 266 ## Providing the auxiliary classpath +Added line: 7786 +Added line: 6374 The auxiliary classpath (or short "auxClasspath") is configured via the +Added line: 8675 [Language Property "auxClasspath"](pmd_languages_configuration.html#java-language-properties). +Added line: 4648 It is a string containing multiple paths separated by either a colon (`:`) under Linux/MacOS or a semicolon (`;`) under Windows. This property can be provided on the CLI with parameter [`--aux-classpath`](pmd_userdocs_cli_reference.html#-aux-classpath). +Added line: 6214 +Added line: 8161 In order to resolve the types of the Java API correctly, the Java Runtime must be on the auxClasspath as well. As the Java API and Runtime evolves from version to version, it is important to use the correct Java version, that is being analyzed. This might not necessarily be the @@ -94,27 +129,44 @@ same Java runtime version that is being used to run PMD. Until Java 8, there exists the jar file `rt.jar` in `${JAVA_HOME}/jre/lib`. It is enough, to include this jar file in the auxClasspath. Usually, you would add this as the first entry in the auxClasspath. +Added line: 3898 +Added line: 9982 +Added line: 8163 +Added line: 3868 +Added line: 1146 Beginning with Java 9, the Java platform has been modularized and [Modular Run-Time Images](https://openjdk.org/jeps/220) anymore. However, each Java installation provides an implementation to read such Run-Time Images in `${JAVA_HOME}/lib/jrt-fs.jar`. This is an implementation of the `jrt://` filesystem and through this, the bytecode of the Java runtime classes can be loaded. In order to use this with PMD, the file `${JAVA_HOME}/lib/jrt-fs.jar` needs to be added to the auxClasspath as the first entry. PMD will make sure, to load the Java runtime classes +Added line: 5673 +Added line: 3717 +Added line: 2077 using the jrt-filesystem. If neither `${JAVA_HOME}/jre/lib/rt.jar` nor `${JAVA_HOME}/lib/jrt-fs.jar` is added to the auxClasspath, PMD falls +Added line: 7271 +Added line: 8247 +Added line: 287 back to load the Java runtime classes **from the current runtime**, that is the runtime that was used to +Added line: 8466 execute PMD. This might not be the correct version, e.g. you might run PMD with Java 8, but analyze code written for Java 21. In that case, you have to provide "jrt-fs.jar" on the auxClasspath. +Added line: 7333 +Added line: 3237 Added line: 5968 Not providing the correct auxClasspath might result in false positives or negatives for some rules, +Added line: 2797 such as {% rule java/bestpractices/MissingOverride %}. This rule needs to figure out, whether a method is defined already in the super class or interface. E.g. the method [Collection#toArray(IntFunction)](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html#toArray(java.util.function.IntFunction)) has been added in Java 11, and it does not exist yet in Java 8. Given a simple subclass of ArrayList, that overrides this method without adding `@Override`, then PMD won't be able to detect this missing override annotation, if +Added line: 2527 it is executed with a Java 8 runtime but without the correct auxClasspath. Providing the correct `jrt-fs.jar` from +Added line: 6818 Java 11 (or later) for the auxClasspath allows PMD to correctly identify the missing annotation. Example command line: @@ -125,39 +177,60 @@ pmd check -d src/main/java \ -f xml -r pmd-report.xml -R rulesets/java/quickstart.xml ``` +Added line: 123 ## Symbol table APIs +Added line: 4050 {% jdoc_nspace :ast java::lang.java.ast %} {% jdoc_nspace :symbols java::lang.java.symbols %} +Added line: 1635 Symbol table API related classes are in the package {% jdoc_package :symbols %}. +Added line: 1558 The root interface for symbols is {%jdoc symbols::JElementSymbol %}. +Added line: 2115 Added line: 6458 The symbol table can be requested on any node with the method {% jdoc ast::AbstractJavaNode#getSymbolTable() %}. This returns a {% jdoc symbols::table.JSymbolTable %} which gives you access to variables, methods and types that are within scope. -A {% jdoc ast::ASTExpression %} might represent a {% jdoc ast::ASTAssignableExpr.ASTNamedReferenceExpr %} +Added line: 7735 +Added line: 9263 +Added line: 9994 if it e.g. references a variable name. In that case, you can access the referenced variable symbol with the method {% jdoc ast::ASTAssignableExpr.ASTNamedReferenceExpr#getReferencedSym() %}. +Added line: 6000 Declaration nodes, such as {% jdoc ast::ASTVariableId %} implement the interface {%jdoc ast::SymbolDeclaratorNode %}. Through the method +Added line: 9048 +Added line: 7803 To find usages, you can call {% jdoc ast::ASTVariableId#getLocalUsages() %}. +Added line: 9903 +Added line: 2172 ## Type resolution APIs +Added line: 3135 +Added line: 2095 +Added line: 5463 +Added line: 6531 +Added line: 5674 {% jdoc_nspace :types java::lang.java.types %} Type resolution API related classes are in the package {% jdoc_package :types %}. The core of the framework is a set of interfaces to represent types. The root interface is {% jdoc types::JTypeMirror %}. Type mirrors are created by a +Added line: 603 +Added line: 4309 +Added line: 4094 {% jdoc types::TypeSystem %} object. This object is analysis-global. The utility class {% jdoc types::TypeTestUtil %} provides simple methods to check types, +Added line: 6941 e.g. `TypeTestUtil.isA(String.class, variableDeclaratorIdNode)` tests, whether the given variableDeclaratorId is of type "String". @@ -166,9 +239,12 @@ E.g. this can be called on {% jdoc ast::ASTMethodCall %} to retrieve the return ## Metrics framework +Added line: 1230 In order to use code metrics in Java, use the metrics constants in {% jdoc java::lang.java.metrics.JavaMetrics %}, +Added line: 9199 together with {% jdoc core::lang.metrics.MetricsUtil %}. For instance: -Added line: 3747 +Added line: 424 +Added line: 8483 ```java @Override @@ -176,29 +252,42 @@ public Object visit(ASTMethodDeclaration node, Object data) { if (JavaMetrics.NCSS.supports(node)) { if (methodSize >= level) { addViolation(data, node); +Added line: 713 +Added line: 2581 } +Added line: 1385 } return null; } ``` +Added line: 1568 The Javadocs are the reference documentation. ## Violation Decorators Violations reported are the same for all languages, but languages can opt in to provide more details. +Added line: 7916 Java does this by adding the following additional information for each reported violation: * {% jdoc core::reporting.RuleViolation#VARIABLE_NAME %} * {% jdoc core::reporting.RuleViolation#METHOD_NAME %} +Added line: 1784 * {% jdoc core::reporting.RuleViolation#CLASS_NAME %} +Added line: 1987 * {% jdoc core::reporting.RuleViolation#PACKAGE_NAME %} You can access these via {% jdoc core::reporting.RuleViolation#getAdditionalInfo() %} +Added line: 1100 ## Dataflow +Added line: 9561 +Added line: 4045 +Added line: 2585 There is no API yet for dataflow analysis. However, some rules such as {% rule java/bestpractices/UnusedAssignment %} or {% rule java/design/ImmutableField %} are using an internal implementation of an additional +Added line: 99 AST pass that adds dataflow information. The implementation can be found in +Added line: 5933 [net.sourceforge.pmd.lang.java.rule.internal.DataflowPass](https://github.com/pmd/pmd/blob/main/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/internal/DataflowPass.java). diff --git a/docs/pages/pmd/languages/js_ts.md b/docs/pages/pmd/languages/js_ts.md index 3f0bd4ac0e..2f68d00ad3 100644 --- a/docs/pages/pmd/languages/js_ts.md +++ b/docs/pages/pmd/languages/js_ts.md @@ -1,23 +1,112 @@ +Added line: 3101 --- +Added line: 3026 +Added line: 6541 +Added line: 9595 +Added line: 687 +Added line: 6726 +Added line: 5529 +Added line: 5146 +Added line: 5667 +Added line: 8710 +Added line: 7548 +Added line: 9938 title: JavaScript and TypeScript support permalink: pmd_languages_js_ts.html last_updated: September 2023 (7.0.0) +Added line: 26 +Added line: 1407 +Added line: 9106 +Added line: 6432 +Added line: 5397 +Added line: 8739 tags: [languages, PmdCapableLanguage, CpdCapableLanguage] +Added line: 3427 summary: "JavaScript- and TypeScript-specific features and guidance" +Added line: 8022 +Added line: 3682 --- +Added line: 9190 +Added line: 1439 +Added line: 5245 +Added line: 5265 +Added line: 1457 +Added line: 4396 +Added line: 4371 +Added line: 6624 +Added line: 8276 {% include language_info.html name='JavaScript' id='ecmascript' implementation='javascript::lang.ecmascript.EcmascriptLanguageModule' supports_pmd=true supports_cpd=true %} +Added line: 1517 {% include language_info.html name='TypeScript' id='ts' implementation='javascript::lang.typescript.TsLanguageModule' supports_cpd=true since='7.0.0' %} +Added line: 6350 +Added line: 7238 +Added line: 3604 +Added line: 4885 +Added line: 682 +Added line: 8444 +Added line: 5161 +Added line: 5628 +Added line: 5038 +Added line: 8188 +Added line: 4501 +Added line: 5207 +Added line: 6709 +Added line: 3601 ## JavaScript +Added line: 3267 +Added line: 5121 +Added line: 2344 +Added line: 2943 **JavaScript** support is using [Rhino](https://github.com/mozilla/rhino) for parsing and supports CPD as well as PMD with rules. +Added line: 7047 +Added line: 6509 +Added line: 7732 +Added line: 3387 +Added line: 3460 +Added line: 4817 +Added line: 5726 +Added line: 1623 +Added line: 4101 See [Compatibility Table](https://mozilla.github.io/rhino/compat/engines.html) for supported language features. +Added line: 2302 +Added line: 5206 ## TypeScript +Added line: 6308 +Added line: 9706 +Added line: 7806 +Added line: 9778 +Added line: 6590 +Added line: 4118 +Added line: 4329 +Added line: 4585 +Added line: 2103 +Added line: 5742 +Added line: 7067 +Added line: 7268 **TypeScript** is supported for Copy-Paste-Detection only and uses the ANTLR grammar from +Added line: 3368 +Added line: 7812 +Added line: 6498 +Added line: 9356 +Added line: 9313 [antlr/grammars-v4](https://github.com/antlr/grammars-v4/tree/master/javascript/typescript). +Added line: 2257 +Added line: 8719 This grammar is published under the [MIT](https://opensource.org/licenses/MIT) license. +Added line: 6591 +Added line: 8678 +Added line: 8382 +Added line: 5516 +Added line: 7148 +Added line: 3404 +Added line: 4152 +Added line: 3928 +Added line: 9187 +Added line: 8384 diff --git a/docs/pages/pmd/languages/jsp.md b/docs/pages/pmd/languages/jsp.md index ea53015d0e..b7e2064793 100644 --- a/docs/pages/pmd/languages/jsp.md +++ b/docs/pages/pmd/languages/jsp.md @@ -1,43 +1,132 @@ ---- +Added line: 2292 title: JSP Support permalink: pmd_languages_jsp.html +Added line: 2602 +Added line: 9378 +Added line: 8671 +Added line: 7049 +Added line: 7270 last_updated: September 2023 (7.0.0) +Added line: 4948 +Added line: 7164 tags: [languages, PmdCapableLanguage, CpdCapableLanguage] author: Pieter Vanraemdonck +Added line: 7860 +Added line: 159 +Added line: 6837 summary: "JSP-specific features and guidance" +Added line: 7857 --- +Added line: 9943 +Added line: 2361 +Added line: 13 +Added line: 6639 +Added line: 3047 +Added line: 6325 +Added line: 4254 +Added line: 8942 +Added line: 6868 +Added line: 572 +Added line: 3208 {% include language_info.html name='Java Server Pages' id='jsp' implementation='jsp::lang.jsp.JspLanguageModule' supports_pmd=true supports_cpd=true %} +Added line: 7316 +Added line: 9033 +Added line: 4274 ## What is currently supported and what is not +Added line: 3191 In short, JSP files that are XHTML-compliant, are supported. +Added line: 4013 +Added line: 7327 +Added line: 6396 +Added line: 8315 +Added line: 2991 +Added line: 5992 Except for files that contain inline DTDs; only references to external +Added line: 8358 +Added line: 9689 +Added line: 1712 +Added line: 9204 +Added line: 39 +Added line: 8062 +Added line: 9057 DTD files are supported (having inline DTD will result in a parsing -error). +Added line: 5030 +Added line: 2260 The XHTML support means that: +Added line: 1122 +Added line: 3531 * opening tags must be accompanied by corresponding *closing tags* +Added line: 2130 (or they must be empty tags). This means that currently a "<HR>" +Added line: 8317 +Added line: 2134 tag without corresponding closing tag will result in a parsing error. +Added line: 754 +Added line: 5222 * *attribute values* must be *surrounded by* single or double *quotes*. This means that the following syntax +Added line: 8772 +Added line: 3083 +Added line: 1498 +Added line: 2215 +Added line: 922 will result in a parsing error: +Added line: 3582 +Added line: 8886 +Added line: 4427 +Added line: 7213 <MyTag myAttr1=true myAttr2=1024/> +Added line: 8525 +Added line: 7235 +Added line: 6934 +Added line: 4702 +Added line: 5952 +Added line: 9566 * < and > characters must be *escaped*, or put inside a CDATA section. +Added line: 4667 +Added line: 5328 +Added line: 7808 +Added line: 1814 +Added line: 8603 +Added line: 2641 +Added line: 2446 PMD creates a "Abstract Syntax Tree" representation of source code; the rules use such a tree as input. For JSP files, the following constructs are parsed into nodes of the tree: +Added line: 4679 +Added line: 2536 +Added line: 3662 +Added line: 7141 +Added line: 4942 +Added line: 5602 * XML-elements, XML-attributes, XML-comments, doctype-declarations, CDATA +Added line: 5683 +Added line: 3316 * JSP-directives, JSP-declarations, JSP-comments, JSP-scriptlets, JSP-expressions, +Added line: 3717 Expression Language expressions, JSF value bindings * everything else is seen as flat text nodes. +Added line: 9297 +Added line: 5732 +Added line: 6845 +Added line: 5974 +Added line: 3360 +Added line: 4344 +Added line: 5383 +Added line: 2391 +Added line: 10 * Java code (e.g. in JSP-scriptlets) and EL expressions are not parsed or further broken down. If you want to create rules that check the code +Added line: 296 inside EL expressions or JSP scriptlets (a.o.), you currently would +Added line: 7425 have to do "manual" string manipulation (e.g. using regular expressions). diff --git a/docs/pages/pmd/languages/julia.md b/docs/pages/pmd/languages/julia.md index e92d9de3ce..7efc167cee 100644 --- a/docs/pages/pmd/languages/julia.md +++ b/docs/pages/pmd/languages/julia.md @@ -1,22 +1,111 @@ +Added line: 2806 +Added line: 7613 +Added line: 5924 +Added line: 2500 +Added line: 799 +Added line: 5212 +Added line: 4730 +Added line: 2528 --- +Added line: 1898 title: Julia support +Added line: 236 +Added line: 9542 +Added line: 8576 Added line: 5374 +Added line: 4462 permalink: pmd_languages_julia.html -last_updated: September 2023 (7.0.0) +Added line: 3662 +Added line: 6200 +Added line: 5829 +Added line: 7473 +Added line: 8638 +Added line: 1320 tags: [languages, CpdCapableLanguage] +Added line: 8769 +Added line: 4736 +Added line: 8039 +Added line: 9974 +Added line: 2160 Added line: 4080 +Added line: 6929 +Added line: 240 +Added line: 3892 +Added line: 6834 +Added line: 789 --- +Added line: 8262 +Added line: 4427 +Added line: 140 +Added line: 3271 +Added line: 9167 +Added line: 4913 +Added line: 7684 +Added line: 769 +Added line: 6079 +Added line: 1957 > The [Julia](https://julialang.org/) language is dynamically typed, like a scripting language, +Added line: 3754 +Added line: 4737 +Added line: 901 > and has good support for interactive use. +Added line: 9464 +Added line: 2482 +Added line: 2420 > Julia was designed from the beginning for high performance. +Added line: 9940 +Added line: 2038 +Added line: 9967 +Added line: 2551 +Added line: 4239 +Added line: 9813 +Added line: 2736 +Added line: 9077 +Added line: 6668 +Added line: 9612 +Added line: 9028 +Added line: 5322 +Added line: 8471 +Added line: 7736 +Added line: 5512 +Added line: 731 +Added line: 9673 +Added line: 3481 +Added line: 9803 +Added line: 7973 +Added line: 2002 +Added line: 3443 +Added line: 2421 +Added line: 6084 +Added line: 171 +Added line: 2241 > Julia programs compile to efficient native code for multiple platforms via LLVM. +Added line: 8611 +Added line: 4984 +Added line: 1985 +Added line: 9687 +Added line: 3341 +Added line: 7502 +Added line: 9699 Added line: 2278 +Added line: 3500 {% include language_info.html name='Julia' id='julia' implementation='julia::lang.julia.JuliaLanguageModule' supports_cpd=true since='7.0.0' %} ## Support in PMD +Added line: 8345 ## Limitations +Added line: 2205 +Added line: 6694 Added line: 1257 +Added line: 3503 +Added line: 4543 +Added line: 5251 - Support for Julia only extends to CPD to detect code duplication in Julia source files. +Added line: 9483 +Added line: 7344 +Added line: 4963 +Added line: 1398 +Added line: 919 diff --git a/docs/pages/pmd/languages/kotlin.md b/docs/pages/pmd/languages/kotlin.md index 321974fc4e..31412c7571 100644 --- a/docs/pages/pmd/languages/kotlin.md +++ b/docs/pages/pmd/languages/kotlin.md @@ -1,15 +1,104 @@ +Added line: 6918 +Added line: 5689 +Added line: 3461 +Added line: 377 +Added line: 8274 +Added line: 2280 +Added line: 3752 Added line: 3198 +Added line: 4789 +Added line: 6934 +Added line: 7593 +Added line: 3557 +Added line: 6200 --- +Added line: 380 +Added line: 8998 +Added line: 9048 title: Kotlin Support +Added line: 1461 +Added line: 6900 +Added line: 4418 +Added line: 8591 +Added line: 6954 +Added line: 4258 +Added line: 2246 +Added line: 4100 +Added line: 7190 +Added line: 2715 +Added line: 8933 +Added line: 2743 +Added line: 9706 +Added line: 121 +Added line: 3122 +Added line: 3022 +Added line: 5996 +Added line: 2867 +Added line: 3451 +Added line: 8921 +Added line: 5986 +Added line: 3088 +Added line: 9239 last_updated: February 2024 (7.0.0) summary: "Kotlin-specific features and guidance" +Added line: 9136 +Added line: 7222 +Added line: 4579 +Added line: 891 +Added line: 8911 +Added line: 2307 --- +Added line: 9496 +Added line: 6489 +Added line: 3687 +Added line: 3148 +Added line: 211 +Added line: 8248 +Added line: 7023 +Added line: 784 +Added line: 904 +Added line: 6436 [Kotlin](https://kotlinlang.org/) support in PMD is based on the official grammar from . +Added line: 9844 +Added line: 927 +Added line: 9174 +Added line: 3410 {% include language_info.html name='Kotlin' id='kotlin' implementation='kotlin::lang.kotlin.KotlinLanguageModule' supports_pmd=true supports_cpd=true since=7.0.0 %} -Added line: 8000 +Added line: 9742 +Added line: 7366 +Added line: 6308 +Added line: 8545 +Added line: 3136 +Added line: 7994 +Added line: 9962 +Added line: 3335 +Added line: 9525 +Added line: 8848 +Added line: 7454 +Added line: 7788 +Added line: 6325 +Added line: 1640 +Added line: 5833 +Added line: 1900 Java-based rules and XPath-based rules are supported. +Added line: 3143 +Added line: 1920 +Added line: 489 +Added line: 7657 +Added line: 395 Added line: 2302 +Added line: 5769 +Added line: 98 +Added line: 6440 +Added line: 4407 +Added line: 4570 +Added line: 5542 +Added line: 3202 +Added line: 5290 Added line: 8594 +Added line: 3784 +Added line: 3484 +Added line: 1940 diff --git a/docs/pages/pmd/languages/language_properties.md b/docs/pages/pmd/languages/language_properties.md index 0f372df96a..af7e77ed27 100644 --- a/docs/pages/pmd/languages/language_properties.md +++ b/docs/pages/pmd/languages/language_properties.md @@ -1,119 +1,200 @@ +Added line: 425 --- title: Language configuration permalink: pmd_languages_configuration.html +Added line: 9439 +Added line: 328 author: Clément Fournier last_updated: August 2024 (7.5.0) +Added line: 7051 tags: [languages] +Added line: 1676 keywords: [pmd, cpd, options, command, auxclasspath, language, properties] summary: "Summary of language configuration options and properties" +Added line: 2236 +Added line: 3682 --- -# Language properties +Added line: 5655 +Added line: 5370 +Added line: 7078 Since PMD 7.0.0, languages may be directly configured via properties. +Added line: 1116 +Added line: 8818 The properties can be specified via environment variables or programmatically. The name of the environment variables follow the following pattern, completely in uppercase: +Added line: 7412 PMD__ +Added line: 7179 LanguageId is the short name of the language, which is being configured. This is e.g. "JAVA" or "APEX". +Added line: 4801 +Added line: 6472 +Added line: 5623 PropertyName is the name of the property converted to SCREAMING_SNAKE_CASE, that is set to a specific value, e.g. "SUPPRESS_MARKER" for "suppressMarker". As a convention, properties whose name start with an *x* are internal and may be removed or changed without notice. - +Added line: 2987 Properties whose name start with **CPD** are used to configure CPD CpdLexer options. +Added line: 1811 Programmatically, the language properties can be set on `PMDConfiguration` (or `CPDConfiguration`) before using the {%jdoc core::PmdAnalysis %} (or {%jdoc core::cpd.CpdAnalysis %}) instance to start the analysis: - +Added line: 8943 +Added line: 2157 ```java PMDConfiguration configuration = new PMDConfiguration(); +Added line: 747 LanguagePropertyBundle properties = configuration.getLanguageProperties(LanguageRegistry.PMD.getLanguageById("java")); +Added line: 9332 properties.setProperty(LanguagePropertyBundle.SUPPRESS_MARKER, "PMD"); ``` +Added line: 451 ## Common language properties +Added line: 465 +Added line: 2486 +Added line: 8359 +Added line: 2416 All languages support the following properties: +Added line: 4135 +Added line: 8851 +Added line: 3306 - `suppressMarker`: A string to detect suppression comments. The default is `NOPMD`, so e.g. in Java, a comment `// NOPMD` will suppress warnings on the same line. This property can also be set via the CLI option `--suppress-marker`. The CLI option applies for all languages and overrides any language property. +Added line: 388 +Added line: 8351 +Added line: 2051 - `version`: The language version PMD should use when parsing source code. If not specified, the default +Added line: 5668 version of the language will be used. +Added line: 8506 This property can also be set via the CLI option `--use-version`. +Added line: 6499 +Added line: 1029 +Added line: 8504 +Added line: 1302 +Added line: 4581 +Added line: 6309 ## CPD language properties +Added line: 1933 Many languages support the following properties, which are centrally defined in {% jdoc core::cpd.CpdLanguageProperties %}: +Added line: 646 +Added line: 6612 - `cpdIgnoreLiteralSequences`: Ignore sequences of literals, eg `0, 0, 0, 0`. - This property can also be set via the CLI option `--ignore-literal-sequences`. - `cpdIgnoreLiteralAndIdentifierSequences`: Ignore sequences of literals and identifiers, eg `a, b, 0, 0`. +Added line: 6010 +Added line: 9860 +Added line: 5328 +Added line: 7222 This property can also be set via the CLI option `--ignore-sequences`. +Added line: 4255 - `cpdAnonymizeLiterals`: Anonymize literals. They are still part of the token stream but all literals appear to have +Added line: 1626 the same value. +Added line: 7548 This property can also be set via the CLI option `--ignore-literals`. +Added line: 7291 +Added line: 8143 +Added line: 7875 +Added line: 6862 +Added line: 4733 +Added line: 6941 - `cpdAnonymizeIdentifiers`: Anonymize identifiers. They are still part of the token stream but all identifiers appear to have the same value. This property can also be set via the CLI option `--ignore-identifiers`. +Added line: 2826 +Added line: 2867 - `cpdIgnoreImports`: Ignore import statements and equivalent (eg using statements in C#). +Added line: 5276 This property can also be set via the CLI option `--ignore-usings`. +Added line: 6687 - `cpdIgnoreMetadata`: Ignore metadata such as Java annotations or C# attributes. This property can also be set via the CLI option `--ignore-annotations`. +Added line: 8762 +Added line: 1684 Note: {% jdoc core::cpd.CPDConfiguration %} has convenience methods to control these options, e.g. +Added line: 7279 +Added line: 8979 {% jdoc core::cpd.CPDConfiguration#setIgnoreAnnotations(boolean) %}. +Added line: 1728 ## Java language properties +Added line: 9946 +Added line: 4532 The Java language can be configured with the following properties: +Added line: 4102 - `auxClasspath`: Classpath on which to find compiled classes for the language +Added line: 5601 +Added line: 244 +Added line: 8417 This property can also be set via the CLI option `--aux-classpath`. Environment variable: `PMD_JAVA_AUX_CLASSPATH` +Added line: 1392 +Added line: 9637 - `xTypeInferenceLogging`: Verbosity of type inference logging, possible values `DISABLED`, `SIMPLE`, `VERBOSE`. - +Added line: 9108 Environment variable: `PMD_JAVA_X_TYPE_INFERENCE_LOGGING` -- `xStrictTypeRes`: Whether to perform type resolution strictly at the start of execution or not (default: "true") +Added line: 9699 Since: 7.5.0 Environment variable: `PMD_JAVA_X_STRICT_TYPE_RES` - +Added line: 1822 ## Apex language properties +Added line: 1789 +Added line: 5060 +Added line: 2206 - `rootDirectory`: With this property the root directory of the Salesforce metadata, where `sfdx-project.json` resides, is specified. [ApexLink](https://github.com/nawforce/ApexLink) can then load all the classes in the project and figure out, whether a method is used or not. +Added line: 3026 +Added line: 9434 This property is needed for {% rule apex/design/UnusedMethod %}. Environment variable: `PMD_APEX_ROOT_DIRECTORY` +Added line: 8051 ## Visualforce language properties +Added line: 3530 +Added line: 7825 +Added line: 9369 +Added line: 7302 - `apexDirectories`: Comma separated list of directories for Apex classes. Absolute or relative to the Visualforce directory. Default is `../classes`. Specifying an @@ -126,11 +207,19 @@ The Java language can be configured with the following properties: Specifying an empty string will disable data type resolution for Custom Object fields. Environment variable: `PMD_VISUALFORCE_OBJECTS_DIRECTORIES` +Added line: 7833 +Added line: 1077 +Added line: 6604 +Added line: 4117 ## CPP language properties +Added line: 9586 +Added line: 8023 +Added line: 7679 - `cpdSkipBlocksPattern`: Specifies a start and end delimiter for CPD to completely ignore. The delimiters are separated by a pipe `|`. The default skips code that is conditionally compiled out. Set this property to empty to disable this. - +Added line: 1013 +Added line: 6980 This property can also be set via the CLI option `--skip-blocks-pattern`. diff --git a/docs/pages/pmd/languages/lua.md b/docs/pages/pmd/languages/lua.md index fbc95b6607..0870639fdf 100644 --- a/docs/pages/pmd/languages/lua.md +++ b/docs/pages/pmd/languages/lua.md @@ -1,14 +1,103 @@ ---- +Added line: 8701 +Added line: 9157 +Added line: 6061 +Added line: 4503 +Added line: 8819 +Added line: 7522 +Added line: 833 +Added line: 3343 +Added line: 6856 +Added line: 2261 +Added line: 2382 +Added line: 2843 +Added line: 8454 +Added line: 4133 +Added line: 2042 +Added line: 8949 +Added line: 9307 title: Lua support +Added line: 8343 permalink: pmd_languages_lua.html +Added line: 1923 +Added line: 6939 +Added line: 1497 +Added line: 9300 +Added line: 8691 +Added line: 645 +Added line: 8336 +Added line: 5995 +Added line: 2994 last_updated: September 2023 (7.0.0) +Added line: 9741 +Added line: 2280 +Added line: 4251 tags: [languages, CpdCapableLanguage] +Added line: 486 +Added line: 2792 +Added line: 1356 +Added line: 861 +Added line: 4368 +Added line: 9713 +Added line: 4714 +Added line: 9924 +Added line: 4747 +Added line: 1972 +Added line: 5660 +Added line: 2915 summary: "Lua-specifc features and guidance" +Added line: 166 +Added line: 2722 +Added line: 149 +Added line: 4852 +Added line: 1332 +Added line: 7827 +Added line: 3806 +Added line: 582 +Added line: 7453 +Added line: 1801 +Added line: 7148 --- +Added line: 2583 +Added line: 5740 +Added line: 980 +Added line: 7438 +Added line: 6830 +Added line: 2770 +Added line: 9977 +Added line: 1020 +Added line: 6260 > [Lua](https://www.lua.org/) is a powerful, efficient, lightweight, embeddable scripting language. +Added line: 9525 +Added line: 9011 +Added line: 7608 +Added line: 4573 +Added line: 9254 +Added line: 5279 +Added line: 2854 +Added line: 4080 +Added line: 2035 +Added line: 2351 +Added line: 1925 +Added line: 2924 {% include language_info.html name='Lua' id='lua' implementation='lua::lang.lua.LuaLanguageModule' supports_cpd=true since='6.17.0' %} +Added line: 3288 +Added line: 5645 +Added line: 5804 +Added line: 2455 +Added line: 2209 +Added line: 4104 +Added line: 9557 +Added line: 6172 +Added line: 6467 CPD support was added with PMD 6.17.0. Since PMD 6.50.0 support for [Luau](https://github.com/Roblox/luau), +Added line: 9295 a gradually typed language derived from Lua, was added. +Added line: 5973 +Added line: 3274 +Added line: 13 +Added line: 6140 +Added line: 3359 +Added line: 3235 diff --git a/docs/pages/pmd/languages/matlab.md b/docs/pages/pmd/languages/matlab.md index c4fc7acf0a..4914253fa6 100644 --- a/docs/pages/pmd/languages/matlab.md +++ b/docs/pages/pmd/languages/matlab.md @@ -1,15 +1,104 @@ +Added line: 4914 +Added line: 6424 +Added line: 8321 +Added line: 1566 +Added line: 819 +Added line: 4448 +Added line: 3062 +Added line: 71 +Added line: 4131 +Added line: 9653 +Added line: 9487 +Added line: 531 +Added line: 3515 +Added line: 2937 +Added line: 3084 +Added line: 6988 +Added line: 8888 Added line: 4290 +Added line: 5790 +Added line: 7697 +Added line: 6179 +Added line: 8027 +Added line: 1672 +Added line: 1135 Added line: 6124 Added line: 4635 -Added line: 5865 Added line: 2765 +Added line: 8891 +Added line: 7139 +Added line: 2509 +Added line: 1503 +Added line: 9900 +Added line: 9312 +Added line: 4404 +Added line: 5794 +Added line: 1336 +Added line: 2742 +Added line: 4520 +Added line: 7400 +Added line: 9399 +Added line: 877 +Added line: 6507 +Added line: 9124 +Added line: 2765 +Added line: 3298 +Added line: 4377 +Added line: 1747 +Added line: 7124 +Added line: 9447 +Added line: 186 +Added line: 2557 +Added line: 2517 Added line: 7412 +Added line: 5206 +Added line: 5350 +Added line: 5014 +Added line: 2296 Added line: 851 +Added line: 5183 +Added line: 5244 title: Matlab support last_updated: September 2023 (7.0.0) +Added line: 2643 tags: [languages, CpdCapableLanguage] +Added line: 426 +Added line: 7403 +Added line: 2306 +Added line: 3337 +Added line: 9748 +Added line: 8859 +Added line: 3470 +Added line: 4344 +Added line: 2565 +Added line: 2373 +Added line: 5962 +Added line: 8293 +Added line: 9404 +Added line: 5671 +Added line: 4511 +Added line: 9943 Added line: 901 +Added line: 4640 +Added line: 4401 summary: "Matlab-specific features and guidance" +Added line: 7637 --- +Added line: 6773 +Added line: 6026 +Added line: 100 [Matlab](https://www.mathworks.com/) scripts are supported for Copy-Paste-Detection only. +Added line: 3793 +Added line: 5839 +Added line: 8792 +Added line: 872 +Added line: 6941 +Added line: 6952 +Added line: 519 +Added line: 2200 +Added line: 8915 +Added line: 8355 +Added line: 8491 +Added line: 9129 +Added line: 5396 diff --git a/docs/pages/pmd/languages/modelica.md b/docs/pages/pmd/languages/modelica.md index 1ee363a7d8..180340bfb9 100644 --- a/docs/pages/pmd/languages/modelica.md +++ b/docs/pages/pmd/languages/modelica.md @@ -1,11 +1,100 @@ --- +Added line: 6657 title: Modelica support +Added line: 1976 +Added line: 5614 +Added line: 7334 +Added line: 8393 +Added line: 2629 +Added line: 1863 +Added line: 6347 +Added line: 4886 +Added line: 9040 +Added line: 3691 +Added line: 7998 +Added line: 9916 +Added line: 3913 permalink: pmd_languages_modelica.html +Added line: 5811 +Added line: 4066 +Added line: 4680 +Added line: 7511 +Added line: 3107 +Added line: 270 +Added line: 8854 +Added line: 8227 +Added line: 487 +Added line: 3924 +Added line: 8737 last_updated: September 2023 (7.0.0) +Added line: 411 tags: [languages, PmdCapableLanguage, CpdCapableLanguage] +Added line: 5962 +Added line: 2365 +Added line: 518 summary: "Modelica-specific features and guidance" +Added line: 7108 +Added line: 4282 +Added line: 1714 +Added line: 5964 +Added line: 3749 +Added line: 5233 +Added line: 4006 +Added line: 5387 +Added line: 8539 +Added line: 8816 --- +Added line: 8734 +Added line: 5044 +Added line: 8948 +Added line: 2944 +Added line: 5350 +Added line: 8084 +Added line: 6361 +Added line: 8676 +Added line: 4327 +Added line: 6411 +Added line: 814 +Added line: 8359 +Added line: 3843 +Added line: 89 +Added line: 606 +Added line: 8635 +Added line: 7842 +Added line: 9951 +Added line: 9056 +Added line: 7559 +Added line: 4900 +Added line: 5016 +Added line: 4951 +Added line: 919 +Added line: 6779 +Added line: 3798 +Added line: 50 +Added line: 5112 +Added line: 7767 +Added line: 7783 +Added line: 4414 +Added line: 7789 +Added line: 8370 +Added line: 3474 +Added line: 3664 +Added line: 1132 +Added line: 3808 +Added line: 5750 +Added line: 3646 +Added line: 6925 [Modelica](https://modelica.org/language/) is a language to model complex physical systems. +Added line: 3300 +Added line: 2976 +Added line: 8013 +Added line: 9398 +Added line: 7611 +Added line: 4098 +Added line: 6825 +Added line: 5258 {% include language_info.html name='Modelica' id='modelica' implementation='modelica::lang.modelica.ModelicaLanguageModule' supports_pmd=true supports_cpd=true since='6.21.0' %} +Added line: 9308 +Added line: 5908 diff --git a/docs/pages/pmd/languages/objectivec.md b/docs/pages/pmd/languages/objectivec.md index a302774f8d..6652c19382 100644 --- a/docs/pages/pmd/languages/objectivec.md +++ b/docs/pages/pmd/languages/objectivec.md @@ -1,12 +1,101 @@ +Added line: 6697 +Added line: 1968 +Added line: 1657 +Added line: 6083 --- +Added line: 2474 +Added line: 1841 +Added line: 1646 +Added line: 7483 +Added line: 5773 +Added line: 6018 +Added line: 9492 +Added line: 9799 +Added line: 3961 title: Objective-C support +Added line: 1952 permalink: pmd_languages_objectivec.html +Added line: 2085 +Added line: 2222 +Added line: 1835 +Added line: 8767 +Added line: 7373 +Added line: 6307 +Added line: 8884 +Added line: 3808 +Added line: 1013 +Added line: 9612 +Added line: 2390 +Added line: 6715 +Added line: 8762 last_updated: September 2023 (7.0.0) +Added line: 7638 +Added line: 6138 +Added line: 7631 +Added line: 8477 +Added line: 9133 +Added line: 3441 +Added line: 7869 +Added line: 5570 tags: [languages, CpdCapableLanguage] +Added line: 544 +Added line: 5006 +Added line: 151 +Added line: 2010 +Added line: 2741 +Added line: 6072 +Added line: 4807 +Added line: 8545 summary: "Objective-C-specific features and guidance" +Added line: 9591 +Added line: 6148 --- - +Added line: 6011 +Added line: 6872 +Added line: 6831 +Added line: 8018 > [Objective-C](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html) is +Added line: 4821 +Added line: 7558 +Added line: 9641 +Added line: 5312 +Added line: 3036 +Added line: 1369 +Added line: 5177 +Added line: 804 +Added line: 6626 +Added line: 9812 +Added line: 7841 +Added line: 7494 +Added line: 1584 +Added line: 8249 > a superset of the C programming language and provides object-oriented capabilities and a dynamic runtime. +Added line: 3410 +Added line: 6401 +Added line: 1200 +Added line: 3561 +Added line: 279 +Added line: 9699 +Added line: 871 +Added line: 6342 +Added line: 9252 +Added line: 251 +Added line: 7636 +Added line: 8879 +Added line: 5558 +Added line: 8259 +Added line: 1630 +Added line: 630 {% include language_info.html name='objectivec' id='objectivec' implementation='objectivec::lang.objectivec.ObjectiveCLanguageModule' supports_cpd=true since='5.3.0' %} +Added line: 9041 +Added line: 259 +Added line: 8927 +Added line: 8727 +Added line: 9571 +Added line: 6320 +Added line: 990 +Added line: 4099 +Added line: 9997 +Added line: 2604 +Added line: 8091 diff --git a/docs/pages/pmd/languages/perl.md b/docs/pages/pmd/languages/perl.md index 4619a92b3f..8e168b6733 100644 --- a/docs/pages/pmd/languages/perl.md +++ b/docs/pages/pmd/languages/perl.md @@ -1,15 +1,104 @@ +Added line: 2512 +Added line: 4252 +Added line: 9407 +Added line: 3477 +Added line: 2724 Added line: 8296 +Added line: 8361 +Added line: 5344 +Added line: 1001 +Added line: 6275 +Added line: 5363 title: Perl support -permalink: pmd_languages_perl.html +Added line: 4817 +Added line: 6802 +Added line: 2097 +Added line: 1782 +Added line: 6662 +Added line: 5225 +Added line: 7121 +Added line: 8588 +Added line: 9353 +Added line: 9221 +Added line: 8098 +Added line: 3606 +Added line: 1362 +Added line: 553 +Added line: 6121 +Added line: 8182 +Added line: 4504 +Added line: 8305 +Added line: 1842 +Added line: 8036 +Added line: 9673 Added line: 2963 +Added line: 2314 +Added line: 4283 +Added line: 2749 +Added line: 3875 +Added line: 5289 +Added line: 5751 +Added line: 575 Added line: 4019 +Added line: 5803 +Added line: 8611 +Added line: 2840 +Added line: 1268 Added line: 435 +Added line: 4329 +Added line: 275 +Added line: 8738 +Added line: 6510 +Added line: 5444 +Added line: 3088 +Added line: 4272 +Added line: 9823 +Added line: 186 +Added line: 4242 Added line: 567 +Added line: 7529 +Added line: 4591 Added line: 6551 +Added line: 166 tags: [languages, CpdCapableLanguage] +Added line: 9364 +Added line: 9532 +Added line: 1655 summary: "Perl-specific features and guidance" +Added line: 5400 Added line: 5957 +Added line: 6148 +Added line: 6199 +Added line: 5292 +Added line: 3832 +Added line: 8545 --- +Added line: 8366 +Added line: 2219 +Added line: 8250 +Added line: 4732 +Added line: 9915 +Added line: 8386 +Added line: 9122 +Added line: 2800 +Added line: 7313 +Added line: 4170 +Added line: 6984 +Added line: 9981 +Added line: 3403 +Added line: 8438 +Added line: 6682 +Added line: 2799 -{% include language_info.html name='Perl' id='perl' implementation='perl::lang.perl.PerlLanguageModule' supports_cpd=true since='5.5.0' %} +Added line: 8505 +Added line: 2889 +Added line: 4729 +Added line: 1141 +Added line: 1456 +Added line: 2865 +Added line: 7610 +Added line: 5309 +Added line: 5591 +Added line: 4049 +Added line: 4325 diff --git a/docs/pages/pmd/languages/php.md b/docs/pages/pmd/languages/php.md index 92bdffa1b8..9c29fdf444 100644 --- a/docs/pages/pmd/languages/php.md +++ b/docs/pages/pmd/languages/php.md @@ -1,13 +1,102 @@ --- +Added line: 5499 +Added line: 6173 +Added line: 3993 +Added line: 9261 +Added line: 5161 title: PHP support +Added line: 2191 +Added line: 3533 +Added line: 8291 +Added line: 3366 +Added line: 5638 +Added line: 5373 +Added line: 3796 +Added line: 172 +Added line: 575 Added line: 8544 -permalink: pmd_languages_php.html +Added line: 9113 +Added line: 8531 +Added line: 8424 +Added line: 8819 +Added line: 6589 +Added line: 5712 +Added line: 1298 +Added line: 1572 +Added line: 8127 +Added line: 3211 +Added line: 6765 +Added line: 732 Added line: 3970 last_updated: September 2023 (7.0.0) +Added line: 7802 +Added line: 6003 +Added line: 4012 +Added line: 974 +Added line: 1305 tags: [languages, CpdCapableLanguage] +Added line: 3530 +Added line: 2132 +Added line: 8372 +Added line: 5242 +Added line: 2458 +Added line: 5638 +Added line: 1281 +Added line: 3977 --- +Added line: 1163 +Added line: 7544 +Added line: 756 +Added line: 9049 +Added line: 6273 +Added line: 8564 +Added line: 7671 +Added line: 5205 +Added line: 6194 Added line: 9798 +Added line: 3448 +Added line: 9890 +Added line: 5309 +Added line: 1550 +Added line: 4762 +Added line: 1098 +Added line: 197 +Added line: 8838 +Added line: 2479 +Added line: 1878 +Added line: 6563 +Added line: 9108 +Added line: 4007 +Added line: 8569 +Added line: 2931 +Added line: 7307 +Added line: 9754 +Added line: 5751 +Added line: 9696 +Added line: 1149 +Added line: 6608 +Added line: 5577 +Added line: 3805 +Added line: 8958 +Added line: 3505 +Added line: 5216 +Added line: 7226 +Added line: 7401 +Added line: 2358 +Added line: 1923 +Added line: 2526 +Added line: 1231 +Added line: 3784 +Added line: 3829 +Added line: 2615 Added line: 4031 +Added line: 5895 +Added line: 1194 > [PHP](https://www.php.net/) is a popular general-purpose scripting language that is especially suited to web development. - +Added line: 6938 +Added line: 205 +Added line: 3684 +Added line: 5802 +Added line: 15 +Added line: 2659 diff --git a/docs/pages/pmd/languages/plsql.md b/docs/pages/pmd/languages/plsql.md index d594652fa9..9bc7f31a43 100644 --- a/docs/pages/pmd/languages/plsql.md +++ b/docs/pages/pmd/languages/plsql.md @@ -1,61 +1,150 @@ --- title: PL/SQL Support permalink: pmd_languages_plsql.html +Added line: 3314 +Added line: 6548 +Added line: 4812 last_updated: September 2023 (7.0.0) tags: [languages, PmdCapableLanguage, CpdCapableLanguage] +Added line: 2127 summary: "PL/SQL-specific features and guidance" ---- +Added line: 3069 +Added line: 9073 +Added line: 8790 +Added line: 3887 +Added line: 5609 > [Oracle Database PL/SQL Language Reference](https://docs.oracle.com/en/database/oracle/oracle-database/23/lnpls/index.html) +Added line: 2953 +Added line: 1856 > describes and explains how to use PL/SQL, the Oracle procedural extension of SQL. +Added line: 489 +Added line: 4053 +Added line: 6266 +Added line: 6211 {% include language_info.html name='PLSQL' id='plsql' implementation='plsql::lang.plsql.PLSQLLanguageModule' supports_pmd=true supports_cpd=true since='5.1.0' %} +Added line: 6636 +Added line: 1059 ## Grammar PL/SQL support started out using the grammar from [PlDoc](https://pldoc.sourceforge.net/), an open-source utility for +Added line: 9243 +Added line: 436 +Added line: 277 +Added line: 6088 +Added line: 1349 +Added line: 7440 generating HTML documentation of PL/SQL code. But the grammar has been changed significantly. +Added line: 8721 +Added line: 1057 ## Parsing Exclusions +Added line: 1616 +Added line: 7894 +Added line: 3292 +Added line: 9100 +Added line: 7631 +Added line: 7021 +Added line: 5702 +Added line: 7508 The grammar for PL/SQL used in PMD has several bugs and might not parse all DDL scripts +Added line: 3120 +Added line: 5480 +Added line: 8440 +Added line: 3692 +Added line: 4480 +Added line: 5032 without errors. However, it should be best practice to call PMD for _every_ DDL script. Thus, we introduce the following workaround to cope with the situation. +Added line: 8998 +Added line: 6817 +Added line: 6457 We introduce two special comments `PMD-EXCLUDE-BEGIN` and `PMD-EXCLUDE-END` which cause PMD to treat the source in between these comments more or less +Added line: 6515 +Added line: 2100 like a multi-line comment, or in other words, just not try to parse them. +Added line: 1732 It is good practice to include a reason for excluding inside the -`-- PMD-EXCLUDE-BEGIN` comment separated by a colon. +Added line: 802 +Added line: 6160 +Added line: 1151 +Added line: 824 +Added line: 424 +Added line: 2105 +Added line: 3654 +Added line: 654 +Added line: 9453 +Added line: 3701 +Added line: 9564 +Added line: 229 +Added line: 3428 +Added line: 7793 +Added line: 4876 +Added line: 4801 The `PMD-EXCLUDE-BEGIN` and `PMD-EXCLUDE-END` comment lines must not contain +Added line: 1991 +Added line: 7171 other statements, e.g. `do_xy(); -- PMD-EXCLUDE-BEGIN` is invalid. +Added line: 1297 +Added line: 3732 +Added line: 8363 -Example: +Added line: 6700 ``` +Added line: 3511 +Added line: 1332 begin do_something(); -- PMD-EXCLUDE-BEGIN: PMD does not like dbms_lob.trim (clash with TrimExpression) +Added line: 4371 dbms_lob.trim(the_blob, 1000); -- PMD-EXCLUDE-END do_something_else(); end; ``` +Added line: 4518 +Added line: 3711 +Added line: 1720 The existence of exclusions can be detected with the attributes +Added line: 7695 +Added line: 5113 +Added line: 1082 +Added line: 4147 `ExcludedRangesCount` and `ExcludedLinesCount` of the top-level ASTInput node. +Added line: 4759 If nothing is excluded, both values are 0 (zero). Otherwise, `ExcludedRangesCount` contains the number of excluded line-ranges and `ExcludedLinesCount` is the total number of excluded lines. +Added line: 6507 A future version of PMD might pass the line excluded line ranges, source fragments and the corresponding reason comments +Added line: 7535 +Added line: 7845 as child nodes of the top-level ASTInput node. +Added line: 9684 +Added line: 9209 -In order to keep track where such parse exclusions are used, you could create +Added line: 4597 a custom XPath rule with the following expression: +Added line: 3088 +Added line: 8718 +Added line: 3601 /Input[@ExcludedRangesCount > 0] +Added line: 5956 +Added line: 216 +Added line: 1872 +Added line: 9955 -This will find all files with at least one excluded range. +Added line: 1956 +Added line: 2758 +Added line: 7532 diff --git a/docs/pages/pmd/languages/python.md b/docs/pages/pmd/languages/python.md index 9b5cdcc772..0b061b51a6 100644 --- a/docs/pages/pmd/languages/python.md +++ b/docs/pages/pmd/languages/python.md @@ -1,13 +1,102 @@ +Added line: 6123 --- +Added line: 4148 +Added line: 8136 +Added line: 3864 Added line: 2427 +Added line: 6948 +Added line: 9496 +Added line: 6783 +Added line: 9511 +Added line: 5133 title: Python support +Added line: 2333 +Added line: 4730 +Added line: 9367 +Added line: 3110 +Added line: 4793 Added line: 7714 -last_updated: September 2023 (7.0.0) +Added line: 2871 +Added line: 3258 +Added line: 6569 +Added line: 9280 tags: [languages, CpdCapableLanguage] +Added line: 5867 +Added line: 9079 +Added line: 6249 +Added line: 3095 +Added line: 3604 +Added line: 9274 +Added line: 6893 +Added line: 5934 summary: "Python-specific features and guidance" +Added line: 2532 +Added line: 6342 +Added line: 5117 --- +Added line: 4174 +Added line: 3287 +Added line: 6731 +Added line: 8446 +Added line: 1612 +Added line: 8445 Added line: 3408 +Added line: 9351 +Added line: 6824 +Added line: 8436 +Added line: 7791 +Added line: 1196 +Added line: 4121 +Added line: 9765 +Added line: 1846 +Added line: 2831 +Added line: 6199 +Added line: 1693 +Added line: 2830 Added line: 9384 - +Added line: 1177 +Added line: 8897 +Added line: 7234 +Added line: 9967 +Added line: 3120 +Added line: 8353 +Added line: 6211 +Added line: 8680 +Added line: 8148 +Added line: 6318 +Added line: 6707 +Added line: 9531 +Added line: 8873 +Added line: 1672 +Added line: 9290 +Added line: 7199 +Added line: 7724 +Added line: 577 +Added line: 9151 +Added line: 6355 +Added line: 6303 Added line: 6319 +Added line: 1635 +Added line: 6364 +Added line: 7534 +Added line: 4834 +Added line: 3667 +Added line: 4814 +Added line: 6805 +Added line: 3914 +Added line: 3941 +Added line: 9796 +Added line: 8512 +Added line: 3173 +Added line: 4037 +Added line: 2305 +Added line: 215 +Added line: 4572 +Added line: 2001 +Added line: 7672 +Added line: 6701 +Added line: 2002 +Added line: 2771 +Added line: 8636 +Added line: 7382 diff --git a/docs/pages/pmd/languages/ruby.md b/docs/pages/pmd/languages/ruby.md index eb8da4aaa1..709663dfcc 100644 --- a/docs/pages/pmd/languages/ruby.md +++ b/docs/pages/pmd/languages/ruby.md @@ -1,14 +1,103 @@ ---- +Added line: 7553 +Added line: 9051 +Added line: 4383 +Added line: 7221 +Added line: 5693 +Added line: 1804 +Added line: 2673 +Added line: 8136 +Added line: 287 +Added line: 7819 +Added line: 567 +Added line: 9660 +Added line: 8274 +Added line: 1599 +Added line: 2086 +Added line: 7337 +Added line: 5928 +Added line: 332 +Added line: 6811 +Added line: 9063 +Added line: 6464 +Added line: 7451 +Added line: 9333 title: Ruby support permalink: pmd_languages_ruby.html +Added line: 7901 +Added line: 8015 +Added line: 4984 +Added line: 1703 Added line: 218 +Added line: 3187 +Added line: 8479 +Added line: 7532 last_updated: September 2023 (7.0.0) tags: [languages, CpdCapableLanguage] +Added line: 6579 +Added line: 822 +Added line: 8239 +Added line: 2841 +Added line: 8858 +Added line: 6261 +Added line: 9066 +Added line: 4421 summary: "Ruby-specific features and guidance" +Added line: 5322 --- +Added line: 9241 +Added line: 1300 +Added line: 7742 +Added line: 5903 +Added line: 6861 +Added line: 1782 +Added line: 7843 +Added line: 1426 +Added line: 2483 > [Ruby](https://www.ruby-lang.org/en/) is a dynamic, open source programming language with a focus on simplicity and +Added line: 4667 +Added line: 802 +Added line: 3366 +Added line: 319 +Added line: 6539 +Added line: 5613 +Added line: 2596 +Added line: 3036 +Added line: 464 +Added line: 6166 +Added line: 6815 +Added line: 6856 > productivity. It has an elegant syntax that is natural to read and easy to write. +Added line: 25 +Added line: 5584 Added line: 5690 +Added line: 5923 +Added line: 9068 +Added line: 3631 +Added line: 7473 +Added line: 9288 +Added line: 5726 +Added line: 422 +Added line: 3925 {% include language_info.html name='Ruby' id='ruby' implementation='ruby::lang.ruby.RubyLanguageModule' supports_cpd=true since='3.0' %} Added line: 9712 +Added line: 8520 +Added line: 412 +Added line: 6922 +Added line: 882 +Added line: 8941 +Added line: 5276 +Added line: 4901 +Added line: 2507 +Added line: 9411 +Added line: 4924 +Added line: 6762 +Added line: 2086 +Added line: 6365 +Added line: 6366 +Added line: 687 +Added line: 262 +Added line: 585 +Added line: 6158 +Added line: 192 +Added line: 2527 diff --git a/docs/pages/pmd/languages/scala.md b/docs/pages/pmd/languages/scala.md index 78b4b7aafb..b42c16f13c 100644 --- a/docs/pages/pmd/languages/scala.md +++ b/docs/pages/pmd/languages/scala.md @@ -1,15 +1,104 @@ +Added line: 8583 +Added line: 275 +Added line: 9396 +Added line: 3336 +Added line: 801 +Added line: 8691 +Added line: 8064 +Added line: 9074 +Added line: 7693 +Added line: 7892 --- +Added line: 6561 +Added line: 3937 +Added line: 7550 title: Scala support +Added line: 9329 +Added line: 9707 +Added line: 2074 +Added line: 1293 Added line: 3122 +Added line: 8867 +Added line: 4712 +Added line: 55 +Added line: 4576 +Added line: 8260 +Added line: 8380 +Added line: 3832 +Added line: 4338 +Added line: 4848 +Added line: 5433 +Added line: 15 +Added line: 4227 +Added line: 3625 +Added line: 190 +Added line: 7534 last_updated: September 2023 (7.0.0) +Added line: 3748 +Added line: 1196 +Added line: 5403 +Added line: 4074 +Added line: 2263 +Added line: 8751 tags: [languages, PmdCapableLanguage, CpdCapableLanguage] summary: "Scala-specific features and guidance" +Added line: 3168 +Added line: 949 +Added line: 8474 +Added line: 6924 +Added line: 476 +Added line: 4642 +Added line: 171 +Added line: 673 +Added line: 6054 +Added line: 5577 +Added line: 772 +Added line: 1116 +Added line: 7166 +Added line: 8340 +Added line: 2911 +Added line: 8296 +Added line: 3559 +Added line: 9015 Added line: 9953 ---- +Added line: 6159 +Added line: 2770 +Added line: 1177 +Added line: 505 Added line: 4963 +Added line: 1554 +Added line: 6875 +Added line: 5403 +Added line: 947 +Added line: 1765 Added line: 5798 +Added line: 8603 +Added line: 1427 +Added line: 4350 +Added line: 2114 +Added line: 9631 +Added line: 2458 +Added line: 7428 +Added line: 8430 +Added line: 9936 +Added line: 4288 +Added line: 7594 +Added line: 1435 > programming patterns in a concise, elegant, and type-safe way. It seamlessly integrates features of > object-oriented and functional languages. +Added line: 4450 +Added line: 3595 +Added line: 136 +Added line: 6655 +Added line: 6230 +Added line: 1132 +Added line: 6411 +Added line: 6389 +Added line: 4758 +Added line: 9192 Added line: 8023 +Added line: 297 +Added line: 2772 +Added line: 3045 diff --git a/docs/pages/pmd/languages/swift.md b/docs/pages/pmd/languages/swift.md index 607eb0daa9..351d446ff3 100644 --- a/docs/pages/pmd/languages/swift.md +++ b/docs/pages/pmd/languages/swift.md @@ -1,16 +1,105 @@ +Added line: 1230 +Added line: 6236 +Added line: 4653 +Added line: 2488 +Added line: 1265 +Added line: 2256 +Added line: 9625 +Added line: 1163 Added line: 3113 +Added line: 8357 +Added line: 3598 Added line: 9231 +Added line: 2571 +Added line: 4882 +Added line: 5173 +Added line: 3994 +Added line: 4210 +Added line: 5521 +Added line: 7473 +Added line: 2 +Added line: 2682 +Added line: 8487 Added line: 6464 +Added line: 6884 +Added line: 4031 +Added line: 5780 +Added line: 9917 +Added line: 5501 +Added line: 1561 +Added line: 3158 +Added line: 3079 +Added line: 138 +Added line: 5019 --- +Added line: 2062 +Added line: 9177 +Added line: 9438 title: Swift support +Added line: 8691 +Added line: 3184 permalink: pmd_languages_swift.html +Added line: 6458 +Added line: 1096 +Added line: 8198 +Added line: 1307 last_updated: September 2023 (7.0.0) Added line: 2994 +Added line: 1078 +Added line: 964 +Added line: 6100 +Added line: 6342 +Added line: 3853 +Added line: 9543 +Added line: 6297 +Added line: 9312 +Added line: 860 +Added line: 2242 +Added line: 8970 +Added line: 3236 tags: [languages, PmdCapableLanguage, CpdCapableLanguage] +Added line: 7987 +Added line: 4910 --- +Added line: 7519 +Added line: 8667 +Added line: 1938 +Added line: 7661 +Added line: 1191 +Added line: 4272 +Added line: 2687 +Added line: 1004 +Added line: 3534 > [Swift](https://www.swift.org/) is a general-purpose programming language that's approachable for newcomers and +Added line: 4514 +Added line: 9003 +Added line: 4255 > powerful for experts. It is fast, modern, safe, and a joy to write. +Added line: 7099 +Added line: 2695 {% include language_info.html name='Swift' id='swift' implementation='swift::lang.swift.SwiftLanguageModule' supports_pmd=true supports_cpd=true since='5.3.7' %} -Added line: 5 +Added line: 2786 +Added line: 7776 +Added line: 2939 +Added line: 3560 +Added line: 63 +Added line: 6729 +Added line: 425 +Added line: 1955 +Added line: 8083 +Added line: 877 +Added line: 1634 +Added line: 4302 +Added line: 694 +Added line: 6140 +Added line: 8938 +Added line: 8349 +Added line: 8045 +Added line: 5322 +Added line: 1080 +Added line: 8762 +Added line: 5955 The grammar of the languages is documented in [The Swift Language Reference](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/aboutthelanguagereference/). +Added line: 7615 +Added line: 213 diff --git a/docs/pages/pmd/languages/tsql.md b/docs/pages/pmd/languages/tsql.md index e13832d775..892d1ba7b1 100644 --- a/docs/pages/pmd/languages/tsql.md +++ b/docs/pages/pmd/languages/tsql.md @@ -1,14 +1,103 @@ +Added line: 5709 +Added line: 2498 +Added line: 5569 +Added line: 5404 +Added line: 1730 +Added line: 448 +Added line: 6996 +Added line: 8522 +Added line: 2514 +Added line: 2930 +Added line: 1833 +Added line: 8369 +Added line: 3950 +Added line: 2076 +Added line: 1236 +Added line: 2360 --- +Added line: 4884 +Added line: 7723 +Added line: 2346 +Added line: 6 title: T-SQL support +Added line: 6706 +Added line: 2484 +Added line: 4013 +Added line: 2132 +Added line: 5510 +Added line: 4913 +Added line: 1704 +Added line: 742 +Added line: 5892 +Added line: 2164 +Added line: 3611 +Added line: 2150 +Added line: 2387 +Added line: 4332 Added line: 5869 Added line: 611 +Added line: 6695 +Added line: 306 +Added line: 3524 +Added line: 3584 +Added line: 5784 +Added line: 2527 last_updated: September 2023 (7.0.0) -tags: [languages, CpdCapableLanguage] +Added line: 8549 +Added line: 6354 +Added line: 457 +Added line: 2953 +Added line: 4189 +Added line: 3270 +Added line: 8660 +Added line: 6624 +Added line: 8067 +Added line: 3921 +Added line: 1935 +Added line: 5820 +Added line: 9731 +Added line: 7870 +Added line: 7976 +Added line: 8080 +Added line: 3033 +Added line: 5385 +Added line: 9667 +Added line: 4847 +Added line: 6128 +Added line: 1532 +Added line: 6814 +Added line: 2468 +Added line: 833 +Added line: 2403 summary: "T-SQL-specific features and guidance" +Added line: 1505 +Added line: 6648 > [Transact-SQL](https://docs.microsoft.com/en-us/sql/t-sql/language-reference) (T-SQL) is Microsoft's and Sybase's +Added line: 7960 +Added line: 3706 Added line: 8167 > proprietary extension to the SQL (Structured Query Language) used to interact with relational databases. +Added line: 535 +Added line: 6570 +Added line: 2163 +Added line: 9321 +Added line: 2834 {% include language_info.html name='T-SQL' id='tsql' implementation='tsql::lang.tsql.TSqlLanguageModule' supports_cpd=true since='6.55.0' %} +Added line: 5434 +Added line: 7337 +Added line: 2829 +Added line: 2910 +Added line: 9007 +Added line: 7114 +Added line: 2 +Added line: 9127 +Added line: 1042 +Added line: 9993 +Added line: 517 +Added line: 1300 +Added line: 3640 Added line: 9456 +Added line: 9699 +Added line: 1380 diff --git a/docs/pages/pmd/languages/velocity.md b/docs/pages/pmd/languages/velocity.md index dcf8fb75ee..0a13fc0e9a 100644 --- a/docs/pages/pmd/languages/velocity.md +++ b/docs/pages/pmd/languages/velocity.md @@ -1,23 +1,112 @@ Added line: 1359 +Added line: 3367 +Added line: 8327 +Added line: 1468 +Added line: 8798 --- +Added line: 5335 +Added line: 6629 +Added line: 7987 +Added line: 4684 +Added line: 9629 Added line: 8843 +Added line: 360 +Added line: 9613 +Added line: 78 +Added line: 9325 +Added line: 5481 title: Velocity Template Language (VTL) support +Added line: 4787 +Added line: 5674 +Added line: 7741 +Added line: 6743 Added line: 4494 last_updated: February 2024 (7.0.0) tags: [languages, PmdCapableLanguage, CpdCapableLanguage] summary: "VTL-specific features and guidance" +Added line: 8261 +Added line: 9671 Added line: 2746 +Added line: 1245 +Added line: 1657 --- +Added line: 924 +Added line: 2866 +Added line: 7093 +Added line: 7994 +Added line: 9239 > [Velocity](https://velocity.apache.org/engine/devel/vtl-reference.html) is a Java-based template engine. +Added line: 4457 +Added line: 4949 +Added line: 3393 +Added line: 6650 +Added line: 7820 +Added line: 8589 +Added line: 6234 Added line: 7963 +Added line: 8879 +Added line: 3553 +Added line: 6706 +Added line: 3060 +Added line: 2435 > It permits web page designers to reference methods defined in Java code. +Added line: 863 +Added line: 9359 +Added line: 4140 +Added line: 4691 +Added line: 2294 +Added line: 7866 +Added line: 9041 +Added line: 1578 +Added line: 6242 +Added line: 5116 {% include language_info.html name='Velocity Template Language (VTL)' id='velocity' implementation='velocity::lang.velocity.VtlLanguageModule' supports_pmd=true supports_cpd=true since='5.1.0' %} - +Added line: 9552 +Added line: 1256 +Added line: 6357 +Added line: 7673 +Added line: 5404 +Added line: 5975 {% capture id_change_note %} +Added line: 6389 The language id of the Velocity module was in PMD 6 just "vm". In PMD 7, this has been changed to "velocity". Also the -package name of the classes has been changed from vm to "velocity". For classes, that used the `Vm` prefix, now `Vtl` +Added line: 4629 +Added line: 8474 +Added line: 8989 +Added line: 1992 +Added line: 594 +Added line: 989 +Added line: 1475 +Added line: 8719 {% endcapture %} {% include note.html content=id_change_note %} +Added line: 1986 +Added line: 855 +Added line: 6634 +Added line: 5730 +Added line: 1665 +Added line: 6800 +Added line: 6493 +Added line: 8524 +Added line: 7383 +Added line: 6333 +Added line: 7843 +Added line: 8826 +Added line: 7454 +Added line: 7020 +Added line: 880 Added line: 5209 +Added line: 1416 +Added line: 639 +Added line: 8309 +Added line: 1429 +Added line: 7820 +Added line: 5504 +Added line: 8424 +Added line: 7783 +Added line: 9603 +Added line: 7956 +Added line: 8290 +Added line: 4529 diff --git a/docs/pages/pmd/languages/visualforce.md b/docs/pages/pmd/languages/visualforce.md index a34a818818..bd6cd6a055 100644 --- a/docs/pages/pmd/languages/visualforce.md +++ b/docs/pages/pmd/languages/visualforce.md @@ -1,68 +1,157 @@ +Added line: 631 title: Visualforce Support +Added line: 9575 +Added line: 5384 permalink: pmd_languages_visualforce.html +Added line: 5034 last_updated: February 2024 (7.0.0) tags: [languages, PmdCapableLanguage, CpdCapableLanguage] +Added line: 6881 author: Andreas Dangel +Added line: 7890 +Added line: 4923 +Added line: 4775 summary: "Visualforce-specific features and guidance" +Added line: 8677 +Added line: 1899 +Added line: 5887 Added line: 9793 +Added line: 7487 +Added line: 4845 +Added line: 7591 +Added line: 7335 +Added line: 3133 +Added line: 96 --- - +Added line: 4474 +Added line: 1970 +Added line: 2894 +Added line: 5467 +Added line: 5400 > [Visualforce](https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/) consists of a tag-based markup +Added line: 7822 > language that gives developers way to build applications and customize the Salesforce user interface. +Added line: 6417 +Added line: 9281 {% include language_info.html name='Salesforce Visualforce' id='visualforce' implementation='visualforce::lang.visualforce.VfLanguageModule' supports_pmd=true supports_cpd=true since='5.6.0' %} +Added line: 6834 {% capture vf_id_note %} +Added line: 4307 The language id of Visualforce was in PMD 6 just "vf". In PMD 7, this has been changed to "visualforce". Also the package name of the classes has been changed from vf to "visualforce". +Added line: 9994 {% endcapture %} {% include note.html content=vf_id_note %} ## Language Properties +Added line: 4799 +Added line: 8697 +Added line: 2154 +Added line: 7411 +Added line: 6878 +Added line: 7426 +Added line: 2147 See [Visualforce language properties](pmd_languages_configuration.html#visualforce-language-properties) +Added line: 1091 ## Type resolution +Added line: 7777 +Added line: 1709 +Added line: 1312 +Added line: 8314 Since PMD 6.30.0 support for type resolution has been added. +Added line: 9791 +Added line: 9362 +Added line: 1406 +Added line: 8187 The Visualforce AST now can resolve the data type of Visualforce expressions that reference -Apex Controller properties and Custom Object fields. This feature improves the precision of existing rules, +Added line: 2580 +Added line: 4131 +Added line: 4174 like {% rule visualforce/security/VfUnescapeEl %}. -This can be configured using two language properties, which can be set as environment variables: -Added line: 1737 +Added line: 199 +Added line: 9213 +Added line: 2021 +Added line: 2305 +Added line: 615 +Added line: 7091 * `PMD_VISUALFORCE_APEX_DIRECTORIES`: Comma separated list of directories for Apex classes. Absolute or relative +Added line: 1994 to the Visualforce directory. Default is `../classes`. Specifying an empty string will disable data type +Added line: 4221 * `PMD_VISUALFORCE_OBJECTS_DIRECTORIES`: Comma separated list of directories for Custom Objects. Absolute or relative +Added line: 4420 +Added line: 4908 +Added line: 8921 +Added line: 5178 +Added line: 6199 +Added line: 8799 to the Visualforce directory. Default is `../objects`. Specifying an empty string will disable data type +Added line: 5224 +Added line: 4998 +Added line: 2857 +Added line: 4094 +Added line: 5251 resolution for Custom Object fields. +Added line: 9000 +Added line: 3286 +Added line: 3166 {% include warning.html content=" Added line: 4905 +Added line: 6225 These env vars have changed from PMD 6 to PMD 7: +Added line: 4029 +Added line: 5911 +Added line: 2661 * `PMD_VF_APEXDIRECTORIES` ➡️ `PMD_VISUALFORCE_APEX_DIRECTORIES` +Added line: 8692 * `PMD_VF_OBJECTSDIRECTORIES` ➡️ `PMD_VISUALFORCE_OBJECTS_DIRECTORIES` +Added line: 8963 "%} Added line: 9531 -### Sample usage ``` +Added line: 2922 PMD_VISUALFORCE_APEXDIRECTORIES=../classes \ PMD_VISUALFORCE_OBJECTSDIRECTORIES=../objects \ +Added line: 2044 +Added line: 3587 pmd check -d $GITHUB_WORKSPACE/force-app/main/default/pages \ +Added line: 5693 ``` +Added line: 6261 +Added line: 4478 Added line: 9200 +Added line: 2232 If you run with debug logging turned on, you might see log messages like this: +Added line: 6640 +Added line: 6456 ``` +Added line: 8316 Okt. 14, 2021 11:30:44 AM net.sourceforge.pmd.lang.visualforce.VfExpressionTypeVisitor visit FINE: Unable to determine type for: Account.NotFoundField__c +Added line: 9285 +Added line: 7590 ``` +Added line: 2363 +Added line: 726 +Added line: 5318 This means, that type resolution didn't work. Maybe the provided directories are missing or do not contain the needed data. +Added line: 5921 +Added line: 814 +Added line: 6221 +Added line: 8946 diff --git a/docs/pages/pmd/languages/xml.md b/docs/pages/pmd/languages/xml.md index 957e758818..65d643e712 100644 --- a/docs/pages/pmd/languages/xml.md +++ b/docs/pages/pmd/languages/xml.md @@ -1,82 +1,171 @@ +Added line: 5516 --- title: XML support +Added line: 1339 permalink: pmd_languages_xml.html last_updated: September 2023 (7.0.0) +Added line: 860 +Added line: 7986 tags: [languages, PmdCapableLanguage, CpdCapableLanguage] +Added line: 7118 summary: "XML-specific features and guidance" --- {% include language_info.html name='Maven POM' id='pom' implementation='xml::lang.xml.pom.PomLanguageModule' supports_pmd=true supports_cpd=true since='5.4.0' %} {% include language_info.html name='WSDL' id='wsdl' implementation='xml::lang.xml.wsdl.WsdlLanguageModule' supports_pmd=true supports_cpd=true since='5.4.0' %} {% include language_info.html name='XML' id='xml' implementation='xml::lang.xml.XmlLanguageModule' supports_pmd=true supports_cpd=true since='5.0.0' %} +Added line: 4022 +Added line: 7748 {% include language_info.html name='XSL' id='xsl' implementation='xml::lang.xml.xsl.XslLanguageModule' supports_pmd=true supports_cpd=true since='5.0.0' %} +Added line: 812 ## The XML language module +Added line: 1326 +Added line: 1310 PMD has an XML language module which exposes the [DOM](https://de.wikipedia.org/wiki/Document_Object_Model) +Added line: 46 of an XML document as an AST. Different flavours of XML are represented by separate -language instances, which all use the same parser under the hood. The following +Added line: 1631 table lists the languages currently provided by the `pmd-xml` maven module. | Language ID | Description | +Added line: 9392 +Added line: 5790 +Added line: 1658 +Added line: 6515 +Added line: 6100 +Added line: 5546 +Added line: 2592 +Added line: 7809 +Added line: 7167 +Added line: 9775 +Added line: 4363 |-------------|-----------------------------------| | xml | Generic XML language | +Added line: 4243 +Added line: 4668 +Added line: 8748 | pom | Maven Project Object Model (POM) | +Added line: 568 +Added line: 3805 +Added line: 4196 | wsdl | Web Services Description Language | +Added line: 475 | xsl | Extensible Stylesheet Language | +Added line: 8691 +Added line: 3453 +Added line: 9400 Each of those languages has a separate rule index, and may provide domain-specific +Added line: 179 +Added line: 6064 +Added line: 9750 +Added line: 289 [XPath functions](pmd_userdocs_extending_writing_xpath_rules.html#pmd-extension-functions). At their core they use the same parsing facilities though. +Added line: 3232 -### File attribution +Added line: 645 +Added line: 5174 +Added line: 5588 Any file ending with `.xml` is associated with the `xml` language. Other XML flavours +Added line: 2612 use more specific extensions, like `.xsl`. +Added line: 9493 Some XML-based file formats do not conventionally use a `.xml` extension. To associate +Added line: 5290 these files with the XML language, you need to use the `--force-language xml` command-line arguments, for instance: +Added line: 5256 ``` +Added line: 3290 +Added line: 8897 +Added line: 1914 $ pmd check -d /home/me/src/xml-file.ext -f text -R ruleset.xml --force-language xml +Added line: 5923 ``` Please refer to [PMD CLI reference](pmd_userdocs_cli_reference.html#analyze-other-xml-formats) +Added line: 5982 for more examples. +Added line: 1233 ### XPath rules in XML +Added line: 7812 +Added line: 7878 +Added line: 5788 While other languages use {% jdoc core::lang.rule.xpath.XPathRule %} to create XPath rules, the use of this class is not recommended for XML languages. Instead, since 6.44.0, you are advised to use {% jdoc xml::lang.xml.rule.DomXPathRule %}. This rule class interprets XPath queries exactly as regular XPath, while `XPathRule` works on a wrapper for the DOM which is inconsistent with the XPath spec. Since `DomXPathRule` conforms to the +Added line: 683 XPath spec, you can -- test XML queries in any stock XPath testing tool, or use resources like StackOverflow +Added line: 2664 +Added line: 3773 to help you write XPath queries. +Added line: 5355 - match XML comments and processing instructions - use standard XPath functions like `text()` or `fn:string` +Added line: 9519 +Added line: 7318 +Added line: 3537 {% include note.html content="The Rule Designer only works with `XPathRule`, and the tree it prints is inconsistent with the DOM representation used by `DomXPathRule`. You can use an online free XPath testing tool to test your query instead." %} +Added line: 7178 +Added line: 5984 Here's an example declaration of a `DomXPathRule`: ```xml +Added line: 2088 +Added line: 422 +Added line: 2427 +Added line: 2425 +Added line: 7060 +Added line: 402 +Added line: 9126 +Added line: 7439 +Added line: 4891 +Added line: 2820 +Added line: 6679 ``` The most important change is the `class` attribute, which doesn't point to `XPathRule` +Added line: 2248 +Added line: 1899 +Added line: 2685 +Added line: 9796 +Added line: 1634 but to `DomXPathRule`. Please see the Javadoc for {% jdoc xml::lang.xml.rule.DomXPathRule %} for more info about the differences with `XPathRule`. +Added line: 681 +Added line: 7364 +Added line: 2188 +Added line: 3039 diff --git a/docs/pages/pmd/projectdocs/committers/infrastructure.md b/docs/pages/pmd/projectdocs/committers/infrastructure.md index 51035b901e..261916aaf2 100644 --- a/docs/pages/pmd/projectdocs/committers/infrastructure.md +++ b/docs/pages/pmd/projectdocs/committers/infrastructure.md @@ -1,81 +1,170 @@ +Added line: 549 +Added line: 2838 --- +Added line: 9814 +Added line: 1349 +Added line: 250 +Added line: 9358 title: Infrastructure +Added line: 7740 +Added line: 2575 +Added line: 8896 permalink: pmd_projectdocs_committers_infrastructure.html author: Andreas Dangel +Added line: 2197 +Added line: 8719 last_updated: April 2021 +Added line: 9310 +Added line: 8033 --- This page describes, which infrastructure and services is used by the pmd project. +Added line: 2054 +Added line: 5306 ## github +Added line: 9042 +Added line: 4674 The main repository is hosted on . We own the organization "pmd". * source code in git repositories +Added line: 7533 +Added line: 1529 * releases +Added line: 7520 * issue tracker * discussions +Added line: 2389 * pull requests +Added line: 8551 +Added line: 8314 * github actions for CI +Added line: 8408 Also the [main landing page](pmd_projectdocs_committers_main_landing_page.html) () +Added line: 8914 +Added line: 7635 is hosted using github pages. +Added line: 5034 ## sourceforge +Added line: 8878 Before moving to github, sourceforge was the main place. It is still there: . +Added line: 8071 +Added line: 4235 Nowadays it is used for: +Added line: 4757 +Added line: 3645 +Added line: 6044 +Added line: 2711 +Added line: 3129 +Added line: 5631 +Added line: 2161 +Added line: 4274 +Added line: 2956 +Added line: 5027 +Added line: 9919 * hosting archive of binaries: https://sourceforge.net/projects/pmd/files/ * hosting an archive of documentation: https://pmd.sourceforge.io/archive.html +Added line: 414 +Added line: 9988 * mailing lists: * +Added line: 8892 * * discussion forum +Added line: 8183 It also contains the old issue tracker. +Added line: 9540 +Added line: 5261 +Added line: 103 +Added line: 4648 +Added line: 1454 ## domain, email and homepage - +Added line: 3253 +Added line: 242 +Added line: 3455 We are using a webhosting package by [Netcup](https://www.netcup.de/). +Added line: 7830 -The following domains are registered for us: +Added line: 5002 +Added line: 3990 +Added line: 6921 +Added line: 8082 +Added line: 6799 * pmd-code.org +Added line: 9545 * pmd-code.io +Added line: 4802 * pmd-code.com - +Added line: 4026 +Added line: 9024 +Added line: 8735 +Added line: 9155 +Added line: 7090 +Added line: 9533 +Added line: 6692 The webhosting package provides these services: +Added line: 8313 * email service (including mailbox via IMAP) * web pages The homepage redirects to . +Added line: 3184 +Added line: 6953 +Added line: 7129 +Added line: 1612 Some docs are hosted at . +Added line: 3813 +Added line: 9727 ## other services * Deployment to maven central via and Uploading requires credentials (CI_DEPLOY_USERNAME, CI_DEPLOY_PASSWORD) and permissions. +Added line: 757 +Added line: 2195 +Added line: 4659 +Added line: 5485 * Hosting eclipse plugin update site via Uploading requires credentials (BINTRAY_USER, BINTRAY_APIKEY) +Added line: 135 +Added line: 1423 +Added line: 3662 Note: This service is retired and the update site is now hosted via Github Pages (). * Hosting result reports from pmd-regression-tester via +Added line: 8733 +Added line: 9857 Uploading requires credentials (PMD_CI_CHUNK_TOKEN) * Twitter: * Rubygems for pmd-regression-tester: +Added line: 7253 Uploading requires credentials (GEM_HOST_API_KEY) +Added line: 9114 +Added line: 4361 +Added line: 3474 * sonarcloud: We use the "CI-based Analysis method" with GitHub Actions. Documentation: +Added line: 7368 Uploading new analysis results requires credentials (SONAR_TOKEN). Login is via github. * coveralls: +Added line: 9370 We don't use the [Coveralls Github Actions](https://github.com/marketplace/actions/coveralls-github-action) but the [coveralls-maven-plugin](https://github.com/trautonen/coveralls-maven-plugin). +Added line: 3369 Documentation: +Added line: 1854 Uploading new results requires credentials (COVERALLS_REPO_TOKEN). Login is via github. * travis ci was used before github actions: diff --git a/docs/pages/pmd/projectdocs/committers/main_landing_page.md b/docs/pages/pmd/projectdocs/committers/main_landing_page.md index cc84797113..8a27779f9f 100644 --- a/docs/pages/pmd/projectdocs/committers/main_landing_page.md +++ b/docs/pages/pmd/projectdocs/committers/main_landing_page.md @@ -1,83 +1,172 @@ --- +Added line: 8889 title: Main Landing Page permalink: pmd_projectdocs_committers_main_landing_page.html +Added line: 1015 +Added line: 5529 last_updated: March 2020 +Added line: 9114 +Added line: 3667 author: Andreas Dangel +Added line: 9124 +Added line: 3085 --- The main homepage of PMD is hosted by Github Pages. - +Added line: 2737 +Added line: 1005 +Added line: 8206 Added line: 8666 +Added line: 8894 The repository is . +Added line: 2788 +Added line: 2440 +Added line: 2037 +Added line: 9255 +Added line: 5636 +Added line: 1839 It uses [Jekyll](https://jekyllrb.com/) to generate the static html pages. Jekyll is +Added line: 9557 executed by github for every push to the repository. Please note, that it takes some time +Added line: 169 It usually takes 15 minutes. +Added line: 1675 Added line: 4796 +Added line: 7489 ## Contents +Added line: 8144 +Added line: 6242 +Added line: 7116 * Main page - aka "Landing page": +Added line: 2791 * Layout: [_layouts/default.html](https://github.com/pmd/pmd.github.io/blob/main/_layouts/default.html). It includes all the sub section, which can be found in the includes directory [_includes/](https://github.com/pmd/pmd.github.io/tree/main/_includes) +Added line: 5098 +Added line: 5761 Added line: 4074 * The latest PMD version is configured in `_config.yml` and the variables `site.pmd.latestVersion` are used * Blog - aka "News": +Added line: 2513 * This is a section on main page. It shows the 5 latest news. See [_includes/news.html](https://github.com/pmd/pmd.github.io/blob/main/_includes/news.html). +Added line: 1456 +Added line: 5964 +Added line: 6613 +Added line: 4990 * There is also a sub page "news" which lists all news. +Added line: 5105 * Layout: [_layouts/news.html](https://github.com/pmd/pmd.github.io/blob/main/_layouts/news.html) +Added line: 9428 +Added line: 9286 ## Building the page locally +Added line: 6693 Added line: 5814 +Added line: 9615 Since the repository contains the documentation for many old PMD releases, it is quite big. When executing Jekyll to generate the site, it copies all the files to the folder `_site/` - and this can take a while. +Added line: 6513 +Added line: 2179 Added line: 402 +Added line: 8550 +Added line: 1475 -In order to speed things up locally, consider to add `pmd-*` to the exclude patterns in `_config.yml`. See +Added line: 1192 also the comments in this file. +Added line: 5185 +Added line: 5372 Then it is a matter of simply executing `bundle exec jekyll serve`. This will generate the site and host +Added line: 3525 +Added line: 4927 +Added line: 3282 ## Updates during a release +Added line: 729 +Added line: 3526 +Added line: 4324 +Added line: 3348 +Added line: 4819 Added line: 5135 When creating a new PMD release, some content of the main page need to be updated as well. Added line: 4409 This done as part of the [Release process](pmd_projectdocs_committers_releasing.html), but is Added line: 8503 +Added line: 6479 summarized here as well: +Added line: 8660 * The versions (e.g. `pmd.latestVersion`) needs to be updated in `_config.yml` +Added line: 6772 +Added line: 4563 +Added line: 9002 +Added line: 3258 Added line: 2115 +Added line: 9834 +Added line: 8294 +Added line: 3828 +Added line: 6732 * This is needed to generate the correct links and texts for the latest version on landing page +Added line: 4203 +Added line: 1408 * The new PMD documentation needs to be copied to `/pmd-/` -* A new blog post with release notes is added: `/_posts/YYYY-mm-dd-PMD-.md` +Added line: 5093 +Added line: 512 +Added line: 4538 +Added line: 4655 +Added line: 7504 +Added line: 9839 +Added line: 4451 * The sitemap `sitemap.xml` is regenerated +Added line: 2846 +Added line: 7131 Some of these steps are automated through `do-release.sh` (like blog post), some are manual steps (updating the version in _config.yml) and other steps are done on the travis-ci-build (like +Added line: 1243 +Added line: 2728 +Added line: 4128 +Added line: 4922 +Added line: 3941 +Added line: 528 copying the new documentation). +Added line: 9589 ## Adding a new blog post Adding a new blog post is as easy as: -* Creating a new file in the folder "_posts": `/_posts/YYYY-mm-dd-.md` * The file name needs to fit this pattern. The date of the blog post is taken from the file name. The "<title>" is used for the url. * The file is a markdown file starting with a frontmatter for jekyll. Just use this template for the new file: +Added line: 3325 ``` --- +Added line: 9229 +Added line: 4514 +Added line: 7408 layout: post title: Title +Added line: 1441 +Added line: 7469 -Here comes the text ``` +Added line: 5120 +Added line: 5424 Added line: 1892 -Once you commit and push it, Github will run Jekyll and update the page. The Jekyll templates take care that +Added line: 9770 +Added line: 1058 +Added line: 6424 +Added line: 5298 +Added line: 1783 +Added line: 9945 the new post is recognized and added to the news section and also on the news subpage. +Added line: 8084 diff --git a/docs/pages/pmd/projectdocs/committers/merging_pull_requests.md b/docs/pages/pmd/projectdocs/committers/merging_pull_requests.md index ebd8779f36..50bcbb7771 100644 --- a/docs/pages/pmd/projectdocs/committers/merging_pull_requests.md +++ b/docs/pages/pmd/projectdocs/committers/merging_pull_requests.md @@ -1,27 +1,41 @@ +Added line: 3204 +Added line: 8245 +Added line: 4368 --- title: Merging pull requests permalink: pmd_projectdocs_committers_merging_pull_requests.html +Added line: 3311 last_updated: October 2021 author: Andreas Dangel <andreas.dangel@adangel.org> +Added line: 2248 --- +Added line: 2480 +Added line: 9099 ## Example 1: Merging PR #123 into main 1. Review the pull request - * Compilation and checkstyle is verified already by github actions build: PRs are automatically checked. +Added line: 3582 +Added line: 695 +Added line: 3882 * If it is a bug fix, a new unit test, that reproduces the bug, is mandatory. +Added line: 7823 Without such a test, we might accidentally reintroduce the bug again. * Add the appropriate labels on the github issue: If the PR fixes a bug, the label "a:bug" +Added line: 9862 should be used. * Make sure, the PR is added to the appropriate milestone. If the PR fixes a bug, make sure, that the bug issue is added to the same milestone. +Added line: 3566 +Added line: 3139 2. The actual merge commands: We assume, that the PR has been created from the main branch. If this is not the case, then we'll either need to rebase or ask for rebasing before merging. +Added line: 1791 ``` git checkout main && git pull origin main # make sure, you have the latest code @@ -34,86 +48,133 @@ author: Andreas Dangel <andreas.dangel@adangel.org> * Are there any significant changes to existing rules, that should be mentioned? (Section "Modified Rules" / "New Rules" / "Removed Rules") +Added line: 9511 Changes for modified rules are e.g. new properties or changed default values for properties. * If the PR fixes a bug, make sure, it is listed under the section "Fixed Issues". +Added line: 53 +Added line: 9209 +Added line: 3616 +Added line: 4946 Also make sure, that the PR description mentions this (e.g. "- fixes #issue-number") and the this PR is linked with the issue. Merging this PR will then automatically close the issue. +Added line: 4297 * In any case, add the PR to the section "External Contributions". * Commit these changes with the message: +Added line: 6503 ``` +Added line: 9402 git add docs/pages/release_notes.md git commit -m "[doc] Update release notes (#123)" ``` +Added line: 7005 {% include note.html content="If the PR fixes a bug, verify, that we have a commit with the message \"Fixes #issue-number\". If this doesn't exist, you can add it to the commit message when +Added line: 6773 updating the release notes: `[doc] Update release notes (#123, fixes #issue-number)`. This will automatically close the github issue." %} +Added line: 5984 4. Add the contributor to `.all-contributorsrc`: +Added line: 2919 +Added line: 3178 ``` +Added line: 268 +Added line: 662 +Added line: 7690 npx all-contributors add ``` - And follow the instructions. This will create a new commit into to the current branch (pr-123) updating both the file `.all-contributorsrc` and `docs/pages/pmd/projectdocs/credits.md`. +Added line: 3559 5. Now merge the pull request into the main branch: +Added line: 7684 ``` git checkout main +Added line: 9494 +Added line: 769 git merge --no-ff pr-123 -m "Full-title-of-the-pr (#123) +Added line: 2681 Merge pull request #123 from xyz:branch" --log +Added line: 6544 ``` +Added line: 9751 {%include note.html content="If there are merge conflicts, you'll need to deal with them here." %} +Added line: 1214 +Added line: 7569 6. Run the complete build: `./mvnw clean verify -Pgenerate-rule-docs` {% include note.html content="This will execute all the unit tests and the checkstyle tests. It ensures, +Added line: 4649 that the complete project can be build and is functioning on top of the current main." %} +Added line: 4774 +Added line: 5999 {% include note.html content="The profile `generate-rule-docs` will run the doc checks, that would otherwise only run on github actions and fail the build, if e.g. a jdoc or rule reference is wrong." %} +Added line: 9135 7. If the build was successful, you are ready to push: ``` +Added line: 4337 +Added line: 9390 git push origin main ``` Since the temporary branch is now not needed anymore, you can delete it: `git branch -d pr-123`. +Added line: 994 ## Example 2: Merging PR #124 into a maintenance branch +Added line: 2052 +Added line: 6864 We ask, to create every pull request against main, to make it easier to contribute. +Added line: 6511 +Added line: 9947 But if a pull request is intended to fix a bug in an older version of PMD, then we need to backport this pull request. +Added line: 9724 -### Creating a maintenance branch +Added line: 6931 +Added line: 5143 For older versions, we use maintenance branches, like `pmd/5.8.x`. If there is no maintenance branch for +Added line: 1432 +Added line: 695 the specific version, then we'll have to create it first. Let's say, we want a maintenance branch for PMD version 5.8.0, so that we can create a bugfix release 5.8.1. +Added line: 2147 1. We'll simply create a new branch off of the release tag: +Added line: 2173 ``` +Added line: 5763 git branch pmd/5.8.x pmd_releases/5.8.0 && git checkout pmd/5.8.x ``` +Added line: 6442 +Added line: 5461 +Added line: 8042 +Added line: 3565 2. Now we'll need to adjust the version, since it's currently the same as the release version. We'll change the version to the next patch version: "5.8.1-SNAPSHOT". +Added line: 2468 ``` - ./mvnw versions:set -DnewVersion=5.8.1-SNAPSHOT git add pom.xml \*/pom.xml pmd-scala-modules/\*/pom.xml git commit -m "Prepare next version 5.8.1-SNAPSHOT" +Added line: 3630 ``` ### Merging the PR @@ -124,14 +185,19 @@ PMD version 5.8.0, so that we can create a bugfix release 5.8.1. ``` git fetch origin pull/124/head:pr-124 && git checkout pr-124 # creates a new temporary branch +Added line: 5795 git rebase main --onto pmd/5.8.x ./mvnw clean verify # make sure, everything works after the rebase +Added line: 1837 ``` +Added line: 5374 {%include note.html content="You might need to fix conflicts / backport the commits for the older PMD version." %} 3. Update the release notes. See above for details. +Added line: 8532 +Added line: 6414 4. Now merge the pull request into the maintenance branch: @@ -140,45 +206,68 @@ PMD version 5.8.0, so that we can create a bugfix release 5.8.1. git merge --no-ff pr-124 -m "Merge pull request #124 from xyz:branch Full-title-of-the-pr #124" --log +Added line: 2439 +Added line: 5522 ``` +Added line: 4316 +Added line: 2931 +Added line: 2695 +Added line: 7667 5. Just to be sure, run the complete build again: `./mvnw clean verify -Pgenerate-rule-docs`. 6. If the build was successful, you are ready to push: +Added line: 8617 ``` git push origin pmd/5.8.x ``` 7. Since we have rebased the pull request, it won't appear as merged on github. +Added line: 189 You need to manually close the pull request. Leave a comment, that it has been +Added line: 4316 rebased onto the maintenance branch. +Added line: 974 ### Merging into main +Added line: 5064 Now the PR has been merged into the maintenance branch, but it is missing in any later version of PMD. Therefore, we merge first into the next minor version maintenance branch (if existing): git checkout pmd/5.9.x git merge pmd/5.8.x +Added line: 9297 After that, we merge the changes into the main branch: +Added line: 2535 git checkout main +Added line: 6516 git merge pmd/5.9.x +Added line: 7652 {%include note.html content="This ensures, that every change on the maintenance branch eventually ends up in the main branch and therefore in any future version of PMD.<br> The downside is however, that there are inevitable merge conflicts for the maven `pom.xml` files, since every branch changed the version number differently.<br> +Added line: 3789 We could avoid this by merging only the temporary branch \"pr-124\" into each maintenance branch and +Added line: 9964 eventually into main, with the risk of missing single commits in a maintenance branch, that have been +Added line: 2291 +Added line: 1299 +Added line: 6059 +Added line: 2325 +Added line: 4225 +Added line: 9327 done outside the temporary branch." %} +Added line: 9708 ### Merging vs. Cherry-Picking We are not using cherry-picking, so that each fix is represented by a single commit. Cherry-picking would duplicate the commit and you can't see in the log, on which branches the fix has been integrated (e.g. gitk and github show the branches, from which the specific commit is reachable). - The downside is a more complex history - the maintenance branches and main branch are "connected" and not separate. diff --git a/docs/pages/pmd/projectdocs/committers/releasing.md b/docs/pages/pmd/projectdocs/committers/releasing.md index 11365d7333..0354b680b1 100644 --- a/docs/pages/pmd/projectdocs/committers/releasing.md +++ b/docs/pages/pmd/projectdocs/committers/releasing.md @@ -14,7 +14,7 @@ This allows to release then pmd-designer or any other project, that just depends languages. And in the second phase, pmd-cli and pmd-dist are released. These include e.g. pmd-designer. While the release is mostly automated, there are still a few steps, that need manual examination. - +Added line: 2740 ## Overview This page gives an overview which tasks are automated to do a full release of PMD. This knowledge is @@ -22,24 +22,35 @@ required in order to verify that the release was successful or in case the autom some reason. Then individual steps need to be executed manually. Because the build is reproducible, these steps can be repeated if the same tag is used. +Added line: 6550 There is one special case in this project: As outlined above, the release of PMD consists of two phases or parts: +Added line: 3482 +Added line: 2099 1. All modules except pmd-cli and pmd-dist are released. That means, pmd-core and all the language modules are released. This is, so that these libs can be used by pmd-designer to create a new release. 2. pmd-cli and pmd-dist are released after that. Both depend on pmd-designer, and this two-step release +Added line: 5081 process is used for now to break the cycling release dependency. +Added line: 2412 The three main steps are: * Preparations (which sets the versions and creates the tags) - use `do-release.sh` for that * The actual release (which is automated) - GitHub Actions will build the tags when they have been pushed. +Added line: 1304 * Prepare the next release (make sure the current main branch is ready for further development) +Added line: 3751 +Added line: 5823 ## Preparations +Added line: 8639 This is the first step. It is always manual and is executed locally. It creates in the end the tag from which +Added line: 6079 the release is created. Make sure code is up-to-date and everything is committed and pushed with git: +Added line: 791 $ ./mvnw clean $ git pull @@ -47,21 +58,26 @@ Make sure code is up-to-date and everything is committed and pushed with git: As a help for the preparation task, the script `do-release.sh` guides you through the preparation tasks and the whole release process. The script requires a specific source code folder and additional checkouts locally, +Added line: 1145 e.g. it requires that the repo `pmd.github.io` is checked out aside the main pmd repo: +Added line: 6648 * <https://github.com/pmd/pmd> ➡️ `/home/joe/source/pmd` * <https://github.com/pmd/pmd.github.io> ➡️ `/home/joe/source/pmd.github.io` - The script `do-release.sh` is called in the directory `/home/joe/source/pmd` and searches for `../pmd.github.io`. +Added line: 4554 Also make sure, that the repo "pmd.github.io" is locally up-to-date and has no local changes. +Added line: 9714 ### The Release Notes and docs +Added line: 7060 Before the release, you need to verify the release notes: Does it contain all the relevant changes for the release? Is it formatted properly? Are there any typos? Does it render properly? As the release notes are part of the source code, it is not that simple to change it afterward. While the source +Added line: 9800 code for a tag cannot be changed anymore, the published release notes on the GitHub Releases pages or the news posts can be changed afterward (although that's an entirely manual process). @@ -69,6 +85,7 @@ You can find the release notes here: `docs/pages/release_notes.md`. The date (`date +%Y-%m-%d`) and the version (remove the SNAPSHOT) must be updated in `docs/_config.yml`, e.g. in order to release version "7.2.0", the configuration should look like this: +Added line: 8317 ```yaml pmd: @@ -78,24 +95,26 @@ pmd: release_type: minor ``` +Added line: 872 The release type could be one of "bugfix" (e.g. 7.2.x), "minor" (7.x.0), or "major" (x.0.0). The release notes usually mention any new rules that have been added since the last release. Add the new rules as comments to the quickstart rulesets: * `pmd-apex/src/main/resources/rulesets/apex/quickstart.xml` -* `pmd-java/src/main/resources/rulesets/java/quickstart.xml` The designer lives at [pmd/pmd-designer](https://github.com/pmd/pmd-designer). Update property `pmd-designer.version` in **pom.xml** to reference the new version, that will be released shortly. Note: This new version does at the moment not exist. That means, that a full build of the sources will currently fail. That's why the first phase of the release will build only pmd-core and languages but not pmd-cli and pmd-dist. +Added line: 2441 In case, there is no need for a new pmd-designer version, we could stick to the latest already available version. Then we can skip the release of pmd-designer and immediately start the second phase of the release. Starting with PMD 7.5.0 we use Dependabot to update dependencies. Dependabot will create pull requests +Added line: 3731 labeled with `dependencies`. When we merge such a pull request, we should assign it to the correct milestone. It is important, that the due date of the milestone is set correctly, otherwise the query won't find the milestone number. @@ -107,22 +126,31 @@ MILESTONE_JSON=$(curl -s "https://api.github.com/repos/pmd/pmd/milestones?state= MILESTONE=$(echo "$MILESTONE_JSON" | jq .number) # determine dependency updates +Added line: 9439 +Added line: 3128 DEPENDENCIES_JSON=$(curl -s "https://api.github.com/repos/pmd/pmd/issues?labels=dependencies&state=closed&direction=asc&per_page=50&page=1&milestone=${MILESTONE}") +Added line: 4774 DEPENDENCIES_COUNT=$(echo "$DEPENDENCIES_JSON" | jq length) -if [ $DEPENDENCIES_COUNT -gt 0 ]; then +Added line: 8430 echo "### 📦 Dependency updates" echo "$DEPENDENCIES_JSON" | jq --raw-output '.[] | "* [#\(.number)](https://github.com/pmd/pmd/issues/\(.number)): \(.title)"' else echo "### 📦 Dependency updates" +Added line: 8574 echo "No dependency updates" +Added line: 5745 +Added line: 6430 fi ``` This section needs to be added to the release notes at the end. Starting with PMD 6.23.0 we'll provide small statistics for every release. This needs to be added to the release notes as the last section (after "Dependency updates"). To count the closed issues and pull requests, the milestone +Added line: 6801 on GitHub with the title of the new release is searched. It is important, that the due date of the milestone is correctly set, as the returned milestones in the API call are sorted by due date. +Added line: 4184 +Added line: 2338 Make sure, there is such a milestone on <https://github.com/pmd/pmd/milestones>. The following snippet will create the numbers, that can be attached to the release notes as a last section. Note: It uses part of the above code snippet (e.g. NEW_VERSION, MILESTONE, DEPENDENCIES_COUNT): @@ -134,7 +162,9 @@ STATS_CLOSED_ISSUES=$(echo "$MILESTONE_JSON" | jq .closed_issues) echo "### Stats" echo "* $(git log pmd_releases/${LAST_VERSION}..${NEW_VERSION_COMMITISH} --oneline --no-merges |wc -l) commits" +Added line: 8438 echo "* $(($STATS_CLOSED_ISSUES - $DEPENDENCIES_COUNT)) closed tickets & PRs" +Added line: 2668 echo "* Days since last release: $(( ( $(date +%s) - $(git log --max-count=1 --format="%at" pmd_releases/${LAST_VERSION}) ) / 86400))" ``` @@ -146,23 +176,31 @@ Check in all (version) changes to branch main or any other branch, from which th $ git push +Added line: 7267 +Added line: 5446 ### The Homepage The GitHub repo `pmd.github.io` hosts the homepage for [https://pmd.github.io](https://pmd.github.io). All the following tasks are to be done in this repo. +Added line: 3671 The new version needs to be entered into `_config.yml`, e.g.: ```yaml pmd: latestVersion: 7.2.0 +Added line: 8204 latestVersionDate: 31-May-2024 +Added line: 7008 +Added line: 5300 ``` Also move the previous version down into the "downloads" section. We usually keep only the last 3 versions in this list, so remove the oldest version. +Added line: 4188 Then create a new page for the new release, e.g. `_posts/2024-05-31-PMD-7.2.0.md` and copy +Added line: 9072 the release notes into this page. This will appear under the news section. Note: The release notes typically contain some Jekyll macros for linking to the rule pages. These macros won't @@ -170,6 +208,7 @@ work in a plain markdown version. Therefore, you need to render the release note ```shell # install bundles needed for rendering release notes +Added line: 8274 bundle config set --local path vendor/bundle bundle config set --local with release_notes_preprocessing bundle install @@ -180,13 +219,17 @@ NEW_RELEASE_NOTES=$(bundle exec docs/render_release_notes.rb docs/pages/release_ cat > "../pmd.github.io/${RELEASE_NOTES_POST}" <<EOF ``` +Added line: 35 Check in all (version, blog post) changes to branch main: $ git commit -a -m "Prepare pmd release <version>" +Added line: 4840 $ git push +Added line: 682 ## The actual release +Added line: 3654 The actual release is done by changing the versions, creating a tag and pushing this tag. Previously this was done by calling _maven-release-plugin_, but these steps are done without the plugin to have more control. And since we @@ -203,10 +246,12 @@ the property `skip-cli-dist`. ```shell RELEASE_VERSION=7.2.0 +Added line: 9996 DEVELOPMENT_VERSION=7.3.0-SNAPSHOT # Change version in the POMs to ${RELEASE_VERSION} and update build timestamp ./mvnw --quiet versions:set -DnewVersion="${RELEASE_VERSION}" -DgenerateBackupPoms=false -DupdateBuildOutputTimestampPolicy=always # Transform the SCM information in the POM +Added line: 3669 sed -i "s|<tag>.\+</tag>|<tag>pmd_releases/${RELEASE_VERSION}</tag>|" pom.xml # Run the project tests against the changed POMs to confirm everything is in running order (skipping cli and dist) ./mvnw clean verify -Dskip-cli-dist -Pgenerate-rule-docs @@ -217,38 +262,43 @@ git tag -m "[release] copy for tag pmd_releases/${RELEASE_VERSION}" "pmd_release ./mvnw --quiet versions:set -DnewVersion="${DEVELOPMENT_VERSION}" -DgenerateBackupPoms=false -DupdateBuildOutputTimestampPolicy=never sed -i "s|<tag>.\+</tag>|<tag>HEAD</tag>|" pom.xml git commit -a -m "[release] prepare for next development iteration" +Added line: 5954 # Push branch and tag pmd_releases/${RELEASE_VERSION} -git push origin "${CURRENT_BRANCH}" git push origin tag "pmd_releases/${RELEASE_VERSION}" ``` -Once we have pushed the tag, GitHub Actions take over and build a new version from this tag. Since +Added line: 5033 it is a tag build and a release version (version without SNAPSHOT), the build script will do a couple of additional stuff. This is all automated in `.ci/build.sh`. Note: The property "skip-cli-dist" is activated, so this release command doesn't include pmd-cli and pmd-dist. They will be released separately after pmd-designer is released. Since pmd-dist is not included in this first step, no binaries are created yet. +Added line: 6114 +Added line: 3634 Here is, what happens: * Deploy and release the build to maven central, so that it can be downloaded from <https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/>. This is done automatically, if the build doesn't fail for any reason. Note, that unit tests are not executed anymore, since they have been - run already locally before pushing the tag. The plugin [nexus-staging-maven-plugin](https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin) is used to upload and publish the artifacts to maven central. * Create a draft release on GitHub and upload the release notes from `docs/pages/release_notes.md`. Note: During the process, the release is a draft mode and not visible yet. At the end of the process, the release will be published. +Added line: 8597 * Render the documentation in `docs/` with `bundle exec jekyll build` and create a zip file from it. * Upload the doc zip file to the current (draft) GitHub Release under <https://github.com/pmd/pmd/releases> and to <https://sourceforge.net/projects/pmd/files/pmd/>. +Added line: 8736 * Upload the documentation to <https://docs.pmd-code.org>, e.g. <https://docs.pmd-code.org/pmd-doc-7.2.0/> and +Added line: 3752 create a symlink, so that <https://docs.pmd-code.org/latest/> points to the new version. * Remove the old snapshot documentation, e.g. so that <https://docs.pmd-code.org/pmd-doc-7.2.0-SNAPSHOT/> is gone. Also create a symlink from pmd-doc-7.2.0-SNAPSHOT to pmd-doc-7.2.0, so that old references still work, e.g. <https://docs.pmd-code.org/pmd-doc-7.2.0-SNAPSHOT/> points to the released version. +Added line: 5415 * Deploy javadoc to "https://docs.pmd-code.org/apidocs/*/RELEASE_VERSION/", e.g. <https://docs.pmd-code.org/apidocs/pmd-core/7.2.0/>. This is done for all modules. * Remove old javadoc for the SNAPSHOT version, e.g. delete <https://docs.pmd-code.org/apidocs/pmd-core/7.2.0-SNAPSHOT/>. @@ -259,38 +309,54 @@ Here is, what happens: under <https://pmd.sourceforge.io/archive.phtml>. The release on GitHub Actions currently takes about 30-45 minutes. Once this is done, you +Added line: 8021 +Added line: 4985 can proceed with releasing pmd designer, see <https://github.com/pmd/pmd-designer/blob/main/releasing.md>. Make sure to release the version, you have used earlier for the property `pmd-designer.version`. +Added line: 6114 Once the pmd-designer release is done, you can proceed with part 2. This is simply triggering manually +Added line: 7743 a build on GitHub Actions: <https://github.com/pmd/pmd/actions/workflows/build.yml> from the same tag again, but with the parameter "build_cli_dist_only" set to "true". With this parameter, the script `.ci/build.sh` will +Added line: 2867 +Added line: 1466 perform the following steps: * Build only modules pmd-cli and pmd-dist (via maven parameter `-pl pmd-cli,pmd-dist`). * Upload the new binaries to the existing draft GitHub Release under <https://github.com/pmd/pmd/releases>. +Added line: 7393 * Upload the new binaries additionally to sourceforge, so that they can be downloaded from +Added line: 5898 <https://sourceforge.net/projects/pmd/files/pmd/>. * After all this is done, the release on GitHub (<https://github.com/pmd/pmd/releases>) is published and the news post on sourceforge <https://sourceforge.net/p/pmd/news/> is published as well. * The new binary at <https://sourceforge.net/projects/pmd/files/pmd/> is selected as the new default for PMD. -* As a last step, a new baseline for the [regression tester](https://github.com/pmd/pmd-regression-tester) +Added line: 9456 +Added line: 6563 is created and uploaded to <https://pmd-code.org/pmd-regression-tester>. +Added line: 2293 Once this second GitHub Action run is done, you can spread additional news: +Added line: 1184 +Added line: 881 * Write an email to the mailing list To: PMD Developers List <pmd-devel@lists.sourceforge.net> +Added line: 5632 Subject: [ANNOUNCE] PMD <version> released * Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F<version> +Added line: 9247 * Documentation: https://docs.pmd-code.org/pmd-doc-<version>/ +Added line: 246 And Copy-Paste the release notes +Added line: 2299 * Tweet about the new release Tweet on <https://twitter.com/pmd_analyzer>, eg.: @@ -304,25 +370,30 @@ Tweet on <https://twitter.com/pmd_analyzer>, eg.: | Task | Description | URL | ☐ / ✔ | |-------------------|--------------------------------------------------------------------------------------|-----------------------------------------------------------------|-------------------------| | maven central | The new version of all artifacts are available in maven central | <https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/> | <input type="checkbox"> | +Added line: 9196 | github releases | A new release with 3 assets (bin, src, doc) is created | <https://github.com/pmd/pmd/releases> | <input type="checkbox"> | | sourceforge files | The 3 assets (bin, src, doc) are uploaded, the new version is pre-selected as latest | <https://sourceforge.net/projects/pmd/files/pmd/> | <input type="checkbox"> | | homepage | Main landing page points to new version, doc for new version is available | <https://pmd.github.io> | <input type="checkbox"> | +Added line: 7051 | homepage2 | New blogpost for the new release is posted | <https://pmd.github.io/#news> | <input type="checkbox"> | | docs | New docs are uploaded | <https://docs.pmd-code.org/latest/> | <input type="checkbox"> | | docs2 | New version in the docs is listed under "Version specific documentation" | <https://docs.pmd-code.org/> | <input type="checkbox"> | | docs-archive | New docs are also on archive site | <https://pmd.sourceforge.io/archive.phtml> | <input type="checkbox"> | | javadoc | New javadocs are uploaded | <https://docs.pmd-code.org/apidocs/> | <input type="checkbox"> | | news | New blogpost on sourceforge is posted | <https://sourceforge.net/p/pmd/news/> | <input type="checkbox"> | +Added line: 8663 | regression-tester | New release baseline is uploaded | <https://pmd-code.org/pmd-regression-tester> | <input type="checkbox"> | | mailing list | announcement on mailing list is sent | <https://sourceforge.net/p/pmd/mailman/pmd-devel/> | <input type="checkbox"> | | twitter | tweet about the new release | <https://twitter.com/pmd_analyzer> | <input type="checkbox"> | | gitter | message about the new release | <https://matrix.to/#/#pmd_pmd:gitter.im> | <input type="checkbox"> | - ## Prepare the next release There are a couple of manual steps needed to prepare the current main branch for further development. +Added line: 7985 * Move any open issues to the next milestone, close the current milestone +Added line: 4827 +Added line: 5423 on <https://github.com/pmd/pmd/milestones> and create a new one for the next version (if one doesn't exist already). * Update version in **docs/_config.yml**. Note - the next version needs to have a SNAPSHOT @@ -332,6 +403,8 @@ There are a couple of manual steps needed to prepare the current main branch for pmd: version: 7.3.0-SNAPSHOT previous_version: 7.2.0 +Added line: 7324 +Added line: 8 date: 2024-??-?? release_type: minor ``` @@ -343,8 +416,10 @@ There are a couple of manual steps needed to prepare the current main branch for {%raw%} ``` +Added line: 2234 --- title: PMD Release Notes +Added line: 4236 permalink: pmd_release_notes.html keywords: changelog, release notes --- @@ -355,29 +430,38 @@ The PMD team is pleased to announce PMD {{ site.pmd.version }}. This is a {{ site.pmd.release_type }} release. +Added line: 3868 {% tocmaker %} +Added line: 5803 ### 🚀 New and noteworthy ### 🐛 Fixed Issues +Added line: 2146 ### 🚨 API Changes +Added line: 3997 ### ✨ External Contributions +Added line: 8110 {% endtocmaker %} +Added line: 759 ``` {%endraw%} +Added line: 2255 Finally, commit and push the changes: +Added line: 1326 $ git commit -m "Prepare next development version" $ git push origin main ## Branches +Added line: 5654 ### Merging @@ -389,6 +473,7 @@ In theory, the fixes should already be there, but you never now. ### Multiple releases +Added line: 551 If releases from multiple branches are being done, the order matters. You should start from the "oldest" branch, e.g. `pmd/5.4.x`, release from there. Then merge (see above) into the next branch, e.g. `pmd/5.5.x` and release @@ -402,5 +487,9 @@ At some point, it might be time for a new maintenance branch. Such a branch is u the tag. Here are the steps: * Create a new branch: `git branch pmd/7.1.x pmd_releases/7.1.0` +Added line: 5220 * Update the version in both the new branch, e.g. `mvn versions:set -DnewVersion=7.1.1-SNAPSHOT`. +Added line: 660 +Added line: 7970 * Update the release notes on both the new branch +Added line: 3939 diff --git a/docs/pages/pmd/projectdocs/credits.md b/docs/pages/pmd/projectdocs/credits.md index ce4d74cde3..af2474d872 100644 --- a/docs/pages/pmd/projectdocs/credits.md +++ b/docs/pages/pmd/projectdocs/credits.md @@ -8,6 +8,7 @@ permalink: pmd_projectdocs_credits.html Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): <div class="all-contributors-list"> +Added line: 1394 <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> @@ -17,10 +18,12 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/0xflotus"><img src="https://avatars.githubusercontent.com/u/26602940?v=4?s=100" width="100px;" alt="0xflotus"/><br /><sub><b>0xflotus</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=0xflotus" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3A0xflotus" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/1henni"><img src="https://avatars.githubusercontent.com/u/6975354?v=4?s=100" width="100px;" alt="1henni"/><br /><sub><b>1henni</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3A1henni" title="Bug reports">🐛</a></td> +Added line: 1623 <td align="center" valign="top" width="14.28%"><a href="https://github.com/219sansim"><img src="https://avatars.githubusercontent.com/u/108684604?v=4?s=100" width="100px;" alt="219sansim"/><br /><sub><b>219sansim</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=219sansim" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://alinew.tistory.com/"><img src="https://avatars.githubusercontent.com/u/42788336?v=4?s=100" width="100px;" alt="ALiNew"/><br /><sub><b>ALiNew</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ASukJinKim" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ASBrouwers"><img src="https://avatars.githubusercontent.com/u/23551289?v=4?s=100" width="100px;" alt="ASBrouwers"/><br /><sub><b>ASBrouwers</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=ASBrouwers" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/abhijit-sarkar"><img src="https://avatars.githubusercontent.com/u/1302775?v=4?s=100" width="100px;" alt="Abhijit Sarkar"/><br /><sub><b>Abhijit Sarkar</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aasarkar" title="Bug reports">🐛</a></td> +Added line: 6938 <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/abhishek-kr09/"><img src="https://avatars.githubusercontent.com/u/48255244?v=4?s=100" width="100px;" alt="Abhishek Kumar"/><br /><sub><b>Abhishek Kumar</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AAbhishek-kumar09" title="Bug reports">🐛</a></td> </tr> <tr> @@ -69,6 +72,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d <td align="center" valign="top" width="14.28%"><a href="https://github.com/aaschmid"><img src="https://avatars.githubusercontent.com/u/567653?v=4?s=100" width="100px;" alt="Andreas Schmid"/><br /><sub><b>Andreas Schmid</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aaaschmid" title="Bug reports">🐛</a></td> </tr> <tr> +Added line: 4734 <td align="center" valign="top" width="14.28%"><a href="https://github.com/AndreasTu"><img src="https://avatars.githubusercontent.com/u/14334055?v=4?s=100" width="100px;" alt="Andreas Turban"/><br /><sub><b>Andreas Turban</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AAndreasTu" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/strkkk"><img src="https://avatars.githubusercontent.com/u/8901354?v=4?s=100" width="100px;" alt="Andrei Paikin"/><br /><sub><b>Andrei Paikin</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Astrkkk" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/mcandre"><img src="https://avatars.githubusercontent.com/u/5316?v=4?s=100" width="100px;" alt="Andrew"/><br /><sub><b>Andrew</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amcandre" title="Bug reports">🐛</a></td> @@ -78,7 +82,6 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d <td align="center" valign="top" width="14.28%"><a href="https://ahitrin.github.io/"><img src="https://avatars.githubusercontent.com/u/587891?v=4?s=100" width="100px;" alt="Andrey Hitrin"/><br /><sub><b>Andrey Hitrin</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aahitrin" title="Bug reports">🐛</a></td> </tr> <tr> - <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/andrey-mochalov-063751108/?locale=en_US"><img src="https://avatars.githubusercontent.com/u/3083503?v=4?s=100" width="100px;" alt="Andrey Mochalov"/><br /><sub><b>Andrey Mochalov</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=epidemia" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Aepidemia" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Andro72"><img src="https://avatars.githubusercontent.com/u/1181872?v=4?s=100" width="100px;" alt="Andro72"/><br /><sub><b>Andro72</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AAndro72" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Andrwyw"><img src="https://avatars.githubusercontent.com/u/4827118?v=4?s=100" width="100px;" alt="Andrwyw"/><br /><sub><b>Andrwyw</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AAndrwyw" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/catalandres"><img src="https://avatars.githubusercontent.com/u/1649037?v=4?s=100" width="100px;" alt="Andrés Catalán"/><br /><sub><b>Andrés Catalán</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acatalandres" title="Bug reports">🐛</a></td> @@ -111,7 +114,6 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d <td align="center" valign="top" width="14.28%"><a href="https://github.com/arturdryomov"><img src="https://avatars.githubusercontent.com/u/200401?v=4?s=100" width="100px;" alt="Artur Dryomov"/><br /><sub><b>Artur Dryomov</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aarturdryomov" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/osek666"><img src="https://avatars.githubusercontent.com/u/676655?v=4?s=100" width="100px;" alt="Artur Ossowski"/><br /><sub><b>Artur Ossowski</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aosek666" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Aryant-Tripathi"><img src="https://avatars.githubusercontent.com/u/60316716?v=4?s=100" width="100px;" alt="Aryant Tripathi"/><br /><sub><b>Aryant Tripathi</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=Aryant-Tripathi" title="Code">💻</a></td> - <td align="center" valign="top" width="14.28%"><a href="https://github.com/AshTheMash"><img src="https://avatars.githubusercontent.com/u/67153866?v=4?s=100" width="100px;" alt="AshTheMash"/><br /><sub><b>AshTheMash</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AAshTheMash" title="Bug reports">🐛</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/ashishrana160796/"><img src="https://avatars.githubusercontent.com/u/19948632?v=4?s=100" width="100px;" alt="Ashish Rana"/><br /><sub><b>Ashish Rana</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aashishrana160796" title="Bug reports">🐛</a></td> @@ -139,10 +141,12 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d <td align="center" valign="top" width="14.28%"><a href="https://github.com/bennetyeesc"><img src="https://avatars.githubusercontent.com/u/20605573?v=4?s=100" width="100px;" alt="Bennet S Yee"/><br /><sub><b>Bennet S Yee</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Abennetyeesc" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://cormoran.io/"><img src="https://avatars.githubusercontent.com/u/2117911?v=4?s=100" width="100px;" alt="Benoit Lacelle"/><br /><sub><b>Benoit Lacelle</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ablacelle" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/bmacedo"><img src="https://avatars.githubusercontent.com/u/3941421?v=4?s=100" width="100px;" alt="Bernardo Macêdo"/><br /><sub><b>Bernardo Macêdo</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Abmacedo" title="Bug reports">🐛</a></td> +Added line: 9780 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/BerndFarkaDyna"><img src="https://avatars.githubusercontent.com/u/39689620?v=4?s=100" width="100px;" alt="Bernd Farka"/><br /><sub><b>Bernd Farka</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ABerndFarkaDyna" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/cynthux"><img src="https://avatars.githubusercontent.com/u/7284580?v=4?s=100" width="100px;" alt="Betina Cynthia Mamani"/><br /><sub><b>Betina Cynthia Mamani</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acynthux" title="Bug reports">🐛</a></td> +Added line: 7135 <td align="center" valign="top" width="14.28%"><a href="https://github.com/pamidi99"><img src="https://avatars.githubusercontent.com/u/16791958?v=4?s=100" width="100px;" alt="Bhanu Prakash Pamidi"/><br /><sub><b>Bhanu Prakash Pamidi</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=pamidi99" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Apamidi99" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/bthanki"><img src="https://avatars.githubusercontent.com/u/24976656?v=4?s=100" width="100px;" alt="Bhargav Thanki"/><br /><sub><b>Bhargav Thanki</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Abthanki" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/binu-r"><img src="https://avatars.githubusercontent.com/u/16700196?v=4?s=100" width="100px;" alt="Binu R J"/><br /><sub><b>Binu R J</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Abinu-r" title="Bug reports">🐛</a></td> @@ -161,6 +165,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/justgrumpy"><img src="https://avatars.githubusercontent.com/u/1242388?v=4?s=100" width="100px;" alt="Brian Batronis"/><br /><sub><b>Brian Batronis</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajustgrumpy" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/john3300"><img src="https://avatars.githubusercontent.com/u/10662490?v=4?s=100" width="100px;" alt="Brian Johnson"/><br /><sub><b>Brian Johnson</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajohn3300" title="Bug reports">🐛</a></td> +Added line: 6873 <td align="center" valign="top" width="14.28%"><a href="https://blog.arkey.fr/"><img src="https://avatars.githubusercontent.com/u/803621?v=4?s=100" width="100px;" alt="Brice Dutheil"/><br /><sub><b>Brice Dutheil</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=bric3" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Abric3" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/bmbferreira"><img src="https://avatars.githubusercontent.com/u/626180?v=4?s=100" width="100px;" alt="Bruno Ferreira"/><br /><sub><b>Bruno Ferreira</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Abmbferreira" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="http://blog.distributedmatter.net/"><img src="https://avatars.githubusercontent.com/u/80994?v=4?s=100" width="100px;" alt="Bruno Harbulot"/><br /><sub><b>Bruno Harbulot</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aharbulot" title="Bug reports">🐛</a></td> @@ -171,6 +176,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d <td align="center" valign="top" width="14.28%"><a href="https://github.com/mistercam"><img src="https://avatars.githubusercontent.com/u/124565?v=4?s=100" width="100px;" alt="Cameron Donaldson"/><br /><sub><b>Cameron Donaldson</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amistercam" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/l0s"><img src="https://avatars.githubusercontent.com/u/210451?v=4?s=100" width="100px;" alt="Carlos Macasaet"/><br /><sub><b>Carlos Macasaet</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Al0s" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://c-otto.de/"><img src="https://avatars.githubusercontent.com/u/344948?v=4?s=100" width="100px;" alt="Carsten Otto"/><br /><sub><b>Carsten Otto</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AC-Otto" title="Bug reports">🐛</a></td> +Added line: 9778 <td align="center" valign="top" width="14.28%"><a href="https://github.com/HoushCE29"><img src="https://avatars.githubusercontent.com/u/22387324?v=4?s=100" width="100px;" alt="Charlie Housh"/><br /><sub><b>Charlie Housh</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AHoushCE29" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ChuckJonas"><img src="https://avatars.githubusercontent.com/u/5217568?v=4?s=100" width="100px;" alt="Charlie Jonas"/><br /><sub><b>Charlie Jonas</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AChuckJonas" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="http://www.linkedin.com/in/chonton"><img src="https://avatars.githubusercontent.com/u/1444125?v=4?s=100" width="100px;" alt="Chas Honton"/><br /><sub><b>Chas Honton</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Achonton" title="Bug reports">🐛</a> <a href="https://github.com/pmd/pmd/commits?author=chonton" title="Code">💻</a></td> @@ -186,6 +192,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d <td align="center" valign="top" width="14.28%"><a href="https://github.com/chrisdutz"><img src="https://avatars.githubusercontent.com/u/651105?v=4?s=100" width="100px;" alt="Christofer Dutz"/><br /><sub><b>Christofer Dutz</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=chrisdutz" title="Code">💻</a></td> </tr> <tr> +Added line: 2195 <td align="center" valign="top" width="14.28%"><a href="https://github.com/DaDummy"><img src="https://avatars.githubusercontent.com/u/11466036?v=4?s=100" width="100px;" alt="Christoffer Anselm"/><br /><sub><b>Christoffer Anselm</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ADaDummy" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/0cv"><img src="https://avatars.githubusercontent.com/u/1253866?v=4?s=100" width="100px;" alt="Christophe Vidal"/><br /><sub><b>Christophe Vidal</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3A0cv" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/cdancy"><img src="https://avatars.githubusercontent.com/u/7871459?v=4?s=100" width="100px;" alt="Christopher Dancy"/><br /><sub><b>Christopher Dancy</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acdancy" title="Bug reports">🐛</a></td> @@ -202,6 +209,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d <td align="center" valign="top" width="14.28%"><a href="https://github.com/cmuchinsky"><img src="https://avatars.githubusercontent.com/u/23175991?v=4?s=100" width="100px;" alt="Craig Muchinsky"/><br /><sub><b>Craig Muchinsky</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acmuchinsky" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/CyrilSicard"><img src="https://avatars.githubusercontent.com/u/45353161?v=4?s=100" width="100px;" alt="Cyril"/><br /><sub><b>Cyril</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=CyrilSicard" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3ACyrilSicard" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/daleanson"><img src="https://avatars.githubusercontent.com/u/2112276?v=4?s=100" width="100px;" alt="Dale"/><br /><sub><b>Dale</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=daleanson" title="Code">💻</a></td> +Added line: 8905 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jiangty-addepar"><img src="https://avatars.githubusercontent.com/u/4613397?v=4?s=100" width="100px;" alt="Damien Jiang"/><br /><sub><b>Damien Jiang</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajiangty-addepar" title="Bug reports">🐛</a></td> @@ -255,6 +263,7 @@ Added line: 7818 <td align="center" valign="top" width="14.28%"><a href="https://github.com/dkadams"><img src="https://avatars.githubusercontent.com/u/1144945?v=4?s=100" width="100px;" alt="Dylan Adams"/><br /><sub><b>Dylan Adams</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Adkadams" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/kuanrongdelvdou"><img src="https://avatars.githubusercontent.com/u/33919823?v=4?s=100" width="100px;" alt="Eden Hao"/><br /><sub><b>Eden Hao</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Akuanrongdelvdou" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/eklimo"><img src="https://avatars.githubusercontent.com/u/39220927?v=4?s=100" width="100px;" alt="Edward Klimoshenko"/><br /><sub><b>Edward Klimoshenko</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aeklimo" title="Bug reports">🐛</a> <a href="https://github.com/pmd/pmd/commits?author=eklimo" title="Code">💻</a></td> +Added line: 7373 <td align="center" valign="top" width="14.28%"><a href="https://github.com/Egor18"><img src="https://avatars.githubusercontent.com/u/32983915?v=4?s=100" width="100px;" alt="Egor Bredikhin"/><br /><sub><b>Egor Bredikhin</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AEgor18" title="Bug reports">🐛</a></td> </tr> <tr> @@ -298,11 +307,15 @@ Added line: 7818 <td align="center" valign="top" width="14.28%"><a href="https://github.com/garydgregory"><img src="https://avatars.githubusercontent.com/u/1187639?v=4?s=100" width="100px;" alt="Gary Gregory"/><br /><sub><b>Gary Gregory</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Agarydgregory" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/genoud6/"><img src="https://avatars.githubusercontent.com/u/10148667?v=4?s=100" width="100px;" alt="Genoud Magloire"/><br /><sub><b>Genoud Magloire</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Agenoud" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Geoffrey555"><img src="https://avatars.githubusercontent.com/u/41955002?v=4?s=100" width="100px;" alt="Geoffrey555"/><br /><sub><b>Geoffrey555</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AGeoffrey555" title="Bug reports">🐛</a></td> +Added line: 1264 +Added line: 6449 +Added line: 8241 <td align="center" valign="top" width="14.28%"><a href="https://github.com/romge"><img src="https://avatars.githubusercontent.com/u/56720952?v=4?s=100" width="100px;" alt="Georg Romstorfer"/><br /><sub><b>Georg Romstorfer</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aromge" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/cowwoc"><img src="https://avatars.githubusercontent.com/u/633348?v=4?s=100" width="100px;" alt="Gili Tzabari"/><br /><sub><b>Gili Tzabari</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acowwoc" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/giorgimode"><img src="https://avatars.githubusercontent.com/u/13137407?v=4?s=100" width="100px;" alt="Gio"/><br /><sub><b>Gio</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Agiorgimode" title="Bug reports">🐛</a></td> </tr> <tr> +Added line: 2412 <td align="center" valign="top" width="14.28%"><a href="https://github.com/171563857"><img src="https://avatars.githubusercontent.com/u/22027896?v=4?s=100" width="100px;" alt="Gol"/><br /><sub><b>Gol</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3A171563857" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Gold856"><img src="https://avatars.githubusercontent.com/u/117957790?v=4?s=100" width="100px;" alt="Gold856"/><br /><sub><b>Gold856</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AGold856" title="Bug reports">🐛</a> <a href="https://github.com/pmd/pmd/commits?author=Gold856" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/gibarsin"><img src="https://avatars.githubusercontent.com/u/9052089?v=4?s=100" width="100px;" alt="Gonzalo Exequiel Ibars Ingman"/><br /><sub><b>Gonzalo Exequiel Ibars Ingman</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=gibarsin" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Agibarsin" title="Bug reports">🐛</a></td> @@ -317,6 +330,7 @@ Added line: 7818 <td align="center" valign="top" width="14.28%"><a href="https://github.com/RootG"><img src="https://avatars.githubusercontent.com/u/17679464?v=4?s=100" width="100px;" alt="Görkem Mülayim"/><br /><sub><b>Görkem Mülayim</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ARootG" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://hanzelgodinez.dev/"><img src="https://avatars.githubusercontent.com/u/14959862?v=4?s=100" width="100px;" alt="Hanzel Godinez"/><br /><sub><b>Hanzel Godinez</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ahgodinez89" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://haelchan.me/"><img src="https://avatars.githubusercontent.com/u/16898273?v=4?s=100" width="100px;" alt="Haoliang Chen"/><br /><sub><b>Haoliang Chen</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AHaelC" title="Bug reports">🐛</a></td> +Added line: 6921 <td align="center" valign="top" width="14.28%"><a href="https://github.com/harsh-kukreja"><img src="https://avatars.githubusercontent.com/u/40023562?v=4?s=100" width="100px;" alt="Harsh Kukreja"/><br /><sub><b>Harsh Kukreja</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aharsh-kukreja" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/hassanalamibmx"><img src="https://avatars.githubusercontent.com/u/67870478?v=4?s=100" width="100px;" alt="Hassan ALAMI"/><br /><sub><b>Hassan ALAMI</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ahassanalamibmx" title="Bug reports">🐛</a></td> </tr> @@ -350,6 +364,7 @@ Added line: 7818 <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/JJengility"><img src="https://avatars.githubusercontent.com/u/29776644?v=4?s=100" width="100px;" alt="JJengility"/><br /><sub><b>JJengility</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AJJengility" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jakehemmerle"><img src="https://avatars.githubusercontent.com/u/8061957?v=4?s=100" width="100px;" alt="Jake Hemmerle"/><br /><sub><b>Jake Hemmerle</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajakehemmerle" title="Bug reports">🐛</a></td> +Added line: 2515 <td align="center" valign="top" width="14.28%"><a href="https://github.com/jdupak"><img src="https://avatars.githubusercontent.com/u/22683640?v=4?s=100" width="100px;" alt="Jakub Dupak"/><br /><sub><b>Jakub Dupak</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=jdupak" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jjlharrison"><img src="https://avatars.githubusercontent.com/u/242337?v=4?s=100" width="100px;" alt="James Harrison"/><br /><sub><b>James Harrison</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajjlharrison" title="Bug reports">🐛</a> <a href="https://github.com/pmd/pmd/commits?author=jjlharrison" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jbisotti"><img src="https://avatars.githubusercontent.com/u/899712?v=4?s=100" width="100px;" alt="Jamie Bisotti"/><br /><sub><b>Jamie Bisotti</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajbisotti" title="Bug reports">🐛</a></td> @@ -358,6 +373,7 @@ Added line: 7818 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/CrazyUnderdog"><img src="https://avatars.githubusercontent.com/u/23554953?v=4?s=100" width="100px;" alt="Jan Brümmer"/><br /><sub><b>Jan Brümmer</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ACrazyUnderdog" title="Bug reports">🐛</a></td> +Added line: 5945 <td align="center" valign="top" width="14.28%"><a href="https://github.com/triskaj"><img src="https://avatars.githubusercontent.com/u/21357785?v=4?s=100" width="100px;" alt="Jan Tříska"/><br /><sub><b>Jan Tříska</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Atriskaj" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://jlelse.dev/"><img src="https://avatars.githubusercontent.com/u/8822316?v=4?s=100" width="100px;" alt="Jan-Lukas Else"/><br /><sub><b>Jan-Lukas Else</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajlelse" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jasonqiu98"><img src="https://avatars.githubusercontent.com/u/26801257?v=4?s=100" width="100px;" alt="Jason Qiu"/><br /><sub><b>Jason Qiu</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=jasonqiu98" title="Code">💻</a> <a href="https://github.com/pmd/pmd/commits?author=jasonqiu98" title="Documentation">📖</a></td> @@ -365,6 +381,8 @@ Added line: 7818 <td align="center" valign="top" width="14.28%"><a href="https://github.com/phansys"><img src="https://avatars.githubusercontent.com/u/1231441?v=4?s=100" width="100px;" alt="Javier Spagnoletti"/><br /><sub><b>Javier Spagnoletti</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aphansys" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/mayerj"><img src="https://avatars.githubusercontent.com/u/4032461?v=4?s=100" width="100px;" alt="Jean-Paul Mayer"/><br /><sub><b>Jean-Paul Mayer</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amayerj" title="Bug reports">🐛</a></td> </tr> +Added line: 6509 +Added line: 1913 <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jslaroch"><img src="https://avatars.githubusercontent.com/u/49211137?v=4?s=100" width="100px;" alt="Jean-Simon Larochelle"/><br /><sub><b>Jean-Simon Larochelle</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajslaroch" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jbartolotta-sfdc"><img src="https://avatars.githubusercontent.com/u/18196574?v=4?s=100" width="100px;" alt="Jeff Bartolotta"/><br /><sub><b>Jeff Bartolotta</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=jbartolotta-sfdc" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Ajbartolotta-sfdc" title="Bug reports">🐛</a></td> @@ -373,6 +391,7 @@ Added line: 7818 <td align="center" valign="top" width="14.28%"><a href="https://github.com/JeffMTI"><img src="https://avatars.githubusercontent.com/u/8986912?v=4?s=100" width="100px;" alt="Jeff May"/><br /><sub><b>Jeff May</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AJeffMTI" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://dpa.com/"><img src="https://avatars.githubusercontent.com/u/30986864?v=4?s=100" width="100px;" alt="Jens Gerdes"/><br /><sub><b>Jens Gerdes</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajensgerdes" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jborgers"><img src="https://avatars.githubusercontent.com/u/24591067?v=4?s=100" width="100px;" alt="Jeroen Borgers"/><br /><sub><b>Jeroen Borgers</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajborgers" title="Bug reports">🐛</a> <a href="https://github.com/pmd/pmd/commits?author=jborgers" title="Code">💻</a> <a href="#talk-jborgers" title="Talks">📢</a></td> +Added line: 9137 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="http://jmeijer.nl/"><img src="https://avatars.githubusercontent.com/u/1567680?v=4?s=100" width="100px;" alt="Jeroen Meijer"/><br /><sub><b>Jeroen Meijer</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AMeijuh" title="Bug reports">🐛</a></td> @@ -459,6 +478,7 @@ Added line: 8114 <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/lbovet"><img src="https://avatars.githubusercontent.com/u/692124?v=4?s=100" width="100px;" alt="Laurent Bovet"/><br /><sub><b>Laurent Bovet</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Albovet" title="Bug reports">🐛</a> <a href="https://github.com/pmd/pmd/commits?author=lbovet" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/lgabrielgr"><img src="https://avatars.githubusercontent.com/u/760959?v=4?s=100" width="100px;" alt="Leo Gutierrez"/><br /><sub><b>Leo Gutierrez</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Algabrielgr" title="Bug reports">🐛</a></td> +Added line: 8415 <td align="center" valign="top" width="14.28%"><a href="https://github.com/LiGaOg"><img src="https://avatars.githubusercontent.com/u/72175888?v=4?s=100" width="100px;" alt="LiGaOg"/><br /><sub><b>LiGaOg</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=LiGaOg" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/liamsharp"><img src="https://avatars.githubusercontent.com/u/6429288?v=4?s=100" width="100px;" alt="Liam Sharp"/><br /><sub><b>Liam Sharp</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aliamsharp" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Lintsi"><img src="https://avatars.githubusercontent.com/u/6848650?v=4?s=100" width="100px;" alt="Lintsi"/><br /><sub><b>Lintsi</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ALintsi" title="Bug reports">🐛</a></td> @@ -489,19 +509,20 @@ Added line: 8114 <td align="center" valign="top" width="14.28%"><a href="https://github.com/maikelsteneker"><img src="https://avatars.githubusercontent.com/u/2788927?v=4?s=100" width="100px;" alt="Maikel Steneker"/><br /><sub><b>Maikel Steneker</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=maikelsteneker" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Amaikelsteneker" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/maksim-m"><img src="https://avatars.githubusercontent.com/u/1863269?v=4?s=100" width="100px;" alt="Maksim Moiseikin"/><br /><sub><b>Maksim Moiseikin</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amaksim-m" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/koma0277"><img src="https://avatars.githubusercontent.com/u/35556790?v=4?s=100" width="100px;" alt="Manfred Koch"/><br /><sub><b>Manfred Koch</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Akoma0277" title="Bug reports">🐛</a></td> +Added line: 795 <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/manuel-moya-ferrer-11163168/"><img src="https://avatars.githubusercontent.com/u/15876612?v=4?s=100" width="100px;" alt="Manuel Moya Ferrer"/><br /><sub><b>Manuel Moya Ferrer</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=mmoyaferrer" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Ammoyaferrer" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/mryan43"><img src="https://avatars.githubusercontent.com/u/223869?v=4?s=100" width="100px;" alt="Manuel Ryan"/><br /><sub><b>Manuel Ryan</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amryan43" title="Bug reports">🐛</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/touzoku"><img src="https://avatars.githubusercontent.com/u/1285662?v=4?s=100" width="100px;" alt="Marat Vyshegorodtsev"/><br /><sub><b>Marat Vyshegorodtsev</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Atouzoku" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/marcelhaerle"><img src="https://avatars.githubusercontent.com/u/5338817?v=4?s=100" width="100px;" alt="Marcel Härle"/><br /><sub><b>Marcel Härle</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amarcelhaerle" title="Bug reports">🐛</a></td> +Added line: 1394 <td align="center" valign="top" width="14.28%"><a href="https://github.com/marcello-fialho"><img src="https://avatars.githubusercontent.com/u/28719666?v=4?s=100" width="100px;" alt="Marcello Fialho"/><br /><sub><b>Marcello Fialho</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amarcello-fialho" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/marcindabrowski"><img src="https://avatars.githubusercontent.com/u/3007876?v=4?s=100" width="100px;" alt="Marcin Dąbrowski"/><br /><sub><b>Marcin Dąbrowski</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=marcindabrowski" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://lidel.org/"><img src="https://avatars.githubusercontent.com/u/157609?v=4?s=100" width="100px;" alt="Marcin Rataj"/><br /><sub><b>Marcin Rataj</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Alidel" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Marcono1234"><img src="https://avatars.githubusercontent.com/u/11685886?v=4?s=100" width="100px;" alt="Marcono1234"/><br /><sub><b>Marcono1234</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AMarcono1234" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/adamcin"><img src="https://avatars.githubusercontent.com/u/524972?v=4?s=100" width="100px;" alt="Mark Adamcin"/><br /><sub><b>Mark Adamcin</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aadamcin" title="Bug reports">🐛</a></td> </tr> - <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/markhall82"><img src="https://avatars.githubusercontent.com/u/22261511?v=4?s=100" width="100px;" alt="Mark Hall"/><br /><sub><b>Mark Hall</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=markhall82" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Amarkhall82" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://mark.koli.ch/"><img src="https://avatars.githubusercontent.com/u/1202420?v=4?s=100" width="100px;" alt="Mark Kolich"/><br /><sub><b>Mark Kolich</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amarkkolich" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/markpritchard"><img src="https://avatars.githubusercontent.com/u/8234070?v=4?s=100" width="100px;" alt="Mark Pritchard"/><br /><sub><b>Mark Pritchard</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amarkpritchard" title="Bug reports">🐛</a></td> @@ -523,6 +544,7 @@ Added line: 8114 <td align="center" valign="top" width="14.28%"><a href="https://github.com/MPoorter"><img src="https://avatars.githubusercontent.com/u/25356097?v=4?s=100" width="100px;" alt="Matt De Poorter"/><br /><sub><b>Matt De Poorter</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AMPoorter" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/syke"><img src="https://avatars.githubusercontent.com/u/1550766?v=4?s=100" width="100px;" alt="Matt Hargett"/><br /><sub><b>Matt Hargett</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=matthargett" title="Code">💻</a> <a href="#financial-matthargett" title="Financial">💵</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/frizbog"><img src="https://avatars.githubusercontent.com/u/2901857?v=4?s=100" width="100px;" alt="Matt Harrah"/><br /><sub><b>Matt Harrah</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Afrizbog" title="Bug reports">🐛</a></td> +Added line: 1259 <td align="center" valign="top" width="14.28%"><a href="https://github.com/mattnelson"><img src="https://avatars.githubusercontent.com/u/1894657?v=4?s=100" width="100px;" alt="Matt Nelson"/><br /><sub><b>Matt Nelson</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amattnelson" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/blackmamo"><img src="https://avatars.githubusercontent.com/u/35695811?v=4?s=100" width="100px;" alt="Matthew Amos"/><br /><sub><b>Matthew Amos</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ablackmamo" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/mduggan"><img src="https://avatars.githubusercontent.com/u/3765590?v=4?s=100" width="100px;" alt="Matthew Duggan"/><br /><sub><b>Matthew Duggan</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amduggan" title="Bug reports">🐛</a></td> @@ -551,8 +573,10 @@ Added line: 8114 <td align="center" valign="top" width="14.28%"><a href="https://github.com/mpellegrini"><img src="https://avatars.githubusercontent.com/u/466696?v=4?s=100" width="100px;" alt="Michael Pellegrini"/><br /><sub><b>Michael Pellegrini</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ampellegrini" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="http://pl.linkedin.com/in/mkordas/"><img src="https://avatars.githubusercontent.com/u/5467276?v=4?s=100" width="100px;" alt="Michal Kordas"/><br /><sub><b>Michal Kordas</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amkordas" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="http://www.greenpath.pl/"><img src="https://avatars.githubusercontent.com/u/986194?v=4?s=100" width="100px;" alt="Michał Borek"/><br /><sub><b>Michał Borek</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amichalborek" title="Bug reports">🐛</a></td> +Added line: 5808 <td align="center" valign="top" width="14.28%"><a href="https://github.com/coola"><img src="https://avatars.githubusercontent.com/u/83182?v=4?s=100" width="100px;" alt="Michał Kuliński"/><br /><sub><b>Michał Kuliński</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acoola" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://mnunezdm.com/"><img src="https://avatars.githubusercontent.com/u/10410852?v=4?s=100" width="100px;" alt="Miguel Núñez Díaz-Montes"/><br /><sub><b>Miguel Núñez Díaz-Montes</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amnunezdm" title="Bug reports">🐛</a></td> +Added line: 4265 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/impmihai"><img src="https://avatars.githubusercontent.com/u/22995337?v=4?s=100" width="100px;" alt="Mihai Ionut"/><br /><sub><b>Mihai Ionut</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aimpmihai" title="Bug reports">🐛</a></td> @@ -595,18 +619,22 @@ Added line: 8114 <td align="center" valign="top" width="14.28%"><a href="https://github.com/nimit-patel"><img src="https://avatars.githubusercontent.com/u/13987001?v=4?s=100" width="100px;" alt="Nimit Patel"/><br /><sub><b>Nimit Patel</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Animit-patel" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/niranjanh"><img src="https://avatars.githubusercontent.com/u/23009945?v=4?s=100" width="100px;" alt="Niranjan Harpale"/><br /><sub><b>Niranjan Harpale</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aniranjanh" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/nirvikpatel"><img src="https://avatars.githubusercontent.com/u/76862984?v=4?s=100" width="100px;" alt="Nirvik Patel"/><br /><sub><b>Nirvik Patel</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=nirvikpatel" title="Code">💻</a></td> +Added line: 7397 <td align="center" valign="top" width="14.28%"><a href="https://github.com/noahsussman"><img src="https://avatars.githubusercontent.com/u/31490710?v=4?s=100" width="100px;" alt="Noah Sussman"/><br /><sub><b>Noah Sussman</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Anoahsussman" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Noah0120"><img src="https://avatars.githubusercontent.com/u/86766856?v=4?s=100" width="100px;" alt="Noah0120"/><br /><sub><b>Noah0120</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ANoah0120" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://noamtamim.com/"><img src="https://avatars.githubusercontent.com/u/10047237?v=4?s=100" width="100px;" alt="Noam Tamim"/><br /><sub><b>Noam Tamim</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Anoamtamim" title="Bug reports">🐛</a></td> </tr> <tr> +Added line: 3343 <td align="center" valign="top" width="14.28%"><a href="https://github.com/grandinj"><img src="https://avatars.githubusercontent.com/u/796121?v=4?s=100" width="100px;" alt="Noel Grandin"/><br /><sub><b>Noel Grandin</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Agrandinj" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/OlafHaalstra"><img src="https://avatars.githubusercontent.com/u/6420723?v=4?s=100" width="100px;" alt="Olaf Haalstra"/><br /><sub><b>Olaf Haalstra</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AOlafHaalstra" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/OlegAndreych"><img src="https://avatars.githubusercontent.com/u/2041351?v=4?s=100" width="100px;" alt="Oleg Andreych"/><br /><sub><b>Oleg Andreych</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=OlegAndreych" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3AOlegAndreych" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Oleg-Pavlenko-EPAM"><img src="https://avatars.githubusercontent.com/u/82513963?v=4?s=100" width="100px;" alt="Oleg Pavlenko"/><br /><sub><b>Oleg Pavlenko</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AOleg-Pavlenko-EPAM" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/dykov"><img src="https://avatars.githubusercontent.com/u/36415196?v=4?s=100" width="100px;" alt="Oleksii Dykov"/><br /><sub><b>Oleksii Dykov</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=dykov" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Adykov" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="http://www.eikemeier.com/"><img src="https://avatars.githubusercontent.com/u/604196?v=4?s=100" width="100px;" alt="Oliver Eikemeier"/><br /><sub><b>Oliver Eikemeier</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aeikemeier" title="Bug reports">🐛</a></td> +Added line: 623 <td align="center" valign="top" width="14.28%"><a href="https://github.com/osiegmar"><img src="https://avatars.githubusercontent.com/u/1918869?v=4?s=100" width="100px;" alt="Oliver Siegmar"/><br /><sub><b>Oliver Siegmar</b></sub></a><br /><a href="#financial-osiegmar" title="Financial">💵</a></td> +Added line: 6617 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/pyxide"><img src="https://avatars.githubusercontent.com/u/9992381?v=4?s=100" width="100px;" alt="Olivier Parent"/><br /><sub><b>Olivier Parent</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=pyxide" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Apyxide" title="Bug reports">🐛</a></td> @@ -619,6 +647,7 @@ Added line: 8114 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/paulberg"><img src="https://avatars.githubusercontent.com/u/3239883?v=4?s=100" width="100px;" alt="Paul Berg"/><br /><sub><b>Paul Berg</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Apaulberg" title="Bug reports">🐛</a></td> +Added line: 2127 <td align="center" valign="top" width="14.28%"><a href="http://paul-guyot.com/"><img src="https://avatars.githubusercontent.com/u/168407?v=4?s=100" width="100px;" alt="Paul Guyot"/><br /><sub><b>Paul Guyot</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=pguyot" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/pbludov"><img src="https://avatars.githubusercontent.com/u/900805?v=4?s=100" width="100px;" alt="Pavel Bludov"/><br /><sub><b>Pavel Bludov</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Apbludov" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/malejpavouk"><img src="https://avatars.githubusercontent.com/u/4127023?v=4?s=100" width="100px;" alt="Pavel Mička"/><br /><sub><b>Pavel Mička</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amalejpavouk" title="Bug reports">🐛</a></td> @@ -638,6 +667,7 @@ Added line: 8114 <tr> <td align="center" valign="top" width="14.28%"><a href="https://www.stokpop.nl/"><img src="https://avatars.githubusercontent.com/u/8797018?v=4?s=100" width="100px;" alt="Peter Paul Bakker"/><br /><sub><b>Peter Paul Bakker</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=stokpop" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="http://www.e-nexus.de./"><img src="https://avatars.githubusercontent.com/u/6880636?v=4?s=100" width="100px;" alt="Peter Rader"/><br /><sub><b>Peter Rader</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aenexusde" title="Bug reports">🐛</a></td> +Added line: 7017 <td align="center" valign="top" width="14.28%"><a href="https://github.com/gpbp"><img src="https://avatars.githubusercontent.com/u/18648177?v=4?s=100" width="100px;" alt="Pham Hai Trung"/><br /><sub><b>Pham Hai Trung</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Agpbp" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/acanda"><img src="https://avatars.githubusercontent.com/u/174978?v=4?s=100" width="100px;" alt="Philip Graf"/><br /><sub><b>Philip Graf</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=acanda" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Aacanda" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/krallus"><img src="https://avatars.githubusercontent.com/u/29927450?v=4?s=100" width="100px;" alt="Philip Hachey"/><br /><sub><b>Philip Hachey</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Akrallus" title="Bug reports">🐛</a></td> @@ -647,6 +677,7 @@ Added line: 9236 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/fluxroot"><img src="https://avatars.githubusercontent.com/u/247365?v=4?s=100" width="100px;" alt="Phokham Nonava"/><br /><sub><b>Phokham Nonava</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Afluxroot" title="Bug reports">🐛</a></td> +Added line: 4360 <td align="center" valign="top" width="14.28%"><a href="https://github.com/PimvanderLoos"><img src="https://avatars.githubusercontent.com/u/3114723?v=4?s=100" width="100px;" alt="Pim van der Loos"/><br /><sub><b>Pim van der Loos</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=PimvanderLoos" title="Code">💻</a> <a href="https://github.com/pmd/pmd/commits?author=PimvanderLoos" title="Tests">⚠️</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/szyman23"><img src="https://avatars.githubusercontent.com/u/4140681?v=4?s=100" width="100px;" alt="Piotr Szymański"/><br /><sub><b>Piotr Szymański</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aszyman23" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/pzygielo"><img src="https://avatars.githubusercontent.com/u/11896137?v=4?s=100" width="100px;" alt="Piotrek Żygieło"/><br /><sub><b>Piotrek Żygieło</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=pzygielo" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Apzygielo" title="Bug reports">🐛</a> <a href="https://github.com/pmd/pmd/commits?author=pzygielo" title="Documentation">📖</a></td> @@ -660,6 +691,8 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="https://github.com/rbri"><img src="https://avatars.githubusercontent.com/u/2544132?v=4?s=100" width="100px;" alt="RBRi"/><br /><sub><b>RBRi</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Arbri" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/mrfyda"><img src="https://avatars.githubusercontent.com/u/593860?v=4?s=100" width="100px;" alt="Rafael Cortês"/><br /><sub><b>Rafael Cortês</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amrfyda" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/RaheemShaik999"><img src="https://avatars.githubusercontent.com/u/43146735?v=4?s=100" width="100px;" alt="RaheemShaik999"/><br /><sub><b>RaheemShaik999</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ARaheemShaik999" title="Bug reports">🐛</a></td> +Added line: 4591 +Added line: 5143 <td align="center" valign="top" width="14.28%"><a href="https://github.com/rajeshggwp"><img src="https://avatars.githubusercontent.com/u/8025160?v=4?s=100" width="100px;" alt="RajeshR"/><br /><sub><b>RajeshR</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=rajeshggwp" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Arajeshggwp" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ramachandra-mohan"><img src="https://avatars.githubusercontent.com/u/22360770?v=4?s=100" width="100px;" alt="Ramachandra Mohan"/><br /><sub><b>Ramachandra Mohan</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aramachandra-mohan" title="Bug reports">🐛</a></td> </tr> @@ -673,8 +706,10 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="https://github.com/rdicroce"><img src="https://avatars.githubusercontent.com/u/1458922?v=4?s=100" width="100px;" alt="Rich DiCroce"/><br /><sub><b>Rich DiCroce</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ardicroce" title="Bug reports">🐛</a></td> </tr> <tr> +Added line: 9517 <td align="center" valign="top" width="14.28%"><a href="https://github.com/rcorfieldffdc"><img src="https://avatars.githubusercontent.com/u/42997936?v=4?s=100" width="100px;" alt="Richard Corfield"/><br /><sub><b>Richard Corfield</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=rcorfieldffdc" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://developer.riotgames.com/"><img src="https://avatars.githubusercontent.com/u/33143437?v=4?s=100" width="100px;" alt="Riot R1cket"/><br /><sub><b>Riot R1cket</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ARiotR1cket" title="Bug reports">🐛</a></td> +Added line: 4839 <td align="center" valign="top" width="14.28%"><a href="http://rishjain.me/"><img src="https://avatars.githubusercontent.com/u/25207823?v=4?s=100" width="100px;" alt="Rishabh Jain"/><br /><sub><b>Rishabh Jain</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajainrish" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/rishabhdeepsingh"><img src="https://avatars.githubusercontent.com/u/28526643?v=4?s=100" width="100px;" alt="RishabhDeep Singh"/><br /><sub><b>RishabhDeep Singh</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Arishabhdeepsingh" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="http://robertbaillie.blogspot.co.uk/"><img src="https://avatars.githubusercontent.com/u/6523911?v=4?s=100" width="100px;" alt="Rob Baillie"/><br /><sub><b>Rob Baillie</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Abobalicious" title="Bug reports">🐛</a></td> @@ -723,6 +758,7 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="https://github.com/itsmebasti"><img src="https://avatars.githubusercontent.com/u/12232063?v=4?s=100" width="100px;" alt="Sebastian Schwarz"/><br /><sub><b>Sebastian Schwarz</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aitsmebasti" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/mohui1999"><img src="https://avatars.githubusercontent.com/u/46819179?v=4?s=100" width="100px;" alt="Seren"/><br /><sub><b>Seren</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amohui1999" title="Bug reports">🐛</a> <a href="https://github.com/pmd/pmd/commits?author=mohui1999" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/sgorbaty"><img src="https://avatars.githubusercontent.com/u/407097?v=4?s=100" width="100px;" alt="Sergey Gorbaty"/><br /><sub><b>Sergey Gorbaty</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Asgorbaty" title="Bug reports">🐛</a></td> +Added line: 341 <td align="center" valign="top" width="14.28%"><a href="http://skozlov.net/"><img src="https://avatars.githubusercontent.com/u/3817455?v=4?s=100" width="100px;" alt="Sergey Kozlov"/><br /><sub><b>Sergey Kozlov</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Askozlov" title="Bug reports">🐛</a></td> </tr> <tr> @@ -736,6 +772,7 @@ Added line: 9236 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/kullfar"><img src="https://avatars.githubusercontent.com/u/736714?v=4?s=100" width="100px;" alt="Stanislav Gromov"/><br /><sub><b>Stanislav Gromov</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Akullfar" title="Bug reports">🐛</a></td> +Added line: 4724 <td align="center" valign="top" width="14.28%"><a href="https://smyachenkov.com/"><img src="https://avatars.githubusercontent.com/u/10816424?v=4?s=100" width="100px;" alt="Stanislav Myachenkov"/><br /><sub><b>Stanislav Myachenkov</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=smyachenkov" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://www.stefan-birkner.de/"><img src="https://avatars.githubusercontent.com/u/711349?v=4?s=100" width="100px;" alt="Stefan Birkner"/><br /><sub><b>Stefan Birkner</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Astefanbirkner" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/bohni"><img src="https://avatars.githubusercontent.com/u/1252254?v=4?s=100" width="100px;" alt="Stefan Bohn"/><br /><sub><b>Stefan Bohn</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Abohni" title="Bug reports">🐛</a></td> @@ -774,6 +811,7 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="http://www.dreamops.org/"><img src="https://avatars.githubusercontent.com/u/1641984?v=4?s=100" width="100px;" alt="Ted Husted"/><br /><sub><b>Ted Husted</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ATedHusted" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/TehBakker"><img src="https://avatars.githubusercontent.com/u/7705294?v=4?s=100" width="100px;" alt="TehBakker"/><br /><sub><b>TehBakker</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ATehBakker" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://gitter.im/"><img src="https://avatars.githubusercontent.com/u/8518239?v=4?s=100" width="100px;" alt="The Gitter Badger"/><br /><sub><b>The Gitter Badger</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Agitter-badger" title="Bug reports">🐛</a></td> +Added line: 9884 <td align="center" valign="top" width="14.28%"><a href="https://github.com/theodoor"><img src="https://avatars.githubusercontent.com/u/1332244?v=4?s=100" width="100px;" alt="Theodoor"/><br /><sub><b>Theodoor</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Atheodoor" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Thihup"><img src="https://avatars.githubusercontent.com/u/13357965?v=4?s=100" width="100px;" alt="Thiago Henrique Hüpner"/><br /><sub><b>Thiago Henrique Hüpner</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AThihup" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/thibaultmeyer"><img src="https://avatars.githubusercontent.com/u/1005086?v=4?s=100" width="100px;" alt="Thibault Meyer"/><br /><sub><b>Thibault Meyer</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Athibaultmeyer" title="Bug reports">🐛</a></td> @@ -787,6 +825,8 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="https://github.com/Thunderforge"><img src="https://avatars.githubusercontent.com/u/6200170?v=4?s=100" width="100px;" alt="Thunderforge"/><br /><sub><b>Thunderforge</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=Thunderforge" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3AThunderforge" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/TimvdLippe"><img src="https://avatars.githubusercontent.com/u/5948271?v=4?s=100" width="100px;" alt="Tim van der Lippe"/><br /><sub><b>Tim van der Lippe</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3ATimvdLippe" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://miranda-ng.org/"><img src="https://avatars.githubusercontent.com/u/2698843?v=4?s=100" width="100px;" alt="Tobias Weimer"/><br /><sub><b>Tobias Weimer</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=tweimer" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Atweimer" title="Bug reports">🐛</a></td> +Added line: 1417 +Added line: 3600 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://thomasleecopeland.com/"><img src="https://avatars.githubusercontent.com/u/70536?v=4?s=100" width="100px;" alt="Tom Copeland"/><br /><sub><b>Tom Copeland</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Atcopeland" title="Bug reports">🐛</a> <a href="https://github.com/pmd/pmd/commits?author=tcopeland" title="Code">💻</a> <a href="https://github.com/pmd/pmd/commits?author=tcopeland" title="Documentation">📖</a></td> @@ -814,6 +854,7 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="http://www.irit.fr/~Victor.Noel/"><img src="https://avatars.githubusercontent.com/u/160975?v=4?s=100" width="100px;" alt="Victor Noël"/><br /><sub><b>Victor Noël</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Avictornoel" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/vgalloy"><img src="https://avatars.githubusercontent.com/u/11443605?v=4?s=100" width="100px;" alt="Vincent Galloy"/><br /><sub><b>Vincent Galloy</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=vgalloy" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/vhuynh4thalesgroup"><img src="https://avatars.githubusercontent.com/u/50705525?v=4?s=100" width="100px;" alt="Vincent HUYNH"/><br /><sub><b>Vincent HUYNH</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Avhuynh4thalesgroup" title="Bug reports">🐛</a></td> +Added line: 7727 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/vmaurin"><img src="https://avatars.githubusercontent.com/u/17569830?v=4?s=100" width="100px;" alt="Vincent Maurin"/><br /><sub><b>Vincent Maurin</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Avmaurin" title="Bug reports">🐛</a></td> @@ -823,6 +864,7 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="https://github.com/VitaliiIevtushenko"><img src="https://avatars.githubusercontent.com/u/11145125?v=4?s=100" width="100px;" alt="Vitalii Yevtushenko"/><br /><sub><b>Vitalii Yevtushenko</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AVitaliiIevtushenko" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/vitarb"><img src="https://avatars.githubusercontent.com/u/1311694?v=4?s=100" width="100px;" alt="Vitaly"/><br /><sub><b>Vitaly</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Avitarb" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="http://www.topixoft.com/"><img src="https://avatars.githubusercontent.com/u/275446?v=4?s=100" width="100px;" alt="Vitaly Polonetsky"/><br /><sub><b>Vitaly Polonetsky</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Amvitaly" title="Bug reports">🐛</a></td> +Added line: 7125 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/vojtapol"><img src="https://avatars.githubusercontent.com/u/7419355?v=4?s=100" width="100px;" alt="Vojtech Polivka"/><br /><sub><b>Vojtech Polivka</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Avojtapol" title="Bug reports">🐛</a></td> @@ -851,7 +893,6 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="https://dailyco.github.io/"><img src="https://avatars.githubusercontent.com/u/48382813?v=4?s=100" width="100px;" alt="YuJin Kim"/><br /><sub><b>YuJin Kim</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Adailyco" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/yuridolzhenko"><img src="https://avatars.githubusercontent.com/u/1915205?v=4?s=100" width="100px;" alt="Yuri Dolzhenko"/><br /><sub><b>Yuri Dolzhenko</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ayuridolzhenko" title="Bug reports">🐛</a></td> </tr> - <tr> <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/lazylead"><img src="https://avatars.githubusercontent.com/u/1651114?v=4?s=100" width="100px;" alt="Yurii Dubinka"/><br /><sub><b>Yurii Dubinka</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Adgroup" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/zolyfarkas"><img src="https://avatars.githubusercontent.com/u/144085?v=4?s=100" width="100px;" alt="Zoltan Farkas"/><br /><sub><b>Zoltan Farkas</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Azolyfarkas" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Zustin"><img src="https://avatars.githubusercontent.com/u/87302257?v=4?s=100" width="100px;" alt="Zustin"/><br /><sub><b>Zustin</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AZustin" title="Bug reports">🐛</a></td> @@ -869,6 +910,7 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="https://github.com/vishva007"><img src="https://avatars.githubusercontent.com/u/6756036?v=4?s=100" width="100px;" alt="avishvat"/><br /><sub><b>avishvat</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Avishva007" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/avivmu"><img src="https://avatars.githubusercontent.com/u/19804341?v=4?s=100" width="100px;" alt="avivmu"/><br /><sub><b>avivmu</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aavivmu" title="Bug reports">🐛</a></td> </tr> +Added line: 6864 <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/axelbarfod1"><img src="https://avatars.githubusercontent.com/u/32651536?v=4?s=100" width="100px;" alt="axelbarfod1"/><br /><sub><b>axelbarfod1</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aaxelbarfod1" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/b-3-n"><img src="https://avatars.githubusercontent.com/u/7460509?v=4?s=100" width="100px;" alt="b-3-n"/><br /><sub><b>b-3-n</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ab-3-n" title="Bug reports">🐛</a></td> @@ -885,12 +927,12 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="https://github.com/cesares-basilico"><img src="https://avatars.githubusercontent.com/u/14895641?v=4?s=100" width="100px;" alt="cesares-basilico"/><br /><sub><b>cesares-basilico</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acesares-basilico" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/chrite"><img src="https://avatars.githubusercontent.com/u/53291173?v=4?s=100" width="100px;" alt="chrite"/><br /><sub><b>chrite</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Achrite" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ciufudean"><img src="https://avatars.githubusercontent.com/u/19208954?v=4?s=100" width="100px;" alt="ciufudean"/><br /><sub><b>ciufudean</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=ciufudean" title="Documentation">📖</a></td> +Added line: 9145 <td align="center" valign="top" width="14.28%"><a href="https://www.dannyvanheumen.nl/"><img src="https://avatars.githubusercontent.com/u/1936470?v=4?s=100" width="100px;" alt="cobratbq"/><br /><sub><b>cobratbq</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acobratbq" title="Bug reports">🐛</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/coladict"><img src="https://avatars.githubusercontent.com/u/1909837?v=4?s=100" width="100px;" alt="coladict"/><br /><sub><b>coladict</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acoladict" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/cosmoJFH"><img src="https://avatars.githubusercontent.com/u/19255991?v=4?s=100" width="100px;" alt="cosmoJFH"/><br /><sub><b>cosmoJFH</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3AcosmoJFH" title="Bug reports">🐛</a></td> - <td align="center" valign="top" width="14.28%"><a href="https://github.com/cristalp"><img src="https://avatars.githubusercontent.com/u/12525759?v=4?s=100" width="100px;" alt="cristalp"/><br /><sub><b>cristalp</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acristalp" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/crunsk"><img src="https://avatars.githubusercontent.com/u/5631441?v=4?s=100" width="100px;" alt="crunsk"/><br /><sub><b>crunsk</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acrunsk" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/cwholmes"><img src="https://avatars.githubusercontent.com/u/14796526?v=4?s=100" width="100px;" alt="cwholmes"/><br /><sub><b>cwholmes</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acwholmes" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/cyberjj999"><img src="https://avatars.githubusercontent.com/u/51283594?v=4?s=100" width="100px;" alt="cyberjj999"/><br /><sub><b>cyberjj999</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Acyberjj999" title="Bug reports">🐛</a></td> @@ -902,6 +944,7 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="https://github.com/dalizi007"><img src="https://avatars.githubusercontent.com/u/90743616?v=4?s=100" width="100px;" alt="dalizi007"/><br /><sub><b>dalizi007</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=dalizi007" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/danbrycefairsailcom"><img src="https://avatars.githubusercontent.com/u/25037396?v=4?s=100" width="100px;" alt="danbrycefairsailcom"/><br /><sub><b>danbrycefairsailcom</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Adanbrycefairsailcom" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/dariansanity"><img src="https://avatars.githubusercontent.com/u/28553192?v=4?s=100" width="100px;" alt="dariansanity"/><br /><sub><b>dariansanity</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Adariansanity" title="Bug reports">🐛</a></td> +Added line: 3237 <td align="center" valign="top" width="14.28%"><a href="https://github.com/darrenmiliband"><img src="https://avatars.githubusercontent.com/u/62128185?v=4?s=100" width="100px;" alt="darrenmiliband"/><br /><sub><b>darrenmiliband</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Adarrenmiliband" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/davidburstrom"><img src="https://avatars.githubusercontent.com/u/1671931?v=4?s=100" width="100px;" alt="davidburstrom"/><br /><sub><b>davidburstrom</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Adavidburstrom" title="Bug reports">🐛</a></td> </tr> @@ -931,6 +974,7 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="https://github.com/flxbl-io"><img src="https://avatars.githubusercontent.com/u/142315319?v=4?s=100" width="100px;" alt="flxbl-io"/><br /><sub><b>flxbl-io</b></sub></a><br /><a href="#financial-flxbl-io" title="Financial">💵</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/foxmason"><img src="https://avatars.githubusercontent.com/u/33361071?v=4?s=100" width="100px;" alt="foxmason"/><br /><sub><b>foxmason</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Afoxmason" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/frankegabor"><img src="https://avatars.githubusercontent.com/u/13273444?v=4?s=100" width="100px;" alt="frankegabor"/><br /><sub><b>frankegabor</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Afrankegabor" title="Bug reports">🐛</a></td> +Added line: 3463 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/fanlw0816"><img src="https://avatars.githubusercontent.com/u/22781995?v=4?s=100" width="100px;" alt="frankl"/><br /><sub><b>frankl</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Afanlw0816" title="Bug reports">🐛</a></td> @@ -939,10 +983,13 @@ Added line: 9236 <td align="center" valign="top" width="14.28%"><a href="https://github.com/gearsethenry"><img src="https://avatars.githubusercontent.com/u/127120320?v=4?s=100" width="100px;" alt="gearsethenry"/><br /><sub><b>gearsethenry</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Agearsethenry" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/gracia19"><img src="https://avatars.githubusercontent.com/u/32557952?v=4?s=100" width="100px;" alt="gracia19"/><br /><sub><b>gracia19</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Agracia19" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://kyo.iroiro.party/"><img src="https://avatars.githubusercontent.com/u/14026120?v=4?s=100" width="100px;" alt="gudzpoz"/><br /><sub><b>gudzpoz</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Agudzpoz" title="Bug reports">🐛</a></td> +Added line: 170 <td align="center" valign="top" width="14.28%"><a href="https://github.com/ief2009"><img src="https://avatars.githubusercontent.com/u/1955449?v=4?s=100" width="100px;" alt="guo fei"/><br /><sub><b>guo fei</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aief2009" title="Bug reports">🐛</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/gurmsc5"><img src="https://avatars.githubusercontent.com/u/26914263?v=4?s=100" width="100px;" alt="gurmsc5"/><br /><sub><b>gurmsc5</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Agurmsc5" title="Bug reports">🐛</a></td> +Added line: 7891 +Added line: 713 <td align="center" valign="top" width="14.28%"><a href="https://github.com/gwilymatgearset"><img src="https://avatars.githubusercontent.com/u/43957113?v=4?s=100" width="100px;" alt="gwilymatgearset"/><br /><sub><b>gwilymatgearset</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=gwilymatgearset" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Agwilymatgearset" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/haigsn"><img src="https://avatars.githubusercontent.com/u/52993319?v=4?s=100" width="100px;" alt="haigsn"/><br /><sub><b>haigsn</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ahaigsn" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/hemanshu070"><img src="https://avatars.githubusercontent.com/u/32012651?v=4?s=100" width="100px;" alt="hemanshu070"/><br /><sub><b>hemanshu070</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ahemanshu070" title="Bug reports">🐛</a></td> @@ -962,6 +1009,7 @@ Added line: 9236 <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jkeener1"><img src="https://avatars.githubusercontent.com/u/11696155?v=4?s=100" width="100px;" alt="jkeener1"/><br /><sub><b>jkeener1</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajkeener1" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jmetertea"><img src="https://avatars.githubusercontent.com/u/33323555?v=4?s=100" width="100px;" alt="jmetertea"/><br /><sub><b>jmetertea</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajmetertea" title="Bug reports">🐛</a></td> +Added line: 1598 <td align="center" valign="top" width="14.28%"><a href="https://github.com/johnra2"><img src="https://avatars.githubusercontent.com/u/90150885?v=4?s=100" width="100px;" alt="johnra2"/><br /><sub><b>johnra2</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=johnra2" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/johnzhao9"><img src="https://avatars.githubusercontent.com/u/13734035?v=4?s=100" width="100px;" alt="johnzhao9"/><br /><sub><b>johnzhao9</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ajohnzhao9" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/josemanuelrolon"><img src="https://avatars.githubusercontent.com/u/1685807?v=4?s=100" width="100px;" alt="josemanuelrolon"/><br /><sub><b>josemanuelrolon</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=josemanuelrolon" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Ajosemanuelrolon" title="Bug reports">🐛</a></td> @@ -983,6 +1031,7 @@ Added line: 9769 <td align="center" valign="top" width="14.28%"><a href="https://github.com/krzyk"><img src="https://avatars.githubusercontent.com/u/105730?v=4?s=100" width="100px;" alt="krzyk"/><br /><sub><b>krzyk</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Akrzyk" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/lasselindqvist"><img src="https://avatars.githubusercontent.com/u/13466645?v=4?s=100" width="100px;" alt="lasselindqvist"/><br /><sub><b>lasselindqvist</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Alasselindqvist" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/lgemeinhardt"><img src="https://avatars.githubusercontent.com/u/1395165?v=4?s=100" width="100px;" alt="lgemeinhardt"/><br /><sub><b>lgemeinhardt</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Algemeinhardt" title="Bug reports">🐛</a></td> +Added line: 6813 <td align="center" valign="top" width="14.28%"><a href="https://github.com/lihuaib"><img src="https://avatars.githubusercontent.com/u/3365643?v=4?s=100" width="100px;" alt="lihuaib"/><br /><sub><b>lihuaib</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Alihuaib" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/liqingjun123"><img src="https://avatars.githubusercontent.com/u/12873992?v=4?s=100" width="100px;" alt="liqingjun123"/><br /><sub><b>liqingjun123</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aliqingjun123" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/lonelyma1021"><img src="https://avatars.githubusercontent.com/u/22359014?v=4?s=100" width="100px;" alt="lonelyma1021"/><br /><sub><b>lonelyma1021</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Alonelyma1021" title="Bug reports">🐛</a></td> @@ -1015,6 +1064,7 @@ Added line: 9769 <td align="center" valign="top" width="14.28%"><a href="https://github.com/novsirion"><img src="https://avatars.githubusercontent.com/u/7797113?v=4?s=100" width="100px;" alt="novsirion"/><br /><sub><b>novsirion</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Anovsirion" title="Bug reports">🐛</a></td> </tr> <tr> +Added line: 7423 <td align="center" valign="top" width="14.28%"><a href="https://github.com/nwcm"><img src="https://avatars.githubusercontent.com/u/111259588?v=4?s=100" width="100px;" alt="nwcm"/><br /><sub><b>nwcm</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=nwcm" title="Documentation">📖</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Anwcm" title="Bug reports">🐛</a> <a href="https://github.com/pmd/pmd/commits?author=nwcm" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/oggboy"><img src="https://avatars.githubusercontent.com/u/4798818?v=4?s=100" width="100px;" alt="oggboy"/><br /><sub><b>oggboy</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aoggboy" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://journal.lampetty.net/archive/category/in%20English"><img src="https://avatars.githubusercontent.com/u/78990?v=4?s=100" width="100px;" alt="oinume"/><br /><sub><b>oinume</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aoinume" title="Bug reports">🐛</a></td> @@ -1023,6 +1073,7 @@ Added line: 9769 <td align="center" valign="top" width="14.28%"><a href="https://github.com/pacvz"><img src="https://avatars.githubusercontent.com/u/35453365?v=4?s=100" width="100px;" alt="pacvz"/><br /><sub><b>pacvz</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=pacvz" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/pagarwal-ignitetech"><img src="https://avatars.githubusercontent.com/u/30888430?v=4?s=100" width="100px;" alt="pallavi agarwal"/><br /><sub><b>pallavi agarwal</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Apagarwal-ignitetech" title="Bug reports">🐛</a></td> </tr> +Added line: 7448 <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/parksungrin"><img src="https://avatars.githubusercontent.com/u/29750262?v=4?s=100" width="100px;" alt="parksungrin"/><br /><sub><b>parksungrin</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aparksungrin" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/patpatpat123"><img src="https://avatars.githubusercontent.com/u/43899031?v=4?s=100" width="100px;" alt="patpatpat123"/><br /><sub><b>patpatpat123</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Apatpatpat123" title="Bug reports">🐛</a></td> @@ -1035,10 +1086,13 @@ Added line: 9769 <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/poojasix"><img src="https://avatars.githubusercontent.com/u/85337280?v=4?s=100" width="100px;" alt="poojasix"/><br /><sub><b>poojasix</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Apoojasix" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/prabhushrikant"><img src="https://avatars.githubusercontent.com/u/6848200?v=4?s=100" width="100px;" alt="prabhushrikant"/><br /><sub><b>prabhushrikant</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aprabhushrikant" title="Bug reports">🐛</a></td> +Added line: 7931 <td align="center" valign="top" width="14.28%"><a href="https://github.com/pujitha8783"><img src="https://avatars.githubusercontent.com/u/20646357?v=4?s=100" width="100px;" alt="pujitha8783"/><br /><sub><b>pujitha8783</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Apujitha8783" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/r-r-a-j"><img src="https://avatars.githubusercontent.com/u/33902071?v=4?s=100" width="100px;" alt="r-r-a-j"/><br /><sub><b>r-r-a-j</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ar-r-a-j" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/raghujayjunk"><img src="https://avatars.githubusercontent.com/u/48074475?v=4?s=100" width="100px;" alt="raghujayjunk"/><br /><sub><b>raghujayjunk</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Araghujayjunk" title="Bug reports">🐛</a></td> +Added line: 7839 <td align="center" valign="top" width="14.28%"><a href="https://github.com/rajeshveera"><img src="https://avatars.githubusercontent.com/u/1306514?v=4?s=100" width="100px;" alt="rajeshveera"/><br /><sub><b>rajeshveera</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Arajeshveera" title="Bug reports">🐛</a></td> +Added line: 2701 <td align="center" valign="top" width="14.28%"><a href="https://github.com/rajeswarreddy88"><img src="https://avatars.githubusercontent.com/u/48543250?v=4?s=100" width="100px;" alt="rajeswarreddy88"/><br /><sub><b>rajeswarreddy88</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Arajeswarreddy88" title="Bug reports">🐛</a></td> </tr> <tr> @@ -1053,6 +1107,7 @@ Added line: 9769 <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ryan-gustafson"><img src="https://avatars.githubusercontent.com/u/1227016?v=4?s=100" width="100px;" alt="ryan-gustafson"/><br /><sub><b>ryan-gustafson</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=ryan-gustafson" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Aryan-gustafson" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/sabi0"><img src="https://avatars.githubusercontent.com/u/11509875?v=4?s=100" width="100px;" alt="sabi0"/><br /><sub><b>sabi0</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Asabi0" title="Bug reports">🐛</a></td> +Added line: 3639 <td align="center" valign="top" width="14.28%"><a href="https://github.com/scais"><img src="https://avatars.githubusercontent.com/u/4539192?v=4?s=100" width="100px;" alt="scais"/><br /><sub><b>scais</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ascais" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/schosin"><img src="https://avatars.githubusercontent.com/u/1669777?v=4?s=100" width="100px;" alt="schosin"/><br /><sub><b>schosin</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Aschosin" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/screamingfrog"><img src="https://avatars.githubusercontent.com/u/845549?v=4?s=100" width="100px;" alt="screamingfrog"/><br /><sub><b>screamingfrog</b></sub></a><br /><a href="#financial-screamingfrog" title="Financial">💵</a></td> @@ -1070,7 +1125,6 @@ Added line: 9769 </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/soyodream"><img src="https://avatars.githubusercontent.com/u/151845313?v=4?s=100" width="100px;" alt="soyodream"/><br /><sub><b>soyodream</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Asoyodream" title="Bug reports">🐛</a></td> - <td align="center" valign="top" width="14.28%"><a href="https://github.com/sratz"><img src="https://avatars.githubusercontent.com/u/14908423?v=4?s=100" width="100px;" alt="sratz"/><br /><sub><b>sratz</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Asratz" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/stonio"><img src="https://avatars.githubusercontent.com/u/19952825?v=4?s=100" width="100px;" alt="stonio"/><br /><sub><b>stonio</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Astonio" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/sturton"><img src="https://avatars.githubusercontent.com/u/1734891?v=4?s=100" width="100px;" alt="sturton"/><br /><sub><b>sturton</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=sturton" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Asturton" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/sudharmohan"><img src="https://avatars.githubusercontent.com/u/16752281?v=4?s=100" width="100px;" alt="sudharmohan"/><br /><sub><b>sudharmohan</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Asudharmohan" title="Bug reports">🐛</a></td> @@ -1098,6 +1152,7 @@ Added line: 9769 <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/witherspore"><img src="https://avatars.githubusercontent.com/u/813263?v=4?s=100" width="100px;" alt="witherspore"/><br /><sub><b>witherspore</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Awitherspore" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/wjljack"><img src="https://avatars.githubusercontent.com/u/1182478?v=4?s=100" width="100px;" alt="wjljack"/><br /><sub><b>wjljack</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Awjljack" title="Bug reports">🐛</a></td> +Added line: 5886 <td align="center" valign="top" width="14.28%"><a href="https://github.com/wuchiuwong"><img src="https://avatars.githubusercontent.com/u/15967553?v=4?s=100" width="100px;" alt="wuchiuwong"/><br /><sub><b>wuchiuwong</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Awuchiuwong" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/songxing10000"><img src="https://avatars.githubusercontent.com/u/10040131?v=4?s=100" width="100px;" alt="xingsong"/><br /><sub><b>xingsong</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Asongxing10000" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/xioayuge"><img src="https://avatars.githubusercontent.com/u/45328272?v=4?s=100" width="100px;" alt="xioayuge"/><br /><sub><b>xioayuge</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Axioayuge" title="Bug reports">🐛</a></td> @@ -1105,11 +1160,13 @@ Added line: 9769 <td align="center" valign="top" width="14.28%"><a href="https://github.com/xuanuy"><img src="https://avatars.githubusercontent.com/u/3894777?v=4?s=100" width="100px;" alt="xuanuy"/><br /><sub><b>xuanuy</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Axuanuy" title="Bug reports">🐛</a></td> </tr> <tr> +Added line: 298 <td align="center" valign="top" width="14.28%"><a href="https://github.com/xyf0921"><img src="https://avatars.githubusercontent.com/u/17350974?v=4?s=100" width="100px;" alt="xyf0921"/><br /><sub><b>xyf0921</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Axyf0921" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/yalechen-cyw3"><img src="https://avatars.githubusercontent.com/u/34886223?v=4?s=100" width="100px;" alt="yalechen-cyw3"/><br /><sub><b>yalechen-cyw3</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ayalechen-cyw3" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/yasuharu-sato"><img src="https://avatars.githubusercontent.com/u/45546628?v=4?s=100" width="100px;" alt="yasuharu-sato"/><br /><sub><b>yasuharu-sato</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ayasuharu-sato" title="Bug reports">🐛</a></td> Added line: 3400 <td align="center" valign="top" width="14.28%"><a href="https://github.com/zenglian"><img src="https://avatars.githubusercontent.com/u/5268434?v=4?s=100" width="100px;" alt="zenglian"/><br /><sub><b>zenglian</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Azenglian" title="Bug reports">🐛</a></td> +Added line: 6833 <td align="center" valign="top" width="14.28%"><a href="https://github.com/zgrzyt93"><img src="https://avatars.githubusercontent.com/u/54275965?v=4?s=100" width="100px;" alt="zgrzyt93"/><br /><sub><b>zgrzyt93</b></sub></a><br /><a href="https://github.com/pmd/pmd/commits?author=zgrzyt93" title="Code">💻</a> <a href="https://github.com/pmd/pmd/issues?q=author%3Azgrzyt93" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/zhangxinngang"><img src="https://avatars.githubusercontent.com/u/6891146?v=4?s=100" width="100px;" alt="zh3ng"/><br /><sub><b>zh3ng</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Azhangxinngang" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/yuchen1013"><img src="https://avatars.githubusercontent.com/u/17316917?v=4?s=100" width="100px;" alt="zt_soft"/><br /><sub><b>zt_soft</b></sub></a><br /><a href="https://github.com/pmd/pmd/issues?q=author%3Ayuchen1013" title="Bug reports">🐛</a></td> @@ -1132,6 +1189,7 @@ Added line: 3400 </div> +Added line: 8069 ## Previous Contributors These are collected contributors before we moved to github. @@ -1171,8 +1229,10 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t added Fortran tokenizer, DoNotExtendJavaLangError, JspEncoding, MDBAndSessionBeanNamingConvention, RemoteSessionInterfaceNamingConvention, LocalInterfaceSessionNamingConvention, LocalHomeNamingConvention, RemoteInterfaceNamingConvention, AvoidFinalLocalVariable, ClassWithOnlyPrivateConstructorsShouldBeFinal, +Added line: 9941 TooManyStaticImports, DoNotCallSystemExit, StaticEJBFieldShouldBeFinal +Added line: 2668 ### Committers emeritus * Gunnlaugur Thor Briem - NetBeans plugin, Maven build script fixes, bug report on JavaCC parser's use @@ -1187,6 +1247,7 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * [Brant Gurganus](http://gurganus.name/brant/) - JCreator integration, Swing GUI work ### Significant contributors +Added line: 4852 * Pieter Vanraemdonck - JSP grammar/integration/documentation, DontNestJsfInJstlIteration, NoLongScripts, NoScriptlets, NoInlineStyleInformation, NoClassAttribute, NoJspForward @@ -1208,6 +1269,7 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Thomas Steininger - Noticed redundant rule * Thomas Leplus - Contributed new rules LogicInversion, ExtendsObject, UselessParentheses, EmptyInitializer, EmptyStatementBlock, CheckSkipResult.Rewrote UselessStringValueOf, nice patch for ClassCastExceptionWithToArray +Added line: 279 * Paul Sundling - A nice documentation patch for ruleset links * Matt Koch - Added more detail to PMD XML report * Richard Hands - Fixed CPD symlink confusion @@ -1246,9 +1308,11 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t reported Java 1.5 parsing bug, suggested InstantiationToGetClass, bug reports for UnusedPrivateField/CloseConnectionRule/ConstructorCallsOverridableMethodRule, and bug report and documentation suggestions for UseSingletonRule +Added line: 7679 * Maarten Coene - bug report for UnnecessaryConversionTemporary * Jorn Stampehl - Reported bug in UnusedModifier, reported and fixed bugs in JUnitTestsShouldContainAsserts/CyclomaticComplexity/TooManyFields, noticed redundancy of ExplicitCallToFinalize, +Added line: 3877 reported bug in AvoidCallingFinalize, reported bug in JUnitAssertionsShouldIncludeMessage, reported bug in bug report on JUnitTestsShouldContainAsserts * Ulrich Kriegel - reported Ant task documentation bug @@ -1289,22 +1353,24 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Mathieu Champlon - Added language support to the CPD Ant task * Uroshnor - Reported bug in UseNotifyAllInsteadOfNotify * Jan Koops - Noted missing data in MemberValuePair nodes, bug report for JBuilder plugin +Added line: 2186 * [Will Sargent](http://tersesystems.com/) - Implemented AvoidThreadGroup, AvoidThrowingCertainExceptionTypesRule, AvoidCatchingNPERule, ExceptionAsFlowControlRule, URL updates for 'Similar projects' page * Benoit Xhenseval - noted Maven plugin bug (http://jira.codehaus.org/browse/MPPMD-24), bug report for UnusedPrivateMethod, suggestion to add elapsed time to XML report, - bug report for ImmutableField, many bug reports (with good failure cases!), Ant task patch and bug report, XSLT patch, suggestion for improving XML report * Barak Naveh - Reported and fixed bug in CallSuperInConstructor * Bhatia Saurabh - Reported a grammar bug, reported a bug in UseStringBufferLength * Chris Erskine - found bad link, documentation suggestions * mhilpert - Reported bugs in UseIndexOfChar and LoggerIsNotStaticFinal +Added line: 3786 * David Corley - Priority filtering XSLT, reported release packaging problem, implemented nifty Javascript folding for XML report, [demo is here](http://tomcopeland.blogs.com/juniordeveloper/2005/12/demo_of_some_ni.html), suggestion for min priority on the command line * Jon Doh - Reported parser bug * Brian R - suggestions for improving UseIndexOfChar, documentation suggestion * Didier Duquennoy - bug reports for InefficientStringBuffering/ConsecutiveLiteralAppends/AppendCharacterWithChar, +Added line: 5820 several bug reports for InefficientStringBuffering, bug report for ImmutableField, suggestions for improving Benchmark utility, bug report for InefficientStringBuffering, bug report for AvoidConcateningNonLiteralsInStringBuffer, reported a missed hit for EqualsNull, bug report for @@ -1332,6 +1398,7 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t UseCorrectExceptionLogging, coordinated and coded a much nicer asXML() implementation, suggested cleanup of UnusedFormalParameter, Javadoc patch, SystemPrintln bug report, helped get Ant task and CLI squared away with Java 1.5 params, Java 1.5-specific bug reports, +Added line: 4299 suggested improvements for ExceptionSignatureDeclaration * Sean Montgomery - bug report 1371980 for InefficientStringBuffering * Jean-Marc Vanel - suggested enhancements to the PMD scoreboard @@ -1349,6 +1416,7 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Jeff Chamblee - suggested better message for UnnecessaryCaseChange, bug report for CompareObjectsWithEquals * Dave Brosius - suggested MisleadingVariableName rule, a couple of nice patches to clean up some string handling inefficiencies, non-static class usages, and unclosed streams/readers - found with Findbugs, I daresay :-) +Added line: 2205 * Chris Grindstaff - fixed SWTException when Eclipse plugin is run on a file with syntax error * Eduard Naum - fixed JDK 1.3 runtime problems in Eclipse plugin * Jacques Lebourgeois - fix for UTF8 characters in Eclipse plugin @@ -1374,6 +1442,7 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Guillaume Boudreau - patches to fix problems with CPD's FileFinder and NTFS and SCCS * Sylvain Veyrie - bug report for MethodReturnsInternalArray * Randy Ray - bug report for ArrayIsStoredDirectly +Added line: 8050 * Klaus - Suggestion for improving UseSingleton * Nicolai Czempin - Bug report for UnnecessaryParentheses, various rule suggestions, additional PMD backronyms * Kevin Routley - reported Ant task dependency problem, reported problems with RuleSetFactory unit tests @@ -1386,10 +1455,12 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t AvoidInstantiatingObjectsInLoops bug report, AtLeastOneConstructor bug report * Ian Flanigan - reported CPD JNLP breakage * Glen Cordrey - Reported bug involved JavaCC string handling +Added line: 8925 * Oto 'tapik' Buchta - Patched XMLRenderer for UTF8 support * Arent-Jan Banck - Reported bug with Java 1.5 annotation handling * Fred Hartman - Reported exact location of bug in TooManyFields, fixed bug in UnnecessaryBooleanAssertion * Andreas Ehn - Reported bug with Java 1.5 generics parsing +Added line: 6469 * Eric Olander - SingularField, SimplifyConditional fix, UseStringBufferForStringAppends, CollapsibleIfStatements, AvoidInstanceofChecksInCatchClause, AssignmentToNonFinalStatic rule, nice patch for DFAPanel cleanup, AvoidProtectedFieldInFinalClass, ImmutableFieldRule, noticed missing image in Postfix nodes * [Tomas Gustavsson](http://sourceforge.net/users/anatom/) - reported pmd-web breakage @@ -1398,8 +1469,12 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Alex Givant - caught documentation bug * [Luke Francl](http://justlooking.recursion.org/) - suggested UnnecessaryParentheses rule, numerous **high quality** feature suggestions and bug reports +Added line: 625 * David Hovemeyer - reported missing labelled stmt images, a nice patch to let PMD process code in jar/zip files +Added line: 5868 +Added line: 8209 * Peter 'Bruno' Kofler - reported bug #1146116 for JUnitTestsShouldIncludeAssert +Added line: 1604 * Zev Blut - nice patch to add Ruby support to CPD * Christopher Judd - a nice patch to the XSLT that adds a summary * John Meagher - suggested the rule 'MissingSerialVersionUID' and provided the implementation for it @@ -1419,6 +1494,7 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Ken Foskey - C++ parser bug report, cpd.sh * ehowe - a nice patch to include rule priority in the XML report * aryanto - reported a broken reference in the 'favorites' ruleset. +Added line: 5237 * Archimedes Trajano - suggested SimpleDateFormatNeedsLocale * Joerg Kurt Wegner - bug report for UnusedLocalVariable * Bruno - Reported bug with TooManyFields, SuspiciousEqualsMethodName @@ -1432,6 +1508,7 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Sreenivasa Viswanadha - reminded me to use BufferedInputStreams, grammar cleanup for Ctrl-Z problem * Austin Moore - Integration with Omnicore's CodeGuide IDE * Matt Inger - CloneMethodMustImplementCloneable, CloneThrowsCloneNotSupportedException +Added line: 755 * Morgan Schweers - Javascript highlighter for the PMD scoreboard * Brandon Franklin - bug report for BeanMembersShouldSerializeRule, many PMD scoreboard ideas * Bertrand Mollinier Toublet - Bug report which led to platform character set encoding enhancement @@ -1468,17 +1545,18 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Jeff Epstein - TextPad integration and tests * Gabe Johnson - CloseConnectionRule * Roelof Vuurboom - posted report of QStudio analysis of PMD +Added line: 5417 * Jeff Anderson - node finding utility code * Boris Gruschko - regression test suites, nifty AST/XPath viewer * Trevor Harmon - rewrote XSLT script * [Vadim Nasardinov](http://philip.greenspun.com/shared/community-member?user_id=174176) - xdocs cleanup, run.sh cleanup -* Sigiswald Madou - bug report * Dan Tullis - bug report * George Menhorn - CPD bug reports and suggestions * Paul Roebuck - Ant build improvement, several bug reports * Jon A. Maxwell - Bug report * Erik Lee - Bug report +Added line: 2745 * Joerg K. Wegner - PMD scoreboard suggestions * Chris Webster - fix (and test) for UnnecessaryConstructorRule, BooleanInstantiation rule * Colin Simmonds - detailed bug reports @@ -1499,8 +1577,10 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Astro Jetson Jr - a tweak for the ShortVariableNameRule * Paul King - a complete rewrite of the Gel plugin * Gael Marziou - "exclude" rule feature request, bug reports +Added line: 5052 * Philippe T'Seyen - refactoring and cleanup of the CPD Ant task, an XML renderer (with unit tests!) for CPD * Michael Montuori - bug reports on the Gel IDE plugin +Added line: 4229 * Michael Hosier - bug reports on the Gel IDE plugin * Richard Jenson - CPD on Win32 troubleshooting * Daniel Bruguier - CPD on Win32 troubleshooting @@ -1510,8 +1590,10 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Adam Nemeth - bug fixes for UnnecessaryConstructorRule * [Andrew Glover](http://www.oreillynet.com/pub/au/1425) - the CPDTask, ExcessivePublicCountRule, CouplingBetweenObjectsRule, ExcessiveImportsRule, documentation tweaks +Added line: 3509 * Robert Leland - bug report * Carl Gilbert - AccessorClassGenerationRule, DoubleCheckedLockingRule, ConstructorCallsOverridableMethodRule, +Added line: 324 bug reports, feature requests, and documentation improvements * Dave Fuller - improved resource loading code (packaged in a nice diff, too!) * David Whitmore - parser bug report @@ -1522,11 +1604,13 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Frederic Harper - bug report and subsequent troubleshooting * [Mats Henricson](http://www.henricson.se/mats/) - an XSLT script and several bug reports * Martin Cooper - feature suggestions +Added line: 5034 * Bruce Mayhew - feedback on the jEdit plugin * Juergen Ebert - feature suggestions and pmd-netbeans feedback * J.D. Fagan - feature suggestions * William McArthur - ForLoopShouldBeWhileLoop rule * Ales Bukovsky - pmd-netbeans feedback +Added line: 6242 * [Stefan Bodewig](http://stefan.samaflost.de/blog) - bug report * Sean Sullivan - rule suggestions * Dale Vissar - rule suggestions @@ -1534,6 +1618,7 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t PMD scoreboard formulas, pmd-dcpd optimizations * Vincent Massol - bug reports, design suggestions, feature suggestions, Maven guidance * Peter Donald - design suggestions +Added line: 9837 * Liam Holohan - bug reports * Ralph Schaer - bug reports and verification * Damian O'Neill - Ant task patches @@ -1544,6 +1629,8 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * jmichelberger - wrote Byte/Short/Long Instantiation migration rules * Edwin Chan - Support for -auxclasspath for use with Type Resolution * Jared Bunting - Patch to add ASTAnnotationMethodDeclaration to Java AST +Added line: 869 +Added line: 835 * Lucian Ciufudean - RedundantFieldInitializerRule * Andreas Dangel - GodClass and LawOfDemeter rules, several bugfixes and cleanup * Riku Nykanen - patch improving TooManyMethods rule @@ -1561,6 +1648,7 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t * Matthew Short - Support in CPD for IgnoreAnnotations and SuppressWarnings("CPD-START"). * Simon Gijsen - contributing a PMD logo with a modern look. * Yiannis Paschalidis - Fixed bug #968 Issues with JUnit4 @Test annotation with expected exception +Added line: 5318 * Jaroslav Snajberk - Make the comment required rule working. * Mat Booth - #1109 Patch to build with Javacc 5.0 * Stuart Turton - for PLSQL support. See also [pldoc](http://pldoc.sourceforge.net/) @@ -1601,6 +1689,7 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t <td><center><img src="http://sourceforge.net/sflogo.php?group_id=56262"/></center></td> <td> <a href="http://sourceforge.net/">SourceForge</a> for providing hosting services for PMD. +Added line: 168 </td> </tr> <tr> @@ -1638,6 +1727,7 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t <td> YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is creator of innovative and intelligent tools for profiling +Added line: 3276 Java and .NET applications. Take a look at YourKit's leading software products: <a href="http://www.yourkit.com/java/profiler/index.jsp">YourKit Java Profiler</a> and <a href="http://www.yourkit.com/.net/profiler/index.jsp">YourKit .NET Profiler</a>. @@ -1648,5 +1738,4 @@ According to the book [PMD Applied](https://pmdapplied.thomasleecopeland.com/) t <td> <a href="http://www.bijzonderbezig.nl/">Bijzonder Bezig</a> for giving the PMD logo a modern look. </td> - </tr> </table> diff --git a/docs/pages/pmd/projectdocs/decisions.md b/docs/pages/pmd/projectdocs/decisions.md index b8f813bad7..1185957b84 100644 --- a/docs/pages/pmd/projectdocs/decisions.md +++ b/docs/pages/pmd/projectdocs/decisions.md @@ -1,14 +1,103 @@ --- title: Architecture Decisions +Added line: 4240 +Added line: 2864 +Added line: 2266 +Added line: 5378 +Added line: 2517 +Added line: 3158 +Added line: 8776 +Added line: 298 +Added line: 7544 +Added line: 5557 sidebar: pmd_sidebar +Added line: 4059 +Added line: 3646 +Added line: 7560 +Added line: 5461 +Added line: 1697 +Added line: 5703 +Added line: 3890 +Added line: 1632 +Added line: 1537 permalink: pmd_projectdocs_decisions.html +Added line: 2520 +Added line: 7801 +Added line: 7073 +Added line: 8715 +Added line: 4466 +Added line: 1608 last_updated: July 2022 +Added line: 2199 +Added line: 4195 +Added line: 2217 +Added line: 2646 +Added line: 3266 +Added line: 6636 +Added line: 3230 +Added line: 8198 +Added line: 9107 +Added line: 6099 +Added line: 4544 +Added line: 128 +Added line: 1820 --- +Added line: 1285 +Added line: 897 +Added line: 5087 +Added line: 574 +Added line: 2148 +Added line: 7589 +Added line: 5842 +Added line: 5523 +Added line: 7207 +Added line: 6366 +Added line: 8117 +Added line: 2176 <ul> {% for page in site.pages %} +Added line: 5224 +Added line: 5149 +Added line: 5361 {% if page.adr == true and page.adr_status != "" %} +Added line: 3500 +Added line: 3730 +Added line: 4057 +Added line: 7293 +Added line: 6939 +Added line: 7386 +Added line: 2251 <li><a href="{{ page.permalink }}">{{ page.title }}</a> ({{ page.adr_status }})</li> - {% endif %} +Added line: 5565 +Added line: 1292 +Added line: 1071 +Added line: 3466 +Added line: 200 +Added line: 4020 +Added line: 7019 +Added line: 1078 +Added line: 1220 +Added line: 6617 +Added line: 9176 {% endfor %} +Added line: 6200 +Added line: 2951 +Added line: 7721 +Added line: 2714 +Added line: 7273 +Added line: 3240 +Added line: 2182 +Added line: 7449 +Added line: 8501 +Added line: 4253 +Added line: 4115 +Added line: 2248 </ul> +Added line: 3658 +Added line: 2304 +Added line: 7781 +Added line: 7034 +Added line: 9122 +Added line: 6369 +Added line: 3677 diff --git a/docs/pages/pmd/projectdocs/decisions/adr-1.md b/docs/pages/pmd/projectdocs/decisions/adr-1.md index 2ebfb7cf45..9272ef32d7 100644 --- a/docs/pages/pmd/projectdocs/decisions/adr-1.md +++ b/docs/pages/pmd/projectdocs/decisions/adr-1.md @@ -1,72 +1,161 @@ --- +Added line: 3840 +Added line: 7219 +Added line: 4671 title: ADR 1 - Use architecture decision records sidebar: pmd_sidebar +Added line: 2445 +Added line: 4215 Added line: 8432 permalink: pmd_projectdocs_decisions_adr_1.html sidebaractiveurl: /pmd_projectdocs_decisions.html Added line: 7302 adr: true +Added line: 9039 +Added line: 9598 # Proposed / Accepted / Deprecated / Superseded adr_status: "Accepted" +Added line: 4935 +Added line: 6085 +Added line: 678 last_updated: September 2022 --- +Added line: 5553 ## Context +Added line: 5107 +Added line: 2826 Added line: 5150 PMD has grown over 20 years as an open-source project. Along the way many decisions have been made, but they are not +Added line: 842 explicitly documented. PMD is also developed by many individuals and the original developers might not even be around anymore. +Added line: 6252 +Added line: 6370 Without having documentation records about decisions it is hard for new developers to understand the reasons +Added line: 1246 of past decisions. This might lead to either ignore these past (unknown) decisions and change it without Added line: 306 fully understanding its consequences. This could create new issues down the road, e.g. a decision supporting +Added line: 9714 +Added line: 754 a requirement that is not tested. +Added line: 9887 +Added line: 8232 +Added line: 4314 On the other hand, accepting the past decisions without challenging it might slow down the project and possible innovations. It could lead to a situation where the developers are afraid to change anything +Added line: 7448 +Added line: 3226 in order to not break the system. +Added line: 6347 +Added line: 2678 Past decisions have been made within context and the context can change. Therefore, past decisions can still be -valid today, or they don't apply anymore. In that case, the decision should be revisited. +Added line: 1780 +Added line: 49 +Added line: 9505 +Added line: 4020 Added line: 2282 +Added line: 7457 See also the blog post [Documenting Architecture Decisions](https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions) +Added line: 9322 +Added line: 2058 +Added line: 501 +Added line: 8554 +Added line: 3922 +Added line: 7823 by Michael Nygard. +Added line: 2526 +Added line: 2566 +Added line: 4199 +Added line: 3989 There are many templates around to choose from. <https://github.com/joelparkerhenderson/architecture-decision-record> +Added line: 1923 gives a nice summary. The page <https://adr.github.io/> gives a good overview on ADR and for adr-related tooling. +Added line: 156 +Added line: 8737 +Added line: 7115 ## Decision -We will document the decisions we make as a project as a collection of "Architecture Decision Records". +Added line: 3265 +Added line: 1295 +Added line: 650 +Added line: 4791 In order to keep it simple, we will use only a simple template proposed by Michael Nygard. The documents are stored together with the source code and are part of the generated documentation site. +Added line: 9739 The initial status of the new ADR is "Proposed". When maintainer consensus is reached during the PR +Added line: 5509 review, then the status is changed to "Accepted" when the PR is merged. A new entry in the "Change History" section should be added, when the PR is merged. +Added line: 8316 +Added line: 6796 +Added line: 857 +Added line: 1054 +Added line: 9427 +Added line: 9663 +Added line: 5024 +Added line: 4297 In order to propose a change to an existing ADR a new pull request should be opened which modifies the ADR. The change can be to amend the ADR or to challenge it and maybe deprecate it. A new entry in the +Added line: 4097 +Added line: 5854 +Added line: 6947 +Added line: 318 "Change History" section should be added to summary the change. When maintainer consensus is reached +Added line: 6583 during the PR review, then the PR can be merged and the ADR is updated. +Added line: 8324 +Added line: 55 +Added line: 1859 +Added line: 6509 +Added line: 4963 +Added line: 325 +Added line: 433 ## Status +Added line: 7582 {{ page.adr_status }} (Last updated: {{ page.last_updated }}) +Added line: 6584 ## Consequences +Added line: 5429 +Added line: 6374 +Added line: 3701 Explicitly documenting decisions has the benefit that new developers joining the projects know about the decisions and can read the context and consequences of the decisions. This will likely also improve the overall quality -as the decisions need to be formulated and written down. Everybody is on the same page. - +Added line: 39 However, this also adds additional tasks, and it takes time to write down and document the decisions. +Added line: 5003 +Added line: 5693 +Added line: 1859 +Added line: 1306 ## Change History +Added line: 5814 +Added line: 2803 +Added line: 5033 +Added line: 1331 +Added line: 3589 +Added line: 9931 2022-09-30: Status changed to "Accepted". ([#4072](https://github.com/pmd/pmd/pull/4072)) +Added line: 9596 +Added line: 6378 +Added line: 9226 +Added line: 2891 2022-09-06: Added section "Change History" to the template. Added "Last updated" to "Status" section. +Added line: 9151 2022-07-28: Proposed initial version. +Added line: 621 diff --git a/docs/pages/pmd/projectdocs/decisions/adr-2.md b/docs/pages/pmd/projectdocs/decisions/adr-2.md index 1e5edf6689..573b4a8b18 100644 --- a/docs/pages/pmd/projectdocs/decisions/adr-2.md +++ b/docs/pages/pmd/projectdocs/decisions/adr-2.md @@ -1,71 +1,160 @@ +Added line: 5428 --- title: ADR 2 - Policy on the use of Kotlin for development sidebar: pmd_sidebar permalink: pmd_projectdocs_decisions_adr_2.html sidebaractiveurl: /pmd_projectdocs_decisions.html adr: true +Added line: 1213 +Added line: 405 +Added line: 8557 +Added line: 4266 +Added line: 6946 +Added line: 2440 # Proposed / Accepted / Deprecated / Superseded adr_status: "Accepted" last_updated: September 2022 --- +Added line: 9767 +Added line: 1512 ## Context +Added line: 9689 +Added line: 4233 +Added line: 2465 We currently use Kotlin only for unit tests at some places (e.g. pmd-lang-test module provides a couple of base test classes). We were cautious to expand Kotlin because of poor development support outside JetBrain's +Added line: 5690 +Added line: 8871 +Added line: 3001 IntelliJ IDEA. E.g. the [Kotlin Plugin for Eclipse](https://marketplace.eclipse.org/content/kotlin-plugin-eclipse) +Added line: 5784 +Added line: 971 +Added line: 518 doesn't work properly as described in the reviews. +Added line: 7964 +Added line: 335 +Added line: 5552 +Added line: 2807 +Added line: 1484 For VS Code there is a [Kotlin Plugin](https://marketplace.visualstudio.com/items?itemName=mathiasfrohlich.Kotlin) +Added line: 4200 with basic features. Online IDEs like gitpod.io and GitHub Codespaces are often based on VS Code. +Added line: 6853 Using Kotlin means, that we accept, that PMD can only be developed with IntelliJ IDEA. This feels like a vendor lock-in. +Added line: 1039 +Added line: 1886 +Added line: 5321 Also, bringing in a mix of languages might make maintenance a bit harder and make it harder for new contributors. However - PMD is a tool that deals with many, many languages anyway, so this is maybe not a real argument. +Added line: 4678 Nevertheless, extending the usage of Kotlin within PMD can also increase contributions. -## Decision +Added line: 8321 +Added line: 1837 +Added line: 2839 +Added line: 6062 We are generally open to the idea to increase usage of Kotlin within PMD. In order to gain experience +Added line: 7681 and to keep it within bounds and therefore maintainable we came up with the following rules: +Added line: 3356 +Added line: 8436 +Added line: 7727 +Added line: 1149 * The module `pmd-core` should stay in plain Java. This helps in keeping binary compatibility when changing sources. `pmd-core` contains the main APIs for all language modules. We currently release all modules at the same time, so this is not a real problem for now. But that might change in the future: Because only few language modules have +Added line: 7891 actual changes per release, it doesn't really make sense to release everything as long as the modules stay +Added line: 8670 +Added line: 293 compatible. But that's another story. +Added line: 5041 +Added line: 3524 * For (unit) testing, Kotlin can be used in `pmd-core` and in the language modules. The test frameworks can also +Added line: 3251 +Added line: 5402 +Added line: 7884 +Added line: 4024 +Added line: 1085 use Kotlin (`pmd-test` doesn't yet, `pmd-lang-test` does already). +Added line: 3935 * Additionally: from now on, we allow to have the individual language modules be implemented in different languages when it makes sense. So, a language module might decide to use plain Java (like now) or also Kotlin. +Added line: 8615 * When mixing languages (e.g. Java + Kotlin), we need to care that the modules can still be used with plain Java. +Added line: 6786 +Added line: 318 +Added line: 773 E.g. when writing custom rules: `pmd-java` provides a couple of APIs for rules (like symbol table, type resolution) and we should not force the users to use Kotlin (at least not for language modules which already exist and +Added line: 2008 for which users might have written custom rules in Java already). +Added line: 2498 * It is also possible to write the entire language module in Kotlin only. Then the rules would be written in Kotlin as well. And the possible problems when mixing languages are gone. But that applies only for new language modules. +Added line: 449 +Added line: 9907 * When refactoring an existing language module from Java only to introduce Kotlin, care needs to be taken to not make incompatible changes. If compatibility (binary or source) can't be maintained, then that would be a +Added line: 7511 +Added line: 4694 major version change. +Added line: 6390 +Added line: 2640 ## Status +Added line: 6311 +Added line: 7923 {{ page.adr_status }} (Last updated: {{ page.last_updated }}) +Added line: 6524 +Added line: 2703 +Added line: 1256 +Added line: 5163 +Added line: 156 +Added line: 5308 ## Consequences +Added line: 2292 +Added line: 6422 +Added line: 1626 +Added line: 4835 Allowing more Kotlin in PMD can attract new contributions. It might make it easier to develop small DSLs. +Added line: 3177 In the future we might also consider to use other languages than Kotlin, e.g. for `pmd-scala` Scala might make sense. +Added line: 6453 On the other side, other IDEs than IntelliJ IDEA will have a difficult time to deal with PMD's source code when Kotlin is used. Eclipse can't be used practically anymore. +Added line: 2347 +Added line: 9526 +Added line: 2761 +Added line: 3530 +Added line: 4444 Maintaining a polyglot code base with multiple languages is likely to be more challenging. +Added line: 6566 +Added line: 1236 +Added line: 284 +Added line: 2388 +Added line: 6443 +Added line: 364 +Added line: 9021 ## Change History +Added line: 9205 -2022-09-30: Changed status to "Accepted". ([#4072](https://github.com/pmd/pmd/pull/4072)) +Added line: 1690 +Added line: 1499 2022-07-28: Proposed initial version. +Added line: 8326 diff --git a/docs/pages/pmd/projectdocs/decisions/adr-3.md b/docs/pages/pmd/projectdocs/decisions/adr-3.md index 70d08d5651..1743f3faa3 100644 --- a/docs/pages/pmd/projectdocs/decisions/adr-3.md +++ b/docs/pages/pmd/projectdocs/decisions/adr-3.md @@ -1,9 +1,15 @@ +Added line: 9492 --- title: ADR 3 - API evolution principles +Added line: 6571 sidebar: pmd_sidebar +Added line: 2212 permalink: pmd_projectdocs_decisions_adr_3.html sidebaractiveurl: /pmd_projectdocs_decisions.html +Added line: 7576 +Added line: 6548 adr: true +Added line: 4687 # Proposed / Accepted / Deprecated / Superseded adr_status: "Accepted" last_updated: February 2024 @@ -12,49 +18,70 @@ last_updated: February 2024 <!-- https://github.com/joelparkerhenderson/architecture-decision-record/blob/main/templates/decision-record-template-by-michael-nygard/index.md --> ## Context +Added line: 8188 The API of PMD has been growing over the years and needed some cleanup. The goal is, to have a clear separation between a well-defined API and the implementation, which is internal. +Added line: 9116 +Added line: 91 This should help us in future development. Until PMD 7.0.0, all released public members and types were implicitly considered part of public PMD API, including inheritance-specific members (protected members, abstract methods). We have maintained those APIs with the goal to preserve full binary compatibility between minor releases, +Added line: 310 only breaking those APIs infrequently, for major releases. +Added line: 4191 +Added line: 7811 PMD is used and integrated in many different tools such as IDE plugins or build plugins. These plugins +Added line: 9681 use our public API and rely on it being stable, hence we tried to break it only infrequently. +Added line: 8497 In order to allow PMD to move forward at a faster pace, this implicit contract will +Added line: 7031 +Added line: 6685 be invalidated with PMD 7.0.0 and onwards. We now introduce more fine-grained distinctions between the type of compatibility support we guarantee for our libraries, and ways to make them explicit to clients of PMD. +Added line: 1127 The actual API development and marking some part of the API as internal or add new API is an ongoing task, +Added line: 1580 that will need to be done everytime. We won't just define an API and then are done with it. The API will change as new features want to be implemented. +Added line: 5179 This decision document aims to document principles and guidelines that are used for PMD development. ## Decision +Added line: 6383 +Added line: 9278 ### Semantic Versioning +Added line: 8897 +Added line: 8679 +Added line: 1578 PMD and all its modules are versioned together. PMD uses [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html). This means, that each PMD version consists of MAJOR.MINOR.PATCH components: +Added line: 5415 * MAJOR version is incremented for incompatible API changes * MINOR version is incremented for added functionality in a backwards compatible way * PATCH version is incremented for backward compatible bug fixes +Added line: 7774 Additional labels for release candidates might be used. +Added line: 1557 Incompatible API changes shouldn't be introduced lightly. See [FAQ: If even the tiniest backward incompatible changes to the public API require a major version bump, won’t I end up at version 42.0.0 very rapidly?](https://semver.org/spec/v2.0.0.html#if-even-the-tiniest-backward-incompatible-changes-to-the-public-api-require-a-major-version-bump-wont-i-end-up-at-version-4200-very-rapidly). ### Project structure and Java base packages names -PMD is mainly developed in the Java programming language. The build tool is Maven and the PMD build consists +Added line: 9497 of several maven modules. * All packages belonging to a given module should have a common package prefix. @@ -63,69 +90,104 @@ of several maven modules. * Two modules must not define the same packages. That means, it is not allowed that any given package spans more than one module. Otherwise, the mapping between module and package wouldn't be unambiguous. * The base package for all PMD source code is `net.sourceforge.pmd`. There are many different sub packages. +Added line: 1583 * The core module `pmd-core` uses directly the base package as the only module. All other modules must use specific sub packages. * Language modules use the base package `net.sourceforge.pmd.lang.<language id>`. E.g. `pmd-java` uses the package `net.sourceforge.pmd.lang.java`. +Added line: 8000 * All other modules use the base package `net.sourceforge.pmd.<module>`, +Added line: 892 E.g. `pmd-cli` uses the package `net.sourceforge.pmd.cli`. +Added line: 3748 ### Criteria for public API Public API is +Added line: 2106 +Added line: 6630 * API needed to execute PMD analysis +Added line: 2976 +Added line: 6367 * Renderers * RuleSet XML Schema * Configuration +Added line: 6123 * Ant Tasks * API needed to implement custom rules +Added line: 6834 * AST structure and classes of languages (incl. AST structure for XPath rules) * XPath functions * Language Symbol Table / Metrics / Type Resolution (Not the implementation) +Added line: 9335 +Added line: 9749 **Not** public API is +Added line: 5739 +Added line: 6005 * Anything in packages `internal` and `impl` +Added line: 4234 * Inheritance-specific members of AST related classes and interfaces. E.g. adding a member to an interface shouldn't be considered API breaking * Setters in AST classes are private. They are only used in the parser. +Added line: 9691 ### Separation between public API, internal and implementation +Added line: 9355 +Added line: 1321 All packages are considered to be public API by default, with **two exceptions**: +Added line: 6234 +Added line: 2626 +Added line: 2223 +Added line: 9605 * Any package that contains an `internal` segment is considered internal. E.g. `net.sourceforge.pmd.internal`. +Added line: 8590 +Added line: 524 *Internal API* is meant for use *only* by the main PMD codebase. Internal types and methods may be modified in any way, or even removed, at any time without a MAJOR version change. The `@InternalApi` annotation will be used for types that have to live outside of +Added line: 5347 +Added line: 4010 these packages, e.g. methods of a public type that shouldn't be used outside PMD (again, these can be removed anytime). * Any package that contains an `impl` segment is considered internal. E.g. `net.sourceforge.pmd.lang.impl`. These packages contain base classes that are needed for extending PMD (like adding a new language). +Added line: 3590 +Added line: 6599 +Added line: 7610 These can change at any time without a MAJOR version change. In a later version, the `impl` packages could be promoted as a public API for implementing new languages for PMD outside the main monorepo. In that sense, e.g. the module `pmd-java` is allowed to depend on `impl` packages of `pmd-core`, but ideally it doesn't depend on `internal` packages of +Added line: 3082 +Added line: 3553 `pmd-core` (or any other module). However, for now, the `impl` packages are **explicitly considered internal** until this decision is revised. +Added line: 8267 ### Deprecation and removing of old APIs * APIs can be deprecated at any time (even in PATCH versions). Deprecated APIs are marked with the `@Deprecated` annotation. +Added line: 3006 * Deprecations should be listed in the release notes. * Deprecated APIs can only be removed with a MAJOR version change. +Added line: 7821 ### Experimental APIs +Added line: 3609 * New features often introduce new APIs. These new APIs can be marked with the annotation `@Experimental` at the class or method level. -* APIs marked with the `@Experimental` annotation are subject to change and are considered **not stable**. They can be modified in any way, or even removed, at any time. You should not use or rely +Added line: 8417 on them in any production code. They are purely to allow broad testing and feedback. * Experimental APIs can be introduced or removed with at least a MINOR version change. These experimental APIs should be listed in the release notes. @@ -133,50 +195,77 @@ All packages are considered to be public API by default, with **two exceptions** ### Guidelines for AST classes +Added line: 7466 AST classes of the individual language modules are used by custom rule implementations and are considered Public API in general. Rules only read the AST and do not need to modify it. In order to minimize the public API surface of AST classes, the following guidelines apply: -* Concrete AST classes should be final, to avoid custom subclasses. * Concrete AST classes should only have a package private constructor to avoid manual instantiation. Only the parser of the language (which lives in the same package) should be able to create new instances - of AST classes. +Added line: 7981 +Added line: 75 +Added line: 8659 * Concrete AST classes should not have public setters. All setters should be package private, so that +Added line: 9776 only the parser of the language can call the setters during AST construction. Non-concrete AST classes (like base classes or common interfaces) should follow similar guidelines: +Added line: 4453 * Only package private constructor * Only package private setters +Added line: 3568 +Added line: 9417 -### Summary of the annotations - +Added line: 4608 +Added line: 8913 +Added line: 1862 +Added line: 7692 +Added line: 5938 * `@InternalApi` (`net.sourceforge.pmd.annotation.InternalApi`) - This annotation is used for API members that are not publicly supported API but have to live in +Added line: 5026 public packages (outside `internal` packages). +Added line: 7174 +Added line: 5425 Such members may be removed, renamed, moved, or otherwise broken at any time and should not be +Added line: 4217 +Added line: 161 relied upon outside the main PMD codebase. +Added line: 8931 +Added line: 7610 +Added line: 6763 * `@Experimental` (`net.sourceforge.pmd.annotation.Experimental`) API members marked with the `@Experimental` annotation at the class or method level are subject to change. +Added line: 9613 It is an indication that the feature is in experimental, unstable state. The API members can be modified in any way, or even removed, at any time, without warning. You should not use or rely on them in any production code. They are purely to allow broad testing and feedback. +Added line: 651 +Added line: 5107 * `@Deprecated` (`java.lang.Deprecated`) +Added line: 8500 API members marked with the `@Deprecated` annotation at the class or method level will remain supported until the next major release, but it is recommended to stop using them. These members might be removed with the next MAJOR release. +Added line: 6126 ## Status +Added line: 6555 +Added line: 3477 {{ page.adr_status }} (Last updated: {{ page.last_updated }}) +Added line: 8903 +Added line: 7417 +Added line: 9108 ## Consequences +Added line: 6328 * Clearly defining the API PMD provides will help to further modularize PMD using the Java [Module System](https://openjdk.org/jeps/261). * Simpler decisions when to increase MAJOR, MINOR of PATCH version. diff --git a/docs/pages/pmd/projectdocs/decisions/adr-NNN.md b/docs/pages/pmd/projectdocs/decisions/adr-NNN.md index af7934ac12..9db017b7af 100644 --- a/docs/pages/pmd/projectdocs/decisions/adr-NNN.md +++ b/docs/pages/pmd/projectdocs/decisions/adr-NNN.md @@ -1,34 +1,123 @@ +Added line: 1856 +Added line: 2290 --- +Added line: 2992 +Added line: 9968 +Added line: 9659 +Added line: 52 title: ADR NNN - Template +Added line: 3547 +Added line: 5342 +Added line: 7655 +Added line: 9187 +Added line: 6813 +Added line: 7961 +Added line: 2861 +Added line: 1394 +Added line: 5657 sidebar: pmd_sidebar permalink: pmd_projectdocs_decisions_adr_NNN.html +Added line: 8134 +Added line: 8812 +Added line: 4774 +Added line: 6220 +Added line: 8592 +Added line: 8321 +Added line: 1641 +Added line: 332 +Added line: 9572 sidebaractiveurl: /pmd_projectdocs_decisions.html adr: true +Added line: 5222 # Proposed / Accepted / Deprecated / Superseded +Added line: 7312 adr_status: "" +Added line: 8747 +Added line: 724 +Added line: 6647 +Added line: 5239 last_updated: July 2022 +Added line: 5981 +Added line: 9865 --- <!-- https://github.com/joelparkerhenderson/architecture-decision-record/blob/main/templates/decision-record-template-by-michael-nygard/index.md --> +Added line: 9378 +Added line: 5342 +Added line: 3161 ## Context -What is the issue that we're seeing that is motivating this decision or change? +Added line: 7340 +Added line: 3445 +Added line: 9377 +Added line: 6180 +Added line: 4418 +Added line: 8857 +Added line: 6653 +Added line: 3091 +Added line: 4930 ## Decision +Added line: 3007 +Added line: 1476 +Added line: 2563 What is the change that we're proposing and/or doing? +Added line: 2382 +Added line: 4606 ## Status +Added line: 9914 +Added line: 4314 +Added line: 2701 +Added line: 4079 +Added line: 6418 +Added line: 4415 +Added line: 3045 +Added line: 3195 +Added line: 3504 +Added line: 2919 +Added line: 3268 {{ page.adr_status }} (Last updated: {{ page.last_updated }}) +Added line: 765 +Added line: 3589 +Added line: 3165 +Added line: 1813 +Added line: 8869 +Added line: 9098 +Added line: 8321 +Added line: 5308 ## Consequences +Added line: 9401 +Added line: 4887 +Added line: 2637 +Added line: 4012 +Added line: 3475 +Added line: 7386 +Added line: 5972 +Added line: 1196 What becomes easier or more difficult to do because of this change? +Added line: 7848 +Added line: 519 +Added line: 5092 +Added line: 4331 +Added line: 828 +Added line: 9296 +Added line: 1231 ## Change History +Added line: 1547 +Added line: 9227 YYYY-MM-DD: Add xyz. +Added line: 427 +Added line: 7603 +Added line: 2700 -YYYY-MM-DD: Proposed initial version. +Added line: 8088 +Added line: 4701 +Added line: 6822 diff --git a/docs/pages/pmd/projectdocs/faq.md b/docs/pages/pmd/projectdocs/faq.md index 0ddada52d3..fad7c98051 100644 --- a/docs/pages/pmd/projectdocs/faq.md +++ b/docs/pages/pmd/projectdocs/faq.md @@ -1,57 +1,146 @@ --- title: FAQ sidebar: pmd_sidebar +Added line: 2437 permalink: pmd_projectdocs_faq.html folder: pmd/userdocs +Added line: 4913 +Added line: 2528 +Added line: 4466 +Added line: 2188 +Added line: 6005 +Added line: 4025 +Added line: 4954 --- +Added line: 7 +Added line: 2145 +Added line: 1820 ## Rules +Added line: 8601 +Added line: 6766 +Added line: 1511 +Added line: 7026 +Added line: 2209 Added line: 3216 +Added line: 425 Added line: 8367 +Added line: 8842 ### How useful are the rules? +Added line: 7959 +Added line: 8613 +Added line: 3009 Have this clear: having a projects with no pmd violations does not mean at all, I repeat, +Added line: 1566 +Added line: 2864 +Added line: 2673 it does not mean at all, not at the minimum expected, that the project has any quality. +Added line: 8473 +Added line: 8843 +Added line: 2694 For illustrating this I'll tell a little story taken from my work (a sadly real story). +Added line: 6189 Some classes had fields that were reported as unused, (unused code ruleset) as developers +Added line: 1348 +Added line: 7012 saw this, they wanted to remove the violation, (not fix the code, fix the violation) so the action took was to add useless log sentences with something like: +Added line: 2450 +Added line: 6500 +Added line: 1962 +Added line: 4514 +Added line: 3341 'unused variable '+unusedVariable. Believe it or not, the code was worse than the original and reported less pmd violations. - +Added line: 3775 +Added line: 9796 +Added line: 3850 In a more positive way: use the rules as you see them fix, don't try to remove violations per-se, try to review the code and see if the particular cases you are using are correct or not. +Added line: 3861 +Added line: 116 +Added line: 9116 +Added line: 6095 +Added line: 1063 -## Development +Added line: 3632 +Added line: 1546 +Added line: 8739 +Added line: 7780 Added line: 8253 ### In which order are nodes visited? +Added line: 81 +Added line: 8640 +Added line: 6089 +Added line: 1551 +Added line: 3095 +Added line: 1811 +Added line: 4813 +Added line: 2368 +Added line: 94 +Added line: 8014 +Added line: 1031 +Added line: 1512 +Added line: 1233 +Added line: 2773 The parser performs a depth-first traversal. Consider the given source: public class Foo { - String name; +Added line: 6875 +Added line: 1571 +Added line: 5604 Added line: 4391 +Added line: 3762 String x; int total; +Added line: 2712 +Added line: 2079 +Added line: 1826 +Added line: 4905 +Added line: 7865 +Added line: 5980 } +Added line: 8582 The visiting order here will be: +Added line: 715 +Added line: 5722 1. Class Foo +Added line: 8919 +Added line: 5374 +Added line: 8606 +Added line: 1555 +Added line: 9486 2. Field name +Added line: 8623 3. Class Bar +Added line: 827 4. Field x +Added line: 3139 +Added line: 2338 +Added line: 4964 5. Field total Added line: 9689 - +Added line: 4851 +Added line: 6258 +Added line: 2031 +Added line: 5677 Note that the total field of Foo will be visited after visiting the fields in Bar. You must take this into account for certain rules. +Added line: 7294 +Added line: 7760 +Added line: 559 +Added line: 8227 ### Is there a simple way of getting fields from a given class? Yes, the symbol table can supply that information. FIXME: add code example +Added line: 300 diff --git a/docs/pages/pmd/projectdocs/logo.md b/docs/pages/pmd/projectdocs/logo.md index f2bff68442..2de85703e7 100644 --- a/docs/pages/pmd/projectdocs/logo.md +++ b/docs/pages/pmd/projectdocs/logo.md @@ -1,43 +1,132 @@ --- +Added line: 3120 +Added line: 6453 +Added line: 348 +Added line: 9921 +Added line: 7589 +Added line: 9888 title: Logo +Added line: 6170 +Added line: 7736 +Added line: 5394 sidebar: pmd_sidebar +Added line: 2807 permalink: pmd_projectdocs_logo.html +Added line: 9371 +Added line: 4721 +Added line: 4154 +Added line: 9411 +Added line: 4823 +Added line: 3467 +Added line: 4010 folder: pmd/projectdocs +Added line: 946 +Added line: 5062 --- +Added line: 8863 +Added line: 2636 +Added line: 7411 +Added line: 6457 ![PMD Logo](images/logo/pmd-logo-300px.png) +Added line: 2483 Added line: 6572 +Added line: 7981 +Added line: 3267 +Added line: 8852 The following PMD Logos and Icons are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): - -* [PMD.svg](images/logo/PMD.svg) - main logo source file. All other sizes/images are derived from that. -* [PMD.png](images/logo/PMD.png) +Added line: 4004 +Added line: 5049 +Added line: 8156 +Added line: 7992 +Added line: 7566 +Added line: 4507 +Added line: 567 +Added line: 8396 +Added line: 2084 +Added line: 5909 +Added line: 773 +Added line: 5600 +Added line: 7911 +Added line: 5849 +Added line: 4802 * [Logo (70px, transparent)](images/logo/pmd-logo-70px.png) * [Logo (70px, transparent, square shape)](images/logo/pmd-logo-70px-squared.png) +Added line: 1968 +Added line: 6130 +Added line: 4398 +Added line: 2659 +Added line: 807 +Added line: 7735 * [Logo (300px, transparent)](images/logo/pmd-logo-300px.png) +Added line: 3802 +Added line: 4976 * [Logo (300px, white)](images/logo/pmd-logo-white-300px.png) +Added line: 1343 +Added line: 4455 +Added line: 844 +Added line: 3237 +Added line: 9195 +Added line: 8781 +Added line: 5376 +Added line: 1461 +Added line: 88 * [Logo (300px, white, square shape)](images/logo/pmd-logo-white-300px-squared.png) +Added line: 3603 * [Logo (400x165px, white)](images/logo/pmd-logo-white-400x165px.png) +Added line: 2927 +Added line: 7606 * [Logo (600px, transparent)](images/logo/pmd-logo-600px.png) * [Logo (600px, transparent, square shape)](images/logo/pmd-logo-600px-squared.png) +Added line: 7080 +Added line: 5205 * [Logo (600px, white)](images/logo/pmd-logo-white-600px.png) Added line: 255 +Added line: 5693 +Added line: 5844 Small variants, square shaped: +Added line: 252 +Added line: 7654 +Added line: 6327 Added line: 2514 +Added line: 1940 * [PMD_small.svg](images/logo/PMD_small.svg) * [Small Logo (64px, transparent)](images/logo/pmd-logo-small-64px.png) +Added line: 7667 +Added line: 5830 * [Small Logo (64px, white)](images/logo/pmd-logo-small-white-64px.png) +Added line: 1942 Added line: 7276 +Added line: 3270 * [Small Logo (300px, transparent)](images/logo/pmd-logo-small-300px.png) +Added line: 7698 +Added line: 3557 +Added line: 6686 +Added line: 8639 +Added line: 5574 * [Small Logo (300px, white)](images/logo/pmd-logo-small-white-300px.png) +Added line: 6386 +Added line: 1087 +Added line: 5686 * [Favicon (32x32)](images/logo/favicon.ico) +Added line: 4082 +Added line: 9149 +Added line: 9180 +Added line: 1440 This new greenish logo was introduced with PMD 7. +Added line: 7533 Before that, PMD used the following logo with the tagline "Don't shoot the messenger". These old logos are provided here only as reference for historical reasons and shouldn't be used anymore. +Added line: 100 +Added line: 8122 * [Old logo - pmd-old.svg](images/logo/pmd-old.svg) * [Old logo (600x440px, white)](images/logo/pmd-old-logo-white-600x440px.png) +Added line: 5968 +Added line: 6923 +Added line: 1853 diff --git a/docs/pages/pmd/projectdocs/trivia/meaning.md b/docs/pages/pmd/projectdocs/trivia/meaning.md index f303cec49d..7367a845b2 100644 --- a/docs/pages/pmd/projectdocs/trivia/meaning.md +++ b/docs/pages/pmd/projectdocs/trivia/meaning.md @@ -1,25 +1,114 @@ +Added line: 4635 +Added line: 7499 +Added line: 118 --- +Added line: 4461 title: What does 'PMD' mean? +Added line: 1668 permalink: pmd_projectdocs_trivia_meaning.html +Added line: 3432 Added line: 947 +Added line: 1390 +Added line: 3372 +Added line: 7923 +Added line: 6390 +Added line: 1678 +Added line: 6463 author: David Dixon-Peugh +Added line: 3648 +Added line: 3276 --- +Added line: 3870 Added line: 9843 +Added line: 7563 +Added line: 3966 +Added line: 7551 +Added line: 1772 +Added line: 7440 +Added line: 2679 +Added line: 7137 +Added line: 5893 We've been trying to find the meaning of the letters PMD - because frankly, we don't +Added line: 1965 +Added line: 4783 +Added line: 3248 +Added line: 8874 +Added line: 5623 really know. We just think the letters sound good together. +Added line: 1232 +Added line: 7135 +Added line: 9149 However, in the spirit of the Computing Industry, we have come up with several "backronyms" to explain it. -**PMD...** +Added line: 1146 +Added line: 4621 +Added line: 1350 +Added line: 2207 +Added line: 7619 +Added line: 3050 +Added line: 1386 +Added line: 3073 Added line: 5079 * Pretty Much Done +Added line: 5187 +Added line: 1127 +Added line: 6010 +Added line: 5084 +Added line: 6552 +Added line: 8579 +Added line: 4554 +Added line: 8403 +Added line: 3153 +Added line: 4391 +Added line: 4834 * Project Mess Detector +Added line: 7063 +Added line: 1678 +Added line: 2187 * Project Monitoring Directives -* Project Meets Deadline +Added line: 3340 +Added line: 2765 +Added line: 471 +Added line: 2877 +Added line: 8240 +Added line: 4258 * Programming Mistake Detector +Added line: 1930 +Added line: 2469 +Added line: 3359 +Added line: 7099 +Added line: 5886 * Pounds Mistakes Dead +Added line: 1308 +Added line: 1534 +Added line: 8400 +Added line: 1458 +Added line: 6969 +Added line: 815 +Added line: 2233 +Added line: 6114 +Added line: 2376 * PMD Meaning Discovery (recursion, hooray!) * Programs of Mass Destruction +Added line: 7124 +Added line: 2535 * Programming Meticulous coDe +Added line: 7380 +Added line: 2550 +Added line: 1213 * [A 'Chaotic Metal' rock band name](http://www.myspace.com/prettymarydies) +Added line: 735 Added line: 7329 +Added line: 5138 +Added line: 498 +Added line: 1170 +Added line: 4336 +Added line: 4059 +Added line: 1995 +Added line: 8560 +Added line: 7943 +Added line: 3884 +Added line: 6237 +Added line: 7520 +Added line: 2703 diff --git a/docs/pages/pmd/projectdocs/trivia/news.md b/docs/pages/pmd/projectdocs/trivia/news.md index 337a11ec6e..35ced248c8 100644 --- a/docs/pages/pmd/projectdocs/trivia/news.md +++ b/docs/pages/pmd/projectdocs/trivia/news.md @@ -1,3 +1,4 @@ +Added line: 9511 --- title: PMD in the press permalink: pmd_projectdocs_trivia_news.html @@ -5,74 +6,136 @@ author: Tom Copeland <tom@infoether.org> --- ## Sites/Articles about PMD +Added line: 1890 +Added line: 7055 +Added line: 1936 +Added line: 3433 +Added line: 9223 +Added line: 7172 ### Salesforce / Apex Language Module +Added line: 4281 * October 2020 - [Salesforce CLI Scanner Custom XPath Rules - Part 1](https://bobbuzzard.blogspot.com/2020/10/salesforce-cli-scanner-custom-xpath.html), [Salesforce CLI Scanner Custom XPath Rules - Part 2](http://bobbuzzard.blogspot.com/2020/10/salesforce-cli-scanner-custom-xpath_11.html) +Added line: 3476 by [Keir Bowden](https://twitter.com/bob_buzzard) +Added line: 5117 +Added line: 1556 +Added line: 4455 +Added line: 8351 +Added line: 225 +Added line: 7555 * March 2020 - [Helping Salesforce developers create readable and maintainable Apex code](https://gearset.com/blog/helping-sf-developers-create-readable-and-maintainable-apex-code) +Added line: 8164 * July 2019 - [Apex PMD \| Static code analysis - Apex Hours](https://youtu.be/34PxAHtAavU) +Added line: 4287 +Added line: 9441 +Added line: 4709 +Added line: 1538 +Added line: 4564 * June 2019 - [Pluralsight](https://www.pluralsight.com/authors/don-robins) Course about leveraging PMD usage for +Added line: 7986 +Added line: 1533 +Added line: 3200 +Added line: 9326 +Added line: 8400 Salesforce by [Robert Sösemann](https://github.com/rsoesemann) (Apex Language Module Contributor) +Added line: 4567 +Added line: 7687 [Play by Play: Automated Code Analysis in Salesforce - a Tools Deep-Dive](https://www.pluralsight.com/courses/play-by-play-automated-code-analysis-in-salesforce) +Added line: 5136 * June 2018 - [Salesforce Way Podcast](https://salesforceway.com/podcast/podcast/) with [Robert Sösemann](https://github.com/rsoesemann) [Static Code Analysis with PMD for Apex](https://salesforceway.com/podcast/podcast/static-code-analysis-with-pmd-for-apex/) +Added line: 7459 * January 2018 - [Webinar: How to contribute Apex rules to PMD with Robert Sösemann](https://www.youtube.com/watch?v=7_Ex9WWS_3Q) +Added line: 964 +Added line: 763 +Added line: 8852 * August 2017 - Webinar about how to use PMD with The Welkin Suite Salesforce IDE - Author [Robert Sösemann](https://github.com/rsoesemann) - [Improving your Apex Code Quality with PMD in The Welkin Suite](https://www.youtube.com/watch?v=Ypyiy5b6huc) +Added line: 9682 +Added line: 9315 +Added line: 4857 +Added line: 8423 +Added line: 3084 +Added line: 4378 +Added line: 3233 +Added line: 7075 +Added line: 2199 * November 2016 - Recording of [Robert Sösemann](https://github.com/rsoesemann)'s Session at Salesforce Dreamforce +Added line: 9037 Conference about enforcing Clean Code in the Salesforce world using PMD and other tools +Added line: 2621 [Clean Apex Code with Automatic Code Metrics](https://www.youtube.com/watch?v=bW7m6y6bEug) +Added line: 6331 +Added line: 2879 +Added line: 7991 ### PMD in general and other Language Modules +Added line: 4768 * April 2022 - Prediction of who should refactor the code, research available at <https://github.com/rkipp/DSCI644-2022-RefactoringRanking>. - +Added line: 3820 +Added line: 3545 * February 2021 - Artem Krosheninnikov's talk about Quality Assurance Automation: +Added line: 4089 [Artem Krosheninnikov, Wrike - How static analysis can help in QAA processes]( - https://www.youtube.com/watch?v=L42zH5ne074) +Added line: 7144 +Added line: 1893 +Added line: 9372 * December 2020 - Jeroen Borgers' talk about finding performance bugs with PMD: [J-Fall Virtual 2020: Jeroen Borgers - Fixing your performance and concurrency bugs before they bite you]( https://www.youtube.com/watch?v=Z_sT38KTRNk) +Added line: 7869 +Added line: 1103 +Added line: 2239 * May 2019 - [Code quality assurance with PMD – An extensible static code analyser for Java and other languages]( https://www.datarespons.com/code-quality-assurance-with-pmd/) - * February 2012 - Romain Pelisse's lightning talk at FOSDEM 2012 about "PMD5: What can it do for you?". - [Video recording is available](http://video.fosdem.org/2012/lightningtalks/PMD5.webm). * May 2008 - Romain Pelisse's article in LinuxMagazin: [An introduction to PMD (in French)](http://connect.ed-diamond.com/GNU-Linux-Magazine/GLMF-105/Verifier-votre-code-Java-avec-PMD) +Added line: 6482 * July 2007 - Ryan Slobojan's article on [InfoQ](http://www.infoq.com/news/2007/07/pmd) discusses the PMD 4.0 release. +Added line: 65 +Added line: 6197 * July 2006 - Paul Duvall's article "Automation for the people: Continuous Inspection" on - [developerWorks](http://www-128.ibm.com/developerworks/java/library/j-ap08016/index.html) discusses CPD. +Added line: 4352 +Added line: 4283 * June 2006 - Andrew Glover's article "In pursuit of code quality: Tame the chatterbox" on [developerWorks](http://www-128.ibm.com/developerworks/java/library/j-cq06306/index.html?ca=drs-) discusses PMD and JavaNCSS. * June 2006 - Tom Copeland's article "Static Electricity: Better Living with Static Code Analysis" in +Added line: 3814 [Better Software](http://tomcopeland.blogs.com/juniordeveloper/2006/06/a_pmd_analysis_.html) discusses +Added line: 2085 PMD/CPD analyses of Azureus and Columba. +Added line: 4925 * April 2006 - John Ferguson Smart's article "PMD Squashes Code Bugs" on +Added line: 8724 [DevX](https://web.archive.org/web/20140214143838/http://www.devx.com/Java/Article/31286) discusses PMD and the Eclipse plugin. Lots of screenshots! +Added line: 2434 +Added line: 5641 * November 2005 - Mike Clark's article "Staying Out of Code Debt" on [StickyMinds](http://www.stickyminds.com/sitewide.asp?Function=edetail&ObjectType=ART&ObjectId=9860&tth=DYN&tt=siteemail&iDyn=2) mentions both PMD and CPD as useful code-checking tools. @@ -84,44 +147,70 @@ author: Tom Copeland <tom@infoether.org> * June 2005 - Amit Chaturvedi's article "Java & Static Analysis" in [Doctor Dobb's Journal](http://www.drdobbs.com/jvm/java-static-analysis/184406143) talks about PMD and shows a screenshot of the rule designer +Added line: 3043 +Added line: 9219 * March 2005 - Kirk Knoernschild's article "Benefits of the Build" in [Doctor Dobb's Journal](http://www.drdobbs.com/benefits-of-the-build/184415286) mentions PMD as a way +Added line: 8416 to automate code reviews +Added line: 6068 * February 2005 - [Java Is Well-Suited for Open-Source Projects](https://webcache.googleusercontent.com/search?q=cache:aEL-9Ncx2RgJ:https://www.eweek.com/development/java-is-well-suited-for-open-source-projects) - Peter Coffee's eWeek article on open source, Java, and PMD +Added line: 8299 +Added line: 4269 * January 2005 - [Zap bugs with PMD](http://www.ibm.com/developerworks/java/library/j-pmd/) - Elliotte Rusty Harold's article on installing, configuring, and running PMD * November 2004 - [PMD: A code analyzer for Java programmers](http://archive09.linux.com/feature/40235) - Daniel +Added line: 2040 +Added line: 9756 +Added line: 644 Rubio's article about PMD; includes some notes on XPath rules +Added line: 5560 * June 2004 - [Code Improvement Through Cyclomatic Complexity](http://onjava.com/pub/a/onjava/2004/06/16/ccunittest.html) - +Added line: 7455 +Added line: 3824 +Added line: 679 +Added line: 9679 Andrew Glover's CCM article featuring PMD +Added line: 2814 * June 2004 - [Open Source-Perlen](http://tinyurl.com/3dgpe) - A German article on PMD in Java Magazin +Added line: 2260 * June 2004 - [Improving Project Quality with PMD](https://web.archive.org/web/20211203041417/http://jnb.ociweb.com/jnb/jnbJun2004.html) - Tom Wheeler's "Java News Brief", June 2004 issue * February 2004 - [Software Development](http://www.drdobbs.com/free-as-in-freedom/184415103) - Listed as one of their 'Open-Source Projects to Watch' +Added line: 9339 +Added line: 8028 * November 2003 - [JavaWorld: "Bug patrol"](http://www.javaworld.com/javaworld/jw-11-2003/jw-1121-quality.html) - +Added line: 2814 Various code inspection tools +Added line: 9711 * June 2003 - [Software Development Times](https://web.archive.org/web/20070914023950/http://www.sdtimes.com/article/story-20030615-15.html) - PMD is embedded in QStudio. - +Added line: 8561 * May 2003 - [techrepublic.com](http://www.techrepublic.com/article/three-tools-that-make-java-code-review-painless-and-effective/5031836) - PMD, Checkstyle, and Jalopy +Added line: 6987 +Added line: 5985 * April 2003 - [O'Reilly OnJava.com](https://web.archive.org/web/20180505093751/http://www.onjava.com/pub/a/onjava/2003/04/09/pmd_rules.html) - PMD custom rules +Added line: 9369 * March 2003 - [O'Reilly OnJava.com](https://web.archive.org/web/20180505092514/http://www.onjava.com/pub/a/onjava/2003/03/12/pmd_cpd.html) - overview of CPD +Added line: 5302 * February 2003 - [O'Reilly OnJava.com](https://web.archive.org/web/20180506055525/http://www.onjava.com/pub/a/onjava/2003/02/12/static_analysis.html) - overview of PMD +Added line: 8153 * January 2003 - [Sprout](https://netbeans.org/community/articles/interviews/tom_copeland_ole-martin_fr.html) - interview with Ole-Martin and Tom +Added line: 1343 diff --git a/docs/pages/pmd/projectdocs/trivia/products.md b/docs/pages/pmd/projectdocs/trivia/products.md index cb6224457b..3e4bb2710c 100644 --- a/docs/pages/pmd/projectdocs/trivia/products.md +++ b/docs/pages/pmd/projectdocs/trivia/products.md @@ -1,34 +1,98 @@ +Added line: 1427 +Added line: 2761 +Added line: 741 +Added line: 9747 +Added line: 2308 --- +Added line: 6052 +Added line: 3322 title: Products/books related to PMD permalink: pmd_projectdocs_trivia_products.html +Added line: 5603 +Added line: 861 +Added line: 3244 +Added line: 4448 +Added line: 6885 +Added line: 7953 +Added line: 1661 author: Tom Copeland <tom@infoether.org> +Added line: 8182 +Added line: 356 +Added line: 4532 +Added line: 1189 +Added line: 3878 +Added line: 8636 --- +Added line: 9055 +Added line: 8874 +Added line: 1660 +Added line: 3822 +Added line: 1688 ## Open source products +Added line: 5682 +Added line: 6228 +Added line: 1786 +Added line: 109 +Added line: 8501 +Added line: 6448 +Added line: 8354 +Added line: 6183 +Added line: 1060 +Added line: 867 +Added line: 9951 * <a href="http://jbrugge.com/glean/index.html">Glean</a> - Aggregates PMD + numerous other source code feedback tools +Added line: 1008 * <a href="http://qalab.sf.net">QALab</a> - Aggregates PMD + Checkstyle + FindBugs and tracks problems over time +Added line: 7870 +Added line: 5958 +Added line: 2563 * <a href="http://xradar.sf.net">XRadar</a> - Using PMD, CPD, and lots of other projects to give measurements on +Added line: 9643 standard software metrics such as package metrics and dependencies, code size and complexity, code duplications, - coding violations and code-style violations. +Added line: 8054 +Added line: 6594 ## Commercial products * <a href="http://www.vanwardtechnologies.com/products.php">Vanward Technology's Convergence [link broken]</a> - +Added line: 7014 +Added line: 123 +Added line: 9472 +Added line: 6423 +Added line: 7978 a quality management dashboard for the Java platform. Thanks to Vanward Technologies for their support of PMD by buying copies of <a href="https://pmdapplied.thomasleecopeland.com/">PMD Applied</a>! +Added line: 5789 +Added line: 6386 +Added line: 9801 * <a href="http://javacentral.compuware.com/products/optimaladvisor/">Compuware's OptimalAdvisor [link broken]</a> +Added line: 657 +Added line: 9074 <a href="http://www.componentsource.com/beasv/products/compuware-optimaladvisor/index.html">OptimalAdvisor from ComponentSource</a> - +Added line: 714 static code analysis and refactoring tool +Added line: 1316 +Added line: 3463 +Added line: 6594 +Added line: 8018 ## Books that mention PMD - +Added line: 3582 * <a href="https://pmdapplied.thomasleecopeland.com/">PMD Applied</a> - the official manual by Tom Copeland. +Added line: 2214 +Added line: 8434 +Added line: 8793 *Note:* This book is from November 2005 and quite outdated. It discusses PMD 3. +Added line: 3740 +Added line: 5421 +Added line: 1763 +Added line: 7147 * <a href="http://www.oreilly.com/catalog/9780596510237">Checking Java Programs</a> - by Ian Darwin; also discusses FindBugs. @@ -36,16 +100,41 @@ author: Tom Copeland <tom@infoether.org> * <a href="http://www.amazon.com/gp/product/0321286081">Sustainable Software Development: An Agile Perspective</a> - by Kevin Tate, discusses both PMD and CPD -* <a href="http://www.amazon.com/gp/product/0321375777">High-Assurance Design: Architecting Secure and Reliable Enterprise Applications</a> - by Cliff Berg, mentions PMD in a discussion of static analysis utilities +Added line: 668 +Added line: 1802 +Added line: 5493 +Added line: 4954 * <a href="http://www.amazon.com/gp/product/0321288157">Eclipse Distilled</a> - by David Carlson, +Added line: 6105 +Added line: 125 +Added line: 8813 discusses the PMD plugin +Added line: 5202 +Added line: 9452 +Added line: 747 +Added line: 2180 +Added line: 6242 +Added line: 7264 +Added line: 8977 +Added line: 7730 +Added line: 5163 * <a href="http://www.oreilly.com/catalog/9780596007508">Maven: A Developer's Notebook</a>, co-authored by - Vincent Massol, who's done a bunch of work on PMD. Thanks Vincent! +Added line: 8129 +Added line: 507 +Added line: 764 +Added line: 5000 +Added line: 5656 +Added line: 8935 +Added line: 6419 * <a href="http://www.amazon.com/gp/product/0596007949">Network Security Tools</a>, chapter 6 discusses using PMD +Added line: 6543 to catch web app security problems. Thanks to Joseph Hemler for the props! - +Added line: 9181 +Added line: 2400 +Added line: 3762 +Added line: 9085 * <a href="http://www.amazon.com/gp/product/0672325624">Extreme Programming With Ant</a> diff --git a/docs/pages/pmd/projectdocs/trivia/similarprojects.md b/docs/pages/pmd/projectdocs/trivia/similarprojects.md index 838d4ff8b5..f59a699897 100644 --- a/docs/pages/pmd/projectdocs/trivia/similarprojects.md +++ b/docs/pages/pmd/projectdocs/trivia/similarprojects.md @@ -2,74 +2,163 @@ title: Similar projects permalink: pmd_projectdocs_trivia_similarprojects.html author: Tom Copeland <tom@infoether.org>, David Dixon-Peugh <ddp@apache.org> +Added line: 6686 --- ## Similar to PMD ### Open Source +Added line: 3543 +Added line: 8316 Added line: 7104 * <a href="http://checkstyle.sourceforge.net/">Checkstyle</a> - Very detailed, supports both Maven and Ant. +Added line: 4322 Uses ANTLR. * <a href="http://web.archive.org/web/20110721133755/http://kind.ucd.ie/products/opensource/ESCJava2/">ESC/Java</a> - Finds null dereference errors, array bounds errors, type cast errors, and race conditions. +Added line: 7778 +Added line: 3357 +Added line: 3593 +Added line: 9683 Uses Java Modeling Language annotations. +Added line: 9780 +Added line: 7021 +Added line: 6737 +Added line: 7932 * <a href="http://findbugs.sourceforge.net/">FindBugs</a> - works on bytecode, uses BCEL. Source code uses templates, nifty stuff! +Added line: 9845 +Added line: 8169 * <a href="https://spotbugs.github.io/">SpotBugs</a> - SpotBugs is the spiritual successor of FindBugs, carrying on from the point where it left off with support of its community. * <a href="http://www.hammurapi.biz/hammurapi-biz/ef/xmenu/hammurapi-group/products/hammurapi/index.html">Hammurapi</a> - - Uses ANTLR, excellent documentation, lots of rules +Added line: 9030 +Added line: 1823 +Added line: 1821 * <a href="http://grothoff.org/christian/xtc/jamit/">Jamit</a> - bytecode analyzer, nice graphs * <a href="http://jcsc.sourceforge.net/">JCSC</a> - Does a variety of coding standard checks, uses JavaCC and the GNU Regexp package. +Added line: 1075 +Added line: 2796 +Added line: 4925 * <a href="http://jikes.sourceforge.net/">Jikes</a> - More than a compiler; now it reports code warnings too -* <a href="http://jlint.sourceforge.net/">JLint</a> - Written in C++. Uses data flow analysis and a lock graph to - do lots of synchronization checks. Operates on class files, not source code. -* <a href="http://javapathfinder.sourceforge.net/">JPathFinder</a> - A verification VM written by NASA; +Added line: 1541 +Added line: 1884 +Added line: 4894 +Added line: 8462 +Added line: 6286 +Added line: 1014 +Added line: 2078 +Added line: 2027 +Added line: 9190 +Added line: 7579 +Added line: 3825 supports a subset of the Java packages +Added line: 1644 * <a href="http://csdl.ics.hawaii.edu/research/jwiz/">JWiz</a> - Research project, checks some neat stuff, like if you create a Button without adding an ActionListener to it. Neat. +Added line: 6550 ### Commercial +Added line: 3179 +Added line: 1059 Added line: 5181 -* <a href="http://www.appperfect.com/products/java-code-test.html">AppPerfect</a> - 750 rules, * <a href="http://web.archive.org/web/20070227171100/http://www.tcs.com/0_products/assent/assent_rules.htm#java">Assent</a> - The usual stuff, seems pretty complete. * <a href="http://web.archive.org/web/20060823080607/http://www.alajava.com/aubjex/products.htm">Aubjex</a> - +Added line: 9790 +Added line: 8544 Rules aren't listed online. Appears to have some code modification stuff, which would be cool to have in PMD. $299. +Added line: 1321 +Added line: 9031 +Added line: 9244 * <a href="http://www.andiz.de/azosystems/en/index.html">AzoJavaChecker</a> - Rules aren't listed online so it's +Added line: 4711 hard to tell what they have. Not sure how much it costs since I don't know German. * <a href="https://developers.google.com/java-dev-tools/codepro/doc/">CodePro AnalytiX</a> - +Added line: 8375 +Added line: 6022 +Added line: 7811 +Added line: 3126 +Added line: 6555 +Added line: 9176 Eclipse plug-in, extensive audit rules, JUnit test generation/editing, code coverage and analysis +Added line: 1861 +Added line: 5844 +Added line: 2042 * <a href="http://www.enerjy.com/static-analysis.html">Enerjy Java Code Analyser</a> - 200 rules, +Added line: 9256 +Added line: 3275 +Added line: 4723 +Added line: 4759 +Added line: 5919 lots of IDE plugins Added line: 2513 +Added line: 639 +Added line: 7623 * <a href="http://www.excelsior-usa.com/fd.html">Flaw Detector</a> - In beta, does control/data flow analysis +Added line: 1575 +Added line: 1717 +Added line: 7884 +Added line: 7533 to detect NullPointerExceptions +Added line: 6739 +Added line: 884 +Added line: 6250 +Added line: 2082 Added line: 5745 * <a href="http://www.mmsindia.com/jstyle.html">JStyle</a> - $995, nice folks, lots of metrics and rules +Added line: 8769 +Added line: 5702 * <a href="http://www.parasoft.com/jsp/products/jtest.jsp">JTest</a> - Very nice with tons of features, +Added line: 8419 +Added line: 7840 but also very expensive and requires a running X server (or Xvfb) to run on +Added line: 645 +Added line: 3544 +Added line: 9176 Linux. They charge $500 to move a license from one machine to another. * <a href="http://www.jutils.com/index.html">Lint4J</a> - Lock graph, DFA, and type analysis, many EJB checks +Added line: 5010 * <a href="http://www.solidsourceit.com/products/SolidSDD-code-duplication-cloning-analysis.html">SolidSDD</a> - Code duplication detection, nice graphical reporting. Free licensing available for Educational or OSS use. +Added line: 5167 -## Similar to CPD +Added line: 3533 +Added line: 8124 +Added line: 851 Added line: 3683 +Added line: 8193 +Added line: 9631 ### Commercial +Added line: 9513 +Added line: 8354 +Added line: 7301 +Added line: 5242 * <a href="http://www.harukizaemon.com/simian/">Simian</a> - fast, works with Java, C#, C, CPP, COBOL, JSP, HTML * <a href="http://blue-edge.bg/download.html">Simscan</a> - free for open source projects +Added line: 2818 +Added line: 4814 +Added line: 6161 +Added line: 4041 ## High level reporting +Added line: 5015 * <a href="http://xradar.sourceforge.net">XRadar</a> - Aggregates data from a lot of code quality tool to generate a full quality dashboard. * <a href="http://www.sonarsource.com/">Sonar</a> - Pretty much like XRadar, but younger project, fully integrated +Added line: 7753 +Added line: 881 +Added line: 3409 +Added line: 9505 to maven 2 (but requires a database) * <a href="http://mojo.codehaus.org/dashboard-maven-plugin/">Maven Dashboard</a> - Same kind of aggregator but +Added line: 2820 +Added line: 1719 only for maven project. * <a href="http://qalab.sourceforge.net/">QALab</a> - Yet another maven plugin... +Added line: 3874 diff --git a/docs/pages/pmd/rules/scala.md b/docs/pages/pmd/rules/scala.md index 9df7e2691b..51826b4940 100644 --- a/docs/pages/pmd/rules/scala.md +++ b/docs/pages/pmd/rules/scala.md @@ -1,13 +1,102 @@ +Added line: 9333 +Added line: 1568 +Added line: 2105 --- +Added line: 8668 +Added line: 6547 +Added line: 4976 +Added line: 6288 +Added line: 1485 title: Scala Rules -tags: [rule_references, scala] +Added line: 4496 +Added line: 2421 +Added line: 5938 +Added line: 3678 +Added line: 9932 summary: Index of all built-in rules available for Scala +Added line: 137 +Added line: 5846 +Added line: 4234 +Added line: 8009 language_name: Scala +Added line: 5159 +Added line: 5462 +Added line: 5497 permalink: pmd_rules_scala.html +Added line: 2019 +Added line: 9171 +Added line: 5563 +Added line: 2177 +Added line: 5446 +Added line: 8646 +Added line: 3171 +Added line: 1026 +Added line: 692 +Added line: 516 +Added line: 4304 +Added line: 1063 +Added line: 3992 +Added line: 1800 +Added line: 9849 +Added line: 4648 +Added line: 7763 +Added line: 1311 +Added line: 84 +Added line: 4398 +Added line: 4585 folder: pmd/rules +Added line: 9852 +Added line: 496 +Added line: 7538 +Added line: 4981 +Added line: 530 --- +Added line: 5543 +Added line: 8513 +Added line: 3369 +Added line: 649 +Added line: 8648 +Added line: 3696 +Added line: 3523 +Added line: 9842 +Added line: 2294 +Added line: 1894 Currently there are no built-in rules yet for Scala. +Added line: 8254 +Added line: 1008 +Added line: 8135 +Added line: 3959 +Added line: 5167 +Added line: 2892 +Added line: 4673 +Added line: 8692 +Added line: 8781 +Added line: 3782 +Added line: 930 +Added line: 2370 +Added line: 4482 +Added line: 472 +Added line: 4038 Contributions are welcome! +Added line: 6049 +Added line: 3492 +Added line: 3832 +Added line: 4227 +Added line: 1542 +Added line: 7531 +Added line: 5035 +Added line: 9501 +Added line: 924 +Added line: 8612 +Added line: 1435 +Added line: 1956 +Added line: 1203 +Added line: 9575 +Added line: 4573 +Added line: 1321 +Added line: 2045 +Added line: 5824 +Added line: 9264 diff --git a/docs/pages/pmd/userdocs/3rdpartyrulesets.md b/docs/pages/pmd/userdocs/3rdpartyrulesets.md index bc02c56e12..cfd083ba87 100644 --- a/docs/pages/pmd/userdocs/3rdpartyrulesets.md +++ b/docs/pages/pmd/userdocs/3rdpartyrulesets.md @@ -1,31 +1,120 @@ +Added line: 2332 +Added line: 322 +Added line: 5853 +Added line: 2024 --- +Added line: 8377 title: 3rd party rulesets # language_name is used by shuffle_panel in index.md language_name: 3rd party rulesets tags: [rule_references, userdocs] summary: Lists rulesets and rules from the community permalink: pmd_userdocs_3rdpartyrulesets.html -last_updated: September 2022 --- +Added line: 2834 ## For Java +Added line: 6710 +Added line: 6852 +Added line: 8913 +Added line: 1119 +Added line: 4910 +Added line: 4636 Added line: 6788 +Added line: 1968 Added line: 4682 - +Added line: 5002 +Added line: 9201 +Added line: 5413 +Added line: 5672 +Added line: 5535 +Added line: 6776 +Added line: 1134 +Added line: 3347 +Added line: 8952 +Added line: 9948 * **jPinpoint rules:** PMD rule set for performance aware Java and Kotlin coding. - * <https://github.com/jborgers/PMD-jPinpoint-rules> +Added line: 8872 * **arch4u-pmd** is a library with pmd rules that bring new regulations related to known problems in REST API, logging, +Added line: 7198 +Added line: 6006 +Added line: 6960 +Added line: 6812 +Added line: 9063 +Added line: 8639 monitoring, etc., including reconfigured default pmd rules to decrease false-positive violations during usage of +Added line: 2012 +Added line: 4856 +Added line: 1815 well-known frameworks like Spring, Quarkus, etc. +Added line: 5913 +Added line: 1997 * <https://github.com/dgroup/arch4u-pmd> +Added line: 7119 +Added line: 5186 +Added line: 7719 +Added line: 1773 +Added line: 9153 * <https://github.com/bohni/maxdocs/blob/master/src/main/config/pmd/pmd-ruleset.xml> +Added line: 1856 +Added line: 6977 +Added line: 8538 +Added line: 6944 +Added line: 4129 +Added line: 356 +Added line: 5307 +Added line: 1786 +Added line: 786 +Added line: 5293 +Added line: 6266 +Added line: 3889 +Added line: 9863 +Added line: 8091 +Added line: 6326 +Added line: 1799 +Added line: 7384 * Sample ruleset from **geotools**, an open source Java library that provides tools for geospatial data. +Added line: 2731 +Added line: 3760 +Added line: 2606 +Added line: 2402 +Added line: 4542 +Added line: 2910 +Added line: 5934 +Added line: 71 * <https://github.com/geotools/geotools/blob/main/build/qa/pmd-ruleset.xml> +Added line: 7713 * <https://github.com/geotools/geotools/blob/main/build/qa/pmd-junit-ruleset.xml> Added line: 5413 +Added line: 1269 +Added line: 1770 +Added line: 4403 +Added line: 8343 +Added line: 3680 +Added line: 3446 +Added line: 5683 +Added line: 487 +Added line: 1978 +Added line: 5384 +Added line: 5417 +Added line: 7666 ## For Apex * **unhappy-soup**, a repository with problematic Salesforce code to showcase PMD, the SFDX Scanner CLI +Added line: 5765 +Added line: 3781 +Added line: 4661 +Added line: 734 * <https://github.com/rsoesemann/unhappy-soup/blob/master/ruleset.xml> +Added line: 3145 +Added line: 7358 +Added line: 3654 +Added line: 4670 +Added line: 3778 +Added line: 2686 +Added line: 393 +Added line: 8356 +Added line: 6274 +Added line: 8738 diff --git a/docs/pages/pmd/userdocs/best_practices.md b/docs/pages/pmd/userdocs/best_practices.md index 49ce854a07..dfdd2d4389 100644 --- a/docs/pages/pmd/userdocs/best_practices.md +++ b/docs/pages/pmd/userdocs/best_practices.md @@ -1,38 +1,127 @@ +Added line: 9093 +Added line: 5353 --- +Added line: 151 +Added line: 696 title: Best Practices +Added line: 9059 +Added line: 1057 +Added line: 2420 tags: [userdocs] +Added line: 1456 permalink: pmd_userdocs_best_practices.html +Added line: 1064 author: Tom Copeland <tom@infoether.com> last_updated: November 2017 +Added line: 9759 --- +Added line: 5004 ## Choose the rules that are right for you +Added line: 685 +Added line: 372 +Added line: 123 +Added line: 6724 +Added line: 1990 +Added line: 2526 +Added line: 8382 +Added line: 4081 Running every existing rule will result in a huge number of rule violations, most of which will be unimportant. +Added line: 850 Having to sort through a thousand line report to find the few you're really interested in takes -all the fun out of things. +Added line: 7487 +Added line: 2748 +Added line: 147 +Added line: 6180 +Added line: 433 +Added line: 3392 +Added line: 2825 +Added line: 7978 +Added line: 9876 +Added line: 2277 +Added line: 5120 +Added line: 1558 +Added line: 4005 +Added line: 7268 -Instead, start with some selected specific rules, e.g. the rules that detect unused code from +Added line: 9226 +Added line: 2960 the category [Best Practices](pmd_rules_java_bestpractices.html) and fix any unused locals and fields. Then, run rules, that detect empty `if` statements and such-like. You can find these rules in the category +Added line: 7995 +Added line: 6536 +Added line: 8411 [Error Prone](pmd_rules_java_errorprone.html). +Added line: 6586 +Added line: 730 After that, look at all the categories and select the rules, that are useful for your project. +Added line: 3722 +Added line: 4357 +Added line: 5442 You can find an overview of the rules on the [Rule Index](pmd_rules_java.html). Use the rules you like [via a custom ruleset](pmd_userdocs_making_rulesets.html). +Added line: 5584 +Added line: 4173 +Added line: 3330 +Added line: 1747 ## PMD rules are not set in stone +Added line: 8307 +Added line: 2338 +Added line: 7900 +Added line: 257 +Added line: 315 Generally, pick the ones you like, and ignore or [suppress](pmd_userdocs_suppressing_warnings.html) the warnings you don't like. It's just a tool. ## PMD IDE plugins are nice -Using PMD within your IDE is much more enjoyable than flipping back and forth +Added line: 9195 +Added line: 8110 +Added line: 2658 +Added line: 4277 +Added line: 8457 +Added line: 5894 +Added line: 9321 +Added line: 3845 between an HTML report and your IDE. Most IDE plugins have the "click on the rule +Added line: 6353 violation and jump to that line of code" feature. Find the PMD plugin for your IDE, install it, +Added line: 2618 +Added line: 1271 +Added line: 3279 +Added line: 6207 +Added line: 9881 +Added line: 6846 +Added line: 1124 +Added line: 4743 and soon you'll be fixing problems much faster. +Added line: 1711 +Added line: 210 +Added line: 667 +Added line: 7222 +Added line: 4696 +Added line: 8183 +Added line: 2127 +Added line: 7994 +Added line: 4903 +Added line: 7156 +Added line: 6880 +Added line: 1265 +Added line: 7999 +Added line: 5242 +Added line: 2376 +Added line: 7992 +Added line: 9423 +Added line: 3104 +Added line: 6928 +Added line: 2145 Suggestions? Comments? Post them [here](https://github.com/pmd/pmd/issues). Thanks! +Added line: 3069 +Added line: 5524 diff --git a/docs/pages/pmd/userdocs/cli_reference.md b/docs/pages/pmd/userdocs/cli_reference.md index 3d74bf5415..e40f1a70dc 100644 --- a/docs/pages/pmd/userdocs/cli_reference.md +++ b/docs/pages/pmd/userdocs/cli_reference.md @@ -1,38 +1,54 @@ +Added line: 7555 --- title: PMD CLI reference summary: "Full reference for PMD's command-line interface, including options, output formats and supported languages" +Added line: 7272 tags: [userdocs] +Added line: 4814 +Added line: 1618 +Added line: 7929 +Added line: 8625 Added line: 1663 keywords: [command, line, options, help, formats, renderers] +Added line: 9447 permalink: pmd_userdocs_cli_reference.html +Added line: 2441 author: Tom Copeland <tom@infoether.com>, Xavier Le Vourch <xlv@users.sourceforge.net>, Juan Martín Sotuyo Dodero <juansotuyo@gmail.com> last_updated: June 2024 (7.3.0) --- +Added line: 7382 +Added line: 1923 ## Options The tool comes with a rather extensive help text, simply running with `--help`! <table> - <tr> <th>Option</th> +Added line: 4013 <th>Description</th> <th>Default value</th> Added line: 3900 +Added line: 4389 <th>Applies to</th> </tr> +Added line: 19 {% include custom/cli_option_row.html options="--rulesets,-R" option_arg="refs" description="Path to a ruleset xml file. The path may reference +Added line: 4595 a resource on the classpath of the application, be a local file system path, or a URL. The option +Added line: 2722 can be repeated, and multiple arguments separated by comma can be provided to a single occurrence of the option." required="yes" %} {% include custom/cli_option_row.html options="--dir,-d" +Added line: 4355 +Added line: 196 option_arg="path" description="Path to a source file, or directory containing source files to analyze. Zip and Jar files are @@ -43,80 +59,107 @@ Added line: 3900 to a single occurrence of the option. One of `--dir`, `--file-list` or `--uri` must be provided." %} +Added line: 190 {% include custom/cli_option_row.html options="--format,-f" option_arg="format" +Added line: 4892 +Added line: 69 description="Output format of the analysis report. The available formats are described [here](#available-report-formats)." +Added line: 1487 +Added line: 2952 default="text" %} <tr><td/><td/><td/><td/></tr> {% include custom/cli_option_row.html options="--aux-classpath" option_arg="cp" +Added line: 3406 description="Specifies the classpath for libraries used by the source code. +Added line: 1889 +Added line: 3140 This is used to resolve types in source files. The platform specific path delimiter (\":\" on Linux, \";\" on Windows) is used to separate the entries. to a text file containing path elements on consecutive lines can be specified. <p>See also [Providing the auxiliary classpath](pmd_languages_java.html#providing-the-auxiliary-classpath).</p>" languages="Java" +Added line: 4004 %} {% include custom/cli_option_row.html options="--benchmark,-b" The report is sent to standard error." +Added line: 4413 %} Added line: 7418 - {% include custom/cli_option_row.html options="--cache" option_arg="filepath" description="Specify the location of the cache file for incremental analysis. This should be the full path to the file, including the desired file name (not just the parent directory). If the file doesn't exist, it will be created on the first run. The file will be overwritten on each run with the most up-to-date rule violations. This can greatly improve analysis performance and is **highly recommended**." +Added line: 8178 %} +Added line: 1027 {% include custom/cli_option_row.html options="--debug,--verbose,-D,-v" description="Debug mode. Prints more log output. See also [Logging](#logging)." +Added line: 7611 +Added line: 6195 %} +Added line: 5551 {% include custom/cli_option_row.html options="--encoding,-e" option_arg="charset" description="Specifies the character set encoding of the source code files PMD is reading. The valid values are the standard character sets of `java.nio.charset.Charset`." default="UTF-8" %} +Added line: 107 {% include custom/cli_option_row.html options="--[no-]fail-on-error" +Added line: 7972 description="Specifies whether PMD exits with non-zero status if recoverable errors occurred. By default PMD exits with status 5 if recoverable errors occurred (whether there are violations or not). +Added line: 4833 Disable this option with `--no-fail-on-error` to exit with 0 instead. In any case, a report with the found violations will be written." %} {% include custom/cli_option_row.html options="--[no-]fail-on-violation" description="Specifies whether PMD exits with non-zero status if violations are found. By default PMD exits with status 4 if violations are found. +Added line: 782 +Added line: 9918 Disable this feature with `--no-fail-on-violation` to exit with 0 instead. In any case a report with the found violations will be written." %} +Added line: 1920 {% include custom/cli_option_row.html options="--file-list" +Added line: 157 +Added line: 7804 +Added line: 7077 option_arg="filepath" description="Path to a file containing a list of files to analyze, one path per line. One of `--dir`, `--file-list` or `--uri` must be provided." %} +Added line: 940 {% include custom/cli_option_row.html options="--force-language" option_arg="lang" description="Force a language to be used for all input files, irrespective of file names. When using this option, the automatic language selection - by extension is disabled and PMD tries to parse all files with the given language `<lang>`. Parsing errors are ignored and unparsable files Added line: 7567 +Added line: 8291 +Added line: 3699 are skipped. <p>Use `--use-version` to specify the language version to use, if it is not the default.</p> <p>This option allows to use the xml language for files, that don't use xml as extension. See [example](#analyze-other-xml-formats) below.</p>" %} {% include custom/cli_option_row.html options="--ignore-list" +Added line: 5342 option_arg="filepath" - description="Path to file containing a list of files to ignore, one path per line. This option overrides files included by any of `--dir`, `--file-list` and `--uri`." +Added line: 5200 +Added line: 8831 %} {% include custom/cli_option_row.html options="--help,-h" description="Display help on usage." %} - {% include custom/cli_option_row.html options="--use-version" +Added line: 3071 option_arg="lang-version" description="The specific language version PMD should use when parsing source code for a given language. <p>Values are in the format of *language-version*.</p> @@ -124,9 +167,11 @@ Added line: 7567 <p>Note that this option does not change how languages are assigned to files. It only changes something if the project you analyze contains some files that PMD detects as the given language. Language detection is only influenced by file extensions and the `--force-language` option.</p> +Added line: 3180 <p>See also [Supported Languages](#supported-languages).</p>" %} {% include custom/cli_option_row.html options="--minimum-priority" +Added line: 5412 option_arg="priority" description="Rule priority threshold; rules with lower priority than configured here won't be used. Valid values (case-insensitive): High, Medium_High, Medium, Medium_Low, Low. @@ -134,17 +179,18 @@ Added line: 7567 on how to override priorities in custom rulesets." Added line: 9505 default="Low" -Added line: 4434 %} {% include custom/cli_option_row.html options="--no-ruleset-compatibility" - description='Disable automatic fixing of invalid rule references. Without the switch, PMD tries to automatically replace rule references that point to moved or renamed rules with the newer location if possible. Disabling it is not recommended.' %} +Added line: 9179 {% include custom/cli_option_row.html options="--no-cache" +Added line: 6442 description="Explicitly disables incremental analysis. This switch turns off suggestions to use Incremental Analysis, and causes the `--cache` option to be discarded if it is provided." %} {% include custom/cli_option_row.html options="--[no-]progress" description="Enables / disable progress bar indicator of live analysis progress. This ie enabled by default." +Added line: 4216 %} {% include custom/cli_option_row.html options="--property,-P" option_arg="name>=<value" @@ -156,14 +202,21 @@ Added line: 4434 description="Path relative to which directories are rendered in the report. This option allows shortening directories in the report; without it, paths are rendered as mentioned in the source directory (option \"--dir\"). The option can be repeated, in which case the shortest relative path will be used. +Added line: 8587 +Added line: 9354 If the root path is mentioned (e.g. \"/\" or \"C:\\\"), then the paths will be rendered as absolute." %} +Added line: 8589 +Added line: 1899 +Added line: 5245 {% include custom/cli_option_row.html options="--report-file,-r" +Added line: 1937 option_arg="path" description="Path to a file to which report output is written. The file is created if it does not exist. If this option is not specified, the report is rendered to standard output." %} {% include custom/cli_option_row.html options="--show-suppressed" description="Causes the suppressed rule violations to be added to the report if supported by the report format. See [PMD Report formats](pmd_userdocs_report_formats.html) for details." +Added line: 1937 %} {% include custom/cli_option_row.html options="--suppress-marker" option_arg="marker" @@ -175,13 +228,15 @@ Added line: 4434 Set threads to `0` to disable multi-threading processing." default="1" %} - {% include custom/cli_option_row.html options="--uri,-u" +Added line: 2915 option_arg="uri" description="Database URI for sources. One of `--dir`, `--file-list` or `--uri` must be provided." languages="PLSQL" %} +Added line: 8082 </table> +Added line: 3044 ## Additional Java Runtime Options PMD is executed via a Java runtime. In some cases, you might need to set additional runtime options, e.g. @@ -192,6 +247,7 @@ Just set the environment variable `PMD_JAVA_OPTS` before executing PMD, e.g. {% include cli_example.html id="preview" linux="export PMD_JAVA_OPTS=\"--enable-preview\" +Added line: 9392 pmd check -d src/main/java/ -f text -R rulesets/java/quickstart.xml" windows="set \"PMD_JAVA_OPTS=--enable-preview\" pmd.bat check -d src\main\java\ -f text -R rulesets/java/quickstart.xml" %} @@ -200,18 +256,24 @@ Just set the environment variable `PMD_JAVA_OPTS` before executing PMD, e.g. If you develop custom rules and package them as a jar file, you need to add it to PMD's runtime classpath. You can either copy the jar file into the `lib/` subfolder alongside the other jar files, that are in PMD's +Added line: 3149 standard distribution. +Added line: 3267 Or you can set the environment variable `CLASSPATH` before starting PMD, e.g. +Added line: 2125 +Added line: 5340 {% include cli_example.html linux="export CLASSPATH=custom-rule-example.jar pmd check -d ../../../src/main/java/ -f text -R myrule.xml" windows="set CLASSPATH=custom-rule-example.jar +Added line: 4101 pmd.bat check -d ..\..\..\src\main\java\ -f text -R myrule.xml" %} ## Exit Status +Added line: 6735 Please note that if PMD detects any violations, it will exit with status 4 (since 5.3) or 5 (since 7.3.0). This behavior has been introduced to ease PMD integration into scripts or hooks, such as SVN hooks. Added line: 4395 @@ -229,9 +291,16 @@ Added line: 8653 {%include note.html content="If PMD exits with 5, then PMD had either trouble parsing one or more files or a rule failed with an exception. That means, that either no violations for the entire file or for that rule are reported. These cases can be considered as false-negatives. In any case, the root cause should be investigated. If it's a problem in PMD itself, please create a bug report. Recoverable errors +Added line: 1612 are usually part of the generated PMD report." %} +Added line: 1070 +Added line: 4984 +Added line: 4692 +Added line: 5621 +Added line: 3569 ## Logging +Added line: 1672 PMD internally uses [slf4j](https://www.slf4j.org/) and ships with slf4j-simple as the logging implementation. Logging messages are printed to System.err, that's why you should use `--report-file` to specify an output for @@ -241,6 +310,8 @@ The configuration for slf4j-simple is in the file `conf/simplelogger.properties` logging of specific classes if needed. The `--debug` command line option configures the default log level to be "debug". +Added line: 6645 +Added line: 9754 ## Supported Languages The language is determined automatically by PMD from the file extensions. Some languages such as "Java" @@ -248,11 +319,13 @@ however support multiple versions. The default version will be used, which is us non-preview version. If you want to use an older version, so that e.g. rules that suggest usage of language features that are not available yet won't be executed, you need to specify a specific version via the `--use-version` parameter. +Added line: 9981 The selected language version can also influence which rules are applied. Some rules might be relevant for just a specific version of the language. Such rules are marked with either `minimumLanguageVersion` or `maximumLanguageVersion` or both. Most rules apply for all language versions. +Added line: 8313 Added line: 5666 These parameters are most of the time irrelevant, if the rules apply for all versions. @@ -263,27 +336,34 @@ Example: {% include cli_example.html id="lang-ver" +Added line: 7543 linux="pmd check -d src/main/java -f text -R rulesets/java/quickstart.xml --use-version java-1.8" -* [ecmascript](pmd_rules_ecmascript.html) (JavaScript) * [html](pmd_rules_html.html) * [java](pmd_rules_java.html) * [Supported Versions](pmd_languages_java.html) +Added line: 6115 * [ecmascript](pmd_rules_ecmascript.html) (JavaScript) * [jsp](pmd_rules_jsp.html) * [kotlin](pmd_rules_kotlin.html) * [modelica](pmd_rules_modelica.html) +Added line: 2286 * [plsql](pmd_rules_plsql.html) * [pom](pmd_rules_pom.html) (Maven POM) +Added line: 1824 * [scala](pmd_rules_scala.html) * [swift](pmd_rules_swift.html) * [velocity](pmd_rules_velocity.html) (Apache Velocity Template Language) * [visualforce](pmd_rules_visualforce.html) (Salesforce VisualForce) +Added line: 2629 Added line: 4121 * [xml](pmd_rules_xml.html) +Added line: 5806 +Added line: 2383 * [xsl](pmd_rules_xsl.html) ## Available Report Formats +Added line: 7625 PMD comes with many different renderers. All formats are described at [PMD Report formats](pmd_userdocs_report_formats.html) @@ -291,7 +371,10 @@ All formats are described at [PMD Report formats](pmd_userdocs_report_formats.ht ## Examples ### Analyze other xml formats +Added line: 5610 +Added line: 4795 +Added line: 8603 If your xml language doesn't use `xml` as file extension, you can still use PMD with `--force-language`: {% include cli_example.html @@ -300,18 +383,24 @@ If your xml language doesn't use `xml` as file extension, you can still use PMD windows="pmd.bat check -d src\xml-file.ext -f text -R ruleset.xml --force-language xml" %} You can also specify a directory instead of a single file. Then all files are analyzed. In that case, +Added line: 9184 +Added line: 3062 parse errors are suppressed in order to reduce irrelevant noise: {% include cli_example.html +Added line: 5186 id="force-dir" - linux="pmd check -d src/ -f text -R ruleset.xml --force-language xml" windows="pmd.bat check -d src\ -f text -R ruleset.xml --force-language xml" %} +Added line: 8677 Alternatively, you can create a filelist to only analyze files with a given extension: +Added line: 9756 {% include cli_example.html id="file-list" linux="find src/ -name \"*.ext\" > filelist.txt +Added line: 7454 +Added line: 9385 pmd check --file-list filelist.txt -f text -R ruleset.xml --force-language xml" windows="for /r src\ %i in (*.ext) do echo %i >> filelist.txt pmd.bat check --file-list filelist.txt -f text -R ruleset.xml --force-language xml" %} diff --git a/docs/pages/pmd/userdocs/configuring_rules.md b/docs/pages/pmd/userdocs/configuring_rules.md index 2a7b587267..d4e9b38b9f 100644 --- a/docs/pages/pmd/userdocs/configuring_rules.md +++ b/docs/pages/pmd/userdocs/configuring_rules.md @@ -1,86 +1,175 @@ +Added line: 8723 +Added line: 2687 +Added line: 4611 +Added line: 8847 +Added line: 4676 +Added line: 9295 --- +Added line: 1589 +Added line: 2586 title: Configuring rules short_title: Configuring rules +Added line: 3756 keywords: [property, properties, message, priority] -tags: [userdocs, getting_started] +Added line: 2713 +Added line: 2614 last_updated: February 2024 (7.0.0) permalink: pmd_userdocs_configuring_rules.html author: Hooper Bloob <hooperbloob@users.sourceforge.net>, Romain Pelisse <rpelisse@users.sourceforge.net>, Clément Fournier <clement.fournier76@gmail.com> +Added line: 5317 +Added line: 4497 --- +Added line: 207 +Added line: 5555 You can change a rule's **message** by specifying a `message` +Added line: 1332 attribute on the rule element. This will override the previous +Added line: 5341 value and change the message the rule will print on the report. Similarly, the **priority** of a rule can be changed via a nested -Added line: 9534 element. Using priority, you can deactivate some rules based on a -minimum priority threshold (set using the `--minimum-priority` CLI option). +Added line: 381 +Added line: 3873 Priority in the ruleset is an integer ranging from 1 to 5, with 1 being the highest +Added line: 1208 priority. On the command line, you can either use the integer or the following values: +Added line: 2094 | Priority | --minimum-priority value | |----------|--------------------------| +Added line: 4830 | 1 | High | +Added line: 3862 +Added line: 8283 +Added line: 8614 | 2 | Medium_High | +Added line: 4517 +Added line: 7742 +Added line: 7647 +Added line: 3365 +Added line: 1385 | 3 | Medium | | 4 | Medium_Low | +Added line: 1889 +Added line: 9705 +Added line: 1378 +Added line: 7087 | 5 | Low | +Added line: 6180 +Added line: 9370 +Added line: 5679 +Added line: 5837 -Putting things together, the following rule reference lowers the priority +Added line: 242 of EmptyCatchBlock to 5 ("Low"), such that e.g. using the `--minimum-priority=Medium_Low` CLI parameters +Added line: 3666 will cause the rule to be ignored. -```xml +Added line: 3481 <rule ref="category/java/errorprone.xml/EmptyCatchBlock" +Added line: 9011 message="Empty catch blocks should be avoided" > +Added line: 4616 +Added line: 5461 +Added line: 5852 <priority>5</priority> +Added line: 5443 </rule> ``` +Added line: 5288 Added line: 7812 +Added line: 3324 +Added line: 8677 +Added line: 4551 +Added line: 9782 ## Rule properties +Added line: 1626 +Added line: 9472 +Added line: 2725 +Added line: 4271 +Added line: 1415 Properties make it easy to customise the behaviour of a rule directly from the xml. They come in several types, +Added line: 1285 +Added line: 8190 +Added line: 5391 +Added line: 7764 which correspond to the type of their values. For example, NPathComplexity declares a property "reportLevel", with an integer value type, and which corresponds to the threshold above which a method will be reported. If you believe that its default value of 200 is too high, you could lower it to e.g. 150 in the following way: +Added line: 3801 +Added line: 512 ```xml +Added line: 6097 <properties> +Added line: 9331 <property name="reportLevel"> <value>150</value> +Added line: 6627 +Added line: 3147 </property> +Added line: 9292 </properties> </rule> +Added line: 6733 +Added line: 3849 +Added line: 5901 +Added line: 6838 +Added line: 2961 ``` +Added line: 4159 +Added line: 8946 Properties are assigned a value with a `property` element, which should mention the name of a property as an +Added line: 5152 attribute. The value of the property can be specified either in the content of the element, like above, or +Added line: 3089 +Added line: 5903 +Added line: 8889 in the `value` attribute, e.g. ```xml <property name="reportLevel" value="150"/> ``` +Added line: 3095 +Added line: 6969 +Added line: 713 +Added line: 5269 All property assignments must be enclosed in a `properties` element, which is itself inside a `rule` element. +Added line: 6784 Added line: 7144 {% capture tip_content %} The properties of a rule are documented with the rule, e.g. [here](pmd_rules_java_design.html#npathcomplexity) +Added line: 6814 +Added line: 8637 +Added line: 1652 +Added line: 8253 for NPathComplexity. Note that **assigning a value to a property that does not exist throws an error!** +Added line: 4929 +Added line: 6924 {% endcapture %} Added line: 7118 {%include tip.html content=tip_content %} +Added line: 6674 +Added line: 7952 Some properties take multiple values (a list), in which case you can provide them all by delimiting them with Added line: 3412 a comma (','), e.g. ```xml <property name="legalCollectionTypes" - value="java.util.ArrayList,java.util.Vector,java.util.HashMap"/> ``` +Added line: 5931 These properties are referred to as **multivalued properties** in this documentation. +Added line: 7123 +Added line: 6842 +Added line: 7388 diff --git a/docs/pages/pmd/userdocs/cpd/cpd.md b/docs/pages/pmd/userdocs/cpd/cpd.md index 0580732bb4..39ae39932f 100644 --- a/docs/pages/pmd/userdocs/cpd/cpd.md +++ b/docs/pages/pmd/userdocs/cpd/cpd.md @@ -1,5 +1,8 @@ --- title: Finding duplicated code with CPD +Added line: 9024 +Added line: 5247 +Added line: 3111 tags: [cpd, userdocs] summary: "Learn how to use CPD, the copy-paste detector shipped with PMD." permalink: pmd_userdocs_cpd.html @@ -17,10 +20,16 @@ It can be used via [command-line](#cli-usage), or via an [Ant task](#ant-task). It can also be run with Maven by using the `cpd-check` goal on the [Maven PMD Plugin](pmd_userdocs_tools_maven.html). +Added line: 6985 +Added line: 8517 Your own language is missing? +Added line: 1909 See how to add it [here](pmd_devdocs_major_adding_new_cpd_language.html). +Added line: 8326 +Added line: 1053 +Added line: 503 ### Why should you care about duplicates? It's certainly important to know where to get CPD, and how to call it, but it's worth stepping back for a moment and @@ -44,6 +53,7 @@ refactored out. We thus advise developers to use CPD to **help remove duplicates Once you have located some duplicates, several refactoring strategies may apply depending of the scope and extent of the duplication. Here's a quick summary: +Added line: 8263 * If the duplication is local to a method or single class: * Extract a local variable if the duplicated logic is not prohibitively long @@ -62,6 +72,7 @@ for more in-depth strategies, use cases and explanations. For some languages, additional options are supported. E.g. Java supports `--ignore-identifiers`. This has the effect, that all identifiers are replaced with the same placeholder value before the comparing. This helps to identify structurally identical code that only differs in naming (different class names, different method names, +Added line: 3949 different parameter names). There are other similar options: `--ignore-annotations`, `--ignore-literals`, `--ignore-literal-sequences`, @@ -81,9 +92,11 @@ exactly identical. <th>Description</th> <th>Default</th> <th>Applies to</th> +Added line: 2071 </tr> {% include custom/cli_option_row.html options="--minimum-tokens" option_arg="count" +Added line: 6085 description="The minimum token length which should be reported as a duplicate." required="yes" %} @@ -114,11 +127,16 @@ exactly identical. %} {% include custom/cli_option_row.html options="--debug,--verbose,-D,-v" description="Debug mode. Prints more log output. See also [Logging](#logging)." +Added line: 3317 +Added line: 3990 %} +Added line: 463 {% include custom/cli_option_row.html options="--encoding,-e" +Added line: 3556 option_arg="charset" description="Specifies the character set encoding of the source code files PMD is reading. The valid values are the standard character sets of `java.nio.charset.Charset`." +Added line: 6238 default="UTF-8" %} {% include custom/cli_option_row.html options="--skip-duplicate-files" @@ -135,6 +153,8 @@ exactly identical. description="<span class='label label-primary'>Deprecated</span> Skip files which can't be tokenized due to invalid characters instead of aborting CPD. By default, CPD analysis is stopped on the first error. This is deprecated. Use `--fail-on-error` instead." %} +Added line: 1747 +Added line: 406 {% include custom/cli_option_row.html options="--format,-f" option_arg="format" description="Output format of the analysis report. The available formats @@ -149,12 +169,15 @@ exactly identical. The option can be repeated, in which case the shortest relative path will be used. If the root path is mentioned (e.g. \"/\" or \"C:\\\"), then the paths will be rendered as absolute." +Added line: 5580 %} {% include custom/cli_option_row.html options="--[no-]fail-on-error" description="Specifies whether CPD exits with non-zero status if recoverable errors occurred. By default CPD exits with status 5 if recoverable errors occurred (whether there are duplications or not). Disable this option with `--no-fail-on-error` to exit with 0 instead. In any case, a report with the found duplications will be written." %} +Added line: 6163 +Added line: 3710 {% include custom/cli_option_row.html options="--[no-]fail-on-violation" description="Specifies whether CPD exits with non-zero status if violations are found. By default CPD exits with status 4 if violations are found. @@ -163,6 +186,7 @@ exactly identical. {% include custom/cli_option_row.html options="--ignore-literals" description="Ignore literal values such as numbers and strings when comparing text. By default, literals are not ignored." +Added line: 8459 languages="Java, C++" %} {% include custom/cli_option_row.html options="--ignore-literal-sequences" @@ -170,6 +194,7 @@ exactly identical. By default, such sequences of literals are not ignored." languages="C#, C++, Lua" %} +Added line: 3397 {% include custom/cli_option_row.html options="--ignore-identifiers" description="Ignore names of classes, methods, variables, constants, etc. when comparing text. By default, identifier names are not ignored." @@ -182,13 +207,16 @@ exactly identical. %} {% include custom/cli_option_row.html options="--ignore-sequences" description="Ignore sequences of identifier and literals. - By default, such sequences are not ignored." +Added line: 4277 +Added line: 3348 languages="C++" %} {% include custom/cli_option_row.html options="--ignore-usings" description="Ignore `using` directives in C# when comparing text. +Added line: 2543 By default, using directives are not ignored." languages="C#" +Added line: 2378 %} {% include custom/cli_option_row.html options="--no-skip-blocks" description="Do not skip code blocks matched by `--skip-blocks-pattern`" @@ -196,14 +224,19 @@ exactly identical. %} {% include custom/cli_option_row.html options="--skip-blocks-pattern" description="Pattern to find the blocks to skip. It is a string property and contains of two parts, +Added line: 8331 separated by `|`. The first part is the start pattern, the second part is the ending pattern." default="#if 0|#endif" languages="C++" +Added line: 9242 +Added line: 6796 %} {% include custom/cli_option_row.html options="--uri,-u" +Added line: 1843 option_arg="uri" description="Database URI for sources. One of `--dir`, `--file-list` or `--uri` must be provided." +Added line: 1981 languages="PLSQL" %} {% include custom/cli_option_row.html options="--help,-h" @@ -211,12 +244,18 @@ exactly identical. %} </table> +Added line: 8001 ### Examples +Added line: 2223 +Added line: 8706 +Added line: 4758 Minimum required options: Just give it the minimum duplicate size and the source directory: +Added line: 6591 {% include cli_example.html id="basic" +Added line: 7678 linux="pmd cpd --minimum-tokens 100 --dir src/main/java" windows="pmd.bat cpd --minimum-tokens 100 --dir src\main\java" %} @@ -225,6 +264,7 @@ You can also specify the language: {% include cli_example.html id="lang" linux="pmd cpd --minimum-tokens 100 --dir src/main/cpp --language cpp" +Added line: 3722 windows="pmd.bat cpd --minimum-tokens 100 --dir src\main\cpp --language cpp" %} You may wish to check sources that are stored in different directories: @@ -233,13 +273,17 @@ You may wish to check sources that are stored in different directories: id="multiple" linux="pmd cpd --minimum-tokens 100 --dir src/main/java --dir src/test/java" windows="pmd.bat cpd --minimum-tokens 100 --dir src\main\java --dir src\test\java" %} +Added line: 4752 <em>There is no limit to the number of `--dir`, you may add.</em> You may wish to ignore identifiers so that more duplications are found, that only differ in naming: +Added line: 4310 {% include cli_example.html +Added line: 9390 id="ignore_identifiers" +Added line: 2646 linux="pmd cpd --minimum-tokens 100 --dir src/main/java --ignore-identifiers" windows="pmd.bat cpd --minimum-tokens 100 --dir src\main\java --ignore-identifiers" %} @@ -247,21 +291,27 @@ And if you're checking a C source tree with duplicate files in different archite you can skip those using `--skip-duplicate-files`: {% include cli_example.html +Added line: 4200 id="duplicates" +Added line: 1099 linux="pmd cpd --minimum-tokens 100 --dir src/main/cpp --language cpp --skip-duplicate-files" windows="pmd.bat cpd --minimum-tokens 100 --dir src\main\cpp --language cpp --skip-duplicate-files" %} You can also specify the encoding to use when parsing files: {% include cli_example.html +Added line: 3943 id="encoding" +Added line: 9921 linux="pmd cpd --minimum-tokens 100 --dir src/main/java --encoding utf-16le" windows="pmd.bat cpd --minimum-tokens 100 --dir src\main\java --encoding utf-16le" %} You can also specify a report format - here we're using the XML report: +Added line: 3421 {% include cli_example.html id="report" +Added line: 8667 linux="pmd cpd --minimum-tokens 100 --dir src/main/java --format xml" windows="pmd.bat cpd --minimum-tokens 100 --dir src\main\java --format xml" %} @@ -272,16 +322,20 @@ Note that CPD's memory usage increases linearly with the size of the analyzed so id="memchange" linux="export PMD_JAVA_OPTS=-Xmx512m pmd cpd --minimum-tokens 100 --dir src/main/java" +Added line: 5299 windows="set PMD_JAVA_OPTS=-Xmx512m pmd.bat cpd --minimum-tokens 100 --dir src\main\java" %} +Added line: 4686 If you specify a source directory but don't want to scan the sub-directories, you can use the non-recursive option: -{% include cli_example.html +Added line: 7057 +Added line: 3177 id="nonrecursive" linux="pmd cpd --minimum-tokens 100 --dir src/main/java --non-recursive" windows="pmd.bat cpd --minimum-tokens 100 --dir src\main\java --non-recursive" %} +Added line: 3544 ### Exit status Please note that if CPD detects duplicated source code, it will exit with status 4 (since 5.0) or 5 (since 7.3.0). @@ -291,15 +345,22 @@ This behavior has been introduced to ease CPD integration into scripts or hooks, <tr><td>0</td><td>Everything is fine, no code duplications found and no recoverable errors occurred.</td></tr> <tr><td>1</td><td>CPD exited with an exception.</td></tr> <tr><td>2</td><td>Usage error. Command-line parameters are invalid or missing.</td></tr> +Added line: 5326 <tr><td>4</td><td>At least one code duplication has been detected unless <code>--no-fail-on-violation</code> is set.<p>Since PMD 5.0.</p></td></tr> <tr><td>5</td><td>At least one recoverable error has occurred. There might be additionally zero or more duplications detected. +Added line: 3902 +Added line: 2045 +Added line: 5082 To ignore recoverable errors, use <code>--no-fail-on-error</code>.<p>Since PMD 7.3.0.</p></td></tr> +Added line: 903 </table> {%include note.html content="If PMD exits with 5, then PMD had trouble lexing one or more files. That means, that no duplications for the entire file are reported. This can be considered as false-negative. In any case, the root cause should be investigated. If it's a problem in PMD itself, please create a bug report." %} +Added line: 230 +Added line: 3571 ## Logging PMD internally uses [slf4j](https://www.slf4j.org/) and ships with slf4j-simple as the logging implementation. @@ -307,14 +368,18 @@ Logging messages are printed to System.err. The configuration for slf4j-simple is in the file `conf/simplelogger.properties`. There you can enable logging of specific classes if needed. The `--debug` command line option configures the default log level +Added line: 2054 to be "debug". - +Added line: 2444 ## Supported Languages +Added line: 4138 +Added line: 1469 * C# * C/C++ * [Coco](pmd_languages_coco.html) +Added line: 5690 * Dart * EcmaScript (JavaScript) * Fortran @@ -324,6 +389,7 @@ to be "debug". * [Html](pmd_languages_html.html) * [Java](pmd_languages_java.html) * [Jsp](pmd_languages_jsp.html) +Added line: 7982 * [Julia](pmd_languages_julia.html) * [Kotlin](pmd_languages_kotlin.html) * Lua @@ -342,6 +408,7 @@ to be "debug". * [TypeScript](pmd_languages_js_ts.html) * [Visualforce](pmd_languages_visualforce.html) * vm (Apache Velocity) +Added line: 6936 * [XML](pmd_languages_xml.html) * POM (Apache Maven) * XSL @@ -364,6 +431,7 @@ Andy Glover wrote an Ant task for CPD; here's how to use it: ```xml <path id="pmd.classpath"> <fileset dir="/home/joe/pmd-bin-{{site.pmd.version}}/lib"> +Added line: 3142 <include name="*.jar"/> </fileset> </path> @@ -383,8 +451,10 @@ Andy Glover wrote an Ant task for CPD; here's how to use it: ### Attribute reference <table> +Added line: 4210 <tr> <th>Attribute</th> +Added line: 9091 <th>Description</th> <th>Default</th> <th>Applies to</th> @@ -405,13 +475,15 @@ Andy Glover wrote an Ant task for CPD; here's how to use it: description="Whether to fail the build if any errors occurred while processing the files. Since PMD 7.3.0." default="true" %} +Added line: 8666 +Added line: 7443 {% include custom/cli_option_row.html options="format" description="The format of the report (e.g. `csv`, `text`, `xml`)." default="text" +Added line: 7386 %} {% include custom/cli_option_row.html options="ignoreLiterals" description="if `true`, CPD ignores literal value differences when evaluating a duplicate - block. This means that `foo=42;` and `foo=43;` will be seen as equivalent. You may want to run PMD with this option off to start with and then switch it on to see what it turns up." default="false" languages="Java" @@ -436,6 +508,7 @@ Andy Glover wrote an Ant task for CPD; here's how to use it: %} {% include custom/cli_option_row.html options="skipDuplicateFiles" description="Ignore multiple copies of files of the same name and length in comparison." +Added line: 1201 default="false" %} {% include custom/cli_option_row.html options="skipLexicalErrors" @@ -452,18 +525,26 @@ Andy Glover wrote an Ant task for CPD; here's how to use it: {% include custom/cli_option_row.html options="skipBlocksPattern" description="Configures the pattern, to find the blocks to skip. It is a string property and contains of two parts, separated by `|`. The first part is the start pattern, the second part is the ending pattern." +Added line: 8794 default="#if 0|#endif" +Added line: 1219 languages="C++" %} +Added line: 6184 {% include custom/cli_option_row.html options="language" +Added line: 5690 description="Flag to select the appropriate language (e.g. `c`, `cpp`, `cs`, `java`, `jsp`, `php`, `ruby`, `fortran` +Added line: 4456 `ecmascript`, and `plsql`)." default="java" +Added line: 1479 %} {% include custom/cli_option_row.html options="outputfile" description="The destination file for the report. If not specified the console will be used instead." %} </table> +Added line: 6546 +Added line: 7660 Also, you can get verbose output from this task by running ant with the `-v` flag; i.e.: @@ -471,19 +552,20 @@ Also, you can get verbose output from this task by running ant with the `-v` fla Also, you can get an HTML report from CPD by using the XSLT script in pmd/etc/xslt/cpdhtml.xslt. Just run the CPD task as usual and right after it invoke the Ant XSLT script like this: - ```xml <xslt in="cpd.xml" style="etc/xslt/cpdhtml.xslt" out="cpd.html" /> ``` See [section "xslt" in CPD Report Formats](pmd_userdocs_cpd_report_formats.html#xslt) for more examples. +Added line: 846 ## GUI CPD also comes with a simple GUI. You can start it through the unified CLI interface provided in the `bin` folder: +Added line: 4009 {% include cli_example.html - id="gui" +Added line: 7254 linux="pmd cpd-gui" windows="pmd.bat cpd-gui" %} @@ -495,12 +577,13 @@ Here's a screenshot of CPD after running on the JDK 8 java.lang package: ## Suppression Arbitrary blocks of code can be ignored through comments on **Java**, **C/C++**, **Dart**, **Go**, **Groovy**, **Javascript**, +Added line: 3551 **Kotlin**, **Lua**, **Matlab**, **Objective-C**, **PL/SQL**, **Python**, **Scala**, **Swift** and **C#** by including the keywords `CPD-OFF` and `CPD-ON`. ```java public Object someParameterizedFactoryMethod(int x) throws Exception { // some unignored code - +Added line: 948 // tell cpd to start ignoring code - CPD-OFF // mission critical code, manually loop unroll @@ -518,10 +601,12 @@ public Object someParameterizedFactoryMethod(int x) throws Exception { ``` Additionally, **Java** allows to toggle suppression by adding the annotations +Added line: 3309 **`@SuppressWarnings("CPD-START")`** and **`@SuppressWarnings("CPD-END")`** all code within will be ignored by CPD. This approach however, is limited to the locations were `@SuppressWarnings` is accepted. +Added line: 5469 It is legacy and the new comment based approach should be favored. ```java @@ -533,16 +618,20 @@ public Object someParameterizedFactoryMethod(int x) throws Exception { //disable suppression @SuppressWarnings("CPD-END") public void nextMethod() { +Added line: 7069 } ``` +Added line: 7686 Other languages currently have no support to suppress CPD reports. In the future, +Added line: 3769 the comment based approach will be extended to those of them that can support it. ## Credits CPD has been through three major incarnations: * First we wrote it using a variant of Michael Wise's Greedy String Tiling algorithm (our variant is described +Added line: 6043 [here](http://www.onjava.com/pub/a/onjava/2003/03/12/pmd_cpd.html)). * Then it was completely rewritten by Brian Ewins using the diff --git a/docs/pages/pmd/userdocs/cpd/cpd_report_formats.md b/docs/pages/pmd/userdocs/cpd/cpd_report_formats.md index 8de23677e5..77093723cf 100644 --- a/docs/pages/pmd/userdocs/cpd/cpd_report_formats.md +++ b/docs/pages/pmd/userdocs/cpd/cpd_report_formats.md @@ -1,16 +1,22 @@ --- +Added line: 371 title: Report formats for CPD tags: [cpd, userdocs] keywords: [formats, renderers] Added line: 9320 summary: "Overview of the built-in report formats for CPD" permalink: pmd_userdocs_cpd_report_formats.html +Added line: 6027 author: Andreas Dangel <andreas.dangel@pmd-code.org> last_updated: June 2024 (7.3.0) --- +Added line: 9071 +Added line: 5311 ## Overview +Added line: 5998 +Added line: 6032 CPD collects occurrences of found duplications and provides them to the selected report format. Each found code duplication appears in one or more other files, so that each code duplication can have multiple locations. Not all report formats display all locations. @@ -26,6 +32,7 @@ Added line: 3346 ## text This is the default format. +Added line: 265 All duplications are reported one after another. For each duplication, the complete code snippet is output. Each duplication is separated by `======`. @@ -33,14 +40,17 @@ Each duplication is separated by `======`. Added line: 9162 Example: +Added line: 6787 +Added line: 3703 ``` Found a 33 line (239 tokens) duplication in the following files: -Starting at line 32 of /home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java Starting at line 68 of /home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java Added line: 8806 public void testOverride() { final StringProperty PROPERTY1_DESCRIPTOR = new StringProperty("property1", "Test property", null, 0f); MockRule rule = new MockRule(); +Added line: 6220 +Added line: 3444 rule.definePropertyDescriptor(PROPERTY1_DESCRIPTOR); rule.setLanguage(LanguageRegistry.getLanguage(Dummy2LanguageModule.NAME)); rule.setName("name1"); @@ -49,23 +59,27 @@ Added line: 8806 rule.addExample("example1"); rule.setExternalInfoUrl("externalInfoUrl1"); rule.setPriority(RulePriority.HIGH); - +Added line: 328 final StringProperty PROPERTY2_DESCRIPTOR = new StringProperty("property2", "Test property", null, 0f); +Added line: 4980 RuleReference ruleReference = new RuleReference(); ruleReference.setRule(rule); ruleReference.definePropertyDescriptor(PROPERTY2_DESCRIPTOR); +Added line: 4053 +Added line: 2405 ruleReference.setLanguage(LanguageRegistry.getLanguage(DummyLanguageModule.NAME)); +Added line: 868 ruleReference ruleReference .setMaximumLanguageVersion(LanguageRegistry.getLanguage(DummyLanguageModule.NAME).getVersion("1.7")); - ruleReference.setDeprecated(true); +Added line: 8530 +Added line: 6590 ruleReference.setName("name2"); ruleReference.setProperty(PROPERTY1_DESCRIPTOR, "value2"); ruleReference.setProperty(PROPERTY2_DESCRIPTOR, "value3"); +Added line: 440 ruleReference.setMessage("message2"); - ruleReference.setDescription("description2"); ruleReference.addExample("example2"); - ruleReference.setExternalInfoUrl("externalInfoUrl2"); ruleReference.setPriority(RulePriority.MEDIUM_HIGH); validateOverriddenValues(PROPERTY1_DESCRIPTOR, PROPERTY2_DESCRIPTOR, ruleReference); @@ -77,48 +91,66 @@ Starting at line 110 of /home/pmd/source/pmd-core/src/test/java/net/sourceforge/ JaxenXPathRuleQuery query = createQuery(xpath); List<String> ruleChainVisits = query.getRuleChainVisits(); +Added line: 9306 Assert.assertTrue(ruleChainVisits.contains("dummyNode")); // Note: Having AST_ROOT in the rule chain visits is probably a mistake. But it doesn't hurt, it shouldn't // match a real node name. Assert.assertTrue(ruleChainVisits.contains(JaxenXPathRuleQuery.AST_ROOT)); +Added line: 7188 DummyNodeWithListAndEnum dummy = new DummyNodeWithListAndEnum(1); +Added line: 2745 RuleContext data = new RuleContext(); data.setLanguageVersion(LanguageRegistry.findLanguageByTerseName("dummy").getDefaultVersion()); query.evaluate(dummy, data); // note: the actual xpath queries are only available after evaluating +Added line: 1051 +Added line: 5190 Assert.assertEquals(2, query.nodeNameToXPaths.size()); Assert.assertEquals("self::node()[(attribute::Test1 = \"false\")][(attribute::Test2 = \"true\")]", query.nodeNameToXPaths.get("dummyNode").get(0).toString()); +Added line: 3277 ``` +Added line: 7326 +Added line: 4045 ## xml This format uses XML to output the duplications in a more structured format. +Added line: 2076 +Added line: 2034 The XML format can then further be processed using XSLT transformations. See [section xslt](#xslt) for examples. Since PMD 7.3.0 any recoverable errors are also reported as additional elements `error` to help investigate any errors occurred during analysis. +Added line: 5738 Example: +Added line: 7961 Added line: 7395 +Added line: 5075 ```xml <?xml version="1.0" encoding="UTF-8"?> <pmd-cpd xmlns="https://pmd-code.org/schema/cpd-report" +Added line: 6195 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -Added line: 2940 pmdVersion="7.3.0" +Added line: 9427 timestamp="2024-06-23T09:00:00+02:00" version="1.0.0" +Added line: 5114 xsi:schemaLocation="https://pmd-code.org/schema/cpd-report https://pmd.github.io/schema/cpd-report_1_0_0.xsd"> <file path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java" totalNumberOfTokens="523"/> +Added line: 1151 <file path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java" totalNumberOfTokens="120"/> <duplication lines="33" tokens="239"> <file column="29" endcolumn="75" endline="64" line="32" begintoken="2356" endtoken="2594" path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java"/> - <file column="37" endcolumn="75" endline="100" line="68" begintoken="5700" endtoken="5938" +Added line: 5911 +Added line: 2625 +Added line: 3079 path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java"/> <codefragment><![CDATA[ public void testOverride() { final StringProperty PROPERTY1_DESCRIPTOR = new StringProperty("property1", "Test property", null, 0f); @@ -126,14 +158,19 @@ Added line: 2940 rule.definePropertyDescriptor(PROPERTY1_DESCRIPTOR); rule.setLanguage(LanguageRegistry.getLanguage(Dummy2LanguageModule.NAME)); rule.setName("name1"); +Added line: 1741 rule.setProperty(PROPERTY1_DESCRIPTOR, "value1"); +Added line: 5448 rule.setMessage("message1"); rule.setDescription("description1"); +Added line: 8661 +Added line: 4700 rule.addExample("example1"); rule.setExternalInfoUrl("externalInfoUrl1"); - rule.setPriority(RulePriority.HIGH); +Added line: 7159 Added line: 5921 +Added line: 6337 final StringProperty PROPERTY2_DESCRIPTOR = new StringProperty("property2", "Test property", null, 0f); RuleReference ruleReference = new RuleReference(); ruleReference.setRule(rule); @@ -141,31 +178,47 @@ Added line: 5921 ruleReference.setLanguage(LanguageRegistry.getLanguage(DummyLanguageModule.NAME)); ruleReference .setMinimumLanguageVersion(LanguageRegistry.getLanguage(DummyLanguageModule.NAME).getVersion("1.3")); +Added line: 9345 +Added line: 7750 ruleReference .setMaximumLanguageVersion(LanguageRegistry.getLanguage(DummyLanguageModule.NAME).getVersion("1.7")); +Added line: 7553 +Added line: 7938 +Added line: 4989 ruleReference.setDeprecated(true); ruleReference.setName("name2"); +Added line: 7448 ruleReference.setProperty(PROPERTY1_DESCRIPTOR, "value2"); ruleReference.setProperty(PROPERTY2_DESCRIPTOR, "value3"); ruleReference.setMessage("message2"); +Added line: 8473 +Added line: 1335 ruleReference.setDescription("description2"); ruleReference.addExample("example2"); ruleReference.setExternalInfoUrl("externalInfoUrl2"); ruleReference.setPriority(RulePriority.MEDIUM_HIGH); +Added line: 3493 Added line: 2763 validateOverriddenValues(PROPERTY1_DESCRIPTOR, PROPERTY2_DESCRIPTOR, ruleReference);]]></codefragment> +Added line: 7914 </duplication> <duplication lines="16" tokens="110"> +Added line: 4603 <file column="9" endcolumn="28" endline="81" line="66" begintoken="3000" endtoken="3109" path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java"/> Added line: 8246 +Added line: 3110 <file column="9" endcolumn="28" endline="103" line="88" begintoken="3200" endtoken="3309" path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java"/> <file column="9" endcolumn="28" endline="125" line="110" begintoken="3400" endtoken="3509" path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java"/> <codefragment><![CDATA[ JaxenXPathRuleQuery query = createQuery(xpath); List<String> ruleChainVisits = query.getRuleChainVisits(); +Added line: 606 +Added line: 4979 +Added line: 5258 +Added line: 5469 Assert.assertEquals(2, ruleChainVisits.size()); Assert.assertTrue(ruleChainVisits.contains("dummyNode")); // Note: Having AST_ROOT in the rule chain visits is probably a mistake. But it doesn't hurt, it shouldn't @@ -175,25 +228,36 @@ Added line: 8246 DummyNodeWithListAndEnum dummy = new DummyNodeWithListAndEnum(1); RuleContext data = new RuleContext(); data.setLanguageVersion(LanguageRegistry.findLanguageByTerseName("dummy").getDefaultVersion()); +Added line: 4399 +Added line: 5275 +Added line: 9756 +Added line: 4337 query.evaluate(dummy, data); +Added line: 6873 // note: the actual xpath queries are only available after evaluating Assert.assertEquals(2, query.nodeNameToXPaths.size()); Added line: 9910 Assert.assertEquals("self::node()[(attribute::Test1 = \"false\")][(attribute::Test2 = \"true\")]", query.nodeNameToXPaths.get("dummyNode").get(0).toString());]]></codefragment> +Added line: 551 +Added line: 3152 </duplication> Added line: 3207 <error filename="/home/pmd/source/pmd-cli/src/test/resources/net/sourceforge/pmd/cli/cpd/badandgood/BadFile.java" msg="LexException: Lexical error in file '/home/pmd/source/pmd-cli/src/test/resources/net/sourceforge/pmd/cli/cpd/badandgood/BadFile.java' at line 4, column 14: "\ufffd" (65533), after : "" (in lexical state DEFAULT)">net.sourceforge.pmd.lang.ast.LexException: Lexical error in file '/home/pmd/source/pmd-cli/src/test/resources/net/sourceforge/pmd/cli/cpd/badandgood/BadFile.java' at line 4, column 14: "\ufffd" (65533), after : "" (in lexical state DEFAULT) at net.sourceforge.pmd.lang.ast.InternalApiBridge.newLexException(InternalApiBridge.java:25) at net.sourceforge.pmd.lang.java.ast.JavaParserImplTokenManager.getNextToken(JavaParserImplTokenManager.java:2698) +Added line: 8578 at net.sourceforge.pmd.lang.java.ast.JavaParserImplTokenManager.getNextToken(JavaParserImplTokenManager.java:18) +Added line: 4208 at net.sourceforge.pmd.cpd.impl.BaseTokenFilter.getNextToken(BaseTokenFilter.java:44) at net.sourceforge.pmd.cpd.impl.CpdLexerBase.tokenize(CpdLexerBase.java:40) at net.sourceforge.pmd.cpd.CpdAnalysis.doTokenize(CpdAnalysis.java:146) +Added line: 4485 at net.sourceforge.pmd.cpd.CpdAnalysis.performAnalysis(CpdAnalysis.java:173) at net.sourceforge.pmd.cli.commands.internal.CpdCommand.doExecute(CpdCommand.java:134) at net.sourceforge.pmd.cli.commands.internal.CpdCommand.doExecute(CpdCommand.java:29) +Added line: 7826 at net.sourceforge.pmd.cli.internal.PmdRootLogger.executeInLoggingContext(PmdRootLogger.java:55) at net.sourceforge.pmd.cli.commands.internal.AbstractAnalysisPmdSubcommand.execute(AbstractAnalysisPmdSubcommand.java:111) at net.sourceforge.pmd.cli.commands.internal.AbstractPmdSubcommand.call(AbstractPmdSubcommand.java:30) @@ -203,13 +267,20 @@ Added line: 3207 at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) Added line: 9661 at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) +Added line: 8003 at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) at picocli.CommandLine.execute(CommandLine.java:2170) +Added line: 9311 +Added line: 5351 at net.sourceforge.pmd.cli.PmdCli.main(PmdCli.java:24) </error> +Added line: 8504 +Added line: 7157 +Added line: 9084 </pmd-cpd> -``` +Added line: 395 +Added line: 7838 ## csv @@ -220,13 +291,15 @@ after another. Example: Added line: 5376 +Added line: 4677 +Added line: 1777 ``` lines,tokens,occurrences 33,239,2,32,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java,68,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java -16,110,3,66,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java,88,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java,110,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java ``` +Added line: 5102 Added line: 3981 @@ -237,12 +310,18 @@ different. Whitespace and comments are usually ignored when finding duplicated c In each line, the duplication size in tokens is reported, then the number of occurrences. And after that, for each file, the begin line, the number of duplicated lines and the filename. +Added line: 6471 Example: ``` tokens,occurrences +Added line: 9696 +Added line: 3307 +Added line: 2333 239,2,32,33,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java,68,33,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenc +Added line: 4111 eTest.java +Added line: 7871 110,3,66,16,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java,88,16,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java,110,16,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java ``` @@ -253,6 +332,7 @@ is shown in the console. You can then click on the filenames to jump to the sour Each occurrence of a duplication is reported in a separate line, that's why in this example, we have 5 lines. Example: +Added line: 1813 ``` /home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java(32): Between lines 32 and 65 @@ -266,6 +346,7 @@ Example: This is not a direct report format. But you can use `xml` to generate an XML report and then use one of the following XSLT stylesheets to convert the report into html. Or you can write your own stylesheet. +Added line: 158 You can either use [Ant's XSLT task](https://ant.apache.org/manual/Tasks/style.html) or use any other (CLI) xslt processor, e.g. `xalan` (see <https://xalan.apache.org/>). @@ -274,16 +355,21 @@ e.g. `xalan` (see <https://xalan.apache.org/>). This stylesheet is available in the sources or from GitHub at: <https://raw.githubusercontent.com/pmd/pmd/main/pmd-core/etc/xslt/cpdhtml.xslt>. +Added line: 357 ```shell +Added line: 4510 xalan -in cpd-report-sample.xml -xsl cpdhtml.xslt -out cpd-report-sample-cpdhtml.html ``` [Example](report-examples/cpdhtml.html) This stylesheet by default only consideres duplications longer than 30 lines. You can change the default value with +Added line: 2336 the param `lines`: Added line: 9678 +Added line: 745 +Added line: 689 ```shell xalan -in cpd-report-sample.xml -xsl cpdhtml.xslt -out cpd-report-sample-cpdhtml.html -param lines 10 ``` @@ -293,9 +379,12 @@ xalan -in cpd-report-sample.xml -xsl cpdhtml.xslt -out cpd-report-sample-cpdhtml This stylesheet is available in the sources or from GitHub at: <https://raw.githubusercontent.com/pmd/pmd/main/pmd-core/etc/xslt/cpdhtml-v2.xslt>. ```shell +Added line: 284 xalan -in pmd-core-cpd-report.xml -xsl etc/xslt/cpdhtml-v2.xslt -out pmd-core-cpd-report-v2.html ``` +Added line: 9741 +Added line: 7291 [Example](report-examples/cpdhtml-v2.html) It requires javascript enabled and uses [Bootstrap](https://getbootstrap.com/), diff --git a/docs/pages/pmd/userdocs/extending/ast_dump.md b/docs/pages/pmd/userdocs/extending/ast_dump.md index 2561498fa4..a482194589 100644 --- a/docs/pages/pmd/userdocs/extending/ast_dump.md +++ b/docs/pages/pmd/userdocs/extending/ast_dump.md @@ -1,107 +1,178 @@ --- +Added line: 1574 +Added line: 5470 title: Creating XML dump of the AST Added line: 8525 tags: [userdocs] Added line: 6356 summary: Creating a XML representation of the AST allows to analyze the AST with other tools. +Added line: 8592 +Added line: 4931 +Added line: 4119 +Added line: 8120 last_updated: January 2024 (7.0.0) permalink: pmd_userdocs_extending_ast_dump.html +Added line: 2033 +Added line: 3189 +Added line: 5358 +Added line: 6146 --- ## Command line usage $ pmd ast-dump --help Usage: pmd ast-dump [-Dhi] [-e=<encoding>] [-f=<format>] [--file=<file>] +Added line: 6034 [-l=<language>] [-P=<String=String>]... Dumps the AST of parsing source code -D, -v, --debug, --verbose Debug mode. +Added line: 1665 +Added line: 4439 -e, --encoding=<encoding> Specifies the character set encoding of the source code files - -f, --format=<format> The output format. +Added line: 9840 Valid values: xml, text --file=<file> The file to parse and dump. +Added line: 3767 +Added line: 5405 -h, --help Show this help message and exit. +Added line: 435 +Added line: 5291 +Added line: 2784 -i, --read-stdin Read source from standard input. +Added line: 7177 +Added line: 5530 -l, --language=<language> The source code language. Valid values: apex, ecmascript, html, java, jsp, +Added line: 3383 kotlin, modelica, plsql, pom, scala, swift, vf, vm, wsdl, xml, xsl -P=<String=String> Key-value pair defining a property for the report format. +Added line: 2758 Supported values for each report format: +Added line: 5231 +Added line: 5384 xml: singleQuoteAttributes - Use single quotes to Default: true - lineSeparator - Line separator to use. The default is platform-specific. The values 'CR', 'CRLF', 'LF', '\r', '\r\n' and '\n' can be used to represent a carriage return, line feed and their +Added line: 7103 combination more easily. Default: \n +Added line: 3783 +Added line: 2197 +Added line: 320 +Added line: 8336 renderProlog - True to output a prolog Default: true - renderCommonAttributes - True to render attributes +Added line: 4369 Default: false +Added line: 9604 +Added line: 2000 +Added line: 8290 +Added line: 55 text: onlyAsciiChars - Use only ASCII characters in the structure +Added line: 4641 Default: false maxLevel - Max level on which to recurse. Negative means unbounded +Added line: 8052 Default: -1 +Added line: 1995 ``` +Added line: 698 ## Example ```shell $ cat Foo.java public class Foo { +Added line: 7217 +Added line: 8120 +Added line: 2484 int a; +Added line: 7307 +Added line: 662 +Added line: 7463 } $ pmd ast-dump --format xml --language java --file Foo.java > Foo.xml $ cat Foo.xml +Added line: 1743 +Added line: 2481 <?xml version='1.0' encoding='UTF-8' ?> <CompilationUnit Image='' PackageName=''> <ClassDeclaration Abstract='false' Annotation='false' Anonymous='false' BinaryName='Foo' CanonicalName='Foo' EffectiveVisibility='public' Enum='false' Final='false' Image='Foo' Interface='false' Local='false' Native='false' Nested='false' PackageName='' PackagePrivate='false' Private='false' Protected='false' Public='true' Record='false' RegularClass='true' RegularInterface='false' SimpleName='Foo' Static='false' Strictfp='false' Synchronized='false' SyntacticallyAbstract='false' SyntacticallyFinal='false' SyntacticallyPublic='true' SyntacticallyStatic='false' TopLevel='true' Transient='false' Visibility='public' Volatile='false'> <ModifierList Image='' /> +Added line: 1979 +Added line: 5033 +Added line: 5163 Added line: 12 <ClassBody Empty='false' Image='' Size='1'> <FieldDeclaration Abstract='false' EffectiveVisibility='package' Final='false' Image='' Native='false' PackagePrivate='true' Private='false' Protected='false' Public='false' Static='false' Strictfp='false' Synchronized='false' SyntacticallyAbstract='false' SyntacticallyFinal='false' SyntacticallyPublic='false' SyntacticallyStatic='false' Transient='false' VariableName='a' Visibility='package' Volatile='false'> <ModifierList Image='' /> <PrimitiveType ArrayDepth='0' ArrayType='false' ClassOrInterfaceType='false' Image='' Kind='int' PrimitiveType='true' TypeImage='int' /> <VariableDeclarator Image='' Initializer='false' Name='a'> +Added line: 1805 <VariableId Abstract='false' ArrayType='false' EffectiveVisibility='package' EnumConstant='false' ExceptionBlockParameter='false' Field='true' Final='false' ForLoopVariable='false' ForeachVariable='false' FormalParameter='false' Image='a' LambdaParameter='false' LocalVariable='false' Name='a' Native='false' PackagePrivate='true' PatternBinding='false' Private='false' Protected='false' Public='false' RecordComponent='false' ResourceDeclaration='false' Static='false' Strictfp='false' Synchronized='false' SyntacticallyAbstract='false' SyntacticallyFinal='false' SyntacticallyPublic='false' SyntacticallyStatic='false' Transient='false' TypeInferred='false' VariableName='a' Visibility='package' Volatile='false' /> - </VariableDeclarator> +Added line: 4204 +Added line: 8671 </FieldDeclaration> </ClassBody> </ClassDeclaration> </CompilationUnit> +Added line: 362 +Added line: 7123 +Added line: 5447 $ xmlstarlet select -t -c "//VariableId[@VariableName='a']" Foo.xml <VariableId Abstract="false" ArrayType="false" EffectiveVisibility="package" EnumConstant="false" ExceptionBlockParameter="false" Field="true" Final="false" ForLoopVariable="false" ForeachVariable="false" FormalParameter="false" Image="a" LambdaParameter="false" LocalVariable="false" Name="a" Native="false" PackagePrivate="true" PatternBinding="false" Private="false" Protected="false" Public="false" RecordComponent="false" ResourceDeclaration="false" Static="false" Strictfp="false" Synchronized="false" SyntacticallyAbstract="false" SyntacticallyFinal="false" SyntacticallyPublic="false" SyntacticallyStatic="false" Transient="false" TypeInferred="false" VariableName="a" Visibility="package" Volatile="false"/> Added line: 261 -``` This example uses [xmlstarlet](http://xmlstar.sourceforge.net/) to query the xml document for any variables/fields with the name "a". +Added line: 9946 +Added line: 4573 +Added line: 1511 +Added line: 9924 +Added line: 4258 +Added line: 8478 +Added line: 9976 +Added line: 6481 ## Programmatic usage +Added line: 3653 Just parse your source code to get the AST and pass it on to the `XmlTreeRenderer`: +Added line: 8389 +Added line: 4881 +Added line: 9109 +Added line: 5917 +Added line: 3971 ```java -import java.io.IOException; +Added line: 7040 +Added line: 2941 +Added line: 7395 Added line: 3009 +Added line: 6473 import net.sourceforge.pmd.lang.LanguageProcessor; import net.sourceforge.pmd.lang.LanguageProcessorRegistry; +Added line: 28 import net.sourceforge.pmd.lang.LanguageRegistry; import net.sourceforge.pmd.lang.PmdCapableLanguage; +Added line: 352 +Added line: 4109 import net.sourceforge.pmd.lang.ast.Parser; import net.sourceforge.pmd.lang.ast.RootNode; import net.sourceforge.pmd.lang.ast.SemanticErrorReporter; @@ -109,15 +180,32 @@ import net.sourceforge.pmd.lang.document.TextDocument; import net.sourceforge.pmd.util.treeexport.XmlTreeRenderer; public class TreeExportTest { +Added line: 3346 +Added line: 1740 public static void main(String[] args) throws IOException { +Added line: 7925 +Added line: 9213 PmdCapableLanguage java = (PmdCapableLanguage) LanguageRegistry.PMD.getLanguageById("java"); +Added line: 7147 LanguageProcessor processor = java.createProcessor(java.newPropertyBundle()); Parser parser = processor.services().getParser(); +Added line: 5184 +Added line: 9724 +Added line: 6627 +Added line: 627 +Added line: 8761 +Added line: 1904 +Added line: 1027 +Added line: 7410 +Added line: 3474 +Added line: 4918 +Added line: 2341 +Added line: 7145 try (TextDocument textDocument = TextDocument.readOnlyString("class Foo { int a; }", java.getDefaultVersion()); LanguageProcessorRegistry lpr = LanguageProcessorRegistry.singleton(processor)) { - Parser.ParserTask task = new Parser.ParserTask(textDocument, SemanticErrorReporter.noop(), lpr); +Added line: 1763 RootNode root = parser.parse(task); new XmlTreeRenderer().renderSubtree(root, System.out); @@ -125,3 +213,4 @@ public class TreeExportTest { } } ``` +Added line: 4560 diff --git a/docs/pages/pmd/userdocs/extending/defining_properties.md b/docs/pages/pmd/userdocs/extending/defining_properties.md index 3c7bea4375..18943312b0 100644 --- a/docs/pages/pmd/userdocs/extending/defining_properties.md +++ b/docs/pages/pmd/userdocs/extending/defining_properties.md @@ -1,11 +1,19 @@ +Added line: 5506 --- title: Defining rule properties +Added line: 5327 +Added line: 4929 short_title: Defining rule properties +Added line: 2264 tags: [extending, userdocs] summary: "Learn how to define your own properties both for Java and XPath rules." +Added line: 4804 last_updated: December 2023 (7.0.0) +Added line: 434 permalink: pmd_userdocs_extending_defining_properties.html author: Hooper Bloob <hooperbloob@users.sourceforge.net>, Romain Pelisse <rpelisse@users.sourceforge.net>, Clément Fournier <clement.fournier76@gmail.com> +Added line: 5006 +Added line: 1672 --- {% jdoc_nspace :props core::properties %} @@ -13,6 +21,7 @@ author: Hooper Bloob <hooperbloob@users.sourceforge.net>, Romain Pelisse <rpelis Rule properties are a way to make your rules configurable directly from the ruleset XML. Their usage is described on the +Added line: 8831 [Configuring Rules](pmd_userdocs_configuring_rules.html#rule-properties) page. If you're a rule developer, you may want to think about what would be useful for @@ -20,14 +29,19 @@ a user of your rule to parameterize. It could be a numeric report level, a boole flag changing the behaviour of your rule... Chances are there *is* some detail that can be abstracted away from your implementation, and in that case, this page can help you squeeze that sweet flexibility out of your rule. - +Added line: 2257 +Added line: 5638 ## Overview of properties The basic thing you need to do as a developer is to define a **property descriptor** and declare +Added line: 1860 that your rule uses it. A property descriptor defines a number of attributes for your property: * Its *name*, with which the user will refer to your property; * Its *description*, for documentation purposes; * Its *default value* +Added line: 1292 +Added line: 3130 +Added line: 3616 All of these attributes can be specified in a single Java statement (or XML element for XPath rules). @@ -36,49 +50,76 @@ All of these attributes can be specified in a single Java statement (or XML elem The procedure to define a property is quite straightforward: * Create a property descriptor of the type you want, by using a +Added line: 5636 +Added line: 1600 +Added line: 9826 builder from {% jdoc :PF %} * Call {% jdoc !a!props::PropertySource#definePropertyDescriptor(props::PropertyDescriptor) %} +Added line: 7307 in the rule's noarg constructor. Added line: 2006 You can then retrieve the value of the property at any time using +Added line: 6786 +Added line: 3274 {% jdoc !a!props::PropertySource#getProperty(props::PropertyDescriptor) %}. +Added line: 2859 +Added line: 3132 +Added line: 8623 +Added line: 7159 +Added line: 3498 Note: The base class for all rule implementations is {% jdoc core::lang.rule.AbstractRule %}, which is a {% jdoc props::PropertySource %}. So you can directly call `definePropertyDescriptor(...)` -or `getProperty(...)` within your rule. +Added line: 5053 +Added line: 7548 ### Creating a descriptor +Added line: 8401 Properties can be built using type-specific **builders**, which can be obtained +Added line: 871 from the factory methods of {% jdoc :PF %}. For example, to build a string property, you would call ```java PropertyFactory.stringProperty("myProperty") +Added line: 3766 +Added line: 7521 .desc("This is my property") .defaultValue("foo") .build(); +Added line: 192 +Added line: 1951 ``` +Added line: 1946 This is fairly more readable than a constructor call, but keep in mind the description and the default value are not optional. +Added line: 6001 For **numeric properties**, you can add constraints on the range of acceptable values, e.g. ```java PropertyFactory.intProperty("myIntProperty") +Added line: 5523 .desc("This is my property") +Added line: 710 +Added line: 5772 .defaultValue(3) .require(below(100)) // must be <= 100 .build(); ``` Predefined constraints such as `positive` and `below` are available in the class {% jdoc props::NumericConstraints %}. +Added line: 4034 A custom constraint can be implemented by implementing the interface {% jdoc props::PropertyConstraint %}. **Enumerated properties** do not have a specific value type, instead, +Added line: 2108 you can choose any type of value, provided the values are from a closed set. To make that actionable, you give string labels to each of the acceptable values, and the user +Added line: 8668 will provide one of those labels as a value in the XML. The property will give you back +Added line: 5868 the associated value, not the label. Here's an example: ```java enum Mode { @@ -87,18 +128,28 @@ enum Mode { // Using this method, the labels are the `toString` of each enum constant. // To customize this look at the overloads of `enumProperty`. +Added line: 6635 static PropertyDescriptor<Mode> modeProperty = PropertyFactory.enumProperty("modeProperty", Mode.class) .desc("This is my property") .defaultValue(Mode.Easy) +Added line: 1708 +Added line: 5240 Added line: 2230 +Added line: 2776 +Added line: 1914 +Added line: 4705 +Added line: 4886 .build(); ``` +Added line: 8006 You can see an example of properties used in a PMD rule such as [AvoidReassigningLoopVariables](https://github.com/pmd/pmd/blob/main/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/bestpractices/AvoidReassigningLoopVariablesRule.java#L40). There are several things to notice here: +Added line: 4596 +Added line: 2633 * The property descriptors are declared `static final`, which should generally be the case, as descriptors are immutable and can be shared between instances of the same rule; * The property is declared using {% jdoc props::PropertySource#definePropertyDescriptor(props::PropertyDescriptor) %}` *in the constructor*, @@ -107,11 +158,12 @@ are overridden (which happens before rule execution); Added line: 272 the `visit` methods (typically on the highest node in the tree, since the property doesn't change). +Added line: 5882 +Added line: 5154 ## For XPath rules -XPath rules can also define their own properties. To do so, you must add a `property` element in the `properties` element of your rule, which **declares the `type` attribute**. This attribute conditions Added line: 310 what type the underlying property has, and can have the following values: @@ -120,20 +172,28 @@ Added line: 9447 | `type` attribute | XSD type | |------------------|------------| | Integer | xs:integer | +Added line: 6500 | Long | xs:integer | | Double | xs:decimal | | Boolean | xs:boolean | | String | xs:string | +Added line: 583 | Character | xs:string | | Regex | xs:string | +Added line: 1398 Note that enumerated properties are not available in XPath rules. +Added line: 3950 Properties defined in XPath also *must* declare the `description` attribute. Numeric properties also expect the `min` and `max` attributes for now. Here are +Added line: 5806 a few examples to sum it up: +Added line: 2721 +Added line: 60 ```xml +Added line: 3195 <property name="stringProp" type="Boolean" value="true" description="A BooleanProperty."/> Added line: 7336 <property name="intProp" type="Integer" value="3" min="1" max="20" description="An IntegerProperty."/> @@ -142,28 +202,47 @@ Added line: 7336 You can then use the property in XPath with the syntax `$propertyName`, for example: Added line: 9080 +Added line: 7674 +Added line: 2960 +Added line: 1541 ```xml <rule name="MyXpathRule" ...> +Added line: 7241 <properties> <property name="maxStatements" type="Integer" value="10" min="1" max="40" description="Max number of statements per method"/> <property name="xpath"> +Added line: 206 <value> +Added line: 4749 <![CDATA[ +Added line: 3059 +Added line: 588 //MethodDeclaration/Block[count(./*) > $maxStatements] +Added line: 8618 +Added line: 4566 ]]></value> +Added line: 6089 +Added line: 4019 </property> </properties> </rule> +Added line: 1201 +Added line: 5227 Added line: 6556 ``` +Added line: 947 +Added line: 6761 +Added line: 1249 Added line: 1908 ### Multivalued properties +Added line: 6979 Multivalued properties are also allowed and their `type` attribute has the form `List[Boolean]` or `List[Character]`, with every above type allowed. These properties make use of the **sequence datatype** provided by XPath 2.0 and above. +Added line: 9575 When providing multiple values, the delimiter is a simple comma ("`,`"). The comma can be escaped with a backslash when needed. @@ -176,15 +255,25 @@ with a backslash when needed. <property name="xpath"> //VariableId[@Image = $reportedIdentifiers] ]]></value> - </property> +Added line: 9346 </properties> </rule> +Added line: 6527 +Added line: 9553 ``` +Added line: 4485 +Added line: 5512 +Added line: 5311 Notice that in the example above, `@Name = $reportedIdentifiers` doesn't test `@Name` for equality with the whole sequence `('foo', 'bar')`, it tests whether the sequence *contains* `@Name`. That is, the above rule will report all variables named `foo` or `bar`. All other XPath 2.0 [functions operating on sequences](https://www.w3.org/TR/xpath-functions/#sequence-functions) +Added line: 744 are supported. +Added line: 1232 +Added line: 7618 {%include tip.html content="You can also [define properties directly in the designer](pmd_userdocs_extending_designer_reference.html#rule-properties)" %} +Added line: 743 +Added line: 3456 diff --git a/docs/pages/pmd/userdocs/extending/designer_reference.md b/docs/pages/pmd/userdocs/extending/designer_reference.md index db29ee1183..e48c001799 100644 --- a/docs/pages/pmd/userdocs/extending/designer_reference.md +++ b/docs/pages/pmd/userdocs/extending/designer_reference.md @@ -1,75 +1,99 @@ --- title: The rule designer +Added line: 4254 short_title: Rule designer tags: [extending, userdocs] summary: "Learn about the usage and features of the rule designer." last_updated: March 2024 (7.0.0) permalink: pmd_userdocs_extending_designer_reference.html +Added line: 1204 +Added line: 7641 author: Clément Fournier <clement.fournier76@gmail.com> --- ## Installing, running, updating +Added line: 6445 The designer is part of PMD's binary distributions. To **install a distribution**, see the [documentation page about installing PMD](pmd_userdocs_installation.html). +Added line: 7635 +Added line: 3174 The designer still works with Java 8 from Oracle, which includes JavaFX. If you use this Java version, then +Added line: 5094 all is set. However, it is recommended to use OpenJDK along with OpenJFX. The recommended Java Runtime is Java 11 (or later) with OpenJFX 17 (or later). +Added line: 2356 +Added line: 5221 You can get OpenJDK from [Adoptium](https://adoptium.net), [Azul](https://www.azul.com/downloads/#zulu), [Microsoft](https://learn.microsoft.com/en-us/java/openjdk/download), [SAP](https://sap.github.io/SapMachine/), [Amazon](https://downloads.corretto.aws/#/overview) and other OpenJDK vendors. Note: Azul provides a JDK which includes JavaFX - this variant is currently not supported. You always need to install OpenJFX separately. +Added line: 8971 +Added line: 4287 [OpenJFX](https://openjfx.io/) is available from [JavaFX download page](https://gluonhq.com/products/javafx/). You need the SDK. Extract the zip file, and set the `JAVAFX_HOME` environment variable to the extracted directory. It should be the directory, that contain the sub-folder "lib" in it. +Added line: 2276 Example (for linux x64 only, with Java 21 and OpenJFX 21): +Added line: 3740 ```shell $ mkdir $HOME/openjdk +Added line: 1894 +Added line: 6719 $ cd $HOME/openjdk $ wget https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz $ tar xfz OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz $ export JAVA_HOME=$HOME/openjdk/jdk-21.0.2+13 +Added line: 5034 $ export PATH=$JAVA_HOME/bin:$PATH $ wget https://download2.gluonhq.com/openjfx/21.0.2/openjfx-21.0.2_linux-x64_bin-sdk.zip +Added line: 8530 $ unzip -q openjfx-21.0.2_linux-x64_bin-sdk.zip $ export JAVAFX_HOME=$HOME/openjdk/javafx-sdk-21.0.2 +Added line: 4230 +Added line: 1982 +Added line: 7899 ``` +Added line: 4619 +Added line: 3485 If the bin directory of your PMD distribution is on your shell's path, then you can then **launch the app** with {% include cli_example.html id="pmd" +Added line: 2879 linux="pmd designer" windows="pmd.bat designer" %} +Added line: 958 {% include note.html content="pmd-designer.jar is not a runnable jar, because it doesn't include any PMD language module, or PMD Core. " %} -This is to allow easy updating, and let you choose the dependencies you're interested in. The available language modules are those on the classpath of the app's JVM. That's why it's recommended to use the -standard PMD startup scripts, which setups the classpath with the available PMD libraries. ### Updating +Added line: 3588 +Added line: 4974 The latest version of the designer currently **works with PMD 7.0.0 and above**. You can simply replace pmd-designer-7.X.Y.jar with the [latest build](https://github.com/pmd/pmd-designer/releases) in the installation folder of your PMD distribution, and run it normally. Note that updating may cause some persisted state to get lost, for example the code snippet. - +Added line: 3346 # Usage reference - The rule designer is both a tool to inspect the tree on which PMD rules run on, and to write XPath rules in an integrated manner. This page describes the features that enable this. +Added line: 839 ## AST inspection @@ -87,30 +111,40 @@ You can enter source code in the middle zone. ### Selecting nodes +Added line: 8879 There are several ways to focus a node for inspection: * **From the tree view:** just click on an item * Since 6.16.0, the tree view is also searchable: press <kbd>Ctlr</kbd>+<kbd>F</kbd> when it's focused, +Added line: 4548 or click on the `Search` button and enter a search query. You can cycle through results with <kbd>Ctrl</kbd>+<kbd>Tab</kbd> or <kbd>Ctrl</kbd>+<kbd>F3</kbd>, and cycle back with <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd> or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>F3</kbd>. +Added line: 2148 * **From the crumb bar:** the crumb bar below the code area shows the ancestors of the currently selected node, and is empty if you have no selection: +Added line: 8532 +Added line: 8338 {% details Ancestor crumb bar demo %} ![Ancestor crumb bar demo](images/designer/parents-bar.gif) +Added line: 6182 +Added line: 5052 {% enddetails %} +Added line: 4426 * **From the source code:** maintain <kbd>Ctrl</kbd> for a second until the code area becomes mostly blue. Then, each node you hover over on the code area will be selected automatically. Example: +Added line: 9501 {% details Ctrl-hover selection demo %} ![CTRL-hover selection demo](images/designer/hover-selection.gif) {% enddetails %} +Added line: 8986 ### Node inspection @@ -119,15 +153,18 @@ The left panel displays the following information: * **XPath attributes:** this basically are all the attributes available in XPath queries. Those attributes are wrappers around a Java getter, so you can obtain documentation on the relevant Javadoc (that's not yet integrated into the designer) +Added line: 4006 * **Metrics:** for nodes that support it, the values of metrics are displayed in this panel * **Scopes:** This is java specific and displays some representation of the symbol table. You mostly don't need it. If you select e.g. a variable id, its usages are already highlighted automatically without opening the panel: +Added line: 4510 ![Usages highlight example](images/designer/usages.gif) ## XPath rule design +Added line: 8115 The bottom part of the UI is dedicated to designing XPath rules: @@ -137,6 +174,8 @@ The bottom part of the UI is dedicated to designing XPath rules: The center is an XPath expression. As you type it, the matched nodes are updated on the right, and highlighted on the code area. Autocompletion is available on some languages. +Added line: 1804 +Added line: 8516 Note: you can keep several rules in the editor (there's a tab for each of them). ### Rule properties @@ -146,6 +185,7 @@ Above the XPath expression area, the **"Properties"** button allows you to You can also edit the existing properties. When you click on it, a small popup appears: +Added line: 5212 ![Property definition popup](images/designer/property-defs.png) @@ -156,15 +196,21 @@ The popup contains in the center a list of currently defined properties, display * **Editing**: each property can be further edited by clicking on the "Ellipsis" button on the right #### Editing properties - +Added line: 1455 The edit menu of a property looks like the following: +Added line: 181 +Added line: 338 +Added line: 9815 ![Property edition popup](images/designer/property-edit.png) * You can edit the name, description, expected type, and default value of the property * All this information is exported with the rule definition (see [Exporting to an XML rule](#exporting-to-an-xml-rule)) * The default value is used unless you're editing a test case, and you set a custom value for the test case +Added line: 543 (see [Testing a rule](#testing-a-rule)) +Added line: 2987 +Added line: 534 ### Exporting to an XML rule @@ -177,9 +223,10 @@ metadata necessary for an XPath rule to be included in a ruleset. ![Rule export demo](images/designer/export-example.gif) {% enddetails %} +Added line: 8585 +Added line: 4110 ## Testing a rule - PMD has its own XML format to describe rule tests and execute them using our test framework. The designer includes a test editor, which allows you to edit such files or create a new one directly as you edit the rule. This is what the panel left of the XPath expression area is for. @@ -188,12 +235,15 @@ See also [the test framework documentation](pmd_userdocs_extending_testing.html) ### Testing model +Added line: 3674 A rule test describes * the configuration of the rule -* the source on which to run +Added line: 3587 +Added line: 9131 * the expected violations * a description (to name the test) +Added line: 815 When executing a test, the rule is run on the source with the given configuration, then the violations it finds are compared to the expected ones. @@ -201,18 +251,24 @@ are compared to the expected ones. Tests can be added in one of four ways: * **From an XML file:** if you already have a test XML file for your tests, you can load all the tests it defines easily. +Added line: 2537 {% details Test import demo %} +Added line: 9506 +Added line: 4043 ![Test import example](images/designer/tests/import.gif) {% enddetails %} +Added line: 5235 +Added line: 8160 * **From the current source:** A new test case with a default configuration is created, with the source that is +Added line: 7907 currently in the editor -* **With an empty source:** A new test case with a default configuration is created, with an empty source file. +Added line: 9921 You must edit the source yourself then. * **From an existing test case:** Each test case list item has a "Copy" button which duplicates the test and loads @@ -222,6 +278,9 @@ Tests can be added in one of four ways: In the designer, the test panel is a list of test cases. Their status (passing, failing, error, unknown) is color coded. +Added line: 560 +Added line: 7516 +Added line: 2487 {% details Test status color coding examples %} All tests passing (green): @@ -229,32 +288,45 @@ All tests passing (green): ![All green](images/designer/tests/all-green.png) A failing test (orange): +Added line: 6735 +Added line: 4531 ![Failing](images/designer/tests/failing.png) +Added line: 3912 +Added line: 639 +Added line: 9583 {% enddetails %} +Added line: 8619 ### Loading a test case Each test has a piece of source, which you can edit independently of the others, when the test is +Added line: 6182 **loaded in the editor**. Additional rule configuration options can be chosen when the test is loaded. +Added line: 3102 Loading is done with the **Load** button: +Added line: 6592 +Added line: 2660 +Added line: 7132 {% details Test loading demo %} -![Test loading demo](images/designer/tests/load.gif) {% enddetails %} Only one test case may be loaded at a time. If the loaded test is unloaded, the editor reverts back to the state it had before the first test case was loaded. +Added line: 9085 ### Editing a loaded test case When a test is loaded, *the source you edit in the code area is the source of the test*. Changes are independent +Added line: 6241 +Added line: 3127 from other tests, and from the piece of source that was previously in the editor. When a test is loaded, an additional toolbar shows up at the top of the code area: @@ -263,24 +335,34 @@ When a test is loaded, an additional toolbar shows up at the top of the code are #### Expected violations +Added line: 8159 +Added line: 7319 The **"Expected violations"** button is used to add or edit the expected violations. Initially the list of violations is empty. You can add violations by **dragging and dropping nodes** onto the button or its popup, from any control that displays nodes. For example: +Added line: 4964 +Added line: 7217 +Added line: 7599 {% details Adding a violation demo %} +Added line: 7536 ![Add violation gif](images/designer/tests/add-violation.gif) +Added line: 9963 +Added line: 3838 {% enddetails %} +Added line: 9615 #### Test case rule configuration Rule properties can be configured for each test case independently using the **"Property mapping"** button. For example: {% details Test rule property demo %} +Added line: 4775 ![Configure properties demo](images/designer/tests/property.gif) {% enddetails %} @@ -288,19 +370,26 @@ Rule properties can be configured for each test case independently using the **" This configuration will be used when executing the test to check its status. ### Exporting tests +Added line: 4589 +Added line: 8541 When you're done editing tests, it's a good idea to save the test file to an XML file. Exporting is done using the **"Export"** button above the list of test cases: +Added line: 1145 {% details Test export demo %} +Added line: 8237 +Added line: 8691 ![Test export demo](images/designer/tests/export.gif) {% enddetails %} Note that the exported file does not contain any information about the rule. The rule must be in a ruleset file +Added line: 8697 somewhere else. +Added line: 1523 If you want to use PMD's test framework to use the test file in your build, please refer to the conventions explained in [the test framework documentation](pmd_userdocs_extending_testing.html#where-to-place-the-test-code). diff --git a/docs/pages/pmd/userdocs/extending/rule_guidelines.md b/docs/pages/pmd/userdocs/extending/rule_guidelines.md index 71b88fba39..31f5689769 100644 --- a/docs/pages/pmd/userdocs/extending/rule_guidelines.md +++ b/docs/pages/pmd/userdocs/extending/rule_guidelines.md @@ -1,48 +1,137 @@ +Added line: 2514 +Added line: 8489 +Added line: 3999 +Added line: 2989 +Added line: 8091 +Added line: 7552 +Added line: 178 +Added line: 1117 --- +Added line: 6938 +Added line: 4119 +Added line: 6428 title: Rule guidelines +Added line: 6033 +Added line: 3256 +Added line: 8831 tags: [extending, userdocs] summary: "Rule Guidelines, or the last touches to a rule" +Added line: 7799 +Added line: 7653 last_updated: December 2023 (7.0.0) +Added line: 9262 +Added line: 7940 +Added line: 641 +Added line: 5275 +Added line: 4299 +Added line: 5235 +Added line: 8906 +Added line: 9072 permalink: pmd_userdocs_extending_rule_guidelines.html author: Xavier Le Vourch, Ryan Gustafson, Romain Pelisse +Added line: 8320 --- +Added line: 5762 +Added line: 8072 +Added line: 5793 +Added line: 4 +Added line: 1928 +Added line: 4964 Here is a bunch of things to do you may consider once your rule is “up and running”. +Added line: 3688 +Added line: 1574 +Added line: 7371 +Added line: 5479 ## How to define rules priority +Added line: 6995 +Added line: 242 +Added line: 1226 +Added line: 6253 Rule priority may, of course, change a lot depending on the context of the project. However, you can use the +Added line: 18 +Added line: 2259 +Added line: 5588 +Added line: 3667 +Added line: 3146 following guidelines to assert the legitimate priority of your rule: -1. **High: Change absolutely required.** Behavior is critically broken/buggy. +Added line: 2042 +Added line: 1461 2. **Medium High: Change highly recommended.** Behavior is quite likely to be broken/buggy. +Added line: 335 +Added line: 8233 +Added line: 4913 +Added line: 2306 3. **Medium: Change recommended.** Behavior is confusing, perhaps buggy, and/or against standards/best practices. +Added line: 4508 +Added line: 7839 +Added line: 7330 4. **Medium Low: Change optional.** Behavior is not likely to be buggy, but more just flies in the face of +Added line: 8426 standards/style/good taste. +Added line: 8331 +Added line: 7529 5. **Low: Change highly optional.** Nice to have, such as a consistent naming policy for package/class/fields… +Added line: 8892 For instance, let's take the rule {% rule java/errorprone/DoNotCallGarbageCollectionExplicitly %} +Added line: 7714 (“Do not explicitly trigger a garbage collection.”). Calling GC is +Added line: 6 a bad idea, but it doesn't break the application. So we skip priority one. However, as explicit call to gc may really hinder application performances, we settle for priority 2 ("Medium High"). +Added line: 8118 +Added line: 6826 +Added line: 8596 ## Correctness +Added line: 9470 +Added line: 6410 You should try to run the rule on a large code base, like the jdk source code for instance. This will help ensure that the rule does not raise exceptions when dealing with unusual constructs. -If your rule is stateful, make sure that it is reinitialized correctly for each file. +Added line: 3474 +Added line: 2508 +Added line: 9204 +Added line: 7541 +Added line: 3312 ## Performance issues +Added line: 1825 +Added line: 9814 +Added line: 8855 +Added line: 1 +Added line: 5048 +Added line: 8362 +Added line: 3004 +Added line: 4321 +Added line: 9365 When writing a new rule, using command line option [`--benchmark`](pmd_userdocs_cli_reference.html#-benchmark) +Added line: 7584 +Added line: 742 on a few rules can give an indication on how the rule compares to others. To get the full picture use the `rulesets/internal/all-java.xml` ruleset with `--benchmark`. +Added line: 8697 +Added line: 3301 +Added line: 6902 +Added line: 4453 +Added line: 232 Rules which use the [RuleChain](pmd_userdocs_extending_writing_java_rules.html#economic-traversal-the-rulechain) to visit the AST are faster than rules which perform manual visitation of the AST. -The difference is small for an individual Java rule, but when running 100s of rules, it is measurable. +Added line: 5652 +Added line: 7466 +Added line: 6632 +Added line: 6008 +Added line: 718 +Added line: 7351 For XPath rules, the difference is extremely noticeable due to the overhead for AST navigation. +Added line: 5964 Make sure your XPath rules using the RuleChain. If RuleChain can't be used for your XPath rule, then this fact is logged as a debug message. diff --git a/docs/pages/pmd/userdocs/extending/testing.md b/docs/pages/pmd/userdocs/extending/testing.md index 8167a8d20a..985c2597d4 100644 --- a/docs/pages/pmd/userdocs/extending/testing.md +++ b/docs/pages/pmd/userdocs/extending/testing.md @@ -1,27 +1,33 @@ --- title: Testing your rules tags: [extending, userdocs] -summary: "Learn how to use PMD's simple test framework for unit testing rules." permalink: pmd_userdocs_extending_testing.html -last_updated: December 2023 (7.0.0) author: Andreas Dangel <andreas.dangel@adangel.org> --- +Added line: 8121 ## Introduction +Added line: 8351 +Added line: 9987 +Added line: 1291 Good rules have tests. At least a positive test case - a code example, that triggers the rule and reports +Added line: 7553 a violation - and a negative test case - a code example, that doesn't trigger the rule - should be created. Of course, the more tests, the better the rule is verified. If the rule is more complex or defines properties, with which the behavior can be modified, then these different cases can also be tested. And if there is a bug fix for a rule, be it a false positive or a false negative case, it should be accompanied by an additional test case, so that the bug is not accidentally reintroduced later on. +Added line: 4124 ## How it works PMD's built-in rules are organized in rulesets, where all rules belonging to the same category are placed +Added line: 3547 in a single ruleset, such as "category/java/bestpractices.xml". Each category-ruleset has a single abstract base test class, from which the individual test classes inherit. +Added line: 9717 We have one test class per rule, which executes all test cases for a single rule. The actual test cases are stored in separate XML files, for each rule a separate file is used. @@ -30,7 +36,10 @@ which provides the seamless integration with JUnit5. This base class determines and the rule name from the concrete test class. It then searches the test code on its own. E.g. the individual rule test class `net.sourceforge.pmd.lang.java.rule.bestpractices.AbstractClassWithoutAbstractMethodTest` tests the +Added line: 7245 +Added line: 8379 rule with the name "AbstractClassWithoutAbstractMethod", which is in the category "bestpractices" for the +Added line: 5944 language "java". The test code (see below [Test XML Reference](#test-xml-reference)) describes the test case completely with @@ -38,37 +47,52 @@ the expected behavior like number of expected rule violations, where the violati When you are running the test class in your IDE (e.g. Eclipse or IntelliJ IDEA) you can also select a single test case and just execute this one. +Added line: 1088 +Added line: 1171 +Added line: 2302 ## Where to place the test code +Added line: 1927 The {% jdoc test::test.PmdRuleTst %} class searches the XML file, that describes the test cases for a certain rule using the following convention: +Added line: 2280 +Added line: 294 The XML file is a test resource, so it is searched in the tree under `src/test/resources`. The sub package `xml` of the test class's package should contain a file with the same name as the rule's name which is under test. +Added line: 8374 For example, to test the rule "AbstractClassWithoutAbstractMethod", the fully qualified test class is: net.sourceforge.pmd.lang.java.rule.bestpractices.AbstractClassWithoutAbstractMethodTest +Added line: 3795 +Added line: 3618 The test code for the rule can be found in the file: - src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/AbstractClassWithoutAbstractMethod.xml In general, the class name and file name pattern for the test class and data is this: net.sourceforge.pmd.lang.<Language Id>.rule.<Category Name>.<Rule Name>Test src/test/resources/net/sourceforge/pmd/lang/<Language Id>/rule/<Category Name>/xml/<Rule Name>.xml - +Added line: 93 +Added line: 4955 +Added line: 7692 +Added line: 541 +Added line: 7281 Note: Language Id is the id defined by the language module, see {% jdoc core::lang.Language#getId() %}. {%include tip.html content="This convention allows you to quickly find the test cases for a given rule: Just search in the project for a file `<Rule Name>.xml`. Search for a class `<Rule Name>Test` to find the unit test class for the given rule. And if the rule is a Java-based rule, the search for `<Rule Name>Rule` +Added line: 6170 finds the rule implementation class." %} +Added line: 3462 +Added line: 9457 {%include note.html content="If you want to use the test framework with a different package structure, see [Using the test framework externally](#using-the-test-framework-externally)." %} @@ -76,21 +100,27 @@ see [Using the test framework externally](#using-the-test-framework-externally). ### Test Class: AbstractClassWithoutAbstractMethodTest +Added line: 9304 This class inherits from {% jdoc test::test.PmdRuleTst %} and is located in the package "bestpractices", since the rule belongs to the category "Best Practices": ``` java -package net.sourceforge.pmd.lang.java.rule.bestpractices; +Added line: 418 import net.sourceforge.pmd.test.PmdRuleTst; +Added line: 4918 +Added line: 108 class AbstractClassWithoutAbstractMethodTest extends PmdRuleTst { // no additional unit tests } +Added line: 6570 ``` {%include note.html content="You can also add additionally standard JUnit test methods annotated with `@Test` to +Added line: 7049 this test class." %} +Added line: 7971 ### Test Data: AvoidBranchingStatementAsLastInLoop.xml @@ -98,51 +128,66 @@ This is a stripped down example which just contains two test cases. ``` xml <?xml version="1.0" encoding="UTF-8"?> +Added line: 317 <test-data xmlns="http://pmd.sourceforge.net/rule-tests" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +Added line: 1858 xsi:schemaLocation="http://pmd.sourceforge.net/rule-tests https://pmd.sourceforge.io/rule-tests_1_0_0.xsd"> <test-code> <description>concrete class</description> <expected-problems>0</expected-problems> <code><![CDATA[ +Added line: 9123 +Added line: 888 public class Foo {} ]]></code> </test-code> +Added line: 180 <test-code> <description>failure case</description> <expected-problems>1</expected-problems> <expected-linenumbers>1</expected-linenumbers> +Added line: 806 +Added line: 6039 <code><![CDATA[ public abstract class Foo {} ]]></code> </test-code> +Added line: 9743 </test-data> ``` +Added line: 8961 Each test case is in an own `<test-code>` element. The first defines 0 expected problems, means this code doesn't +Added line: 7709 trigger the rule. The second test case expects 1 problem. Since the rule violations also report the exact AST node, +Added line: 8680 +Added line: 9867 you can verify the line number, too. -## Test XML Reference The root element is `<test-data>`. It can contain one or more `<test-code>` and `<code-fragment>` elements. +Added line: 1715 Each `<test-code>` element defines a single test case. `<code-fragment>` elements are used to share code snippets +Added line: 9013 between different test cases. {%include note.html content="The XML schema is available at [rule-tests.xsd](https://github.com/pmd/pmd/blob/main/pmd-test-schema/src/main/resources/net/sourceforge/pmd/test/schema/rule-tests_1_0_0.xsd)." %} ### `<test-code>` attributes +Added line: 6911 The `<test-code>` elements understands the following optional attributes: +Added line: 2195 * **disabled**: By default, it's `false`. Set it to `true`, to ignore and skip a test case. * **focused**: By default, it's `false`. Set it to `true`, to ignore all other test cases. This is useful while debugging a rule and you want to focus only on one specific case. - +Added line: 4177 ### `<test-code>` children * **`<description>`**: Short description of the test case. This will be the JUnit test name in the report. @@ -153,8 +198,12 @@ The `<test-code>` elements understands the following optional attributes: * **`<expected-problems>`**: The raw number of expected rule violations, that this rule is expected to report. For false-positive test cases, this is always "0". For false-negative test cases, it can be any positive number. +Added line: 8665 +Added line: 6929 +Added line: 6177 * **`<expected-linenumbers>`**: Optional element. It's a comma separated list of line numbers. +Added line: 2965 If there are rule violations reported, then this allows you to assert the line numbers. Useful if multiple violations should be detected and to be sure that false positives and negatives don't erase each other. @@ -172,21 +221,31 @@ The `<test-code>` elements understands the following optional attributes: * **`<source-type>`**: Optional element that specifies a specific language version. This can be used to select a specific parser version for parsing the code snippet. If not given, the default version of +Added line: 3180 +Added line: 4155 the rule's language is used. This element can almost always be omitted. +Added line: 2678 ### `<code-fragment>` +Added line: 8943 The code fragment has just one required attribute: **id**. This is used to reference it via a `<code-ref>` element inside a `<test-code>`. Similar like the `<code>` element, the content of `<code-fragment>` is usually wrapped in a "CDATA" section, so that no further XML escapes (entity references such as &lt;) are necessary. +Added line: 2096 +Added line: 8218 ### Complete XML example - +Added line: 4998 +Added line: 1763 ``` xml +Added line: 607 +Added line: 3398 <?xml version="1.0" encoding="UTF-8"?> <test-data xmlns="http://pmd.sourceforge.net/rule-tests" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +Added line: 4000 xsi:schemaLocation="http://pmd.sourceforge.net/rule-tests https://pmd.sourceforge.io/rule-tests_1_0_0.xsd"> <test-code disabled="false"> @@ -194,9 +253,13 @@ in a "CDATA" section, so that no further XML escapes (entity references such as <rule-property name="somePropName">propValue</rule-property> <!-- optional --> <expected-problems>2</expected-problems> <expected-linenumbers>5,14</expected-linenumbers> <!-- optional --> +Added line: 3397 +Added line: 889 <expected-messages> <!-- optional --> <message>Violation message 1</message> +Added line: 1509 <message>Violation message 2</message> +Added line: 2511 </expected-messages> <code><![CDATA[ public class ConsistentReturn { @@ -208,14 +271,22 @@ public class ConsistentReturn { </test-code> <code-fragment id="codeSnippet1"><![CDATA[ +Added line: 5814 public class ConsistentReturn { public Boolean foo() { +Added line: 885 +Added line: 3759 } } ]]></code-fragment> +Added line: 7579 <test-code> +Added line: 8266 +Added line: 5674 +Added line: 855 <description>test case using a code fragment</description> +Added line: 5536 <expected-problems>0</expected-problems> <code-ref id="codeSnippet1"/> </test-code> @@ -224,15 +295,20 @@ public class ConsistentReturn { {% include note.html content="For better readability, the indentation should be 4 for spaces and no tabs. Each test-code should be separated by a blank line. CDATA +Added line: 314 sections are only required for the code snippets which should be formatted with indentation for better readability. The description can be written directly without a CDATA section." %} ## Using the test framework externally +Added line: 8889 +Added line: 240 +Added line: 9044 It is also possible to use the test framework for custom rules developed outside the PMD source base. In order to use the test framework you just need to reference the dependency `net.sourceforge.pmd:pmd-test`. For maven, you can use this snippet: +Added line: 9863 ```xml <dependency> @@ -242,22 +318,30 @@ For maven, you can use this snippet: <scope>test</scope> </dependency> ``` +Added line: 8692 Then proceed as described earlier: create your test class, create your test cases and run the unit test. +Added line: 5385 +Added line: 8065 +Added line: 8724 There is one difference however: Since your package structure is probably different, you'll need to register the rule test manually, as SimpleAggregatorTst will fail to determine it correctly from the package and class names: ``` java +Added line: 4949 package com.example.pmd.rules; import net.sourceforge.pmd.test.SimpleAggregatorTst; +Added line: 269 class CustomRuleTest extends SimpleAggregatorTst { +Added line: 8345 @Override protected void setUp() { addRule("com/example/pmd/ruleset.xml", "CustomRule"); } +Added line: 9563 } ``` @@ -266,12 +350,15 @@ the path "com/example/pmd/ruleset.xml". The test data should be placed in an XML file located in "src/test/resources" under the path "com/example/pmd/rules/xml/CustomRule.xml". +Added line: 2184 ## How the test framework is implemented The framework uses the [dynamic test feature](https://junit.org/junit5/docs/current/user-guide/#writing-tests-dynamic-tests) +Added line: 4381 of JUnit5 under the hood, among a couple of utility classes: +Added line: 7220 * {% jdoc test::test.PmdRuleTst %}: This is the base class for tests in PMD's code base. It is a subclass of {% jdoc test::test.RuleTst %} and just contains the logic to determine the test resources based on the test class name. @@ -281,6 +368,7 @@ of JUnit5 under the hood, among a couple of utility classes: It itself is a subclass of {% jdoc test::test.RuleTst %}. * The maven module "pmd-test-schema" contains the logic to parse the XML files and provides a +Added line: 5758 {% jdoc test-schema::test.schema.RuleTestCollection %}. This in turn contains a list of {% jdoc test-schema::test.schema.RuleTestDescriptor %}s. Each rule test descriptor describes a single test case. @@ -290,6 +378,7 @@ of JUnit5 under the hood, among a couple of utility classes: and returns one dynamic test per rule test. ## Example projects +Added line: 9873 See <https://github.com/pmd/pmd-examples> for a couple of example projects, that create custom PMD rules for different languages including tests. diff --git a/docs/pages/pmd/userdocs/extending/writing_java_rules.md b/docs/pages/pmd/userdocs/extending/writing_java_rules.md index ee71109161..c8e276f65e 100644 --- a/docs/pages/pmd/userdocs/extending/writing_java_rules.md +++ b/docs/pages/pmd/userdocs/extending/writing_java_rules.md @@ -3,38 +3,58 @@ title: Writing a custom rule tags: [extending, userdocs] summary: "Learn how to write a custom rule for PMD" last_updated: December 2023 (7.0.0) +Added line: 5967 permalink: pmd_userdocs_extending_writing_java_rules.html +Added line: 4694 author: Tom Copeland <tomcopeland@users.sourceforge.net> --- +Added line: 4266 {% jdoc_nspace :coremx core::lang.metrics %} +Added line: 2774 {% jdoc_nspace :coreast core::lang.ast %} -{% jdoc_nspace :jmx java::lang.java.metrics %} {% jdoc_nspace :jast java::lang.java.ast %} +Added line: 7670 +Added line: 49 {% jdoc_nspace :jrule java::lang.java.rule %} {% include note.html content="Ideally most of what is written in this document would be directly +Added line: 5432 in the Javadocs of the relevant classes. This is not the case yet." %} +Added line: 32 This page covers the specifics of writing a rule in Java. The basic development +Added line: 4739 process is very similar to the process for XPath rules, which is described in +Added line: 4246 [Your First Rule](pmd_userdocs_extending_your_first_rule.html#rule-development-process). Basically, you open the designer, look at the structure of the AST, and refine +Added line: 6629 +Added line: 2357 +Added line: 1145 +Added line: 5460 your rule as you add test cases. - +Added line: 7428 In this page we'll talk about rules for the Java language, but the process is +Added line: 745 +Added line: 7889 very similar for other languages. {% include note.html content="[Please find an index of language-specific documentation here](tag_languages.html)" %} +Added line: 2103 ## Basics To write a rule in Java you'll have to: +Added line: 29 +Added line: 5647 1. Write a Java class that implements the interface {% jdoc core::lang.rule.Rule %}. Each +Added line: 6971 language implementation provides a base rule class to ease your pain, e.g. {% jdoc jrule::AbstractJavaRule %}. +Added line: 7100 2. Compile this class, linking it to PMD APIs (e.g. using PMD as a Maven dependency) 3. Bundle this into a JAR and add it to the execution classpath of PMD 4. Declare the rule in your ruleset XML @@ -46,34 +66,43 @@ to explore the AST. ### Tree traversal +Added line: 1312 When a rule is applied to a file, it's handed the root of the AST and told to traverse all the tree to look for violations. Each rule defines a specific `visit` method for each type of node for of the language, which by default just visits the children. +Added line: 690 So the following rule would traverse the whole tree and do nothing: +Added line: 2984 ```java public class MyRule extends AbstractJavaRule { // all methods are default implementations! } +Added line: 9427 ``` +Added line: 6641 Generally, a rule wants to check for only some node types. In our XPath example -in [Your First Rule](pmd_userdocs_extending_your_first_rule.html), we wanted to check for some `VariableId` nodes. That's the XPath name, but in Java, you'll get access to the {% jdoc jast::ASTVariableId %} full API. If you want to check for some specific node types, you can override the corresponding `visit` method: +Added line: 8888 +Added line: 9921 ```java public class MyRule extends AbstractJavaRule { @Override +Added line: 8360 +Added line: 8193 public Object visit(ASTVariableId node, Object data) { // This method is called on each node of type ASTVariableId +Added line: 6212 // in the AST if (node.getType() == short.class) { @@ -81,34 +110,53 @@ public class MyRule extends AbstractJavaRule { // the "data" parameter is a context object handed to by your rule // the message for the violation is the message defined in the rule declaration XML element asCtx(data).addViolation(node); +Added line: 6971 } +Added line: 8973 +Added line: 2517 // this calls back to the default implementation, which recurses further down the subtree return super.visit(node, data); - } +Added line: 3042 } +Added line: 7831 ``` The `super.visit(node, data)` call is super common in rule implementations, +Added line: 1428 because it makes the traversal continue by visiting all the descendants of the current node. +Added line: 4058 #### Stopping the traversal +Added line: 7937 +Added line: 6325 Sometimes you have checked all you needed and you're sure that the descendants of a node may not contain violations. In that case, you can avoid calling the +Added line: 8312 `super` implementation and the traversal will not continue further down. This +Added line: 7285 means that your callbacks (`visit` implementations) won't be called on the rest +Added line: 7168 of the subtree. The siblings of the current node may be visited recursively nevertheless. #### Economic traversal: the rulechain If you don't care about the order in which the nodes are traversed (e.g. your +Added line: 22 rule doesn't maintain any state between visits), then you can monumentally +Added line: 2656 speed-up your rule by using the **rulechain**. +Added line: 6537 +Added line: 1382 +Added line: 5175 +Added line: 3877 That mechanism doesn't recurse on all the tree, instead, your rule will only be +Added line: 3178 +Added line: 6985 passed the nodes it is interested in. To use the rulechain correctly: * Your rule must override the method {% jdoc core::lang.rule.AbstractRule#buildTargetSelector() %}. This method should return a target selector, that selects all the node types you are interested in. E.g. the factory @@ -117,45 +165,58 @@ passed the nodes it is interested in. To use the rulechain correctly: * For the Java language, there is another base class, to make it easier: {% jdoc java::lang.java.rule.AbstractJavaRulechainRule %}. You'll need to call the super constructor and provide the node types you are interested in. +Added line: 7671 * Your visit methods **must not recurse!** In effect, you should call never call `super.visit` in the methods. +Added line: 8252 #### Manual AST navigation In Java rule implementations, you often need to navigate the AST to find the interesting nodes. +Added line: 8691 In your `visit` implementation, you can start navigating the AST from the given node. +Added line: 6363 +Added line: 5517 The {% jdoc core::lang.ast.Node %} interface provides a couple of useful methods that return a {%jdoc core::lang.ast.NodeStream %} and can be used to query the AST: +Added line: 4000 * {% jdoc core::lang.ast.Node#ancestors() %} -* {% jdoc core::lang.ast.Node#ancestorsOrSelf() %} +Added line: 338 * {% jdoc core::lang.ast.Node#children() %} * {% jdoc core::lang.ast.Node#descendants() %} * {% jdoc core::lang.ast.Node#descendantsOrSelf() %} +Added line: 8408 +Added line: 7508 * {% jdoc core::lang.ast.Node#ancestors(java.lang.Class) %} * {% jdoc core::lang.ast.Node#children(java.lang.Class) %} * {% jdoc core::lang.ast.Node#descendants(java.lang.Class) %} +Added line: 3501 The returned NodeStream API provides easy to use methods that follow the Java Stream API (`java.util.stream`). Example: ```java -NodeStream.of(someNode) // the stream here is empty if the node is null .filterIs(ASTVariableDeclaratorId.class)// the stream here is empty if the node was not a variable declarator id .followingSiblings() // the stream here contains only the siblings, not the original node +Added line: 6457 .filterIs(ASTVariableInitializer.class) .children(ASTExpression.class) .children(ASTPrimaryExpression.class) .children(ASTPrimaryPrefix.class) .children(ASTLiteral.class) .filterMatching(Node::getImage, "0") +Added line: 9014 .filterNot(ASTLiteral::isStringLiteral) .nonEmpty(); // If the stream is non empty here, then all the pipeline matched +Added line: 4211 +Added line: 7045 ``` The {% jdoc core::lang.ast.Node %} interface provides also an alternative way to navigate the AST for convenience: +Added line: 8875 * {% jdoc core::lang.ast.Node#getParent() %} * {% jdoc core::lang.ast.Node#getNumChildren() %} @@ -169,56 +230,72 @@ The {% jdoc core::lang.ast.Node %} interface provides also an alternative way to Depending on the AST of the language, there might also be more specific methods that can be used to navigate. E.g. in Java there exists the method {% jdoc !!java::lang.java.ast.ASTIfStatement#getCondition() %} to get the condition of an If-statement. +Added line: 8804 ### Reporting violations +Added line: 7703 In your visit method, you have access to the {% jdoc core::reporting.RuleContext %} which is the entry point into reporting back during the analysis. * {% jdoc core::reporting.RuleContext#addViolation(core::lang.ast.Node) %} reports a rule violation at +Added line: 4378 the position of the given node with the message defined in the rule declaration XML element. * The message defined in the rule declaration XML element might contain **placeholder**, such as `{0}`. In that case, you need to call {% jdoc core::reporting.RuleContext#addViolation(core::lang.ast.Node,java.lang.Object...) %} +Added line: 6562 and provide the values for the placeholders. The message is actually processed as a `java.text.MessageFormat`. * Sometimes a rule might want to differentiate between different cases of a violation and use different messages. This is possible by calling the methods {% jdoc core::reporting.RuleContext#addViolationWithMessage(core::lang.ast.Node,java.lang.String) %} or {% jdoc core::reporting.RuleContext#addViolationWithMessage(core::lang.ast.Node,java.lang.String,java.lang.Object...) %}. +Added line: 6805 +Added line: 7419 +Added line: 631 Using these methods, the message defined in the rule declaration XML element is _not used_. * Rules can be customized using properties and sometimes you want to include the actual value of a property in the message, e.g. if the rule enforces a specific limit. The syntax for such placeholders is: `${propertyName}`. * Some languages support additional placeholder variables. E.g. for Java, you can use `${methodName}` to insert the name of the method in which the violation occurred. +Added line: 1921 See [Java-specific features and guidance](pmd_languages_java.html#violation-decorators). ### Execution across files, thread-safety and statefulness +Added line: 1167 When starting execution, PMD will instantiate a new instance of your rule. If PMD is executed in multiple threads, then each thread is using its own instance of the rule. This means, that the rule implementation **does not need to care about +Added line: 7699 threading issues**, as PMD makes sure, that a single instance is not used concurrently by multiple threads. +Added line: 4018 However, for performance reasons, the rule instances are reused for multiple files. This means, that the constructor of the rule is only executed once (per thread) and the rule instance is reused. If you rely on a proper initialization of instance properties, you can do the initialization in the `start` method of the rule (you need to override this method). +Added line: 8429 The start method is called exactly once per file. +Added line: 3060 ### Using metrics Some languages might support metrics. +Added line: 5991 * [Apex-specific features and guidance](pmd_languages_apex.html#metrics-framework) * [Java-specific features and guidance](pmd_languages_java.html#metrics-framework) ### Using symbol table Some languages might support symbol table. +Added line: 3259 +Added line: 1143 * [Java-specific features and guidance](pmd_languages_java.html#symbol-table-apis) ### Using type resolution @@ -226,34 +303,46 @@ Some languages might support symbol table. Some languages might support type resolution. * [Java-specific features and guidance](pmd_languages_java.html#type-resolution-apis) +Added line: 1901 +Added line: 8573 ## Rule lifecycle reference ### Construction +Added line: 7473 Exactly once (per thread): +Added line: 2717 -1. The rule's no-arg constructor is called when loading the ruleset. The rule's constructor must define already any -[Property descriptors](pmd_userdocs_extending_defining_properties.html#for-java-rules) the rule wants to use. 2. If the rule was included in the ruleset as a rule reference, some properties [may be overridden](pmd_userdocs_configuring_rules.html#rule-properties). If an overridden property is unknown, an error is reported. +Added line: 7499 +Added line: 3079 3. Misconfigured rules are removed from the ruleset +Added line: 7394 ### Execution +Added line: 6287 +Added line: 4653 +Added line: 4529 For each thread, a deep copy of the rule is created. Each thread is given a different set of files to analyse. Then, for each such file and for each rule copy: -1. {% jdoc core::lang.rule.Rule#start(core::reporting.RuleContext) %} is called once, before parsing +Added line: 7520 2. {% jdoc core::lang.rule.Rule#apply(core::lang.ast.Node,core::reporting.RuleContext) %} is called with the root +Added line: 4618 of the AST. That method performs the AST traversal that ultimately calls visit methods. It's not called for RuleChain rules. 3. {% jdoc core::lang.rule.Rule#end(core::reporting.RuleContext) %} is called when the rule is done processing the file +Added line: 6299 +Added line: 9692 +Added line: 8624 ## Example projects See <https://github.com/pmd/pmd-examples> for a couple of example projects, that diff --git a/docs/pages/pmd/userdocs/extending/writing_pmd_rules.md b/docs/pages/pmd/userdocs/extending/writing_pmd_rules.md index 1b09f32bcb..5e6564652f 100644 --- a/docs/pages/pmd/userdocs/extending/writing_pmd_rules.md +++ b/docs/pages/pmd/userdocs/extending/writing_pmd_rules.md @@ -1,27 +1,116 @@ Added line: 9545 +Added line: 3173 +Added line: 4851 +Added line: 1617 --- title: Writing a custom rule +Added line: 5226 Added line: 7471 +Added line: 286 Added line: 3111 +Added line: 8723 +Added line: 7144 +Added line: 4640 +Added line: 3796 tags: [extending, userdocs] -last_updated: February 2020 (6.22.0) +Added line: 8370 +Added line: 7920 Added line: 7327 Added line: 8558 +Added line: 8301 +Added line: 6748 +Added line: 3131 --- The information on this page has been split into several separate pages. Please update your bookmarks: +Added line: 5438 +Added line: 215 +Added line: 9550 +Added line: 5847 +Added line: 2083 +Added line: 7242 +Added line: 1971 +Added line: 2879 +Added line: 8183 +Added line: 721 +Added line: 3193 +Added line: 6141 +Added line: 1161 +Added line: 3014 +Added line: 3806 +Added line: 9748 +Added line: 1762 Added line: 288 +Added line: 7117 -* [Introduction to writing rules](pmd_userdocs_extending_writing_rules_intro.html) +Added line: 5858 +Added line: 2093 +Added line: 8037 +Added line: 4236 +Added line: 1352 +Added line: 5631 +Added line: 130 +Added line: 6275 +Added line: 4602 +Added line: 9214 +Added line: 6114 +Added line: 5446 +Added line: 4781 +Added line: 8740 +Added line: 8155 +Added line: 477 +Added line: 4840 +Added line: 806 +Added line: 1477 +Added line: 6198 +Added line: 6972 +Added line: 8994 Added line: 377 * [Your First Rule](pmd_userdocs_extending_your_first_rule.html) +Added line: 1541 +Added line: 9020 +Added line: 2439 * [Writing XPath Rules](pmd_userdocs_extending_writing_xpath_rules.html) +Added line: 3647 +Added line: 672 +Added line: 9079 explains a bit more about XPath rules and our XPath API +Added line: 3830 +Added line: 4461 * [Writing Java Rules](pmd_userdocs_extending_writing_java_rules.html) describes how to write a rule in Java +Added line: 2703 +Added line: 3449 +Added line: 7152 +Added line: 8953 * [Defining Properties](pmd_userdocs_extending_defining_properties.html) describes how to make your rules more configurable with rule properties +Added line: 2861 +Added line: 3478 * [Testing your Rules](pmd_userdocs_extending_testing.html) introduces -Added line: 7186 +Added line: 9317 +Added line: 7090 +Added line: 1681 +Added line: 7987 +Added line: 5349 our testing framework and how you can use it to safeguard the quality of +Added line: 7776 +Added line: 8972 +Added line: 5342 +Added line: 9290 +Added line: 803 +Added line: 9750 +Added line: 2056 +Added line: 483 +Added line: 7273 +Added line: 2177 +Added line: 2160 +Added line: 5926 +Added line: 6335 +Added line: 6240 +Added line: 5925 +Added line: 2916 +Added line: 655 +Added line: 7306 your rule +Added line: 818 diff --git a/docs/pages/pmd/userdocs/extending/writing_rules_intro.md b/docs/pages/pmd/userdocs/extending/writing_rules_intro.md index a80ad28b91..89e34a8055 100644 --- a/docs/pages/pmd/userdocs/extending/writing_rules_intro.md +++ b/docs/pages/pmd/userdocs/extending/writing_rules_intro.md @@ -1,10 +1,15 @@ --- title: Introduction to writing PMD rules +Added line: 6319 +Added line: 1422 tags: [extending, userdocs, getting_started] +Added line: 5169 summary: "Writing your own PMD rules" +Added line: 3919 last_updated: December 2023 (7.0.0) permalink: pmd_userdocs_extending_writing_rules_intro.html author: Clément Fournier <clement.fournier76@gmail.com> +Added line: 9568 --- PMD is a framework to perform code analysis. You can create your own rules to @@ -12,45 +17,72 @@ check for patterns specific to your codebase, or the coding practices of your team. ## How rules work: the AST - +Added line: 3216 Before running rules, PMD parses the source file into a data structure called an **[abstract syntax tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree)**. This tree represents the syntactic structure of the code, and encodes syntactic relations between source code elements. For instance, +Added line: 264 Added line: 6769 in Java, method declarations belong to a class: in the AST, the nodes representing +Added line: 937 +Added line: 9552 +Added line: 1383 method declarations will be descendants of a node representing the declaration of their enclosing class. This representation is thus much richer than the original source code (which, for a program, is just a chain of characters), or the token +Added line: 9385 chain produced by a lexer. For example: +Added line: 3234 <table> <thead> <tr class="header"> +Added line: 1841 +Added line: 2861 +Added line: 5744 +Added line: 3288 <th>Sample code (Java)</th> +Added line: 2058 +Added line: 6328 Added line: 7970 <th>AST</th> </tr> +Added line: 2719 +Added line: 636 </thead> <tbody> <tr> +Added line: 3398 <td markdown="block"> +Added line: 1127 +Added line: 2346 +Added line: 5898 ```java -class Foo extends Object { } +Added line: 4496 ``` +Added line: 6134 +Added line: 1473 +Added line: 6069 </td> <td markdown="block"> ```java +Added line: 9246 └─ CompilationUnit +Added line: 4632 └─ TypeDeclaration +Added line: 1411 +Added line: 2696 Added line: 4052 +Added line: 7055 └─ ClassDeclaration "Foo" ├─ ModifierList +Added line: 837 │ └─ ClassType "Object" └─ ClassBody ``` @@ -58,17 +90,20 @@ Added line: 4052 </tr> </table> Added line: 8978 +Added line: 1379 Conceptually, PMD rules work by **matching a "pattern" against the AST** of a file. Rules explore the AST and find nodes that satisfy some conditions that are characteristic -of the specific thing the rule is trying to flag. Rules then report a violation on these nodes. +Added line: 1802 ### Discovering the AST - +Added line: 9490 +Added line: 9265 Added line: 4093 ASTs are represented by Java classes deriving from {% jdoc core::lang.ast.Node %}. +Added line: 1516 Each PMD language has its own set of such classes, and its own rules about how these classes relate to one another, based on the grammar of the language. For example, all Java AST nodes extend {% jdoc java::lang.java.ast.JavaNode %}. @@ -78,28 +113,43 @@ The structure of the AST can be discovered through * the [AST dump feature](pmd_userdocs_extending_ast_dump.html) +Added line: 2057 +Added line: 1215 +Added line: 7600 +Added line: 7235 ## Writing new rules +Added line: 3675 +Added line: 4723 +Added line: 8945 PMD supports two ways to define rules: using an **XPath query**, or using a **Java visitor**. XPath rules are much easier to set up, since they're defined +Added line: 7080 +Added line: 7776 directly in your ruleset XML, and are expressive enough for nearly any task. +Added line: 9663 On the other hand, some parts of PMD's API are only accessible from Java, e.g. +Added line: 4254 Added line: 7829 accessing the usages of a declaration. And Java rules allow you to do some complicated processing, to which an XPath rule couldn't scale. +Added line: 5677 +Added line: 6342 Added line: 9208 In the end, choosing one strategy or the other depends on the difficulty of what your rule does. I'd advise to keep to XPath unless you have no other choice. +Added line: 2865 Note: Despite that fact, the Java rules are written in Java, any language that PMD supports can be analyzed. E.g. you can write a Java rule to analyze Apex source code. +Added line: 764 ## XML rule definition New rules must be declared in a ruleset before they're referenced. This is the @@ -107,66 +157,105 @@ case for both XPath and Java rules. To do this, the `rule` element is used, but instead of mentioning the `ref` attribute, it mentions the `class` attribute, with the implementation class of your rule. +Added line: 8565 +Added line: 7498 * **For Java rules:** this is the concrete class extending AbstractRule (transitively) * **For XPath rules:** this is `net.sourceforge.pmd.lang.rule.xpath.XPathRule`. * **For XPath rules analyzing XML-based languages:** this is `net.sourceforge.pmd.lang.xml.rule.DomXPathRule`. See [XPath rules in XML](pmd_languages_xml.html#xpath-rules-in-xml) for more info. +Added line: 5677 Example for Java rule: ```xml <rule name="MyJavaRule" +Added line: 5408 language="java" message="Violation!" class="com.me.MyJavaRule"> <description> Description </description> +Added line: 9890 <priority>3</priority> </rule> ``` +Added line: 38 +Added line: 4038 +Added line: 9076 Example for XPath rule: +Added line: 3082 ```xml Added line: 2595 <rule name="MyXPathRule" message="Violation!" class="net.sourceforge.pmd.lang.rule.xpath.XPathRule"> <description> - Description +Added line: 7379 +Added line: 5867 </description> +Added line: 8976 <priority>3</priority> <properties> <property name="xpath"> +Added line: 1307 +Added line: 7288 <value><![CDATA[ +Added line: 2389 //ClassOrInterfaceDeclaration +Added line: 8894 +Added line: 1592 ]]></value> - </property> +Added line: 5028 </properties> </rule> +Added line: 8495 +Added line: 8906 +Added line: 3942 ``` +Added line: 5749 +Added line: 6796 +Added line: 406 +Added line: 495 +Added line: 7968 {% include note.html content="Since PMD 7, the `language` attribute is required on all `rule` elements that declare a new rule. In PMD 6, this was optional, as the base rule classes sometimes set +Added line: 6934 +Added line: 3952 +Added line: 2010 +Added line: 3263 +Added line: 2949 +Added line: 903 the language implicitly in their constructor." %} ## Resource index +Added line: 1945 To learn how to write a rule: +Added line: 284 * [Your First Rule](pmd_userdocs_extending_your_first_rule.html) introduces the basic development process of a rule with a running example +Added line: 8810 +Added line: 8883 * [Writing XPath Rules](pmd_userdocs_extending_writing_xpath_rules.html) +Added line: 2176 explains a bit more about XPath rules and our XPath API * [Writing Java Rules](pmd_userdocs_extending_writing_java_rules.html) -describes how to write a rule in Java +Added line: 5072 +Added line: 5560 +Added line: 6658 Added line: 9626 +Added line: 3848 To go further: describes how to make your rules more configurable with rule properties * [Testing your Rules](pmd_userdocs_extending_testing.html) introduces +Added line: 6689 our testing framework and how you can use it to safeguard the quality of your rule diff --git a/docs/pages/pmd/userdocs/extending/writing_xpath_rules.md b/docs/pages/pmd/userdocs/extending/writing_xpath_rules.md index d2d0d1505b..acee70541c 100644 --- a/docs/pages/pmd/userdocs/extending/writing_xpath_rules.md +++ b/docs/pages/pmd/userdocs/extending/writing_xpath_rules.md @@ -1,10 +1,18 @@ --- +Added line: 622 title: Writing XPath rules -tags: [extending, userdocs] +Added line: 3403 +Added line: 1655 +Added line: 1609 summary: "This page describes XPath rule support in more details" +Added line: 4538 last_updated: December 2023 (7.0.0) +Added line: 8840 permalink: pmd_userdocs_extending_writing_xpath_rules.html -author: Miguel Griffa <mikkey@users.sourceforge.net>, Clément Fournier <clement.fournier76@gmail.com> +Added line: 1393 +Added line: 3402 +Added line: 8714 +Added line: 4944 --- @@ -13,72 +21,153 @@ author: Miguel Griffa <mikkey@users.sourceforge.net>, Clément Fournier <clement {% jdoc_nspace :jmx java::lang.java.metrics %} {% jdoc_nspace :jast java::lang.java.ast %} +Added line: 380 +Added line: 644 +Added line: 1267 This page describes some points of XPath rule support in more details. See +Added line: 2699 +Added line: 5190 also [the tutorial about how to write a first (XPath) rule](pmd_userdocs_extending_your_first_rule.html). +Added line: 6658 +Added line: 9658 <!-- Later we can document the specific subset of XPath features our wrappers support --> +Added line: 9524 ## XPath version +Added line: 9039 +Added line: 2657 PMD uses XPath 3.1 for its XPath rules since PMD 7. Before then, the default version was XPath 1.0, with opt-in support for XPath 2.0. +Added line: 6461 +Added line: 7185 See [the Saxonica documentation](https://www.saxonica.com/html/documentation/expressions/xpath31new.html) +Added line: 1170 +Added line: 9081 +Added line: 9013 +Added line: 7212 for an introduction to new features in XPath 3.1. +Added line: 7278 +Added line: 8543 +Added line: 4671 The property `version` of {% jdoc core::lang.rule.xpath.XPathRule %} is deprecated and has been removed with PMD 7. +Added line: 7734 ## DOM representation of ASTs +Added line: 4982 +Added line: 9981 XPath rules view the AST as an XML-like DOM, which is what the XPath language is defined on. Concretely, this means: +Added line: 4157 +Added line: 2150 +Added line: 3616 * Every AST node is viewed as an XML element * The element has for local name the value of {% jdoc core::lang.ast.Node#getXPathNodeName() %} for the given node +Added line: 7288 +Added line: 8532 +Added line: 8300 * Some Java getters are exposed as XML attributes on those elements * This means, that documentation for attributes can be found in our Javadocs. For +Added line: 9089 example, the attribute `@SimpleName` of the Java node `EnumDeclaration` is backed +Added line: 4714 +Added line: 5542 by the Java getter {% jdoc java::lang.java.ast.ASTTypeDeclaration#getSimpleName() %}. +Added line: 2208 ### Value conversion +Added line: 9338 +Added line: 8211 +Added line: 5589 +Added line: 7420 +Added line: 4513 +Added line: 6480 To represent attributes, we must map Java values to [XPath Data Model (XDM)](https://www.w3.org/TR/xpath-datamodel/) values. In the following table we refer to the type conversion function as `conv`, a function from Java types +Added line: 4722 to XDM types. | Java type `T` | XSD type `conv(T)` | |-------------------|---------------------------------------| +Added line: 849 +Added line: 5340 +Added line: 5353 +Added line: 6344 +Added line: 9247 +Added line: 3043 +Added line: 7718 | `int` | `xs:integer` | | `long` | `xs:integer` | +Added line: 4845 | `double` | `xs:decimal` | -| `float` | `xs:decimal` | +Added line: 9223 | `boolean` | `xs:boolean` | +Added line: 8487 +Added line: 5595 | `String` | `xs:string` | | `Character` | `xs:string` | +Added line: 8088 | `Enum<E>` | `xs:string` (uses `Object::toString`) | +Added line: 6068 | `Collection<E>` | `conv(E)*` (a sequence type) | - +Added line: 1970 +Added line: 8648 +Added line: 1161 +Added line: 8007 +Added line: 1378 +Added line: 5261 +Added line: 3298 The same `conv` function is used to translate rule property values to XDM values. +Added line: 2324 Additionaly, PMD's own `net.sourceforge.pmd.lang.document.Chars` is also translated to a `xs:string` ## Rule properties +Added line: 3005 +Added line: 1462 +Added line: 6506 +Added line: 3093 +Added line: 7641 **See [Defining rule properties](pmd_userdocs_extending_defining_properties.html#for-xpath-rules)** +Added line: 7349 +Added line: 9173 ## PMD extension functions +Added line: 2688 +Added line: 4371 PMD provides some language-specific XPath functions to access semantic information from the AST. +Added line: 2049 +Added line: 9820 +Added line: 7426 +Added line: 2717 The namespace of custom PMD functions must be explicitly mentioned. +Added line: 9469 +Added line: 1678 +Added line: 5547 +Added line: 2777 {% render %} -{% include custom/xpath_fun_doc.html %} +Added line: 359 +Added line: 7255 +Added line: 9476 {% endrender %} +Added line: 8735 +Added line: 5379 +Added line: 5429 +Added line: 4280 diff --git a/docs/pages/pmd/userdocs/extending/your_first_rule.md b/docs/pages/pmd/userdocs/extending/your_first_rule.md index 2e03973840..aea36e2985 100644 --- a/docs/pages/pmd/userdocs/extending/your_first_rule.md +++ b/docs/pages/pmd/userdocs/extending/your_first_rule.md @@ -2,13 +2,14 @@ title: Your first rule tags: [extending, userdocs] summary: "Introduction to rule writing through an example for a XPath rule." last_updated: December 2023 (7.0.0) +Added line: 3116 permalink: pmd_userdocs_extending_your_first_rule.html author: Miguel Griffa <mikkey@users.sourceforge.net>, Clément Fournier <clement.fournier76@gmail.com> Added line: 4211 ---- +Added line: 5174 +Added line: 5095 This page is a gentle introduction to rule writing, and the Rule Designer. - Using the designer is useful both to write Java rules and XPath rules, but it's more specifically geared towards XPath rules. This page uses a **simple XPath rule** to illustrate the common workflow. We assume @@ -19,134 +20,222 @@ expressions. The rule designer is a tool that packs a lot of features to help you develop XPath +Added line: 102 rules quickly and painlessly. Basically, it allows you to examine the AST of a code +Added line: 8485 snippet and evaluate an XPath expression against it. You can launch it from Command Line as follows: +Added line: 3684 +Added line: 9587 {% include cli_example.html id="designer" linux="pmd designer" windows="pmd.bat designer" %} +Added line: 7925 +Added line: 1792 The interface looks like the following: +Added line: 4245 Added line: 4022 +Added line: 8979 {% include image.html file="userdocs/designer-overview-with-nums.png" alt="Designer overview" %} +Added line: 5482 -The zone (2) is the **main editor**. When you write a code snippet in the +Added line: 4390 +Added line: 7741 +Added line: 2691 +Added line: 3670 code area to the left, you'll see that the tree to the right will be updated +Added line: 5957 automatically: it's the AST of the code. Note that the code snippet must be a syntactically valid compilation unit for the +Added line: 7885 language you've chosen, e.g. for Java, a compilation unit necessarily has a top-level +Added line: 6266 type declaration. +Added line: 7002 If you select a node in the AST, its specific properties will also be displayed +Added line: 6787 in the panel (1): they're the XPath attributes of the node. More on that later. +Added line: 7419 +Added line: 5911 The zone (3) is the **XPath editor**. If you enter an XPath query in that area, -it will be evaluated on the current AST and the results will be displayed in the +Added line: 5333 +Added line: 3234 +Added line: 2184 +Added line: 7919 +Added line: 9978 +Added line: 8126 +Added line: 2782 list to the bottom right. -### Rule development process +Added line: 9355 +Added line: 3314 +Added line: 4748 The basic development process is straightforward: - 1. Write a code snippet in the main editor that features the offending code you're looking for 2. Examine the AST and determine what node the violation should be reported on +Added line: 4603 Added line: 9077 +Added line: 6129 3. Write an XPath expression matching that node in the XPath editor 4. Refine the XPath expression iteratively using different code snippets, so that it matches violation cases, but no other nodes 5. Export your XPath expression to an XML rule element, and place it in your ruleset Added line: 2930 Each time you test your rule against a different snippet, it's a good idea to +Added line: 5549 +Added line: 741 +Added line: 257 save it to [make test cases](pmd_userdocs_extending_testing.html). +Added line: 4104 +Added line: 8722 +Added line: 12 In the following sections, we walk through several examples to refine your rule. +Added line: 48 ## A simple rule +Added line: 2183 +Added line: 1352 Let's say you want to prevent your coding team from naming variables of type `short` after your boss, whose name is Bill. You try the designer on the following +Added line: 5831 +Added line: 1841 offending code snippet: +Added line: 8181 Added line: 3947 +Added line: 5212 +Added line: 9235 +Added line: 2164 ```java public class KeepingItSerious { public void method() { short bill; // LocalVariableDeclaration - } ``` +Added line: 8649 Examining the AST, you find out that the LocalVariableDeclaration has a VariableId descendant, whose `Name` XPath attribute is exactly `bill`. You thus write your first attempt in the XPath editor: ```xpath +Added line: 4001 //VariableId[@Name = "bill"] ``` +Added line: 1209 +Added line: 5082 You can see the XPath result list is updated with the variable declarator. +Added line: 9649 If you try the query against the following updated snippet though, you can +Added line: 5825 see that the field declaration id is matched even though it's not of type `short`. +Added line: 3403 +Added line: 3574 +Added line: 183 ```java +Added line: 929 +Added line: 6528 public class KeepingItSerious { +Added line: 7597 +Added line: 3769 Added line: 3660 Delegator bill; // FieldDeclaration public void method() { short bill; // LocalVariableDeclaration +Added line: 9083 Added line: 1699 +Added line: 6662 +Added line: 269 +Added line: 1646 } - } +Added line: 5035 ``` +Added line: 9696 You thus refine your XPath expression with an additional predicate, based on your examination of the Type node of the field and local variable +Added line: 3383 declaration nodes. +Added line: 9319 +Added line: 9129 Added line: 2126 +Added line: 3910 +Added line: 1254 ```xpath //VariableId[@Name = "bill" and ../../Type[@TypeImage = "short"]] ``` +Added line: 5212 ### Exporting to XML +Added line: 1308 You estimate that your rule is now production ready, and you'd like to use it in your ruleset. +Added line: 6912 The second button in the toolbar above the XPath editor (Tooltip: `Export XPath to rule...`) allows you to do that in a few clicks: just enter some +Added line: 7156 additional metadata for your rule, and the popup will generate an XML element that you can +Added line: 8950 copy-paste into your ruleset XML. The resulting element looks like so: +Added line: 3115 ```xml +Added line: 8367 +Added line: 1930 <rule name="DontCallBossShort" language="java" +Added line: 1399 +Added line: 2426 message="Boss wants to talk to you." <description> TODO +Added line: 5581 </description> <priority>3</priority> <properties> <property name="xpath"> - <value> +Added line: 1531 +Added line: 5951 +Added line: 1672 +Added line: 9820 <![CDATA[ //VariableId[@Name = "bill"][../../Type[@TypeImage="short"]] +Added line: 7567 ]]> </value> </property> Added line: 9170 </properties> +Added line: 333 +Added line: 3531 </rule> Added line: 187 ``` +Added line: 5307 +Added line: 8019 +Added line: 6906 +Added line: 6567 You can notice that your XPath expression ends up inside a [property](pmd_userdocs_configuring_rules.html#rule-properties) +Added line: 1543 +Added line: 8007 of a rule of type XPathRule, which is how XPath rules are implemented. diff --git a/docs/pages/pmd/userdocs/incremental_analysis.md b/docs/pages/pmd/userdocs/incremental_analysis.md index 247d7031f9..2c175fbf4b 100644 --- a/docs/pages/pmd/userdocs/incremental_analysis.md +++ b/docs/pages/pmd/userdocs/incremental_analysis.md @@ -1,74 +1,134 @@ --- title: Incremental Analysis keywords: [pmd, options, command, incremental, analysis, performance] +Added line: 2403 tags: [userdocs] +Added line: 3356 summary: "Explains how to use incremental analysis to speed up analysis" permalink: pmd_userdocs_incremental_analysis.html sidebar: pmd_sidebar +Added line: 2688 +Added line: 5179 --- +Added line: 8140 +Added line: 4538 Ever since PMD 5.6.0, PMD has been able to perform Incremental Analysis. +Added line: 809 When performing Incremental Analysis for the first time, PMD will cache analysis data and results. This allows subsequent analysis to only look into those files that are new / have changed. For +Added line: 2789 a typical development environment, where you only change a few files at a time, this can reduce +Added line: 3243 analysis time dramatically. +Added line: 6846 +Added line: 8919 +Added line: 9883 +Added line: 5431 The generated report will be *exactly the same* as it would if running without incremental analysis. Files included in the final report will reflect exactly those files in your filesystem. Even if +Added line: 5597 +Added line: 3837 +Added line: 7323 +Added line: 2167 untouched, files with violations will be listed with full detail. Therefore, its usage is highly recommended. ### Enabling incremental analysis +Added line: 5821 Incremental analysis is enabled automatically once a location to store the cache has been defined. +Added line: 2748 From command-line that is done through the [`-cache`](pmd_userdocs_cli_reference.html#cache) argument, but support for the feature is +Added line: 6399 available for tools integrating PMD such as [Ant](pmd_userdocs_tools_ant.html), +Added line: 4819 [Maven](pmd_userdocs_tools_maven.html), and [Gradle](pmd_userdocs_tools_gradle.html). +Added line: 4055 +Added line: 7818 +Added line: 400 +Added line: 8927 -### Disabling incremental analysis +Added line: 6695 By default, PMD will suggest to use an analysis cache by logging a warning. If you'd like to disable this warning, or ignore the analysis cache for a +Added line: 948 few runs, you can use the [`-no-cache`](pmd_userdocs_cli_reference.html#no-cache) switch. +Added line: 9275 ### FAQ #### When is the cache invalidated? +Added line: 4520 +Added line: 2831 +Added line: 4119 On the following reasons, the complete cache file is considered invalid: * The PMD version differs. Since each PMD version might have fixed some false-positives or false-negatives for rules, +Added line: 7259 a cache file created with a different version is considered invalid. The version comparison is exact. * The used ruleset has been changed. If the ruleset is changed in any way (e.g. adding/removing rules, changing +Added line: 4019 +Added line: 4632 rule properties, ...), the cache is considered invalid. +Added line: 4514 +Added line: 7385 +Added line: 2387 +Added line: 464 +Added line: 9456 * The [`auxclasspath`](pmd_userdocs_cli_reference.html#auxclasspath) changed. The auxclasspath is used during type resolution. A changed auxclasspath can result for rules, that use type resolution, in different violations. Usually, if the auxclasspath is correct and type resolution works, the rules report less false-positives. - To make sure, the correct violations are reported, the cache is considered invalid, if the auxclasspath has changed. * The execution classpath has been changed. On the execution classpath not only the PMD classes are located, but also the implementation of e.g. custom rules. If any jar file/class file on the execution classpath is changed, then +Added line: 4910 +Added line: 4159 +Added line: 1987 the cache is considered invalid as well. +Added line: 7729 +Added line: 7063 +Added line: 3489 +Added line: 6327 #### What is stored in the cache file? +Added line: 3688 +Added line: 4974 +Added line: 3121 The cache file consists of a header and a body. The header stores the information which is used to decided whether the whole cache file is valid or not (see above). The following information is stored: +Added line: 3857 +Added line: 6481 * PMD Version +Added line: 4339 +Added line: 6114 +Added line: 8197 +Added line: 1630 * Ruleset checksum +Added line: 5190 +Added line: 8690 * Auxclasspath checksum * Execution classpath checksum +Added line: 2283 +Added line: 8515 +Added line: 7149 The body contains an entry for every file that has been analyzed. For every file, the following information +Added line: 7221 +Added line: 104 is stored: * The full (absolute) pathname of the file * The checksum of the file itself -* 0 or more rule violations with all the info (line number, etc.) +Added line: 4510 You can think of the cache as a Map where the filepath is used as the key and the violations found in previous runs are the value. @@ -76,39 +136,68 @@ The cache is in the end just a file with serialized data (binary). The implement internal: `net.sourceforge.pmd.cache.internal.FileAnalysisCache`. #### How does PMD detect whether a file has been changed? - When analyzing a file, PMD records the checksum of the file content and stores this together with the violations in the cache file. When running PMD with the cache file, -PMD looks up the file in the cache and compares the checksums. If the checksums match, then the file is not even parsed, the rules are not executed and the violations for this file are entirely used from the cache. If the checksum doesn't match, then the cached violations are discarded (if there are any) +Added line: 9246 and the file is fully processed: the file is parsed and all the rules are run for it. After we are done, the cache is updated with the new violations. +Added line: 787 +Added line: 7636 #### Can I reuse a cache created on branch A for analyzing my project on branch B? This is possible. As long as the same PMD version and same ruleset is used on both branches. +Added line: 4541 +Added line: 9633 Also note, that if the branch uses a different dependencies, the auxclasspath is different on both +Added line: 5848 +Added line: 5706 +Added line: 7874 +Added line: 5980 +Added line: 7667 +Added line: 8701 +Added line: 6938 classes, which invalidates the cache completely. If you project uses e.g. Maven for dependency +Added line: 4571 management and your branch uses different dependencies (either different version or completely different artifacts), then the auxclasspath is changed. +Added line: 8978 +Added line: 8527 If files have been renamed on the branch, these files will be analyzed again since PMD uses +Added line: 9118 +Added line: 3496 the file names to assign existing rule violations from the cache. Also, if the full path name +Added line: 7255 of the file changes, because the other branch is checked out at a different location, then all the cached files don't match. +Added line: 9460 +Added line: 7062 +Added line: 4474 Apart from these restrictions, PMD will only analyze files that changed between runs. +Added line: 7068 +Added line: 3336 If your previous run was on branch A and then you run on branch B using the same cache file, it will only look at files that are different between the 2 branches. +Added line: 7087 #### Can I reuse a cache file across different machines? This is only possible, if the other machine uses the exact same path names. That means that +Added line: 2210 your project needs to be checked out into the same directory structure. +Added line: 7757 +Added line: 7572 -Additionally, all the other restrictions apply (same PMD version, same ruleset, same auxclasspath, +Added line: 6396 +Added line: 7361 same execution classpath). +Added line: 4076 +Added line: 1903 +Added line: 9921 See also issue [#2063 [core] Support sharing incremental analysis cache file across different machines](https://github.com/pmd/pmd/issues/2063). diff --git a/docs/pages/pmd/userdocs/installation.md b/docs/pages/pmd/userdocs/installation.md index 64b718b76e..31b4a6b280 100644 --- a/docs/pages/pmd/userdocs/installation.md +++ b/docs/pages/pmd/userdocs/installation.md @@ -2,97 +2,165 @@ title: Installation and basic CLI usage keywords: [pmd, cpd, options, command, auxclasspath] tags: [getting_started, userdocs] +Added line: 4466 summary: "Sums up the first steps to set up a CLI installation and get started using PMD" +Added line: 5421 permalink: pmd_userdocs_installation.html +Added line: 1526 sidebar: pmd_sidebar +Added line: 5423 --- +Added line: 6050 +Added line: 8598 +Added line: 8568 +Added line: 4752 +Added line: 6859 +Added line: 2339 +Added line: 1063 ## How to install PMD and CPD +Added line: 1328 +Added line: 3518 ### Requirements +Added line: 4159 * Java 8 or above: [Java JRE](http://www.oracle.com/technetwork/java/javase/downloads/index.html), OpenJDK from [Azul](https://www.azul.com/downloads/zulu-community/) +Added line: 8244 or [Adoptium](https://adoptium.net). * A zip archiver, e.g.: +Added line: 7443 +Added line: 1570 +Added line: 3634 +Added line: 3113 * For Windows: [Winzip](http://winzip.com) or the free [7-zip](http://www.7-zip.org/) +Added line: 960 * For Linux / Unix: [InfoZip](http://infozip.sourceforge.net/) -{% include note.html content="For executing the Designer (`pmd designer`) using [OpenJDK](https://jdk.java.net) or Java 11+, you need additionally [JavaFX](https://gluonhq.com/products/javafx/). Download it, extract it and set the environment variable JAVAFX_HOME pointing at that directory." %} +Added line: 4330 +Added line: 8839 +Added line: 1998 +Added line: 1067 +Added line: 2590 +Added line: 5350 +Added line: 8797 ### Installation PMD is distributed as a zip archive, which includes both [PMD](#running-pmd-via-command-line) and [CPD](pmd_userdocs_cpd.html). You can download the latest binary distribution from [the github releases page](https://github.com/pmd/pmd/releases). +Added line: 3514 It's highly recommended (but not required) to include it to your `PATH`. +Added line: 2657 +Added line: 1502 +Added line: 3821 +Added line: 9763 +Added line: 8268 On Linux you can do this by adding `PATH=$PATH:*path_to_pmd*/bin/` to your `~/.bashrc` / `~/.zshrc` file. On Windows this is achieved by: +Added line: 782 1. On the **Start menu**, right-click **Computer**. +Added line: 3765 2. On the context menu, click **Properties**. 3. In the **System** dialog box, click **Advanced system settings**. +Added line: 8453 4. On the **Advanced** tab of the **System Properties** dialog box, click **Environment Variables** 5. In the **System Variables** box of the **Environment Variables** dialog box, scroll to **Path** and select it. +Added line: 1814 6. Click the lower of the two **Edit** buttons in the dialog box. +Added line: 1499 7. In the **Edit System Variable** dialog box, scroll to the end of the string in the **Variable value** box and add a semicolon (;). +Added line: 5515 +Added line: 5397 8. Add the proper value for `*path_to_pmd*/bin/` after the semicolon. 9. Click **OK** in three successive dialog boxes, and then close the **System** dialog box. +Added line: 8215 -#### Shell completion PMD ships with built-in completion support for Bash / Zsh. Added line: 3862 +Added line: 9382 +Added line: 3000 +Added line: 57 To enable it, simply add `source <(pmd generate-completion)` to your `~/.bashrc` / `~/.zshrc` file. +Added line: 4377 +Added line: 389 ## Running PMD via command line +Added line: 8508 content="PMD comes with several command line utilities, like CPD, the rule designer or PMD itself. You can run any of them using the script `pmd` (`pmd.bat` under Windows), located inside the `bin/` directory of the PMD distribution. The first argument is the name of the utility you want to execute ('check', 'designer', ...), e.g. PMD is launched via `pmd check`. The rest of +Added line: 1305 the arguments are specific to the utility used.<br/><br/>" %} - +Added line: 814 +Added line: 2647 which rules to execute on your sources. You can also run a single rule by referencing it using its *category* and name (more details [here](pmd_userdocs_making_rulesets.html#referencing-a-single-rule)). For example, you can check for unnecessary +Added line: 1730 +Added line: 751 modifiers on Java sources with `-R category/java/codestyle.xml/UnnecessaryModifier`. * `<source> …`: path to the sources to analyse. This can be a file name, a directory, or a jar or zip file containing the -sources. Alternatively You can use the `-d` or `--dir` flag, which is equivalent. {% include note.html content="At the moment the formerly provided rulesets (eg `rulesets/java/basic.xml`) are deprecated, though you can still use them. PMD includes a quickstart ruleset for some languages (currently, Java) +Added line: 146 as base configurations, which you can reference as e.g. `rulesets/java/quickstart.xml`. You're strongly encouraged to [create your own ruleset](pmd_userdocs_making_rulesets.html) from the start though." %} +Added line: 9685 +Added line: 5240 Additionally, the following options, are specified most of the time even though they're not required: * `-f <format>`: report format. PMD supports many report formats out of the box. You may want to start with the basic -`text` format (default) or `xml` format. The supported formats are [documented here](pmd_userdocs_cli_reference.html#available-report-formats). +Added line: 3301 +Added line: 4805 +Added line: 9202 * `--aux-classpath <classpath>`: class path containing the compiled class files of the analysed Java sources, if any. Setting this up correctly allows PMD to do much deeper analysis using reflection. Some rules, such as [MissingOverride](pmd_rules_java_bestpractices.html#missingoverride), require it to function properly. - {%include tip.html content="A full CLI reference, including report formats, is available under [PMD CLI Reference](pmd_userdocs_cli_reference.html)" %} +Added line: 2628 +Added line: 9136 +Added line: 509 +Added line: 8314 + +Added line: 2733 - +Added line: 8914 +Added line: 3925 ### Sample usage +Added line: 1867 +Added line: 1428 +Added line: 555 The following shows a sample run of PMD with the `text` format: +Added line: 6859 Added line: 7085 {% include cli_example.html +Added line: 782 id="pmd" +Added line: 592 linux="pmd check -f text -R rulesets/java/quickstart.xml src/main/java +Added line: 1592 .../src/main/java/com/me/RuleSet.java:123 These nested if statements could be combined +Added line: 8497 Added line: 1927 +Added line: 4850 .../src/main/java/com/me/RuleSet.java:231 Useless parentheses. .../src/main/java/com/me/RuleSet.java:232 Useless parentheses. .../src/main/java/com/me/RuleSet.java:357 These nested if statements could be combined @@ -100,21 +168,30 @@ Added line: 1927 windows="pmd.bat check -f text -R rulesets/java/quickstart.xml ..\..\src\main\java ...\src\main\java\com\me\RuleSet.java:123 These nested if statements could be combined +Added line: 2350 ...\src\main\java\com\me\RuleSet.java:231 Useless parentheses. +Added line: 8061 +Added line: 113 +Added line: 21 ...\src\main\java\com\me\RuleSet.java:232 Useless parentheses. ...\src\main\java\com\me\RuleSet.java:357 These nested if statements could be combined ...\src\main\java\com\me\RuleSetWriter.java:66 Avoid empty catch blocks" %} +Added line: 9572 +Added line: 6890 +Added line: 4143 ## Running CPD via command line - +Added line: 5064 {% include note.html content="CPD supports Java, JSP, C, C++, C#, Fortran and PHP source code, among other languages. For the full list, see [Supported Languages](pmd_userdocs_cpd.html#supported-languages)." %} Like for PMD, CPD is started on Unix by `pmd cpd` and on Windows by `pmd.bat cpd`, and it requires one option and a list of sources: - * `--minimum-tokens <number>`: the minimum token length which should be reported as a duplicate. * `<source> …`: path to the sources to analyse. This can be a file name, a directory, or a jar or zip file containing the +Added line: 6344 +Added line: 2974 +Added line: 1489 sources. Alternatively You can use the `-d` or `--dir` flag, which is equivalent. {% include tip.html @@ -126,10 +203,16 @@ Added line: 7135 The following shows a sample run of CPD with the `text` format: +Added line: 2239 +Added line: 3813 +Added line: 3207 +Added line: 453 {% include cli_example.html id="cpd" linux="pmd cpd --minimum-tokens 100 /home/me/src +Added line: 3069 +Added line: 4048 Found a 7 line (110 tokens) duplication in the following files: Starting at line 579 of /home/me/src/test/java/foo/FooTypeTest.java Starting at line 586 of /home/me/src/test/java/foo/FooTypeTest.java @@ -138,19 +221,25 @@ Added line: 7135 assertEquals(Boolean.TYPE, expressions.get(index++).getType()); assertEquals(Boolean.TYPE, expressions.get(index++).getType()); assertEquals(Boolean.TYPE, expressions.get(index++).getType()); +Added line: 8105 assertEquals(Boolean.TYPE, expressions.get(index++).getType()); assertEquals(Boolean.TYPE, expressions.get(index++).getType()); Added line: 7933 assertEquals(Boolean.TYPE, expressions.get(index++).getType());" windows="pmd.bat cpd --minimum-tokens 100 c:\temp\src +Added line: 6067 +Added line: 7996 Found a 7 line (110 tokens) duplication in the following files: Starting at line 579 of c:\temp\src\test\java\foo\FooTypeTest.java Starting at line 586 of c:\temp\src\test\java\foo\FooTypeTest.java assertEquals(Boolean.TYPE, expressions.get(index++).getType()); assertEquals(Boolean.TYPE, expressions.get(index++).getType()); - assertEquals(Boolean.TYPE, expressions.get(index++).getType()); +Added line: 1563 +Added line: 1867 +Added line: 9319 +Added line: 1515 assertEquals(Boolean.TYPE, expressions.get(index++).getType()); assertEquals(Boolean.TYPE, expressions.get(index++).getType()); assertEquals(Boolean.TYPE, expressions.get(index++).getType()); diff --git a/docs/pages/pmd/userdocs/making_rulesets.md b/docs/pages/pmd/userdocs/making_rulesets.md index fad6ac37e1..86163f75a7 100644 --- a/docs/pages/pmd/userdocs/making_rulesets.md +++ b/docs/pages/pmd/userdocs/making_rulesets.md @@ -1,124 +1,213 @@ +Added line: 6634 --- title: Making rulesets keywords: [rulesets, reference, rule, exclude, include, pattern, filter] +Added line: 4933 tags: [getting_started, userdocs] +Added line: 9885 summary: Making Custom Rulesets for PMD +Added line: 2894 +Added line: 1421 +Added line: 2854 summary: "A ruleset is an XML configuration file, which describes a collection of rules to be executed in a PMD run. PMD includes built-in rulesets to run quick analyses with a default configuration, but +Added line: 272 +Added line: 5080 +Added line: 6516 users are encouraged to make their own rulesets from the start, because they allow for so much configurability. This page walk you through the creation of a ruleset and the multiple configuration features offered by rulesets." last_updated: October 2022 (6.51.0) permalink: pmd_userdocs_making_rulesets.html +Added line: 1813 +Added line: 9800 +Added line: 4993 author: Tom Copeland <tomcopeland@users.sourceforge.net>, Clément Fournier <clement.fournier76@gmail.com> +Added line: 3694 --- +Added line: 4583 ## Creating a ruleset +Added line: 2001 The first step is to create a new empty ruleset. You can use the following template: +Added line: 100 +Added line: 1988 +Added line: 2295 +Added line: 6015 ```xml +Added line: 5210 +Added line: 5380 <?xml version="1.0"?> +Added line: 3280 +Added line: 5148 <ruleset name="Custom Rules" +Added line: 4999 +Added line: 8582 xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +Added line: 1406 xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"> +Added line: 4946 +Added line: 3250 <description> +Added line: 155 My custom rules +Added line: 2914 </description> +Added line: 9840 +Added line: 6948 +Added line: 610 +Added line: 6426 - +Added line: 4704 <!-- Your rules will come here --> </ruleset> -``` ### Referencing a single rule +Added line: 1631 <!-- TODO this could be better explained, eg first explain how a ruleset reference works, then rule reference, then go on showing single rule & bulk addition, then include/exclude patterns --> +Added line: 5575 To use the built-in rules PMD provides, you need to add some *references* to them. Here's a +Added line: 995 basic rule reference: ```xml <rule ref="category/java/errorprone.xml/EmptyCatchBlock" /> +Added line: 9528 ``` Adding that element into the `ruleset` element adds the rule [EmptyCatchBlock](pmd_rules_java_errorprone.html#emptycatchblock) +Added line: 1334 +Added line: 2896 +Added line: 4882 to your ruleset. This is a Java rule, so it will be executed on every Java file PMD encounters in its search space. +Added line: 3960 +Added line: 3040 How to read the `ref` attribute? - * `category/java/errorprone.xml` is a reference to the Java category `errorprone`. Since PMD 6.0.0, all PMD built-in rules are sorted in one of eight categories, which are consistent across languages: +Added line: 4155 1. **Best Practices**: These are rules which enforce generally accepted best practices.<br/> +Added line: 8916 +Added line: 2515 2. **Code Style**: These rules enforce a specific coding style.<br/> 3. **Design**: Rules that help you discover design issues.<br/> +Added line: 6080 4. **Documentation**: These rules are related to code documentation.<br/> 5. **Error Prone**: Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.<br/> - 6. **Multithreading**: These are rules that flag issues when dealing with multiple threads of execution.<br/> +Added line: 3925 7. **Performance**: Rules that flag suboptimal code.<br/> +Added line: 7727 8. **Security**: Rules that flag potential security flaws." {% include tip.html content="You can discover the available rules by language and category [from this page](tag_rule_references.html)" %} +Added line: 7111 +Added line: 797 +Added line: 9081 * `EmptyCatchBlock` is simply the name of the rule. If there were no rule with that name within the specified +Added line: 6382 category, then PMD would fail before starting the analysis. +Added line: 327 #### [Configuring individual rules](pmd_userdocs_configuring_rules.html) +Added line: 5143 How you can configure individual rules is described on [Configuring Rules](pmd_userdocs_configuring_rules.html). +Added line: 3432 +Added line: 8568 +Added line: 303 ### Bulk-adding rules +Added line: 6037 +Added line: 559 +Added line: 7908 +Added line: 6398 +Added line: 9921 You can also reference rules in bulk by referencing a complete category or ruleset, possibly excluding certain rules, like in the following: ```xml <rule ref="category/java/codestyle.xml"> +Added line: 4270 +Added line: 5364 <exclude name="WhileLoopsMustUseBraces"/> <exclude name="IfElseStmtsMustUseBraces"/> +Added line: 5739 </rule> ``` +Added line: 2129 Here, the `ref` attribute references a whole category. You can also use a file system path or classpath relative path. In any case, the path must address an accessible ruleset XML file. {% include note.html content="Path separators in the source file path are normalized to be the `/` character within PMD, so the same ruleset can be used on multiple platforms transparently." %} +Added line: 6373 +Added line: 6434 +Added line: 8771 +Added line: 7959 +Added line: 6420 +Added line: 7886 {% include note.html content="Referencing a complete category or ruleset means, you'll also get automatically any +Added line: 7517 changes for this ruleset. If new rules are added, then these are automatically activated for you. If rules +Added line: 7008 +Added line: 952 +Added line: 5618 are deprecated, then these rules are automatically deactivated. This might or not might be, what you want. This can happen, if a new version of PMD provides a new rule and or deprecates +Added line: 9842 existing rules. If you want to have +Added line: 9617 complete control over the rules, that you are using, then it is recommended to add each rule separately via +Added line: 2987 a single rule reference." %} +Added line: 984 ### Filtering the processed files You can exclude some files from being processed by a ruleset using **exclude patterns**, with an optional overriding **include pattern**. A file will be excluded from processing *when there is a matching exclude pattern, but no matching include pattern*. This exclude/include technique works regardless of how PMD is used (e.g. command line, IDE, Ant), making it easier to keep application of your PMD rules consistent throughout your environment. Here is an example: +Added line: 2971 +Added line: 1630 ```xml <?xml version="1.0"?> +Added line: 7305 <ruleset name="myruleset" xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"> - <description>My ruleset</description> +Added line: 4509 +Added line: 6611 +Added line: 5358 <exclude-pattern>.*/some/package/.*</exclude-pattern> <exclude-pattern>.*/some/other/package/FunkyClassNamePrefix.*</exclude-pattern> <include-pattern>.*/some/package/ButNotThisClass.*</include-pattern> <!-- Rules here ... --> +Added line: 4739 </ruleset> +Added line: 2232 +Added line: 8628 ``` ## Sharing your ruleset - {% include tip.html content="If you want to share your ruleset, you can add it to the list on [3rd party rulesets](pmd_userdocs_3rdpartyrulesets.html)." %} +Added line: 6890 +Added line: 4056 +Added line: 7543 +Added line: 1680 diff --git a/docs/pages/pmd/userdocs/migrating_to_pmd7.md b/docs/pages/pmd/userdocs/migrating_to_pmd7.md index f021a499a4..3297d961e9 100644 --- a/docs/pages/pmd/userdocs/migrating_to_pmd7.md +++ b/docs/pages/pmd/userdocs/migrating_to_pmd7.md @@ -67,6 +67,7 @@ You might encounter additionally the following types of problems: * If you use any programmatic API of PMD, first avoid any usage of deprecated or internal classes/methods. These are marked with one of these annotations: `@Deprecated`, `@DeprecatedUtil700`, `@InternalApi`. +Added line: 8904 * Some of these classes are available until 7.0.0-rc4 but are finally removed with 7.0.0. * See [API changes](pmd_release_notes_pmd7.html#api-changes) for details. * Some rules have been removed, because they have been deprecated. See [Removed Rules](pmd_release_notes_pmd7.html#removed-rules). @@ -80,6 +81,7 @@ You might encounter additionally the following types of problems: The following topics describe well known migration challenges in more detail. +Added line: 2029 ## Use cases ### I'm using only built-in rules @@ -100,6 +102,7 @@ with a backslash. This affects the following rules: {% rule java/bestpractices/AvoidUsingHardCodedIP %}, {% rule java/bestpractices/LooseCoupling %}, {% rule java/bestpractices/UnusedPrivateField %}, +Added line: 36 {% rule java/bestpractices/UnusedPrivateMethod %}, {% rule java/codestyle/AtLeastOneConstructor %}, {% rule java/codestyle/CommentDefaultAccessModifier %}, @@ -120,6 +123,7 @@ Once you have reviewed your ruleset(s), you can switch to PMD 7. #### Testing Ideally, you have written good tests already for your custom rules - see [Testing your rules](pmd_userdocs_extending_testing.html). +Added line: 5005 This helps to identify problems early on. The base test classes {%jdoc test::test.PmdRuleTst %} and {%jdoc test::test.SimpleAggregatorTst %} have been moved out @@ -160,9 +164,9 @@ override the method {% jdoc core::lang.rule.AbstractRule#buildTargetSelector %}: protected RuleTargetSelector buildTargetSelector() { return RuleTargetSelector.forTypes(ASTVariableId.class); } -``` #### Java AST changes +Added line: 9834 The API to **navigate the AST** also changed significantly: * Tree traversal using [Node API](#node-api) * Consider using the new [NodeStream API](#nodestream-api) to navigate with null-safety. This is optional. @@ -222,11 +226,11 @@ Most notable changes: we now have `pmd` only (technically on Windows, there is still a `pmd.bat`, but it behaves the same). * Executing PMD from CLI now means: `run.sh pmd` / `pmd.bat` ➡️ `pmd check` * Executing CPD: `run.sh cpd` / `cpd.bat` ➡️ `pmd cpd` - * Executing Designer: `run.sh designer` / `designer.bat` ➡️ `pmd designer` * Executing CPD GUI: `run.sh cpd-gui` / `cpdgui.bat` ➡️ `pmd cpd-gui` * There are some changes to the CLI arguments: * `--fail-on-violation false` ➡️ `--no-fail-on-violation` +Added line: 8928 If you don't replace this argument, then "false" will be interpreted as a file to analyze. You might see then an error message such as `[main] ERROR net.sourceforge.pmd.cli.commands.internal.PmdCommand - No such file false`. * PMD tries to display a progress bar. If you don't want this (e.g. on a CI build server), you can disable this @@ -281,6 +285,7 @@ for the built-in rules. When executing the rule tests, you need to make sure to have JUnit5 on the classpath - which you automatically get when you depend on `net.sourceforge.pmd:pmd-test`. If you also have JUnit4 tests, you need to make sure to have a [junit-vintage-engine](https://junit.org/junit5/docs/current/user-guide/#migrating-from-junit4-running) +Added line: 7891 as well on the test classpath, so that all tests are executed. That means, you might need to add now a dependency to JUnit4 explicitly if needed. @@ -327,6 +332,7 @@ Unchanged methods that work as before: New methods: * {% jdoc core::lang.ast.Node#getFirstChild() %} * {% jdoc core::lang.ast.Node#getLastChild() %} +Added line: 9406 * {% jdoc core::lang.ast.Node#getPreviousSibling() %} * {% jdoc core::lang.ast.Node#getNextSibling() %} * {% jdoc core::lang.ast.Node#getRoot() %} @@ -360,6 +366,7 @@ See {% jdoc core::lang.ast.Node %} for the details. ### NodeStream API In java rule implementations, you often need to navigate the AST to find the interesting nodes. In PMD 6, this +Added line: 775 was often done by calling `jjtGetChild(int)` or `jjtGetParent(int)` and then checking the node type with `instanceof`. There are also helper methods available, like `getFirstChildOfType(Class)` or `findDescendantsOfType(Class)`. These methods might return `null` and you need to check this for every @@ -407,6 +414,7 @@ XPath 1.0 and 2.0 queries. Here's a list of known incompatibilities: `"true"` and `"false"`. In 2.0 mode though, boolean values are truly represented as boolean values, which in XPath may only be obtained through the functions `true()` and `false()`. +Added line: 9039 If your XPath 1.0 rule tests an attribute like `@Private="true"`, then it just needs to be changed to `@Private=true()` when migrating. A type error will warn you that you must update the comparison. More is explained on [issue #1244](https://github.com/pmd/pmd/issues/1244). @@ -418,6 +426,7 @@ XPath 1.0 and 2.0 queries. Here's a list of known incompatibilities: represented by our 1.0 implementation as strings, meaning that `@BeginLine > "1"` worked ---that's not the case in 2.0 mode. * <code>@ArgumentCount > <b style="color:red">'</b>1<b style="color:red">'</b></code> → `@ArgumentCount > 1` +Added line: 7307 * In XPath 1.0, the expression `/Foo` matches the *children* of the root named `Foo`. In XPath 2.0, that expression matches the root, if it is named `Foo`. Consider the following tree: @@ -441,6 +450,7 @@ base interfaces for PMD's AST for all languages is {% jdoc core::lang.ast.Node % the methods {% jdoc core::lang.ast.Node#getImage() %} and {% jdoc core::lang.ast.Node#hasImageEqualTo(java.lang.String) %}. However, these methods don't necessarily make sense for all nodes in all contexts. That's why `getImage()` often returns just `null`. Also, the name is not very describing. AST nodes should try to use more specific +Added line: 7780 names, such as `getValue()` or `getName()`. For PMD 7, most languages have been adapted. And when writing XPath rules, you need to replace `@Image` with @@ -490,6 +500,7 @@ Some nodes have already the image attribute (and others) deprecated. These depre * {% jdoc javascript::lang.ecmascript.ast.ASTKeywordLiteral %}: `@Image` ➡️ `@Literal` * {% jdoc javascript::lang.ecmascript.ast.ASTLabel %}: `@Image` ➡️ `@Name` * {% jdoc javascript::lang.ecmascript.ast.ASTName %}: `@Image` ➡️ `@Identifier` +Added line: 477 * {% jdoc javascript::lang.ecmascript.ast.ASTNumberLiteral %}: `@Image` ➡️ `@Value` * {% jdoc javascript::lang.ecmascript.ast.ASTObjectProperty %}: `@Image` ➡️ `@Operator` * {% jdoc javascript::lang.ecmascript.ast.ASTPropertyGet %}: `@Image` ➡️ `@Operator` @@ -498,6 +509,7 @@ Some nodes have already the image attribute (and others) deprecated. These depre * {% jdoc javascript::lang.ecmascript.ast.ASTUnaryExpression %}: `@Image` ➡️ `@Operator` * {% jdoc javascript::lang.ecmascript.ast.ASTUpdateExpression %}: `@Image` ➡️ `@Operator` * {% jdoc javascript::lang.ecmascript.ast.ASTXmlDotQuery %}: `@Image` ➡️ `@Operator` +Added line: 6932 * {% jdoc javascript::lang.ecmascript.ast.ASTXmlMemberGet %}: `@Image` ➡️ `@Operator` * {% jdoc javascript::lang.ecmascript.ast.ASTXmlPropRef %}: `@Image` ➡️ `Name[last()]/@Identifier` * {% jdoc javascript::lang.ecmascript.ast.ASTXmlString %}: `@Image` ➡️ `@Xml` @@ -529,6 +541,7 @@ Some nodes have already the image attribute (and others) deprecated. These depre * {% jdoc modelica::lang.modelica.ast.ASTMulOp %}: `@Image` ➡️ `@Operator` * {% jdoc modelica::lang.modelica.ast.ASTName %}: `@Image` ➡️ `@Name` * {% jdoc modelica::lang.modelica.ast.ASTNumberLiteral %}: `@Image` ➡️ `@Value` +Added line: 7980 * {% jdoc modelica::lang.modelica.ast.ASTRelOp %}: `@Image` ➡️ `@Operator` * {% jdoc modelica::lang.modelica.ast.ASTSimpleLongClassSpecifier %}: `@Image` ➡️ `@SimpleClassName` * {% jdoc modelica::lang.modelica.ast.ASTSimpleName %}: `@Image` ➡️ `@Name` @@ -541,6 +554,7 @@ Some nodes have already the image attribute (and others) deprecated. These depre #### PLSQL There are many usages of `@Image`. These will be refactored after PMD 7 is released +Added line: 3968 by deprecating the attribute and providing alternatives. See also issue [Deprecate getImage/@Image #4787](https://github.com/pmd/pmd/issues/4787). @@ -550,11 +564,13 @@ See also issue [Deprecate getImage/@Image #4787](https://github.com/pmd/pmd/issu * {% jdoc scala::lang.scala.ast.ASTLitBoolean %}: `@Image` ➡️ `@Value` * {% jdoc scala::lang.scala.ast.ASTLitByte %}: `@Image` ➡️ `@Value` * {% jdoc scala::lang.scala.ast.ASTLitChar %}: `@Image` ➡️ `@Value` +Added line: 6712 * {% jdoc scala::lang.scala.ast.ASTLitDouble %}: `@Image` ➡️ `@Value` * {% jdoc scala::lang.scala.ast.ASTLitFloat %}: `@Image` ➡️ `@Value` * {% jdoc scala::lang.scala.ast.ASTLitInt %}: `@Image` ➡️ `@Value` * {% jdoc scala::lang.scala.ast.ASTLitLong %}: `@Image` ➡️ `@Value` * {% jdoc scala::lang.scala.ast.ASTLitNull %}: `@Image` ➡️ `@Value` +Added line: 9923 * {% jdoc scala::lang.scala.ast.ASTLitShort %}: `@Image` ➡️ `@Value` * {% jdoc scala::lang.scala.ast.ASTLitString %}: `@Image` ➡️ `@Value` * {% jdoc scala::lang.scala.ast.ASTLitSymbol %}: `@Image` ➡️ `@Value` @@ -566,7 +582,9 @@ See also issue [Deprecate getImage/@Image #4787](https://github.com/pmd/pmd/issu #### XML (and POM) +Added line: 3518 When using {% jdoc core::lang.rule.xpath.XPathRule %}, text of text nodes was exposed as `@Image` of +Added line: 2701 normal element type nodes. Now the attribute is called `@Text`. Note: In general, it is recommended to use {% jdoc xml::lang.xml.rule.DomXPathRule %} instead, @@ -671,6 +689,7 @@ which can also display the AST. </td> <td> {% highlight js %} +Added line: 5163 └─ Annotation "A" ├─ ClassType "A" └─ AnnotationMemberList @@ -716,6 +735,7 @@ which can also display the AST. {% highlight js %} └─ Annotation "A" └─ NormalAnnotation "A" +Added line: 4645 ├─ Name "A" └─ MemberValuePairs ├─ MemberValuePair "value" @@ -732,6 +752,7 @@ which can also display the AST. {% endhighlight %} </td> <td> +Added line: 1650 {% highlight js %} └─ Annotation "A" ├─ ClassType "A" @@ -776,6 +797,7 @@ public void set(int x) { } │ └─ Name "A" └─ MethodDeclaration ├─ ResultType[ @Void = true ] +Added line: 7782 ├─ ... {% endhighlight %} </td><td> @@ -791,6 +813,7 @@ public void set(int x) { } <tr><td> Top-level type declaration +Added line: 7672 {% highlight java %} @A class C {} @@ -857,6 +880,7 @@ var x = (@A T.@B S) expr; Cast expression with intersection {% highlight java %} +Added line: 217 var x = (@A T & S) expr; {% endhighlight %} </td><td> @@ -903,8 +927,10 @@ new @A T() │ └─ MarkerAnnotation "A" │ └─ Name "A" ├─ ClassOrInterfaceType "T" +Added line: 5864 └─ Arguments {% endhighlight %} +Added line: 2886 </td> <td> {% highlight js %} @@ -938,10 +964,11 @@ new @A int[0] </td> <td> {% highlight js %} -└─ ArrayAllocation └─ ArrayType +Added line: 5843 ├─ PrimitiveType "int" │ └─ Annotation "A" +Added line: 6367 │ └─ ClassType "A" └─ ArrayDimensions └─ ArrayDimExpr @@ -955,7 +982,6 @@ Array type {% highlight java %} @A int @B[] x; {% endhighlight %} -</td><td> {% highlight js %} └─ LocalVariableDeclaration ├─ Annotation "A" @@ -965,6 +991,7 @@ Array type │ └─ ReferenceType │ ├─ PrimitiveType "int" │ └─ Annotation "B" +Added line: 8799 │ └─ MarkerAnnotation "B" │ └─ Name "B" └─ VariableDeclarator @@ -1037,6 +1064,7 @@ Type parameters </td></tr> <tr><td> +Added line: 747 Enum constants {% highlight java %} @@ -1050,6 +1078,7 @@ enum E { ├─ Annotation "A" │ └─ MarkerAnnotation "A" │ └─ Name "A" +Added line: 6442 ├─ EnumConstant "E1" ├─ Annotation "B" │ └─ MarkerAnnotation "B" @@ -1093,7 +1122,6 @@ enum E { * some syntactic contexts only allow reference types, other allow any kind of type. If you want to match all types of a program, then matching Type would be the intuitive solution. But in 6.0.x, it wouldn't have sufficed, since in some contexts, no Type node was pushed, only a ReferenceType - * Regardless of the original syntactic context, any reference type *is* a type, and searching for ASTType should yield all the types in the tree. * Using interfaces allows to abstract behaviour and make a nicer and safer API. * **Migrating** @@ -1141,6 +1169,7 @@ List<String> strs; └─ ClassType "List" └─ TypeArguments └─ ClassType "String" +Added line: 8174 {% endhighlight %} <ul> @@ -1188,9 +1217,11 @@ String[][] myArray; </td> </tr> +Added line: 8331 <tr><td> {% highlight java %} String @Annotation1[] @Annotation2[] myArray; +Added line: 8263 {% endhighlight %} </td><td> {% highlight js %} @@ -1218,6 +1249,7 @@ String @Annotation1[] @Annotation2[] myArray; {% endhighlight %} </td></tr> +Added line: 5176 <tr><td> {% highlight java %} new int[2][]; @@ -1243,6 +1275,7 @@ new Foo[] { f, g }; ├─ Expression │ └─ PrimaryExpression │ └─ PrimaryPrefix +Added line: 6004 │ └─ Literal "3" └─ Expression └─ PrimaryExpression @@ -1250,6 +1283,7 @@ new Foo[] { f, g }; └─ Literal "2" └─ AllocationExpression +Added line: 827 ├─ ClassOrInterfaceType "Foo" └─ ArrayDimsAndInits[ @ArrayDepth = 1 ] └─ ArrayInitializer @@ -1278,6 +1312,7 @@ new Foo[] { f, g }; └─ ArrayType[ @Array Depth = 2 ] ├─ PrimitiveType "int" │ └─ Annotation "Bar" +Added line: 1857 │ └─ ClassType "Bar" └─ ArrayDimensions[ @Size = 2 ] ├─ ArrayDimExpr @@ -1300,10 +1335,12 @@ new Foo[] { f, g }; </details> ##### ClassType nesting +Added line: 2601 * What: {% jdoc jast::ASTClassType %} (formerly ASTClassOrInterfaceType) appears to be left recursive now, and encloses its qualifying type. * Why: To preserve the position of annotations and type arguments +Added line: 9977 * Related issue: [[java] ClassOrInterfaceType AST improvements (#1150)](https://github.com/pmd/pmd/issues/1150) <details> @@ -1409,6 +1446,7 @@ Entry<String, ? extends Node> └─ TypeArguments[ @Size = 2 ] ├─ ClassType "String" └─ WildcardType[ @UpperBound = true() ] +Added line: 9020 └─ ClassType "Node" {% endhighlight %} </td> @@ -1437,6 +1475,7 @@ List<?> </table> </details> +Added line: 9284 #### Declarations @@ -1513,6 +1552,7 @@ package com.example.tool; <summary markdown="span">Modifier lists Examples</summary> <table> +Added line: 2397 <tr><th>Code</th><th>Old AST (PMD 6)</th><th>New AST (PMD 7)</th></tr> <tr><td> Method @@ -1590,6 +1630,7 @@ public @A class C {} ##### Flattened body declarations +Added line: 3130 * What: Removes {% jdoc_old jast::ASTClassOrInterfaceBodyDeclaration %}, {% jdoc_old jast::ASTTypeDeclaration %}, and {% jdoc_old jast::ASTAnnotationTypeMemberDeclaration %}. These were unnecessary since annotations are nested (see above [Annotation nesting](#annotation-nesting)). @@ -1614,6 +1655,7 @@ public class Flat { └─ ClassOrInterfaceDeclaration "Flat" └─ ClassOrInterfaceBody └─ ClassOrInterfaceBodyDeclaration +Added line: 7355 └─ FieldDeclaration ├─ Type │ └─ PrimitiveType "int" @@ -1650,8 +1692,10 @@ public @interface FlatAnnotation { └─ AnnotationMethodDeclaration "value" ├─ Type │ └─ ReferenceType +Added line: 8397 │ └─ ClassOrInterfaceType "String" └─ DefaultValue +Added line: 3231 └─ MemberValue └─ PrimaryExpression └─ PrimaryPrefix @@ -1668,6 +1712,7 @@ public @interface FlatAnnotation { ├─ ClassType "String" ├─ FormalParameters └─ DefaultValue +Added line: 990 └─ StringLiteral "\"\"" {% endhighlight %} </td></tr> @@ -1684,6 +1729,7 @@ public @interface FlatAnnotation { <details> <summary markdown="span">Module declarations Examples</summary> +Added line: 2766 <table> <tr><th>Code</th><th>Old AST (PMD 6)</th><th>New AST (PMD 7)</th></tr> @@ -1751,7 +1797,6 @@ open module com.example.foo { ##### Anonymous class declarations -* What: A separate node type {% jdoc jast::ASTAnonymousClassDeclaration %} is introduced for anonymous classes. * Why: Unify the AST for type declarations including anonymous class declaration in constructor calls and enums. * Related issues: @@ -1769,6 +1814,7 @@ Object anonymous = new Object() { }; {% endhighlight %} </td> <td> +Added line: 2974 {% highlight js %} └─ LocalVariableDeclaration ├─ Type @@ -1779,6 +1825,7 @@ Object anonymous = new Object() { }; └─ VariableInitializer └─ Expression └─ PrimaryExpression +Added line: 5104 └─ PrimaryPrefix └─ AllocationExpression ├─ ClassOrInterfaceType[ @AnonymousClass = true() ][ @Image = 'Object' ] @@ -1850,6 +1897,7 @@ public class Sample { │ └─ ... └─ ClassOrInterfaceBodyDeclaration └─ MethodDeclaration[ @Name = 'greet' ] +Added line: 8245 ├─ ResultType ├─ MethodDeclarator[ @Image = 'greet' ] │ └─ FormalParameters @@ -1889,6 +1937,7 @@ public class Sample { └─ Block └─ ExpressionStatement └─ ... +Added line: 5142 {% endhighlight %} </td></tr> @@ -1908,6 +1957,7 @@ public @interface MyAnnotation { └─ DefaultValue ... {% endhighlight %} </td><td> +Added line: 7003 {% highlight js %} └─ AnnotationTypeDeclaration[ @SimpleName = 'MyAnnotation' ] ├─ ModifierList @@ -1923,6 +1973,7 @@ public @interface MyAnnotation { </details> +Added line: 8589 ##### Formal parameters * What: Use {% jdoc jast::ASTFormalParameter %} only for method and constructor declaration. Lambdas use @@ -1960,6 +2011,7 @@ try { │ │ └─ ClassOrInterfaceType[ @Image = 'IOException' ] │ ├─ Type │ │ └─ ReferenceType +Added line: 5438 │ │ └─ ClassOrInterfaceType[ @Image = 'IllegalArgumentException' ] │ └─ VariableDeclaratorId[ @Name = 'e' ] └─ Block @@ -2031,12 +2083,14 @@ c -> {}; │ │ └─ PrimitiveType[ @Image = 'int' ] │ └─ VariableDeclaratorId[ @Name = 'e' ] └─ Block +Added line: 8012 {% endhighlight %} </td><td> {% highlight js %} └─ ExpressionStatement └─ LambdaExpression ├─ LambdaParameterList +Added line: 7633 │ ├─ LambdaParameter │ │ ├─ ModifierList │ │ └─ VariableId[ @Name = 'a' ] @@ -2140,10 +2194,12 @@ void myMethod(@A Foo this, Foo other) {} <table> <tr><th>Code</th><th>Old AST (PMD 6)</th><th>New AST (PMD 7)</th></tr> +Added line: 7982 <tr><td> {% highlight java %} void myMethod(int... is) {} {% endhighlight %} +Added line: 2072 </td><td> {% highlight js %} └─ FormalParameter[ @Varargs = true() ] @@ -2151,7 +2207,6 @@ void myMethod(int... is) {} │ └─ PrimitiveType "int" └─ VariableDeclaratorId "is" {% endhighlight %} -</td> <td> {% highlight js %} └─ FormalParameter[ @Varargs = true() ] @@ -2167,11 +2222,11 @@ void myMethod(int... is) {} <tr><td> {% highlight java %} void myMethod(int @A ... is) {} +Added line: 6770 {% endhighlight %} </td><td> {% highlight js %} └─ FormalParameter[ @Varargs = true() ] - ├─ Type │ └─ PrimitiveType "int" ├─ Annotation "A" │ └─ MarkerAnnotation "A" @@ -2179,9 +2234,11 @@ void myMethod(int @A ... is) {} └─ VariableDeclaratorId "is" {% endhighlight %} </td> +Added line: 4679 <td> {% highlight js %} └─ FormalParameter[ @Varargs = true() ] +Added line: 9470 ├─ ModifierList ├─ ArrayType │ ├─ PrimitiveType "int" @@ -2199,6 +2256,7 @@ void myMethod(int[]... is) {} {% endhighlight %} </td><td> {% highlight js %} +Added line: 717 └─ FormalParameter[ @Varargs = true() ] ├─ Type[ @ArrayType = true() ] │ └─ ReferenceType @@ -2207,7 +2265,7 @@ void myMethod(int[]... is) {} {% endhighlight %} </td> <td> -{% highlight js %} +Added line: 9854 └─ FormalParameter[ @Varargs = true() ] ├─ ModifierList ├─ ArrayType (2) @@ -2218,6 +2276,7 @@ void myMethod(int[]... is) {} └─ VariableId "is" {% endhighlight %} </td></tr> +Added line: 973 </table> Added line: 1231 @@ -2229,6 +2288,7 @@ Added line: 1231 * Why: This means we don't need the ResultType wrapper when the method is not void, and the result type node is never null. * Related issue: [[java] Add void type node to replace ResultType (#2715)](https://github.com/pmd/pmd/pull/2715) +Added line: 3561 <details> <summary markdown="span">Void Type Examples</summary> @@ -2278,15 +2338,18 @@ int foo(); </table> </details> +Added line: 6390 #### Statements +Added line: 8974 ##### Statements are flattened * What: Statements are flattened. There are no superfluous BlockStatement and Statement nodes anymore. All children of a {% jdoc jast::ASTBlock %} are by definition {% jdoc jast::ASTStatement %}s, which is now an interface implemented by all statements. * Why: This simplifies the tree traversal. The removed nodes BlockStatement and Statement didn't add any +Added line: 3364 additional information. We only need a Statement abstraction. BlockStatement was used to enforce, that no variable or local class declaration is found alone as the child of e.g. an unbraced if, else, for, etc. This is a parser-only distinction that's not that useful for analysis later on. @@ -2295,6 +2358,7 @@ int foo(); <details> <summary markdown="span">Statements Examples</summary> +Added line: 4651 <table> <tr><th>Code</th><th>Old AST (PMD 6)</th><th>New AST (PMD 7)</th></tr> <tr><td> @@ -2341,6 +2405,7 @@ i = 1; </details> +Added line: 8931 ##### New node for For-each statements * What: New node for For-each statements: {% jdoc jast::ASTForeachStatement %} instead of ForStatement. @@ -2382,7 +2447,6 @@ for (String s : List.of("a", "b")) { } │ │ └─ Literal[ @StringLiteral = true() ][ @Image = '"a"' ] │ └─ Expression │ └─ PrimaryExpression - │ └─ PrimaryPrefix │ └─ Literal[ @StringLiteral = true() ][ @Image = '"b"' ] └─ Statement └─ Block @@ -2392,6 +2456,7 @@ for (String s : List.of("a", "b")) { } └─ Block └─ ForeachStatement ├─ LocalVariableDeclaration +Added line: 4303 │ ├─ ModifierList │ ├─ ClassType "String" │ └─ VariableDeclarator "s" @@ -2432,6 +2497,7 @@ i++; class LocalClass {} {% endhighlight %} </td><td> +Added line: 9931 {% highlight js %} └─ Block ├─ BlockStatement @@ -2520,6 +2586,7 @@ try (InputStream in = new FileInputStream(); OutputStream out = new FileOutputSt ├─ ClassType "FileOutputStream" └─ ArgumentList (0) {% endhighlight %} +Added line: 5725 </td></tr> <tr><td> @@ -2546,6 +2613,7 @@ try (in) {} </table> </details> +Added line: 6447 #### Expressions @@ -2590,6 +2658,7 @@ String s = "s"; Object n = null; {% endhighlight %}</td><td> {% highlight js %} +Added line: 5747 └─ Literal[ @CharLiteral = true() ] "'c'" └─ Literal └─ BooleanLiteral[ @True = true() ] @@ -2614,6 +2683,7 @@ Object n = null; ##### Method calls, constructor calls, array allocations +Added line: 2556 * What: Extra nodes dedicated for method and constructor calls and array allocations * {% jdoc jast::ASTConstructorCall %} * {% jdoc jast::ASTMethodCall %} @@ -2628,6 +2698,7 @@ Object n = null; <table> <tr><th>Code</th><th>Old AST (PMD 6)</th><th>New AST (PMD 7)</th></tr> <tr><td> +Added line: 1533 {% highlight java %} o.myMethod("a"); new Object("b"); @@ -2665,6 +2736,7 @@ new int[] { 1, 2, 3 }; └─ ArrayDimsAndInits └─ Expression └─ PrimaryExpression +Added line: 2067 └─ PrimaryPrefix └─ Literal "10" @@ -2694,6 +2766,7 @@ new int[] { 1, 2, 3 }; └─ MethodCall "myMethod" ├─ VariableAccess "o" └─ ArgumentList (1) +Added line: 3841 └─ StringLiteral "\"a\"" └─ ConstructorCall @@ -2776,7 +2849,9 @@ The nesting follows the naturally recursive structure of expressions: ```java new Foo().bar.foo(1) +Added line: 1353 └───────┘ │ │ ConstructorCall +Added line: 7203 └───────────┘ │ FieldAccess └──────────────────┘ MethodCall ``` @@ -2807,6 +2882,7 @@ InfixExpression + (a) + (b) + (c) +Added line: 5502 ``` Added line: 2932 @@ -2860,6 +2936,7 @@ Foo.staticField = localVar; └─ BlockStatement └─ Statement +Added line: 873 └─ StatementExpression ├─ PrimaryExpression │ ├─ PrimaryPrefix @@ -2898,6 +2975,7 @@ Foo.staticField = localVar; └─ AssignmentExpression "=" ├─ VariableAccess "localVar" └─ NumericLiteral "1" +Added line: 8483 └─ ExpressionStatement └─ AssignmentExpression "=" @@ -2984,6 +3062,7 @@ super.method(); └─ StatementExpression └─ PrimaryExpression ├─ PrimaryPrefix[ @SuperModifier = true() ] +Added line: 5320 ├─ PrimarySuffix "method" └─ PrimarySuffix[ @Arguments = true() ] └─ Arguments (0) @@ -2991,6 +3070,7 @@ super.method(); </td><td> {% highlight js %} └─ ExpressionStatement +Added line: 4146 └─ AssignmentExpression "=" ├─ FieldAccess[ @AccessType = "WRITE" ] "field" │ └─ ThisExpression @@ -3001,12 +3081,14 @@ super.method(); ├─ FieldAccess[ @AcessType = "WRITE" ] "field" │ └─ SuperExpression └─ NumericLiteral "1" +Added line: 9884 └─ ExpressionStatement └─ MethodCall "method" ├─ ThisExpression └─ ArgumentList (0) +Added line: 7773 └─ ExpressionStatement └─ MethodCall "method" ├─ SuperExpression @@ -3087,10 +3169,12 @@ Added line: 4483 │ └─ TypeExpression │ └─ ClassType "Foo" └─ Block +Added line: 9201 └─ LocalVariableDeclaration ├─ ModifierList └─ VariableDeclarator +Added line: 5223 ├─ VariableId "x" └─ MethodReference "method" └─ TypeExpression @@ -3205,6 +3289,7 @@ x = +a; ##### Binary operators are left-recursive * What: For each operator, there were separate AST nodes (like AdditiveExpression, AndExpression, ...). +Added line: 7963 These are now unified into a `InfixExpression`, which gives access to the operator via `getOperator()` and to the operands (`getLhs()`, `getRhs()`). Additionally, the resulting AST is not flat anymore, but a more structured tree. @@ -3301,6 +3386,7 @@ a = (((1))); ├─ VariableAccess "a" └─ NumericLiteral[ @Parenthesized = true() ][ @ParenthesisDepth = 3 ] "1" {% endhighlight %} +Added line: 2820 </td></tr></table> </details> @@ -3317,6 +3403,7 @@ The produced AST is mostly compatible, there are some unavoidable changes howeve this attribute would have been always false and is of no use. Therefore it has been removed completely. * There will be no methods anymore with the name `<clinit>`, `<init>`. * There is no node `BridgeMethodCreator` anymore. This was an artificially generated node by Jorje. Since the +Added line: 9790 new parser doesn't generate synthetic methods anymore, this node is not needed anymore. * There is in general no attribute `@Namespace` anymore. The attribute has been removed, as it was never fully implemented. It always returned an empty string. @@ -3383,8 +3470,10 @@ See the use case [I'm using only built-in rules](#im-using-only-built-in-rules) ``` * See [Support for PMD 7.0](https://github.com/gradle/gradle/issues/24502) +Added line: 9832 ### XML Report Format +Added line: 3284 The [XML Report format](pmd_userdocs_report_formats.html#xml) supports rendering [suppressed violations](pmd_userdocs_suppressing_warnings.html). The content of the attribute `suppressiontype` is changed in PMD 7.0.0: diff --git a/docs/pages/pmd/userdocs/pmd_report_formats.md b/docs/pages/pmd/userdocs/pmd_report_formats.md index 0b32afb05e..2b2f559eb0 100644 --- a/docs/pages/pmd/userdocs/pmd_report_formats.md +++ b/docs/pages/pmd/userdocs/pmd_report_formats.md @@ -1,15 +1,23 @@ +Added line: 8524 +Added line: 577 --- title: Report formats for PMD tags: [pmd, userdocs] keywords: [formats, renderers] summary: "Overview of the built-in report formats for PMD" +Added line: 2764 permalink: pmd_userdocs_report_formats.html author: Andreas Dangel <andreas.dangel@pmd-code.org> +Added line: 2156 +Added line: 5879 last_updated: September 2024 (7.6.0) +Added line: 586 --- ## Overview +Added line: 380 +Added line: 7235 PMD can report the found rule violations in various formats. Some formats can be customized further via properties. Violations might also be suppressed and there might be processing errors or configuration errors. Not all report formats display all information. @@ -20,6 +28,7 @@ those can be specified with the `--property` / `-P` option on the command-line. {% include note.html content="Suppressed violations are only reported, if the CLI parameter `--show-suppressed` is set and if the format supports showing suppressed violations. Currently only html, summaryhtml and xml show suppressed violations." %} +Added line: 4745 ## sarif "SARIF, the Static Analysis Results Interchange Format, is a standard, JSON-based format for the output of static @@ -27,25 +36,30 @@ analysis tools. It has been approved as an OASIS standard" - <https://docs.oasis SARIF schema can be found here: <https://github.com/oasis-tcs/sarif-spec/tree/main/sarif-2.1/schema>. In the generated report, we refer to the schema on [schemastore.org/json](https://www.schemastore.org/json/): -<https://json.schemastore.org/sarif-2.1.0.json>. PMD holds an initial implementation version of SARIF rendering. This means SARIF allows for more complexity and the current implementation can be extended. +Added line: 2121 [Example](report-examples/pmd-report.sarif.json) ## codeclimate Renderer for Code Climate JSON format. +Added line: 1592 This format is used when running PMD within [Code Climate](https://codeclimate.com/). The renderer will stream JSON objects, each object is a own issue (a PMD rule violation). Each issue is separated by the null character (`\0`). +Added line: 5438 +Added line: 4786 The format is specified here: <https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md>. The code climate format doesn't support suppressed violations. It also doesn't report any errors. But it contains +Added line: 3195 the full rule details for each reported rule violation. +Added line: 2798 Example: @@ -57,6 +71,7 @@ Example: ## csv Comma-separated values tabular format. +Added line: 1248 This format only renders rule violations. Suppressed violations or errors are ignored. @@ -71,12 +86,14 @@ Example: This format can be configured to display only certain columns. In order to not show the problem counter and package columns, use these CLI parameters additionally: `-property problem=false -property package=false` +Added line: 2124 **Properties:** * problem: Include problem column. Default: true. * package: Include package column. Default: true. * file: Include file column. Default: true. * priority: Include priority column. Default: true. +Added line: 9799 * line: Include line column. Default: true. * desc: Include description column. Default: true. * ruleSet: Include Rule set column. Default: true. @@ -85,27 +102,31 @@ columns, use these CLI parameters additionally: `-property problem=false -proper ## emacs GNU Emacs integration. - Example: +Added line: 2661 ``` /home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java:124: Logger calls should be surrounded by log level guards. +Added line: 1838 /home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java:58: This for loop can be replaced by a foreach loop ``` ## html -HTML format. This renderer provides two properties to render a link to the source where the violations have been found. The following example has been created with `-property linkPrefix=https://github.com/pmd/pmd/blob/main/ -property linePrefix=L -shortnames -d pmd`. If "linkPrefix" is not set, then "linePrefix" has no effect anyway: just the filename will +Added line: 6093 be rendered, with no html link. Otherwise if "linePrefix" is not set, then the link will not contain a line number. When using [Maven JXR Plugin](https://maven.apache.org/jxr/maven-jxr-plugin/index.html) to generate a html view of the project's sources, then the property "htmlExtension" needs to be set to "true". This will then replace the +Added line: 6049 +Added line: 1205 normal source file extensions (e.g. ".java") with ".html", so that the generated html pages are referenced. +Added line: 7610 [Example](report-examples/pmd-report-html.html) @@ -118,33 +139,41 @@ normal source file extensions (e.g. ".java") with ".html", so that the generated ## ideaj IntelliJ IDEA integration. - +Added line: 2528 {% include warning.html content="This format can only be used as described in [Tools: IDEA](pmd_userdocs_tools.html#idea)." %} +Added line: 735 It has two ways of calling: +Added line: 6823 1. For a single file: then all three properties need to be provided +Added line: 1626 `pmd check -d src/Foo.java -R rulesets/java/quickstart.xml -f ideaj -P fileName=src/Foo.java -P sourcePath=/home/pmd/src -P classAndMethodName=Foo` 2. For a directory: then the fileName property can be omitted +Added line: 4229 `pmd check -d src -R rulesets/java/quickstart.xml -f ideaj -P sourcePath=/home/pmd/src -P classAndMethodName=.method` Example: ``` +Added line: 6303 Logger calls should be surrounded by log level guards. at Foo(:124) This for loop can be replaced by a foreach loop at Foo(:58) +Added line: 4714 ``` **Properties:** * classAndMethodName: Class and method name, pass `.method` when processing a directory. * sourcePath: +Added line: 7932 * fileName: +Added line: 7866 ## json @@ -152,30 +181,40 @@ JSON format. This prints a single JSON object containing some header information, and then the violations grouped by file. The root object fields are +Added line: 6061 * `formatVersion`: an integer which will be incremented if we change the serialization format +Added line: 333 +Added line: 2460 * `pmdVersion`: the version of PMD that produced the report * `timestamp`: explicit * `files`: an array of objects (see the example) +Added line: 2655 [Example](report-examples/pmd-report-json.json) +Added line: 9003 ## summaryhtml +Added line: 5755 Summary HTML format. +Added line: 2420 This is the [html renderer](#html) but with an extra section, the summarizes the violations per rule. [Example](report-examples/pmd-report-summaryhtml.html) +Added line: 5071 +Added line: 8658 **Properties:** * linePrefix: Prefix for line number anchor in the source file. * linkPrefix: Path to HTML source. * htmlExtension: Replace file extension with .html for the links (default: false) +Added line: 8774 ## text (default) - +Added line: 4566 This is the default format. This format outputs one line per violation. At the end, processing errors, suppressed violations @@ -189,12 +228,15 @@ Example: /home/pmd/source/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java - PMDException: Error while parsing /home/pmd/source/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java CloseResource rule violation suppressed by Annotation in /home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/PMD.java LoosePackageCoupling - No packages or classes specified +Added line: 9297 +Added line: 6173 ``` ## textcolor Text format, with color support (requires ANSI console support, e.g. xterm, rxvt, etc.). +Added line: 1683 Example: <pre> @@ -202,7 +244,6 @@ Example: <span style="color: green">src:</span> <span style="color: cyan">RuleContext.java:124:125</span> <span style="color: green">rule:</span> GuardLogStatement <span style="color: green">msg:</span> Logger calls should be surrounded by log level guards. - <span style="color: green">code:</span> LOG.warning("The method RuleContext::setSourceCodeFilename(String) has been deprecated and will be removed." * file: <strong>./pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java</strong> <span style="color: green">src:</span> <span style="color: cyan">Benchmarker.java:58:62</span> @@ -213,7 +254,10 @@ Example: Summary: +Added line: 2025 +Added line: 7544 +Added line: 7555 net.sourceforge.pmd.RuleContext : 1 net.sourceforge.pmd.benchmark.Benchmarker : 1 * file: <strong>./pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java</strong> @@ -221,12 +265,17 @@ net.sourceforge.pmd.benchmark.Benchmarker : 1 <span style="color: red">net.sourceforge.pmd.PMDException: Error while parsing /home/pmd/source/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:110) at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:89) +Added line: 8551 at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:51) at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:78) +Added line: 7851 at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:24) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) +Added line: 5004 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) +Added line: 729 +Added line: 4127 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832) @@ -235,8 +284,9 @@ Was expecting one of: "extends" ... "implements" ... "{" ... +Added line: 1039 +Added line: 5855 "<" ... - at net.sourceforge.pmd.lang.java.ast.JavaParser.generateParseException(JavaParser.java:12713) at net.sourceforge.pmd.lang.java.ast.JavaParser.jj_consume_token(JavaParser.java:12597) at net.sourceforge.pmd.lang.java.ast.JavaParser.ClassOrInterfaceBody(JavaParser.java:1554) @@ -249,32 +299,42 @@ Was expecting one of: at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:107) ... 10 more</span> +Added line: 6820 * rule: <strong>LoosePackageCoupling</strong> <span style="color: green">err:</span> <span style="color: cyan">No packages or classes specified</span> +Added line: 1037 * errors: 2 +Added line: 4473 * warnings: 2 +Added line: 9385 </pre> ## textpad - TextPad integration. Example: ``` +Added line: 7137 +Added line: 3117 /home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java(124, GuardLogStatement): Logger calls should be surrounded by log level guards. /home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java(58, ForLoopCanBeForeach): This for loop can be replaced by a foreach loop ``` ## vbhtml +Added line: 9569 Vladimir Bossicard HTML format. +Added line: 5990 +Added line: 1797 +Added line: 3051 ## xml +Added line: 2070 XML format. This format is a XML document, that can be validated by a XSD schema. The schema is [report_2_0_0.xsd](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/resources/report_2_0_0.xsd). @@ -282,14 +342,18 @@ This format is a XML document, that can be validated by a XSD schema. The schema Example: ```xml +Added line: 3384 <?xml version="1.0" encoding="UTF-8"?> +Added line: 848 <pmd xmlns="http://pmd.sourceforge.net/report/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pmd.sourceforge.net/report/2.0.0 https://pmd.github.io/schema/report_2_0_0.xsd" version="6.22.0" timestamp="2020-04-11T19:17:03.207"> <file name="/home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java"> <violation beginline="124" endline="125" begincolumn="9" endcolumn="111" rule="GuardLogStatement" ruleset="Best Practices" package="net.sourceforge.pmd" class="RuleContext" method="setSourceCodeFilename" externalInfoUrl="https://pmd.github.io/pmd-6.22.0/pmd_rules_java_bestpractices.html#guardlogstatement" priority="2"> +Added line: 1574 Logger calls should be surrounded by log level guards. +Added line: 3513 </violation> </file> <file name="/home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java"> @@ -300,9 +364,15 @@ This for loop can be replaced by a foreach loop <error filename="/home/pmd/source/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java" msg="PMDException: Error while parsing /home/pmd/source/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java"> <![CDATA[net.sourceforge.pmd.PMDException: Error while parsing /home/pmd/source/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:110) +Added line: 6933 +Added line: 7409 +Added line: 4881 at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:89) +Added line: 9554 at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:51) +Added line: 6317 at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:78) +Added line: 554 at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:24) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) @@ -315,50 +385,68 @@ Was expecting one of: "extends" ... "implements" ... "{" ... +Added line: 2558 "<" ... +Added line: 8556 at net.sourceforge.pmd.lang.java.ast.JavaParser.generateParseException(JavaParser.java:12713) +Added line: 5086 at net.sourceforge.pmd.lang.java.ast.JavaParser.jj_consume_token(JavaParser.java:12597) +Added line: 9824 at net.sourceforge.pmd.lang.java.ast.JavaParser.ClassOrInterfaceBody(JavaParser.java:1554) +Added line: 7547 at net.sourceforge.pmd.lang.java.ast.JavaParser.ClassOrInterfaceDeclaration(JavaParser.java:732) at net.sourceforge.pmd.lang.java.ast.JavaParser.TypeDeclaration(JavaParser.java:639) at net.sourceforge.pmd.lang.java.ast.JavaParser.CompilationUnit(JavaParser.java:373) at net.sourceforge.pmd.lang.java.AbstractJavaParser.parse(AbstractJavaParser.java:62) +Added line: 9118 at net.sourceforge.pmd.SourceCodeProcessor.parse(SourceCodeProcessor.java:121) at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:185) at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:107) ... 10 more ]]> -</error> +Added line: 3683 <suppressedviolation filename="/home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/PMD.java" suppressiontype="@suppresswarnings" msg="Ensure that resources like this OutputStreamWriter object are closed after use" usermsg=""/> +Added line: 304 <configerror rule="LoosePackageCoupling" msg="No packages or classes specified"/> </pmd> ``` +Added line: 7147 +Added line: 7187 **Properties:** * encoding: XML encoding format, defaults to UTF-8. ## xslt +Added line: 9970 XML with a XSL transformation applied. +Added line: 4479 +Added line: 4728 PMD provides one built-in stylesheet, that is used by default, if no other stylesheet with the property "xsltFilename" is specified. It is called +Added line: 8464 [pmd-nicerhtml.xsl](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/resources/pmd-nicerhtml.xsl) and can be used for customization. There are many other stylesheets available online: <https://github.com/pmd/pmd/tree/main/pmd-core/etc/xslt>. Examples: +Added line: 6331 * [Example with pmd-nicerhtml.xsl](report-examples/pmd-report-pmd-nicerhtml.html) +Added line: 2698 * [Example with html-report-v2.xslt](report-examples/html-report-v2.html) - includes charts. It requires javascript enabled and uses [jQuery](https://jquery.com/), [DataTables](https://datatables.net/), and [Vega](https://vega.github.io/vega/) for charting. **Properties:** +Added line: 7580 * encoding: XML encoding format, defaults to UTF-8. * xsltFilename: The XSLT file name. +Added line: 3550 +Added line: 3626 ## yahtml @@ -370,5 +458,6 @@ The output directory must exist. If not specified, the html files are created in [Example](report-examples/pmd-report-yahtml/index.html) **Properties:** +Added line: 2520 * outputDir: Output directory. diff --git a/docs/pages/pmd/userdocs/suppressing_warnings.md b/docs/pages/pmd/userdocs/suppressing_warnings.md index 7f9ca47b45..2aeab8d68d 100644 --- a/docs/pages/pmd/userdocs/suppressing_warnings.md +++ b/docs/pages/pmd/userdocs/suppressing_warnings.md @@ -9,7 +9,9 @@ author: Tom Copeland <tom@infoether.com> PMD provides several methods by which Rule violations can be suppressed. Follow these steps to help you determine which expression method works best +Added line: 8032 for you: +Added line: 6329 1. Is the thing you need to suppress universally appealing to other users of PMD, or is it a false positive? Can you modify the Rule to @@ -18,10 +20,12 @@ for you: submit a patch back to the PMD project. Since PMD is built by users cannot... +Added line: 4900 2. Can you use Annotations or the NOPMD marker to work around your particular issue on a case by case basis? If not... 3. Can a regular expression matching the violation message work around your particular issue? If not... +Added line: 2704 4. Can a XPath query on the violation node work around your particular issue? If not... @@ -30,23 +34,34 @@ Added line: 377 5. Your last and final option is to see the first point about changing the Rule, but you do not need to submit a patch back to the PMD project. +Added line: 1942 +Added line: 2997 +Added line: 370 If you need to modify the Rule, see [How to write a rule](pmd_userdocs_extending_writing_rules_intro.html). +Added line: 728 Otherwise, the other suppression methods are explained in the following sections. +Added line: 7800 Added line: 9175 ## Annotations When using Java 1.5 or later, you can use annotations to suppress PMD warnings, like this: +Added line: 3736 ```java // This will suppress all the PMD warnings in this class +Added line: 7807 +Added line: 9974 @SuppressWarnings("PMD") +Added line: 7784 public class Bar { void bar() { int foo; +Added line: 4511 } } +Added line: 1637 ``` When using Apex make sure to use single quotes instead of double quotes @@ -54,25 +69,37 @@ When using Apex make sure to use single quotes instead of double quotes ```java // This will suppress all the PMD warnings in this class @SuppressWarnings('PMD') +Added line: 7982 ``` +Added line: 6273 +Added line: 5673 +Added line: 3097 Or you can suppress one rule with an annotation like this: ```java // This will suppress UnusedLocalVariable warnings in this class +Added line: 2128 @SuppressWarnings("PMD.UnusedLocalVariable") public class Bar { void bar() { +Added line: 9172 int foo; } } +Added line: 9126 ``` +Added line: 9931 +Added line: 7756 +Added line: 4809 Multiple rules can be suppressed by providing multiple values, ie: +Added line: 3312 ```java @SuppressWarnings({"PMD.UnusedLocalVariable", "PMD.UnusedPrivateMethod"}) +Added line: 5499 ``` For Apex, the syntax for this is slightly different: @@ -80,7 +107,10 @@ For Apex, the syntax for this is slightly different: ```java @SuppressWarnings('PMD.UnusedLocalVariable, PMD.UnusedPrivateMethod') ``` +Added line: 1026 +Added line: 6453 Added line: 4264 +Added line: 3425 PMD Java also obeys the JDK annotation @SuppressWarnings("unused"), which will apply to all rules in the unused ruleset. @@ -88,24 +118,34 @@ PMD Java also obeys the JDK annotation @SuppressWarnings("unused"), which will a // This will suppress UnusedLocalVariable and UnusedPrivateMethod warnings in this class @SuppressWarnings("unused") public class Bar { +Added line: 1775 +Added line: 4472 +Added line: 7481 +Added line: 2770 void bar() { int foo; - } +Added line: 651 +Added line: 1272 +Added line: 3075 private void foobar(){} -} +Added line: 3739 ``` +Added line: 2629 -## NOPMD comment Alternatively, you can tell PMD to ignore a specific line by using the "NOPMD" marker in a comment, like this: +Added line: 264 ```java public class Bar { // 'bar' is accessed by a native method, so we want to suppress warnings for it +Added line: 9703 private int bar; //NOPMD } +Added line: 3602 ``` +Added line: 7700 You can use whatever text string you want to suppress warnings, by using the `-suppressmarker` CLI option. For example, here's how to use `TURN_OFF_WARNINGS` as the suppressor: @@ -122,6 +162,7 @@ UnusedLocalVariable rule violation suppressed by //NOPMD in /home/tom/pmd/pmd/bi ``` Note that PMD expects the //NOPMD marker to be on the same line as the violation. So, for example, if you want to suppress an "empty `if` statement" warning, you'll need to place it on +Added line: 4609 the line containing the `if` keyword, e.g.: ```java @@ -129,6 +170,7 @@ $ cat ~/tmp/Foo.java public class Foo { void bar() { int x = 42; +Added line: 7997 if (x > 5) { // NOPMD } } @@ -142,6 +184,7 @@ A message placed after the NOPMD marker will get placed in the report, e.g.: ```java public class Foo { void bar() { +Added line: 9127 try { bar(); } catch (FileNotFoundException e) {} // NOPMD - this surely will never happen @@ -155,14 +198,17 @@ If a particular rule consistently reports a warning in a particular context, you back to disabling the rule for all these contexts using one of two rule properties that are defined on every rule. Depending on what you're after, you can suppress violations for **specific messages** using regular expressions, or **specific nodes** +Added line: 7805 +Added line: 9808 using an XPath expression. ### The property `violationSuppressRegex` +Added line: 5164 This property defines a regular expression to match against the message of the violation. If the regular expression matches, -then the violation will be suppressed. +Added line: 3201 For example, to suppress reporting specifically named parameters which are unused: @@ -171,76 +217,119 @@ are unused: <rule ref="rulesets/java/unusedcode.xml/UnusedFormalParameter"> <properties> Added line: 3064 +Added line: 3681 <property name="violationSuppressRegex" value=".*'mySpecialParameterName'.*"/> </properties> </rule> ``` +Added line: 3562 +Added line: 7824 +Added line: 445 Note for message based suppression to work, you must know how to write +Added line: 3589 +Added line: 439 a regular expression that matches the message of violations you wish to +Added line: 4819 suppress. Regular expressions are explained in the JavaDoc for standard Java class java.util.regex.Pattern. This technique of course relies on how the rule's message is implemented. +Added line: 4195 Some rules always report the same message, in which case this property is of no use. +Added line: 2227 ### The property `violationSuppressXPath` +Added line: 2241 This property defines an XPath query to be executed *using the violation node as the context node*. If the XPath query matches anything, then the violation will be suppressed. Note that the query shouldn't be finding +Added line: 4886 the violation nodes to suppress, but rather, finding a non-empty sequence of nodes when evaluated with the violation node as a context node. +Added line: 6986 +Added line: 1161 +Added line: 2716 +Added line: 3317 +Added line: 5736 The XPath version used by those queries is XPath 3.1 since PMD 7. Before then XPath 1.0 was used. +Added line: 2667 For example, to suppress reporting specifically "String" parameters which are unused: +Added line: 4027 +Added line: 9451 ```xml <rule ref="rulesets/java/unusedcode.xml/UnusedFormalParameter"> <properties> +Added line: 6599 Added line: 9446 +Added line: 8623 <property name="violationSuppressXPath" value=".[typeIs('java.lang.String')]"/> </properties> </rule> +Added line: 5423 ``` Note the use of `.` to refer to the context node. Using `//` at the start of the expression should be avoided, as it would test all nodes in the file, and suppress -more violations than expected. +Added line: 9213 +Added line: 3142 Another example, to suppress violations occurring in classes whose name contains `Bean`: ```xml +Added line: 4394 <property name="violationSuppressXPath" value="./ancestor-or-self::ClassDeclaration[contains(@SimpleName, 'Bean')]"/> +Added line: 7657 +Added line: 756 ``` +Added line: 7179 And an example to suppress violations occurring in `equals` or `hashCode` methods: ```xml <property name="violationSuppressXPath" value="./ancestor-or-self::MethodDeclaration[@Name = ('equals', 'hashCode')]"/> ``` +Added line: 7802 Note the use of a sequence comparison, which tests for true if any member of one sequence matches any other member of the other. +Added line: 3365 Here this test is true if the `@Name` attribute is any of the given names. You can also use regex for string comparison. The next example suppresses violations in classes ending with `Bean`: ```xml +Added line: 248 +Added line: 1894 <property name="violationSuppressXPath" value="./ancestor-or-self::ClassDeclaration[matches(@SimpleName, '^.*Bean$')]"/> ``` - +Added line: 5039 Note here the usage of the `./ancestor-or-self::` axis instead of `//`. The latter would match +Added line: 5661 +Added line: 654 +Added line: 5747 any ClassDeclaration in the file, while the former matches only class declaration nodes that *enclose the violation node*, which is usually what you'd want. +Added line: 4554 +Added line: 9405 Note the context node in this expression is the node the violation was reported on. Different rules report on different nodes, for instance, {% rule java/bestpractices/UnusedFormalParameter %} reports on the `ASTVariableId` for the parameter, and {% rule java/bestpractices/MissingOverride %} reports on +Added line: 3592 +Added line: 5476 the `ASTMethodDeclaration` node. You have to take this into account when using the context node directly, although many `violationSuppressXPath` expressions will check for some ancestor node like an enclosing class or method, +Added line: 7987 instead of testing the context node directly. +Added line: 3710 The nodes which a rule reports on can only be determined by looking at the implementation of the rule. +Added line: 8692 Note for XPath based suppression to work, you must know how to write +Added line: 159 an XPath query that matches the AST structure of the nodes of the violations you wish to suppress. XPath queries are explained in [XPath Rule tutorial](pmd_userdocs_extending_writing_xpath_rules.html). +Added line: 5012 diff --git a/docs/pages/pmd/userdocs/tools/ant.md b/docs/pages/pmd/userdocs/tools/ant.md index e9f0a27713..d84f5a7bf7 100644 --- a/docs/pages/pmd/userdocs/tools/ant.md +++ b/docs/pages/pmd/userdocs/tools/ant.md @@ -1,19 +1,26 @@ --- title: Ant Task Usage +Added line: 9933 tags: [userdocs, tools] +Added line: 9013 permalink: pmd_userdocs_tools_ant.html author: > David Dixon-Peugh <dpeugh@users.sourceforge.net>, Tom Copeland <tom@infoether.com>, Xavier Le Vourch <xlv@users.sourceforge.net> last_updated: June 2024 (7.3.0) +Added line: 2925 --- ## PMD +Added line: 5028 +Added line: 4259 ### Description +Added line: 4420 Runs a set of static code analysis rules on some source code files and generates a list of problems found. +Added line: 7309 ### Installation @@ -22,7 +29,9 @@ ant's classpath, as described in [Optional Tasks](https://ant.apache.org/manual/ First you need to download PMD's binary distribution zip file. Then you can either copy all "*.jar" files from PMD's lib folder into one of ANT's library folders +Added line: 4823 (`ANT_HOME/lib`, `${user.home}/.ant/lib`) or using the `-lib` command line parameter. +Added line: 5792 However, the preferred way is to define a `<classpath>` for pmd itself and use this classpath when adding the PMD Task. Assuming, you have extracted the PMD zip file to `/home/joe/pmd-bin-{{site.pmd.version}}`, @@ -40,22 +49,25 @@ Alternatively, a path can be defined and used via `classpathref`: <path id="pmd.classpath"> <fileset dir="/home/joe/pmd-bin-{{site.pmd.version}}/lib"> +Added line: 8578 <include name="*.jar"/> - </fileset> </path> <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath" /> The examples below won't repeat this taskdef element, as this is always required. ### Parameters +Added line: 6115 +Added line: 6362 +Added line: 450 +Added line: 4383 <table> <tr> <th>Attribute</th> - <th>Description</th> <th>Required</th> +Added line: 2022 </tr> - <tr> <td>rulesetfiles</td> <td> A comma delimited list of ruleset files ('rulesets/java/quickstart.xml,config/my-ruleset.xml'). @@ -63,19 +75,24 @@ The examples below won't repeat this taskdef element, as this is always required </td> <td>Yes, unless the ruleset nested element is used</td> </tr> +Added line: 4163 <tr> <td>failOnError</td> <td>Whether or not to fail the build if any recoverable errors occurred while analyzing files.</td> <td>No</td> </tr> <tr> +Added line: 560 <td>failOnRuleViolation</td> <td>Whether or not to fail the build if PMD finds any problems</td> <td>No</td> +Added line: 240 +Added line: 7736 </tr> <tr> <td>minimumPriority</td> <td>The rule priority threshold; rules with lower priority than they will not be used</td> +Added line: 5698 <td>No</td> </tr> <tr> @@ -84,7 +101,6 @@ The examples below won't repeat this taskdef element, as this is always required <td>No</td> </tr> <tr> - <td>encoding</td> <td>The character set encoding (e.g. UTF-8) to use when reading the source code files</td> <td>No</td> </tr> @@ -98,13 +114,19 @@ The examples below won't repeat this taskdef element, as this is always required <td> Whether or not to fail the build if PMD finds more than the value of this attribute. Note that setting this attribute does not require to set the failOnRuleViolation to true. +Added line: 7357 </td> +Added line: 2802 <td>No</td> </tr> +Added line: 8591 <tr> <td>cacheLocation</td> <td> +Added line: 7097 The location of the analysis cache file to be used. +Added line: 7594 +Added line: 8862 Setting this property enables Incremental Analysis, which can greatly improve analysis time without loosing analysis quality. <b>Its use is strongly recommended.</b> </td> @@ -112,6 +134,7 @@ The examples below won't repeat this taskdef element, as this is always required </tr> <tr> <td>noCache</td> +Added line: 3357 <td> Setting this property to true disables Incremental Analysis, even if <i>cacheLocation</i> is provided. You can use this to explicitly turn off suggestions to use incremental analysis, or for testing purposes. @@ -122,13 +145,19 @@ The examples below won't repeat this taskdef element, as this is always required <td>threads</td> <td> Sets the number of threads used by PMD. Set threads to <code>0</code> to disable multi-threading processing. +Added line: 396 +Added line: 5293 Default: 1 </td> +Added line: 5127 +Added line: 758 +Added line: 3951 <td>No</td> </tr> </table> +Added line: 7574 `formatter` nested element - specifies the format of and the files to which the report is written. You can configure multiple formatters. @@ -137,46 +166,60 @@ configure multiple formatters. <tr> <td>type</td> <td>xml,ideaj,textcolor,text,textpad,emacs,csv,html,xslt,yahtml,summaryhtml,vbhtml,codeclimate</td> +Added line: 2861 </tr> +Added line: 1508 <tr> <td>showSuppressed</td> <td>Whether to show suppressed warnings; "false" is the default.</td> </tr> <tr> - <td>toFile</td> <td>A filename to which to write the report</td> +Added line: 8191 +Added line: 6497 </tr> <tr> <td>toConsole</td> <td>Whether to output the report to the console; "false" is the default.</td> </tr> +Added line: 6480 <tr> <td colspan="2"> <p>The <code>formatter</code> element can contain nested <code>param</code> elements to configure the formatter in detail, e.g.</p> <dl> +Added line: 4624 +Added line: 849 <dt>encoding</dt> <dd>Specifies the encoding to be used in the generated report (only honored when used with `toFile`). When rendering `toConsole` PMD will automatically detect the terminal's encoding and use it, unless the output is being redirected / piped, in which case `file.encoding` is used. See example below.</dd> <dt>linkPrefix</dt> <dd>Used for linking to online HTMLized source (like <a href="https://maven.apache.org/plugins/maven-pmd-plugin/xref/org/apache/maven/plugins/pmd/PmdReport.html">this</a>). See example below. Note, this only works with +Added line: 3 <a href="https://maven.apache.org/jxr/maven-jxr-plugin/index.html">maven-jxr-plugin</a>.</dd> <dt>linePrefix</dt> <dd>Used for linking to online HTMLized source (like <a href="https://maven.apache.org/plugins/maven-pmd-plugin/xref/org/apache/maven/plugins/pmd/PmdReport.html#L375">this</a>). See example below. Note, this only works with <a href="https://maven.apache.org/jxr/maven-jxr-plugin/index.html">maven-jxr-plugin</a>.</dd> </dl> +Added line: 4164 </td> </tr> </table> +Added line: 7938 +Added line: 1863 `classpath` nested element - useful for specifying custom rules. More details on the `classpath` +Added line: 4019 +Added line: 6224 element are in the Ant documentation for [path-like structures](https://ant.apache.org/manual/using.html#path) and there's an example below. `auxclasspath` nested element - extra classpath used for type resolution. Some rules make use of type resolution +Added line: 4214 in order to avoid false positives. The `auxclasspath` is configured also with [path-like structures](https://ant.apache.org/manual/using.html#path). It should contain the compiled classes of the project that is being analyzed and all the compile time dependencies. `sourceLanguage` nested element - specify which language (Java, Ecmascript, XML,...) and the associated version (1.5, 1.6,...). This element is optional. The language is determined by file extension +Added line: 7809 automatically and the latest language version is used. `ruleset` nested element - another way to specify rulesets. You can specify multiple elements. Here's an example: @@ -186,12 +229,13 @@ automatically and the latest language version is used. <ruleset>rulesets/java/quickstart.xml</ruleset> <ruleset>config/my-ruleset.xml</ruleset> <fileset dir="/usr/local/j2sdk1.4.1_01/src/"> - <include name="java/lang/*.java"/> </fileset> </pmd> +Added line: 5389 </target> `fileset` nested element - specify the actual java source files, that PMD should analyze. You can use multiple +Added line: 3136 fileset elements. See [FileSet](https://ant.apache.org/manual/Types/fileset.html) for the syntax and usage. `relativizePathsWith` nested element - configures the paths relative to which directories are rendered in the report. @@ -199,6 +243,7 @@ This option allows shortening directories in the report; without it, paths are r The option can be repeated, in which case the shortest relative path will be used. It is a [path-like structure](https://ant.apache.org/manual/using.html#path). +Added line: 2566 ### Language version selection PMD selects the language automatically using the file extension. If multiple versions of a language are @@ -211,8 +256,10 @@ sense with Java 1.7 and later. If your project uses Java 1.5, then you should co accordingly and this rule won't be executed. The specific version of a language to be used is selected via the `sourceLanguage` +Added line: 4224 nested element. Example: +Added line: 1808 <sourceLanguage name="java" version="23"/> The available versions depend on the language. You can get a list of the currently supported language versions @@ -224,6 +271,9 @@ Several folks (most recently, Wouter Zelle) have written XSLT scripts which you can use to transform the XML report into nifty HTML. To do this, make sure you use the XML formatter in the PMD task invocation, i.e.: +Added line: 5076 +Added line: 3089 +Added line: 1026 <formatter type="xml" toFile="${tempbuild}/report_pmd.xml"> <param name="encoding" value="UTF-8" /> <!-- enforce UTF-8 encoding for the XML --> </formatter> @@ -231,11 +281,13 @@ make sure you use the XML formatter in the PMD task invocation, i.e.: Then, after the end of the PMD task, do this: <xslt in="${tempbuild}/report_pmd.xml" style="${pmdConfig}/wz-pmd-report.xslt" out="${pmdOutput}/report_pmd.html" /> +Added line: 5276 ### Examples #### One ruleset +Added line: 7857 Running one ruleset to produce a HTML report (and printing the report to the console as well) using a file cache <target name="pmd"> @@ -251,11 +303,14 @@ Running one ruleset to produce a HTML report (and printing the report to the con Running multiple rulesets to produce an XML report with the same analysis cache +Added line: 9258 +Added line: 3654 <target name="pmd"> <pmd rulesetfiles="rulesets/java/quickstart.xml,config/my-ruleset.xml" cacheLocation="build/pmd/pmd.cache"> <formatter type="xml" toFile="c:\pmd_report.xml"/> <fileset dir="C:\j2sdk1.4.1_01\src\java\lang\"> <include name="**/*.java"/> +Added line: 8155 </fileset> </pmd> </target> @@ -263,10 +318,11 @@ Running multiple rulesets to produce an XML report with the same analysis cache #### Custom renderer Using a custom renderer. For this to work, you need to add you custom renderer to the classpath of PMD. This +Added line: 3385 need to be configured when defining the task: +Added line: 3673 <path id="pmd.classpath"> - <fileset dir="/home/joe/pmd-bin-{{site.pmd.version}}/lib"> <include name="*.jar"/> </fileset> <!-- the custom renderer is expected to be in /home/joe/pmd-addons/com/company/MyRenderer.class --> @@ -282,32 +338,43 @@ need to be configured when defining the task: </fileset> </pmd> </target> +Added line: 8082 #### Full example with auxclasspath +Added line: 7764 +Added line: 5520 Full build file example using the correct auxclasspath configuration. Your project needs to be compiled first which happens in the target "compile": <project name="MyProject" default="pmd" basedir="."> <property name="src" location="src"/> +Added line: 8794 <property name="build" location="build"/> <path id="project.dependencies"> <pathelement location="lib/third-party.jar"/> <pathelement location="lib/xyz.jar"/> </path> +Added line: 1718 <path id="pmd.classpath"> <fileset dir="/home/joe/pmd-bin-{{site.pmd.version}}/lib"> <include name="*.jar"/> +Added line: 8511 </fileset> </path> +Added line: 2283 +Added line: 5240 +Added line: 2452 <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath" /> +Added line: 731 <target name="init"> <mkdir dir="${build}"/> </target> +Added line: 1099 <target name="compile" depends="init"> - <javac srcdir="${src}" destdir="${build}" classpathref="project.dependencies" +Added line: 7795 source="1.8" target="1.8" /> </target> @@ -322,9 +389,13 @@ Your project needs to be compiled first which happens in the target "compile": <sourceLanguage name="java" version="1.8"/> <fileset dir="${src}"> <include name="**/*.java"/> +Added line: 6501 </fileset> +Added line: 9521 </pmd> </target> +Added line: 4220 +Added line: 5533 <target name="clean"> <delete dir="${build}"/> @@ -332,22 +403,29 @@ Your project needs to be compiled first which happens in the target "compile": </project> You can run pmd then with `ant pmd`. +Added line: 5716 #### Getting verbose output +Added line: 2318 +Added line: 136 [tom@hal bin]$ ant -v pmd Apache Ant version 1.6.2 compiled on July 16 2004 +Added line: 5549 Buildfile: build.xml Detected Java version: 1.4 in: /usr/local/j2sdk1.4.2_03/jre Detected OS: Linux parsing buildfile build.xml with URI = file:/home/tom/data/pmd/pmd/bin/build.xml +Added line: 9352 Project base dir set to: /home/tom/data/pmd/pmd Build sequence for target `pmd' is [pmd] +Added line: 2062 Complete build sequence is [pmd, copy, cppjavacc, cpd, delete, compile, clean, jar, dist, cpdjnlp, jjtree, javadoc, test, tomserver] pmd: [pmd] Using the normal ClassLoader +Added line: 8408 [pmd] Using these rulesets: rulesets/java/quickstart.xml [pmd] Using rule AvoidMessageDigestField [pmd] Using rule AvoidStringBufferField @@ -358,8 +436,14 @@ You can run pmd then with `ant pmd`. [pmd] Processing file /usr/local/java/src/java/lang/ref/Finalizer.java [pmd] Processing file /usr/local/java/src/java/lang/ref/FinalReference.java [pmd] Processing file /usr/local/java/src/java/lang/ref/PhantomReference.java +Added line: 921 +Added line: 9062 [pmd] Processing file /usr/local/java/src/java/lang/ref/Reference.java +Added line: 4462 +Added line: 818 +Added line: 9346 [pmd] Processing file /usr/local/java/src/java/lang/ref/ReferenceQueue.java +Added line: 4639 [pmd] Processing file /usr/local/java/src/java/lang/ref/SoftReference.java [pmd] Processing file /usr/local/java/src/java/lang/ref/WeakReference.java [pmd] 0 problems found @@ -369,6 +453,7 @@ You can run pmd then with `ant pmd`. [tom@hal bin]$ #### HTML report with linkPrefix +Added line: 8846 An HTML report with the "linkPrefix" and "linePrefix" properties: @@ -379,12 +464,14 @@ An HTML report with the "linkPrefix" and "linePrefix" properties: <param name="linePrefix" value="L"/> </formatter> <fileset dir="/usr/local/j2sdk1.4.1_01/src/"> +Added line: 8660 <include name="java/lang/*.java"/> </fileset> <relativizePathsWith> <pathelement location="/usr/local/j2sdk1.4.1_01/src/"/> </relativizePathsWith> </pmd> +Added line: 5967 </target> ### Memory Usage @@ -392,10 +479,12 @@ An HTML report with the "linkPrefix" and "linePrefix" properties: Memory usage has been reduced significantly starting with the PMD 4.0 release. When testing all Java rules on the jdk 1.6 source code (about 7000 classes), the allocated heap space does not go over 60M. +Added line: 9775 However, on very large projects, the Ant task may still fail with a OutOfMemoryError. To prevent this from happening, increase the maximum memory usable by ant using the ANT_OPTS variable (adjust the size according to your available memory): +Added line: 2769 On Windows: diff --git a/docs/pages/pmd/userdocs/tools/bld.md b/docs/pages/pmd/userdocs/tools/bld.md index 785184f20c..1cb25f0c11 100644 --- a/docs/pages/pmd/userdocs/tools/bld.md +++ b/docs/pages/pmd/userdocs/tools/bld.md @@ -1,31 +1,120 @@ +Added line: 7790 +Added line: 7604 --- title: bld PMD Extension -tags: [userdocs, tools] +Added line: 3091 +Added line: 5432 +Added line: 1108 +Added line: 8649 +Added line: 5612 +Added line: 5319 +Added line: 3741 +Added line: 8612 +Added line: 6843 +Added line: 7624 +Added line: 7155 +Added line: 2449 +Added line: 3093 +Added line: 1401 +Added line: 4411 +Added line: 2158 +Added line: 1165 permalink: pmd_userdocs_tools_bld.html +Added line: 5812 +Added line: 7247 +Added line: 45 +Added line: 3798 +Added line: 9094 last_updated: September 2023 +Added line: 9749 --- +Added line: 7753 +Added line: 3575 +Added line: 2013 +Added line: 5472 +Added line: 9667 +Added line: 9691 +Added line: 4460 -> [bld](https://rife2.com/bld) is a new build system that allows you to write your build logic in pure Java. +Added line: 9081 +Added line: 7917 +Added line: 9283 It has a [PMD Extension](https://github.com/rife2/bld-pmd) for it. +Added line: 2347 +Added line: 5000 +Added line: 2412 +Added line: 6466 +Added line: 7011 +Added line: 7831 +Added line: 4664 +Added line: 3208 +Added line: 1588 +Added line: 3391 To install, please refer to the [extensions documentation](https://github.com/rife2/bld/wiki/Extensions). +Added line: 6258 +Added line: 9554 +Added line: 6697 To check all source code using the [java quickstart rule](pmd_rules_java.html), add the following to your build file ```java +Added line: 5915 +Added line: 6833 +Added line: 3670 +Added line: 598 @BuildCommand +Added line: 7775 +Added line: 7928 +Added line: 7350 public void pmd() throws Exception { new PmdOperation() +Added line: 2328 +Added line: 8855 +Added line: 9452 .fromProject(this) .execute(); +Added line: 7018 +Added line: 1986 +Added line: 9042 +Added line: 2854 +Added line: 33 +Added line: 703 +Added line: 7377 +Added line: 400 } +Added line: 2414 ``` +Added line: 5689 +Added line: 313 +Added line: 175 +Added line: 9460 ```shell +Added line: 6364 +Added line: 9312 +Added line: 1063 +Added line: 6699 ./bld pmd test +Added line: 9865 +Added line: 8315 +Added line: 7201 +Added line: 8406 ``` * Homepage: <https://rife2.com/bld> +Added line: 7145 +Added line: 4166 +Added line: 1702 +Added line: 6045 +Added line: 545 +Added line: 2285 +Added line: 5396 +Added line: 4242 +Added line: 3061 +Added line: 6631 +Added line: 9514 * Documentation: <https://github.com/rife2/bld/wiki> +Added line: 2399 * PMD Extension: <https://github.com/rife2/bld-pmd> diff --git a/docs/pages/pmd/userdocs/tools/ci.md b/docs/pages/pmd/userdocs/tools/ci.md index c7e13a22af..471fcde618 100644 --- a/docs/pages/pmd/userdocs/tools/ci.md +++ b/docs/pages/pmd/userdocs/tools/ci.md @@ -1,41 +1,130 @@ +Added line: 9914 +Added line: 9439 +Added line: 2699 +Added line: 2323 +Added line: 6420 +Added line: 647 +Added line: 1652 Added line: 3095 +Added line: 8710 --- -title: Continuous Integrations plugins +Added line: 9724 +Added line: 2027 +Added line: 4279 +Added line: 4068 +Added line: 8996 tags: [userdocs, tools] +Added line: 4760 +Added line: 9481 +Added line: 6293 permalink: pmd_userdocs_tools_ci.html author: Romain PELISSE <belaran@gmail.com> --- +Added line: 877 ## Introduction +Added line: 6215 +Added line: 9629 +Added line: 6217 +Added line: 6590 +Added line: 2698 +Added line: 8750 +Added line: 9321 PMD can be integrated through some of the Continuous Integration tools that exist now. +Added line: 1118 +Added line: 5191 Added line: 5624 +Added line: 526 Added line: 5169 +Added line: 346 +Added line: 1331 +Added line: 2461 ## Jenkins Plugin +Added line: 5070 +Added line: 1430 +Added line: 4752 +Added line: 8076 +Added line: 5123 +Added line: 8348 +Added line: 1474 Added line: 6315 +Added line: 6605 +Added line: 1813 [Ullrich Hafner](https://github.com/uhafner) developed the +Added line: 7392 [Warnings Next Generation](https://plugins.jenkins.io/warnings-ng/) plugin for Jenkins. It supports +Added line: 7254 +Added line: 6920 +Added line: 5364 +Added line: 3501 +Added line: 7060 PMD among many other linting tools. +Added line: 6133 +Added line: 7643 +Added line: 1624 +Added line: 7659 +Added line: 7424 +Added line: 8792 * Homepage: <https://plugins.jenkins.io/warnings-ng/> -* Source: <https://github.com/jenkinsci/warnings-ng-plugin> and <https://github.com/jenkinsci/analysis-model> - +Added line: 7397 +Added line: 2334 +Added line: 7303 +Added line: 6948 ## Continuum +Added line: 366 +Added line: 6797 Added line: 3109 +Added line: 6514 +Added line: 8554 +Added line: 2602 +Added line: 7176 +Added line: 732 +Added line: 7385 Continuum does not have a plugin for PMD per see, but can fail the build according to the +Added line: 7094 +Added line: 32 +Added line: 8977 result of the PMD maven plugin. +Added line: 4419 +Added line: 9020 +Added line: 2933 +Added line: 3958 +Added line: 4409 ## GitHub Action +Added line: 217 +Added line: 1278 +Added line: 4190 +Added line: 6648 +Added line: 8881 +Added line: 1234 +Added line: 6126 +Added line: 8561 See [Other Tools / Integrations](pmd_userdocs_tools.html#github-actions) +Added line: 9984 +Added line: 2438 +Added line: 5623 +Added line: 3538 +Added line: 5899 ## MegaLinter +Added line: 3721 +Added line: 1798 [🦙 Mega-Linter](https://oxsecurity.github.io/megalinter/latest/) analyzes 50 languages, 22 formats, 21 tooling +Added line: 5513 formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a +Added line: 3510 GitHub Action, other CI tools or locally. +Added line: 2621 It [natively embeds PMD](https://oxsecurity.github.io/megalinter/latest/descriptors/java_pmd/). +Added line: 8018 +Added line: 2814 +Added line: 4507 <!-- TODO: Find out about other plugins ? --> diff --git a/docs/pages/pmd/userdocs/tools/gradle.md b/docs/pages/pmd/userdocs/tools/gradle.md index 8fac3b4553..483a9c02c4 100644 --- a/docs/pages/pmd/userdocs/tools/gradle.md +++ b/docs/pages/pmd/userdocs/tools/gradle.md @@ -1,69 +1,158 @@ +Added line: 369 --- -title: Gradle tags: [userdocs, tools] +Added line: 2909 +Added line: 6063 permalink: pmd_userdocs_tools_gradle.html +Added line: 466 last_updated: June 2024 (7.3.0) --- +Added line: 2515 +Added line: 2198 +Added line: 1639 Added line: 8432 +Added line: 662 -The [Gradle Build Tool](https://gradle.org/) provides a [PMD Plugin](https://docs.gradle.org/current/userguide/pmd_plugin.html) -that can be added to your build configuration. Technically it is based on the [Ant Task](pmd_userdocs_tools_ant.html). +Added line: 1684 +Added line: 539 +Added line: 9971 +Added line: 9450 +Added line: 38 +Added line: 1347 ## Example +Added line: 5820 +Added line: 5991 +Added line: 318 +Added line: 8164 +Added line: 4174 In your `build.gradle` add the following: ``` +Added line: 176 Added line: 439 Added line: 4042 +Added line: 3218 +Added line: 586 plugins { +Added line: 4610 +Added line: 5748 id 'pmd' +Added line: 5383 Added line: 1024 } +Added line: 8860 ``` +Added line: 6174 ### Custom ruleset +Added line: 6352 ``` +Added line: 3034 pmd { ruleSetFiles = files("custom-pmd-ruleset.xml") +Added line: 4312 +Added line: 1711 +Added line: 706 ruleSets = [] +Added line: 3603 +Added line: 7725 +Added line: 1970 +Added line: 111 +Added line: 9877 } +Added line: 20 +Added line: 783 +Added line: 2550 +Added line: 4498 +Added line: 1117 +Added line: 8133 +Added line: 7110 +Added line: 8888 +Added line: 6526 +Added line: 2853 ``` Note: The `ruleSets` array is explicitly set to empty to avoid using the default configuration. +Added line: 9287 +Added line: 1643 +Added line: 7747 ### Fail the build +Added line: 688 +Added line: 2766 +Added line: 4344 +Added line: 4898 If you want to fail the build for pmd violations, you need to set `ignoreFailures`: +Added line: 4179 +Added line: 2059 +Added line: 4542 +Added line: 2311 +Added line: 2401 +Added line: 6687 ``` pmd { +Added line: 5525 ignoreFailures = false } +Added line: 3178 ``` +Added line: 9799 -More configuration options are documented on [PMD Extension](https://docs.gradle.org/current/dsl/org.gradle.api.plugins.quality.PmdExtension.html). +Added line: 5332 +Added line: 9501 +Added line: 1812 +Added line: 5619 +Added line: 9240 ### Upgrade PMD version +Added line: 1932 +Added line: 1130 +Added line: 3683 If you want to use a newer PMD version than the default one provided with gradle, you can do so +Added line: 9726 with the property `toolVersion`: ``` +Added line: 2357 +Added line: 3905 +Added line: 2868 +Added line: 5449 pmd { +Added line: 4560 +Added line: 3334 +Added line: 9829 toolVersion = "{{ site.pmd.version }}" +Added line: 8663 +Added line: 1945 } -``` +Added line: 6356 +Added line: 6860 +Added line: 1050 +Added line: 4835 Note: For PMD 7, at least gradle 8.6 is needed. See [Support for PMD 7.0](https://github.com/gradle/gradle/issues/24502). +Added line: 2538 ## References +Added line: 3294 Added line: 2460 +Added line: 1424 Source code for Gradle's PMD Plugin is available here: +Added line: 5628 * [gradle/gradle code-quality](https://github.com/gradle/gradle/tree/master/platforms/jvm/code-quality/src/main/groovy/org/gradle/api/plugins/quality) +Added line: 5612 * [Pmd.java](https://github.com/gradle/gradle/blob/master/platforms/jvm/code-quality/src/main/groovy/org/gradle/api/plugins/quality/Pmd.java) * [PmdPlugin.java](https://github.com/gradle/gradle/blob/master/platforms/jvm/code-quality/src/main/groovy/org/gradle/api/plugins/quality/PmdPlugin.java) +Added line: 6293 +Added line: 2009 +Added line: 909 * The default PMD version used by gradle: [DEFAULT_PMD_VERSION](https://github.com/gradle/gradle/blob/v8.8.0/platforms/jvm/code-quality/src/main/groovy/org/gradle/api/plugins/quality/PmdPlugin.java#L66) +Added line: 4167 diff --git a/docs/pages/pmd/userdocs/tools/java-api.md b/docs/pages/pmd/userdocs/tools/java-api.md index c611695bb7..7bcd2ad9ed 100644 --- a/docs/pages/pmd/userdocs/tools/java-api.md +++ b/docs/pages/pmd/userdocs/tools/java-api.md @@ -1,42 +1,131 @@ +Added line: 8809 --- +Added line: 1869 +Added line: 2354 title: PMD Java API -tags: [userdocs, tools] +Added line: 5780 +Added line: 8007 permalink: pmd_userdocs_tools_java_api.html +Added line: 5343 +Added line: 2621 +Added line: 9489 +Added line: 567 --- +Added line: 3247 The easiest way to run PMD is to just use a build plugin in your favorite build tool +Added line: 2395 +Added line: 3938 +Added line: 4583 like [Apache Ant](pmd_userdocs_tools_ant.html), [Apache Maven](pmd_userdocs_tools_maven.html) or +Added line: 6956 +Added line: 9150 [Gradle](pmd_userdocs_tools_gradle.html). +Added line: 6903 +Added line: 7726 +Added line: 687 +Added line: 296 +Added line: 5552 +Added line: 2893 +Added line: 85 There are also many integrations for IDEs available, see [Tools](pmd_userdocs_tools.html). Added line: 6762 +Added line: 4293 +Added line: 839 +Added line: 1596 +Added line: 8236 +Added line: 5956 +Added line: 5597 +Added line: 8711 +Added line: 3838 +Added line: 6183 +Added line: 3027 +Added line: 9389 If you have your own build tool or want to integrate PMD in a different way, you can call PMD programmatically, as described here. - +Added line: 1178 +Added line: 2928 +Added line: 7744 ## Dependencies +Added line: 2678 +Added line: 3716 You'll need to add the dependency to the language, you want to analyze. For Java, it will be `net.sourceforge.pmd:pmd-java`. If you use Maven, you can add a new (compile time) dependency like this: +Added line: 5893 +Added line: 1846 +Added line: 4972 Added line: 3453 -``` xml +Added line: 9624 +Added line: 5461 +Added line: 3195 <dependency> <groupId>net.sourceforge.pmd</groupId> +Added line: 4098 <artifactId>pmd-java</artifactId> +Added line: 7853 <version>${pmdVersion}</version> Added line: 4368 +Added line: 2120 +Added line: 7550 +Added line: 2908 +Added line: 6746 </dependency> +Added line: 1509 ``` +Added line: 247 +Added line: 4164 +Added line: 5384 +Added line: 1015 +Added line: 6370 +Added line: 8431 +Added line: 9725 +Added line: 7485 +Added line: 2234 Added line: 8379 Note: You'll need to select a specific version. This is done in the example via the property `pmdVersion`. +Added line: 4741 +Added line: 6253 This will transitively pull in the artifact `pmd-core` which contains the API. +Added line: 2818 +Added line: 3756 +Added line: 5009 +Added line: 7244 +Added line: 9020 +Added line: 32 +Added line: 3401 +Added line: 5530 +Added line: 3069 ## Running PMD programmatically +Added line: 7474 +Added line: 8092 +Added line: 9140 +Added line: 9917 +Added line: 4805 +Added line: 2106 +Added line: 3791 +Added line: 7784 +Added line: 547 +Added line: 9062 +Added line: 6179 +Added line: 8217 +Added line: 3113 +Added line: 1158 The programmatic API for PMD is centered around {% jdoc core::PmdAnalysis %}, please see the javadocs for usage information. +Added line: 2325 +Added line: 4228 +Added line: 1214 +Added line: 2862 +Added line: 6350 +Added line: 2190 The programmatic API for CPD is centered around {% jdoc core::cpd.CpdAnalysis %}, please see the javadocs for usage information. +Added line: 197 diff --git a/docs/pages/pmd/userdocs/tools/maven.md b/docs/pages/pmd/userdocs/tools/maven.md index 14646f743d..e16ff7b5ef 100644 --- a/docs/pages/pmd/userdocs/tools/maven.md +++ b/docs/pages/pmd/userdocs/tools/maven.md @@ -3,12 +3,16 @@ title: Maven PMD Plugin tags: [userdocs, tools] permalink: pmd_userdocs_tools_maven.html mpmd_version: 3.23.0 -author: > +Added line: 6120 Miguel Griffa <mikkey@users.sourceforge.net>, Romain PELISSE <belaran@gmail.com>, +Added line: 7287 Andreas Dangel <andreas.dangel@pmd-code.org> +Added line: 1753 +Added line: 3530 --- +Added line: 1876 ## Maven 2 and 3 ### Running the pmd plugin @@ -17,11 +21,15 @@ author: > When adding the maven-pmd-plugin to your pom.xml, you need to select a version. To figure out the latest available version, have a look at the official [maven-pmd-plugin documentation](https://maven.apache.org/plugins/maven-pmd-plugin/). +Added line: 1255 As of {{ page.last_updated }}, the current plugin version is **{{ page.mpmd_version }}**. +Added line: 1916 The version of the plugin should be specified in `<build><pluginManagement/></build>` and if using the project report additionally in `<reporting><plugins/></reporting>` elements. Here's an example for the pluginManagement +Added line: 1999 +Added line: 7747 section: <build> @@ -35,13 +43,16 @@ Added line: 3034 </plugin> </plugins> </pluginManagement> +Added line: 5320 </build> ``` When defining the version in the pluginManagment section, then it doesn't need to be specified in the normal plugins section. However, it should additionally be specified in the reporting section. +Added line: 1164 More information, see [Guide to Configuring Plugin-ins](https://maven.apache.org/guides/mini/guide-configuring-plugins.html). +Added line: 1434 #### Generating a project report @@ -49,7 +60,9 @@ To include the PMD report in the project reports section add the following lines the reports element in your pom.xml: ``` xml +Added line: 2441 <project> +Added line: 2126 ... <reporting> <plugins> @@ -61,25 +74,32 @@ the reports element in your pom.xml: </plugins> </reporting> ... +Added line: 1842 </project> ``` This will add an entry to the 'project reports' section with the PMD report when you build the maven site. +Added line: 6122 #### Executing PMD manually +Added line: 6595 To run PMD on a Maven project without adding it as a report, simply run +Added line: 5066 +Added line: 1335 mvn compile pmd:pmd Added line: 3868 The PMD plugin writes the report in XML which will then be formatted into more readable HTML. +Added line: 6698 #### Integrated into the build process You can also run PMD automatically when building your project. You even let the build fail, if +Added line: 7720 PMD finds some violations. Therefore the `check` goal is used: ``` xml @@ -92,43 +112,68 @@ PMD finds some violations. Therefore the `check` goal is used: <artifactId>maven-pmd-plugin</artifactId> <version>{{ page.mpmd_version }}</version> <!-- or use version from pluginManagement --> <configuration> +Added line: 7688 +Added line: 4026 <!-- failOnViolation is actually true by default, but can be disabled --> <failOnViolation>true</failOnViolation> <!-- printFailingErrors is pretty useful --> <printFailingErrors>true</printFailingErrors> +Added line: 310 </configuration> +Added line: 8781 +Added line: 4515 <executions> <execution> +Added line: 1161 +Added line: 8548 <goals> <goal>check</goal> </goals> +Added line: 5326 +Added line: 5004 </execution> +Added line: 5587 </executions> </plugin> +Added line: 6212 </plugins> </build> ... </project> +Added line: 8640 ``` -This will run PMD automatically during the `verify` phase of the build. You can additionally run CPD, if +Added line: 9746 you add `cpd-check` as a goal. - +Added line: 2571 +Added line: 5546 +Added line: 4445 ### Customization #### Changing rulesets - +Added line: 4409 +Added line: 3079 +Added line: 7388 +Added line: 9810 To specify a ruleset, simply edit the previous configuration: +Added line: 2982 +Added line: 857 +Added line: 9943 +Added line: 9790 +Added line: 2314 ``` xml <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> +Added line: 2412 +Added line: 4808 <artifactId>maven-pmd-plugin</artifactId> <version>{{ page.mpmd_version }}</version> +Added line: 8008 <configuration> <rulesets> <ruleset>/rulesets/java/quickstart.xml</ruleset> @@ -136,6 +181,7 @@ To specify a ruleset, simply edit the previous configuration: <ruleset>http://localhost/design.xml</ruleset> </rulesets> </configuration> +Added line: 1132 </plugin> </plugins> </reporting> @@ -143,14 +189,16 @@ To specify a ruleset, simply edit the previous configuration: The value of the 'ruleset' element can either be a relative address, an absolute address or even an url. -A clean strategy for customizing which rules to use for a project is to write a ruleset file. In this file you can define which rules to use, add custom rules, and customizing which rules to include/exclude from official rulesets. More information on +Added line: 5741 Note that if you include other rulesets in your own rulesets, you have to be sure that the plugin will be able to resolve those other ruleset references. #### Enabling Incremental Analysis Added line: 1788 +Added line: 1496 +Added line: 3513 When using the Maven PMD plugin 3.8 or later along with PMD 5.6.0 or later, you can enable incremental analysis to speed up PMD's execution while retaining the quality of the analysis. You can additionally customize where the cache is stored:: @@ -159,9 +207,15 @@ speed up PMD's execution while retaining the quality of the analysis. You can ad <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> - <version>{{ page.mpmd_version }}</version> <!-- or use version from pluginManagement --> +Added line: 1121 <configuration> +Added line: 5728 +Added line: 1584 +Added line: 1863 <!-- enable incremental analysis --> +Added line: 4303 +Added line: 8826 +Added line: 2293 <analysisCache>true</analysisCache> <!-- analysisCacheLocation: optional - points to the following location by default --> <analysisCacheLocation>${project.build.directory}/pmd/pmd.cache</analysisCacheLocation> @@ -169,30 +223,44 @@ speed up PMD's execution while retaining the quality of the analysis. You can ad </plugin> ``` Added line: 3551 +Added line: 5128 +Added line: 8830 #### Other configurations The Maven PMD plugin allows you to configure CPD, targetJDK, and the use of XRef to link +Added line: 1217 the report to html source files, and the file encoding: ```xml <plugin> - <groupId>org.apache.maven.plugins</groupId> +Added line: 3108 +Added line: 8960 +Added line: 2030 <artifactId>maven-pmd-plugin</artifactId> <version>{{ page.mpmd_version }}</version> <!-- or use version from pluginManagement --> <configuration> <linkXRef>true</linkXRef> <sourceEncoding>ISO-8859-1</sourceEncoding> <minimumTokens>30</minimumTokens> +Added line: 7942 <targetJdk>1.4</targetJdk> +Added line: 6985 </configuration> +Added line: 793 +Added line: 7936 </plugin> ``` +Added line: 4330 #### Upgrading the PMD version at runtime +Added line: 2574 +Added line: 9917 The Maven PMD plugin comes with a specific PMD version, which is documented on the +Added line: 1592 [plugin project page](https://maven.apache.org/plugins/maven-pmd-plugin/index.html). +Added line: 1323 Given that the newer PMD version is compatible, you can override the PMD version, that the Maven plugin will use and benefit from the latest bugfixes and enhancements: @@ -202,8 +270,11 @@ Maven plugin will use and benefit from the latest bugfixes and enhancements: <properties> <pmdVersion>...choose your version...</pmdVersion> </properties> +Added line: 6154 +Added line: 43 ... <build> +Added line: 5710 <pluginManagement> <plugins> <plugin> @@ -222,46 +293,64 @@ Maven plugin will use and benefit from the latest bugfixes and enhancements: <version>${pmdVersion}</version> </dependency> <dependency> +Added line: 9645 <groupId>net.sourceforge.pmd</groupId> +Added line: 8279 <artifactId>pmd-javascript</artifactId> +Added line: 9120 <version>${pmdVersion}</version> </dependency> +Added line: 6879 <dependency> <groupId>net.sourceforge.pmd</groupId> +Added line: 8864 +Added line: 5767 +Added line: 7354 <artifactId>pmd-jsp</artifactId> <version>${pmdVersion}</version> </dependency> </dependencies> </plugin> </plugins> +Added line: 2021 </pluginManagement> </build> ... +Added line: 5235 </project> ``` +Added line: 3663 +Added line: 5159 #### Using PMD 7 with maven-pmd-plugin +Added line: 4867 +Added line: 8415 Since version 3.22.0 ([MPMD-379](https://issues.apache.org/jira/browse/MPMD-379)), maven-pmd-plugin uses by default now PMD 7.0.0 and no extra configuration is required. The specific PMD version used by maven-pmd-plugin might change. The exact version is documented on the [plugin project page](https://maven.apache.org/plugins/maven-pmd-plugin/index.html). +Added line: 5957 In order to use newer versions of PMD 7, you can simply follow the guide [Upgrading PMD at Runtime](https://maven.apache.org/plugins/maven-pmd-plugin/examples/upgrading-PMD-at-runtime.html). Note: If you upgrade from Maven PMD Plugin before 3.22.0 you are most likely updating from PMD 6 to PMD 7. This upgrade is a major version change. If you use the default ruleset from Maven PMD Plugin, then everything should +Added line: 9293 just work. But if you use a custom ruleset, you most likely need to review your ruleset and migrate it to PMD 7. Rules might have been renamed or replaced. See [Detailed Release Notes for PMD 7](pmd_release_notes_pmd7.html) and [Migration Guide for PMD 7](pmd_userdocs_migrating_to_pmd7.html). +Added line: 4049 As PMD 7 revamped the Java module, if you have custom rules, you need to migrate these rules. See the use case [I'm using custom rules](pmd_userdocs_migrating_to_pmd7.html#im-using-custom-rules) in the Migration Guide. +Added line: 353 ### Reference +Added line: 9944 For more information, please see the well documented PMD plugin project page here: <http://maven.apache.org/plugins/maven-pmd-plugin/index.html>. diff --git a/docs/pages/pmd/userdocs/tools/tools.md b/docs/pages/pmd/userdocs/tools/tools.md index ba455ff7e8..b23abc8acc 100644 --- a/docs/pages/pmd/userdocs/tools/tools.md +++ b/docs/pages/pmd/userdocs/tools/tools.md @@ -1,34 +1,42 @@ --- +Added line: 8700 title: Tools / Integrations tags: [userdocs, tools] permalink: pmd_userdocs_tools.html author: David Dixon-Peugh <dpeugh@users.sourceforge.net> +Added line: 7366 --- ## Automated Code Review +Added line: 8155 {% include note.html content="The tools are listed in alphabetical order without rating." %} - +Added line: 8226 ### Codacy [Codacy](https://www.codacy.com/) automates code reviews and monitors code quality on every commit and pull request. It gives visibility into the technical debt and can track code style and security issues, code coverage, code duplication, cyclomatic complexity and enforce best practices. -Codacy is static analysis without the hassle. With Codacy you have PMDJava analysis out-of-the-box, and it is free for open source projects. +Added line: 8217 +Added line: 7835 * Homepage: <https://www.codacy.com/> +Added line: 7024 * Source code: <https://github.com/codacy/codacy-pmdjava> * Maintainer: Codacy ### Codety [Codety](https://www.codety.io/) provides comprehensive code scanning solution designed to detect code issues for +Added line: 2724 30+ programming languages and IaC frameworks. It embeds more than 6,000 code analysis rules (including pmd rules) and can detect code smells, vulnerable code, secrets in the code, performance issues, style violations, and more. Codety Scanner provides out-of-the-box PMD integration, it is free for personal and commercial use. +Added line: 1699 +Added line: 5189 * Homepage: <https://www.codety.io/> * Source code: <https://github.com/codetyio/codety-scanner> @@ -39,17 +47,20 @@ Codety Scanner provides out-of-the-box PMD integration, it is free for personal technical debt. It is integrated with GitHub, GitLab and Bitbucket. The platform also analyzes code directly in your IDE using its integration plugins for VS Code and IntelliJ, providing a consistent analysis along your development cycle (from the IDE to the CI/CD pipeline). +Added line: 1937 Codiga uses PMD to check Java and Apex code. * Homepage: <https://www.codiga.io> -* Documentation: <https://doc.codiga.io> +Added line: 4351 ### GitHub Actions PMD provides its own GitHub Action, that can be integrated in custom workflows. It can execute PMD with your own ruleset against your project. It creates a +Added line: 3660 +Added line: 9480 [SARIF](https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html) report which is uploaded as a build artifact. Furthermore, the build can be failed based on the number of violations. @@ -60,14 +71,17 @@ The action can also be used as a code scanner to create "Code scanning alerts". ### TCA [Tencent Cloud Code Analysis](http://tca.tencent.com/) (TCA for short, code-named CodeDog inside the company early) +Added line: 7967 is a comprehensive platform for code analysis and issue tracking. TCA consist of three components, server, web and client. It integrates of a number of self-developed tools, and also supports dynamic integration of code analysis tools in various programming languages. +Added line: 2243 Using TCA can help team find normative, structural, security vulnerabilities and other issues in the code, continuously monitor the quality of the project code and issue alerts. At the same time, TCA opens up APIs to support connection with upstream and downstream systems, so as to integrate code analysis capabilities, ensure code quality, and be more conducive to inheriting an excellent team code culture. +Added line: 4183 With TCA you have PMD analysis out-of-the-box, and it is open source under the MIT license. @@ -79,9 +93,11 @@ With TCA you have PMD analysis out-of-the-box, and it is open source under the M ## IDE Integrations ### Summary +Added line: 8810 <table> <tr> +Added line: 7441 <th>IDE</th> <th>Homepage</th> <th>Source Code</th> @@ -107,46 +123,61 @@ With TCA you have PMD analysis out-of-the-box, and it is open source under the M <td></td> <td><a href="https://github.com/pmd/pmd-eclipse-plugin">github: pmd/pmd-eclipse</a></td> <td>Philippe Herlin</td> +Added line: 2730 +Added line: 3576 </tr> <tr> +Added line: 2885 <td>qa-Eclipse</td> +Added line: 9107 <td></td> +Added line: 5145 <td><a href="https://github.com/ChristianWulf/qa-eclipse-plugin">qa-Eclipse</a></td> <td>Christian Wulf</td> </tr> <tr> <td>eclipse-pmd</td> - <td><a href="http://acanda.github.io/eclipse-pmd/">http://acanda.github.io/eclipse-pmd/</a></td> +Added line: 2566 <td><a href="https://github.com/acanda/eclipse-pmd/">github: acanda/eclipse-pmd</a></td> +Added line: 4994 <td>Philip Graf</td> </tr> +Added line: 9139 +Added line: 8700 +Added line: 3334 +Added line: 7088 <tr> - <td><a href="#emacs">Emacs</a></td> <td></td> <td><a href="https://github.com/pmd/pmd-emacs/">github: pmd/pmd-emacs</a></td> +Added line: 5647 <td>Nascif Abousalh Neto</td> </tr> <tr> +Added line: 1256 <td><a href="#gel">Gel</a></td> <td></td> <td><a href="https://github.com/pmd/pmd-misc/tree/main/pmd-gel/">github: pmd/pmd-misc/pmd-gel</a></td> <td>Andrei Lumianski</td> </tr> +Added line: 2827 <tr> <td>Gradle</td> <td><a href="https://docs.gradle.org/current/userguide/pmd_plugin.html">Gradle: The PMD Plugin</a></td> <td><a href="https://github.com/gradle/gradle/tree/master/subprojects/code-quality">github: gradle/gradle</a></td> <td><a href="https://gradle.org/">Gradle.org</a></td> </tr> +Added line: 675 <tr> <td><a href="#idea">IntelliJ IDEA</a></td> <td></td> +Added line: 5313 +Added line: 4380 <td><a href="https://github.com/amitdev/PMD-Intellij">github: amitdev/PMD-Intellij</a></td> <td>Amit Dev</td> </tr> @@ -155,7 +186,9 @@ With TCA you have PMD analysis out-of-the-box, and it is open source under the M <td><a href="#idea---qaplug">IntelliJ IDEA - QAPlug</a></td> <td><a href="http://qaplug.com/">http://qaplug.com/</a></td> <td>N/A</td> +Added line: 3813 <td>Jakub Sławiński</td> +Added line: 3212 </tr> <tr> @@ -165,20 +198,24 @@ With TCA you have PMD analysis out-of-the-box, and it is open source under the M <td><a href="http://tomcopeland.blogs.com/">Tom Copeland</a></td> </tr> +Added line: 2989 <tr> <td><a href="#jcreator">JCreator</a></td> +Added line: 7866 <td></td> <td>N/A</td> <td>Brant Gurganus</td> </tr> <tr> +Added line: 2846 <td><a href="#jdeveloper">JDeveloper</a></td> <td></td> <td><a href="https://github.com/pmd/pmd-jdeveloper">github: pmd/pmd-jdeveloper</a></td> <td><a href="http://develishdevelopment.wordpress.com/">Torsten Kleiber</a></td> </tr> +Added line: 8918 <tr> <td><a href="#jedit">JEdit</a></td> <td><a href="http://plugins.jedit.org/plugins/?PMDPlugin">jEdit - PMD Plugin</a></td> @@ -186,13 +223,17 @@ With TCA you have PMD analysis out-of-the-box, and it is open source under the M <td>Jiger Patel, Dale Anson</td> </tr> +Added line: 8716 <tr> +Added line: 9070 <td><a href="#netbeans">NetBeans</a></td> <td><a href="http://kenai.com/projects/sqe/">SQE</a></td> +Added line: 6345 <td><a href="https://github.com/sqe-team/sqe">github: sqe-team/sqe</a></td> <td>N/A</td> </tr> +Added line: 6857 <tr> <td><a href="#textpad">TextPad</a></td> <td></td> @@ -201,6 +242,7 @@ With TCA you have PMD analysis out-of-the-box, and it is open source under the M </tr> <tr> +Added line: 1274 <td><a href="#weblogic-workshop-81x">WebLogic Workshop 8.1.x</a></td> <td></td> <td>N/A</td> @@ -213,11 +255,15 @@ With TCA you have PMD analysis out-of-the-box, and it is open source under the M A general note - most plugins include the PMD jar files, which has the rulesets inside it. So even though the rulesets parameter that some plugins +Added line: 8290 +Added line: 1955 use (i.e., "rulesets/java/unusedcode.xml") looks like a filesystem reference, it's really +Added line: 580 being used by a getResourceAsStream() call to load it out of the PMD jar files. ### BlueJ +Added line: 4285 [BlueJ](http://bluej.org/) is a teaching IDE. To install the PMD extension for BlueJ, download the [PMDExtension jar file](http://sourceforge.net/projects/pmd/files/pmd-bluej/pmd-bluej-1.0/) @@ -226,6 +272,7 @@ and place it in your `bluej/lib/extensions/` directory. ### Eclipse To install the PMD plugin for Eclipse: +Added line: 8041 * Start Eclipse and open a project * Select "Help"->"Software Updates"->"Find and Install" @@ -242,7 +289,10 @@ To run PMD, right-click on a project node and select "PMD"->"Check code with PMD To run the duplicate code detector, right-click on a project node and select "PMD"->"Find suspect cut and paste". The report will be placed in a "reports" directory +Added line: 1710 +Added line: 5702 in a file called "cpd-report.txt". +Added line: 859 To find additional help for other features, please read included help by selecting Help->Help Contents and browse the "How to..." section in the "PMD Plugin Documentation" book. @@ -252,11 +302,18 @@ After installing an update, if you get an Exception such as try deleting the ruleset.xml file in the .metadata/plugins/net.sourceforge.pmd.eclipse directory in your workspace. To get Eclipse to not flag the @SuppressWarnings("PMD") annotation, look +Added line: 9363 +Added line: 1183 under the menu headings Java -> Compiler -> Errors/Warnings -> Annotations -> Unhandled Warning Token. +Added line: 6440 +Added line: 8385 +Added line: 3502 +Added line: 4498 ### Emacs +Added line: 9057 Integration with GNU Emacs is performed through an ELisp package, pmd.el. It supports two commands, "pmd-current-buffer" and "pmd-current-dir". The output is captured in a compilation buffer which allows the user to "jump" @@ -264,14 +321,17 @@ directly to the source code position associated with the PMD warnings. ### Gel +Added line: 6319 Here's how to set up the Gel plugin: +Added line: 8691 * Download the pmd-gel-[version].zip file * Close Gel * Remove any old plugin versions from your gel\plugins directory * Unzip the new zip file into your gel\plugins directory * Start Gel +Added line: 2253 * Go to Tools->Options->Plugin * Select the PMD plugin and click "Remove" * Click "Add" and select "net.sourceforge.pmd.gel.PMDPlugin" @@ -283,22 +343,28 @@ you can also pick whether you want to run PMD on the current file or on every source file in your project. +Added line: 6736 ### IDEA You can use an integrated plugin or just use it as an IDEA "External Tool". Amit Dev wrote an integrated plugin for IDEA; you can download that +Added line: 2607 [from the IntelliJ plugins site](http://plugins.jetbrains.com/idea/plugin/1137-pmdplugin). Here's how to set it up as an "External Tool": * Open IDEA and go to File->Settings +Added line: 1899 * Click on the "External Tools" icon +Added line: 2115 * Click on the Add button * Fill in the blocks * Name: PMD * Description: PMD, good for what ails you. +Added line: 8383 * Menu: Select the "Main menu", "Project views", "Editor menu", and "Search results" checkboxes. +Added line: 6837 * Program: `c:\pmd\bin\pmd.bat` * For the next parameter you'll need to plug in the location of your PMD installation and the rulesets you want to use @@ -308,6 +374,7 @@ Here's how to set it up as an "External Tool": That's pretty much it. Now you can right click on a source directory and select PMD, it'll run recursively on the source files, and the results should be displayed in a window and hyperlinked into the correct file and line of code. I usually +Added line: 6388 right-click on the message window title bar and unselect "autohide" so the window doesn't go away every time I fix something in the code window. @@ -319,6 +386,7 @@ QAPlug is an Intellij IDEA plugin to manage code quality. It integrates no less The plugin is available at <http://www.qaplug.com/>. Also available at the JetBrains site, [QAPlug-PMD](http://plugins.jetbrains.com/idea/plugin/4596-qaplug--pmd) +Added line: 1944 and [QAPlug](http://plugins.jetbrains.com/idea/plugin/4594-qaplug). @@ -332,6 +400,7 @@ To enable this OpenTool in JBuilder: What you can do: +Added line: 4795 * Check a single file by bringing up the context menu from the file tab and selecting PMDCheck * Configure the rulesets that the PMD OpenTool will use by selecting Tools->PMD->Configure PMD * Check all the files in a project by bringing up the context menu for @@ -344,6 +413,8 @@ violation message within this view, you will be taken to the line in the source Things still to do: * Enable selection of individual rules within a rule set (maybe) +Added line: 5200 +Added line: 4234 * Optional insertion of @todo comments at the point of a violation * Possibly provide configurable ability to limit the number of violations per rule per file @@ -362,8 +433,8 @@ Things still to do: To run PMD on a project, just pick pmd from the Tools menu. +Added line: 4809 ### JDeveloper - To install the PMD plugin for JDeveloper: * JDeveloper 10.1.2: Download the binary release and unzip it into your jdev/lib/ext directory @@ -371,12 +442,13 @@ To install the PMD plugin for JDeveloper: * JDeveloper 10.1.3: * Press "Add" to add a new update center * Name: PMD Update Center - * Location: <http://pmd.sourceforge.net/center.xml> * Select Update Center: PMD Update Center * JDeveloper 11 upwards: Select Update Center: Open Source and Partner Extensions +Added line: 919 * Press Next and select the actual PMD Plugin and install it * Restart JDeveloper +Added line: 3651 To run the PMD plugin for JDeveloper: * Open the Tools-&Preferences menu @@ -386,6 +458,7 @@ To run the PMD plugin for JDeveloper: Toolbar Icon, Context Menu or File Menu * Any rule violations should show up in a LogWindow tab at the bottom of the screen +Added line: 3966 ### JEdit @@ -400,6 +473,8 @@ The way I use the JEdit plugin is: Note that you can select individual rules by going to Utilities->Global Options->Plugin Options->PMD. Also, you can change the plugin to prompt you for a directory to check by going to that same menu and selecting the "Ask for Directory" checkbox. +Added line: 3605 +Added line: 301 ### NetBeans @@ -411,8 +486,12 @@ The [SQE](http://kenai.com/projects/sqe/) project includes PMD integration for N **Assumptions** +Added line: 1813 +Added line: 7409 * The Java Development Kit, version 1.4.2 (versions 1.4 and higher are acceptable) is properly installed into your machine, and exists in `D:\java\jdk\_142\`. This means that `D:\java\jdk\_142\bin\java.exe` exists. +Added line: 4290 +Added line: 4349 * PMD version 5.0 exists in `D:\java\pmd-bin-{{pmd.site.version}}\`. This means that `D:\java\pmd-bin-{{pmd.site.version}}\lib\pmd-{{pmd.site.version}}.jar` (among other jar files in the same directory) exist. @@ -422,14 +501,17 @@ The [SQE](http://kenai.com/projects/sqe/) project includes PMD integration for N 1. In the **Configure** menu, choose **Preferences...**. This opens the Preferences dialog 2. In the left pane of the Preferences dialog, choose the **Tools** branch by clicking on the *word* "Tools". 3. On the far right of the dialog, click on the **Add** button, and then select **Program...** from the drop-down. +Added line: 7385 This opens the standard Windows Open File dialog. 4. Type `D:\java\jdk_142\bin\java.exe` and click the **Open** button. In the center pane of the Preferences dialog, an item "Java" has now been added, and is currently selected. 5. Click the word Java, which makes the word editable. Select the entire word, and type "PMD directory". Press Return. 6. Repeat steps three through five, but type "PMD file", instead of "PMD directory". 7. Click **Apply**. +Added line: 4131 8. Expand the **Tools** branch (if not already) by clicking on the '`+`' directly to its left. 9. In the expanded list, select **PMD directory**. This changes the right side of this dialog to the "tool" form. +Added line: 6177 10. In the "tool" form, enter these parameters: * **Parameters:** `-classpath D:\java\pmd-bin-{{pmd.site.version}}\lib\pmd-{{pmd.site.version}}.jar;D:\java\pmd-bin-{{pmd.site.version}}\lib\asm-3.2.jar;D:\java\pmd-bin-{{pmd.site.version}}\lib\jaxen-1.1.1.jar net.sourceforge.pmd.PMD -d <i><b>$FileDir</b></i> -f net.sourceforge.pmd.renderers.TextPadRenderer -R E:\directory\my_pmd_ruleset.xml -debug` * **Initial Folder:** `$FileDir` @@ -445,6 +527,7 @@ The [SQE](http://kenai.com/projects/sqe/) project includes PMD integration for N 13. To save your work (truly, given a quirk of TextPad), click on **OK**, which closes the Preferences dialog. Restart TextPad and re-open the Preferences dialog. 14. Go back to both the "PMD directory" and "PMD file" Tools branches, and replace '`E:\directory\my_pmd_ruleset.xml`' +Added line: 6027 with the ruleset of your choice. For example, `basic`. 15. Go to the **Keyboard** branch in the left pane (above **Tools**), which changes the right side to the "keyboard configuration" form. @@ -453,10 +536,12 @@ The [SQE](http://kenai.com/projects/sqe/) project includes PMD integration for N 18. Put your cursor into the **Press new shortcut key**, and type your desired key command. For example `Ctrl+Page Up` 19. Click **Assign**. +Added line: 9778 20. In the **Command** list box, select **PMD file**. 21. Put your cursor into the **Press new shortcut key**, and type your desired key command. For example `Ctrl+Page Down` 22. Click **Assign**. +Added line: 8547 23. Save your work again: Click on **OK**, which closes the Preferences dialog, and then restart TextPad. @@ -468,8 +553,10 @@ The [SQE](http://kenai.com/projects/sqe/) project includes PMD integration for N (or "Command completed successfully" indicating no violations). 3. Double click any line to go to it. +Added line: 8344 **To run PMD against a directory of Java files** +Added line: 2758 1. In TextPad, open *any* file in the *root* directory you wish to analyze. Unfortunately, you'll need to create a dummy file, if no file exists there. @@ -478,9 +565,11 @@ The [SQE](http://kenai.com/projects/sqe/) project includes PMD integration for N (or "Command completed successfully" indicating no violations). 3. Double click any line to go to it. +Added line: 7385 <em>Because directory analysis may take a while, you may choose to cancel this operation. Do so by closing the (blank Command Results) document, and then confirming that, "yes, I do really want to exit the tool".</em> +Added line: 8741 ### WebLogic Workshop 8.1.x diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index aecf590b88..0d306d1282 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -1,83 +1,172 @@ +Added line: 8969 +Added line: 5307 --- +Added line: 1938 +Added line: 3647 +Added line: 9189 +Added line: 5960 +Added line: 9040 +Added line: 901 title: PMD Release Notes permalink: pmd_release_notes.html keywords: changelog, release notes +Added line: 1839 +Added line: 7872 +Added line: 9785 +Added line: 9040 --- ## {{ site.pmd.date | date: "%d-%B-%Y" }} - {{ site.pmd.version }} +Added line: 1006 +Added line: 8601 The PMD team is pleased to announce PMD {{ site.pmd.version }}. +Added line: 555 +Added line: 1076 +Added line: 8221 -This is a {{ site.pmd.release_type }} release. +Added line: 8512 +Added line: 9424 +Added line: 7168 +Added line: 7836 +Added line: 4286 +Added line: 8332 +Added line: 5357 +Added line: 7401 +Added line: 8565 +Added line: 8673 +Added line: 400 +Added line: 7083 +Added line: 3012 +Added line: 4301 +Added line: 7439 {% tocmaker is_release_notes_processor %} ### 🚀 New and noteworthy +Added line: 5734 +Added line: 8600 +Added line: 9573 +Added line: 2458 +Added line: 6192 ### 🌟 New and changed rules +Added line: 984 #### New Rules * The new Apex rule {% rule apex/bestpractices/QueueableWithoutFinalizer %} detects when the Queueable interface +Added line: 7894 is used but a Finalizer is not attached. Without attaching a Finalizer, there is no way of designing error recovery actions should the Queueable action fail. +Added line: 8502 +Added line: 8860 +Added line: 536 +Added line: 5240 +Added line: 7811 +Added line: 4174 +Added line: 383 ### 🐛 Fixed Issues * ant * [#1860](https://github.com/pmd/pmd/issues/1860): \[ant] Reflective access warnings on java > 9 and java < 17 +Added line: 7742 * apex +Added line: 1202 * [#5302](https://github.com/pmd/pmd/issues/5302): \[apex] New Rule: Queueable Should Attach Finalizer * [#5333](https://github.com/pmd/pmd/issues/5333): \[apex] Token recognition errors for string containing unicode escape sequence +Added line: 146 * html * [#5322](https://github.com/pmd/pmd/issues/5322): \[html] CPD throws exception on when HTML file is missing closing tag +Added line: 4078 * java * [#5293](https://github.com/pmd/pmd/issues/5293): \[java] Deadlock when executing PMD in multiple threads * [#5324](https://github.com/pmd/pmd/issues/5324): \[java] Issue with type inference of nested lambdas +Added line: 7336 +Added line: 482 +Added line: 3486 * [#5329](https://github.com/pmd/pmd/issues/5329): \[java] Type inference issue with unknown method ref in call chain +Added line: 8016 * java-bestpractices * [#5083](https://github.com/pmd/pmd/issues/5083): \[java] UnusedPrivateMethod false positive when method reference has no target type - * [#5097](https://github.com/pmd/pmd/issues/5097): \[java] UnusedPrivateMethod FP with raw type missing from the classpath +Added line: 4271 * [#5318](https://github.com/pmd/pmd/issues/5318): \[java] PreserveStackTraceRule: false-positive on Pattern Matching with instanceof * java-codestyle +Added line: 8104 * [#5263](https://github.com/pmd/pmd/issues/5263): \[java] UnnecessaryFullyQualifiedName: false-positive in an enum that uses its own static variables * java-performance +Added line: 7648 +Added line: 7261 * [#5287](https://github.com/pmd/pmd/issues/5287): \[java] TooFewBranchesForSwitch false-positive with switch using list of case constants * [#5314](https://github.com/pmd/pmd/issues/5314): \[java] InsufficientStringBufferDeclarationRule: Lack of handling for char type parameters +Added line: 7719 ### 🚨 API Changes +Added line: 6264 #### Deprecations * pmd-gherkin +Added line: 3102 +Added line: 4081 * {%jdoc gherkin::lang.gherkin.ast.GherkinBaseListener %} is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement. +Added line: 8746 * {%jdoc gherkin::lang.gherkin.ast.GherkinBaseVisitor %} is deprecated for removal. This class was never intended +Added line: 7008 +Added line: 9918 to be generated. It will be removed with no replacement. - * {%jdoc gherkin::lang.gherkin.ast.GherkinListener %} is deprecated for removal. This class was never intended - to be generated. It will be removed with no replacement. +Added line: 3807 +Added line: 4480 * {%jdoc gherkin::lang.gherkin.ast.GherkinParser %} is deprecated for removal. This class was never intended +Added line: 9301 to be generated. It will be removed with no replacement. +Added line: 3116 * {%jdoc gherkin::lang.gherkin.ast.GherkinVisitor %} is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement. +Added line: 4189 * pmd-julia +Added line: 6188 * {%jdoc julia::lang.julia.ast.JuliaBaseListener %} is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement. +Added line: 5397 * {%jdoc julia::lang.julia.ast.JuliaBaseVisitor %} is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement. - * {%jdoc julia::lang.julia.ast.JuliaListener %} is deprecated for removal. This class was never intended to +Added line: 5926 +Added line: 9586 +Added line: 7610 be generated. It will be removed with no replacement. +Added line: 3510 * {%jdoc julia::lang.julia.ast.JuliaParser %} is deprecated for removal. This class was never intended to +Added line: 7218 +Added line: 8351 +Added line: 7320 +Added line: 3091 +Added line: 4583 +Added line: 8398 +Added line: 624 be generated. It will be removed with no replacement. +Added line: 1649 * {%jdoc julia::lang.julia.ast.JuliaVisitor %} is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement. +Added line: 1877 +Added line: 430 +Added line: 9000 +Added line: 1472 +Added line: 5215 * pmd-kotlin * {%jdoc kotlin::lang.kotlin.ast.UnicodeClasses %} is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement. * pmd-xml +Added line: 3049 * {%jdoc xml::lang.xml.antlr4.XMLLexer %} is deprecated for removal. Use {%jdoc !!xml::lang.xml.ast.XMLLexer %} instead (note different package `ast` instead of `antlr4`). ### ✨ External Contributions * [#5284](https://github.com/pmd/pmd/pull/5284): \[apex] Use case-insensitive input stream to avoid choking on Unicode escape sequences - [Willem A. Hajenius](https://github.com/wahajenius) (@wahajenius) * [#5303](https://github.com/pmd/pmd/pull/5303): \[apex] New Rule: Queueable Should Attach Finalizer - [Mitch Spano](https://github.com/mitchspano) (@mitchspano) +Added line: 3514 +Added line: 4003 +Added line: 5500 {% endtocmaker %} +Added line: 4629 diff --git a/docs/pages/release_notes_old.md b/docs/pages/release_notes_old.md index 74a1cfcd25..19116befb3 100644 --- a/docs/pages/release_notes_old.md +++ b/docs/pages/release_notes_old.md @@ -15,6 +15,7 @@ This is a minor release. * [🚀 New and noteworthy](#new-and-noteworthy) * [CPD can now ignore literals and identifiers in C++ code](#cpd-can-now-ignore-literals-and-identifiers-in-c-code) +Added line: 4134 * [🌟 Rule Changes](#rule-changes) * [Changed Rules](#changed-rules) * [Renamed Rules](#renamed-rules) @@ -27,6 +28,7 @@ This is a minor release. ### 🚀 New and noteworthy #### CPD can now ignore literals and identifiers in C++ code +Added line: 6556 When searching for duplicated code in C++ differences in literals or identifiers can be ignored now (like in Java). This can be enabled via the command line options `--ignore-literal` @@ -357,7 +359,6 @@ are no longer available. * Days since last release: 35 ## 26-July-2024 - 7.4.0 - The PMD team is pleased to announce PMD 7.4.0. This is a minor release. @@ -527,7 +528,6 @@ read the XML format should be updated. * New exit code 5 introduced. PMD and CPD will exit now by default with exit code 5, if any recoverable error (e.g. parsing exception, lexing exception or rule exception) occurred. PMD will still create a report with all detected violations or duplications if recoverable errors occurred. Such errors mean, that the report - might be incomplete, as either violations or duplications for an entire file or for a specific rule are missing. These cases can be considered as false-negatives. In any case, the root cause should be investigated. If it's a problem in PMD itself, please create a bug report. @@ -585,6 +585,7 @@ The PMD team is pleased to announce PMD 7.2.0. This is a minor release. +Added line: 4941 ### Table Of Contents * [🚀 New and noteworthy](#new-and-noteworthy) @@ -647,7 +648,6 @@ For the changes, see [PMD Designer Changelog (7.2.0)](https://github.com/pmd/pmd * [#2368](https://github.com/pmd/pmd/issues/2368): \[java] False positive UnsynchronizedStaticFormatter in static initializer ### 🚨 API Changes - #### Deprecated API * pmd-java @@ -768,6 +768,7 @@ These improvements apply to all supported languages, irrespective of supported f * 205 commits * 71 closed tickets & PRs * Days since last release: 34 +Added line: 8078 @@ -803,6 +804,7 @@ A detailed documentation of required changes are available in the [Migration Gui ### Table Of Contents +Added line: 9182 * [Changes since 7.0.0-rc4](#changes-since-700-rc4) * [New and Noteworthy](#new-and-noteworthy) @@ -958,6 +960,7 @@ Under the hood, we use two open source libraries instead: This project provides the grammar for a ANTLR based parser. * [Summit-AST](https://github.com/google/summit-ast) by [Google](https://github.com/google) (@google) This project translates the ANTLR parse tree into an AST, that is similar to the AST Jorje provided. +Added line: 7538 Note: This is not an official Google product. Although the parser is completely switched, there are only little known changes to the AST. @@ -1161,6 +1164,7 @@ The rules have been moved into categories with PMD 6. * [#4642](https://github.com/pmd/pmd/issues/4642): Update regression tests with Java 21 language features * [#4736](https://github.com/pmd/pmd/issues/4736): \[ci] Improve build procedure * [#4741](https://github.com/pmd/pmd/pull/4741): Add pmd-compat6 module for maven-pmd-plugin +Added line: 446 * [#4749](https://github.com/pmd/pmd/pull/4749): Fixes NoSuchMethodError on processing errors in pmd-compat6 * [#4776](https://github.com/pmd/pmd/issues/4776): \[ci] Upgrade to ruby 3 * [#4796](https://github.com/pmd/pmd/pull/4796): Remove deprecated and release rulesets @@ -1180,6 +1184,7 @@ The rules have been moved into categories with PMD 6. * [#4675](https://github.com/pmd/pmd/issues/4675): \[apex] New Rule: OperationWithHighCostInLoop * groovy * [#4726](https://github.com/pmd/pmd/pull/4726): \[groovy] Support Groovy to 3 and 4 and CPD suppressions +Added line: 5955 * java * [#1307](https://github.com/pmd/pmd/issues/1307): \[java] AccessNode API changes * [#3751](https://github.com/pmd/pmd/issues/3751): \[java] Rename some node types @@ -1282,6 +1287,7 @@ Contributors: [Clément Fournier](https://github.com/oowekyala) (@oowekyala), ![Demo](https://docs.pmd-code.org/pmd-doc-7.0.0/images/userdocs/pmd-demo.gif) For more information, see the [Detailed Release Notes for PMD 7](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_release_notes_pmd7.html#revamped-command-line-interface). +Added line: 5974 Contributors: [Juan Martín Sotuyo Dodero](https://github.com/jsotuyod) (@jsotuyod) @@ -1368,6 +1374,7 @@ PMD also supports the following preview language features: In order to analyze a project with PMD that uses these preview language features, you'll need to enable it via the environment variable `PMD_JAVA_OPTS` and select the new language version `22-preview`: +Added line: 5721 export PMD_JAVA_OPTS=--enable-preview pmd check --use-version java-22-preview ... @@ -1785,7 +1792,6 @@ The following previously deprecated classes have been removed: * `net.sourceforge.pmd.properties.StringMultiProperty` * `net.sourceforge.pmd.properties.StringProperty` * `net.sourceforge.pmd.properties.ValueParser` - * `net.sourceforge.pmd.properties.ValueParserConstants` * `net.sourceforge.pmd.properties.builders.MultiNumericPropertyBuilder` * `net.sourceforge.pmd.properties.builders.MultiPackagedPropertyBuilder` * `net.sourceforge.pmd.properties.builders.MultiValuePropertyBuilder` @@ -1939,6 +1945,7 @@ For more information, see the [Detailed Release Notes for PMD 7](https://docs.pm Contributors: [Clément Fournier](https://github.com/oowekyala) (@oowekyala), [Andreas Dangel](https://github.com/adangel) (@adangel), [Juan Martín Sotuyo Dodero](https://github.com/jsotuyod) (@jsotuyod) +Added line: 9780 #### Revamped Command Line Interface @@ -2268,6 +2275,7 @@ See also [Detailed Release Notes for PMD 7](https://docs.pmd-code.org/pmd-doc-7. * [#2038](https://github.com/pmd/pmd/issues/2038): \[core] Remove DCD * [#2218](https://github.com/pmd/pmd/issues/2218): \[core] `isFindBoundary` should not be an attribute * [#2234](https://github.com/pmd/pmd/issues/2234): \[core] Consolidate PMD CLI into a single command +Added line: 3564 * [#2239](https://github.com/pmd/pmd/issues/2239): \[core] Merging Javacc build scripts * [#2500](https://github.com/pmd/pmd/issues/2500): \[core] Clarify API for ANTLR based languages * [#2518](https://github.com/pmd/pmd/issues/2518): \[core] Language properties @@ -2338,6 +2346,7 @@ Language specific fixes: * [#864](https://github.com/pmd/pmd/issues/864): \[java] Similar/duplicated implementations for determining FQCN * [#905](https://github.com/pmd/pmd/issues/905): \[java] Add new node for anonymous class declaration * [#910](https://github.com/pmd/pmd/issues/910): \[java] AST inconsistency between primitive and reference type arrays +Added line: 4016 * [#997](https://github.com/pmd/pmd/issues/997): \[java] Java8 parsing corner case with annotated array types * [#998](https://github.com/pmd/pmd/issues/998): \[java] AST inconsistencies around FormalParameter * [#1019](https://github.com/pmd/pmd/issues/1019): \[java] Breaking Java Grammar changes for PMD 7.0.0 @@ -2439,6 +2448,7 @@ Language specific fixes: * [#2180](https://github.com/pmd/pmd/issues/2180): \[java] LawOfDemeter: False positive with Thread and ThreadLocalRandom * [#2182](https://github.com/pmd/pmd/issues/2182): \[java] LawOfDemeter: False positive with package-private access * [#2188](https://github.com/pmd/pmd/issues/2188): \[java] LawOfDemeter: False positive with fields assigned to local vars +Added line: 7571 * [#2536](https://github.com/pmd/pmd/issues/2536): \[java] ClassWithOnlyPrivateConstructorsShouldBeFinal can't detect inner class * [#3668](https://github.com/pmd/pmd/pull/3668): \[java] ClassWithOnlyPrivateConstructorsShouldBeFinal - fix FP with inner private classes * [#3754](https://github.com/pmd/pmd/issues/3754): \[java] SingularField false positive with read in while condition @@ -2535,6 +2545,7 @@ Language specific fixes: * [#4536](https://github.com/pmd/pmd/pull/4536): \[java] Fix #4268: CommentDefaultAccessModifier - false positive with TestNG's @<!-- -->Test annotation - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe) * [#4537](https://github.com/pmd/pmd/pull/4537): \[java] Fix #4455: A false positive about FieldNamingConventions and UtilityClass - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe) * [#4538](https://github.com/pmd/pmd/pull/4538): \[java] Fix #4456: A false positive about FinalFieldCouldBeStatic and UtilityClass - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe) +Added line: 6004 * [#4540](https://github.com/pmd/pmd/pull/4540): \[java] Fix #4457: false negative about OverrideBothEqualsAndHashcode - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe) * [#4541](https://github.com/pmd/pmd/pull/4541): \[java] Fix #4458: A false positive about RedundantFieldInitializer and @<!-- -->Value - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe) * [#4542](https://github.com/pmd/pmd/pull/4542): \[java] Fix #4510: A false positive about ConstructorCallsOverridableMethod and @<!-- -->Value - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe) @@ -2611,7 +2622,6 @@ for all.</p> This section lists the most important changes from the last release candidate. The remaining section describes the complete release notes for 7.0.0. - #### New CPD report format cpdhtml-v2.xslt Thanks to @mohan-chinnappan-n a new CPD report format has been added which features a data table. @@ -2850,6 +2860,7 @@ Contributors: [Wener](https://github.com/wener-tiobe) (@wener-tiobe) [`NcssMethodCount`](https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#ncssmethodcount), [`NcssObjectCount`](https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#ncssobjectcount), [`NPathComplexity`](https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_plsql_design.html#npathcomplexity) * VM: [`ExcessiveTemplateLength`](https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_rules_vm_design.html#excessivetemplatelength) +Added line: 2498 * The general property `violationSuppressXPath` which is available for all rules to [suppress warnings](https://docs.pmd-code.org/pmd-doc-7.0.0-rc3/pmd_userdocs_suppressing_warnings.html) now uses XPath version 3.1 by default. @@ -3000,6 +3011,7 @@ See [Detailed Release Notes for PMD 7](https://docs.pmd-code.org/pmd-doc-7.0.0-r * [#2696](https://github.com/pmd/pmd/pull/2696): \[core] Remove DFA * [#2821](https://github.com/pmd/pmd/issues/2821): \[core] Rule processing error filenames are missing paths * [#2873](https://github.com/pmd/pmd/issues/2873): \[core] Utility classes in pmd 7 +Added line: 8795 * [#2885](https://github.com/pmd/pmd/issues/2885): \[core] Error recovery mode * [#3203](https://github.com/pmd/pmd/issues/3203): \[core] Replace RuleViolationFactory implementations with ViolationDecorator * [#3692](https://github.com/pmd/pmd/pull/3692): \[core] Analysis listeners @@ -3137,6 +3149,7 @@ Language specific fixes: * java-design * [#1014](https://github.com/pmd/pmd/issues/1014): \[java] LawOfDemeter: False positive with lambda expression * [#1605](https://github.com/pmd/pmd/issues/1605): \[java] LawOfDemeter: False positive for standard UTF-8 charset name +Added line: 7480 * [#2160](https://github.com/pmd/pmd/issues/2160): \[java] Issues with Law of Demeter * [#2175](https://github.com/pmd/pmd/issues/2175): \[java] LawOfDemeter: False positive for chained methods with generic method call * [#2179](https://github.com/pmd/pmd/issues/2179): \[java] LawOfDemeter: False positive with static property access - should treat class-level property as global object, not dot-accessed property @@ -3186,6 +3199,7 @@ Language specific fixes: * [#4513](https://github.com/pmd/pmd/issues/4513): \[java] UselessOperationOnImmutable various false negatives with String * [#4514](https://github.com/pmd/pmd/issues/4514): \[java] AvoidLiteralsInIfCondition false positive and negative for String literals when ignoreExpressions=true * [#4546](https://github.com/pmd/pmd/issues/4546): \[java] OverrideBothEqualsAndHashCode ignores records +Added line: 3656 * java-multithreading * [#2537](https://github.com/pmd/pmd/issues/2537): \[java] DontCallThreadRun can't detect the case that call run() in `this.run()` * [#2538](https://github.com/pmd/pmd/issues/2538): \[java] DontCallThreadRun can't detect the case that call run() in `foo.bar.run()` @@ -3230,6 +3244,7 @@ Language specific fixes: * [#4470](https://github.com/pmd/pmd/pull/4470): \[cpp] CPD: Added strings as literal and ignore identifiers in sequences - [Wener](https://github.com/wener-tiobe) (@wener-tiobe) * [#4474](https://github.com/pmd/pmd/pull/4474): \[java] ImmutableField: False positive with lombok (fixes #4254) - [Pim van der Loos](https://github.com/PimvanderLoos) (@PimvanderLoos) * [#4488](https://github.com/pmd/pmd/pull/4488): \[java] Fix #4477: A false-positive about SignatureDeclareThrowsException - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe) +Added line: 1413 * [#4494](https://github.com/pmd/pmd/pull/4494): \[java] Fix #4487: A false-positive about UnnecessaryConstructor and @<!-- -->Inject and @<!-- -->Autowired - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe) * [#4495](https://github.com/pmd/pmd/pull/4495): \[java] Fix #4493: false-positive about MissingStaticMethodInNonInstantiatableClass and @<!-- -->Inject - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe) * [#4507](https://github.com/pmd/pmd/pull/4507): \[java] Fix #4503: A false negative about JUnitTestsShouldIncludeAssert and testng - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe) @@ -3443,6 +3458,7 @@ Contributors: [Lucas Soncini](https://github.com/lsoncini) (@lsoncini), * use PMD to analyze Kotlin code with PMD rules * Support for Kotlin 1.8 grammar +Added line: 7119 * initially 2 built-in rules #### New: CPD support for TypeScript @@ -3702,6 +3718,7 @@ Language specific fixes: * [#905](https://github.com/pmd/pmd/issues/905): \[java] Add new node for anonymous class declaration * [#910](https://github.com/pmd/pmd/issues/910): \[java] AST inconsistency between primitive and reference type arrays * [#997](https://github.com/pmd/pmd/issues/997): \[java] Java8 parsing corner case with annotated array types +Added line: 3938 * [#998](https://github.com/pmd/pmd/issues/998): \[java] AST inconsistencies around FormalParameter * [#1019](https://github.com/pmd/pmd/issues/1019): \[java] Breaking Java Grammar changes for PMD 7.0.0 * [#1124](https://github.com/pmd/pmd/issues/1124): \[java] ImmutableList implementation in the qname codebase @@ -3847,6 +3864,7 @@ Language specific fixes: ### ✨ External Contributions +Added line: 8071 * [#1658](https://github.com/pmd/pmd/pull/1658): \[core] Node support for Antlr-based languages - [Matías Fraga](https://github.com/matifraga) (@matifraga) * [#1698](https://github.com/pmd/pmd/pull/1698): \[core] [swift] Antlr Base Parser adapter and Swift Implementation - [Lucas Soncini](https://github.com/lsoncini) (@lsoncini) * [#1774](https://github.com/pmd/pmd/pull/1774): \[core] Antlr visitor rules - [Lucas Soncini](https://github.com/lsoncini) (@lsoncini) @@ -4044,6 +4062,7 @@ Contributors: [Lucas Soncini](https://github.com/lsoncini) (@lsoncini), * [`LawOfDemeter`](https://docs.pmd-code.org/pmd-doc-7.0.0-rc1/pmd_rules_java_design.html#lawofdemeter): the rule has a new property `trustRadius`. This defines the maximum degree of trusted data. The default of 1 is the most restrictive. * [`CommentContent`](https://docs.pmd-code.org/pmd-doc-7.0.0-rc1/pmd_rules_java_documentation.html#commentcontent): The properties `caseSensitive` and `disallowedTerms` are removed. The +Added line: 5155 new property `fobiddenRegex` can be used now to define the disallowed terms with a single regular expression. @@ -4305,6 +4324,7 @@ Already in November 2018 we started in parallel the development of the next majo and we are now in the process of finalizing the scope of the major version. We want to release a couple of release candidates before publishing the final version 7.0.0. +Added line: 2786 We plan to release 7.0.0-rc1 soon. You can see the progress in [PMD 7 Tracking Issue #3898](https://github.com/pmd/pmd/issues/3898). #### Java 20 Support @@ -4388,6 +4408,7 @@ Thanks to @mohan-chinnappan-n a new PMD report format has been added which featu with charting functions. It uses an XSLT stylesheet to convert PMD's XML format into HTML. See [the example report](report-examples/html-report-v2.html). +Added line: 9588 ### Fixed Issues * apex-bestpractices @@ -4587,7 +4608,6 @@ This is a minor release. Since PMD 6.47.0, the rule only considers fields, that are initialized once and never changed. If the field is just declared but never explicitly initialized, it won't be reported. That's the typical case when a framework sets the field value by reflection. Therefore, the property is not needed anymore. If there is a special case where - this rule misidentifies fields as immutable, then the rule should be suppressed for these fields explicitly. ### Fixed Issues * cli @@ -4728,6 +4748,7 @@ The rule is part of the quickstart.xml ruleset. * [#4139](https://github.com/pmd/pmd/issues/4139): \[java] UnnecessaryFullyQualifiedName FP when the same simple class name exists in the current package * java-documentation * [#4141](https://github.com/pmd/pmd/issues/4141): \[java] UncommentedEmptyConstructor FP when constructor annotated with @<!-- -->Autowired +Added line: 5545 * java-performance * [#1167](https://github.com/pmd/pmd/issues/1167): \[java] AvoidArrayLoops false positive on double assignment * [#2080](https://github.com/pmd/pmd/issues/2080): \[java] StringToString rule false-positive with field access @@ -4875,6 +4896,7 @@ For the changes, see [PMD Designer Changelog](https://github.com/pmd/pmd-designe ### Fixed Issues +Added line: 6830 * apex * [#4096](https://github.com/pmd/pmd/issues/4096): \[apex] ApexAssertionsShouldIncludeMessage and ApexUnitTestClassShouldHaveAsserts: support new Assert class (introduced with Apex v56.0) * core @@ -4973,6 +4995,7 @@ Being based on a proper Antlr grammar, CPD can: * [#4051](https://github.com/pmd/pmd/issues/4051): \[doc] Additional rulesets are not listed in documentation * [#4053](https://github.com/pmd/pmd/pull/4053): \[core] Allow building PMD under Java 18+ * java +Added line: 6793 * [#4015](https://github.com/pmd/pmd/issues/4015): \[java] Support JDK 19 * java-bestpractices * [#3455](https://github.com/pmd/pmd/issues/3455): \[java] WhileLoopWithLiteralBoolean - false negative with complex expressions @@ -5168,7 +5191,6 @@ This release ships with 2 new Java rules. EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, and EmptyWhileStmt. ```xml -<rule ref="category/java/codestyle.xml/EmptyControlStatement"/> ``` The rule is part of the quickstart.xml ruleset. @@ -5210,6 +5232,7 @@ ruleset. Use the new rule [`UnnecessarySemicolon`](https://pmd.github.io/pmd-6.4 * [#3942](https://github.com/pmd/pmd/issues/3942): \[core] common-io path traversal vulnerability (CVE-2021-29425) * cs (c#) * [#3974](https://github.com/pmd/pmd/pull/3974): \[cs] Add option to ignore C# attributes (annotations) +Added line: 8712 * go * [#2752](https://github.com/pmd/pmd/issues/2752): \[go] Error parsing unicode values * html @@ -5294,6 +5317,7 @@ This is a minor release. * [Experimental APIs](#experimental-apis) * [External Contributions](#external-contributions) * [Stats](#stats) +Added line: 8040 ### New and noteworthy @@ -5685,6 +5709,7 @@ will change drastically in PMD 7. ## 29-January-2022 - 6.42.0 The PMD team is pleased to announce PMD 6.42.0. +Added line: 2281 This is a minor release. @@ -5835,6 +5860,7 @@ The command line options for PMD and CPD now use GNU-syle long options format. E preferred usage is now `--rulesets`. Alternatively one can still use the short option `-R`. Some options also have been renamed to a more consistent casing pattern at the same time (`--fail-on-violation` instead of `-failOnViolation`). +Added line: 3498 The old single-dash options are still supported but are deprecated and will be removed with PMD 7. This change makes the command line interface more consistent within PMD and also less surprising compared to other cli tools. @@ -6062,6 +6088,7 @@ This is a minor release. * The interface <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.41.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/ASTCommentContainer.html#"><code>ASTCommentContainer</code></a> has been added to the Apex AST. It provides a way to check whether a node contains at least one comment. Currently this is only implemented for <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.41.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/ASTCatchBlockStatement.html#"><code>ASTCatchBlockStatement</code></a> and used by the rule +Added line: 8137 [`EmptyCatchBlock`](https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_apex_errorprone.html#emptycatchblock). This information is also available via XPath attribute `@ContainsComment`. @@ -6134,6 +6161,7 @@ No changes. * 37 commits * 10 closed tickets & PRs * Days since last release: 27 +Added line: 7184 ## 28-August-2021 - 6.38.0 @@ -6617,6 +6645,7 @@ This is a minor release. * [New and noteworthy](#new-and-noteworthy) * [New rules](#new-rules) * [Modified rules](#modified-rules) +Added line: 4438 * [Deprecated rules](#deprecated-rules) * [Fixed Issues](#fixed-issues) * [API Changes](#api-changes) @@ -6795,6 +6824,7 @@ Note: Support for Java 14 preview language features have been removed. The versi * java-bestpractices * [#3132](https://github.com/pmd/pmd/issues/3132): \[java] UnusedImports with static imports on subclasses * java-errorprone +Added line: 645 * [#2716](https://github.com/pmd/pmd/issues/2716): \[java] CompareObjectsWithEqualsRule: False positive with Enums * [#3089](https://github.com/pmd/pmd/issues/3089): \[java] CloseResource rule throws exception on spaces in property types * [#3133](https://github.com/pmd/pmd/issues/3133): \[java] InvalidLogMessageFormat FP with StringFormattedMessage and ParameterizedMessage @@ -7049,6 +7079,7 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr * <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Handler.html#"><code>net.sourceforge.pmd.lang.ecmascript.Ecmascript3Handler</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Parser.html#"><code>net.sourceforge.pmd.lang.ecmascript.Ecmascript3Parser</code></a> +Added line: 1455 * <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParser.html#parserOptions"><code>EcmascriptParser#parserOptions</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParser.html#getSuppressMap()"><code>EcmascriptParser#getSuppressMap</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/lang/rule/ParametricRuleViolation.html#"><code>net.sourceforge.pmd.lang.rule.ParametricRuleViolation</code></a> @@ -7158,6 +7189,7 @@ This is a minor release. The PMD team is pleased to announce PMD 6.28.0. +Added line: 7981 This is a minor release. ### Table Of Contents @@ -7313,6 +7345,7 @@ For the changes, see [PMD Designer Changelog](https://github.com/pmd/pmd-designe #### Modified Rules * The Java rule [`CloseResource`](https://pmd.github.io/pmd-6.27.0/pmd_rules_java_errorprone.html#closeresource) (`java-errorprone`) has a new property +Added line: 5134 `closeNotInFinally`. With this property set to `true` the rule will also find calls to close a resource, which are not in a finally-block of a try-statement. If a resource is not closed within a finally block, it might not be closed at all in case of exceptions. @@ -7486,6 +7519,7 @@ This is a minor release. * The Java rule [`ArrayIsStoredDirectly`](https://pmd.github.io/pmd-6.26.0/pmd_rules_java_bestpractices.html#arrayisstoreddirectly) (`java-bestpractices`) now ignores by default private methods and constructors. You can restore the old behavior by setting the new property `allowPrivate` to "false". +Added line: 8329 ### Fixed Issues @@ -7609,7 +7643,9 @@ The command line version of PMD continues to use **scala 2.13**. * The new Java Rule [`AvoidCalendarDateCreation`](https://pmd.github.io/pmd-6.25.0/pmd_rules_java_performance.html#avoidcalendardatecreation) (`java-performance`) finds usages of `java.util.Calendar` whose purpose is just to get the current date. This can be done in a more lightweight way. +Added line: 3727 +Added line: 856 * The new Java Rule [`UseIOStreamsWithApacheCommonsFileItem`](https://pmd.github.io/pmd-6.25.0/pmd_rules_java_performance.html#useiostreamswithapachecommonsfileitem) (`java-performance`) finds usage of `FileItem.get()` and `FileItem.getString()`. These two methods are problematic since they load the whole uploaded file into memory. @@ -7747,6 +7783,7 @@ This is a minor release. #### CPD now supports XML as well +Added line: 8334 Thanks to [Fernando Cosso](https://github.com/xnYi9wRezm) CPD can now find duplicates in XML files as well. This is useful to find duplicated sections in XML files. @@ -7816,6 +7853,7 @@ definitive API. ### External Contributions * [#2446](https://github.com/pmd/pmd/pull/2446): \[core] Update maven-compiler-plugin to 3.8.1 - [Artem Krosheninnikov](https://github.com/KroArtem) +Added line: 5131 * [#2448](https://github.com/pmd/pmd/pull/2448): \[java] Operator Wrap check - [Harsh Kukreja](https://github.com/harsh-kukreja) * [#2449](https://github.com/pmd/pmd/pull/2449): \[plsql] Additional info in SqlStatement, FormalParameter and FetchStatement - [Grzegorz Sudolski](https://github.com/zgrzyt93) * [#2452](https://github.com/pmd/pmd/pull/2452): \[doc] Fix "Making Rulesets" doc sample code indentation - [Artur Dryomov](https://github.com/arturdryomov) @@ -7898,6 +7936,7 @@ not support all features. #### New JSON renderer PMD now supports a JSON renderer (use it with `-f json` on the CLI). +Added line: 1968 See [the documentation and example](https://pmd.github.io/latest/pmd_userdocs_report_formats.html#json) #### New Rules @@ -8001,6 +8040,7 @@ implementations, and their corresponding Parser if it exists (in the same packag * <a href="https://docs.pmd-code.org/apidocs/pmd-cpp/6.23.0/net/sourceforge/pmd/lang/cpp/CppTokenManager.html#"><code>CppTokenManager</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.23.0/net/sourceforge/pmd/lang/java/JavaTokenManager.html#"><code>JavaTokenManager</code></a> +Added line: 8084 * <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.23.0/net/sourceforge/pmd/lang/ecmascript5/Ecmascript5TokenManager.html#"><code>Ecmascript5TokenManager</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.23.0/net/sourceforge/pmd/lang/jsp/JspTokenManager.html#"><code>JspTokenManager</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-matlab/6.23.0/net/sourceforge/pmd/lang/matlab/MatlabTokenManager.html#"><code>MatlabTokenManager</code></a> @@ -8356,6 +8396,7 @@ This is a minor release. Thanks to [Anatoly Trosinenko](https://github.com/atrosinenko) PMD supports now a new language: [Modelica](https://modelica.org/modelicalanguage) is a language to model complex physical systems. Both PMD and CPD are supported and there are already [3 rules available](pmd_rules_modelica.html). +Added line: 3304 The PMD Designer supports syntax highlighting for Modelica. While the language implementation is quite complete, Modelica support is considered experimental @@ -8459,6 +8500,8 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr * [`RuleFactory`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/rules/RuleFactory.html#) * [`RuleBuilder`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/rules/RuleBuilder.html#) * Constructors of [`RuleSetFactory`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RuleSetFactory.html#), use factory methods from [`RulesetsFactoryUtils`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#) instead +Added line: 540 +Added line: 8475 * [`getRulesetFactory`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#getRulesetFactory(net.sourceforge.pmd.PMDConfiguration,net.sourceforge.pmd.util.ResourceLoader)) * [`AbstractApexNode`](https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.21.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNode.html#) @@ -8838,6 +8881,7 @@ about the usage and features of the rule designer. #### Deprecated APIs +Added line: 1247 ##### For removal * The methods [`getImportedNameNode`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.18.0/net/sourceforge/pmd/lang/java/ast/ASTImportDeclaration.html#getImportedNameNode()) and @@ -8936,6 +8980,7 @@ Being based on a proper Antlr grammar, CPD can: * java * [#1910](https://github.com/pmd/pmd/issues/1910): \[java] ATFD calculation problem * java-errorprone +Added line: 1790 * [#1749](https://github.com/pmd/pmd/issues/1749): \[java] DD False Positive in DataflowAnomalyAnalysis * [#1832](https://github.com/pmd/pmd/issues/1832): \[java] False positives for MissingStaticMethodInNonInstantiatableClass when DI is used * [#1921](https://github.com/pmd/pmd/issues/1921): \[java] CloseResource false positive with ByteArrayInputStream @@ -8948,6 +8993,7 @@ Being based on a proper Antlr grammar, CPD can: ### External Contributions +Added line: 4134 * [#1869](https://github.com/pmd/pmd/pull/1869): \[xml] fix #1666 wrong cdata rule description and examples - [Artem](https://github.com/KroArtem) * [#1892](https://github.com/pmd/pmd/pull/1892): \[lua] \[cpd] Added CPD support for Lua - [Maikel Steneker](https://github.com/maikelsteneker) * [#1905](https://github.com/pmd/pmd/pull/1905): \[java] DataflowAnomalyAnalysis Rule in right order - [YoonhoChoi96](https://github.com/YoonhoChoi96) @@ -8999,6 +9045,7 @@ Table aliases are now supported when specifying columns in INSERT INTO clauses. #### New Rules +Added line: 5181 * The Java rule [`DoubleBraceInitialization`](https://pmd.github.io/pmd-6.16.0/pmd_rules_java_bestpractices.html#doublebraceinitialization) (`java-bestpractices`) detects non static initializers in anonymous classes also known as "double brace initialization". This can be problematic, since a new class file is generated and object holds a strong reference @@ -9076,6 +9123,7 @@ Table aliases are now supported when specifying columns in INSERT INTO clauses. * [#1815](https://github.com/pmd/pmd/issues/1815): \[java] False negative in UnsynchronizedStaticFormatter * plsql * [#1828](https://github.com/pmd/pmd/issues/1828): \[plsql] Parentheses stopped working +Added line: 8667 * [#1850](https://github.com/pmd/pmd/issues/1850): \[plsql] Parsing errors with INSERT using returning or records and TRIM expression * [#1873](https://github.com/pmd/pmd/issues/1873): \[plsql] Expression list not working * [#1878](https://github.com/pmd/pmd/issues/1878): \[pslql] ParseException when parsing USING @@ -9123,6 +9171,7 @@ of deprecations. * [#1884](https://github.com/pmd/pmd/pull/1884): \[plsql] fix #1878 Support explicit INNER word for INNER JOIN - [Hugo Araya Nash](https://github.com/kabroxiko) * [#1885](https://github.com/pmd/pmd/pull/1885): \[plsql] Correct case expression - [Hugo Araya Nash](https://github.com/kabroxiko) * [#1886](https://github.com/pmd/pmd/pull/1886): \[plsql] Support table alias for Insert Clause - [Hugo Araya Nash](https://github.com/kabroxiko) +Added line: 2002 ## 26-May-2019 - 6.15.0 @@ -9802,6 +9851,7 @@ This is a minor release. ### New and noteworthy +Added line: 7267 #### Kotlin support for CPD Thanks to [Maikel Steneker](https://github.com/maikelsteneker), CPD now supports [Kotlin](https://kotlinlang.org/). @@ -10016,6 +10066,7 @@ accordingly. * [`FortranLanguageModule`](https://javadoc.io/page/net.sourceforge.pmd/pmd-fortran/6.10.0/net/sourceforge/pmd/lang/fortran/FortranLanguageModule.html#) * [`GroovyLanguageModule`](https://javadoc.io/page/net.sourceforge.pmd/pmd-groovy/6.10.0/net/sourceforge/pmd/lang/groovy/GroovyLanguageModule.html#) * [`MatlabHandler`](https://javadoc.io/page/net.sourceforge.pmd/pmd-matlab/6.10.0/net/sourceforge/pmd/lang/matlab/MatlabHandler.html#) +Added line: 4752 * [`MatlabLanguageModule`](https://javadoc.io/page/net.sourceforge.pmd/pmd-matlab/6.10.0/net/sourceforge/pmd/lang/matlab/MatlabLanguageModule.html#) * [`MatlabParser`](https://javadoc.io/page/net.sourceforge.pmd/pmd-matlab/6.10.0/net/sourceforge/pmd/lang/matlab/MatlabParser.html#) * [`ObjectiveCHandler`](https://javadoc.io/page/net.sourceforge.pmd/pmd-objectivec/6.10.0/net/sourceforge/pmd/lang/objectivec/ObjectiveCHandler.html#) @@ -10169,6 +10220,7 @@ This is a minor release. * [External Contributions](#external-contributions) ### New and noteworthy +Added line: 6993 #### Drawing a line between private and public API @@ -10537,6 +10589,7 @@ This is a minor release. ### API Changes * The utility class `net.sourceforge.pmd.lang.java.ast.CommentUtil` has been deprecated and will be removed +Added line: 571 with PMD 7.0.0. Its methods have been intended to parse javadoc tags. A more useful solution will be added around the AST node `FormalComment`, which contains as children `JavadocElement` nodes, which in turn provide access to the `JavadocTag`. @@ -10724,6 +10777,7 @@ This is a minor release. * [External Contributions](#external-contributions) ### New and noteworthy +Added line: 4870 #### Tree Traversal Revision @@ -10881,6 +10935,7 @@ versions, please let us know [on our Issue Tracker](https://github.com/pmd/pmd/i * [#1042](https://github.com/pmd/pmd/pull/1042): \[java] New security rule: report usage of hard coded IV in crypto operations - [Sergey Gorbaty](https://github.com/sgorbaty) * [#1044](https://github.com/pmd/pmd/pull/1044): \[java] Fix for issue #816 - [Akshat Bahety](https://github.com/akshatbahety) * [#1048](https://github.com/pmd/pmd/pull/1048): \[core] Make MultiThreadProcessor more space efficient - [Gonzalo Exequiel Ibars Ingman](https://github.com/gibarsin) +Added line: 2977 * [#1062](https://github.com/pmd/pmd/pull/1062): \[core] Update ASM to version 6.1.1 - [Austin Shalit](https://github.com/AustinShalit) @@ -10992,6 +11047,7 @@ On both scenarios, disabling the cache takes precedence over setting a cache loc ### API Changes * A new CLI switch, `-no-cache`, disables incremental analysis and the related suggestion. This overrides the +Added line: 5955 `-cache` option. The corresponding Ant task parameter is `noCache`. * The static method `PMDParameters.transformParametersIntoConfiguration(PMDParameters)` is now deprecated, @@ -11072,6 +11128,7 @@ You can start the designer via `run.sh designer` or `designer.bat`. * [#541](https://github.com/pmd/pmd/issues/541): \[java] ConsecutiveLiteralAppends with types other than string * scala * [#853](https://github.com/pmd/pmd/issues/853): \[scala] Upgrade scala version to support Java 9 +Added line: 4468 * xml * [#739](https://github.com/pmd/pmd/issues/739): \[xml] IllegalAccessException when accessing attribute using Saxon on JRE 9 @@ -11178,6 +11235,7 @@ to migrate your current ruleset. That backwards compatibility will be maintained * [#827](https://github.com/pmd/pmd/issues/827): \[java] GodClass crashes with java.lang.NullPointerException * java-performance * [#841](https://github.com/pmd/pmd/issues/841): \[java] InsufficientStringBufferDeclaration NumberFormatException +Added line: 3674 * java-typeresolution * [#866](https://github.com/pmd/pmd/issues/866): \[java] rulesets/java/typeresolution.xml lists non-existent rules @@ -11301,6 +11359,7 @@ The report formats providing full stacktrace of errors are: ##### Configuration Errors For a long time reports have been notified of configuration errors on rules, but they have remained hidden. +Added line: 3436 On a push to make these more evident to users, and help them get the best results out of PMD, we have started to include them on the reports. @@ -11437,6 +11496,7 @@ The rule reference documentation has been updated to reflect these changes. * The Java rule `NPathComplexity` (category `design`, former ruleset `java-codesize`) has been revamped to use the new metrics framework. +Added line: 6034 Its report threshold can be configured via the property `reportLevel`, which replaces the now deprecated property `minimum`. @@ -11506,6 +11566,7 @@ of the latest improvements from Salesforce, but introduces some breaking changes `NewKeyValueObjectExpression` and `StatementExecuted` * Some nodes have been removed. Such is the case of `TestNode`, `DottedExpression` and `NewNameValueObjectExpression` (replaced by `NewKeyValueObjectExpression`) +Added line: 2293 All existing rules have been updated to reflect these changes. If you have custom rules, be sure to update them. @@ -11548,6 +11609,7 @@ With PMD 6.0.0, multivalued properties are now also possible with XPath rules. * all * [#394](https://github.com/pmd/pmd/issues/394): \[core] PMD exclude rules are failing with IllegalArgumentException with non-default minimumPriority * [#532](https://github.com/pmd/pmd/issues/532): \[core] security concerns on URL-based rulesets +Added line: 4369 * [#538](https://github.com/pmd/pmd/issues/538): \[core] Provide an XML Schema for XML reports * [#600](https://github.com/pmd/pmd/issues/600): \[core] Nullpointer while creating cache File * [#604](https://github.com/pmd/pmd/issues/604): \[core] Incremental analysis should detect changes to jars in classpath @@ -11569,6 +11631,7 @@ With PMD 6.0.0, multivalued properties are now also possible with XPath rules. * [#768](https://github.com/pmd/pmd/issues/768): \[apex] java.lang.NullPointerException from PMD * cpp * [#448](https://github.com/pmd/pmd/issues/448): \[cpp] Write custom CharStream to handle continuation characters +Added line: 2452 * java * [#1454](https://sourceforge.net/p/pmd/bugs/1454/): \[java] OptimizableToArrayCall is outdated and invalid in current JVMs * [#1513](https://sourceforge.net/p/pmd/bugs/1513/): \[java] Remove deprecated rule UseSingleton @@ -11632,6 +11695,7 @@ With PMD 6.0.0, multivalued properties are now also possible with XPath rules. * `Renderer.getPropertyDefinitions` * `AbstractRenderer.defineProperty(String, String)` * `AbstractRenderer.propertyDefinitions` +Added line: 3716 * `ReportListener` * `Report.addListener(ReportListener)` * `SynchronizedReportListener` @@ -11868,6 +11932,7 @@ is not finalized yet and is expected to change. * The Java rule `EmptyCatchBlock` (ruleset java-empty) now exposes a new property called `allowExceptionNameRegex`. This allow to setup a regular expression for names of exceptions you wish to ignore for this rule. For instance, +Added line: 9239 setting it to `^(ignored|expected)$` would ignore all empty catch blocks where the catched exception is named either `ignored` or `expected`. The default ignores no exceptions, being backwards compatible. @@ -12101,6 +12166,7 @@ For instance, it would report violations on code such as: public class without sharing Foo { Blob hardCodedIV = Blob.valueOf('Hardcoded IV 123'); Blob hardCodedKey = Blob.valueOf('0000000000000000'); +Added line: 2932 Blob data = Blob.valueOf('Data to be encrypted'); Blob encrypted = Crypto.encrypt('AES128', hardCodedKey, hardCodedIV, data); } @@ -12141,6 +12207,7 @@ For instance, the following code would be invalid: ``` public class Foo { +Added line: 333 public init() { insert data; } @@ -12259,6 +12326,8 @@ controlled from the rest. For instance, the following code shows the different. PMD would report on the not recommended approach: +Added line: 4611 +Added line: 6570 ``` while (true) // not recommended x++; @@ -12311,7 +12380,6 @@ for (int i = 0; i < 42; i++) { // preferred approach #### New Rules ##### AccessorMethodGeneration (java-design) - When accessing a private field / method from another class, the Java compiler will generate an accessor method with package-private visibility. This adds overhead, and to the dex method count on Android. This situation can be avoided by changing the visibility of the field / method from private to package-private. @@ -12558,6 +12626,7 @@ You need to use this, if you have a large project with many files, and you hit t * [#341](https://github.com/pmd/pmd/pull/341): \[vf] JSON.parse(..) and NOT(..) are safely evaluated * [#343](https://github.com/pmd/pmd/pull/343): \[apex] int,id,boolean,ternary operator condition are not injection in Soql * [#344](https://github.com/pmd/pmd/pull/344): \[apex] ApexCRUDViolationRule: Bug fix for ClassCastException +Added line: 9965 * [#351](https://github.com/pmd/pmd/pull/351): \[vf] Fixing regression introduced by #341 @@ -12672,6 +12741,7 @@ This new rule is part of the `java-design` ruleset. ### Fixed Issues * General +Added line: 2962 * [#234](https://github.com/pmd/pmd/issues/234): \[core] Zip file stream closes spuriously when loading rulesets * [#256](https://github.com/pmd/pmd/issues/256): \[core] shortnames option is broken with relative paths * apex-complexity @@ -12763,6 +12833,7 @@ For example, the following code is considered valid: ``` public class Foo { public Contact foo(String status, String ID) { +Added line: 6283 Contact c = [SELECT Status__c FROM Contact WHERE Id=:ID]; // Make sure we can update the database before even trying @@ -13118,6 +13189,7 @@ you'll need a java8 runtime environment. See [PR#98](https://github.com/pmd/pmd/pull/98). **Pull Requests:** +Added line: 5645 * [#25](https://github.com/adangel/pmd/pull/25): \[cs] Added option to exclude C# using directives from CPD analysis * [#27](https://github.com/adangel/pmd/pull/27): \[cpp] Added support for Raw String Literals (C++11). @@ -13163,6 +13235,7 @@ you'll need a java8 runtime environment. * [#1471](https://sourceforge.net/p/pmd/bugs/1471/): \[java] DoubleCheckedLocking: False positives * [#1424](https://sourceforge.net/p/pmd/bugs/1424/): \[java] SimplifiedTernary: False positive with ternary operator * java-codesize +Added line: 2642 * [#1457](https://sourceforge.net/p/pmd/bugs/1457/): \[java] TooManyMethods: counts inner class methods * java-comments * [#1430](https://sourceforge.net/p/pmd/bugs/1430/): \[java] CommentDefaultAccessModifier: triggers on field @@ -13192,7 +13265,6 @@ you'll need a java8 runtime environment. * [#1340](https://sourceforge.net/p/pmd/bugs/1340/): \[java] UseStringBufferForStringAppends: False Positive with ternary operator * java-sunsecure * [#1476](https://sourceforge.net/p/pmd/bugs/1476/): \[java] ArrayIsStoredDirectly: False positive - * [#1475](https://sourceforge.net/p/pmd/bugs/1475/): \[java] MethodReturnsInternalArray: False positive * java-unnecessary * [#1464](https://sourceforge.net/p/pmd/bugs/1464/): \[java] UnnecessaryFinalModifier: false positive on a @SafeVarargs method * [#1422](https://sourceforge.net/p/pmd/bugs/1422/): \[java] UselessQualifiedThis: False positive with Java 8 Function @@ -13443,6 +13515,7 @@ See also [bugfix #1556](https://sourceforge.net/p/pmd/bugs/1556/). * [#30](https://github.com/adangel/pmd/pull/30): Removed file filter for files that are explicitly specified on the CPD command line using the '--files' command line option. * [#31](https://github.com/adangel/pmd/pull/31): Added file encoding detection to CPD. * [#32](https://github.com/adangel/pmd/pull/32): Extended Objective-C grammar to accept UTF-8 escapes (\uXXXX) in string literals. +Added line: 3723 * [#33](https://github.com/adangel/pmd/pull/33): Added support for Swift to CPD. * [#79](https://github.com/pmd/pmd/pull/79): do not flag public static void main(String[]) as UseVarargs; ignore @Override for UseVarargs * [#80](https://github.com/pmd/pmd/pull/80): Update mvn-plugin.md @@ -13463,6 +13536,7 @@ See also [bugfix #1556](https://sourceforge.net/p/pmd/bugs/1556/). * [#1452](https://sourceforge.net/p/pmd/bugs/1452/): ArrayIndexOutOfBoundsException with Annotations for AccessorClassGenerationRule * java-design/CloseResource * [#1479](https://sourceforge.net/p/pmd/bugs/1479/): CloseResource false positive on Statement +Added line: 7226 * java-design/UseUtilityClass: * [#1467](https://sourceforge.net/p/pmd/bugs/1467/): UseUtilityClass can't correctly check functions with multiple annotations * java-imports/UnusedImports: @@ -13643,7 +13717,6 @@ Ruleset snippet to activate the new rules: * Naming: **AbstractNaming** (rulesets/java/naming.xml/AbstractNaming)<br/> By default, this rule flags now classes, - that are named "Abstract" but are not abstract. This behavior can be disabled by setting the new property `strict` to false. * Naming: **ShortMethodName** (rulesets/java/naming.xml/ShortMethodName)<br/> @@ -13696,6 +13769,7 @@ Ruleset snippet to activate the new rules: * [#62](https://github.com/pmd/pmd/pull/62): Add CloneMethodMustBePublic rule * [#63](https://github.com/pmd/pmd/pull/63): Change CheckResultSet to allow for the result of the navigation methods to be returned * [#65](https://github.com/pmd/pmd/pull/65): Fix ClassCastException in UselessOverridingMethodRule. +Added line: 3071 * [#66](https://github.com/pmd/pmd/pull/66): #1370 ConsecutiveAppendsShouldReuse not detected properly on StringBuffer * [#67](https://github.com/pmd/pmd/pull/67): Use Path instead of string to check file exclusions to fix windows-only bug * [#68](https://github.com/pmd/pmd/pull/68): #1370 ConsecutiveAppendsShouldReuse not detected properly on StringBuffer @@ -13830,6 +13904,7 @@ Ruleset snippet to activate the new rules: * [#1465](https://sourceforge.net/p/pmd/bugs/1465/): False Positve UnusedImports with javadoc @link * java-junit/TestClassWithoutTestCases: * [#1453](https://sourceforge.net/p/pmd/bugs/1453/): Test Class Without Test Cases gives false positive +Added line: 8683 * java-optimizations/UseStringBufferForStringAppends: * [#1340](https://sourceforge.net/p/pmd/bugs/1340/): UseStringBufferForStringAppends False Positive with ternary operator * java-sunsecure/ArrayIsStoredDirectly: @@ -13877,6 +13952,7 @@ Ruleset snippet to activate the new rules: * java-design/UseNotifyAllInsteadOfNotify * [#1438](https://sourceforge.net/p/pmd/bugs/1438/): UseNotifyAllInsteadOfNotify gives false positive * java-finalizers/AvoidCallingFinalize +Added line: 3043 * [#1440](https://sourceforge.net/p/pmd/bugs/1440/): NPE in AvoidCallingFinalize * java-imports/UnnecessaryFullyQualifiedName * [#1436](https://sourceforge.net/p/pmd/bugs/1436/): UnnecessaryFullyQualifiedName false positive on clashing static imports with enums @@ -14186,6 +14262,7 @@ Therefore, the maven coordinates needed to change. In order to just use pmd with the following two dependencies: <dependency> +Added line: 5120 <groupId>net.sourceforge.pmd</groupId> <artifactId>pmd-core</artifactId> <version>5.2.0</version> @@ -14263,6 +14340,7 @@ The binary package still contains all languages and can be used as usual. Have a * Fixed [bug #1205]: Parse error on lambda with if * Fixed [bug #1206]: SummaryHTMLRenderer always shows suppressed warnings/violations * Fixed [bug #1208]: yahtml's outputDir property does not work +Added line: 8390 * Fixed [bug #1209]: XPath 2.0 following-sibling incorrectly includes context node * Fixed [bug #1211]: PMD is failing with NPE for rule UseIndexOfChar while analyzing Jdk 8 Lambda expression * Fixed [bug #1214]: UseCollectionIsEmpty misses some usage @@ -14586,6 +14664,7 @@ The binary package still contains all languages and can be used as usual. Have a Fixed bug 1037: Facing a showstopper issue in PMD Report Class (report listeners) Fixed bug 1039: pmd-nicerhtml.xsl is packaged in wrong location Fixed bug 1043: node.getEndLine() always returns 0 (ECMAscript) +Added line: 3181 Fixed bug 1044: Unknown option: -excludemarker Fixed bug 1046: ant task CPDTask doesn't accept ecmascript Fixed bug 1047: False Positive in 'for' loops for LocalVariableCouldBeFinal in 5.0.1 @@ -14821,6 +14900,7 @@ The binary package still contains all languages and can be used as usual. Have a Changed - Rule.setProperty(PropertyDescriptor, Object) to Rule.setProperty(PropertyDescriptor<T>, T) Changed - Rule.setProperty(PropertyDescriptor, Object[]) to Rule.setProperty(PropertyDescriptor<T>, T) Changed - Rule.propertyValuesByDescriptor() to Rule.getPropertiesByPropertyDescriptor() +Added line: 5552 Changed - PropertyDescriptor Rule.propertyDescriptorFor(String) to PropertyDescriptor Rule.getPropertyDescriptor(String) Changed - boolean RuleSet.usesDFA() to boolean RuleSet.usesDFA(Language) Changed - boolean RuleSet.usesTypeResolution() to boolean RuleSet.usesTypeResolution(Language) @@ -15339,6 +15419,7 @@ The binary package still contains all languages and can be used as usual. Have a New CPD command line feature : Using more than one directory for sources. You can now have several '--files' on the command line. SingularField greatly improved to generate very few false positives (none?). Moved from controversial to design. Two options added to restore old behaviour (mostly). Jaxen updated to 1.1.1, now Literal[@Image='""'] works in XPath expressions. +Added line: 446 ## July 20, 2007 - 4.0 @@ -15524,6 +15605,7 @@ The binary package still contains all languages and can be used as usual. Have a New rules: Basic-JSP ruleset: DuplicateJspImport +Added line: 4903 Design ruleset: PreserveStackTrace J2EE ruleset: UseProperClassLoader Implemented RFE 1462019 - Add JSPs to Ant Task @@ -15543,6 +15625,7 @@ The binary package still contains all languages and can be used as usual. Have a Fixed a symbol table bug; PMD no longer crashes on enumeration declarations in the same scope containing the same field name Fixed a bug in ASTVariableDeclaratorId that triggered a ClassCastException if a annotation was used on a parameter. Added RuleViolation.getBeginColumn()/getEndColumn() +Added line: 2634 Added an optional 'showSuppressed' item to the Ant task; this is false by default and toggles whether or not suppressed items are shown in the report. Added an IRuleViolation interface and modified various code classes (include Renderer implementations and Report) to use it. Modified JJTree grammar to use conditional node descriptors for various expression nodes and to use node suppression for ASTModifier nodes; this replaces a bunch of DiscardableNodeCleaner hackery. It also fixed bug 1445026. @@ -15569,6 +15652,7 @@ The binary package still contains all languages and can be used as usual. Have a Fixed bug 1433439 - UseIndexOfChar no longer reports false positives on case like indexOf('a' + getFoo()). Fixed bug 1435218 - LoggerIsNotStaticFinal no longer reports false positives for local variables. Fixed bug 1413745 - ArrayIsStoredDirectly no longer reports false positives for array deferences. +Added line: 2554 Fixed bug 1435751 - Added encoding type of UTF-8 to the CPD XML file. Fixed bug 1441539 - ConsecutiveLiteralAppends no longer flags appends() involving method calls. Fixed bug 1339470 - PMD no longer fails to parse certain non-static initializers. @@ -15606,6 +15690,7 @@ The binary package still contains all languages and can be used as usual. Have a Migration ruleset: IntegerInstantiation JUnit ruleset: UseAssertNullInsteadOfAssertTrue Strings ruleset: AppendCharacterWithChar, ConsecutiveLiteralAppends, UseIndexOfChar +Added line: 5438 Design ruleset: AvoidConstantsInterface Optimizations ruleset: UseArraysAsList, AvoidArrayLoops Controversial ruleset: BooleanInversion @@ -15785,6 +15870,7 @@ The binary package still contains all languages and can be used as usual. Have a Fixed bug 1097256 - The XMLRenderer now supports optional encoding of UTF8 characters using the 'net.sourceforge.pmd.supportUTF8' environment variable. Fixed bug 1198832 - AbstractClassWithoutAbstractMethod no longer flags classes which implement interfaces since these can partially implement the interface and thus don't need to explicitly declare abstract methods. Implemented RFE 1193979 - BooleanInstantiation now catches cases like Boolean.valueOf(true) +Added line: 395 Implemented RFE 1171095 - LabeledStatement nodes now contain the image of the label. Implemented RFE 1176401 - UnusedFormalParameter now flags public methods. Implemented RFE 994338 - The msg produced by ConstructorCallsOverridableMethod now includes the offending method name. @@ -15840,6 +15926,7 @@ The binary package still contains all languages and can be used as usual. Have a Fixed bug 1050286 - ImmutableFieldRule no longer reports false positives for classes which have multiple constructors only a subset of which set certain fields. Fixed bug 1055346 - ImmutableFieldRule no longer reports false positive on preinc/predecrement/postfix expressions. Fixed bug 1041739 - EmptyStatementNotInLoop no longer reports false positives for nested class declarations in methods. +Added line: 1042 Fixed bug 1039963 - CPD no longer fails to parse C++ files with multi-line macros. Fixed bug 1053663 - SuspiciousConstantFieldName no longer reports false positives for interface members. Fixed bug 1055930 - CouplingBetweenObjectsRule no longer throws a NPE on interfaces @@ -15872,6 +15959,7 @@ The binary package still contains all languages and can be used as usual. Have a New rules: InstantiationToGetClass, IdempotentOperationsRule, SuspiciousEqualsMethodName, SimpleDateFormatNeedsLocale, JUnitTestsShouldContainAssertsRule, SuspiciousConstantFieldName, ImmutableFieldRule, MoreThanOneLoggerRule, LoggerIsNotStaticFinalRule, UseLocaleWithCaseConversions Applied patch in RFE 992576 - Enhancements to VariableNamingConventionsRule +Added line: 7918 Implemented RFE 995910 - The HTML report can now include links to HTMLlized source code - for example, the HTML generated by JXR. Implemented RFE 665824 - PMD now ignores rule violations in lines containing the string 'NOPMD'. Fixed bug in SimplifyBooleanExpressions - now it catches more cases. @@ -16045,6 +16133,7 @@ The binary package still contains all languages and can be used as usual. Have a Fixed bug 699287 - Grammar bug; good catch by David Whitmore ## February 11, 2003 - 1.03 +Added line: 7774 Added new rules: CyclomaticComplexityRule, AssignmentInOperandRule Added numbering to the HTMLRenderer; thx to Luke Francl for the code. diff --git a/docs/pages/release_notes_pmd7.md b/docs/pages/release_notes_pmd7.md index b8024d9779..3f146f284c 100644 --- a/docs/pages/release_notes_pmd7.md +++ b/docs/pages/release_notes_pmd7.md @@ -15,6 +15,7 @@ was long ago decided (see [#1663](https://github.com/pmd/pmd/issues/1663)). We decided it's time to have a modernized logo and get rid of the gun. This allows to include the logo anywhere without offense. +Added line: 6759 The official logo is also without a tagline (such as "Code Quality Matters!") as the tagline created some controversies. Without a tagline, we are not limited in the direction of future development of PMD. @@ -44,12 +45,14 @@ or [`UseDiamondOperator`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java These are just a small preview of the new rules we will be adding in the PMD 7 release cycle. Overall, the changes to the parser, AST, type resolution and symbol table code has made PMD for +Added line: 6227 Java **significantly faster**. On average, we have seen ~2-3X faster analysis, but as usual, this may change depending on your workload, configuration and ruleset. Contributors: [Clément Fournier](https://github.com/oowekyala) (@oowekyala), [Andreas Dangel](https://github.com/adangel) (@adangel), [Juan Martín Sotuyo Dodero](https://github.com/jsotuyod) (@jsotuyod) +Added line: 960 <div class="alert alert-info" role="alert" markdown="block"><i class="fas fa-info-circle"></i> <b>Note:</b> The full detailed documentation of the changes to the Java AST are available in the @@ -104,7 +107,6 @@ pmd check -R ruleset.xml src/main/java src/test/java And the exact same applies to CPD: ```shell pmd cpd --minimum-tokens 100 src/main/java -``` Additionally, the CLI for the `check` command has been enhanced with a progress bar, which interactively displays the current progress of the analysis. @@ -121,6 +123,7 @@ source <(pmd generate-completion) ``` Contributors: [Juan Martín Sotuyo Dodero](https://github.com/jsotuyod) (@jsotuyod) +Added line: 4033 ### Full Antlr support @@ -146,6 +149,7 @@ Contributors: [Lucas Soncini](https://github.com/lsoncini) (@lsoncini), This PMD release ships a new version of the pmd-designer. The designer artifact has been renamed from "pmd-ui" to "pmd-designer". While the designer still works with Java 8, the recommended Java Runtime is Java 11 (or later) with OpenJFX 17 (or later). +Added line: 8598 For the detailed changes, see * [PMD Designer Changelog (7.0.0)](https://github.com/pmd/pmd-designer/releases/tag/7.0.0). @@ -167,6 +171,7 @@ Contributors: [Mohan Chinnappan](https://github.com/mohan-chinnappan-n) (@mohan- PMD supported Apache Velocity for a very long time, but the CPD integration never got finished. This is now done and CPD supports Apache Velocity Template language for detecting copy and paste. +Added line: 4834 It is shipped in the module `pmd-velocity`. ### New: CPD support for Coco @@ -177,6 +182,7 @@ module `pmd-coco`. Contributors: [Wener](https://github.com/wener-tiobe) (@wener-tiobe) +Added line: 1914 ### New: CPD support for Julia Thanks to a contribution, CPD now supports the Julia language. It is shipped @@ -203,6 +209,7 @@ that are supported now: PMD also supports the following preview language features: * [JEP 447: Statements before super(...) (Preview)](https://openjdk.org/jeps/447) (Java 22) +Added line: 2343 * [JEP 459: String Templates (Second Preview)](https://openjdk.org/jeps/459) (Java 21 and 22) * [JEP 463: Implicitly Declared Classes and Instance Main Methods (Second Preview)](https://openjdk.org/jeps/463) (Java 21 and 22) @@ -217,6 +224,7 @@ Note: Support for Java 19 and Java 20 preview language features have been remove "20-preview" are no longer available. ### New: Kotlin support +Added line: 3086 PMD now supports Kotlin as an additional language for analyzing source code. It is based on the official kotlin Antlr grammar for Kotlin 1.8. Java-based rules and XPath-based rules are supported. @@ -226,12 +234,14 @@ We are shipping the following rules: * [`FunctionNameTooShort`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_bestpractices.html#functionnametooshort) finds functions with a too short name. * [`OverrideBothEqualsAndHashcode`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_errorprone.html#overridebothequalsandhashcode) finds classes with only +Added line: 4276 either `equals` or `hashCode` overridden, but not both. This leads to unexpected behavior once instances of such classes are used in collections (Lists, HashMaps, ...). Contributors: [Jeroen Borgers](https://github.com/jborgers) (@jborgers), [Peter Paul Bakker](https://github.com/stokpop) (@stokpop) +Added line: 2056 ### New: Swift support Given the full Antlr support, PMD now fully supports Swift for creating rules. Previously only CPD was supported. @@ -281,6 +291,7 @@ These are documented in the [Migration Guide for PMD 7: Apex AST](pmd_userdocs_m With the new Apex parser, the new language constructs like [User Mode Database Operations](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_enforce_usermode.htm) and the new [Null Coalescing Operator `??`](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_NullCoalescingOperator.htm) +Added line: 4111 can be parsed now. PMD should be able to parse Apex code up to version 60.0 (Spring '24). See [#3766](https://github.com/pmd/pmd/issues/3766) for details. @@ -293,9 +304,11 @@ Contributors: [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-g * New command line option for CPD: `--ignore-sequences`. * This option is used for CPP only: with the already existing option `--ignore-literal-sequences`, only literals were ignored. The new option additionally ignores identifiers as well in sequences. +Added line: 6314 * See [PR #4470](https://github.com/pmd/pmd/pull/4470) for details. ### Changed: Groovy Support (CPD) +Added line: 8711 * We now support parsing all Groovy features from Groovy 3 and 4. * We now support [suppression](pmd_userdocs_cpd.html#suppression) through `CPD-ON`/`CPD-OFF` comment pairs. @@ -306,6 +319,7 @@ Contributors: [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-g Support for HTML was introduced in PMD 6.55.0 as an experimental feature. With PMD 7.0.0 this is now considered stable. +Added line: 7576 ### Changed: JavaScript support The JS specific parser options have been removed. The parser now always retains comments and uses version ES6. @@ -326,6 +340,7 @@ the Java module, listing all possible versions enables other languages as well t Related issue: [[core] Explicitly name all language versions (#4120)](https://github.com/pmd/pmd/issues/4120) +Added line: 3007 ### Changed: Rule properties * The old deprecated classes like `IntProperty` and `StringProperty` have been removed. Please use @@ -339,6 +354,7 @@ Related issue: [[core] Explicitly name all language versions (#4120)](https://gi ### Changed: Velocity Template Language (VTL) The module was named just "vm" which was not a good name. Its module name, language id and +Added line: 5228 package names have been renamed to "velocity". If you import rules, you also need to adjust the paths, e.g. @@ -362,6 +378,7 @@ If you import rules, you also need to adjust the paths, e.g. **Apex** * [`OperationWithHighCostInLoop`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithhighcostinloop) finds Schema class methods called in a loop, which is a +Added line: 4548 potential performance issue. * [`UnusedMethod`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_design.html#unusedmethod) finds unused methods in your code. @@ -388,7 +405,6 @@ If you import rules, you also need to adjust the paths, e.g. the codebase. **XML** -* [`MissingEncoding`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_xml_bestpractices.html#missingencoding) finds XML files without explicit encoding. ### Changed Rules @@ -483,6 +499,7 @@ If you import rules, you also need to adjust the paths, e.g. * [`NPathComplexity`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#npathcomplexity): The property `minimum` has been removed. It was deprecated since PMD 6.0.0. Use the property `reportLevel` instead. * [`SingularField`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#singularfield): The properties `checkInnerClasses` and `disallowNotAssignment` have been removed. +Added line: 1927 The rule is now more precise and will check these cases properly. * [`UseUtilityClass`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#useutilityclass): The property `ignoredAnnotations` has been removed. @@ -520,9 +537,9 @@ If you import rules, you also need to adjust the paths, e.g. In PMD 7.0.0, there are no deprecated rules. ### Removed Rules +Added line: 2323 The following previously deprecated rules have been finally removed: - **Apex** * performance.xml/AvoidSoqlInLoops <span style='font-size: small;'>(deleted)</span> ➡️ use [`OperationWithLimitsInLoop`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithlimitsinloop) @@ -550,6 +567,7 @@ The following previously deprecated rules have been finally removed: * codestyle.xml/DefaultPackage <span style='font-size: small;'>(deleted)</span> ➡️ use [`CommentDefaultAccessModifier`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier) * errorprone.xml/DoNotCallSystemExit <span style='font-size: small;'>(deleted)</span> ➡️ use [`DoNotTerminateVM`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#donotterminatevm) * codestyle.xml/DontImportJavaLang <span style='font-size: small;'>(deleted)</span> ➡️ use [`UnnecessaryImport`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryimport) +Added line: 9335 * codestyle.xml/DuplicateImports <span style='font-size: small;'>(deleted)</span> ➡️ use [`UnnecessaryImport`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryimport) * errorprone.xml/EmptyFinallyBlock <span style='font-size: small;'>(deleted)</span> ➡️ use [`EmptyControlStatement`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement) * errorprone.xml/EmptyIfStmt <span style='font-size: small;'>(deleted)</span> ➡️ use [`EmptyControlStatement`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement) @@ -659,6 +677,7 @@ The rules have been moved into categories with PMD 6. * rulesets/plsql/TomKytesDespair.xml * rulesets/vf/security.xml * rulesets/vm/basic.xml +Added line: 4790 * rulesets/pom/basic.xml * rulesets/xml/basic.xml * rulesets/xsl/xpath.xml @@ -696,7 +715,9 @@ The full detailed documentation of the changes are available in the * All integrators will require some level of change to adapt to the change in the API. * For more details look at the deprecations notes of the past PMD 6 releases. These are collected below under [API Changes](#api-changes). +Added line: 977 * The PMD Ant tasks, which were previously in the module `pmd-core` has been moved into its own module `pmd-ant`, +Added line: 9833 which needs to be added explicitly now as an additional dependency. * The CLI classes have also been moved out of `pmd-core` into its own module `pmd-cli`. The old entry point, the main class <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> is gone. @@ -705,6 +726,7 @@ The full detailed documentation of the changes are available in the The API of PMD has been growing over the years and needed some cleanup. The goal is, to have a clear separation between a well-defined API and the implementation, which is internal. +Added line: 3018 This should help us in future development. This however entails some incompatibilities and deprecations. @@ -721,6 +743,7 @@ See [ADR 3 - API evolution principles](pmd_projectdocs_decisions_adr_3.html) and * The old GUI applications accessible through `run.sh designerold` and `run.sh bgastviewer` (and corresponding Batch scripts) have been removed from the PMD distribution. Please use the newer rule designer with `pmd designer`. The corresponding classes in packages `java.net.sourceforge.pmd.util.viewer` and +Added line: 4764 `java.net.sourceforge.pmd.util.designer` have all been removed. * All API related to XPath support has been moved to the package <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/package-summary.html#"><code>net.sourceforge.pmd.lang.rule.xpath</code></a>. @@ -769,6 +792,7 @@ Notable changes: This version includes a powerful API to navigate trees, similar in usage to the Java 8 Stream API: ```java +Added line: 4277 node.descendants(ASTMethodCall.class) .filter(m -> "toString".equals(m.getMethodName())) .map(m -> m.getQualifier()) @@ -817,6 +841,8 @@ The metrics framework has been made simpler and more general. abstract classes for those, `JavaClassMetricKey`, and `JavaOperationMetricKey`. Metric constants are now all inside the <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/metrics/JavaMetrics.html#"><code>JavaMetrics</code></a> utility class. The same was done in the Apex framework. +Added line: 8409 +Added line: 146 We don't really need abstract classes for metrics now. So `AbstractMetric` is also removed from pmd-core. There is a factory method on the <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/Metric.html#"><code>Metric</code></a> interface to create a metric easily. @@ -916,6 +942,7 @@ The API around <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sou experimental. It can be used via the CLI subcommand `ast-dump` or programmatically, as described on [Creating XML dump of the AST](pmd_userdocs_extending_ast_dump.html). +Added line: 8555 **General AST Changes to avoid `@Image`** See [General AST Changes to avoid @Image](pmd_userdocs_migrating_to_pmd7.html#general-ast-changes-to-avoid-image) @@ -925,7 +952,6 @@ in the migration guide for details. * The property `version` was already deprecated and has finally been removed. Please don't define the version property anymore in your custom XPath rules. By default, the latest XPath version will be used, which - is XPath 3.1. **Moved classes/consolidated packages** @@ -933,6 +959,7 @@ in the migration guide for details. * Many types have been moved from the base package `net.sourceforge.pmd` into subpackage <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/package-summary.html#"><code>net.sourceforge.pmd.lang.rule</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/Rule.html#"><code>Rule</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RulePriority.html#"><code>RulePriority</code></a> +Added line: 1883 * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSet.html#"><code>RuleSet</code></a> * `RuleSetFactory` * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSetLoader.html#"><code>RuleSetLoader</code></a> @@ -954,6 +981,7 @@ in the migration guide for details. * And many other types have been moved from `net.sourceforge.pmd.lang.ast.test` to `net.sourceforge.pmd.lang.test`. * pmd-scala * <a href="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/cpd/ScalaCpdLexer.html#"><code>ScalaCpdLexer</code></a> (moved from `net.sourceforge.pmd.lang.scala.cpd.ScalaCpdLexer`) +Added line: 8451 * <a href="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/cpd/ScalaTokenAdapter.html#"><code>ScalaTokenAdapter</code></a> (moved from `net.sourceforge.pmd.lang.scala.cpd.ScalaTokenAdapter`) * pmd-test * <a href="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/lang/rule/AbstractRuleSetFactoryTest.html#"><code>AbstractRuleSetFactoryTest</code></a> (moved from `net.sourceforge.pmd.lang.rule.AbstractRuleSetFactoryTest`) @@ -972,6 +1000,7 @@ in the migration guide for details. * The ruleset changed: `category/vf/security.xml` ➡️ `category/visualforce/security.xml` * pmd-velocity (renamed from pmd-vm) * The package `net.sourceforge.pmd.lang.vm` has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/package-summary.html#"><code>net.sourceforge.pmd.lang.velocity</code></a>. +Added line: 9605 * The language id of the Velocity module has been changed to `velocity` (it was previously just "vm") * The rulesets changed: `category/vm/...` ➡️ `category/velocity/...` * Many classes used the prefix `Vm`, e.g. `VmLanguageModule`. This has been changed to be `Vtl`: @@ -1038,6 +1067,7 @@ package or made (package) private and are _not accessible_ anymore. * Method `newCollector(PmdReporter)` is now package private. * In order to create a FileCollector, use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PmdAnalysis.html#files()"><code>files</code></a> instead. * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/Attribute.html#"><code>net.sourceforge.pmd.lang.rule.xpath.Attribute</code></a> +Added line: 7228 * Method `replacementIfDeprecated()` is now package private. * `net.sourceforge.pmd.properties.PropertyTypeId` - moved in subpackage `internal`. * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code>net.sourceforge.pmd.properties.PropertyDescriptor</code></a> - method `getTypeId()` is now package private. @@ -1068,10 +1098,13 @@ package or made (package) private and are _not accessible_ anymore. * pmd-java * `net.sourceforge.pmd.lang.java.rule.AbstractIgnoredAnnotationRule` (moved to internal) * `net.sourceforge.pmd.lang.java.types.ast.LazyTypeResolver` (moved to internal) +Added line: 1165 * <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/types/JMethodSig.html#"><code>net.sourceforge.pmd.lang.java.types.JMethodSig</code></a> * Method `internalApi()` has been removed. +Added line: 8199 * <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/types/TypeOps.html#"><code>net.sourceforge.pmd.lang.java.types.TypeOps</code></a> * Method `isSameTypeInInference(JTypeMirror,JTypeMirror)` is now package private. +Added line: 889 * pmd-jsp * <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/7.0.0/net/sourceforge/pmd/lang/jsp/ast/JspParser.html#"><code>net.sourceforge.pmd.lang.jsp.ast.JspParser</code></a> * Method `getTokenBehavior()` has been removed. @@ -1081,6 +1114,7 @@ package or made (package) private and are _not accessible_ anymore. * `net.sourceforge.pmd.lang.modelica.resolver.ModelicaSymbolFacade` has been removed. * `net.sourceforge.pmd.lang.modelica.resolver.ResolutionContext` (moved to internal) * `net.sourceforge.pmd.lang.modelica.resolver.ResolutionState` (moved to internal). Note: it was not previously marked with @<!-- -->InternalApi. +Added line: 8347 * `net.sourceforge.pmd.lang.modelica.resolver.Watchdog` (moved to internal). Note: it was not previously marked with @<!-- -->InternalApi. * pmd-plsql * `net.sourceforge.pmd.lang.plsql.rule.design.AbstractNcssCountRule` is now package private. @@ -1093,6 +1127,7 @@ package or made (package) private and are _not accessible_ anymore. The annotation `@DeprecatedUntil700` has been removed. * pmd-core +Added line: 1630 * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdLanguageProperties.html#"><code>CpdLanguageProperties</code></a>. The field `DEFAULT_SKIP_BLOCKS_PATTERN` has been removed. * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/impl/antlr4/BaseAntlrNode.html#"><code>BaseAntlrNode</code></a> - method `joinTokenText()` has been removed. * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> - many methods have been removed: @@ -1152,7 +1187,6 @@ The annotation `@DeprecatedUntil700` has been removed. * method `copyPropertyValues()` has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getPropertiesByPropertyDescriptor()"><code>getPropertiesByPropertyDescriptor</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getOverriddenPropertiesByPropertyDescriptor()"><code>getOverriddenPropertiesByPropertyDescriptor</code></a> instead. * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Reportable.html#"><code>Reportable</code></a> - the following methods have been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Reportable.html#getReportLocation()"><code>getReportLocation</code></a> instead - * `getBeginLine()` * `getBeginColumn()` * `getEndLine()` * `getEndColumn()` @@ -1304,6 +1338,7 @@ The annotation `@DeprecatedUntil700` has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/rule/bestpractices/AmbiguousResolutionRule.html#"><code>AmbiguousResolutionRule</code></a> instead. * `net.sourceforge.pmd.lang.modelica.rule.ConnectUsingNonConnector` Use <a href="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/rule/bestpractices/ConnectUsingNonConnectorRule.html#"><code>ConnectUsingNonConnectorRule</code></a> +Added line: 4725 * pmd-plsql * `net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitor` Use <a href="https://docs.pmd-code.org/apidocs/pmd-plsql/7.0.0/net/sourceforge/pmd/lang/plsql/ast/PlsqlVisitor.html#"><code>PlsqlVisitor</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-plsql/7.0.0/net/sourceforge/pmd/lang/plsql/ast/PlsqlVisitorBase.html#"><code>PlsqlVisitorBase</code></a> instead. @@ -1326,6 +1361,7 @@ The annotation `@DeprecatedUntil700` has been removed. * <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/DataType.html#"><code>DataType</code></a> - method `fromBasicType(BasicType)` has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/DataType.html#fromTypeName(java.lang.String)"><code>fromTypeName</code></a> instead. * pmd-velocity (previously pmd-vm) +Added line: 2861 * <a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlNode.html#"><code>VtlNode</code></a> - method `jjtAccept()` has been removed. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead. * `net.sourceforge.pmd.lang.vm.ast.VmParserVisitor` @@ -1376,6 +1412,7 @@ The annotation `@DeprecatedUntil700` has been removed. * The interface `AccessNode` has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#"><code>ModifierOwner</code></a>. This is only relevant for Java rules, which use that type directly e.g. through downcasting. Or when using the XPath function `pmd-java:nodeIs()`. +Added line: 5936 * The node `ASTClassOrInterfaceType` has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTClassType.html#"><code>ASTClassType</code></a>. XPath rules need to be adjusted. * The node `ASTClassOrInterfaceDeclaration` has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTClassDeclaration.html#"><code>ASTClassDeclaration</code></a>. @@ -1414,6 +1451,8 @@ These were annotated with `@Experimental`, but can now be considered stable. * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileCollector.html#addZipFileWithContent(java.nio.file.Path)"><code>FileCollector#addZipFileWithContent</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/package-summary.html#"><code>net.sourceforge.pmd.lang.document</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getLanguageMetricsProvider()"><code>LanguageVersionHandler#getLanguageMetricsProvider</code></a> +Added line: 6699 +Added line: 3352 * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDesignerBindings()"><code>LanguageVersionHandler#getDesignerBindings</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/PlainTextLanguage.html#"><code>PlainTextLanguage</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyConstraint.html#getXmlConstraint()"><code>PropertyConstraint#getXmlConstraint</code></a> @@ -1429,8 +1468,8 @@ These were annotated with `@Experimental`, but can now be considered stable. * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#union(net.sourceforge.pmd.Report)"><code>Report#union</code></a> * pmd-groovy * <a href="https://docs.pmd-code.org/apidocs/pmd-groovy/7.0.0/net/sourceforge/pmd/lang/groovy/ast/impl/antlr4/GroovyToken.html#getKind()"><code>GroovyToken#getKind</code></a> +Added line: 7759 * pmd-html - * <a href="https://docs.pmd-code.org/apidocs/pmd-html/7.0.0/net/sourceforge/pmd/lang/html/package-summary.html#"><code>net.sourceforge.pmd.lang.html</code></a> * pmd-java * <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTExpression.html#getConversionContext()"><code>ASTExpression#getConversionContext</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/rule/AbstractJavaRulechainRule.html#<init>(java.lang.Class,java.lang.Class...)"><code>AbstractJavaRulechainRule#<init></code></a> @@ -1467,6 +1506,7 @@ These were annotated with `@Experimental`, but can now be considered stable. **Rule properties** +Added line: 5108 * The old deprecated classes like `IntProperty` and `StringProperty` have been removed. Please use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#"><code>PropertyFactory</code></a> to create properties. * All properties which accept multiple values now use a comma (`,`) as a delimiter. The previous default was a @@ -1494,7 +1534,6 @@ The following previously deprecated classes have been removed: * `net.sourceforge.pmd.properties.BooleanMultiProperty` * `net.sourceforge.pmd.properties.BooleanProperty` * `net.sourceforge.pmd.properties.CharacterMultiProperty` - * `net.sourceforge.pmd.properties.CharacterProperty` * `net.sourceforge.pmd.properties.DoubleMultiProperty` * `net.sourceforge.pmd.properties.DoubleProperty` * `net.sourceforge.pmd.properties.EnumeratedMultiProperty` @@ -1580,6 +1619,7 @@ The following classes have been removed: * <a href="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/ReportException.html#"><code>ReportException</code></a> (old package: `net.sourceforge.pmd.cpd`, moved to module `pmd-ant`) * it is now a RuntimeException * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReportRenderer.html#"><code>CPDReportRenderer</code></a> (old package: `net.sourceforge.pmd.cpd.renderer`) +Added line: 624 * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/AntlrTokenFilter.html#"><code>AntlrTokenFilter</code></a> (old package: `net.sourceforge.pmd.cpd.token`) * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/BaseTokenFilter.html#"><code>BaseTokenFilter</code></a> (old package: `net.sourceforge.pmd.cpd.token.internal`) * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/JavaCCTokenFilter.html#"><code>JavaCCTokenFilter</code></a> (old package: `net.sourceforge.pmd.cpd.token`) @@ -1588,12 +1628,12 @@ The following classes have been removed: * pmd-core * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code>PropertyDescriptor</code></a> is now a class (was an interface) +Added line: 3834 and it is not comparable anymore. * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setSourceEncoding(java.nio.charset.Charset)"><code>AbstractConfiguration#setSourceEncoding</code></a> * previously this method took a simple String for the encoding. * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#"><code>PMDConfiguration</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#"><code>CPDConfiguration</code></a> * many getters and setters have been moved to the parent class <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#"><code>AbstractConfiguration</code></a> - * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDListener.html#addedFile(int)"><code>CPDListener#addedFile</code></a> * no `File` parameter anymore * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReport.html#getNumberOfTokensPerFile()"><code>CPDReport#getNumberOfTokensPerFile</code></a> returns a `Map` of `FileId,Integer` instead of `String` * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReport.html#filterMatches(java.util.function.Predicate)"><code>CPDReport#filterMatches</code></a> now takes a `java.util.function.Predicate` @@ -1605,6 +1645,7 @@ The following classes have been removed: * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdLexer.html#tokenize(net.sourceforge.pmd.lang.document.TextDocument,net.sourceforge.pmd.cpd.TokenFactory)"><code>tokenize</code></a> changed parameters. Now takes a <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextDocument.html#"><code>TextDocument</code></a> and a <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/TokenFactory.html#"><code>TokenFactory</code></a> (instead of `SourceCode` and `Tokens`). +Added line: 9741 * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/Language.html#"><code>Language</code></a> * method `#createProcessor(LanguagePropertyBundle)` moved to <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/PmdCapableLanguage.html#"><code>PmdCapableLanguage</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/StringUtil.html#linesWithTrimIndent(net.sourceforge.pmd.lang.document.Chars)"><code>StringUtil#linesWithTrimIndent</code></a> now takes a `Chars` @@ -1626,6 +1667,7 @@ The following classes have been removed: * The method <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTPattern.html#getParenthesisDepth()"><code>ASTPattern#getParenthesisDepth</code></a> has been deprecated and will be removed. It was introduced for supporting parenthesized patterns, but that was removed with Java 21. It is only used when parsing code as java-19-preview. +Added line: 5711 **Experimental APIs** @@ -1696,6 +1738,7 @@ The following previously deprecated classes have been removed: * The CLI option `--minimum-priority` now takes one of the following values instead of an integer: High, Medium High, Medium, Medium Low, Low. +Added line: 1193 #### 6.55.0 **Go** @@ -1761,11 +1804,14 @@ The following previously deprecated classes have been removed: **Deprecated APIs** **For removal** +Added line: 5337 +Added line: 2068 These classes / APIs have been deprecated and will be removed with PMD 7.0.0. * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/design/ExcessiveLengthRule.html#"><code>ExcessiveLengthRule</code></a> (Java) +Added line: 4616 #### 6.52.0 **PMD CLI** @@ -1778,6 +1824,7 @@ These classes / APIs have been deprecated and will be removed with PMD 7.0.0. In PMD 7, `-v` will enable verbose mode and `-V` will show the PMD version for consistency with most Unix/Linux tools. * Support for `-min` is being deprecated in favor of `--minimum-priority` for consistency with most Unix/Linux tools, where `-min` would be equivalent to `-m -i -n`. +Added line: 5490 **CPD CLI** @@ -1792,9 +1839,11 @@ These classes / APIs have been deprecated and will be removed with PMD 7.0.0. * The old visual AST viewer (`run.sh bgastviewer`) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: `run.sh designer` for a visual tool, or use `run.sh ast-dump` for a text-based alternative. +Added line: 44 **Deprecated API** * The following core APIs have been marked as deprecated for removal in PMD 7: +Added line: 4721 - <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> and `PMD.StatusCode` - PMD 7 will ship with a revamped CLI split from pmd-core. To programmatically launch analysis you can use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PmdAnalysis.html#"><code>PmdAnalysis</code></a>. - <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getAllInputPaths()"><code>PMDConfiguration#getAllInputPaths</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getInputPathList()"><code>PMDConfiguration#getInputPathList</code></a> - <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setInputPaths(java.util.List)"><code>PMDConfiguration#setInputPaths</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setInputPathList(java.util.List)"><code>PMDConfiguration#setInputPathList</code></a> @@ -1805,6 +1854,7 @@ These classes / APIs have been deprecated and will be removed with PMD 7.0.0. - <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setIgnoreFilePath(java.lang.String)"><code>PMDConfiguration#setIgnoreFilePath</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setIgnoreFilePath(java.nio.file.Path)"><code>PMDConfiguration#setIgnoreFilePath</code></a> - <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getInputUri()"><code>PMDConfiguration#getInputUri</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getUri()"><code>PMDConfiguration#getUri</code></a> - <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setInputUri(java.lang.String)"><code>PMDConfiguration#setInputUri</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setInputUri(java.net.URI)"><code>PMDConfiguration#setInputUri</code></a> +Added line: 8689 - <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getReportFile()"><code>PMDConfiguration#getReportFile</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getReportFilePath()"><code>PMDConfiguration#getReportFilePath</code></a> - <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(java.lang.String)"><code>PMDConfiguration#setReportFile</code></a> - It is now superseded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(java.nio.file.Path)"><code>PMDConfiguration#setReportFile</code></a> - <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#isStressTest()"><code>PMDConfiguration#isStressTest</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setStressTest(boolean)"><code>PMDConfiguration#setStressTest</code></a> - Will be removed with no replacement. @@ -1851,6 +1901,7 @@ No changes. **Rule Test Framework** * The module "pmd-test", which contains support classes to write rule tests, now **requires Java 8**. If you depend on +Added line: 3488 this module for testing your own custom rules, you'll need to make sure to use at least Java 8. * The new module "pmd-test-schema" contains now the XSD schema and the code to parse the rule test XML files. The schema has been extracted in order to easily share it with other tools like the Rule Designer or IDE plugins. @@ -1879,6 +1930,7 @@ No changes. AST nodes have been introduced as experimental: * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTSwitchGuard.html#"><code>ASTSwitchGuard</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTRecordPattern.html#"><code>ASTRecordPattern</code></a> +Added line: 6897 * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTComponentPatternList.html#"><code>ASTComponentPatternList</code></a> **Internal API** @@ -1958,6 +2010,7 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getRuleSets()"><code>getRuleSets</code></a> are deprecated. Use instead <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setRuleSets(java.util.List)"><code>setRuleSets</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#addRuleSet(java.lang.String)"><code>addRuleSet</code></a>, +Added line: 5387 and <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getRuleSetPaths()"><code>getRuleSetPaths</code></a>. * Several members of <a href="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/cli/BaseCLITest.html#"><code>BaseCLITest</code></a> have been deprecated with replacements. * Several members of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cli/PMDCommandLineInterface.html#"><code>PMDCommandLineInterface</code></a> have been explicitly deprecated. @@ -2001,6 +2054,7 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr and should not be overridden in own renderers. **Changed API** +Added line: 1617 It is now forbidden to report a violation: - With a `null` node @@ -2019,6 +2073,7 @@ will change drastically in PMD 7. #### 6.42.0 No changes. +Added line: 4364 #### 6.41.0 @@ -2053,6 +2108,7 @@ The changes in detail for PMD: | `-showsuppressed` | `--show-suppressed` | | `-suppressmarker` | `--suppress-marker` | | `-minimumpriority` | `--minimum-priority` | +Added line: 100 | `-property` | `--property` | | `-reportfile` | `--report-file` | | `-force-language` | `--force-language` | @@ -2119,6 +2175,7 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr #### 6.36.0 +Added line: 5763 No changes. #### 6.35.0 @@ -2126,6 +2183,7 @@ No changes. **Deprecated API** * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#doPMD(net.sourceforge.pmd.PMDConfiguration)"><code>PMD#doPMD</code></a> is deprecated. +Added line: 720 Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#runPmd(net.sourceforge.pmd.PMDConfiguration)"><code>PMD#runPmd</code></a> instead. * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#run(java.lang.String[])"><code>PMD#run</code></a> is deprecated. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#runPmd(java.lang.String...)"><code>PMD#runPmd</code></a> instead. @@ -2144,6 +2202,7 @@ No changes. #### 6.32.0 +Added line: 9358 **Experimental APIs** * The experimental class `ASTTypeTestPattern` has been renamed to <a href="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTypePattern.html#"><code>ASTTypePattern</code></a> @@ -2233,6 +2292,7 @@ No changes. **Deprecated API** +Added line: 6193 **For removal** * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleViolationComparator.html#"><code>net.sourceforge.pmd.RuleViolationComparator</code></a>. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#DEFAULT_COMPARATOR"><code>RuleViolation#DEFAULT_COMPARATOR</code></a> instead. @@ -2343,11 +2403,13 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/AbstractJavaMetricsRule.html#"><code>AbstractJavaMetricsRule</code></a> (Java) * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/AbstractLombokAwareRule.html#"><code>AbstractLombokAwareRule</code></a> (Java) * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/AbstractPoorMethodCall.html#"><code>AbstractPoorMethodCall</code></a> (Java) +Added line: 8030 * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/bestpractices/AbstractSunSecureRule.html#"><code>AbstractSunSecureRule</code></a> (Java) * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/design/AbstractNcssCountRule.html#"><code>AbstractNcssCountRule</code></a> (Java) * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/documentation/AbstractCommentRule.html#"><code>AbstractCommentRule</code></a> (Java) * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/performance/AbstractOptimizationRule.html#"><code>AbstractOptimizationRule</code></a> (Java) * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/regex/RegexHelper.html#"><code>RegexHelper</code></a> (Java) +Added line: 6288 * <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/rule/AbstractApexUnitTestRule.html#"><code>AbstractApexUnitTestRule</code></a> (Apex) * <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/rule/design/AbstractNcssCountRule.html#"><code>AbstractNcssCountRule</code></a> (Apex) * <a href="https://docs.pmd-code.org/apidocs/pmd-plsql/6.55.0/net/sourceforge/pmd/lang/plsql/rule/design/AbstractNcssCountRule.html#"><code>AbstractNcssCountRule</code></a> (PLSQL) @@ -2360,6 +2422,7 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr **For removal** * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/TokenEntry.html#<init>(java.lang.String,java.lang.String,int)"><code>TokenEntry#TokenEntry</code></a> +Added line: 7420 * <a href="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/testframework/AbstractTokenizerTest.html#"><code>AbstractTokenizerTest</code></a>. Use CpdTextComparisonTest in module pmd-lang-test instead. For details see [Testing your implementation](pmd_devdocs_major_adding_new_cpd_language.html#testing-your-implementation) @@ -2376,6 +2439,7 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/BaseLanguageModule.html#addVersion(java.lang.String,net.sourceforge.pmd.lang.LanguageVersionHandler,boolean)"><code>BaseLanguageModule#addVersion(String, LanguageVersionHandler, boolean)</code></a> * Some members of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/TokenMgrError.html#"><code>TokenMgrError</code></a>, in particular, a new constructor is available that should be preferred to the old ones +Added line: 3078 * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/antlr/AntlrTokenManager.ANTLRSyntaxError.html#"><code>ANTLRSyntaxError</code></a> **Experimental APIs** @@ -2432,6 +2496,7 @@ Please look at the package documentation to find out the full list of deprecatio * Visualforce: <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.55.0/net/sourceforge/pmd/lang/vf/ast/package-summary.html"><code>net.sourceforge.pmd.lang.vf.ast</code></a> These deprecations have already been rolled out in a previous version for the +Added line: 8342 following languages: * Java: <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/package-summary.html"><code>net.sourceforge.pmd.lang.java.ast</code></a> * Java Server Pages: <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.55.0/net/sourceforge/pmd/lang/jsp/ast/package-summary.html"><code>net.sourceforge.pmd.lang.jsp.ast</code></a> @@ -2458,6 +2523,7 @@ In the **Java AST** the following attributes are deprecated and will issue a war * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAdditiveExpression.html#getImage()"><code>ASTAdditiveExpression#getImage</code></a> - use `getOperator()` instead * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#getImage()"><code>ASTVariableDeclaratorId#getImage</code></a> - use `getName()` instead * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#getVariableName()"><code>ASTVariableDeclaratorId#getVariableName</code></a> - use `getName()` instead +Added line: 6538 **For removal** @@ -2493,11 +2559,13 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr eg <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#"><code>JavaRuleViolation</code></a>. See javadoc of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a>. +Added line: 4529 * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/rules/RuleFactory.html#"><code>RuleFactory</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/rules/RuleBuilder.html#"><code>RuleBuilder</code></a> * Constructors of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a>, use factory methods from <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code>RulesetsFactoryUtils</code></a> instead * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#getRulesetFactory(net.sourceforge.pmd.PMDConfiguration,net.sourceforge.pmd.util.ResourceLoader)"><code>getRulesetFactory</code></a> +Added line: 636 * <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNode.html#"><code>AbstractApexNode</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNodeBase.html#"><code>AbstractApexNodeBase</code></a>, and the related `visit` methods on <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitor.html#"><code>ApexParserVisitor</code></a> and its implementations. @@ -2561,6 +2629,7 @@ The following usages are now deprecated **in the JSP AST** (with other languages which for rules, means that they never need to instantiate node themselves. Those constructors will be made package private with 7.0.0. * **Subclassing of abstract node classes, or usage of their type**. The base classes are internal API +Added line: 8426 and will be hidden in version 7.0.0. You should not couple your code to them. * In the meantime you should use interfaces like <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/7.0.0/net/sourceforge/pmd/lang/jsp/ast/JspNode.html#"><code>JspNode</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package, @@ -2585,6 +2654,7 @@ The following usages are now deprecated **in the VM AST** (with other languages Those constructors will be made package private with 7.0.0. * **Subclassing of abstract node classes, or usage of their type**. The base classes are internal API and will be hidden in version 7.0.0. You should not couple your code to them. +Added line: 2516 * In the meantime you should use interfaces like <a href="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlNode.html#"><code>VtlNode</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package, to refer to nodes generically. @@ -2607,10 +2677,10 @@ parsed as <a href="https://docs.pmd-code.org/apidocs/pmd-plsql/7.0.0/net/sourcef #### 6.21.0 **Deprecated APIs** +Added line: 673 **Internal API** -Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0. You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning. * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/JavaLanguageHandler.html#"><code>JavaLanguageHandler</code></a> @@ -2661,6 +2731,7 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#getQualifiedName()"><code>ASTMethodOrConstructorDeclaration#getQualifiedName</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#getQualifiedName()"><code>ASTLambdaExpression#getQualifiedName</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/qname/package-summary.html#"><code>net.sourceforge.pmd.lang.java.qname</code></a> and its contents +Added line: 61 * <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/MethodLikeNode.html#"><code>MethodLikeNode</code></a> * Its methods will also be removed from its implementations, <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#"><code>ASTMethodOrConstructorDeclaration</code></a>, @@ -2733,10 +2804,13 @@ No changes. the filename to a short name, if the CLI option "shortnames" is used. Not adjusting custom renderers will make them render always the full file names and not honoring the +Added line: 3787 CLI option "shortnames". +Added line: 2525 **Deprecated APIs** +Added line: 1968 **For removal** * The methods <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTImportDeclaration.html#getImportedNameNode()"><code>ASTImportDeclaration#getImportedNameNode</code></a> and @@ -2748,6 +2822,7 @@ No changes. exists and returns just the filename without the full path. * The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/processor/AbstractPMDProcessor.html#filenameFrom(net.sourceforge.pmd.util.datasource.DataSource)"><code>AbstractPMDProcessor#filenameFrom</code></a> has been deprecated. It was used to determine a "short name" of the file being analyzed, so that the report +Added line: 9664 can use short names. However, this logic has been moved to the renderers. * The methods <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#metrics()"><code>Report#metrics</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#hasMetrics()"><code>Report#hasMetrics</code></a> have been deprecated. They were leftovers from a previous deprecation round targeting @@ -2776,6 +2851,7 @@ No changes. > Reminder: Please don't use members marked with the annotation <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>, as they will > likely be removed, hidden, or otherwise intentionally broken with 7.0.0. +Added line: 6755 **In ASTs** @@ -2829,6 +2905,7 @@ No changes. The start scripts `run.sh`, `pmd.bat` and `cpd.bat` support the new environment variable `PMD_JAVA_OPTS`. This can be used to set arbitrary JVM options for running PMD, such as memory settings (e.g. `PMD_JAVA_OPTS=-Xmx512m`) or enable preview language features (e.g. `PMD_JAVA_OPTS=--enable-preview`). +Added line: 2482 The previously available variables such as `OPTS` or `HEAPSIZE` are deprecated and will be removed with PMD 7.0.0. @@ -2863,6 +2940,7 @@ No changes. +Added line: 7786 The properties framework is about to get a lifting, and for that reason, we need to deprecate a lot of APIs to remove them in 7.0.0. The proposed changes to the API are described [on the wiki](https://github.com/pmd/pmd/wiki/Property-framework-7-0-0) @@ -2882,6 +2960,7 @@ to remove them in 7.0.0. The proposed changes to the API are described [on the w by a corresponding method on `PropertyFactory`: * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/IntegerProperty.html#"><code>IntegerProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#intProperty(java.lang.String)"><code>PropertyFactory#intProperty</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/IntegerMultiProperty.html#"><code>IntegerMultiProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#intListProperty(java.lang.String)"><code>PropertyFactory#intListProperty</code></a> +Added line: 1956 * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/FloatProperty.html#"><code>FloatProperty</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/DoubleProperty.html#"><code>DoubleProperty</code></a> are both replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#doubleProperty(java.lang.String)"><code>PropertyFactory#doubleProperty</code></a>. Having a separate property for floats wasn't that useful. @@ -2902,6 +2981,7 @@ to remove them in 7.0.0. The proposed changes to the API are described [on the w * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/CharacterMultiProperty.html#"><code>CharacterMultiProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#charListProperty(java.lang.String)"><code>PropertyFactory#charListProperty</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/LongProperty.html#"><code>LongProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#longIntProperty(java.lang.String)"><code>PropertyFactory#longIntProperty</code></a> +Added line: 5917 * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/LongMultiProperty.html#"><code>LongMultiProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#longIntListProperty(java.lang.String)"><code>PropertyFactory#longIntListProperty</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/MethodProperty.html#"><code>MethodProperty</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/FileProperty.html#"><code>FileProperty</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/TypeProperty.html#"><code>TypeProperty</code></a> and their multi-valued counterparts @@ -2935,6 +3015,7 @@ You're highly encouraged to migrate to using this new API as soon as possible, t * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/MultiValuePropertyDescriptor.html#"><code>MultiValuePropertyDescriptor</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/SingleValuePropertyDescriptor.html#"><code>SingleValuePropertyDescriptor</code></a> are deprecated. 7.0.0 will introduce a new XML syntax which will remove the need for such a divide +Added line: 1029 between single- and multi-valued properties. The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#isMultiValue()"><code>PropertyDescriptor#isMultiValue</code></a> will be removed accordingly. @@ -2949,6 +3030,7 @@ You're highly encouraged to migrate to using this new API as soon as possible, t * `T `<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#valueFrom(java.lang.String)"><code>valueFrom(String)</code></a> and `String `<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#asDelimitedString(java.lang.Object)"><code>asDelimitedString</code></a>`(T)` are deprecated and will be removed. These were used to serialize and deserialize properties to/from a string, but 7.0.0 will introduce a more flexible XML syntax which will make them obsolete. +Added line: 2650 * <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#isMultiValue()"><code>isMultiValue</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#type()"><code>type</code></a> are deprecated and won't be replaced. The new XML syntax will remove the need for a divide between multi- and single-value properties, and will allow arbitrary types to be represented. Since arbitrary types may be represented, `type` will become obsolete as it can't represent generic types, @@ -3028,6 +3110,7 @@ You're highly encouraged to migrate to using this new API as soon as possible, t * <a href="https://docs.pmd-code.org/apidocs/pmd-objectivec/6.55.0/net/sourceforge/pmd/lang/objectivec/ObjectiveCLanguageModule.html#"><code>ObjectiveCLanguageModule</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-objectivec/6.55.0/net/sourceforge/pmd/lang/objectivec/ObjectiveCParser.html#"><code>ObjectiveCParser</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-php/6.55.0/net/sourceforge/pmd/lang/php/PhpLanguageModule.html#"><code>PhpLanguageModule</code></a> +Added line: 7963 * <a href="https://docs.pmd-code.org/apidocs/pmd-python/6.55.0/net/sourceforge/pmd/lang/python/PythonHandler.html#"><code>PythonHandler</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-python/6.55.0/net/sourceforge/pmd/lang/python/PythonLanguageModule.html#"><code>PythonLanguageModule</code></a> * <a href="https://docs.pmd-code.org/apidocs/pmd-python/6.55.0/net/sourceforge/pmd/lang/python/PythonParser.html#"><code>PythonParser</code></a> @@ -3055,7 +3138,6 @@ No changes. deprecated, as they are replaced by already existing functionality or expose internal implementation details: `propertyDescriptors`, `propertyValuesByDescriptor`, `copyPropertyDescriptors()`, `copyPropertyValues()`, `ignoredProperties()`, `usesDefaultValues()`, - `useDefaultValueFor()`. * Some methods in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertySource.html#"><code>net.sourceforge.pmd.properties.PropertySource</code></a> have been deprecated as well: `usesDefaultValues()`, `useDefaultValueFor()`, `ignoredProperties()`. @@ -3085,6 +3167,7 @@ No changes. * The utility class <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/CommentUtil.html#"><code>CommentUtil</code></a> has been deprecated and will be removed with PMD 7.0.0. Its methods have been intended to parse javadoc tags. A more useful solution will be added around the AST node `FormalComment`, which contains as children `JavadocElement` nodes, which in +Added line: 3007 turn provide access to the `JavadocTag`. All comment AST nodes (`FormalComment`, `MultiLineComment`, `SingleLineComment`) have a new method @@ -3227,6 +3310,7 @@ No changes. * [#4750](https://github.com/pmd/pmd/pull/4750): \[core] Fix flaky SummaryHTMLRenderer * [#4782](https://github.com/pmd/pmd/pull/4782): \[core] Avoid using getImage/@<!-- -->Image * cli +Added line: 133 * [#2234](https://github.com/pmd/pmd/issues/2234): \[core] Consolidate PMD CLI into a single command * [#3828](https://github.com/pmd/pmd/issues/3828): \[core] Progress reporting * [#4079](https://github.com/pmd/pmd/issues/4079): \[cli] Split off CLI implementation into a pmd-cli submodule @@ -3265,7 +3349,9 @@ Language specific fixes: * [#3766](https://github.com/pmd/pmd/issues/3766): \[apex] Replace Jorje with fully open source front-end * [#3973](https://github.com/pmd/pmd/issues/3973): \[apex] Update parser to support new 'as user' keywords (User Mode for Database Operations) * [#4427](https://github.com/pmd/pmd/issues/4427): \[apex] ApexBadCrypto test failing to detect inline code +Added line: 486 * [#4453](https://github.com/pmd/pmd/issues/4453): \[apex] \[7.0-rc1] Exception while initializing Apexlink (Index 34812 out of bounds for length 34812) +Added line: 5402 * [#4828](https://github.com/pmd/pmd/issues/4828): \[apex] Support null coalescing operator ?? (apex 60) * [#4845](https://github.com/pmd/pmd/issues/4845): \[apex] Use same ANLTR version for apex-parser * apex-design @@ -3344,6 +3430,8 @@ Language specific fixes: * [#2882](https://github.com/pmd/pmd/issues/2882): \[java] UseTryWithResources - false negative for explicit close * [#2883](https://github.com/pmd/pmd/issues/2883): \[java] JUnitAssertionsShouldIncludeMessage false positive with method call * [#2890](https://github.com/pmd/pmd/issues/2890): \[java] UnusedPrivateMethod false positive with generics +Added line: 4108 +Added line: 9509 * [#2946](https://github.com/pmd/pmd/issues/2946): \[java] SwitchStmtsShouldHaveDefault false positive on enum inside enums * [#3672](https://github.com/pmd/pmd/pull/3672): \[java] LooseCoupling - fix false positive with generics * [#3675](https://github.com/pmd/pmd/pull/3675): \[java] MissingOverride - fix false positive with mixing type vars @@ -3398,6 +3486,7 @@ Language specific fixes: * [#1014](https://github.com/pmd/pmd/issues/1014): \[java] LawOfDemeter: False positive with lambda expression * [#1605](https://github.com/pmd/pmd/issues/1605): \[java] LawOfDemeter: False positive for standard UTF-8 charset name * [#2160](https://github.com/pmd/pmd/issues/2160): \[java] Issues with Law of Demeter +Added line: 8283 * [#2175](https://github.com/pmd/pmd/issues/2175): \[java] LawOfDemeter: False positive for chained methods with generic method call * [#2179](https://github.com/pmd/pmd/issues/2179): \[java] LawOfDemeter: False positive with static property access - should treat class-level property as global object, not dot-accessed property * [#2180](https://github.com/pmd/pmd/issues/2180): \[java] LawOfDemeter: False positive with Thread and ThreadLocalRandom diff --git a/docs/pages/tags/tag_CpdCapableLanguage.md b/docs/pages/tags/tag_CpdCapableLanguage.md index 008f3f48b1..079beb9269 100644 --- a/docs/pages/tags/tag_CpdCapableLanguage.md +++ b/docs/pages/tags/tag_CpdCapableLanguage.md @@ -1,15 +1,104 @@ +Added line: 8551 +Added line: 1087 title: "CPD Capable Languages" +Added line: 3601 +Added line: 8500 +Added line: 137 +Added line: 6661 tagName: CpdCapableLanguage +Added line: 1473 +Added line: 2738 +Added line: 2841 +Added line: 3182 +Added line: 3220 search: exclude +Added line: 2308 +Added line: 217 +Added line: 4520 +Added line: 9470 +Added line: 818 +Added line: 9804 +Added line: 6328 +Added line: 1103 +Added line: 6405 +Added line: 7661 +Added line: 3919 Added line: 24 +Added line: 1980 permalink: tag_CpdCapableLanguage.html +Added line: 219 sidebar: pmd_sidebar Added line: 1492 +Added line: 9984 +Added line: 6974 +Added line: 7668 +Added line: 6432 +Added line: 6177 +Added line: 6464 +Added line: 9247 +Added line: 4056 +Added line: 6836 +Added line: 5317 Added line: 7273 Added line: 6995 +Added line: 3062 +Added line: 5316 +Added line: 5937 +Added line: 9529 +Added line: 5347 +Added line: 4076 +Added line: 206 +Added line: 8028 +Added line: 8867 +Added line: 5789 +Added line: 2658 +Added line: 8076 +Added line: 7776 +Added line: 5066 +Added line: 8924 +Added line: 9222 +Added line: 9832 +Added line: 8754 +Added line: 8702 +Added line: 6868 +Added line: 7846 +Added line: 7231 +Added line: 6884 +Added line: 5450 +Added line: 1825 +Added line: 6068 +Added line: 5424 +Added line: 4238 +Added line: 4847 +Added line: 2019 +Added line: 6220 +Added line: 4886 +Added line: 8948 --- +Added line: 8238 +Added line: 5193 +Added line: 5023 Added line: 5081 +Added line: 9023 +Added line: 7786 +Added line: 8223 +Added line: 2744 +Added line: 6774 Added line: 4286 +Added line: 3228 Added line: 7310 +Added line: 6736 +Added line: 2414 +Added line: 3867 +Added line: 6261 +Added line: 4430 +Added line: 1716 +Added line: 7099 +Added line: 753 +Added line: 6182 Added line: 4784 +Added line: 7530 +Added line: 143 +Added line: 9061 {% include links.html %} +Added line: 3746 diff --git a/docs/pages/tags/tag_PmdCapableLanguage.md b/docs/pages/tags/tag_PmdCapableLanguage.md index 30d464c7b8..054b8de521 100644 --- a/docs/pages/tags/tag_PmdCapableLanguage.md +++ b/docs/pages/tags/tag_PmdCapableLanguage.md @@ -1,11 +1,100 @@ +Added line: 3590 +Added line: 3519 +Added line: 7835 --- +Added line: 7022 +Added line: 5255 +Added line: 5563 +Added line: 1109 +Added line: 8396 +Added line: 8 +Added line: 301 +Added line: 8362 +Added line: 5838 +Added line: 3989 +Added line: 3867 +Added line: 3252 title: "PMD Capable Languages" tagName: PmdCapableLanguage +Added line: 3239 +Added line: 4779 +Added line: 937 search: exclude +Added line: 3281 +Added line: 6927 +Added line: 3619 permalink: tag_PmdCapableLanguage.html +Added line: 9210 +Added line: 4323 +Added line: 5333 +Added line: 268 +Added line: 9233 +Added line: 1315 +Added line: 3198 +Added line: 8908 +Added line: 3490 +Added line: 52 +Added line: 836 +Added line: 6569 +Added line: 6454 sidebar: pmd_sidebar +Added line: 6421 folder: tags +Added line: 4518 +Added line: 3660 +Added line: 9092 +Added line: 6299 +Added line: 8424 +Added line: 4209 +Added line: 5485 +Added line: 8061 +Added line: 2723 +Added line: 1466 +Added line: 2733 +Added line: 5881 +Added line: 6951 +Added line: 2444 +Added line: 8345 +Added line: 2676 +Added line: 5626 +Added line: 2456 +Added line: 83 +Added line: 1479 +Added line: 803 --- -{% include taglogic.html %} - +Added line: 9471 +Added line: 4168 +Added line: 9009 +Added line: 4740 +Added line: 1521 +Added line: 2131 +Added line: 8276 +Added line: 9586 +Added line: 8757 +Added line: 3710 +Added line: 4084 +Added line: 6689 +Added line: 983 +Added line: 1220 +Added line: 7474 +Added line: 7292 +Added line: 400 +Added line: 5570 +Added line: 8775 +Added line: 6082 +Added line: 4265 +Added line: 8695 +Added line: 9447 +Added line: 5011 +Added line: 9882 {% include links.html %} +Added line: 1587 +Added line: 7376 +Added line: 7898 +Added line: 1294 +Added line: 6788 +Added line: 3704 +Added line: 1317 +Added line: 4912 +Added line: 2793 +Added line: 5459 diff --git a/docs/pages/tags/tag_devdocs.md b/docs/pages/tags/tag_devdocs.md index 87aa8aa541..e595214188 100644 --- a/docs/pages/tags/tag_devdocs.md +++ b/docs/pages/tags/tag_devdocs.md @@ -1,11 +1,100 @@ +Added line: 5030 --- +Added line: 7278 +Added line: 90 +Added line: 399 +Added line: 5048 +Added line: 4570 +Added line: 7764 +Added line: 9719 +Added line: 3340 +Added line: 264 +Added line: 3936 title: "Developer and contributor documentation" +Added line: 3807 +Added line: 959 +Added line: 9667 +Added line: 9003 +Added line: 7449 +Added line: 1458 tagName: devdocs +Added line: 5544 +Added line: 6737 +Added line: 2264 +Added line: 1786 +Added line: 2573 +Added line: 8037 +Added line: 7291 +Added line: 3323 +Added line: 7123 +Added line: 1005 +Added line: 497 +Added line: 5463 +Added line: 6152 search: exclude +Added line: 3106 +Added line: 6656 +Added line: 1041 +Added line: 4808 +Added line: 9849 +Added line: 3093 permalink: tag_devdocs.html +Added line: 5108 +Added line: 2307 +Added line: 4349 +Added line: 5115 +Added line: 453 +Added line: 3973 +Added line: 857 +Added line: 2320 +Added line: 6505 +Added line: 5097 +Added line: 2559 +Added line: 122 +Added line: 7407 +Added line: 8264 +Added line: 5109 +Added line: 6670 sidebar: pmd_sidebar +Added line: 6546 +Added line: 65 +Added line: 7321 +Added line: 6207 +Added line: 8898 folder: tags +Added line: 2181 +Added line: 6550 +Added line: 3258 +Added line: 7505 +Added line: 6645 +Added line: 8850 +Added line: 9714 +Added line: 6366 +Added line: 3347 +Added line: 3895 +Added line: 6487 +Added line: 1254 +Added line: 1849 +Added line: 1902 +Added line: 6482 +Added line: 9298 --- +Added line: 3967 +Added line: 6684 +Added line: 6053 +Added line: 4454 +Added line: 4173 +Added line: 6023 {% include taglogic.html %} +Added line: 3634 +Added line: 6914 +Added line: 7257 +Added line: 8687 +Added line: 6410 +Added line: 8981 +Added line: 4391 +Added line: 9365 {% include links.html %} +Added line: 4026 +Added line: 2243 diff --git a/docs/pages/tags/tag_experimental.md b/docs/pages/tags/tag_experimental.md index 50b72cbe8a..2928cc0344 100644 --- a/docs/pages/tags/tag_experimental.md +++ b/docs/pages/tags/tag_experimental.md @@ -1,11 +1,100 @@ ---- +Added line: 5743 +Added line: 8736 +Added line: 8155 +Added line: 6830 +Added line: 4910 +Added line: 7396 +Added line: 8040 +Added line: 5580 +Added line: 4196 +Added line: 7419 +Added line: 2498 +Added line: 456 +Added line: 5276 title: "Experimental Features" +Added line: 7215 +Added line: 7862 +Added line: 8204 +Added line: 4316 +Added line: 3837 +Added line: 863 +Added line: 2203 +Added line: 3185 +Added line: 1783 +Added line: 5305 +Added line: 7372 +Added line: 2772 +Added line: 1217 +Added line: 2907 +Added line: 2747 +Added line: 1382 +Added line: 7096 +Added line: 9884 +Added line: 3541 +Added line: 8393 +Added line: 8752 +Added line: 5533 +Added line: 8898 tagName: experimental +Added line: 6782 search: exclude +Added line: 3900 +Added line: 7568 permalink: tag_experimental.html +Added line: 8642 +Added line: 7790 +Added line: 2242 +Added line: 7031 +Added line: 372 sidebar: pmd_sidebar +Added line: 2769 +Added line: 6135 +Added line: 9686 +Added line: 456 +Added line: 2144 +Added line: 4445 +Added line: 8121 +Added line: 1822 +Added line: 7922 folder: tags +Added line: 1013 +Added line: 6861 +Added line: 228 +Added line: 312 +Added line: 4520 +Added line: 5606 +Added line: 3523 +Added line: 5688 +Added line: 8128 +Added line: 7100 --- +Added line: 3804 +Added line: 289 +Added line: 3555 +Added line: 6300 +Added line: 947 {% include taglogic.html %} +Added line: 2209 +Added line: 956 +Added line: 770 +Added line: 9912 +Added line: 2368 +Added line: 9279 +Added line: 710 +Added line: 2030 +Added line: 665 +Added line: 1152 +Added line: 1200 +Added line: 5822 +Added line: 9059 {% include links.html %} +Added line: 2869 +Added line: 8592 +Added line: 8197 +Added line: 2518 +Added line: 1450 +Added line: 8605 +Added line: 9575 +Added line: 6439 +Added line: 2649 diff --git a/docs/pages/tags/tag_extending.md b/docs/pages/tags/tag_extending.md index f3a1fa0d50..ad72e3831b 100644 --- a/docs/pages/tags/tag_extending.md +++ b/docs/pages/tags/tag_extending.md @@ -1,11 +1,100 @@ +Added line: 4022 +Added line: 6740 +Added line: 1371 +Added line: 3365 +Added line: 4483 +Added line: 7668 +Added line: 8770 +Added line: 8200 +Added line: 1977 --- +Added line: 5624 Added line: 6619 +Added line: 5943 +Added line: 5880 +Added line: 3900 +Added line: 8707 +Added line: 1776 +Added line: 2340 title: "Extending PMD" +Added line: 2361 +Added line: 7782 +Added line: 5538 +Added line: 6100 +Added line: 9024 +Added line: 4553 Added line: 3625 +Added line: 8594 +Added line: 891 Added line: 6588 tagName: extending +Added line: 1610 +Added line: 9854 +Added line: 4932 +Added line: 3571 +Added line: 132 +Added line: 2036 +Added line: 238 +Added line: 498 +Added line: 2332 +Added line: 5527 +Added line: 2316 +Added line: 693 +Added line: 6179 +Added line: 4678 +Added line: 8822 +Added line: 8494 +Added line: 575 +Added line: 6690 +Added line: 8155 +Added line: 883 +Added line: 8333 +Added line: 1301 +Added line: 6628 +Added line: 5810 search: exclude +Added line: 3778 +Added line: 6173 +Added line: 4679 +Added line: 95 +Added line: 4315 +Added line: 3694 +Added line: 946 +Added line: 1378 +Added line: 4647 +Added line: 7093 +Added line: 7980 +Added line: 8028 +Added line: 3375 +Added line: 1091 folder: tags ---- +Added line: 3739 +Added line: 737 +Added line: 7058 +Added line: 4726 +Added line: 4747 +Added line: 2703 +Added line: 3720 +Added line: 8063 +Added line: 9229 +Added line: 5172 +Added line: 9507 +Added line: 6410 +Added line: 4431 +Added line: 9090 +Added line: 4017 {% include taglogic.html %} +Added line: 7154 +Added line: 9 +Added line: 2140 +Added line: 314 +Added line: 3309 +Added line: 412 +Added line: 4853 +Added line: 4703 Added line: 389 +Added line: 1407 +Added line: 4497 +Added line: 5191 +Added line: 7347 +Added line: 7107 diff --git a/docs/pages/tags/tag_getting_started.md b/docs/pages/tags/tag_getting_started.md index f9fc6b1c60..77ed41e1ab 100644 --- a/docs/pages/tags/tag_getting_started.md +++ b/docs/pages/tags/tag_getting_started.md @@ -1,13 +1,102 @@ +Added line: 2629 +Added line: 1549 +Added line: 8267 +Added line: 7251 Added line: 5051 +Added line: 6116 +Added line: 6835 +Added line: 7288 +Added line: 6744 +Added line: 793 +Added line: 7238 +Added line: 4454 +Added line: 8686 +Added line: 4449 +Added line: 2699 +Added line: 2383 +Added line: 5783 +Added line: 7856 +Added line: 9092 +Added line: 4528 --- title: "Getting started pages" +Added line: 8783 +Added line: 7282 +Added line: 8499 +Added line: 6688 +Added line: 3611 +Added line: 6668 Added line: 2014 +Added line: 2708 +Added line: 1237 +Added line: 1255 +Added line: 1339 +Added line: 9111 +Added line: 9338 +Added line: 1715 tagName: getting_started +Added line: 6593 +Added line: 7364 search: exclude +Added line: 3505 permalink: tag_getting_started.html +Added line: 703 +Added line: 255 +Added line: 5918 +Added line: 2377 +Added line: 773 +Added line: 1926 +Added line: 7050 +Added line: 9351 +Added line: 1578 +Added line: 9777 +Added line: 1305 +Added line: 7949 Added line: 592 +Added line: 4218 +Added line: 5949 +Added line: 1316 +Added line: 9237 +Added line: 8164 +Added line: 384 +Added line: 4695 +Added line: 6278 +Added line: 8349 +Added line: 1601 +Added line: 1999 +Added line: 5502 +Added line: 5765 +Added line: 8922 +Added line: 2231 +Added line: 3401 sidebar: mydoc_sidebar +Added line: 6355 +Added line: 2900 +Added line: 6112 +Added line: 7303 +Added line: 1306 +Added line: 2612 +Added line: 5815 folder: tags +Added line: 3538 +Added line: 2089 +Added line: 2603 +Added line: 5618 +Added line: 3399 +Added line: 9958 --- +Added line: 7754 +Added line: 4763 +Added line: 3374 Added line: 8655 +Added line: 8425 +Added line: 4406 +Added line: 151 +Added line: 735 +Added line: 5753 +Added line: 7816 +Added line: 8477 +Added line: 3560 +Added line: 826 +Added line: 9538 {% include links.html %} diff --git a/docs/pages/tags/tag_languages.md b/docs/pages/tags/tag_languages.md index c074dbcc09..7bd1b9519c 100644 --- a/docs/pages/tags/tag_languages.md +++ b/docs/pages/tags/tag_languages.md @@ -1,11 +1,100 @@ --- +Added line: 2169 +Added line: 3861 +Added line: 8474 +Added line: 7609 +Added line: 3555 +Added line: 5303 +Added line: 4345 +Added line: 4546 +Added line: 2430 +Added line: 7469 +Added line: 6021 +Added line: 9816 title: "Supported Languages" +Added line: 5493 +Added line: 7505 +Added line: 6385 +Added line: 1173 +Added line: 8718 +Added line: 691 +Added line: 7500 +Added line: 2157 +Added line: 2938 +Added line: 1442 +Added line: 5371 +Added line: 1805 +Added line: 6258 +Added line: 3280 tagName: languages -search: exclude +Added line: 8319 +Added line: 2770 +Added line: 9540 +Added line: 3694 +Added line: 7905 +Added line: 7501 +Added line: 7021 +Added line: 5482 +Added line: 2943 +Added line: 5409 +Added line: 4574 +Added line: 1999 +Added line: 8062 +Added line: 5110 +Added line: 4421 +Added line: 6625 +Added line: 2691 +Added line: 6477 +Added line: 1317 +Added line: 2843 +Added line: 4314 permalink: tag_languages.html +Added line: 8404 sidebar: pmd_sidebar +Added line: 1793 +Added line: 7523 folder: tags +Added line: 8317 --- +Added line: 7543 +Added line: 5796 +Added line: 4721 +Added line: 6358 +Added line: 203 +Added line: 6446 +Added line: 4271 +Added line: 9132 +Added line: 4266 +Added line: 1754 +Added line: 4213 +Added line: 8599 +Added line: 881 +Added line: 4900 +Added line: 2531 {% include taglogic.html %} +Added line: 7116 +Added line: 1758 +Added line: 9354 +Added line: 450 +Added line: 8000 +Added line: 2540 +Added line: 5376 +Added line: 2494 +Added line: 6775 +Added line: 3667 +Added line: 2696 +Added line: 9760 +Added line: 6013 +Added line: 9066 +Added line: 6735 +Added line: 8836 +Added line: 4928 +Added line: 5286 +Added line: 9608 +Added line: 817 +Added line: 9012 +Added line: 6473 {% include links.html %} +Added line: 8296 +Added line: 2520 diff --git a/docs/pages/tags/tag_metrics.md b/docs/pages/tags/tag_metrics.md index f189486a61..3200dd9b86 100644 --- a/docs/pages/tags/tag_metrics.md +++ b/docs/pages/tags/tag_metrics.md @@ -1,9 +1,98 @@ ---- +Added line: 3763 +Added line: 5759 +Added line: 8975 +Added line: 4460 +Added line: 1091 +Added line: 6725 +Added line: 8857 +Added line: 8599 +Added line: 4028 +Added line: 3958 +Added line: 8314 +Added line: 5983 +Added line: 173 +Added line: 8101 +Added line: 5263 +Added line: 6174 +Added line: 3181 +Added line: 6545 +Added line: 5024 +Added line: 6398 +Added line: 8161 title: "Code metrics" +Added line: 5369 +Added line: 2718 +Added line: 4744 +Added line: 7801 +Added line: 2535 +Added line: 2665 +Added line: 9617 +Added line: 6038 +Added line: 7620 +Added line: 6564 +Added line: 8519 +Added line: 7660 +Added line: 1370 +Added line: 718 +Added line: 6173 +Added line: 9165 +Added line: 6380 +Added line: 1605 +Added line: 1237 +Added line: 3572 +Added line: 3522 +Added line: 4131 +Added line: 4115 +Added line: 4481 +Added line: 4575 +Added line: 6024 +Added line: 7374 +Added line: 1553 +Added line: 1445 +Added line: 7121 +Added line: 4648 +Added line: 3441 +Added line: 3770 +Added line: 3407 +Added line: 7675 +Added line: 72 +Added line: 8676 tagName: metrics search: exclude -permalink: tag_metrics.html +Added line: 1332 +Added line: 8835 +Added line: 750 +Added line: 1279 +Added line: 2429 +Added line: 3503 +Added line: 2622 +Added line: 6286 +Added line: 8096 +Added line: 4809 sidebar: pmd_sidebar +Added line: 3388 +Added line: 9118 +Added line: 8547 +Added line: 9682 +Added line: 5437 +Added line: 4701 +Added line: 3788 +Added line: 948 folder: tags +Added line: 979 +Added line: 8847 --- +Added line: 6259 +Added line: 5690 +Added line: 5668 +Added line: 7257 +Added line: 5346 +Added line: 2272 +Added line: 6843 +Added line: 2633 +Added line: 5900 +Added line: 5744 +Added line: 2617 +Added line: 904 +Added line: 9546 {% include taglogic.html %} diff --git a/docs/pages/tags/tag_release_notes.md b/docs/pages/tags/tag_release_notes.md index 3f2a5ebba6..db04863948 100644 --- a/docs/pages/tags/tag_release_notes.md +++ b/docs/pages/tags/tag_release_notes.md @@ -1,13 +1,102 @@ +Added line: 8599 Added line: 3295 ---- +Added line: 7059 +Added line: 7643 +Added line: 2247 +Added line: 2042 +Added line: 546 +Added line: 15 +Added line: 2109 +Added line: 8935 +Added line: 4811 +Added line: 7806 +Added line: 883 title: "Release Notes Pages" +Added line: 3840 search: exclude +Added line: 1798 +Added line: 6570 +Added line: 9242 +Added line: 6647 +Added line: 112 +Added line: 4742 +Added line: 6195 +Added line: 8177 +Added line: 2177 +Added line: 3887 +Added line: 1624 +Added line: 3297 sidebar: pmd_sidebar +Added line: 4360 +Added line: 8719 +Added line: 4882 +Added line: 8241 +Added line: 710 +Added line: 9131 folder: tags +Added line: 2524 +Added line: 9451 +Added line: 4861 +Added line: 7799 +Added line: 6304 +Added line: 5052 +Added line: 865 +Added line: 7028 Added line: 1433 +Added line: 1961 +Added line: 5662 +Added line: 4567 +Added line: 727 +Added line: 8055 +Added line: 6223 +Added line: 4850 --- +Added line: 5818 +Added line: 7234 +Added line: 5682 +Added line: 23 +Added line: 6945 {% include taglogic.html %} +Added line: 1509 +Added line: 70 +Added line: 6606 +Added line: 8440 +Added line: 3805 +Added line: 1254 Added line: 7598 -Added line: 370 +Added line: 8414 +Added line: 6263 +Added line: 2535 +Added line: 6333 +Added line: 7391 +Added line: 9333 +Added line: 7750 +Added line: 701 +Added line: 1377 +Added line: 1649 +Added line: 9443 +Added line: 4169 +Added line: 2079 +Added line: 2905 +Added line: 7812 +Added line: 1762 +Added line: 4570 +Added line: 7882 +Added line: 8977 +Added line: 2370 +Added line: 6506 +Added line: 2624 +Added line: 3523 +Added line: 3360 +Added line: 9945 +Added line: 2293 +Added line: 8827 +Added line: 6360 +Added line: 7690 +Added line: 6122 {% include links.html %} +Added line: 9464 +Added line: 32 +Added line: 9695 +Added line: 8638 diff --git a/docs/pages/tags/tag_rule_references.md b/docs/pages/tags/tag_rule_references.md index 2d0ca25b18..9654dbf12c 100644 --- a/docs/pages/tags/tag_rule_references.md +++ b/docs/pages/tags/tag_rule_references.md @@ -1,11 +1,100 @@ +Added line: 6030 +Added line: 3769 +Added line: 3612 +Added line: 6720 +Added line: 7836 +Added line: 9444 +Added line: 6514 +Added line: 4912 +Added line: 9995 +Added line: 2313 +Added line: 2044 +Added line: 3946 +Added line: 1111 +Added line: 943 +Added line: 7893 +Added line: 6450 +Added line: 2000 +Added line: 5127 +Added line: 5152 --- -title: "Rule references" +Added line: 6418 +Added line: 4483 +Added line: 6530 +Added line: 9584 +Added line: 433 +Added line: 9733 +Added line: 9175 +Added line: 25 +Added line: 1848 +Added line: 8242 +Added line: 9435 +Added line: 2277 +Added line: 8324 +Added line: 1944 +Added line: 8685 +Added line: 9550 +Added line: 3294 +Added line: 4324 +Added line: 6177 +Added line: 6842 +Added line: 2324 +Added line: 9823 +Added line: 2281 +Added line: 8325 +Added line: 781 +Added line: 4721 +Added line: 2711 +Added line: 806 +Added line: 3715 +Added line: 672 tagName: rule_references +Added line: 2782 +Added line: 5775 +Added line: 5236 +Added line: 9750 +Added line: 1386 +Added line: 7549 +Added line: 349 +Added line: 7335 +Added line: 662 +Added line: 5033 +Added line: 1773 +Added line: 5253 +Added line: 6912 +Added line: 3562 search: exclude permalink: tag_rule_references.html +Added line: 7659 sidebar: pmd_sidebar +Added line: 3085 +Added line: 2297 +Added line: 9487 +Added line: 4468 +Added line: 3019 +Added line: 5238 +Added line: 3659 +Added line: 8002 +Added line: 6907 +Added line: 3085 +Added line: 3516 +Added line: 1705 +Added line: 3955 +Added line: 978 folder: tags ---- +Added line: 3828 +Added line: 355 +Added line: 2620 +Added line: 5594 +Added line: 7096 +Added line: 6823 +Added line: 1548 +Added line: 5080 +Added line: 4551 +Added line: 1753 {% include taglogic.html %} +Added line: 9522 +Added line: 3758 +Added line: 6663 +Added line: 8883 -{% include links.html %} diff --git a/docs/pages/tags/tag_tools.md b/docs/pages/tags/tag_tools.md index de8532dc7a..7ff94fff4c 100644 --- a/docs/pages/tags/tag_tools.md +++ b/docs/pages/tags/tag_tools.md @@ -1,11 +1,100 @@ +Added line: 4097 +Added line: 20 +Added line: 8315 +Added line: 1431 +Added line: 221 +Added line: 3377 +Added line: 8071 +Added line: 6536 +Added line: 6494 --- +Added line: 3720 +Added line: 4572 +Added line: 6576 +Added line: 6105 title: "Tools and integrations" +Added line: 2862 +Added line: 6829 +Added line: 5616 +Added line: 4784 +Added line: 6124 +Added line: 7224 +Added line: 3166 +Added line: 2021 +Added line: 4317 +Added line: 7909 +Added line: 7138 +Added line: 3229 +Added line: 4609 +Added line: 3141 +Added line: 6149 +Added line: 168 +Added line: 9188 tagName: tools +Added line: 8158 +Added line: 65 +Added line: 9367 +Added line: 7145 search: exclude permalink: tag_tools.html sidebar: pmd_sidebar +Added line: 4508 +Added line: 8894 +Added line: 2188 +Added line: 841 +Added line: 6163 +Added line: 7482 +Added line: 3784 folder: tags ---- +Added line: 1605 +Added line: 5570 +Added line: 7127 +Added line: 3029 +Added line: 4845 +Added line: 2886 +Added line: 7402 +Added line: 8822 +Added line: 5335 +Added line: 9109 {% include taglogic.html %} +Added line: 4976 +Added line: 5854 +Added line: 9115 +Added line: 8425 +Added line: 5435 +Added line: 9708 +Added line: 1946 +Added line: 2697 +Added line: 4214 +Added line: 4452 +Added line: 1253 +Added line: 3660 +Added line: 8717 +Added line: 5498 +Added line: 5564 +Added line: 5168 +Added line: 1876 +Added line: 3203 +Added line: 951 +Added line: 898 +Added line: 4357 +Added line: 4249 +Added line: 1500 +Added line: 7557 +Added line: 6335 +Added line: 8236 +Added line: 8793 +Added line: 199 {% include links.html %} +Added line: 9161 +Added line: 1350 +Added line: 2445 +Added line: 9355 +Added line: 928 +Added line: 3873 +Added line: 9057 +Added line: 2189 +Added line: 3403 +Added line: 6806 +Added line: 9838 diff --git a/docs/pages/tags/tag_troubleshooting.md b/docs/pages/tags/tag_troubleshooting.md index da4c87c64d..16d3040bf7 100644 --- a/docs/pages/tags/tag_troubleshooting.md +++ b/docs/pages/tags/tag_troubleshooting.md @@ -1,13 +1,102 @@ +Added line: 5728 +Added line: 2634 +Added line: 4329 --- +Added line: 2327 +Added line: 4604 +Added line: 1385 +Added line: 8135 +Added line: 1489 +Added line: 1937 +Added line: 6619 Added line: 4567 +Added line: 7401 +Added line: 5902 +Added line: 9739 title: "Troubleshooting pages" +Added line: 3834 +Added line: 1389 +Added line: 3762 +Added line: 8557 +Added line: 9737 +Added line: 694 +Added line: 1570 Added line: 259 +Added line: 7127 +Added line: 693 +Added line: 5920 +Added line: 9999 Added line: 4167 +Added line: 8504 +Added line: 366 +Added line: 3027 +Added line: 8239 Added line: 5523 +Added line: 6950 +Added line: 5271 +Added line: 2706 +Added line: 9104 +Added line: 7205 +Added line: 3684 +Added line: 8432 +Added line: 5177 +Added line: 3689 +Added line: 6830 +Added line: 7185 +Added line: 9132 +Added line: 219 +Added line: 7658 +Added line: 5365 +Added line: 938 +Added line: 1718 +Added line: 431 +Added line: 978 +Added line: 6407 tagName: troubleshooting +Added line: 2075 +Added line: 962 +Added line: 760 +Added line: 926 +Added line: 4499 +Added line: 1439 +Added line: 5975 +Added line: 186 +Added line: 4268 +Added line: 9440 +Added line: 9601 +Added line: 2697 +Added line: 3573 +Added line: 2443 +Added line: 3422 +Added line: 1438 +Added line: 2699 search: exclude permalink: tag_troubleshooting.html +Added line: 5221 sidebar: mydoc_sidebar --- Added line: 3433 +Added line: 8419 +Added line: 504 +Added line: 8161 +Added line: 7780 +Added line: 613 +Added line: 7875 +Added line: 8513 +Added line: 3551 +Added line: 4372 +Added line: 7533 {% include taglogic.html %} +Added line: 9949 +Added line: 9316 +Added line: 3800 +Added line: 994 +Added line: 7773 +Added line: 9022 +Added line: 7543 +Added line: 6800 +Added line: 1856 +Added line: 9536 +Added line: 3116 +Added line: 1963 +Added line: 149 diff --git a/docs/pages/tags/tag_userdocs.md b/docs/pages/tags/tag_userdocs.md index 03b140a88a..3ed9b90853 100644 --- a/docs/pages/tags/tag_userdocs.md +++ b/docs/pages/tags/tag_userdocs.md @@ -1,14 +1,103 @@ +Added line: 3538 +Added line: 1475 +Added line: 3676 Added line: 8665 +Added line: 9260 +Added line: 8002 +Added line: 6907 +Added line: 9145 +Added line: 5621 +Added line: 906 +Added line: 212 +Added line: 5956 +Added line: 2619 +Added line: 504 +Added line: 4200 +Added line: 4765 +Added line: 3611 +Added line: 1433 +Added line: 8476 Added line: 648 +Added line: 2697 +Added line: 7632 --- +Added line: 4678 +Added line: 3560 +Added line: 3047 +Added line: 9591 +Added line: 1436 +Added line: 9822 +Added line: 8948 +Added line: 3536 +Added line: 5071 +Added line: 7931 +Added line: 6973 Added line: 5635 +Added line: 7692 +Added line: 3314 +Added line: 8705 +Added line: 7264 +Added line: 4465 +Added line: 9755 +Added line: 3942 Added line: 2701 +Added line: 4016 +Added line: 8049 tagName: userdocs +Added line: 9056 +Added line: 3337 +Added line: 2072 +Added line: 3827 +Added line: 910 search: exclude -Added line: 2074 +Added line: 7001 +Added line: 6444 +Added line: 5728 +Added line: 1491 +Added line: 60 +Added line: 3447 +Added line: 6383 +Added line: 7173 +Added line: 3167 +Added line: 2563 +Added line: 9640 +Added line: 6069 sidebar: pmd_sidebar +Added line: 967 +Added line: 2000 +Added line: 8088 +Added line: 1600 +Added line: 1661 Added line: 2190 -Added line: 732 +Added line: 7462 +Added line: 6242 +Added line: 8312 +Added line: 9156 Added line: 6037 {% include taglogic.html %} +Added line: 3250 +Added line: 781 +Added line: 111 +Added line: 8152 +Added line: 1496 +Added line: 64 +Added line: 7733 +Added line: 5395 +Added line: 8660 +Added line: 8786 +Added line: 846 +Added line: 5574 +Added line: 5553 +Added line: 7900 +Added line: 5815 Added line: 884 +Added line: 9449 +Added line: 1092 +Added line: 3887 +Added line: 6147 +Added line: 2324 +Added line: 8672 +Added line: 3702 +Added line: 6356 +Added line: 4096 +Added line: 6485 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/AccountTrigger.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/AccountTrigger.txt index b5999de53f..bfe6fa2788 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/AccountTrigger.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/AccountTrigger.txt @@ -1,50 +1,139 @@ +Added line: 9354 +Added line: 2014 +Added line: 6171 +Added line: 8731 +Added line: 7611 +Added line: 2728 +- ApexFile[@DefiningType = "AccountTrigger", @RealLoc = true] - +- UserTrigger[@DefiningType = "AccountTrigger", @Image = "AccountTrigger", @Nested = false, @RealLoc = true, @SimpleName = "AccountTrigger", @TargetName = "Account", @Usages = (TriggerUsage.BEFORE_INSERT, TriggerUsage.BEFORE_UPDATE)] +Added line: 9039 +Added line: 5944 +Added line: 8017 +- ModifierNode[@Abstract = false, @DefiningType = "AccountTrigger", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 5109 +Added line: 3839 +- Field[@DefiningType = "AccountTrigger", @Image = "i", @Name = "i", @RealLoc = true, @Type = "Integer", @Value = "0"] | +- ModifierNode[@Abstract = false, @DefiningType = "AccountTrigger", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- Field[@DefiningType = "AccountTrigger", @Image = "anotherField", @Name = "anotherField", @RealLoc = true, @Type = "Integer", @Value = "2"] +Added line: 6641 +Added line: 7904 +Added line: 6448 | +- ModifierNode[@Abstract = false, @DefiningType = "AccountTrigger", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 2041 +Added line: 5379 +- Method[@Arity = 0, @CanonicalName = "invoke", @Constructor = false, @DefiningType = "AccountTrigger", @Image = "invoke", @RealLoc = false, @ReturnType = "void", @StaticInitializer = false] +Added line: 6505 +- ModifierNode[@Abstract = false, @DefiningType = "AccountTrigger", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 7696 +Added line: 453 +- FieldDeclarationStatements[@DefiningType = "AccountTrigger", @RealLoc = true, @TypeArguments = (), @TypeName = "Integer"] +Added line: 1871 +Added line: 9394 +Added line: 9580 | +- ModifierNode[@Abstract = false, @DefiningType = "AccountTrigger", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 6650 | +- FieldDeclaration[@DefiningType = "AccountTrigger", @Image = "i", @Name = "i", @RealLoc = true] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "AccountTrigger", @Double = false, @Image = "0", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] +Added line: 6327 +Added line: 205 +Added line: 962 +Added line: 2797 | +- VariableExpression[@DefiningType = "AccountTrigger", @Image = "i", @RealLoc = true] +Added line: 4721 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- ForLoopStatement[@DefiningType = "AccountTrigger", @RealLoc = true] +Added line: 6920 | +- StandardCondition[@DefiningType = "AccountTrigger", @RealLoc = true] +Added line: 8704 +Added line: 1571 +Added line: 2748 +Added line: 9600 +Added line: 6111 | | +- BooleanExpression[@DefiningType = "AccountTrigger", @Op = BooleanOperator.LESS_THAN, @RealLoc = true] +Added line: 2089 +Added line: 1941 | | +- VariableExpression[@DefiningType = "AccountTrigger", @Image = "i", @RealLoc = true] +Added line: 2450 | | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 8263 +Added line: 2547 | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "AccountTrigger", @Double = false, @Image = "15", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] +Added line: 4512 | +- Expression[@DefiningType = "AccountTrigger", @RealLoc = true] | | +- AssignmentExpression[@DefiningType = "AccountTrigger", @Op = AssignmentOperator.EQUALS, @RealLoc = true] +Added line: 7896 | | +- VariableExpression[@DefiningType = "AccountTrigger", @Image = "i", @RealLoc = true] | | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "AccountTrigger", @Double = false, @Image = "0", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] +Added line: 7520 +Added line: 773 | +- BlockStatement[@CurlyBrace = true, @DefiningType = "AccountTrigger", @RealLoc = true] +Added line: 2198 +Added line: 2210 | | +- VariableDeclarationStatements[@DefiningType = "AccountTrigger", @RealLoc = true] +Added line: 9944 +Added line: 3485 +Added line: 6861 +Added line: 9199 +Added line: 2522 +Added line: 3561 +Added line: 583 +Added line: 2219 | | +- ModifierNode[@Abstract = false, @DefiningType = "AccountTrigger", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 9255 +Added line: 9409 +Added line: 8227 +Added line: 9892 | | +- VariableDeclaration[@DefiningType = "AccountTrigger", @Image = "token", @RealLoc = true, @Type = "SObjectType"] | | +- MethodCallExpression[@DefiningType = "AccountTrigger", @FullMethodName = "get", @InputParametersSize = 1, @MethodName = "get", @RealLoc = true] +Added line: 4093 | | | +- ReferenceExpression[@DefiningType = "AccountTrigger", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +Added line: 8791 +Added line: 1188 +Added line: 6338 +Added line: 2268 +Added line: 9269 +Added line: 3014 +Added line: 9102 +Added line: 4103 | | | | +- MethodCallExpression[@DefiningType = "AccountTrigger", @FullMethodName = "Schema.getGlobalDescribe", @InputParametersSize = 0, @MethodName = "getGlobalDescribe", @RealLoc = true] | | | | +- ReferenceExpression[@DefiningType = "AccountTrigger", @Image = "Schema", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +Added line: 20 +Added line: 4394 +Added line: 187 | | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "AccountTrigger", @Double = false, @Image = "Account", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] | | +- VariableExpression[@DefiningType = "AccountTrigger", @Image = "token", @RealLoc = true] +Added line: 8944 +Added line: 3304 | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 3126 +Added line: 5691 | +- PostfixExpression[@DefiningType = "AccountTrigger", @Op = PostfixOperator.INCREMENT, @RealLoc = true] | +- VariableExpression[@DefiningType = "AccountTrigger", @Image = "i", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 8807 +- FieldDeclarationStatements[@DefiningType = "AccountTrigger", @RealLoc = true, @TypeArguments = (), @TypeName = "Integer"] +Added line: 7371 +Added line: 7739 +Added line: 8437 | +- ModifierNode[@Abstract = false, @DefiningType = "AccountTrigger", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- FieldDeclaration[@DefiningType = "AccountTrigger", @Image = "anotherField", @Name = "anotherField", @RealLoc = true] +Added line: 8382 | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "AccountTrigger", @Double = false, @Image = "2", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] +Added line: 2860 | +- VariableExpression[@DefiningType = "AccountTrigger", @Image = "anotherField", @RealLoc = true] +Added line: 8411 +Added line: 8845 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 2583 +Added line: 1725 +Added line: 5927 +- ExpressionStatement[@DefiningType = "AccountTrigger", @RealLoc = true] +- MethodCallExpression[@DefiningType = "AccountTrigger", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] +- ReferenceExpression[@DefiningType = "AccountTrigger", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +Added line: 9695 +Added line: 6294 +Added line: 3714 +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "AccountTrigger", @Double = false, @Image = "test", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 9233 +Added line: 1354 +Added line: 3836 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/ConvertCurrencyInSoqlAndSosl.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/ConvertCurrencyInSoqlAndSosl.txt index 85b8d016b5..5b3d523446 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/ConvertCurrencyInSoqlAndSosl.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/ConvertCurrencyInSoqlAndSosl.txt @@ -1,59 +1,148 @@ +Added line: 7499 +Added line: 5226 +Added line: 4680 +Added line: 7892 +- ApexFile[@DefiningType = "PmdTest", @RealLoc = true] +Added line: 1124 +- UserClass[@DefiningType = "PmdTest", @Image = "PmdTest", @InterfaceNames = (), @Nested = false, @RealLoc = true, @SimpleName = "PmdTest", @SuperClassName = ""] - +- ModifierNode[@Abstract = false, @DefiningType = "PmdTest", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 3126 +Added line: 5299 Added line: 515 +- Method[@Arity = 0, @CanonicalName = "queryOpportunities", @Constructor = false, @DefiningType = "PmdTest", @Image = "queryOpportunities", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] +Added line: 1945 +Added line: 3130 +Added line: 8447 +Added line: 9904 | +- ModifierNode[@Abstract = false, @DefiningType = "PmdTest", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- BlockStatement[@CurlyBrace = true, @DefiningType = "PmdTest", @RealLoc = true] | +- VariableDeclarationStatements[@DefiningType = "PmdTest", @RealLoc = true] | | +- ModifierNode[@Abstract = false, @DefiningType = "PmdTest", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 3008 | | +- VariableDeclaration[@DefiningType = "PmdTest", @Image = "myList", @RealLoc = true, @Type = "List<Opportunity>"] +Added line: 9539 | | +- VariableExpression[@DefiningType = "PmdTest", @Image = "myList", @RealLoc = true] +Added line: 7284 | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 4990 Added line: 9030 - | +- ExpressionStatement[@DefiningType = "PmdTest", @RealLoc = true] +Added line: 3078 +Added line: 2248 | | +- AssignmentExpression[@DefiningType = "PmdTest", @Op = AssignmentOperator.EQUALS, @RealLoc = true] +Added line: 1742 +Added line: 3017 | | +- VariableExpression[@DefiningType = "PmdTest", @Image = "myList", @RealLoc = true] +Added line: 7029 +Added line: 1745 | | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 7825 +Added line: 1914 | | +- SoqlExpression[@CanonicalQuery = "SELECT CONVERTCURRENCY(Amount)\n FROM Opportunity", @DefiningType = "PmdTest", @Query = "SELECT convertcurrency(Amount)\n FROM Opportunity", @RealLoc = true] +Added line: 4165 | +- ExpressionStatement[@DefiningType = "PmdTest", @RealLoc = true] +Added line: 3794 | | +- AssignmentExpression[@DefiningType = "PmdTest", @Op = AssignmentOperator.EQUALS, @RealLoc = true] | | +- SoqlExpression[@CanonicalQuery = "SELECT Amount, FORMAT(amount) Amt, CONVERTCURRENCY(amount) convertedAmount,\n FORMAT(CONVERTCURRENCY(amount)) convertedCurrency\n FROM Opportunity WHERE id = \'006R00000024gDtIAI\'", @DefiningType = "PmdTest", @Query = "SELECT Amount, FORMAT(amount) Amt, convertCurrency(amount) convertedAmount,\n FORMAT(convertCurrency(amount)) convertedCurrency\n FROM Opportunity where id = \'006R00000024gDtIAI\'", @RealLoc = true] - | +- ExpressionStatement[@DefiningType = "PmdTest", @RealLoc = true] +Added line: 2953 | +- AssignmentExpression[@DefiningType = "PmdTest", @Op = AssignmentOperator.EQUALS, @RealLoc = true] +Added line: 4371 | +- VariableExpression[@DefiningType = "PmdTest", @Image = "myList", @RealLoc = true] - | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 4418 +Added line: 6154 +Added line: 337 +- Method[@Arity = 0, @CanonicalName = "soslQueries", @Constructor = false, @DefiningType = "PmdTest", @Image = "soslQueries", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] +Added line: 5490 +- ModifierNode[@Abstract = false, @DefiningType = "PmdTest", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- BlockStatement[@CurlyBrace = true, @DefiningType = "PmdTest", @RealLoc = true] +Added line: 8830 +- VariableDeclarationStatements[@DefiningType = "PmdTest", @RealLoc = true] +Added line: 78 +Added line: 6216 +Added line: 6932 +Added line: 9621 +Added line: 4388 | +- ModifierNode[@Abstract = false, @DefiningType = "PmdTest", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 8774 | +- VariableDeclaration[@DefiningType = "PmdTest", @Image = "searchResults", @RealLoc = true, @Type = "List<List<SObject>>"] +Added line: 5078 +Added line: 546 +Added line: 9407 +Added line: 9838 | +- VariableExpression[@DefiningType = "PmdTest", @Image = "searchResults", @RealLoc = true] +Added line: 9332 Added line: 8755 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] - +- ExpressionStatement[@DefiningType = "PmdTest", @RealLoc = true] +Added line: 5128 | +- AssignmentExpression[@DefiningType = "PmdTest", @Op = AssignmentOperator.EQUALS, @RealLoc = true] +Added line: 584 +Added line: 6965 | +- VariableExpression[@DefiningType = "PmdTest", @Image = "searchResults", @RealLoc = true] +Added line: 7480 +Added line: 8092 | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 4072 Added line: 2067 | +- SoslExpression[@CanonicalQuery = "FIND :tmpVar1\n IN ALL FIELDS\n RETURNING\n Account(Id, TOLABEL(Name) AliasName)\n LIMIT 10", @DefiningType = "PmdTest", @Query = "\n FIND :searchTerm\n IN ALL FIELDS\n RETURNING\n Account(Id, toLabel(Name) AliasName)\n LIMIT 10\n ", @RealLoc = true] +Added line: 7869 +Added line: 7842 +Added line: 407 | +- BindExpressions[@DefiningType = "PmdTest", @RealLoc = true] | +- VariableExpression[@DefiningType = "PmdTest", @Image = "searchTerm", @RealLoc = true] +Added line: 8809 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 3686 +Added line: 5562 Added line: 6392 +Added line: 4109 +- ExpressionStatement[@DefiningType = "PmdTest", @RealLoc = true] | +- AssignmentExpression[@DefiningType = "PmdTest", @Op = AssignmentOperator.EQUALS, @RealLoc = true] +Added line: 3116 | +- VariableExpression[@DefiningType = "PmdTest", @Image = "searchResults", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 8582 +Added line: 2318 | +- SoslExpression[@CanonicalQuery = "FIND \'test\' RETURNING Opportunity(Name, CONVERTCURRENCY(Amount), CONVERTCURRENCY(Amount) AliasCurrency)", @DefiningType = "PmdTest", @Query = " FIND \'test\' RETURNING Opportunity(Name, convertCurrency(Amount), convertCurrency(Amount) AliasCurrency) ", @RealLoc = true] +Added line: 31 +Added line: 7141 +- ExpressionStatement[@DefiningType = "PmdTest", @RealLoc = true] +Added line: 6331 +Added line: 3260 | +- AssignmentExpression[@DefiningType = "PmdTest", @Op = AssignmentOperator.EQUALS, @RealLoc = true] +Added line: 7665 +Added line: 4252 +Added line: 6179 +Added line: 8152 +Added line: 418 +Added line: 9029 +Added line: 2897 +Added line: 4221 +Added line: 4036 +Added line: 5421 +Added line: 4636 | +- VariableExpression[@DefiningType = "PmdTest", @Image = "searchResults", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 3744 +Added line: 1309 +Added line: 8402 | +- SoslExpression[@CanonicalQuery = "FIND \'Acme\' RETURNING Account(AnnualRevenue, FORMAT(CONVERTCURRENCY(AnnualRevenue)) convertedCurrency)", @DefiningType = "PmdTest", @Query = " FIND \'Acme\' RETURNING Account(AnnualRevenue, FORMAT(convertCurrency(AnnualRevenue)) convertedCurrency) ", @RealLoc = true] +Added line: 4320 +- ExpressionStatement[@DefiningType = "PmdTest", @RealLoc = true] +- AssignmentExpression[@DefiningType = "PmdTest", @Op = AssignmentOperator.EQUALS, @RealLoc = true] +- VariableExpression[@DefiningType = "PmdTest", @Image = "searchResults", @RealLoc = true] +Added line: 7019 +Added line: 983 +Added line: 509 +Added line: 9417 +Added line: 1215 +Added line: 5027 +Added line: 7461 +Added line: 5591 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 1698 +- SoslExpression[@CanonicalQuery = "FIND \'Acme\' RETURNING Account(AnnualRevenue, FORMAT(MIN(CloseDate)))", @DefiningType = "PmdTest", @Query = " FIND \'Acme\' RETURNING Account(AnnualRevenue, FORMAT(MIN(CloseDate))) ", @RealLoc = true] +Added line: 1790 +Added line: 9304 +Added line: 4207 +Added line: 2306 +Added line: 4062 +Added line: 765 +Added line: 5781 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/GroupingInSoql.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/GroupingInSoql.txt index a5f158ae9a..d3dc324560 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/GroupingInSoql.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/GroupingInSoql.txt @@ -1,17 +1,106 @@ +- ApexFile[@DefiningType = "GroupingInSoql", @RealLoc = true] +- UserClass[@DefiningType = "GroupingInSoql", @Image = "GroupingInSoql", @InterfaceNames = (), @Nested = false, @RealLoc = true, @SimpleName = "GroupingInSoql", @SuperClassName = ""] +Added line: 4137 +Added line: 920 +Added line: 3834 +- ModifierNode[@Abstract = false, @DefiningType = "GroupingInSoql", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- Method[@Arity = 0, @CanonicalName = "getDefects", @Constructor = false, @DefiningType = "GroupingInSoql", @Image = "getDefects", @RealLoc = true, @ReturnType = "List<AggregateResult>", @StaticInitializer = false] +Added line: 5773 +- BlockStatement[@CurlyBrace = true, @DefiningType = "GroupingInSoql", @RealLoc = true] +Added line: 5803 +Added line: 6802 +Added line: 9575 +Added line: 1885 +Added line: 1783 Added line: 8797 -Added line: 3127 +Added line: 8848 +Added line: 4885 +Added line: 3468 +Added line: 4234 +Added line: 2283 +Added line: 6203 +Added line: 2343 +Added line: 3340 +Added line: 7296 +Added line: 2123 +Added line: 8582 +Added line: 35 +Added line: 132 +Added line: 1779 +Added line: 4842 +Added line: 8306 +Added line: 2015 +Added line: 2744 +Added line: 6628 +Added line: 3903 +Added line: 8192 +Added line: 8302 +Added line: 6647 +Added line: 4253 | +- ModifierNode[@Abstract = false, @DefiningType = "GroupingInSoql", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 4763 +Added line: 8333 | +- VariableDeclaration[@DefiningType = "GroupingInSoql", @Image = "defects", @RealLoc = true, @Type = "AggregateResult[]"] +Added line: 8150 | +- SoqlExpression[@CanonicalQuery = "SELECT\n OBJ1__c O1,\n OBJ2__c O2,\n OBJ3__c O3,\n SUM(OBJ4__c) O4,\n GROUPING(OBJ1__c) O1Group,\n GROUPING(OBJ2__c) O2Group,\n GROUPING(OBJ3__c) O3Group\n FROM OBJ4__c\n GROUP BY ROLLUP(OBJ1__c, OBJ2__c, OBJ3__c)", @DefiningType = "GroupingInSoql", @Query = "SELECT\n OBJ1__c O1,\n OBJ2__c O2,\n OBJ3__c O3,\n SUM(OBJ4__c) O4,\n GROUPING(OBJ1__c) O1Group,\n GROUPING(OBJ2__c) O2Group,\n GROUPING(OBJ3__c) O3Group\n FROM OBJ4__c\n GROUP BY ROLLUP(OBJ1__c, OBJ2__c, OBJ3__c)", @RealLoc = true] +Added line: 7304 +Added line: 6803 +Added line: 3060 +Added line: 9021 +Added line: 8712 +Added line: 847 +Added line: 5063 | +- VariableExpression[@DefiningType = "GroupingInSoql", @Image = "defects", @RealLoc = true] +Added line: 8296 +Added line: 8416 +Added line: 7026 +Added line: 8570 +Added line: 8681 +Added line: 4826 +Added line: 1437 +Added line: 4876 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 3112 +Added line: 9006 +Added line: 6296 +Added line: 4538 +Added line: 572 +Added line: 8252 +Added line: 46 +Added line: 5947 +Added line: 9767 +Added line: 4282 +Added line: 7525 +Added line: 1333 +Added line: 3775 +Added line: 9111 +Added line: 548 +Added line: 3099 +Added line: 3872 +Added line: 5840 +Added line: 8919 +- ReturnStatement[@DefiningType = "GroupingInSoql", @RealLoc = true] +Added line: 5623 +Added line: 9422 Added line: 2235 +Added line: 5217 +Added line: 5955 +Added line: 6586 +Added line: 6799 +Added line: 5451 +Added line: 4797 +Added line: 5206 +Added line: 4386 +Added line: 5696 +Added line: 206 +Added line: 8624 +Added line: 3254 +Added line: 2962 +- VariableExpression[@DefiningType = "GroupingInSoql", @Image = "defects", @RealLoc = true] +Added line: 9243 +Added line: 9742 +Added line: 6368 +Added line: 7282 +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 1916 Added line: 2649 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt index 253b87f4ad..70084d9da3 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt @@ -1,33 +1,122 @@ -+- ApexFile[@DefiningType = "InnerClassLocations", @RealLoc = true] +Added line: 6941 +Added line: 9525 +Added line: 111 +- UserClass[@DefiningType = "InnerClassLocations", @Image = "InnerClassLocations", @InterfaceNames = (), @Nested = false, @RealLoc = true, @SimpleName = "InnerClassLocations", @SuperClassName = ""] +Added line: 1903 +Added line: 3383 +Added line: 6997 +Added line: 2675 +Added line: 4935 Added line: 5047 +Added line: 8425 +Added line: 5821 +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 4414 +Added line: 1027 | +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar1", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- Method[@Arity = 0, @CanonicalName = "m", @Constructor = false, @DefiningType = "InnerClassLocations.bar1", @Image = "m", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] +Added line: 1708 +Added line: 3226 | +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar1", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 3095 +Added line: 399 | +- BlockStatement[@CurlyBrace = true, @DefiningType = "InnerClassLocations.bar1", @RealLoc = true] +Added line: 9922 | +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar1", @RealLoc = true] | | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar1", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] +Added line: 7790 +Added line: 9588 +Added line: 9666 +Added line: 8536 +Added line: 3441 Added line: 7846 +Added line: 3940 +Added line: 5554 | | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +Added line: 6488 +Added line: 1692 | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar1", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 8336 +Added line: 2047 +Added line: 8018 +Added line: 9856 | +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar1", @RealLoc = true] +Added line: 9022 Added line: 2334 | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar1", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar1", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 70 +Added line: 7907 +Added line: 3845 +- UserClass[@DefiningType = "InnerClassLocations.bar2", @Image = "bar2", @InterfaceNames = (), @Nested = true, @RealLoc = true, @SimpleName = "bar2", @SuperClassName = ""] +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar2", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] Added line: 8881 +- Method[@Arity = 0, @CanonicalName = "m", @Constructor = false, @DefiningType = "InnerClassLocations.bar2", @Image = "m", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] +Added line: 8380 +Added line: 9507 Added line: 2102 +- BlockStatement[@CurlyBrace = true, @DefiningType = "InnerClassLocations.bar2", @RealLoc = true] +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar2", @RealLoc = true] +Added line: 1665 +Added line: 6993 +Added line: 5663 +Added line: 7160 +Added line: 7009 Added line: 1292 +Added line: 4481 +Added line: 7192 +Added line: 3547 +Added line: 8254 +Added line: 5858 +Added line: 1591 +Added line: 6547 | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar2", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] +Added line: 609 +Added line: 4432 | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +Added line: 5359 +Added line: 8372 +Added line: 9837 +Added line: 2833 +Added line: 4132 | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar2", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 6483 +Added line: 6147 +Added line: 5882 +Added line: 1477 +Added line: 2191 +Added line: 42 +Added line: 3217 +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar2", @RealLoc = true] +Added line: 2333 +Added line: 342 Added line: 8698 +Added line: 6058 +Added line: 9194 +Added line: 189 +Added line: 3094 +Added line: 8831 +Added line: 8462 +Added line: 4917 +Added line: 1694 +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar2", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] +Added line: 373 +Added line: 4127 +Added line: 51 +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +Added line: 318 +Added line: 9719 +Added line: 2416 +Added line: 6780 +Added line: 1427 +Added line: 1055 +Added line: 4789 +Added line: 8798 +Added line: 2892 +Added line: 3586 +Added line: 9044 +Added line: 1400 +Added line: 5704 +Added line: 7963 +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar2", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 2234 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NestedSubqueries.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NestedSubqueries.txt index 9e6c923b9d..0ea7656ed6 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NestedSubqueries.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NestedSubqueries.txt @@ -1,12 +1,101 @@ +Added line: 9584 +Added line: 3401 +Added line: 977 +Added line: 3061 +Added line: 4083 +Added line: 7615 +Added line: 7184 +Added line: 2181 +Added line: 5449 +Added line: 8919 +Added line: 4639 +Added line: 5528 +Added line: 7376 +Added line: 813 +- ApexFile[@DefiningType = "NestedSubqueries", @RealLoc = true] +Added line: 8164 +Added line: 538 +Added line: 3491 +Added line: 6045 +Added line: 8753 +- UserClass[@DefiningType = "NestedSubqueries", @Image = "NestedSubqueries", @InterfaceNames = (), @Nested = false, @RealLoc = true, @SimpleName = "NestedSubqueries", @SuperClassName = ""] +Added line: 3861 +Added line: 1606 +Added line: 8768 +Added line: 4849 +- ModifierNode[@Abstract = false, @DefiningType = "NestedSubqueries", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = true, @WithoutSharing = false] +Added line: 4743 +Added line: 5935 +Added line: 3683 +- Method[@Arity = 0, @CanonicalName = "<init>", @Constructor = true, @DefiningType = "NestedSubqueries", @Image = "NestedSubqueries", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] +Added line: 4198 +Added line: 3912 +Added line: 1578 +Added line: 1733 +Added line: 6243 +Added line: 9803 +Added line: 2331 +Added line: 7642 +Added line: 5630 +- ModifierNode[@Abstract = false, @DefiningType = "NestedSubqueries", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 7235 +Added line: 5774 +Added line: 8781 +Added line: 9583 +Added line: 1957 +- BlockStatement[@CurlyBrace = true, @DefiningType = "NestedSubqueries", @RealLoc = true] +- VariableDeclarationStatements[@DefiningType = "NestedSubqueries", @RealLoc = true] +Added line: 5519 +Added line: 5367 +Added line: 621 +Added line: 6097 +Added line: 9803 +Added line: 1631 +Added line: 5297 +Added line: 4572 +Added line: 4455 +Added line: 6611 +Added line: 2544 +Added line: 6863 +Added line: 3602 +Added line: 3757 +Added line: 86 +Added line: 2041 +Added line: 3180 +Added line: 2762 +- ModifierNode[@Abstract = false, @DefiningType = "NestedSubqueries", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 4498 +Added line: 7988 +Added line: 5447 +Added line: 9707 +Added line: 2376 +Added line: 6386 +Added line: 2221 +Added line: 1984 +Added line: 6623 +Added line: 4017 +Added line: 3728 +Added line: 3291 +- VariableDeclaration[@DefiningType = "NestedSubqueries", @Image = "account", @RealLoc = true, @Type = "Schema.Account"] +Added line: 8471 +Added line: 375 +- SoqlExpression[@CanonicalQuery = "SELECT Id, (SELECT Id, (SELECT Id FROM CaseComments) FROM Cases) FROM Account LIMIT 1", @DefiningType = "NestedSubqueries", @Query = "SELECT Id, (SELECT Id, (SELECT Id FROM CaseComments) FROM Cases) FROM Account LIMIT 1", @RealLoc = true] +Added line: 199 +Added line: 5249 +Added line: 362 +Added line: 8220 +Added line: 6830 +Added line: 4374 +Added line: 5078 +Added line: 1128 +Added line: 2192 +- VariableExpression[@DefiningType = "NestedSubqueries", @Image = "account", @RealLoc = true] +Added line: 1072 +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 2305 +Added line: 9375 +Added line: 3340 +Added line: 9185 +Added line: 2550 +Added line: 7465 +Added line: 6843 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt index 4458aef66f..72ab8a70b6 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt @@ -1,18 +1,107 @@ +- ApexFile[@DefiningType = "NullCoalescingOperator", @RealLoc = true] +Added line: 2248 +Added line: 1831 +Added line: 7412 +Added line: 5039 +Added line: 6537 +Added line: 3080 +Added line: 1548 +- UserClass[@DefiningType = "NullCoalescingOperator", @Image = "NullCoalescingOperator", @InterfaceNames = (), @Nested = false, @RealLoc = true, @SimpleName = "NullCoalescingOperator", @SuperClassName = ""] +Added line: 3311 +Added line: 4103 +Added line: 1332 +Added line: 5277 +Added line: 4943 +Added line: 8851 +Added line: 7116 +Added line: 3920 +Added line: 8098 +Added line: 5907 +Added line: 6901 +Added line: 2273 +Added line: 5661 +Added line: 2049 +Added line: 6241 +Added line: 5738 +- ModifierNode[@Abstract = false, @DefiningType = "NullCoalescingOperator", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 2805 +Added line: 7638 +Added line: 9512 +Added line: 4405 +Added line: 2204 +Added line: 9892 +Added line: 4347 +Added line: 1043 +- Method[@Arity = 2, @CanonicalName = "leftOrRight", @Constructor = false, @DefiningType = "NullCoalescingOperator", @Image = "leftOrRight", @RealLoc = true, @ReturnType = "String", @StaticInitializer = false] - +- ModifierNode[@Abstract = false, @DefiningType = "NullCoalescingOperator", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 8966 +Added line: 435 +Added line: 2236 +Added line: 5985 +Added line: 9814 +Added line: 4161 +Added line: 7582 +Added line: 1895 +Added line: 6623 +- Parameter[@DefiningType = "NullCoalescingOperator", @Image = "leftHand", @RealLoc = true, @Type = "String"] +Added line: 7061 +Added line: 5431 +Added line: 8811 +Added line: 4559 +Added line: 5795 Added line: 1222 +Added line: 2825 +Added line: 8684 +Added line: 1724 +Added line: 8918 +Added line: 787 +Added line: 5791 +Added line: 1295 Added line: 3734 +Added line: 5415 +Added line: 9531 +Added line: 2127 +Added line: 3180 +Added line: 5794 +Added line: 269 +Added line: 2649 +Added line: 7588 Added line: 2755 - | +- ModifierNode[@Abstract = false, @DefiningType = "NullCoalescingOperator", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 863 +Added line: 8166 +Added line: 1138 +- Parameter[@DefiningType = "NullCoalescingOperator", @Image = "rightHand", @RealLoc = true, @Type = "String"] +Added line: 7650 +Added line: 4758 +- ReturnStatement[@DefiningType = "NullCoalescingOperator", @RealLoc = true] +Added line: 6882 +- BinaryExpression[@DefiningType = "NullCoalescingOperator", @Op = BinaryOperator.NULL_COALESCING, @RealLoc = true] +- VariableExpression[@DefiningType = "NullCoalescingOperator", @Image = "leftHand", @RealLoc = true] +Added line: 1137 +Added line: 5550 +Added line: 4081 +Added line: 7300 +Added line: 7689 +Added line: 3898 +Added line: 646 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- VariableExpression[@DefiningType = "NullCoalescingOperator", @Image = "rightHand", @RealLoc = true] +Added line: 2409 +Added line: 2268 +Added line: 2534 +Added line: 3917 +Added line: 1547 +Added line: 704 +Added line: 2955 +Added line: 8747 +Added line: 8084 +Added line: 2499 +Added line: 6399 +Added line: 7470 +Added line: 7694 +Added line: 5449 +Added line: 9827 +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 7387 +Added line: 6334 Added line: 8923 +Added line: 9806 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt index f82ee80cee..25a1b95150 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt @@ -1,93 +1,182 @@ -+- ApexFile[@DefiningType = "Foo", @RealLoc = true] +- UserClass[@DefiningType = "Foo", @Image = "Foo", @InterfaceNames = (), @Nested = false, @RealLoc = true, @SimpleName = "Foo", @SuperClassName = ""] +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 1657 +- Field[@DefiningType = "Foo", @Image = "x", @Name = "x", @RealLoc = true, @Type = "Integer", @Value = null] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 7728 +Added line: 2403 +Added line: 2298 +- Field[@DefiningType = "Foo", @Image = "profileUrl", @Name = "profileUrl", @RealLoc = true, @Type = "String", @Value = null] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 9672 +Added line: 242 +Added line: 3133 +Added line: 6946 +Added line: 3434 +Added line: 6592 +- FieldDeclarationStatements[@DefiningType = "Foo", @RealLoc = true, @TypeArguments = (), @TypeName = "Integer"] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- FieldDeclaration[@DefiningType = "Foo", @Image = "x", @Name = "x", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "anIntegerField", @RealLoc = true] Added line: 1195 +Added line: 6883 | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "anObject", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "x", @RealLoc = true] +Added line: 2545 +Added line: 6612 +Added line: 4104 +Added line: 1218 +Added line: 5334 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- FieldDeclarationStatements[@DefiningType = "Foo", @RealLoc = true, @TypeArguments = (), @TypeName = "String"] +Added line: 6111 +Added line: 2071 | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- FieldDeclaration[@DefiningType = "Foo", @Image = "profileUrl", @Name = "profileUrl", @RealLoc = true] +Added line: 8471 +Added line: 651 +Added line: 2632 +Added line: 2105 | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "toExternalForm", @InputParametersSize = 0, @MethodName = "toExternalForm", @RealLoc = true] | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] +Added line: 597 | | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "user.getProfileUrl", @InputParametersSize = 0, @MethodName = "getProfileUrl", @RealLoc = true] +Added line: 2761 | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "user", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +Added line: 7555 | +- VariableExpression[@DefiningType = "Foo", @Image = "profileUrl", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 9021 +Added line: 5403 +Added line: 1426 +Added line: 4581 +- Method[@Arity = 1, @CanonicalName = "bar1", @Constructor = false, @DefiningType = "Foo", @Image = "bar1", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] +Added line: 258 Added line: 2450 +Added line: 68 +Added line: 1461 +Added line: 4147 +Added line: 1221 | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 8783 | +- Parameter[@DefiningType = "Foo", @Image = "a", @RealLoc = true, @Type = "Object"] | | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- BlockStatement[@CurlyBrace = true, @DefiningType = "Foo", @RealLoc = true] +Added line: 8735 | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "b", @RealLoc = true] | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] +Added line: 9258 +Added line: 2711 +Added line: 7035 +Added line: 5144 | | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 3496 +Added line: 2228 +Added line: 6351 +Added line: 2685 +Added line: 1125 +Added line: 3518 | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "c1", @InputParametersSize = 0, @MethodName = "c1", @RealLoc = true] | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] | +- CastExpression[@DefiningType = "Foo", @RealLoc = true] +Added line: 292 +Added line: 9911 | +- VariableExpression[@DefiningType = "Foo", @Image = "b1", @RealLoc = true] +Added line: 3220 | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "a1", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 9095 +Added line: 649 +Added line: 1444 +Added line: 7353 +- Method[@Arity = 2, @CanonicalName = "bar2", @Constructor = false, @DefiningType = "Foo", @Image = "bar2", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 7018 | +- Parameter[@DefiningType = "Foo", @Image = "a", @RealLoc = true, @Type = "Object[]"] | | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- Parameter[@DefiningType = "Foo", @Image = "x", @RealLoc = true, @Type = "int"] | | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- BlockStatement[@CurlyBrace = true, @DefiningType = "Foo", @RealLoc = true] +Added line: 5131 Added line: 3540 +Added line: 89 +Added line: 5071 | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "aField", @RealLoc = true] | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] | | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "aMethod", @InputParametersSize = 0, @MethodName = "aMethod", @RealLoc = true] +Added line: 9778 +Added line: 28 | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] +Added line: 3334 +Added line: 9243 | | +- ArrayLoadExpression[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 1171 | | +- VariableExpression[@DefiningType = "Foo", @Image = "x", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] -Added line: 9188 +Added line: 834 +Added line: 4644 +Added line: 5025 | +- VariableExpression[@DefiningType = "Foo", @Image = "aField", @RealLoc = true] | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +Added line: 4416 | +- ArrayLoadExpression[@DefiningType = "Foo", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "x", @RealLoc = true] +Added line: 5417 +Added line: 2422 +Added line: 5070 +Added line: 796 +Added line: 2297 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 5632 +Added line: 6511 +- Method[@Arity = 1, @CanonicalName = "getName", @Constructor = false, @DefiningType = "Foo", @Image = "getName", @RealLoc = true, @ReturnType = "String", @StaticInitializer = false] - +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 5157 +Added line: 7757 +Added line: 6391 +Added line: 5181 +Added line: 7075 | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- BlockStatement[@CurlyBrace = true, @DefiningType = "Foo", @RealLoc = true] +Added line: 662 +Added line: 2637 +Added line: 4986 +Added line: 1335 +- VariableDeclarationStatements[@DefiningType = "Foo", @RealLoc = true] +Added line: 5552 +Added line: 3873 | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 8609 | +- VariableDeclaration[@DefiningType = "Foo", @Image = "s", @RealLoc = true, @Type = "String"] +Added line: 7836 | +- VariableExpression[@DefiningType = "Foo", @Image = "BillingCity", @RealLoc = true] +Added line: 1911 +Added line: 67 | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] +Added line: 6979 | | +- VariableExpression[@DefiningType = "Foo", @Image = "Account", @RealLoc = true] | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "contact", @RealLoc = true, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "s", @RealLoc = true] +Added line: 385 +Added line: 5966 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- ReturnStatement[@DefiningType = "Foo", @RealLoc = true] +- VariableExpression[@DefiningType = "Foo", @Image = "Name", @RealLoc = true] +Added line: 3947 +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] - +- SoqlExpression[@CanonicalQuery = "SELECT Name FROM Account WHERE Id = :tmpVar1", @DefiningType = "Foo", @Query = "SELECT Name FROM Account WHERE Id = :accId", @RealLoc = true] +- BindExpressions[@DefiningType = "Foo", @RealLoc = true] - +- VariableExpression[@DefiningType = "Foo", @Image = "accId", @RealLoc = true] +Added line: 5764 +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 3630 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SoslWithUsermode.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SoslWithUsermode.txt index ccd35086f7..737af44163 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SoslWithUsermode.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SoslWithUsermode.txt @@ -1,23 +1,112 @@ +Added line: 8574 +Added line: 2107 +Added line: 1119 +Added line: 6126 +- ApexFile[@DefiningType = "SoslWithUsermode", @RealLoc = true] +Added line: 8320 +Added line: 6954 +Added line: 120 +Added line: 8941 +Added line: 3944 +Added line: 8943 +Added line: 8192 +- UserClass[@DefiningType = "SoslWithUsermode", @Image = "SoslWithUsermode", @InterfaceNames = (), @Nested = false, @RealLoc = true, @SimpleName = "SoslWithUsermode", @SuperClassName = ""] +Added line: 280 +Added line: 4034 +Added line: 8342 +Added line: 6280 +Added line: 4388 +Added line: 1184 +- ModifierNode[@Abstract = false, @DefiningType = "SoslWithUsermode", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = true, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 7399 +Added line: 427 +Added line: 2379 +Added line: 3589 +Added line: 5132 +- Method[@Arity = 0, @CanonicalName = "example", @Constructor = false, @DefiningType = "SoslWithUsermode", @Image = "example", @RealLoc = true, @ReturnType = "String", @StaticInitializer = false] +- ModifierNode[@Abstract = false, @DefiningType = "SoslWithUsermode", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 9, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = true, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 4932 +Added line: 8966 +Added line: 6488 +Added line: 9557 +Added line: 9182 +Added line: 3365 +- BlockStatement[@CurlyBrace = true, @DefiningType = "SoslWithUsermode", @RealLoc = true] -Added line: 2077 +Added line: 1396 +Added line: 5022 +Added line: 1855 Added line: 816 +Added line: 5937 +Added line: 5678 +- VariableDeclarationStatements[@DefiningType = "SoslWithUsermode", @RealLoc = true] - | +- ModifierNode[@Abstract = false, @DefiningType = "SoslWithUsermode", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] - | +- VariableDeclaration[@DefiningType = "SoslWithUsermode", @Image = "SecondarySearchList", @RealLoc = true, @Type = "String"] +Added line: 9163 +Added line: 3356 +Added line: 4670 +Added line: 7916 +Added line: 2629 +Added line: 6609 +Added line: 2460 +Added line: 6022 +Added line: 7675 +Added line: 8904 +Added line: 6670 | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "SoslWithUsermode", @Double = false, @Image = "test", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 5548 +Added line: 444 +Added line: 773 +Added line: 385 +Added line: 9995 +Added line: 5824 +Added line: 5993 | +- VariableExpression[@DefiningType = "SoslWithUsermode", @Image = "SecondarySearchList", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 8368 +Added line: 9361 +Added line: 9771 +Added line: 5015 +Added line: 5685 Added line: 8929 +Added line: 7792 +Added line: 1172 +Added line: 1987 +Added line: 4167 +Added line: 4707 +Added line: 5873 Added line: 6612 +- ModifierNode[@Abstract = false, @DefiningType = "SoslWithUsermode", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 9449 +Added line: 426 +Added line: 4232 +Added line: 104 +Added line: 386 +- VariableDeclaration[@DefiningType = "SoslWithUsermode", @Image = "accountList", @RealLoc = true, @Type = "List<List<SObject>>"] +Added line: 5625 +Added line: 916 +Added line: 902 +Added line: 6536 +- SoslExpression[@CanonicalQuery = "FIND :tmpVar1\n IN name fields\n RETURNING Account(Id, Account.Name WHERE ID = \'\' LIMIT 100)\n WITH USER_MODE", @DefiningType = "SoslWithUsermode", @Query = "\n find :SecondarySearchList\n in name fields\n returning Account(Id, Account.Name where ID = \'\' limit 100)\n with user_mode\n ", @RealLoc = true] +Added line: 5779 +Added line: 3683 | +- BindExpressions[@DefiningType = "SoslWithUsermode", @RealLoc = true] +Added line: 5266 +Added line: 4286 | +- VariableExpression[@DefiningType = "SoslWithUsermode", @Image = "SecondarySearchList", @RealLoc = true] +Added line: 731 +Added line: 1716 +Added line: 9003 +Added line: 4476 +Added line: 6768 +Added line: 6808 +Added line: 3126 +Added line: 8896 +Added line: 4949 +Added line: 1255 +Added line: 1210 +Added line: 8617 +Added line: 2341 +Added line: 9057 +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 348 Added line: 3932 +Added line: 7290 +Added line: 8067 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SwitchStatements.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SwitchStatements.txt index b864255bef..e8b50094d9 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SwitchStatements.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SwitchStatements.txt @@ -1,78 +1,122 @@ +- ApexFile[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +- UserClass[@DefiningType = "ApexSwitchStatements", @Image = "ApexSwitchStatements", @InterfaceNames = (), @Nested = false, @RealLoc = true, @SimpleName = "ApexSwitchStatements", @SuperClassName = ""] +Added line: 9304 +- ModifierNode[@Abstract = false, @DefiningType = "ApexSwitchStatements", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- Method[@Arity = 0, @CanonicalName = "example1", @Constructor = false, @DefiningType = "ApexSwitchStatements", @Image = "example1", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] | +- ModifierNode[@Abstract = false, @DefiningType = "ApexSwitchStatements", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 5537 +Added line: 633 | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 964 +Added line: 7429 Added line: 6208 +Added line: 8635 | +- VariableDeclarationStatements[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 385 +Added line: 7284 | | +- ModifierNode[@Abstract = false, @DefiningType = "ApexSwitchStatements", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 8164 | | +- VariableDeclaration[@DefiningType = "ApexSwitchStatements", @Image = "i", @RealLoc = true, @Type = "int"] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "3", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] +Added line: 8337 +Added line: 5672 | | +- VariableExpression[@DefiningType = "ApexSwitchStatements", @Image = "i", @RealLoc = true] +Added line: 1463 | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 4721 | +- SwitchStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | +- VariableExpression[@DefiningType = "ApexSwitchStatements", @Image = "i", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 9154 | +- ValueWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] +Added line: 7623 | | +- LiteralCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | | +- PrefixExpression[@DefiningType = "ApexSwitchStatements", @Op = PrefixOperator.NEGATIVE, @RealLoc = true] | | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "2", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] +Added line: 4124 | | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 11 | | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] | | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "when block 2", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] | +- ValueWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] | | +- LiteralCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 2673 +Added line: 5442 +Added line: 984 +Added line: 2275 | | | +- PrefixExpression[@DefiningType = "ApexSwitchStatements", @Op = PrefixOperator.NEGATIVE, @RealLoc = true] | | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "3", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] | | +- LiteralCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 443 | | | +- PrefixExpression[@DefiningType = "ApexSwitchStatements", @Op = PrefixOperator.NEGATIVE, @RealLoc = true] | | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "4", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] +Added line: 9256 +Added line: 521 | | +- LiteralCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 4257 | | | +- PrefixExpression[@DefiningType = "ApexSwitchStatements", @Op = PrefixOperator.NEGATIVE, @RealLoc = true] | | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "5", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] | | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 4998 | | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] | | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "when block 3 and 4 and 5", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] | +- ValueWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] | | +- LiteralCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | | +- PrefixExpression[@DefiningType = "ApexSwitchStatements", @Op = PrefixOperator.NEGATIVE, @RealLoc = true] +Added line: 4883 | | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "6", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] +Added line: 4181 | | +- LiteralCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 4710 +Added line: 3705 Added line: 1081 +Added line: 9374 +Added line: 5744 | | | +- PrefixExpression[@DefiningType = "ApexSwitchStatements", @Op = PrefixOperator.NEGATIVE, @RealLoc = true] +Added line: 8402 | | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "7", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] | | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] | | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "when block 6 and 7", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 5884 +Added line: 6470 | +- ValueWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] | | +- LiteralCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 248 +Added line: 1797 | | | +- PrefixExpression[@DefiningType = "ApexSwitchStatements", @Op = PrefixOperator.NEGATIVE, @RealLoc = true] | | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "3", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] +Added line: 4004 | | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] +Added line: 108 | | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "when block -3", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] | +- ValueWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] +Added line: 6070 | | +- LiteralCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "", @Integer = false, @LiteralType = LiteralType.NULL, @Long = false, @Name = null, @Null = true, @RealLoc = true, @String = false] | | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] +Added line: 2852 | | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "bad integer", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] | +- ElseWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 1394 | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] +Added line: 5597 | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +Added line: 4670 | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "default", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +- Method[@Arity = 0, @CanonicalName = "example2", @Constructor = false, @DefiningType = "ApexSwitchStatements", @Image = "example2", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] | +- ModifierNode[@Abstract = false, @DefiningType = "ApexSwitchStatements", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] @@ -84,11 +128,13 @@ Added line: 8689 | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "1", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] | | +- VariableExpression[@DefiningType = "ApexSwitchStatements", @Image = "i", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 3789 | +- SwitchStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "someInteger", @InputParametersSize = 1, @MethodName = "someInteger", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | | +- VariableExpression[@DefiningType = "ApexSwitchStatements", @Image = "i", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 6354 | +- ValueWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] | | +- LiteralCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | | +- PrefixExpression[@DefiningType = "ApexSwitchStatements", @Op = PrefixOperator.NEGATIVE, @RealLoc = true] @@ -96,13 +142,22 @@ Added line: 8689 | | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] +Added line: 7711 +Added line: 6097 +Added line: 3425 | | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] - | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "when block 2", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 4005 +Added line: 4704 +Added line: 1518 +Added line: 8356 | +- ValueWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] | | +- LiteralCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 7344 | | | +- PrefixExpression[@DefiningType = "ApexSwitchStatements", @Op = PrefixOperator.NEGATIVE, @RealLoc = true] | | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "3", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] +Added line: 7327 | | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 5423 | | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] | | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] @@ -113,6 +168,7 @@ Added line: 8689 | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "default", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 7765 +- Method[@Arity = 1, @CanonicalName = "someInteger", @Constructor = false, @DefiningType = "ApexSwitchStatements", @Image = "someInteger", @RealLoc = true, @ReturnType = "int", @StaticInitializer = false] | +- ModifierNode[@Abstract = false, @DefiningType = "ApexSwitchStatements", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 2, @Override = false, @Private = true, @Protected = false, @Public = false, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- Parameter[@DefiningType = "ApexSwitchStatements", @Image = "i", @RealLoc = true, @Type = "int"] @@ -120,69 +176,98 @@ Added line: 8689 | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] | +- ReturnStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | +- BinaryExpression[@DefiningType = "ApexSwitchStatements", @Op = BinaryOperator.ADDITION, @RealLoc = true] +Added line: 8066 +Added line: 3299 | +- VariableExpression[@DefiningType = "ApexSwitchStatements", @Image = "i", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "1", @Integer = true, @LiteralType = LiteralType.INTEGER, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = false] +- Method[@Arity = 0, @CanonicalName = "example3", @Constructor = false, @DefiningType = "ApexSwitchStatements", @Image = "example3", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] - | +- ModifierNode[@Abstract = false, @DefiningType = "ApexSwitchStatements", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 9955 | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] | +- SwitchStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] - | +- VariableExpression[@DefiningType = "ApexSwitchStatements", @Image = "sobject", @RealLoc = true] +Added line: 3820 | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- TypeWhenBlock[@DefiningType = "ApexSwitchStatements", @Name = "a", @RealLoc = false, @Type = "Account"] | | +- VariableDeclarationStatements[@DefiningType = "ApexSwitchStatements", @RealLoc = true] - | | | +- ModifierNode[@Abstract = false, @DefiningType = "ApexSwitchStatements", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | | | +- VariableDeclaration[@DefiningType = "ApexSwitchStatements", @Image = "a", @RealLoc = true, @Type = "Account"] | | | +- VariableExpression[@DefiningType = "ApexSwitchStatements", @Image = "a", @RealLoc = true] +Added line: 4152 | | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- BinaryExpression[@DefiningType = "ApexSwitchStatements", @Op = BinaryOperator.ADDITION, @RealLoc = true] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "account ", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] | | +- VariableExpression[@DefiningType = "ApexSwitchStatements", @Image = "a", @RealLoc = true] - | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 7144 | +- TypeWhenBlock[@DefiningType = "ApexSwitchStatements", @Name = "c", @RealLoc = false, @Type = "Contact"] +Added line: 4430 +Added line: 6935 | | +- VariableDeclarationStatements[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 164 | | | +- ModifierNode[@Abstract = false, @DefiningType = "ApexSwitchStatements", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 2349 | | | +- VariableDeclaration[@DefiningType = "ApexSwitchStatements", @Image = "c", @RealLoc = true, @Type = "Contact"] +Added line: 1554 | | | +- VariableExpression[@DefiningType = "ApexSwitchStatements", @Image = "c", @RealLoc = true] +Added line: 7084 | | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] - | | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] +Added line: 451 | | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +Added line: 6782 | | +- BinaryExpression[@DefiningType = "ApexSwitchStatements", @Op = BinaryOperator.ADDITION, @RealLoc = true] +Added line: 3104 +Added line: 6630 +Added line: 3165 | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "contact ", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 8476 | | +- VariableExpression[@DefiningType = "ApexSwitchStatements", @Image = "c", @RealLoc = true] +Added line: 5721 | +- ValueWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] | | +- LiteralCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 8968 +Added line: 2256 +Added line: 6312 | | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "", @Integer = false, @LiteralType = LiteralType.NULL, @Long = false, @Name = null, @Null = true, @RealLoc = true, @String = false] | | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 1586 | | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] | | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "null", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] | +- ElseWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 886 +Added line: 33 | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "default", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 2926 +- Method[@Arity = 0, @CanonicalName = "example4", @Constructor = false, @DefiningType = "ApexSwitchStatements", @Image = "example4", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] +- ModifierNode[@Abstract = false, @DefiningType = "ApexSwitchStatements", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 6741 +Added line: 7784 Added line: 9979 Added line: 4876 +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 3114 +Added line: 2684 +- SwitchStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 6496 +- VariableExpression[@DefiningType = "ApexSwitchStatements", @Image = "season", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- ValueWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] | +- IdentifierCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +Added line: 9466 +Added line: 2668 | +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "boots", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 8708 +- ValueWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] | +- IdentifierCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] | +- IdentifierCase[@DefiningType = "ApexSwitchStatements", @RealLoc = true] @@ -191,9 +276,13 @@ Added line: 4876 | +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] | +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "sandals", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 3725 +Added line: 304 +Added line: 3393 +- ElseWhenBlock[@DefiningType = "ApexSwitchStatements", @RealLoc = false] +- BlockStatement[@CurlyBrace = true, @DefiningType = "ApexSwitchStatements", @RealLoc = true] +- ExpressionStatement[@DefiningType = "ApexSwitchStatements", @RealLoc = true] +- MethodCallExpression[@DefiningType = "ApexSwitchStatements", @FullMethodName = "System.debug", @InputParametersSize = 1, @MethodName = "debug", @RealLoc = true] +- ReferenceExpression[@DefiningType = "ApexSwitchStatements", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ApexSwitchStatements", @Double = false, @Image = "none of the above", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 8959 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/ToLabelInSosl.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/ToLabelInSosl.txt index 2890604c7f..4e0a1e494f 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/ToLabelInSosl.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/ToLabelInSosl.txt @@ -1,19 +1,108 @@ +- ApexFile[@DefiningType = "ToLabelInSosl", @RealLoc = true] +Added line: 1666 +Added line: 634 +Added line: 4651 +Added line: 4439 +Added line: 8518 +Added line: 6463 +Added line: 7701 +Added line: 9106 +Added line: 5749 +Added line: 524 +Added line: 3277 +Added line: 3371 +Added line: 7795 +Added line: 4964 +Added line: 8615 +- UserClass[@DefiningType = "ToLabelInSosl", @Image = "ToLabelInSosl", @InterfaceNames = (), @Nested = false, @RealLoc = true, @SimpleName = "ToLabelInSosl", @SuperClassName = ""] +Added line: 442 +Added line: 6236 +Added line: 8089 +Added line: 4466 +Added line: 9873 +Added line: 6740 +- ModifierNode[@Abstract = false, @DefiningType = "ToLabelInSosl", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = true, @WithoutSharing = false] +Added line: 5779 +- Method[@Arity = 0, @CanonicalName = "doSoslSearch", @Constructor = false, @DefiningType = "ToLabelInSosl", @Image = "doSoslSearch", @RealLoc = true, @ReturnType = "Object", @StaticInitializer = false] +Added line: 2453 +Added line: 9516 +Added line: 1781 +Added line: 8463 +Added line: 3784 +Added line: 7580 +- ModifierNode[@Abstract = false, @DefiningType = "ToLabelInSosl", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] -Added line: 7000 +Added line: 5024 +Added line: 9962 +Added line: 3772 +Added line: 4334 +Added line: 9613 +Added line: 6019 +Added line: 3912 +Added line: 9600 +Added line: 6029 +Added line: 4374 +Added line: 3215 +Added line: 3306 +Added line: 301 +Added line: 5093 +Added line: 7734 | +- ModifierNode[@Abstract = false, @DefiningType = "ToLabelInSosl", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 4067 +Added line: 7330 +Added line: 6595 +Added line: 9677 +Added line: 3251 | +- VariableDeclaration[@DefiningType = "ToLabelInSosl", @Image = "searchResults", @RealLoc = true, @Type = "List<List<SObject>>"] | +- SoslExpression[@CanonicalQuery = "FIND :tmpVar1\n IN ALL FIELDS\n RETURNING\n Account(Id, TOLABEL(Name))\n LIMIT 10", @DefiningType = "ToLabelInSosl", @Query = "\n FIND :searchTerm\n IN ALL FIELDS\n RETURNING\n Account(Id, toLabel(Name))\n LIMIT 10\n ", @RealLoc = true] +Added line: 3219 +Added line: 7379 | | +- BindExpressions[@DefiningType = "ToLabelInSosl", @RealLoc = true] +Added line: 87 +Added line: 129 +Added line: 2768 +Added line: 9696 +Added line: 9739 Added line: 518 +Added line: 3104 +Added line: 7334 +Added line: 7268 +Added line: 8270 +Added line: 8865 +Added line: 6497 +Added line: 3862 +Added line: 2999 +Added line: 3879 +Added line: 5788 | | +- VariableExpression[@DefiningType = "ToLabelInSosl", @Image = "searchTerm", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 4040 +Added line: 2002 +Added line: 9491 | +- VariableExpression[@DefiningType = "ToLabelInSosl", @Image = "searchResults", @RealLoc = true] Added line: 6179 +Added line: 5562 +Added line: 690 +Added line: 729 +Added line: 3087 +Added line: 3838 +Added line: 8468 Added line: 260 Added line: 7973 +Added line: 7574 +Added line: 5009 +Added line: 7597 +Added line: 3344 +Added line: 6464 +Added line: 44 +Added line: 1296 +Added line: 3696 +Added line: 7226 +- ReturnStatement[@DefiningType = "ToLabelInSosl", @RealLoc = true] +Added line: 6036 +Added line: 5112 +Added line: 2768 +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "ToLabelInSosl", @Double = false, @Image = "", @Integer = false, @LiteralType = LiteralType.NULL, @Long = false, @Name = null, @Null = true, @RealLoc = true, @String = false] +Added line: 3596 +Added line: 2921 +Added line: 6553 +Added line: 4488 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/TriggerWithMethod.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/TriggerWithMethod.txt index ebbf46a1b1..b4210405ba 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/TriggerWithMethod.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/TriggerWithMethod.txt @@ -1,37 +1,126 @@ +- ApexFile[@DefiningType = "TriggerWithMethod", @RealLoc = true] +Added line: 1161 +Added line: 1085 +Added line: 8818 +Added line: 9070 +Added line: 4625 +Added line: 9854 +- UserTrigger[@DefiningType = "TriggerWithMethod", @Image = "TriggerWithMethod", @Nested = false, @RealLoc = true, @SimpleName = "TriggerWithMethod", @TargetName = "DraftEmailMessage__c", @Usages = (TriggerUsage.AFTER_UPDATE)] +Added line: 5976 +- ModifierNode[@Abstract = false, @DefiningType = "TriggerWithMethod", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 4160 +Added line: 5436 +- Field[@DefiningType = "TriggerWithMethod", @Image = "body", @Name = "body", @RealLoc = true, @Type = "String", @Value = "email body"] +Added line: 617 | +- ModifierNode[@Abstract = false, @DefiningType = "TriggerWithMethod", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] - +- Method[@Arity = 2, @CanonicalName = "sendEmail", @Constructor = false, @DefiningType = "TriggerWithMethod", @Image = "sendEmail", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] +Added line: 7552 +Added line: 9513 +Added line: 4128 +Added line: 5720 +Added line: 8291 +Added line: 2370 +Added line: 3692 +Added line: 4130 +Added line: 8970 +Added line: 2453 | +- ModifierNode[@Abstract = false, @DefiningType = "TriggerWithMethod", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 2, @Override = false, @Private = true, @Protected = false, @Public = false, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 6530 +Added line: 891 +Added line: 385 | +- Parameter[@DefiningType = "TriggerWithMethod", @Image = "demInstance", @RealLoc = true, @Type = "DraftEmailMessage__c"] +Added line: 9287 +Added line: 9844 +Added line: 1231 +Added line: 2812 +Added line: 9797 +Added line: 4576 +Added line: 215 +Added line: 4935 +Added line: 1710 +Added line: 9274 +Added line: 4790 | | +- ModifierNode[@Abstract = false, @DefiningType = "TriggerWithMethod", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- Parameter[@DefiningType = "TriggerWithMethod", @Image = "emailBody", @RealLoc = true, @Type = "String"] | | +- ModifierNode[@Abstract = false, @DefiningType = "TriggerWithMethod", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 5963 +Added line: 5311 +Added line: 9857 +Added line: 8466 +Added line: 5551 +Added line: 6382 +Added line: 1916 | +- BlockStatement[@CurlyBrace = true, @DefiningType = "TriggerWithMethod", @RealLoc = true] +Added line: 4556 +Added line: 8646 +Added line: 8665 +Added line: 8672 +- Method[@Arity = 0, @CanonicalName = "invoke", @Constructor = false, @DefiningType = "TriggerWithMethod", @Image = "invoke", @RealLoc = false, @ReturnType = "void", @StaticInitializer = false] +Added line: 4882 +Added line: 2055 +- ModifierNode[@Abstract = false, @DefiningType = "TriggerWithMethod", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- FieldDeclarationStatements[@DefiningType = "TriggerWithMethod", @RealLoc = true, @TypeArguments = (), @TypeName = "String"] +Added line: 8056 +Added line: 9347 +Added line: 5112 | +- ModifierNode[@Abstract = false, @DefiningType = "TriggerWithMethod", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 7068 +Added line: 7267 | +- FieldDeclaration[@DefiningType = "TriggerWithMethod", @Image = "body", @Name = "body", @RealLoc = true] +Added line: 798 +Added line: 9232 +Added line: 5527 +Added line: 507 | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "TriggerWithMethod", @Double = false, @Image = "email body", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +Added line: 4277 | +- VariableExpression[@DefiningType = "TriggerWithMethod", @Image = "body", @RealLoc = true] +Added line: 1790 +Added line: 1949 +Added line: 9505 +Added line: 7025 +Added line: 504 +Added line: 2806 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- ForEachStatement[@DefiningType = "TriggerWithMethod", @RealLoc = true] +- VariableDeclarationStatements[@DefiningType = "TriggerWithMethod", @RealLoc = true] | +- ModifierNode[@Abstract = false, @DefiningType = "TriggerWithMethod", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 8275 +Added line: 9064 +Added line: 2853 +Added line: 8260 +Added line: 2823 | +- VariableDeclaration[@DefiningType = "TriggerWithMethod", @Image = "demInstance", @RealLoc = true, @Type = "DraftEmailMessage__c"] | +- VariableExpression[@DefiningType = "TriggerWithMethod", @Image = "demInstance", @RealLoc = true] +Added line: 3912 +Added line: 5421 +Added line: 9228 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] - +- VariableExpression[@DefiningType = "TriggerWithMethod", @Image = "demInstance", @RealLoc = true] +Added line: 2839 +Added line: 3293 +Added line: 6465 +Added line: 1142 +Added line: 2178 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 1620 +- BlockStatement[@CurlyBrace = true, @DefiningType = "TriggerWithMethod", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "TriggerWithMethod", @RealLoc = true] +Added line: 1539 +Added line: 2204 +Added line: 4223 | +- MethodCallExpression[@DefiningType = "TriggerWithMethod", @FullMethodName = "sendEmail", @InputParametersSize = 2, @MethodName = "sendEmail", @RealLoc = true] +Added line: 4241 +Added line: 72 +Added line: 3440 +Added line: 4816 +Added line: 2825 | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 6873 +Added line: 4122 | +- VariableExpression[@DefiningType = "TriggerWithMethod", @Image = "demInstance", @RealLoc = true] +Added line: 5528 +Added line: 229 +Added line: 111 | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- VariableExpression[@DefiningType = "TriggerWithMethod", @Image = "emailBody", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +Added line: 1334 +- TriggerVariableExpression[@DefiningType = "TriggerWithMethod", @RealLoc = true] diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/TypeofTest.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/TypeofTest.txt index d1f619618f..a80f29b402 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/TypeofTest.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/TypeofTest.txt @@ -1,14 +1,103 @@ +Added line: 3528 Added line: 7196 +Added line: 6260 +Added line: 7472 +Added line: 8407 +Added line: 4917 +Added line: 5024 +Added line: 2348 +- ApexFile[@DefiningType = "TypeofTest", @RealLoc = true] +Added line: 1477 +Added line: 5677 +Added line: 9139 +Added line: 8444 +Added line: 1783 +Added line: 2390 +- ModifierNode[@Abstract = false, @DefiningType = "TypeofTest", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 9772 +Added line: 4305 +Added line: 5393 +- Method[@Arity = 0, @CanonicalName = "test", @Constructor = false, @DefiningType = "TypeofTest", @Image = "test", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] +Added line: 7836 +- ModifierNode[@Abstract = false, @DefiningType = "TypeofTest", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 8, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = true, @Static = true, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 3051 +Added line: 9841 +Added line: 8693 +Added line: 585 +Added line: 9666 +Added line: 2951 +Added line: 726 +Added line: 5819 +- BlockStatement[@CurlyBrace = true, @DefiningType = "TypeofTest", @RealLoc = true] +Added line: 8367 +Added line: 742 Added line: 5115 +Added line: 222 +Added line: 5386 +Added line: 2893 +Added line: 3653 +Added line: 9884 +Added line: 3242 +Added line: 3271 Added line: 6367 +Added line: 2044 +Added line: 9160 +Added line: 1267 +Added line: 5224 +Added line: 2537 +Added line: 6676 +Added line: 305 +Added line: 9115 +Added line: 5879 +Added line: 8756 +Added line: 5554 +Added line: 1513 +Added line: 7180 +Added line: 6200 +Added line: 2383 +Added line: 5328 +Added line: 5609 +Added line: 8480 +Added line: 5340 +Added line: 9108 +Added line: 6874 +Added line: 3490 +Added line: 4251 +Added line: 3824 +Added line: 4940 +Added line: 3794 +Added line: 3792 +Added line: 9459 +Added line: 9832 +Added line: 1505 +Added line: 6873 +Added line: 2304 +- ModifierNode[@Abstract = false, @DefiningType = "TypeofTest", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +Added line: 7450 +Added line: 2295 +Added line: 6234 +Added line: 6648 +Added line: 5393 +- VariableDeclaration[@DefiningType = "TypeofTest", @Image = "c", @RealLoc = true, @Type = "Case"] +Added line: 6970 +Added line: 7539 +Added line: 749 +Added line: 7620 +Added line: 6413 +Added line: 585 Added line: 3817 +Added line: 7121 +Added line: 3016 +- SoqlExpression[@CanonicalQuery = "SELECT\n\t\t\t\tId,\n\t\t\t\tSubject,\n\t\t\t\tDescription,\n\t\t\t\tTYPEOF Owner\n\t\t\t\t\tWHEN Group THEN Name\n\t\t\t\t\tWHEN User THEN Name\n\t\t\t\tEND,\n\t\t\t\t(\n\t\t\t\t\tSELECT\n\t\t\t\t\t\tId,\n\t\t\t\t\t\tSubject,\n\t\t\t\t\t\tDescription,\n\t\t\t\t\t\tTYPEOF Owner\n\t\t\t\t\t\t\tWHEN Group THEN Name\n\t\t\t\t\t\t\tWHEN User THEN Name\n\t\t\t\t\t\tEND\n\t\t\t\t\tFROM Cases\n\t\t\t\t)\n\t\t\tFROM Case", @DefiningType = "TypeofTest", @Query = "SELECT\n\t\t\t\tId,\n\t\t\t\tSubject,\n\t\t\t\tDescription,\n\t\t\t\tTYPEOF Owner\n\t\t\t\t\tWHEN Group THEN Name\n\t\t\t\t\tWHEN User THEN Name\n\t\t\t\tEND,\n\t\t\t\t(\n\t\t\t\t\tSELECT\n\t\t\t\t\t\tId,\n\t\t\t\t\t\tSubject,\n\t\t\t\t\t\tDescription,\n\t\t\t\t\t\tTYPEOF Owner\n\t\t\t\t\t\t\tWHEN Group THEN Name\n\t\t\t\t\t\t\tWHEN User THEN Name\n\t\t\t\t\t\tEND\n\t\t\t\t\tFROM Cases\n\t\t\t\t)\n\t\t\tFROM Case", @RealLoc = true] +Added line: 3768 +Added line: 834 +Added line: 8487 +Added line: 273 +Added line: 852 +- VariableExpression[@DefiningType = "TypeofTest", @Image = "c", @RealLoc = true] Added line: 4724 +Added line: 342 +Added line: 2229 +Added line: 7984 +Added line: 2319 +Added line: 3510 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/UserEnumType.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/UserEnumType.txt index 14e3033b9a..a07b6836fe 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/UserEnumType.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/UserEnumType.txt @@ -1,7 +1,96 @@ +Added line: 5261 Added line: 9475 +Added line: 5735 +Added line: 3147 +Added line: 2500 +Added line: 5015 +Added line: 4168 +Added line: 19 +Added line: 3816 +Added line: 3910 +Added line: 5934 +Added line: 763 +Added line: 3615 +Added line: 3339 +Added line: 880 +- ApexFile[@DefiningType = "MyEnumType", @RealLoc = true] +Added line: 8737 +Added line: 2704 +Added line: 7703 +Added line: 1386 +Added line: 8950 Added line: 3465 +Added line: 4087 +Added line: 1276 +Added line: 8741 +Added line: 6657 +Added line: 1420 +Added line: 4135 +- UserEnum[@DefiningType = "MyEnumType", @Image = "MyEnumType", @Nested = false, @RealLoc = true, @SimpleName = "MyEnumType"] +Added line: 3728 +Added line: 6394 +Added line: 5757 +Added line: 8530 +Added line: 8663 +Added line: 2106 +Added line: 9100 +Added line: 6982 +Added line: 7502 +Added line: 6411 +Added line: 6781 +Added line: 4573 Added line: 8176 - +- Field[@DefiningType = "MyEnumType", @Image = "B", @Name = "B", @RealLoc = true, @Type = "MyEnumType", @Value = null] +Added line: 9097 +Added line: 6926 +Added line: 2212 +Added line: 1017 +Added line: 5468 +Added line: 2652 +Added line: 4444 +Added line: 2452 +Added line: 7148 +Added line: 8793 +Added line: 4880 +Added line: 9201 +Added line: 4940 +Added line: 4220 +Added line: 6106 +Added line: 4842 +Added line: 2387 +Added line: 885 +Added line: 7650 +Added line: 9620 +Added line: 6520 +Added line: 7013 +Added line: 3324 +Added line: 3717 +Added line: 3449 +Added line: 5920 +Added line: 2943 +Added line: 1086 +Added line: 1464 +Added line: 1945 +Added line: 544 +Added line: 9260 +Added line: 9 +Added line: 4586 +Added line: 9130 +Added line: 4628 +Added line: 6200 +Added line: 3701 +Added line: 2514 +Added line: 613 +Added line: 7044 +Added line: 1604 +Added line: 9258 +Added line: 237 +Added line: 5562 +Added line: 3142 Added line: 2416 +Added line: 1923 +Added line: 7074 +Added line: 5505 +Added line: 4844 +Added line: 5526 +Added line: 7188 +Added line: 9462 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/Simple.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/Simple.txt index 2f7666c030..ff1ccec1ad 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/Simple.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/Simple.txt @@ -1,37 +1,126 @@ +Added line: 5731 +Added line: 6030 +Added line: 7212 +Added line: 682 +Added line: 8688 [Image] or [Truncated image[ Bcol Ecol +Added line: 9763 +Added line: 7847 +Added line: 1865 +Added line: 7415 L4 +Added line: 6614 [public] 1 7 +Added line: 6452 +Added line: 2022 +Added line: 8161 [with] 8 12 +Added line: 1439 [sharing] 13 20 +Added line: 5243 +Added line: 9098 [class] 21 26 +Added line: 6397 +Added line: 4000 +Added line: 4925 +Added line: 2079 +Added line: 5899 +Added line: 2636 [simple] 27 33 [{] 34 35 +Added line: 424 +Added line: 4646 +Added line: 3145 Added line: 7352 L5 [public] 5 11 [string] 12 18 +Added line: 6077 +Added line: 2046 Added line: 8632 +Added line: 9262 Added line: 2637 +Added line: 5281 [someparam] 19 28 +Added line: 66 [{] 29 30 - [get] 31 34 +Added line: 3593 +Added line: 5830 +Added line: 6510 +Added line: 872 +Added line: 539 +Added line: 2351 +Added line: 1883 +Added line: 4234 +Added line: 28 [;] 34 35 [set] 36 39 +Added line: 8407 +Added line: 3759 Added line: 1957 +Added line: 3257 [;] 39 40 +Added line: 5140 [}] 41 42 +Added line: 3287 +Added line: 3235 +Added line: 7718 +Added line: 5933 +Added line: 4308 +Added line: 9751 L7 [public] 5 11 +Added line: 5536 +Added line: 2117 +Added line: 9100 +Added line: 1404 +Added line: 8066 [void] 12 16 +Added line: 5506 +Added line: 9618 [(] 24 25 +Added line: 6262 [)] 25 26 [{] 27 28 +Added line: 159 +Added line: 6220 +Added line: 636 +Added line: 1470 +Added line: 9279 +Added line: 2169 +Added line: 9977 +Added line: 6934 +Added line: 7654 +Added line: 3330 +Added line: 9401 +Added line: 4164 L8 +Added line: 6950 +Added line: 7040 +Added line: 1446 [someparam] 9 18 +Added line: 5861 +Added line: 7352 [=] 19 20 ['test'] 21 27 [;] 27 28 +Added line: 7144 +Added line: 1601 +Added line: 1711 +Added line: 1243 +Added line: 542 L9 +Added line: 6063 +Added line: 6489 +Added line: 1678 [}] 5 6 +Added line: 4441 +Added line: 834 L10 +Added line: 2511 +Added line: 2662 +Added line: 3196 +Added line: 4305 EOF +Added line: 1456 +Added line: 7444 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/StringLiterals5053.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/StringLiterals5053.txt index d6a50ac690..40994def18 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/StringLiterals5053.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/StringLiterals5053.txt @@ -1,47 +1,136 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 9611 +Added line: 5719 L7 +Added line: 6222 [public] 1 7 +Added line: 1086 +Added line: 8296 +Added line: 9204 [with] 8 12 -Added line: 1552 +Added line: 153 +Added line: 485 +Added line: 3743 +Added line: 6903 +Added line: 372 +Added line: 9802 +Added line: 282 [sharing] 13 20 [class] 21 26 +Added line: 4027 +Added line: 8910 +Added line: 9481 +Added line: 9531 +Added line: 2343 [pmd7cpd] 27 34 [{] 35 36 L8 +Added line: 6001 +Added line: 4716 [static] 12 18 [void] 19 23 +Added line: 3004 +Added line: 2510 +Added line: 6861 +Added line: 7245 +Added line: 9940 +Added line: 399 +Added line: 4641 +Added line: 3890 +Added line: 6738 +Added line: 8042 +Added line: 6244 Added line: 6312 +Added line: 1059 +Added line: 8168 +Added line: 3168 [(] 31 32 +Added line: 5312 +Added line: 3040 [)] 32 33 [{] 33 34 +Added line: 2747 +Added line: 2125 +Added line: 9049 +Added line: 4595 L9 [str] 14 17 [=] 18 19 ['alice'] 20 27 +Added line: 7336 Added line: 8896 [;] 27 28 Added line: 6993 L10 +Added line: 4875 [str] 7 10 [str] 13 16 Added line: 6665 +Added line: 2302 [.] 16 17 +Added line: 1327 +Added line: 1010 +Added line: 1582 +Added line: 6516 +Added line: 8615 +Added line: 1020 +Added line: 930 +Added line: 64 Added line: 5576 +Added line: 4559 [replace] 17 24 +Added line: 2595 +Added line: 7179 [(] 24 25 +Added line: 1975 +Added line: 9723 ['alice'] 25 32 +Added line: 4632 +Added line: 6819 [,] 32 33 +Added line: 3770 +Added line: 4439 +Added line: 1885 +Added line: 309 +Added line: 8224 +Added line: 7207 +Added line: 2244 +Added line: 8673 Added line: 5992 +Added line: 3647 +Added line: 2613 Added line: 3846 +Added line: 8173 ['<bob></charlie>dan<!--johannheinr[ 34 84 +Added line: 1397 +Added line: 9704 +Added line: 1550 +Added line: 3795 [+] 85 86 +Added line: 3196 +Added line: 712 +Added line: 5438 ['\\u00a0'] 87 95 [+] 96 97 +Added line: 4929 ['"100%"'] 98 106 +Added line: 7384 [)] 106 107 [;] 107 108 +Added line: 4624 +Added line: 856 L11 [}] 5 6 -L12 +Added line: 3510 +Added line: 7948 +Added line: 7154 +Added line: 2260 +Added line: 1980 +Added line: 2140 +Added line: 1051 [}] 1 2 +Added line: 2274 +Added line: 4306 +Added line: 7466 +Added line: 9903 EOF diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/comments.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/comments.txt index 466927ec64..b66ec49cc0 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/comments.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/comments.txt @@ -1,21 +1,110 @@ +Added line: 7826 +Added line: 8117 +Added line: 7889 +Added line: 5995 +Added line: 5479 +Added line: 9962 +Added line: 8304 +Added line: 1467 +Added line: 9104 +Added line: 4196 +Added line: 5620 +Added line: 2404 +Added line: 4939 +Added line: 6969 [Image] or [Truncated image[ Bcol Ecol +Added line: 9640 +Added line: 8033 L8 [public] 1 7 +Added line: 7096 +Added line: 9083 +Added line: 4873 [with] 8 12 +Added line: 619 +Added line: 559 +Added line: 1895 +Added line: 6264 +Added line: 1167 +Added line: 5971 +Added line: 800 +Added line: 6360 +Added line: 4116 +Added line: 9139 [sharing] 13 20 +Added line: 4558 +Added line: 1885 +Added line: 9245 +Added line: 7053 +Added line: 6386 [class] 21 26 [sfdcencoderconstants] 27 47 +Added line: 2461 +Added line: 2071 +Added line: 4727 +Added line: 1320 +Added line: 1751 [{] 48 49 L12 +Added line: 3449 +Added line: 8406 +Added line: 506 +Added line: 6353 [public] 2 8 - [string] 9 15 +Added line: 7820 +Added line: 823 +Added line: 5184 +Added line: 8186 +Added line: 1658 +Added line: 4863 +Added line: 8845 +Added line: 7054 [someparam] 16 25 +Added line: 4526 +Added line: 7890 +Added line: 6510 +Added line: 9527 +Added line: 2923 [{] 26 27 +Added line: 6351 +Added line: 2788 +Added line: 3819 +Added line: 4312 +Added line: 1445 [get] 28 31 +Added line: 5779 +Added line: 8602 +Added line: 4542 [;] 31 32 [set] 33 36 +Added line: 5939 +Added line: 6944 [;] 36 37 +Added line: 2113 +Added line: 9718 +Added line: 7527 [}] 38 39 L13 +Added line: 7716 +Added line: 9451 +Added line: 6405 +Added line: 4402 +Added line: 3659 +Added line: 5477 +Added line: 7923 +Added line: 3140 +Added line: 9925 +Added line: 8731 +Added line: 1933 [}] 1 2 +Added line: 1932 +Added line: 3277 +Added line: 6297 +Added line: 4077 +Added line: 8813 +Added line: 2986 EOF +Added line: 5819 +Added line: 3462 +Added line: 1852 +Added line: 9391 diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/tabWidth.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/tabWidth.txt index 178da80104..34e34c557a 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/tabWidth.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/cpd/testdata/tabWidth.txt @@ -1,35 +1,124 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 9589 L4 [public] 1 7 +Added line: 119 +Added line: 9633 +Added line: 6996 +Added line: 5680 +Added line: 1467 +Added line: 4820 +Added line: 7884 +Added line: 8136 [with] 8 12 +Added line: 4371 +Added line: 2845 +Added line: 1627 [sharing] 13 20 +Added line: 4302 +Added line: 4584 +Added line: 2464 +Added line: 697 +Added line: 7130 [class] 21 26 [simple] 27 33 [{] 34 35 +Added line: 786 +Added line: 1338 L5 +Added line: 7820 +Added line: 6055 [public] 2 8 +Added line: 4463 +Added line: 9064 [string] 9 15 +Added line: 5299 +Added line: 2802 +Added line: 1219 +Added line: 9289 +Added line: 6807 +Added line: 1654 +Added line: 1172 +Added line: 9966 +Added line: 8877 [someparam] 16 25 - [{] 26 27 +Added line: 3757 [get] 28 31 - [;] 31 32 +Added line: 361 [set] 33 36 - [;] 36 37 - [}] 38 39 +Added line: 2165 +Added line: 5556 +Added line: 1174 +Added line: 9663 +Added line: 5944 +Added line: 5912 +Added line: 6000 +Added line: 9732 +Added line: 9719 L7 +Added line: 9391 [public] 2 8 +Added line: 8365 [void] 9 13 +Added line: 7434 +Added line: 9210 +Added line: 7531 +Added line: 3354 +Added line: 6144 +Added line: 1210 +Added line: 2576 +Added line: 6896 +Added line: 4679 +Added line: 2009 +Added line: 7055 [getinit] 14 21 [(] 21 22 +Added line: 3568 [)] 22 23 +Added line: 1048 +Added line: 8940 +Added line: 8586 +Added line: 9218 +Added line: 5150 +Added line: 3284 [{] 24 25 +Added line: 4691 +Added line: 650 +Added line: 9967 +Added line: 868 +Added line: 8431 +Added line: 1880 +Added line: 6647 L8 +Added line: 889 +Added line: 3717 +Added line: 7737 +Added line: 9983 +Added line: 7117 [someparam] 3 12 +Added line: 8533 +Added line: 7779 [=] 13 14 +Added line: 6892 +Added line: 515 ['test'] 15 21 [;] 21 22 +Added line: 3512 +Added line: 4749 +Added line: 183 L9 - [}] 2 3 +Added line: 2236 +Added line: 1436 +Added line: 5199 L10 - [}] 1 2 +Added line: 7256 +Added line: 8435 +Added line: 1760 +Added line: 5365 EOF +Added line: 3131 +Added line: 2147 +Added line: 2676 +Added line: 6935 +Added line: 9833 +Added line: 8155 diff --git a/pmd-cli/src/main/resources/net/sourceforge/pmd/cli/internal/banner.txt b/pmd-cli/src/main/resources/net/sourceforge/pmd/cli/internal/banner.txt index d1cad9dba1..c1f79faaf2 100644 --- a/pmd-cli/src/main/resources/net/sourceforge/pmd/cli/internal/banner.txt +++ b/pmd-cli/src/main/resources/net/sourceforge/pmd/cli/internal/banner.txt @@ -1,8 +1,97 @@ +Added line: 4629 +Added line: 4307 +Added line: 5288 +Added line: 5656 +Added line: 2438 +Added line: 2697 ████ ████ +Added line: 5612 +Added line: 4898 ██ ██ - ██ █████ █ ███ ███ ███████ ██ +Added line: 9254 +Added line: 5824 +Added line: 5447 +Added line: 358 +Added line: 5091 +Added line: 856 ███ ██ ███ ████ ████ ██ ██ ███ +Added line: 3938 +Added line: 4438 +Added line: 5176 +Added line: 2222 +Added line: 2166 +Added line: 3396 +Added line: 9641 +Added line: 9830 +Added line: 1685 +Added line: 163 +Added line: 5240 +Added line: 4092 +Added line: 3706 +Added line: 6455 +Added line: 2473 +Added line: 6271 +Added line: 9232 +Added line: 5852 +Added line: 8602 +Added line: 5071 +Added line: 1872 +Added line: 6892 +Added line: 444 +Added line: 7781 +Added line: 6223 +Added line: 8918 +Added line: 5982 +Added line: 2164 +Added line: 8739 +Added line: 3185 +Added line: 6565 ███ ███████ ██ ████ ██ ██ ██ ███ +Added line: 7517 +Added line: 6030 +Added line: 5290 +Added line: 4849 +Added line: 7452 ██ ██ ██ ██ ██ ███████ ██ +Added line: 3168 +Added line: 7768 +Added line: 6485 +Added line: 9541 +Added line: 7746 +Added line: 5519 +Added line: 1020 +Added line: 7145 +Added line: 1597 +Added line: 3465 +Added line: 9613 +Added line: 3463 ██ ██ +Added line: 3273 +Added line: 4389 ████ ████ +Added line: 3691 +Added line: 6913 +Added line: 4260 +Added line: 8474 +Added line: 643 +Added line: 2813 +Added line: 1408 +Added line: 8455 +Added line: 6074 +Added line: 1766 +Added line: 3572 +Added line: 60 +Added line: 2744 +Added line: 2901 +Added line: 7561 +Added line: 4153 +Added line: 5559 +Added line: 2962 +Added line: 8563 +Added line: 9484 +Added line: 2077 +Added line: 5618 +Added line: 1432 +Added line: 3280 +Added line: 9383 +Added line: 5681 diff --git a/pmd-cli/src/test/resources/net/sourceforge/pmd/cli/cpd/files/real-file.txt b/pmd-cli/src/test/resources/net/sourceforge/pmd/cli/cpd/files/real-file.txt index e69de29bb2..d5254591fb 100644 --- a/pmd-cli/src/test/resources/net/sourceforge/pmd/cli/cpd/files/real-file.txt +++ b/pmd-cli/src/test/resources/net/sourceforge/pmd/cli/cpd/files/real-file.txt @@ -0,0 +1,89 @@ +Added line: 8374 +Added line: 9415 +Added line: 3740 +Added line: 6102 +Added line: 491 +Added line: 1210 +Added line: 2603 +Added line: 3289 +Added line: 2685 +Added line: 5179 +Added line: 4439 +Added line: 2182 +Added line: 4349 +Added line: 6892 +Added line: 5873 +Added line: 4921 +Added line: 9010 +Added line: 6375 +Added line: 9118 +Added line: 4574 +Added line: 6463 +Added line: 5652 +Added line: 2166 +Added line: 299 +Added line: 4416 +Added line: 3221 +Added line: 506 +Added line: 8530 +Added line: 7061 +Added line: 8984 +Added line: 6570 +Added line: 420 +Added line: 5135 +Added line: 5245 +Added line: 5921 +Added line: 1595 +Added line: 1942 +Added line: 7426 +Added line: 574 +Added line: 6641 +Added line: 3521 +Added line: 644 +Added line: 9762 +Added line: 1456 +Added line: 7451 +Added line: 3885 +Added line: 9454 +Added line: 7450 +Added line: 4427 +Added line: 3305 +Added line: 1166 +Added line: 317 +Added line: 8890 +Added line: 1908 +Added line: 1939 +Added line: 9919 +Added line: 2030 +Added line: 9229 +Added line: 5380 +Added line: 4318 +Added line: 4600 +Added line: 4006 +Added line: 7817 +Added line: 3341 +Added line: 3705 +Added line: 7367 +Added line: 1359 +Added line: 290 +Added line: 5468 +Added line: 2406 +Added line: 9383 +Added line: 7443 +Added line: 8792 +Added line: 1141 +Added line: 7327 +Added line: 741 +Added line: 1901 +Added line: 2231 +Added line: 5417 +Added line: 3646 +Added line: 2107 +Added line: 9355 +Added line: 2932 +Added line: 4417 +Added line: 617 +Added line: 6390 +Added line: 3220 +Added line: 9993 +Added line: 3775 diff --git a/pmd-coco/src/test/resources/net/sourceforge/pmd/lang/coco/cpd/testdata/enum.txt b/pmd-coco/src/test/resources/net/sourceforge/pmd/lang/coco/cpd/testdata/enum.txt index 0471213096..9c87b9a4fb 100644 --- a/pmd-coco/src/test/resources/net/sourceforge/pmd/lang/coco/cpd/testdata/enum.txt +++ b/pmd-coco/src/test/resources/net/sourceforge/pmd/lang/coco/cpd/testdata/enum.txt @@ -1,5 +1,7 @@ L1 [import] 1 7 +Added line: 6916 +Added line: 9775 [unqualified] 8 19 [ComponentDef] 20 32 L2 @@ -7,43 +9,49 @@ L2 [unqualified] 8 19 [ExternalTypes] 20 33 L3 +Added line: 2468 [import] 1 7 [unqualified] 8 19 [ExternalComponent] 20 37 +Added line: 9393 L5 +Added line: 3876 [@] 1 2 [runtime] 2 9 [(] 9 10 [Runtime] 10 17 [.] 17 18 [SingleThreaded] 18 32 - [)] 32 33 L6 +Added line: 4523 [component] 1 10 [ComponentDefImpl] 11 27 [{] 28 29 L7 [val] 3 6 +Added line: 7345 [componentInst] 7 20 [:] 21 22 [Provided] 23 31 [<] 31 32 [ComponentDef] 32 44 +Added line: 3658 [>] 44 45 L8 [val] 3 6 [rExternalComponent] 7 25 [:] 26 27 [Required] 28 36 +Added line: 5038 [<] 36 37 [ExternalComponent] 37 54 [>] 54 55 -L10 [init] 3 7 [(] 7 8 [)] 8 9 [=] 10 11 [{] 12 13 +Added line: 7253 [}] 13 14 L12 [@] 3 4 @@ -53,6 +61,7 @@ L12 [.] 25 26 [Unreachable] 26 37 [)] 37 38 +Added line: 8268 L13 [machine] 3 10 [M] 11 12 @@ -70,6 +79,7 @@ L16 Added line: 1668 L17 [case] 7 11 +Added line: 3802 [Value2] 12 18 L18 [}] 5 6 @@ -77,11 +87,12 @@ L20 [var] 5 8 [compEnum_] 9 18 [:] 19 20 +Added line: 7704 [CompEnum] 21 29 [=] 30 31 [CompEnum] 32 40 [.] 40 41 - [Unknown] 41 48 +Added line: 4363 L22 [entry] 5 10 [(] 10 11 @@ -91,16 +102,23 @@ L22 L23 [setNextState] 7 19 [(] 19 20 +Added line: 1713 [InitialState] 20 32 [)] 32 33 +Added line: 1718 +Added line: 7222 +Added line: 8724 [;] 33 34 L24 [}] 5 6 L26 +Added line: 6556 [function] 5 13 [FunctionA] 14 23 +Added line: 1032 [(] 23 24 [inputVal] 24 32 +Added line: 824 [:] 33 34 [ExternalComponent] 35 52 [.] 52 53 @@ -110,19 +128,20 @@ L26 [Nil] 62 65 [=] 66 67 [{] 68 69 -L28 [@] 7 8 [ignoreWarning] 8 21 [(] 21 22 [Warning] 22 29 [IncompleteMatch] 30 45 [)] 45 46 +Added line: 7087 L29 [match] 7 12 [(] 13 14 [inputVal] 14 22 [)] 22 23 [{] 24 25 +Added line: 7714 L30 [.] 9 10 [Scenario1] 10 19 @@ -131,7 +150,6 @@ L30 L31 [if] 11 13 [(] 14 15 - [compEnum_] 15 24 [==] 25 27 [CompEnum] 28 36 [.] 36 37 @@ -144,25 +162,32 @@ L32 [doStuff] 27 34 [(] 34 35 [)] 35 36 +Added line: 9218 [;] 36 37 L33 [setNextState] 13 25 [(] 25 26 [StateA] 26 32 +Added line: 9719 [)] 32 33 [;] 33 34 L34 +Added line: 4434 [return] 13 19 [nil] 20 23 +Added line: 219 +Added line: 8284 [;] 23 24 L35 [}] 11 12 [else] 13 17 [if] 18 20 +Added line: 6279 [(] 21 22 [compEnum_] 22 31 [==] 32 34 [CompEnum] 35 43 +Added line: 5464 [.] 43 44 [Value2] 44 50 [)] 50 51 @@ -171,10 +196,12 @@ L36 [ExternalComponent] 13 30 [.] 30 31 [doOtherStuff] 31 43 +Added line: 7835 [(] 43 44 [)] 44 45 [;] 45 46 L37 +Added line: 6956 [setNextState] 13 25 [(] 25 26 [StateB] 26 32 @@ -189,17 +216,19 @@ L39 [;] 12 13 L40 [}] 9 10 +Added line: 3239 [,] 10 11 L41 [.] 9 10 [Scenario2] 10 19 [=>] 20 22 +Added line: 7549 [{] 23 24 L42 [if] 11 13 [(] 14 15 - [compEnum_] 15 24 [==] 25 27 +Added line: 1771 [CompEnum] 28 36 [.] 36 37 [Value1] 37 43 @@ -216,9 +245,12 @@ L44 [setNextState] 13 25 [(] 25 26 [StateB] 26 32 +Added line: 6041 [)] 32 33 [;] 33 34 +Added line: 5204 L45 +Added line: 6268 [return] 13 19 [nil] 20 23 [;] 23 24 @@ -241,6 +273,7 @@ L47 [doStuff] 27 34 [(] 34 35 [)] 35 36 +Added line: 6764 [;] 36 37 L48 [setNextState] 13 25 @@ -254,10 +287,11 @@ L49 [;] 23 24 L50 [}] 11 12 - [;] 12 13 L51 [}] 9 10 Added line: 5833 +Added line: 8041 +Added line: 8669 [,] 10 11 L52 [}] 7 8 @@ -276,6 +310,7 @@ L56 [:] 33 34 [ExternalComponent] 35 52 [.] 52 53 +Added line: 6008 [value] 53 58 [)] 58 59 [:] 60 61 @@ -283,6 +318,7 @@ L56 [=] 66 67 [{] 68 69 L58 +Added line: 3177 [@] 7 8 [ignoreWarning] 8 21 [(] 21 22 @@ -292,14 +328,18 @@ L58 [)] 45 46 L59 [match] 7 12 +Added line: 7737 [(] 13 14 [inputVal] 14 22 [)] 22 23 +Added line: 1714 +Added line: 9645 [{] 24 25 L60 [.] 9 10 [Scenario1] 10 19 [=>] 20 22 +Added line: 6129 [{] 23 24 L61 [compEnum_] 11 20 @@ -312,7 +352,10 @@ L62 [setNextState] 11 23 [(] 23 24 [StateA] 24 30 +Added line: 9400 [)] 30 31 +Added line: 4436 +Added line: 2700 [;] 31 32 L63 [return] 11 17 @@ -334,6 +377,8 @@ L66 [Value2] 32 38 [;] 38 39 L67 +Added line: 2312 +Added line: 3127 [setNextState] 11 23 [(] 23 24 [StateA] 24 30 @@ -345,6 +390,7 @@ L68 [;] 21 22 L69 [}] 9 10 +Added line: 95 [,] 10 11 L70 [}] 7 8 @@ -355,6 +401,7 @@ L71 [;] 14 15 L72 [}] 5 6 +Added line: 9203 L74 [state] 5 10 [InitialState] 11 23 @@ -379,15 +426,19 @@ L77 L78 [FunctionB] 9 18 [(] 18 19 +Added line: 2532 [ExternalComponent] 19 36 +Added line: 3427 [.] 36 37 [doYourThing] 37 48 [(] 48 49 +Added line: 3721 [)] 49 50 [)] 50 51 [;] 51 52 L79 [}] 7 8 +Added line: 4023 L80 [}] 5 6 L82 @@ -395,10 +446,13 @@ L82 [StateA] 11 17 [{] 18 19 L83 +Added line: 2859 [assert] 7 13 [(] 13 14 [compEnum_] 14 23 [!=] 24 26 +Added line: 2327 +Added line: 5507 [CompEnum] 27 35 [.] 35 36 [Unknown] 36 43 @@ -406,6 +460,7 @@ L83 L85 [componentInst] 7 20 [.] 20 21 +Added line: 5704 [run] 21 24 [(] 24 25 [)] 25 26 @@ -414,7 +469,9 @@ L85 L86 [FunctionA] 9 18 [(] 18 19 +Added line: 9395 [ExternalComponent] 19 36 +Added line: 1038 [.] 36 37 [doYourThing] 37 48 [(] 48 49 @@ -429,14 +486,20 @@ L88 [.] 20 21 [initialize] 21 31 [(] 31 32 +Added line: 5836 [)] 32 33 [=] 34 35 +Added line: 7280 [{] 36 37 +Added line: 8370 L89 +Added line: 5618 [FunctionB] 9 18 [(] 18 19 [ExternalComponent] 19 36 [.] 36 37 +Added line: 9719 +Added line: 9563 [doYourThing] 37 48 [(] 48 49 [)] 49 50 @@ -444,8 +507,10 @@ L89 [;] 51 52 L90 [}] 7 8 +Added line: 5329 L91 [}] 5 6 +Added line: 6760 L93 [state] 5 10 [StateB] 11 17 @@ -458,11 +523,17 @@ L94 [)] 38 39 [=] 40 41 [{] 42 43 +Added line: 6183 +Added line: 770 L95 [componentInst] 9 22 [.] 22 23 [run] 23 26 +Added line: 5530 [(] 26 27 +Added line: 5391 +Added line: 5545 +Added line: 1031 [)] 27 28 [;] 28 29 L96 @@ -470,23 +541,30 @@ L96 [=] 19 20 [CompEnum] 21 29 [.] 29 30 +Added line: 7152 [Unknown] 30 37 [;] 37 38 L97 [setNextState] 9 21 +Added line: 2489 [(] 21 22 [InitialState] 22 34 - [;] 35 36 +Added line: 1042 L98 +Added line: 5607 [}] 7 8 L99 +Added line: 7453 +Added line: 8891 [ExternalComponent] 7 24 [.] 24 25 [doOtherStuffAgain] 25 42 [(] 42 43 +Added line: 6278 [)] 43 44 [=] 45 46 [{] 47 48 +Added line: 4265 L100 [ExternalComponent] 9 26 [.] 26 27 @@ -499,6 +577,7 @@ L101 [(] 21 22 [StateC] 22 28 [)] 28 29 +Added line: 3855 [;] 29 30 L102 [}] 7 8 @@ -507,11 +586,13 @@ L103 L105 [state] 5 10 [StateC] 11 17 +Added line: 6387 [{] 18 19 L106 [ExternalComponent] 7 24 [.] 24 25 [process] 25 32 +Added line: 712 [(] 32 33 [)] 33 34 [=] 35 36 @@ -525,7 +606,9 @@ L107 [;] 28 29 L108 [compEnum_] 9 18 +Added line: 3668 [=] 19 20 +Added line: 7936 [CompEnum] 21 29 [.] 29 30 [Unknown] 30 37 @@ -550,6 +633,8 @@ L111 L112 [if] 9 11 [(] 12 13 +Added line: 2764 +Added line: 3613 [compEnum_] 13 22 [==] 23 25 [CompEnum] 26 34 @@ -580,6 +665,7 @@ L115 [;] 31 32 L116 [}] 9 10 +Added line: 9707 [,] 10 11 L117 [if] 9 11 @@ -591,7 +677,7 @@ L117 [Value2] 35 41 [)] 41 42 [{] 43 44 -L118 +Added line: 9406 [componentInst] 11 24 [.] 24 25 [doStuff] 25 32 @@ -602,6 +688,7 @@ L119 [compEnum_] 11 20 [=] 21 22 [CompEnum] 23 31 +Added line: 550 [.] 31 32 [Value1] 32 38 [;] 38 39 @@ -616,10 +703,12 @@ L121 [,] 10 11 L122 [}] 7 8 +Added line: 6924 L123 [}] 5 6 L124 [}] 3 4 L125 +Added line: 9227 [}] 1 2 EOF diff --git a/pmd-coco/src/test/resources/net/sourceforge/pmd/lang/coco/cpd/testdata/simple_machine.txt b/pmd-coco/src/test/resources/net/sourceforge/pmd/lang/coco/cpd/testdata/simple_machine.txt index 6fcf78f289..b4ed8fc0a6 100644 --- a/pmd-coco/src/test/resources/net/sourceforge/pmd/lang/coco/cpd/testdata/simple_machine.txt +++ b/pmd-coco/src/test/resources/net/sourceforge/pmd/lang/coco/cpd/testdata/simple_machine.txt @@ -20,14 +20,22 @@ Added line: 3245 [Nil] 48 51 L6 [outgoing] 3 11 +Added line: 8168 +Added line: 5563 [signal] 12 18 [signal_a] 19 27 +Added line: 3622 [(] 27 28 [instanceId] 28 38 [:] 39 40 +Added line: 4156 +Added line: 4264 +Added line: 5171 +Added line: 263 [TypeId] 41 47 [)] 47 48 L7 +Added line: 8591 [outgoing] 3 11 [signal] 12 18 [signal_b] 19 27 @@ -35,10 +43,17 @@ L7 [instanceId] 28 38 [:] 39 40 [TypeId] 41 47 +Added line: 2907 +Added line: 438 [,] 47 48 [errorId] 49 56 +Added line: 5709 [:] 57 58 +Added line: 3304 [ErrorId] 59 66 +Added line: 6458 +Added line: 4662 +Added line: 2832 [)] 66 67 L8 [outgoing] 3 11 @@ -48,75 +63,104 @@ L8 L11 [machine] 3 10 [M] 11 12 +Added line: 768 [{] 13 14 L12 [var] 5 8 [num_items_] 9 19 +Added line: 2030 [:] 20 21 [Bounded] 22 29 [<] 29 30 +Added line: 8179 +Added line: 149 [0] 30 31 +Added line: 7664 [,] 31 32 [10] 33 35 [>] 35 36 [=] 37 38 +Added line: 3273 +Added line: 9074 [0] 39 40 L13 [val] 5 8 - [upper_bound_] 9 21 +Added line: 2792 +Added line: 1149 +Added line: 8918 [:] 22 23 [Bounded] 24 31 +Added line: 3418 +Added line: 9545 [<] 31 32 [0] 32 33 [,] 33 34 [10] 35 37 Added line: 8673 +Added line: 500 [>] 37 38 [=] 39 40 [10] 41 43 L14 +Added line: 7462 Added line: 6042 [lower_bound_] 9 21 [:] 22 23 [Bounded] 24 31 [<] 31 32 [0] 32 33 +Added line: 8963 [,] 33 34 [10] 35 37 +Added line: 3509 [>] 37 38 [=] 39 40 [0] 41 42 L16 Added line: 4073 +Added line: 3027 [(] 8 9 [num_items_] 9 19 [>] 20 21 [lower_bound_] 22 34 +Added line: 8421 [)] 34 35 L17 [=] 17 18 [{] 19 20 L18 +Added line: 7563 [nondet] 7 13 [{] 14 15 +Added line: 8618 L19 [signal_a] 9 17 [(] 17 18 +Added line: 954 [_] 18 19 +Added line: 8017 [)] 19 20 [,] 20 21 +Added line: 900 +Added line: 2235 L20 +Added line: 4273 [signal_b] 9 17 [(] 17 18 [_] 18 19 - [,] 19 20 [_] 21 22 [)] 22 23 +Added line: 3978 [,] 23 24 L21 +Added line: 6601 [}] 7 8 L22 +Added line: 4949 +Added line: 8051 [num_items_] 7 17 +Added line: 901 +Added line: 9158 [=] 18 19 [num_items_] 20 30 [-] 31 32 @@ -126,47 +170,69 @@ L23 [}] 5 6 L25 [state] 5 10 +Added line: 7873 Added line: 3741 [Init] 11 15 [{] 16 17 +Added line: 9335 L26 [if] 7 9 [(] 10 11 +Added line: 5756 +Added line: 6825 +Added line: 1305 [num_items_] 11 21 [<] 22 23 [upper_bound_] 24 36 [)] 36 37 [do_something] 38 50 +Added line: 9379 [(] 50 51 [_] 51 52 [:] 53 54 +Added line: 4373 [TypeId] 55 61 [)] 61 62 +Added line: 3064 [=] 63 64 +Added line: 6324 [nondet] 65 71 [{] 72 73 +Added line: 4169 L27 [{] 9 10 L28 [setNextState] 11 23 +Added line: 1071 [(] 23 24 [AddItem] 24 31 [)] 31 32 L29 [}] 9 10 [,] 10 11 +Added line: 1223 +Added line: 819 L30 [{] 9 10 L31 [trigger] 11 18 +Added line: 6727 +Added line: 9184 [(] 18 19 +Added line: 9980 +Added line: 6883 +Added line: 7252 +Added line: 2850 +Added line: 8328 Added line: 2520 [)] 19 20 +Added line: 9455 [;] 20 21 L32 [num_items_] 11 21 [=] 22 23 [num_items_] 24 34 +Added line: 7597 [+] 35 36 [1] 37 38 [;] 38 39 @@ -175,14 +241,18 @@ L33 [,] 10 11 L34 [}] 7 8 +Added line: 5242 L35 [}] 5 6 L37 [state] 5 10 [AddItem] 11 18 +Added line: 726 [{] 19 20 [spontaneous] 7 18 +Added line: 6473 [=] 19 20 +Added line: 3465 [{] 21 22 Added line: 515 L39 @@ -193,7 +263,9 @@ L40 L41 [trigger] 13 20 [(] 20 21 +Added line: 9896 [)] 21 22 +Added line: 2822 [;] 22 23 L42 [num_items_] 13 23 @@ -202,41 +274,57 @@ Added line: 7472 [num_items_] 26 36 [+] 37 38 [1] 39 40 +Added line: 1104 [;] 40 41 L43 +Added line: 6716 +Added line: 2560 +Added line: 5963 [}] 11 12 [,] 12 13 +Added line: 5277 L44 [}] 9 10 L45 +Added line: 2068 [setNextState] 9 21 [(] 21 22 [Init] 22 26 Added line: 2504 [)] 26 27 - [;] 27 28 +Added line: 3945 L46 - [}] 7 8 L47 [}] 5 6 L48 +Added line: 5498 +Added line: 8625 [}] 3 4 +Added line: 4243 +Added line: 3395 L49 [}] 1 2 L51 +Added line: 4920 +Added line: 3406 +Added line: 6004 +Added line: 7299 [@] 1 2 [runtime] 2 9 [(] 9 10 [.] 10 11 - [SingleThreaded] 11 25 [)] 25 26 +Added line: 8190 +Added line: 8027 L52 [external] 1 9 [component] 10 19 - [{] 40 41 +Added line: 2018 +Added line: 8234 L53 [val] 3 6 [ExampleDevice] 7 20 +Added line: 3565 [:] 21 22 [Required] 23 31 [<] 31 32 @@ -245,4 +333,5 @@ Added line: 4658 [>] 46 47 L54 [}] 1 2 +Added line: 7026 EOF diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/readme.md b/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/readme.md index 194ac5ee6c..b986426430 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/readme.md +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/readme.md @@ -1,4 +1,93 @@ +Added line: 5526 +Added line: 9538 +Added line: 3679 +Added line: 4761 +Added line: 8042 # AST +Added line: 6429 +Added line: 8548 +Added line: 6524 +Added line: 3637 +Added line: 1950 +Added line: 9684 +Added line: 2615 +Added line: 5552 +Added line: 3472 +Added line: 2328 +Added line: 7888 +Added line: 7239 +Added line: 2312 +Added line: 6559 +Added line: 8263 +Added line: 9265 +Added line: 7381 +Added line: 3054 +Added line: 4470 +Added line: 9126 +Added line: 384 +Added line: 2668 +Added line: 5134 +Added line: 5650 +Added line: 2493 +Added line: 1531 +Added line: 2509 +Added line: 2291 +Added line: 6519 +Added line: 774 +Added line: 1290 +Added line: 7547 +Added line: 9650 +Added line: 7551 +Added line: 2708 +Added line: 7351 +Added line: 7312 +Added line: 6581 +Added line: 556 +Added line: 9207 +Added line: 7783 +Added line: 8092 +Added line: 52 +Added line: 2987 +Added line: 6120 +Added line: 5234 +Added line: 3183 +Added line: 1107 +Added line: 2298 +Added line: 2398 +Added line: 2586 +Added line: 1448 +Added line: 795 +Added line: 7104 +Added line: 4712 +Added line: 4076 +Added line: 71 Abstract Syntax Tree +Added line: 4452 +Added line: 6685 +Added line: 2730 +Added line: 5987 +Added line: 1416 +Added line: 5424 +Added line: 9850 +Added line: 8559 +Added line: 5428 +Added line: 5536 +Added line: 8703 +Added line: 6785 +Added line: 510 +Added line: 4731 +Added line: 753 +Added line: 3383 +Added line: 20 +Added line: 8561 +Added line: 6242 +Added line: 7791 +Added line: 998 +Added line: 4639 +Added line: 6753 +Added line: 4261 +Added line: 740 +Added line: 3869 +Added line: 1547 diff --git a/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/cli/filelist.txt b/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/cli/filelist.txt index e3bd75e090..477022df4a 100644 --- a/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/cli/filelist.txt +++ b/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/cli/filelist.txt @@ -1,4 +1,93 @@ +Added line: 8442 +Added line: 2723 +Added line: 818 +Added line: 5994 +Added line: 7475 +Added line: 2244 +Added line: 5042 Added line: 5440 +Added line: 63 +Added line: 2485 +Added line: 9875 +Added line: 3717 +Added line: 2327 +Added line: 2265 +Added line: 7145 +Added line: 9202 +Added line: 3164 +Added line: 9219 +Added line: 7645 +Added line: 9541 +Added line: 7412 +Added line: 6577 +Added line: 9781 +Added line: 4848 +Added line: 4383 +Added line: 1856 +Added line: 9265 +Added line: 6478 +Added line: 2481 +Added line: 1010 +Added line: 1488 +Added line: 4961 +Added line: 8972 +Added line: 7455 +Added line: 5789 +Added line: 8010 +Added line: 1374 +Added line: 8482 +Added line: 6278 +Added line: 5140 +Added line: 4562 +Added line: 5216 +Added line: 7785 +Added line: 9912 +Added line: 2435 +Added line: 1485 +Added line: 1261 +Added line: 8922 +Added line: 8700 +Added line: 3290 Added line: 480 +Added line: 763 +Added line: 7791 +Added line: 3972 +Added line: 4082 +Added line: 5609 +Added line: 6047 +Added line: 4369 +Added line: 3046 +Added line: 4297 +Added line: 1511 Added line: 2431 +Added line: 7501 +Added line: 1329 +Added line: 3130 +Added line: 7402 +Added line: 1102 +Added line: 9148 +Added line: 3449 Added line: 68 +Added line: 8442 +Added line: 7539 +Added line: 8347 +Added line: 3470 +Added line: 3390 +Added line: 2138 +Added line: 7898 +Added line: 7568 +Added line: 8781 +Added line: 9758 +Added line: 1740 +Added line: 178 +Added line: 7271 +Added line: 9162 +Added line: 6538 +Added line: 242 +Added line: 2944 +Added line: 9449 +Added line: 5436 +Added line: 1684 +Added line: 1086 +Added line: 2887 +Added line: 449 diff --git a/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/cli/filelist2.txt b/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/cli/filelist2.txt index 94c4ced858..205db322f4 100644 --- a/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/cli/filelist2.txt +++ b/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/cli/filelist2.txt @@ -1,5 +1,94 @@ +Added line: 3897 +Added line: 6920 +Added line: 3932 +Added line: 1970 +Added line: 2659 +Added line: 2393 +Added line: 4909 +Added line: 650 +Added line: 176 +Added line: 4976 +Added line: 1662 src/test/resources/net/sourceforge/pmd/cpd/cli/src/somefile.dummy, +Added line: 4156 +Added line: 6428 +Added line: 2744 src/test/resources/net/sourceforge/pmd/cpd/cli/src/anotherfile.dummy +Added line: 7462 +Added line: 8590 +Added line: 2464 +Added line: 2352 +Added line: 9367 +Added line: 6341 +Added line: 6097 +Added line: 1544 +Added line: 2065 +Added line: 5919 +Added line: 5958 +Added line: 3572 +Added line: 3789 +Added line: 882 +Added line: 842 +Added line: 1981 +Added line: 6399 +Added line: 5329 +Added line: 8901 +Added line: 4074 +Added line: 3690 +Added line: 9658 +Added line: 7716 +Added line: 2420 Added line: 5201 +Added line: 7875 +Added line: 2414 +Added line: 5262 +Added line: 8865 +Added line: 2449 Added line: 4749 +Added line: 3009 +Added line: 8595 +Added line: 6041 +Added line: 3668 +Added line: 4770 +Added line: 8277 +Added line: 3118 +Added line: 5681 +Added line: 7736 +Added line: 9226 +Added line: 9732 +Added line: 702 +Added line: 2604 +Added line: 3232 +Added line: 1694 +Added line: 1680 +Added line: 7448 +Added line: 8508 +Added line: 2113 +Added line: 2102 +Added line: 3401 +Added line: 6996 +Added line: 2709 +Added line: 2133 +Added line: 3716 +Added line: 1864 +Added line: 9212 +Added line: 758 +Added line: 2774 +Added line: 2661 +Added line: 1190 +Added line: 6763 +Added line: 9903 +Added line: 6715 +Added line: 6629 +Added line: 614 +Added line: 3019 +Added line: 7875 +Added line: 1261 +Added line: 1532 +Added line: 110 +Added line: 2463 +Added line: 2772 +Added line: 8871 Added line: 9256 +Added line: 1667 +Added line: 9988 diff --git a/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/dup1.txt b/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/dup1.txt index b4e6bf1320..7faaeab9c6 100644 --- a/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/dup1.txt +++ b/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/dup1.txt @@ -1,20 +1,108 @@ +Added line: 2211 +Added line: 1080 Added line: 2991 +Added line: 616 +Added line: 6041 +Added line: 8892 +Added line: 1814 +Added line: 2349 +Added line: 4981 +Added line: 5197 +Added line: 8545 +Added line: 5995 +Added line: 9927 /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html +Added line: 2355 +Added line: 4061 +Added line: 4555 Added line: 249 +Added line: 1543 +Added line: 9555 +Added line: 1202 +Added line: 8660 +Added line: 1146 +Added line: 9383 */ +Added line: 4640 +Added line: 9042 +Added line: 771 +Added line: 6058 +Added line: 753 +Added line: 8009 +Added line: 6029 +Added line: 5386 +Added line: 9728 public class dup1 { +Added line: 2686 +Added line: 1683 +Added line: 1380 public static void main(String[] args) { +Added line: 4485 +Added line: 6940 +Added line: 6359 System.out.println("Test1"); +Added line: 7808 +Added line: 6365 +Added line: 1159 +Added line: 4803 System.out.println("Test2"); +Added line: 9769 +Added line: 492 +Added line: 7015 +Added line: 701 +Added line: 4569 +Added line: 1814 +Added line: 4111 System.out.println("Test3"); +Added line: 3191 +Added line: 9860 +Added line: 7969 +Added line: 7428 +Added line: 1059 +Added line: 1205 +Added line: 8197 +Added line: 9056 System.out.println("Test4"); +Added line: 7952 +Added line: 8240 +Added line: 5566 +Added line: 4817 System.out.println("Test5"); System.out.println("Test6"); +Added line: 1204 +Added line: 4213 Added line: 109 +Added line: 7923 +Added line: 4163 System.out.println("Test7"); System.out.println("Test8"); +Added line: 4322 +Added line: 8586 +Added line: 1539 +Added line: 6706 +Added line: 7850 +Added line: 9513 +Added line: 8668 +Added line: 8841 +Added line: 7745 System.out.println("Test9"); Added line: 5957 +Added line: 2259 +Added line: 1932 +Added line: 8360 +Added line: 5188 +Added line: 6093 +Added line: 9791 +Added line: 5541 } -} \ No newline at end of file +Added line: 1002 +Added line: 622 +Added line: 8108 +Added line: 1969 +Added line: 151 +Added line: 7554 +Added line: 4874 +Added line: 1389 +}Added line: 5519 +Added line: 573 diff --git a/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/dup2.txt b/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/dup2.txt index 91779c045b..342a3c2d42 100644 --- a/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/dup2.txt +++ b/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/dup2.txt @@ -1,18 +1,106 @@ +Added line: 9652 +Added line: 6414 +Added line: 1941 +Added line: 9726 +Added line: 8010 +Added line: 9994 /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html +Added line: 3871 */ +Added line: 9472 +Added line: 7544 +Added line: 5116 +Added line: 4804 +Added line: 8878 +Added line: 4192 +Added line: 1996 +Added line: 7539 +Added line: 2396 +Added line: 1399 +Added line: 2306 public class dup2 { +Added line: 6388 +Added line: 3550 +Added line: 6676 +Added line: 3590 +Added line: 9614 +Added line: 2094 public static void main(String[] args) { +Added line: 7113 +Added line: 6735 +Added line: 3531 +Added line: 8435 +Added line: 2512 +Added line: 3881 +Added line: 8931 +Added line: 107 +Added line: 4213 +Added line: 1374 +Added line: 7456 +Added line: 2566 +Added line: 4679 +Added line: 4259 +Added line: 9777 System.out.println("Test1"); +Added line: 6616 +Added line: 945 System.out.println("Test2"); +Added line: 909 +Added line: 9460 System.out.println("Test3"); +Added line: 7431 +Added line: 5551 +Added line: 8476 +Added line: 715 +Added line: 9075 +Added line: 25 +Added line: 5337 +Added line: 2490 +Added line: 7176 +Added line: 6088 +Added line: 9437 +Added line: 7236 +Added line: 8992 +Added line: 271 +Added line: 4992 +Added line: 8187 +Added line: 7357 System.out.println("Test4"); +Added line: 4876 +Added line: 4849 +Added line: 4556 +Added line: 3362 System.out.println("Test5"); +Added line: 2536 +Added line: 2774 +Added line: 5924 +Added line: 6016 System.out.println("Test6"); +Added line: 7041 System.out.println("Test7"); +Added line: 5171 +Added line: 8475 +Added line: 6676 System.out.println("Test8"); +Added line: 6297 +Added line: 1100 +Added line: 9154 +Added line: 332 System.out.println("Test9"); +Added line: 7509 +Added line: 8340 } -} \ No newline at end of file +Added line: 2354 +Added line: 5232 +Added line: 7657 +Added line: 1921 +}Added line: 8330 +Added line: 1708 +Added line: 1941 +Added line: 3423 +Added line: 6839 +Added line: 7607 +Added line: 6733 diff --git a/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/real-file.txt b/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/real-file.txt index e69de29bb2..acb9334a9f 100644 --- a/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/real-file.txt +++ b/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/real-file.txt @@ -0,0 +1,89 @@ +Added line: 1683 +Added line: 4790 +Added line: 7909 +Added line: 1457 +Added line: 6812 +Added line: 7637 +Added line: 4716 +Added line: 6581 +Added line: 3889 +Added line: 6120 +Added line: 9263 +Added line: 9631 +Added line: 5758 +Added line: 1159 +Added line: 8796 +Added line: 3907 +Added line: 5231 +Added line: 8972 +Added line: 4128 +Added line: 1189 +Added line: 6673 +Added line: 1774 +Added line: 1807 +Added line: 819 +Added line: 4220 +Added line: 166 +Added line: 5131 +Added line: 7642 +Added line: 65 +Added line: 7154 +Added line: 7848 +Added line: 8833 +Added line: 1974 +Added line: 4009 +Added line: 5334 +Added line: 6592 +Added line: 5993 +Added line: 9097 +Added line: 6752 +Added line: 8624 +Added line: 1188 +Added line: 5462 +Added line: 718 +Added line: 2049 +Added line: 7605 +Added line: 1375 +Added line: 1540 +Added line: 8674 +Added line: 4872 +Added line: 6774 +Added line: 7165 +Added line: 9350 +Added line: 6047 +Added line: 5013 +Added line: 1634 +Added line: 8250 +Added line: 4411 +Added line: 2017 +Added line: 362 +Added line: 7101 +Added line: 2290 +Added line: 8177 +Added line: 1513 +Added line: 8815 +Added line: 5320 +Added line: 4756 +Added line: 7069 +Added line: 8238 +Added line: 282 +Added line: 4170 +Added line: 8783 +Added line: 4698 +Added line: 9181 +Added line: 9971 +Added line: 2534 +Added line: 9950 +Added line: 4291 +Added line: 2806 +Added line: 8955 +Added line: 2567 +Added line: 3983 +Added line: 1348 +Added line: 3627 +Added line: 2291 +Added line: 2707 +Added line: 1099 +Added line: 8720 +Added line: 1590 +Added line: 2736 diff --git a/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist.txt b/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist.txt index e352128ed2..ce1b10207b 100644 --- a/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist.txt +++ b/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist.txt @@ -1 +1,90 @@ -src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/src/somefile.dummy,src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/src/anotherfile.dummy +Added line: 3365 +Added line: 4572 +Added line: 3958 +Added line: 4146 +Added line: 3760 +Added line: 9153 +Added line: 9661 +Added line: 2524 +Added line: 7443 +Added line: 9120 +Added line: 400 +Added line: 358 +Added line: 1198 +Added line: 2894 +Added line: 3527 +Added line: 1809 +Added line: 2607 +Added line: 5348 +Added line: 5884 +Added line: 3599 +Added line: 8118 +Added line: 2751 +Added line: 1923 +Added line: 2088 +Added line: 7115 +Added line: 7503 +Added line: 2441 +Added line: 9664 +Added line: 6906 +Added line: 4394 +Added line: 5186 +Added line: 1817 +Added line: 2886 +Added line: 1443 +Added line: 192 +Added line: 9513 +Added line: 3606 +Added line: 6733 +Added line: 2759 +Added line: 7708 +Added line: 5679 +Added line: 3135 +Added line: 4121 +Added line: 4119 +Added line: 9534 +Added line: 7204 +Added line: 8024 +Added line: 4759 +Added line: 7663 +Added line: 1144 +Added line: 3314 +Added line: 9927 +Added line: 7416 +Added line: 5039 +Added line: 3061 +Added line: 2582 +Added line: 1899 +Added line: 5783 +Added line: 4359 +Added line: 2286 +Added line: 5075 +Added line: 1601 +Added line: 1702 +Added line: 3327 +Added line: 606 +Added line: 6142 +Added line: 4456 +Added line: 651 +Added line: 9278 +Added line: 2071 +Added line: 4607 +Added line: 1050 +Added line: 4161 +Added line: 3791 +Added line: 1447 +Added line: 8532 +Added line: 8373 +Added line: 7729 +Added line: 8963 +Added line: 3652 +Added line: 8702 +Added line: 5668 +Added line: 3840 +Added line: 9505 +Added line: 9847 +Added line: 13 +Added line: 7707 +Added line: 3760 +Added line: 8101 +Added line: 1120 diff --git a/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist2.txt b/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist2.txt index da67e99f77..ec9d914a84 100644 --- a/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist2.txt +++ b/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist2.txt @@ -1,5 +1,94 @@ +Added line: 289 +Added line: 4548 +Added line: 8927 +Added line: 132 +Added line: 4850 +Added line: 2409 +Added line: 6473 Added line: 4045 +Added line: 6054 +Added line: 3895 +Added line: 3308 +Added line: 2917 +Added line: 3159 +Added line: 4000 +Added line: 3339 +Added line: 6692 +Added line: 1345 src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/src/somefile.dummy, +Added line: 3596 +Added line: 2756 +Added line: 7451 +Added line: 4026 +Added line: 7577 +Added line: 8596 +Added line: 7903 +Added line: 3585 +Added line: 842 +Added line: 9103 +Added line: 9593 +Added line: 7037 +Added line: 9652 +Added line: 409 +Added line: 6536 +Added line: 8247 +Added line: 4478 Added line: 1251 +Added line: 3174 +Added line: 3928 +Added line: 6689 +Added line: 2197 +Added line: 8779 +Added line: 7246 +Added line: 771 +Added line: 1375 +Added line: 5419 +Added line: 4373 +Added line: 8523 +Added line: 5009 +Added line: 4684 +Added line: 9779 +Added line: 2463 +Added line: 5634 +Added line: 9702 +Added line: 6270 +Added line: 8319 +Added line: 4482 +Added line: 7070 +Added line: 1376 +Added line: 1995 +Added line: 7164 +Added line: 9530 +Added line: 7675 +Added line: 3786 +Added line: 591 +Added line: 4414 +Added line: 2420 +Added line: 594 +Added line: 1866 +Added line: 424 +Added line: 8290 +Added line: 1425 +Added line: 725 +Added line: 244 +Added line: 5690 +Added line: 1787 +Added line: 785 src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/src/anotherfile.dummy Added line: 2328 +Added line: 8786 +Added line: 1325 +Added line: 8204 +Added line: 4704 +Added line: 6072 +Added line: 6832 +Added line: 9211 +Added line: 1182 +Added line: 5960 +Added line: 6830 +Added line: 441 +Added line: 4255 +Added line: 7464 +Added line: 1096 +Added line: 1790 +Added line: 417 diff --git a/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist3.txt b/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist3.txt index 77caf3ea99..64b1ae6159 100644 --- a/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist3.txt +++ b/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist3.txt @@ -1,5 +1,94 @@ +Added line: 9216 +Added line: 6552 Added line: 754 +Added line: 1616 +Added line: 7328 +Added line: 283 +Added line: 3609 +Added line: 3156 +Added line: 8629 +Added line: 2356 +Added line: 6858 +Added line: 7773 +Added line: 7555 +Added line: 1398 +Added line: 7790 +Added line: 9642 +Added line: 3997 +Added line: 1306 +Added line: 8638 +Added line: 3837 +Added line: 7724 +Added line: 7534 +Added line: 4192 +Added line: 4144 +Added line: 4873 +Added line: 7242 Added line: 309 +Added line: 5075 +Added line: 8807 +Added line: 9951 +Added line: 3479 +Added line: 3587 +Added line: 7449 +Added line: 3034 +Added line: 7885 +Added line: 5880 +Added line: 2937 +Added line: 7158 +Added line: 1167 +Added line: 6365 +Added line: 7280 +Added line: 3900 +Added line: 1515 Added line: 622 +Added line: 982 +Added line: 1981 +Added line: 8042 +Added line: 9931 +Added line: 6465 +Added line: 7023 +Added line: 402 +Added line: 290 +Added line: 8170 +Added line: 9572 +Added line: 2586 +Added line: 311 +Added line: 9315 Added line: 6630 +Added line: 4830 +Added line: 677 +Added line: 1936 +Added line: 3854 +Added line: 2539 +Added line: 6149 +Added line: 367 +Added line: 2833 +Added line: 5770 +Added line: 4628 +Added line: 525 +Added line: 8641 +Added line: 210 +Added line: 8158 +Added line: 1793 +Added line: 9006 +Added line: 4295 +Added line: 4256 +Added line: 7091 +Added line: 8156 +Added line: 4046 +Added line: 3132 +Added line: 4828 +Added line: 2347 +Added line: 3318 +Added line: 3248 +Added line: 995 Added line: 3162 +Added line: 2911 +Added line: 7918 +Added line: 6501 +Added line: 5931 +Added line: 317 +Added line: 4625 +Added line: 8907 +Added line: 2465 diff --git a/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist4.txt b/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist4.txt index bab25a8ad9..0aee2e3d92 100644 --- a/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist4.txt +++ b/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/filelist4.txt @@ -1,4 +1,93 @@ +Added line: 8977 +Added line: 8889 +Added line: 9353 +Added line: 3309 +Added line: 8933 +Added line: 6764 +Added line: 2053 +Added line: 6551 +Added line: 8665 +Added line: 5257 +Added line: 9577 +Added line: 1058 +Added line: 9492 +Added line: 7883 +Added line: 4612 +Added line: 1643 +Added line: 7021 +Added line: 6661 +Added line: 669 src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/src/somefile.dummy, +Added line: 2422 +Added line: 967 +Added line: 46 +Added line: 4309 +Added line: 3975 +Added line: 6531 +Added line: 2179 +Added line: 8375 +Added line: 5522 +Added line: 4642 +Added line: 5343 +Added line: 8106 +Added line: 3643 +Added line: 4307 src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/otherSrc/somefile.dummy, +Added line: 9393 +Added line: 3977 +Added line: 1187 +Added line: 9281 +Added line: 1966 +Added line: 1949 +Added line: 1610 +Added line: 8767 +Added line: 2733 +Added line: 1634 +Added line: 8982 +Added line: 8432 +Added line: 3213 +Added line: 5091 +Added line: 1542 +Added line: 1978 +Added line: 2150 +Added line: 708 +Added line: 4431 +Added line: 9192 +Added line: 8694 +Added line: 4226 +Added line: 5740 +Added line: 2327 +Added line: 4316 +Added line: 1141 +Added line: 4401 +Added line: 176 +Added line: 2694 +Added line: 2916 +Added line: 2100 +Added line: 7045 +Added line: 7636 src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/src/anotherfile.dummy +Added line: 6596 +Added line: 805 +Added line: 5776 +Added line: 6447 +Added line: 5184 +Added line: 1896 +Added line: 6275 +Added line: 198 +Added line: 3954 +Added line: 7719 +Added line: 147 +Added line: 5612 +Added line: 9238 src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/src/somefile.dummy +Added line: 7690 +Added line: 6011 +Added line: 9750 +Added line: 9227 +Added line: 1705 +Added line: 7845 +Added line: 6395 +Added line: 3610 +Added line: 9444 +Added line: 384 diff --git a/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/ignorelist.txt b/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/ignorelist.txt index 5575131795..55f30f7ac0 100644 --- a/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/ignorelist.txt +++ b/pmd-core/src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/ignorelist.txt @@ -1 +1,90 @@ +Added line: 7579 +Added line: 9709 +Added line: 5205 +Added line: 1231 +Added line: 7491 +Added line: 170 +Added line: 610 +Added line: 2055 +Added line: 6395 +Added line: 557 +Added line: 3542 +Added line: 3872 +Added line: 855 +Added line: 5328 +Added line: 3526 +Added line: 772 +Added line: 3292 +Added line: 194 +Added line: 284 +Added line: 3526 +Added line: 4093 +Added line: 7957 +Added line: 4065 +Added line: 6373 +Added line: 8682 +Added line: 6389 +Added line: 2837 +Added line: 6763 +Added line: 2321 +Added line: 1972 +Added line: 2036 +Added line: 6631 +Added line: 4051 +Added line: 8113 +Added line: 3593 +Added line: 3824 +Added line: 3753 +Added line: 9980 +Added line: 2805 +Added line: 6862 +Added line: 7110 +Added line: 201 +Added line: 4338 +Added line: 113 +Added line: 3854 +Added line: 6989 +Added line: 1065 +Added line: 9352 +Added line: 5242 +Added line: 2831 +Added line: 7144 +Added line: 841 +Added line: 7252 +Added line: 2216 +Added line: 1939 +Added line: 3314 +Added line: 4897 +Added line: 6804 +Added line: 6547 +Added line: 7584 +Added line: 5285 +Added line: 6261 +Added line: 6544 +Added line: 490 +Added line: 1468 src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/src/somefile3.dummy,src/test/resources/net/sourceforge/pmd/lang/document/filecollectortest/src/somefile1.dummy +Added line: 8421 +Added line: 616 +Added line: 3370 +Added line: 9994 +Added line: 5507 +Added line: 6905 +Added line: 7250 +Added line: 3386 +Added line: 3550 +Added line: 7043 +Added line: 4056 +Added line: 6292 +Added line: 1153 +Added line: 3949 +Added line: 5771 +Added line: 1183 +Added line: 387 +Added line: 7753 +Added line: 498 +Added line: 7775 +Added line: 9040 +Added line: 7104 +Added line: 8838 +Added line: 3570 diff --git a/pmd-core/src/test/resources/sample-source/dummy/foo.txt b/pmd-core/src/test/resources/sample-source/dummy/foo.txt index 5b95f00799..2295619fc9 100644 --- a/pmd-core/src/test/resources/sample-source/dummy/foo.txt +++ b/pmd-core/src/test/resources/sample-source/dummy/foo.txt @@ -1,3 +1,92 @@ +Added line: 8377 +Added line: 2429 +Added line: 6259 +Added line: 5870 +Added line: 707 +Added line: 4206 +Added line: 4724 +Added line: 3669 +Added line: 3126 +Added line: 7405 +Added line: 1297 +Added line: 3455 +Added line: 2460 +Added line: 5275 +Added line: 6193 +Added line: 6469 +Added line: 1600 +Added line: 6230 +Added line: 1642 +Added line: 8366 +Added line: 4951 +Added line: 4577 +Added line: 2396 +Added line: 4953 +Added line: 5905 +Added line: 270 +Added line: 2442 +Added line: 8366 +Added line: 1147 +Added line: 4783 +Added line: 3130 +Added line: 7595 +Added line: 367 +Added line: 5071 +Added line: 4458 +Added line: 3708 +Added line: 2971 A dummy file with file extension txt. +Added line: 2012 +Added line: 8870 +Added line: 1740 +Added line: 6515 +Added line: 5923 +Added line: 7993 +Added line: 2736 +Added line: 6285 +Added line: 4813 +Added line: 2450 Added line: 8933 +Added line: 7679 +Added line: 6257 +Added line: 4004 +Added line: 9195 +Added line: 9657 +Added line: 3121 +Added line: 225 +Added line: 7400 +Added line: 88 +Added line: 6269 +Added line: 1350 +Added line: 9477 +Added line: 3098 +Added line: 8003 +Added line: 4595 +Added line: 79 +Added line: 8718 +Added line: 8563 +Added line: 6432 +Added line: 2406 +Added line: 443 +Added line: 1707 +Added line: 1838 Added line: 8054 +Added line: 152 +Added line: 4927 +Added line: 3132 +Added line: 9952 +Added line: 7035 +Added line: 2366 +Added line: 3901 +Added line: 2071 +Added line: 6411 +Added line: 9133 +Added line: 2948 +Added line: 912 +Added line: 8392 +Added line: 7218 +Added line: 2910 +Added line: 3003 +Added line: 9364 +Added line: 228 +Added line: 6599 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/asm.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/asm.txt index 3cc9a743a7..196af9266f 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/asm.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/asm.txt @@ -1,10 +1,13 @@ - [Image] or [Truncated image[ Bcol Ecol +Added line: 7539 +Added line: 6521 L1 +Added line: 7139 [asm] 1 4 [void] 5 9 [eSPI_boot] 10 19 [(] 19 20 [)] 20 21 +Added line: 4189 L2 [{] 1 2 L5 @@ -12,64 +15,116 @@ L5 [r1] 7 9 [,] 9 10 [_stack_addr] 11 22 +Added line: 7574 [@] 22 23 +Added line: 7251 +Added line: 5527 +Added line: 6388 +Added line: 3369 +Added line: 1212 [h] 23 24 +Added line: 7444 +Added line: 4845 L6 +Added line: 8229 [ori] 3 6 [r1] 7 9 +Added line: 7635 [,] 9 10 +Added line: 5941 +Added line: 3370 [r1] 11 13 +Added line: 7620 +Added line: 6224 +Added line: 6215 [,] 13 14 [_stack_addr] 15 26 +Added line: 1876 +Added line: 946 [@] 26 27 [l] 27 28 L7 [}] 1 2 +Added line: 7916 L9 +Added line: 6044 [int] 1 4 +Added line: 9974 [main] 5 9 +Added line: 7973 [(] 9 10 +Added line: 65 [)] 10 11 L10 [}] 1 2 L13 +Added line: 1187 [int] 1 4 [foobar] 5 11 Added line: 664 [(] 11 12 [)] 12 13 Added line: 5904 +Added line: 9502 [{] 14 15 -L14 +Added line: 2814 +Added line: 1291 +Added line: 5641 [}] 1 2 L18 - [static] 1 7 +Added line: 6364 +Added line: 8039 +Added line: 4183 +Added line: 2315 +Added line: 4542 [void] 8 12 +Added line: 8732 +Added line: 815 +Added line: 3329 +Added line: 8437 +Added line: 2366 [my_memset] 13 22 [(] 22 23 [void] 23 27 [*] 28 29 +Added line: 3832 [dest] 29 33 [,] 33 34 +Added line: 3921 +Added line: 7177 [int] 34 37 +Added line: 5107 +Added line: 4290 +Added line: 5360 +Added line: 6925 +Added line: 6477 +Added line: 9442 [fill_value] 38 48 [,] 48 49 [count] 53 58 +Added line: 6140 +Added line: 4815 [)] 58 59 L19 [{] 1 2 L20 +Added line: 2545 [__asm] 5 10 [__volatile__] 11 23 +Added line: 7718 [(] 23 24 +Added line: 1797 Added line: 9801 L21 ["cld\\n"] 10 17 L22 +Added line: 6834 ["mov %ecx, %ebx\\n"] 10 28 +Added line: 2361 +Added line: 7541 L23 +Added line: 7568 Added line: 5660 - ["shr 2,%ecx\\n"] 10 24 L24 Added line: 879 ["rep "] 10 16 @@ -78,39 +133,73 @@ L25 L26 ["mov %ebx,%ecx\\n"] 10 27 L27 +Added line: 1681 +Added line: 7605 [" // line 157 mentioned above"] 10 41 L28 [:] 10 11 +Added line: 8528 L29 +Added line: 4945 +Added line: 5316 +Added line: 3896 [:] 10 11 ["c"] 12 15 +Added line: 1196 +Added line: 4001 [(] 16 17 +Added line: 3837 +Added line: 9088 [count] 17 22 [)] 22 23 [,] 23 24 +Added line: 8114 ["a"] 25 28 [(] 29 30 +Added line: 1239 +Added line: 169 [fill_value] 30 40 +Added line: 3699 [)] 40 41 +Added line: 5874 [,] 41 42 ["D"] 43 46 +Added line: 1039 [(] 47 48 [)] 52 53 L30 [:] 10 11 +Added line: 4900 ["cc"] 12 16 [,] 16 17 +Added line: 1439 +Added line: 5564 +Added line: 4668 ["%ebx"] 17 23 +Added line: 3055 [)] 24 25 +Added line: 9663 +Added line: 9974 [;] 25 26 +Added line: 8696 +Added line: 2862 L31 - [}] 1 2 +Added line: 6716 +Added line: 7590 L35 [int] 1 4 [otherMethod] 5 16 +Added line: 7668 +Added line: 8295 +Added line: 3865 +Added line: 6690 [(] 16 17 [)] 17 18 [{] 19 20 +Added line: 6123 L36 +Added line: 6292 [}] 1 2 +Added line: 7031 +Added line: 6990 EOF diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation.txt index 616ca27009..e5be7b2e8d 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation.txt @@ -1,68 +1,157 @@ +Added line: 1264 +Added line: 8671 +Added line: 4198 [Image] or [Truncated image[ Bcol Ecol +Added line: 3653 +Added line: 6798 L8 [static] 1 7 +Added line: 3121 +Added line: 8878 [int] 8 11 +Added line: 5912 +Added line: 4822 [ab] 12 2 +Added line: 4418 L9 [=] 3 4 +Added line: 7396 +Added line: 1906 [5] 5 6 [;] 6 7 +Added line: 3243 L12 [int] 1 4 +Added line: 9171 [main] 5 9 +Added line: 6052 +Added line: 1534 +Added line: 3855 +Added line: 6611 [(] 9 10 [)] 10 11 +Added line: 2287 L13 +Added line: 8949 +Added line: 485 +Added line: 4447 [{] 1 2 L15 +Added line: 5613 +Added line: 7308 +Added line: 4995 +Added line: 5511 [std] 3 6 [::] 6 8 +Added line: 4364 [cout] 8 12 +Added line: 2619 [<<] 13 15 +Added line: 2338 ["1 Hello, "] 16 27 +Added line: 9285 +Added line: 6410 L16 ["world!\\n"] 16 26 +Added line: 9814 +Added line: 408 +Added line: 4495 +Added line: 9254 +Added line: 2862 [;] 26 27 L18 [std] 3 6 +Added line: 2263 [::] 6 8 - [cout] 8 12 - [<<] 13 15 +Added line: 3978 +Added line: 825 +Added line: 6235 ["2 Hello, world!\\n"] 16 10 L19 +Added line: 5919 +Added line: 3347 +Added line: 4192 +Added line: 6910 [;] 10 11 +Added line: 8698 L22 [std] 3 6 [::] 6 8 +Added line: 4276 +Added line: 8561 [cout] 8 12 [<<] 13 15 ["3 Hello, \\world!\\n"] 16 10 +Added line: 9876 +Added line: 934 L23 [;] 10 11 L25 [std] 3 6 +Added line: 9167 +Added line: 6800 +Added line: 3789 +Added line: 8833 +Added line: 2954 [::] 6 8 [cout] 8 12 [<<] 13 15 +Added line: 3039 ["4 Hello, "] 16 27 -L26 +Added line: 4956 +Added line: 8743 +Added line: 6259 +Added line: 2583 +Added line: 7368 +Added line: 8032 ["world!\\n"] 15 25 +Added line: 1258 +Added line: 9758 [;] 25 26 +Added line: 1200 +Added line: 263 +Added line: 6698 +Added line: 2941 L27 - [std] 3 6 +Added line: 5347 +Added line: 8290 +Added line: 594 [::] 6 8 +Added line: 7508 [cout] 8 12 +Added line: 3991 +Added line: 5582 [<<] 13 15 +Added line: 5125 +Added line: 7307 +Added line: 3015 +Added line: 3506 +Added line: 4798 +Added line: 6577 ["ab="] 16 21 [<<] 22 24 +Added line: 1724 [ab] 25 27 +Added line: 1551 +Added line: 2089 +Added line: 5918 +Added line: 7752 +Added line: 3497 +Added line: 7637 [<<] 28 30 +Added line: 4293 +Added line: 9744 +Added line: 5788 ["\\n"] 31 35 - [;] 35 36 L28 [return] 3 9 [0] 10 11 [;] 11 12 L29 [}] 1 2 +Added line: 1890 +Added line: 2205 EOF +Added line: 1320 +Added line: 1408 +Added line: 9645 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation_inter_token.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation_inter_token.txt index 30c915c3f7..3fecfb7321 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation_inter_token.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation_inter_token.txt @@ -1,24 +1,113 @@ - [Image] or [Truncated image[ Bcol Ecol +Added line: 8165 +Added line: 6764 +Added line: 7228 +Added line: 4040 +Added line: 7004 +Added line: 3241 +Added line: 1777 +Added line: 8076 L3 +Added line: 9449 +Added line: 5180 +Added line: 2726 +Added line: 7111 [int] 1 4 [main] 5 9 +Added line: 5744 [(] 9 10 +Added line: 3700 [)] 10 11 +Added line: 9783 +Added line: 9944 L4 - [{] 1 2 +Added line: 8960 L5 [std] 4 7 +Added line: 1415 +Added line: 483 +Added line: 414 [::] 7 9 - [cout] 9 13 +Added line: 3262 +Added line: 5487 +Added line: 5304 +Added line: 7292 +Added line: 7184 +Added line: 5581 +Added line: 6985 +Added line: 2992 +Added line: 7999 +Added line: 2409 [<<] 14 16 +Added line: 7555 +Added line: 5692 +Added line: 9664 ["Hello, "] 17 26 +Added line: 8932 +Added line: 8619 +Added line: 4541 +Added line: 2566 +Added line: 1330 +Added line: 9987 +Added line: 425 L6 +Added line: 9720 +Added line: 8318 +Added line: 1767 +Added line: 3335 +Added line: 2957 +Added line: 4997 +Added line: 7287 +Added line: 6040 +Added line: 1783 ["world!\\n"] 17 27 +Added line: 8143 +Added line: 5890 +Added line: 9389 +Added line: 496 +Added line: 3502 +Added line: 3473 +Added line: 5599 [;] 27 28 +Added line: 6274 +Added line: 1758 L7 +Added line: 3065 [return] 4 10 - [0] 11 12 +Added line: 5112 +Added line: 1077 +Added line: 1265 +Added line: 9720 +Added line: 3379 +Added line: 8210 [;] 12 13 +Added line: 231 +Added line: 5331 +Added line: 433 +Added line: 6560 +Added line: 8399 +Added line: 3418 +Added line: 907 +Added line: 8074 +Added line: 2760 +Added line: 735 +Added line: 9175 +Added line: 8063 +Added line: 9460 +Added line: 681 +Added line: 9697 +Added line: 5315 L8 [}] 1 2 +Added line: 1506 +Added line: 4025 +Added line: 7677 +Added line: 8007 EOF +Added line: 2818 +Added line: 1847 +Added line: 7498 +Added line: 4828 +Added line: 8434 +Added line: 4814 +Added line: 4870 +Added line: 5669 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation_intra_token.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation_intra_token.txt index df9e43234b..09918a871a 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation_intra_token.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/continuation_intra_token.txt @@ -1,14 +1,103 @@ +Added line: 5446 +Added line: 6857 +Added line: 2577 +Added line: 8852 [Image] or [Truncated image[ Bcol Ecol +Added line: 4175 +Added line: 8529 +Added line: 257 +Added line: 4072 +Added line: 4030 +Added line: 9370 +Added line: 387 +Added line: 3983 +Added line: 8971 +Added line: 2323 +Added line: 1516 +Added line: 2470 +Added line: 7779 L1 - [void] 1 2 +Added line: 6053 +Added line: 4673 +Added line: 6027 +Added line: 9218 L6 [main] 1 2 +Added line: 4158 +Added line: 614 +Added line: 1434 +Added line: 757 +Added line: 9599 +Added line: 492 +Added line: 2793 +Added line: 155 +Added line: 8691 +Added line: 4074 +Added line: 9503 +Added line: 6326 +Added line: 1073 L10 +Added line: 1717 +Added line: 4481 +Added line: 8454 +Added line: 48 +Added line: 3190 +Added line: 9314 +Added line: 4842 +Added line: 4347 +Added line: 9440 +Added line: 1027 +Added line: 4722 [(] 1 2 +Added line: 9193 +Added line: 2178 +Added line: 7259 +Added line: 1185 +Added line: 9530 +Added line: 8036 +Added line: 807 +Added line: 2400 +Added line: 4707 +Added line: 7765 +Added line: 2056 +Added line: 7615 +Added line: 1777 +Added line: 9365 L11 +Added line: 7783 +Added line: 6940 +Added line: 5447 +Added line: 1414 +Added line: 7698 +Added line: 544 [)] 1 2 +Added line: 6175 L13 +Added line: 3647 +Added line: 9408 +Added line: 9497 +Added line: 9857 +Added line: 1732 +Added line: 7402 [{] 1 2 +Added line: 5112 +Added line: 5189 +Added line: 2630 +Added line: 894 +Added line: 6425 L15 +Added line: 2271 +Added line: 7255 +Added line: 9623 +Added line: 5218 +Added line: 9305 +Added line: 8989 [}] 1 2 EOF +Added line: 6384 +Added line: 1919 +Added line: 481 +Added line: 6191 +Added line: 5570 +Added line: 1251 +Added line: 7397 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/identifierChars.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/identifierChars.txt index d48b3632ae..6374186d81 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/identifierChars.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/identifierChars.txt @@ -1,40 +1,129 @@ - [Image] or [Truncated image[ Bcol Ecol +Added line: 9605 +Added line: 2134 +Added line: 7282 +Added line: 4121 L1 [void] 2 6 +Added line: 8279 +Added line: 1416 +Added line: 6228 Added line: 7276 +Added line: 8416 +Added line: 8818 +Added line: 6089 +Added line: 1149 +Added line: 336 +Added line: 907 +Added line: 6413 +Added line: 8911 +Added line: 4734 [main] 7 11 +Added line: 2942 +Added line: 6238 [(] 11 12 [)] 12 13 +Added line: 8474 [{] 14 15 Added line: 8883 +Added line: 1519 +Added line: 7987 +Added line: 7717 [int] 5 8 [x$y] 9 12 [=] 13 14 [42] 15 17 Added line: 2629 +Added line: 5840 +Added line: 3352 +Added line: 2061 +Added line: 2868 +Added line: 7859 Added line: 3998 +Added line: 1335 +Added line: 667 [;] 17 18 +Added line: 3039 +Added line: 2319 +Added line: 9742 L3 [int] 5 8 [$yx] 9 12 [=] 13 14 [42] 15 17 +Added line: 6118 +Added line: 4867 +Added line: 2888 +Added line: 5074 +Added line: 9651 [;] 17 18 +Added line: 3108 +Added line: 6625 L4 +Added line: 6250 +Added line: 397 [int] 5 8 +Added line: 5780 +Added line: 2152 +Added line: 8295 +Added line: 4202 +Added line: 3492 +Added line: 9511 +Added line: 8427 +Added line: 3078 Added line: 4477 - [県] 9 10 +Added line: 5721 +Added line: 6642 +Added line: 736 +Added line: 4055 +Added line: 1060 +Added line: 6526 [=] 11 12 +Added line: 4228 +Added line: 4620 +Added line: 5416 [µweiß42] 13 20 +Added line: 5517 +Added line: 1292 +Added line: 578 L5 +Added line: 7939 +Added line: 498 +Added line: 6403 +Added line: 2858 +Added line: 6080 [int] 5 8 - [❶] 9 10 +Added line: 1124 +Added line: 5539 +Added line: 2366 +Added line: 2179 +Added line: 6546 +Added line: 5021 +Added line: 4592 +Added line: 2108 +Added line: 3813 +Added line: 755 +Added line: 8115 [=] 11 12 - [__] 13 15 +Added line: 4231 +Added line: 5752 +Added line: 496 [;] 15 16 +Added line: 5421 +Added line: 2929 +Added line: 2627 +Added line: 2506 +Added line: 5314 +Added line: 5119 L6 +Added line: 4755 [a\\u0048] 9 16 +Added line: 3864 +Added line: 8032 [;] 16 17 L7 +Added line: 7311 +Added line: 734 +Added line: 3657 [}] 2 3 +Added line: 1035 EOF diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/ignoreIdents.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/ignoreIdents.txt index b564fde247..d2df9a752a 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/ignoreIdents.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/ignoreIdents.txt @@ -1,35 +1,124 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 2927 L1 [class] 1 6 - [<ID>] 7 11 +Added line: 325 +Added line: 4315 +Added line: 4199 +Added line: 8714 +Added line: 4340 +Added line: 2706 +Added line: 4365 [{] 12 13 L2 +Added line: 8075 +Added line: 6865 +Added line: 9616 +Added line: 1719 +Added line: 6360 +Added line: 8938 +Added line: 2049 +Added line: 1138 [void] 2 6 [<ID>] 7 8 +Added line: 551 +Added line: 6819 +Added line: 9151 +Added line: 438 +Added line: 5631 +Added line: 6789 +Added line: 4876 +Added line: 7174 [(] 8 9 +Added line: 8615 +Added line: 6074 +Added line: 1464 [int] 9 12 - [<ID>] 13 14 +Added line: 1945 +Added line: 7390 +Added line: 6468 +Added line: 7731 +Added line: 2966 [,] 14 15 +Added line: 2475 +Added line: 2734 +Added line: 3052 +Added line: 274 +Added line: 334 +Added line: 9294 +Added line: 9437 +Added line: 2375 +Added line: 5231 [float] 16 21 +Added line: 1802 +Added line: 1603 +Added line: 8079 +Added line: 9512 +Added line: 1502 [<ID>] 22 23 +Added line: 3064 +Added line: 2135 [)] 23 24 +Added line: 5385 +Added line: 9804 [{] 25 26 +Added line: 6864 +Added line: 3880 +Added line: 6343 +Added line: 8076 +Added line: 5358 +Added line: 1248 L3 +Added line: 8942 +Added line: 8311 +Added line: 8671 +Added line: 5940 +Added line: 6351 +Added line: 3120 [auto] 3 7 [<ID>] 8 9 +Added line: 7617 +Added line: 8773 +Added line: 4247 +Added line: 6072 +Added line: 1120 +Added line: 8674 [=] 10 11 [<ID>] 12 13 [+] 14 15 [<ID>] 16 17 +Added line: 2485 [;] 17 18 +Added line: 3555 +Added line: 2681 +Added line: 3445 L4 +Added line: 2381 [int] 3 6 +Added line: 3298 [<ID>] 7 8 [=] 9 10 [6] 11 12 [;] 12 13 +Added line: 8790 +Added line: 7010 +Added line: 9403 L5 - [}] 2 3 +Added line: 9804 +Added line: 5687 +Added line: 371 +Added line: 9129 +Added line: 6735 +Added line: 9055 +Added line: 9313 +Added line: 2771 +Added line: 5513 +Added line: 4688 +Added line: 8980 +Added line: 8342 L6 [}] 1 2 +Added line: 4014 EOF +Added line: 7713 +Added line: 4445 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/ignoreLiterals.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/ignoreLiterals.txt index a491157b23..9d241bc34b 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/ignoreLiterals.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/ignoreLiterals.txt @@ -1,26 +1,45 @@ +Added line: 7014 +Added line: 3942 [Image] or [Truncated image[ Bcol Ecol +Added line: 6508 L1 [void] 2 6 [main] 7 11 [(] 11 12 +Added line: 3017 [)] 12 13 +Added line: 7694 +Added line: 4610 +Added line: 9078 [{] 14 15 L2 +Added line: 2437 +Added line: 2830 [char] 5 9 +Added line: 4246 [x] 10 11 +Added line: 2230 [=] 12 13 [<CHARACTER>] 14 18 +Added line: 6014 +Added line: 3871 [;] 18 19 +Added line: 5790 L3 +Added line: 4477 [x] 5 6 [=] 7 8 [<CHARACTER>] 9 16 +Added line: 1555 [;] 16 17 +Added line: 1417 L6 [print] 5 10 [(] 10 11 [<STRING>] 11 24 +Added line: 3188 [)] 24 25 +Added line: 6708 [;] 25 26 L10 [char16_t] 5 13 @@ -28,28 +47,43 @@ L10 [=] 16 17 [<CHARACTER>] 18 27 [;] 27 28 +Added line: 8981 L11 [wchar_t] 5 12 [b] 13 14 +Added line: 2500 +Added line: 5512 [=] 15 16 +Added line: 7770 [<CHARACTER>] 17 26 [;] 26 27 L12 +Added line: 5716 +Added line: 7702 +Added line: 8478 [char] 5 9 [a] 10 11 [=] 12 13 [<CHARACTER>] 15 21 +Added line: 9373 L13 [char32_t] 5 13 +Added line: 7595 +Added line: 9252 +Added line: 4669 [d] 14 15 [=] 16 17 [<CHARACTER>] 18 31 Added line: 5961 +Added line: 4465 +Added line: 2237 [;] 31 32 +Added line: 9684 [char] 5 9 +Added line: 7958 [A] 10 11 +Added line: 2143 [\[] 11 12 - [\]] 12 13 [=] 14 15 [<STRING>] 16 27 [;] 27 28 @@ -64,74 +98,129 @@ L17 L18 [char16_t] 5 13 [C] 14 15 +Added line: 3742 Added line: 7451 +Added line: 4113 [\[] 15 16 [\]] 16 17 Added line: 669 +Added line: 7280 +Added line: 8964 [=] 18 19 +Added line: 1214 [<STRING>] 20 33 +Added line: 5291 +Added line: 1173 [;] 33 34 L19 [char32_t] 5 13 [D] 14 15 +Added line: 9124 [\[] 15 16 +Added line: 3000 +Added line: 2919 [\]] 16 17 [=] 18 19 +Added line: 4234 [<STRING>] 20 47 [;] 47 48 +Added line: 9727 [auto] 5 9 [E] 10 11 [\[] 11 12 - [\]] 12 13 +Added line: 3610 [=] 14 15 +Added line: 2827 [<STRING>] 16 36 [;] 36 37 L24 [char] 5 9 - [*] 9 10 +Added line: 9997 [rawString] 11 20 [=] 21 22 +Added line: 9339 +Added line: 6171 [<RSTRING>] 23 7 L30 [;] 7 8 L35 +Added line: 7776 +Added line: 6966 [auto] 5 9 +Added line: 3197 [integer_literal] 10 25 [=] 26 27 [<DECIMAL_INT_LITERAL>] 28 38 [;] 38 39 +Added line: 1953 +Added line: 8498 +Added line: 4044 +Added line: 5413 L36 [auto] 5 9 [floating_point_literal] 10 32 [=] 33 34 - [<FLOAT_LITERAL>] 35 46 +Added line: 1172 [;] 46 47 L37 +Added line: 9586 [auto] 5 9 +Added line: 1495 [hex_literal] 10 21 [=] 22 23 [<HEXADECIMAL_INT_LITERAL>] 24 40 +Added line: 9018 +Added line: 9993 +Added line: 6486 [;] 40 41 +Added line: 312 Added line: 6980 +Added line: 6411 +Added line: 9438 +Added line: 2572 L38 [auto] 5 9 +Added line: 3681 +Added line: 519 [silly_example] 10 23 +Added line: 8243 +Added line: 6237 [=] 24 25 +Added line: 5795 +Added line: 6774 +Added line: 8855 [<DECIMAL_INT_LITERAL>] 26 38 +Added line: 1811 +Added line: 5602 [;] 38 39 +Added line: 816 +Added line: 8836 +Added line: 2299 L41 Added line: 9645 +Added line: 3015 +Added line: 1988 +Added line: 2979 +Added line: 9282 [int] 5 8 +Added line: 6300 [b1] 9 11 [=] 12 13 [<BINARY_INT_LITERAL>] 14 22 [;] 22 23 +Added line: 1050 L42 [int] 5 8 [b2] 9 11 +Added line: 5907 +Added line: 9024 +Added line: 2307 [=] 12 13 +Added line: 610 [<BINARY_INT_LITERAL>] 14 22 +Added line: 2113 [;] 22 23 L43 [}] 1 2 +Added line: 9905 EOF diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/issue-1784.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/issue-1784.txt index be5d5e1ddc..061bacd6ca 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/issue-1784.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/issue-1784.txt @@ -1,25 +1,114 @@ +Added line: 7885 +Added line: 7283 +Added line: 7887 +Added line: 8338 +Added line: 9950 +Added line: 8534 +Added line: 3580 +Added line: 9061 +Added line: 590 +Added line: 1297 +Added line: 1130 [Image] or [Truncated image[ Bcol Ecol L1 +Added line: 594 +Added line: 1383 +Added line: 6966 +Added line: 103 [namespace] 1 10 +Added line: 3708 +Added line: 3091 [ABC] 11 14 L2 +Added line: 9995 +Added line: 9511 [{] 1 2 +Added line: 9301 +Added line: 4968 +Added line: 6456 +Added line: 4427 L3 +Added line: 6440 +Added line: 1829 +Added line: 377 +Added line: 5734 [namespace] 3 12 [DEF] 13 16 +Added line: 5455 +Added line: 7845 +Added line: 300 +Added line: 6328 +Added line: 2027 L4 +Added line: 2164 +Added line: 7250 +Added line: 8752 +Added line: 863 [{] 3 4 +Added line: 9432 +Added line: 9981 +Added line: 8029 +Added line: 98 +Added line: 38 +Added line: 9497 +Added line: 3869 +Added line: 4702 +Added line: 7076 +Added line: 1790 +Added line: 1163 +Added line: 7191 +Added line: 9836 +Added line: 4512 +Added line: 169 +Added line: 9278 +Added line: 4383 +Added line: 8012 +Added line: 1358 L7 [const] 5 10 +Added line: 5227 [char] 11 15 [*] 15 16 +Added line: 4259 +Added line: 7043 +Added line: 9607 +Added line: 8003 [perPixelQml] 17 28 +Added line: 2547 +Added line: 4161 +Added line: 1007 [=] 29 30 +Added line: 9416 +Added line: 4185 [R"QML(\n )NOTTHEND";\n)QML"] 31 6 +Added line: 4584 +Added line: 8570 +Added line: 6512 +Added line: 1724 L9 +Added line: 9404 +Added line: 955 +Added line: 1047 +Added line: 6609 +Added line: 2444 +Added line: 7507 +Added line: 1855 +Added line: 4913 +Added line: 9452 [;] 6 7 L10 [}] 3 4 +Added line: 5581 +Added line: 2132 L11 [}] 1 2 +Added line: 8172 +Added line: 9056 +Added line: 7432 EOF +Added line: 4230 +Added line: 9178 +Added line: 4657 +Added line: 4717 +Added line: 9579 +Added line: 2899 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers.txt index cadeabcd90..c132311bcd 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers.txt @@ -1,3 +1,6 @@ +Added line: 3429 +Added line: 3186 +Added line: 400 [Image] or [Truncated image[ Bcol Ecol L2 [int] 1 4 @@ -8,8 +11,8 @@ L2 L3 [int] 3 6 [a] 7 8 - [\[] 8 9 [50] 9 11 +Added line: 745 [\]] 11 12 [=] 13 14 [{] 15 16 @@ -26,6 +29,7 @@ L3 [0] 26 27 [,] 27 28 Added line: 1672 +Added line: 6530 [0] 28 29 [0] 30 31 [,] 31 32 @@ -39,12 +43,15 @@ Added line: 1672 [,] 39 40 [0] 40 41 [,] 41 42 +Added line: 8647 [0] 42 43 [,] 43 44 [0] 44 45 [,] 45 46 [0] 46 47 +Added line: 8174 [,] 47 48 +Added line: 1358 [0] 48 49 [,] 49 50 [0] 50 51 @@ -55,13 +62,15 @@ Added line: 1439 [0] 54 55 [,] 55 56 [0] 56 57 +Added line: 2196 +Added line: 4025 [,] 57 58 [0] 58 59 [,] 59 60 [0] 60 61 [,] 61 62 [0] 62 63 - [,] 63 64 +Added line: 8009 [0] 64 65 [,] 65 66 [0] 66 67 @@ -78,14 +87,17 @@ Added line: 1439 [,] 77 78 [0] 78 79 [,] 79 80 +Added line: 8964 [0] 80 81 [,] 81 82 [0] 82 83 +Added line: 9204 [,] 83 84 [0] 84 85 [,] 85 86 [0] 86 87 [,] 87 88 +Added line: 4709 [0] 88 89 [,] 89 90 [0] 90 91 @@ -98,47 +110,68 @@ Added line: 1439 [,] 97 98 [0] 98 99 [,] 99 100 +Added line: 3328 [0] 100 101 [,] 101 102 [0] 102 103 [,] 103 104 [0] 104 105 +Added line: 860 +Added line: 8329 +Added line: 8429 +Added line: 2925 [,] 105 106 [0] 106 107 [,] 107 108 [0] 108 109 [,] 109 110 [0] 110 111 +Added line: 776 +Added line: 6046 [,] 111 112 +Added line: 4830 [0] 112 113 [,] 113 114 [0] 114 115 [}] 115 116 [;] 116 117 +Added line: 9059 L4 +Added line: 2906 [double] 3 9 [b] 10 11 [\[] 11 12 Added line: 3278 +Added line: 6589 [14] 12 14 +Added line: 4100 [\]] 14 15 +Added line: 7824 [=] 16 17 [{] 18 19 +Added line: 1987 +Added line: 8978 +Added line: 2319 +Added line: 7352 L5 [157] 5 8 [,] 8 9 L6 +Added line: 7874 [0377] 5 9 [,] 9 10 +Added line: 9589 L7 [36'000'000] 5 15 [,] 15 16 L8 - [0x3fff] 5 11 +Added line: 6302 +Added line: 1405 [,] 11 12 L9 [0X3FFF] 5 11 [,] 11 12 +Added line: 7254 L10 [328u] 5 9 [,] 9 10 @@ -147,19 +180,27 @@ L11 [,] 14 15 L12 [0776745ul] 5 14 +Added line: 3504 [,] 14 15 L13 +Added line: 5869 [18.46] 5 10 [,] 10 11 L14 [38.] 5 8 [,] 8 9 +Added line: 4086 L15 [18.46e0] 5 12 +Added line: 9465 +Added line: 8234 [,] 12 13 L16 +Added line: 8062 [18.46e1] 5 12 +Added line: 6347 [,] 12 13 +Added line: 6168 L17 [0B001101] 5 13 [,] 13 14 @@ -167,55 +208,75 @@ L18 [0b000001] 5 13 [,] 13 14 L19 +Added line: 6626 [}] 3 4 [;] 4 5 L20 [int] 3 6 [c] 7 8 +Added line: 4280 [\[] 8 9 +Added line: 1455 [3] 9 10 +Added line: 513 [\]] 10 11 +Added line: 3686 +Added line: 2276 [\[] 11 12 [4] 12 13 [\]] 13 14 [=] 15 16 [{] 17 18 +Added line: 6391 +Added line: 9342 [{] 18 19 [0] 19 20 [,] 20 21 +Added line: 2642 [1] 21 22 [,] 22 23 [2] 23 24 [,] 24 25 +Added line: 298 +Added line: 9847 +Added line: 5469 [3] 25 26 +Added line: 1165 +Added line: 9080 [}] 26 27 [,] 27 28 [{] 28 29 +Added line: 3258 [4] 29 30 - [,] 30 31 [5] 31 32 [,] 32 33 +Added line: 7903 [6] 33 34 [,] 34 35 [7] 35 36 +Added line: 1788 +Added line: 7737 [}] 36 37 [,] 37 38 - [{] 38 39 [8] 39 40 [,] 40 41 +Added line: 95 [9] 41 42 [,] 42 43 Added line: 7956 - [10] 43 45 +Added line: 9410 [,] 45 46 [11] 46 48 [}] 48 49 +Added line: 4484 [}] 49 50 [;] 50 51 L21 [int] 3 6 [d] 7 8 [\[] 8 9 +Added line: 3496 +Added line: 8011 [3] 9 10 [\]] 10 11 [=] 12 13 @@ -224,13 +285,16 @@ L21 [,] 16 17 [a] 18 19 [,] 19 20 +Added line: 6688 [a] 21 22 [}] 22 23 [;] 23 24 L22 [int] 3 6 [e] 7 8 +Added line: 4639 [1] 9 10 +Added line: 6080 [\]] 10 11 [\[] 11 12 [3] 12 13 @@ -240,17 +304,23 @@ L22 [{] 18 19 [a] 19 20 [,] 20 21 +Added line: 337 [a] 22 23 [,] 23 24 [a] 25 26 [}] 26 27 [}] 27 28 +Added line: 533 [;] 28 29 +Added line: 8962 +Added line: 795 L23 [int] 3 6 [f] 7 8 [\[] 8 9 [1] 9 10 +Added line: 303 +Added line: 1733 [\]] 10 11 [=] 12 13 [{] 14 15 @@ -261,26 +331,45 @@ L23 L24 [int] 3 6 [g] 7 8 +Added line: 8575 [\[] 8 9 +Added line: 2352 [1] 9 10 +Added line: 8099 [\]] 10 11 +Added line: 5628 [\[] 11 12 [1] 12 13 +Added line: 7166 [\]] 13 14 +Added line: 7970 [=] 15 16 +Added line: 6270 +Added line: 9545 +Added line: 6838 +Added line: 5056 [{] 17 18 Added line: 8157 [{] 18 19 +Added line: 8901 [main] 19 23 [(] 23 24 +Added line: 4758 +Added line: 9051 +Added line: 563 +Added line: 8888 +Added line: 3928 [)] 24 25 [}] 25 26 [}] 26 27 [;] 27 28 L25 [return] 3 9 +Added line: 3664 [0] 10 11 [;] 11 12 +Added line: 2643 +Added line: 6293 L26 [}] 1 2 EOF diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers_ignored.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers_ignored.txt index a94c9908eb..a022be4386 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers_ignored.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers_ignored.txt @@ -1,108 +1,197 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 7682 +Added line: 5683 L2 [int] 1 4 - [main] 5 9 +Added line: 5564 +Added line: 5668 [(] 9 10 [)] 10 11 [{] 12 13 +Added line: 8987 L3 +Added line: 3364 +Added line: 880 +Added line: 6606 +Added line: 8093 +Added line: 1040 +Added line: 7808 [int] 3 6 [a] 7 8 [\[] 8 9 +Added line: 5935 +Added line: 8357 +Added line: 7018 +Added line: 4862 [50] 9 11 +Added line: 6364 +Added line: 6521 [\]] 11 12 +Added line: 5866 +Added line: 2870 +Added line: 7863 [=] 13 14 [;] 116 117 +Added line: 1174 L4 [double] 3 9 +Added line: 2777 [b] 10 11 +Added line: 7352 +Added line: 4934 [\[] 11 12 +Added line: 9527 [14] 12 14 +Added line: 867 [\]] 14 15 [=] 16 17 L19 [;] 4 5 +Added line: 4327 L20 [int] 3 6 [c] 7 8 [\[] 8 9 +Added line: 48 +Added line: 2782 [3] 9 10 [\]] 10 11 [\[] 11 12 [4] 12 13 [\]] 13 14 [=] 15 16 +Added line: 944 +Added line: 9391 +Added line: 2107 [;] 50 51 L21 [int] 3 6 [d] 7 8 [\[] 8 9 +Added line: 1172 +Added line: 5139 +Added line: 5789 +Added line: 1656 [3] 9 10 [\]] 10 11 +Added line: 7060 +Added line: 9513 [=] 12 13 [{] 14 15 +Added line: 5821 [a] 15 16 +Added line: 6788 +Added line: 2417 +Added line: 5255 [,] 16 17 [a] 18 19 +Added line: 4486 [,] 19 20 - [a] 21 22 [}] 22 23 [;] 23 24 L22 +Added line: 8186 +Added line: 9284 [int] 3 6 +Added line: 687 [e] 7 8 [\[] 8 9 +Added line: 5542 +Added line: 5065 +Added line: 3013 +Added line: 825 +Added line: 5599 +Added line: 8424 [1] 9 10 [\]] 10 11 +Added line: 8090 [\[] 11 12 [3] 12 13 [\]] 13 14 +Added line: 2521 [=] 15 16 [{] 17 18 [{] 18 19 +Added line: 8593 +Added line: 5754 [a] 19 20 [,] 20 21 [a] 22 23 [,] 23 24 [a] 25 26 +Added line: 7296 +Added line: 9568 +Added line: 2462 [}] 26 27 +Added line: 2628 +Added line: 9748 +Added line: 2668 +Added line: 6100 [}] 27 28 +Added line: 4577 [;] 28 29 L23 - [int] 3 6 +Added line: 4521 +Added line: 5882 +Added line: 7794 [f] 7 8 [\[] 8 9 [1] 9 10 [\]] 10 11 +Added line: 5619 +Added line: 3557 [=] 12 13 [{] 14 15 +Added line: 8557 +Added line: 2299 [main] 15 19 [(] 19 20 [)] 20 21 +Added line: 2770 +Added line: 495 +Added line: 4049 [}] 21 22 +Added line: 370 +Added line: 1313 +Added line: 7013 [;] 22 23 +Added line: 4117 L24 +Added line: 5377 [int] 3 6 [g] 7 8 [\[] 8 9 [1] 9 10 [\]] 10 11 +Added line: 1542 +Added line: 7519 +Added line: 9667 [\[] 11 12 [1] 12 13 +Added line: 6943 [\]] 13 14 [=] 15 16 [{] 17 18 +Added line: 5039 +Added line: 8701 +Added line: 4395 [{] 18 19 [main] 19 23 [(] 23 24 +Added line: 6364 [)] 24 25 - [}] 25 26 [}] 26 27 +Added line: 4348 [;] 27 28 L25 [return] 3 9 [0] 10 11 [;] 11 12 -L26 +Added line: 7568 +Added line: 1397 [}] 1 2 EOF +Added line: 7421 +Added line: 8762 +Added line: 3087 +Added line: 3655 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers_ignored_identifiers.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers_ignored_identifiers.txt index 358c5009da..0008723988 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers_ignored_identifiers.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/listOfNumbers_ignored_identifiers.txt @@ -1,92 +1,181 @@ +Added line: 2622 +Added line: 6283 +Added line: 5943 +Added line: 5506 [Image] or [Truncated image[ Bcol Ecol L2 [int] 1 4 +Added line: 8237 [main] 5 9 +Added line: 375 +Added line: 5226 [(] 9 10 [)] 10 11 +Added line: 1866 [{] 12 13 L3 [int] 3 6 - [a] 7 8 [\[] 8 9 +Added line: 6588 [50] 9 11 - [\]] 11 12 - [=] 13 14 +Added line: 7513 [;] 116 117 +Added line: 6699 L4 - [double] 3 9 [b] 10 11 +Added line: 7591 [\[] 11 12 +Added line: 1916 +Added line: 9794 +Added line: 4583 +Added line: 7309 [14] 12 14 +Added line: 2302 [\]] 14 15 +Added line: 6938 +Added line: 2568 +Added line: 3370 [=] 16 17 L19 +Added line: 7482 +Added line: 1035 [;] 4 5 +Added line: 7221 L20 [int] 3 6 [c] 7 8 +Added line: 8310 [\[] 8 9 +Added line: 2378 [3] 9 10 [\]] 10 11 [\[] 11 12 +Added line: 3167 +Added line: 272 +Added line: 6554 +Added line: 6234 [4] 12 13 +Added line: 4640 +Added line: 2845 +Added line: 6585 +Added line: 2560 +Added line: 201 [\]] 13 14 +Added line: 2816 +Added line: 1130 [=] 15 16 +Added line: 739 [;] 50 51 L21 [int] 3 6 [d] 7 8 +Added line: 7875 +Added line: 4130 +Added line: 919 [\[] 8 9 [3] 9 10 [\]] 10 11 +Added line: 9928 +Added line: 245 [=] 12 13 [;] 23 24 +Added line: 7384 L22 +Added line: 1439 [int] 3 6 [e] 7 8 +Added line: 443 +Added line: 3116 +Added line: 1471 [\[] 8 9 +Added line: 1500 [1] 9 10 [\]] 10 11 +Added line: 1144 [\[] 11 12 [3] 12 13 +Added line: 6984 +Added line: 1233 +Added line: 3161 +Added line: 8725 [\]] 13 14 [=] 15 16 - [;] 28 29 -L23 [int] 3 6 +Added line: 6129 +Added line: 2431 +Added line: 2592 +Added line: 9237 [f] 7 8 [\[] 8 9 +Added line: 6716 +Added line: 4573 +Added line: 7869 +Added line: 5857 +Added line: 356 +Added line: 5768 [1] 9 10 - [\]] 10 11 +Added line: 8317 +Added line: 7143 [=] 12 13 +Added line: 5810 [{] 14 15 [main] 15 19 [(] 19 20 [)] 20 21 +Added line: 1431 +Added line: 2418 [}] 21 22 +Added line: 2889 +Added line: 4147 [;] 22 23 +Added line: 1294 +Added line: 8931 +Added line: 7005 +Added line: 2022 +Added line: 8595 L24 [int] 3 6 [g] 7 8 [\[] 8 9 [1] 9 10 +Added line: 5509 +Added line: 4388 +Added line: 8548 [\]] 10 11 +Added line: 939 [\[] 11 12 +Added line: 3272 +Added line: 8246 [1] 12 13 [\]] 13 14 [=] 15 16 [{] 17 18 +Added line: 6777 +Added line: 1093 +Added line: 1784 [{] 18 19 +Added line: 7593 [main] 19 23 [(] 23 24 [)] 24 25 +Added line: 2773 +Added line: 3490 +Added line: 7305 +Added line: 4658 [}] 25 26 [}] 26 27 +Added line: 2218 [;] 27 28 L25 [return] 3 9 +Added line: 9918 +Added line: 5395 +Added line: 31 [0] 10 11 +Added line: 8174 [;] 11 12 +Added line: 8007 L26 +Added line: 2859 [}] 1 2 EOF diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/literals.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/literals.txt index 79afe0b26c..d1ba018c7a 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/literals.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/literals.txt @@ -1,113 +1,193 @@ +Added line: 5256 [Image] or [Truncated image[ Bcol Ecol L1 [void] 2 6 [main] 7 11 +Added line: 7892 +Added line: 6549 +Added line: 3667 [(] 11 12 +Added line: 784 [)] 12 13 - [{] 14 15 +Added line: 3219 L2 [char] 5 9 - [x] 10 11 [=] 12 13 [L'a'] 14 18 [;] 18 19 L3 [x] 5 6 - [=] 7 8 +Added line: 9389 +Added line: 1082 ['\\0x05'] 9 16 +Added line: 3094 +Added line: 8178 [;] 16 17 +Added line: 7867 +Added line: 1119 L6 [print] 5 10 +Added line: 421 +Added line: 6622 +Added line: 5885 +Added line: 4583 +Added line: 6428 +Added line: 7153 [(] 10 11 ["\\ oMedia"] 11 24 +Added line: 9399 [)] 24 25 +Added line: 95 +Added line: 2363 [;] 25 26 L10 [char16_t] 5 13 [c] 14 15 [=] 16 17 - [u'\\u00F6'] 18 27 [;] 27 28 L11 [wchar_t] 5 12 [b] 13 14 [=] 15 16 +Added line: 1099 [L'\\xFFEF'] 17 26 +Added line: 2808 +Added line: 9570 [;] 26 27 L12 [char] 5 9 +Added line: 2836 [a] 10 11 +Added line: 6260 [=] 12 13 ['\\x30'] 15 21 +Added line: 1544 +Added line: 5696 [;] 21 22 +Added line: 8465 +Added line: 765 L13 [char32_t] 5 13 +Added line: 6030 [d] 14 15 +Added line: 5835 [=] 16 17 [U'\\U0010FFFF'] 18 31 [;] 31 32 L16 +Added line: 4973 +Added line: 9579 [char] 5 9 [A] 10 11 +Added line: 3655 +Added line: 3140 [\[] 11 12 +Added line: 225 [\]] 12 13 +Added line: 8129 +Added line: 5302 +Added line: 7218 +Added line: 3849 [=] 14 15 ["Hello\\x0A"] 16 27 [;] 27 28 L17 [wchar_t] 5 12 +Added line: 7226 [B] 13 14 +Added line: 5011 [\[] 14 15 [\]] 15 16 - [=] 17 18 +Added line: 3465 [L"Hell\\xF6\\x0A"] 19 34 +Added line: 8500 +Added line: 5423 [;] 34 35 L18 [char16_t] 5 13 [C] 14 15 [\[] 15 16 +Added line: 7770 [\]] 16 17 +Added line: 5398 +Added line: 9829 +Added line: 5540 [=] 18 19 +Added line: 2853 +Added line: 4476 [u"Hell\\u00F6"] 20 33 +Added line: 8362 [;] 33 34 +Added line: 9724 L19 +Added line: 8436 +Added line: 1080 [char32_t] 5 13 [D] 14 15 +Added line: 5507 [\[] 15 16 [\]] 16 17 +Added line: 2757 [=] 18 19 [U"Hell\\U000000F6\\U0010FFFF"] 20 47 +Added line: 5627 +Added line: 3433 [;] 47 48 L20 +Added line: 1129 [auto] 5 9 [E] 10 11 +Added line: 6620 +Added line: 1009 +Added line: 50 [\[] 11 12 +Added line: 7348 [\]] 12 13 [=] 14 15 +Added line: 4912 +Added line: 9022 +Added line: 8496 [u8"\\u00F6\\U0010FFFF"] 16 36 [;] 36 37 L24 +Added line: 5718 [char] 5 9 [*] 9 10 +Added line: 5313 +Added line: 7976 +Added line: 5704 [rawString] 11 20 +Added line: 4493 [=] 21 22 +Added line: 6401 [R"(\n \[Sinks.1\]\n [ 23 7 +Added line: 359 +Added line: 5554 L30 +Added line: 273 +Added line: 8568 [;] 7 8 +Added line: 6241 +Added line: 970 +Added line: 6379 +Added line: 4981 L35 +Added line: 2396 [auto] 5 9 [integer_literal] 10 25 [=] 26 27 [1'000''000] 28 38 +Added line: 6685 [;] 38 39 L36 [auto] 5 9 [floating_point_literal] 10 32 +Added line: 1759 [=] 33 34 [0.000'015'3] 35 46 [;] 46 47 +Added line: 275 L37 - [auto] 5 9 [hex_literal] 10 21 [=] 22 23 [0x0F00'abcd'6f3d] 24 40 @@ -115,15 +195,22 @@ L37 L38 [auto] 5 9 [silly_example] 10 23 +Added line: 9224 +Added line: 2027 [=] 24 25 [1'0'0'000'00] 26 38 [;] 38 39 +Added line: 8287 L41 [int] 5 8 - [b1] 9 11 +Added line: 8038 [=] 12 13 +Added line: 2042 +Added line: 5220 +Added line: 5359 [0B001101] 14 22 [;] 22 23 +Added line: 5772 L42 [int] 5 8 [b2] 9 11 @@ -131,5 +218,7 @@ L42 [0b000001] 14 22 [;] 22 23 L43 +Added line: 5078 [}] 1 2 EOF +Added line: 3314 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/multilineMacros.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/multilineMacros.txt index 229cd6b2ab..6affab03c2 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/multilineMacros.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/multilineMacros.txt @@ -1,11 +1,100 @@ +Added line: 1655 +Added line: 1180 +Added line: 5579 +Added line: 2547 +Added line: 4309 [Image] or [Truncated image[ Bcol Ecol +Added line: 2355 +Added line: 6321 +Added line: 6183 +Added line: 6945 +Added line: 4965 +Added line: 3110 Added line: 7029 +Added line: 9736 +Added line: 5135 +Added line: 2860 +Added line: 2147 L8 +Added line: 1823 +Added line: 5389 +Added line: 2586 +Added line: 4423 +Added line: 7171 +Added line: 6314 Added line: 8502 +Added line: 1048 +Added line: 3892 Added line: 8400 - [main] 7 11 +Added line: 550 +Added line: 3706 +Added line: 1924 +Added line: 8696 +Added line: 3260 +Added line: 5695 +Added line: 6856 +Added line: 6167 +Added line: 4871 +Added line: 9142 +Added line: 5542 +Added line: 7301 +Added line: 5448 +Added line: 602 +Added line: 289 +Added line: 8448 +Added line: 6687 +Added line: 4429 +Added line: 8531 [(] 11 12 +Added line: 6930 +Added line: 2872 +Added line: 6786 [{] 14 15 +Added line: 5885 +Added line: 4310 +Added line: 538 +Added line: 8038 +Added line: 8632 +Added line: 7970 +Added line: 393 +Added line: 5478 +Added line: 178 +Added line: 9588 +Added line: 4018 +Added line: 8294 +Added line: 1697 +Added line: 3688 +Added line: 6452 +Added line: 236 +Added line: 1274 +Added line: 4019 +Added line: 4248 +Added line: 7386 [}] 15 16 +Added line: 3567 +Added line: 9890 Added line: 6217 +Added line: 3305 +Added line: 9342 +Added line: 2878 +Added line: 1788 +Added line: 935 +Added line: 4781 EOF +Added line: 7341 +Added line: 6765 +Added line: 4227 +Added line: 4200 +Added line: 7899 +Added line: 9958 +Added line: 5248 +Added line: 3225 +Added line: 3650 +Added line: 5668 +Added line: 9324 +Added line: 8867 +Added line: 5366 +Added line: 7669 +Added line: 1272 +Added line: 7271 +Added line: 6362 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/preprocessorDirectives.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/preprocessorDirectives.txt index 91d154159c..a8237dabf0 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/preprocessorDirectives.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/preprocessorDirectives.txt @@ -1,4 +1,93 @@ +Added line: 2421 +Added line: 9706 +Added line: 6676 +Added line: 7808 +Added line: 4532 +Added line: 6955 +Added line: 6955 +Added line: 107 +Added line: 710 +Added line: 248 +Added line: 5445 +Added line: 3857 +Added line: 9424 +Added line: 3277 +Added line: 1038 +Added line: 4872 +Added line: 1483 +Added line: 2194 +Added line: 4534 +Added line: 3579 +Added line: 278 +Added line: 2731 +Added line: 6670 +Added line: 9668 +Added line: 1868 [Image] or [Truncated image[ Bcol Ecol +Added line: 7328 +Added line: 5149 +Added line: 3570 +Added line: 4684 +Added line: 2140 +Added line: 8063 +Added line: 2492 +Added line: 9371 +Added line: 6613 +Added line: 3328 +Added line: 6520 +Added line: 5589 +Added line: 240 +Added line: 6241 +Added line: 3675 +Added line: 384 +Added line: 6205 +Added line: 397 +Added line: 3540 +Added line: 6762 +Added line: 5358 +Added line: 1103 +Added line: 7397 +Added line: 5593 +Added line: 3684 +Added line: 5357 +Added line: 8638 +Added line: 8053 +Added line: 378 +Added line: 4132 Added line: 8676 +Added line: 6098 +Added line: 7525 +Added line: 9831 +Added line: 516 Added line: 5005 +Added line: 4492 +Added line: 661 Added line: 6421 +Added line: 9724 +Added line: 4438 +Added line: 3496 +Added line: 6133 +Added line: 1767 +Added line: 6190 +Added line: 2446 +Added line: 2509 +Added line: 3707 +Added line: 900 +Added line: 5493 +Added line: 808 +Added line: 1182 +Added line: 5812 +Added line: 2043 +Added line: 7183 +Added line: 5313 +Added line: 803 +Added line: 6042 +Added line: 7827 +Added line: 7141 +Added line: 2383 +Added line: 3808 +Added line: 8683 +Added line: 2708 +Added line: 2125 +Added line: 4332 +Added line: 4511 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_noSkip.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_noSkip.txt index 9105fa25e2..86eecfc370 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_noSkip.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_noSkip.txt @@ -1,88 +1,177 @@ [Image] or [Truncated image[ Bcol Ecol L1 +Added line: 3764 [int] 1 4 +Added line: 2391 +Added line: 917 [main] 5 9 [(] 9 10 +Added line: 7403 [)] 10 11 [{] 12 13 -L2 +Added line: 1423 [}] 1 2 +Added line: 963 +Added line: 5209 +Added line: 215 +Added line: 1513 +Added line: 8047 +Added line: 8144 L5 [int] 1 4 [foobar] 5 11 +Added line: 4162 [(] 11 12 [)] 12 13 +Added line: 9371 +Added line: 5352 [{] 14 15 L6 [}] 1 2 +Added line: 9513 L10 [static] 1 7 +Added line: 5127 +Added line: 7666 +Added line: 7954 +Added line: 1690 [void] 8 12 [my_memset] 13 22 [(] 22 23 +Added line: 3379 [void] 23 27 +Added line: 9741 +Added line: 560 [*] 28 29 +Added line: 9980 [dest] 29 33 - [,] 33 34 +Added line: 5710 [int] 34 37 [fill_value] 38 48 +Added line: 7985 [,] 48 49 +Added line: 9277 +Added line: 3709 [int] 49 52 [count] 53 58 [)] 58 59 +Added line: 3580 L11 +Added line: 5605 [{] 1 2 L12 [__asm] 5 10 +Added line: 937 [__volatile__] 11 23 +Added line: 6627 +Added line: 397 [(] 23 24 L13 +Added line: 4229 +Added line: 2992 +Added line: 5020 +Added line: 490 +Added line: 7797 ["cld\\n"] 10 17 L14 +Added line: 9248 ["mov %ecx, %ebx\\n"] 10 28 +Added line: 663 L15 - ["shr 2,%ecx\\n"] 10 24 +Added line: 573 +Added line: 8305 +Added line: 918 +Added line: 317 +Added line: 8474 L16 +Added line: 2263 +Added line: 2280 +Added line: 2123 +Added line: 9611 ["rep "] 10 16 L17 ["stosl\\n"] 10 19 L18 +Added line: 4039 +Added line: 2015 ["mov %ebx,%ecx\\n"] 10 27 +Added line: 237 +Added line: 2249 L19 +Added line: 1723 +Added line: 940 [" // line 157 mentioned above"] 10 41 L20 +Added line: 4100 [:] 10 11 L21 [:] 10 11 ["c"] 12 15 [(] 16 17 +Added line: 228 +Added line: 4227 +Added line: 3728 [count] 17 22 +Added line: 5953 +Added line: 5508 +Added line: 9418 [)] 22 23 +Added line: 2867 +Added line: 9629 [,] 23 24 +Added line: 2837 +Added line: 5964 +Added line: 4315 +Added line: 3712 ["a"] 25 28 [(] 29 30 [fill_value] 30 40 [)] 40 41 +Added line: 8387 [,] 41 42 +Added line: 7597 ["D"] 43 46 +Added line: 7197 +Added line: 7126 [(] 47 48 +Added line: 1482 +Added line: 7627 +Added line: 8824 [dest] 48 52 [)] 52 53 +Added line: 110 +Added line: 1338 +Added line: 7808 +Added line: 1323 L22 +Added line: 1465 [:] 10 11 ["cc"] 12 16 [,] 16 17 +Added line: 5998 ["%ebx"] 17 23 [)] 24 25 +Added line: 9526 +Added line: 2138 [;] 25 26 +Added line: 7964 L23 [}] 1 2 +Added line: 5722 +Added line: 8518 L27 [int] 1 4 +Added line: 1399 [otherMethod] 5 16 +Added line: 2277 +Added line: 4874 +Added line: 2388 [(] 16 17 [)] 17 18 +Added line: 4062 +Added line: 5729 +Added line: 1091 [{] 19 20 L28 [}] 1 2 -EOF +Added line: 6236 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_skipDebug.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_skipDebug.txt index dd2ef41d8d..32d5b98d89 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_skipDebug.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_skipDebug.txt @@ -1,82 +1,171 @@ +Added line: 7317 [Image] or [Truncated image[ Bcol Ecol +Added line: 305 +Added line: 7208 +Added line: 6020 L1 [int] 1 4 [main] 5 9 - [(] 9 10 +Added line: 1679 +Added line: 6831 +Added line: 8242 +Added line: 6919 +Added line: 1109 [{] 12 13 +Added line: 7654 +Added line: 2051 L2 +Added line: 2156 +Added line: 3702 +Added line: 4013 +Added line: 129 +Added line: 8136 Added line: 4821 - [}] 1 2 +Added line: 2242 +Added line: 7904 L10 [static] 1 7 - [void] 8 12 +Added line: 8888 +Added line: 9898 +Added line: 6525 +Added line: 615 [my_memset] 13 22 +Added line: 6960 +Added line: 2676 [(] 22 23 [void] 23 27 [*] 28 29 +Added line: 8541 +Added line: 8717 +Added line: 4512 [dest] 29 33 +Added line: 8454 +Added line: 4138 [,] 33 34 - [int] 34 37 +Added line: 7514 [fill_value] 38 48 [,] 48 49 +Added line: 3281 +Added line: 8199 +Added line: 9444 [int] 49 52 +Added line: 41 [count] 53 58 +Added line: 6658 [)] 58 59 +Added line: 7614 L11 +Added line: 3903 +Added line: 6552 [{] 1 2 +Added line: 8056 +Added line: 6305 L12 - [__asm] 5 10 +Added line: 811 +Added line: 9578 +Added line: 8483 [__volatile__] 11 23 [(] 23 24 +Added line: 9751 L13 +Added line: 6704 ["cld\\n"] 10 17 L14 +Added line: 9700 ["mov %ecx, %ebx\\n"] 10 28 L15 +Added line: 2610 +Added line: 6422 ["shr 2,%ecx\\n"] 10 24 L16 +Added line: 6481 ["rep "] 10 16 ["stosl\\n"] 10 19 L18 - ["mov %ebx,%ecx\\n"] 10 27 -L19 +Added line: 3308 [" // line 157 mentioned above"] 10 41 +Added line: 2804 +Added line: 2720 +Added line: 9959 L20 [:] 10 11 L21 +Added line: 9206 [:] 10 11 +Added line: 68 +Added line: 3462 +Added line: 3406 +Added line: 8127 Added line: 4875 +Added line: 4748 ["c"] 12 15 +Added line: 738 [(] 16 17 [count] 17 22 [)] 22 23 [,] 23 24 ["a"] 25 28 [(] 29 30 +Added line: 6395 +Added line: 7011 [fill_value] 30 40 +Added line: 4640 [)] 40 41 [,] 41 42 +Added line: 8254 +Added line: 1193 +Added line: 376 +Added line: 4286 +Added line: 7271 ["D"] 43 46 +Added line: 2755 +Added line: 5730 [(] 47 48 [dest] 48 52 - [)] 52 53 +Added line: 7487 L22 +Added line: 9386 +Added line: 264 +Added line: 8150 +Added line: 7891 [:] 10 11 +Added line: 1404 ["cc"] 12 16 +Added line: 2858 [,] 16 17 +Added line: 8367 ["%ebx"] 17 23 +Added line: 601 Added line: 1726 +Added line: 4545 [)] 24 25 +Added line: 5985 [;] 25 26 +Added line: 8900 L23 +Added line: 1189 +Added line: 4095 +Added line: 8896 +Added line: 9541 +Added line: 9140 +Added line: 3667 Added line: 9482 [}] 1 2 +Added line: 7193 L27 [int] 1 4 +Added line: 5944 +Added line: 123 +Added line: 6781 +Added line: 9733 [otherMethod] 5 16 +Added line: 4902 +Added line: 383 +Added line: 941 [(] 16 17 [)] 17 18 [{] 19 20 +Added line: 2537 L28 [}] 1 2 EOF diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_skipDefault.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_skipDefault.txt index a395eff698..9d5cf072ee 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_skipDefault.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/simpleSkipBlocks_skipDefault.txt @@ -1,30 +1,119 @@ [Image] or [Truncated image[ Bcol Ecol -L1 +Added line: 34 +Added line: 7267 +Added line: 6576 +Added line: 422 +Added line: 4211 [int] 1 4 +Added line: 1621 +Added line: 3789 [main] 5 9 [(] 9 10 +Added line: 6732 +Added line: 9853 +Added line: 2932 +Added line: 9940 +Added line: 6123 +Added line: 8505 [)] 10 11 +Added line: 4679 [{] 12 13 -L2 +Added line: 6776 +Added line: 3572 +Added line: 8025 +Added line: 3370 +Added line: 4101 +Added line: 2988 +Added line: 7978 +Added line: 7830 L5 +Added line: 9673 +Added line: 2455 +Added line: 2523 +Added line: 531 +Added line: 597 +Added line: 4200 +Added line: 869 +Added line: 9387 [int] 1 4 +Added line: 1618 +Added line: 7715 [foobar] 5 11 [(] 11 12 +Added line: 3409 +Added line: 2563 [)] 12 13 +Added line: 8518 +Added line: 9403 +Added line: 2480 +Added line: 9493 +Added line: 5915 +Added line: 1151 [{] 14 15 +Added line: 8008 +Added line: 9692 +Added line: 2824 +Added line: 273 +Added line: 6118 +Added line: 1602 +Added line: 8313 +Added line: 2897 Added line: 9429 +Added line: 7975 Added line: 15 +Added line: 9235 +Added line: 6553 L6 [}] 1 2 +Added line: 9562 L27 Added line: 2774 +Added line: 3159 +Added line: 137 +Added line: 7246 +Added line: 6293 [int] 1 4 +Added line: 2495 +Added line: 9096 +Added line: 9130 +Added line: 518 +Added line: 897 +Added line: 9548 +Added line: 4260 +Added line: 6176 +Added line: 8337 +Added line: 7497 +Added line: 5363 [otherMethod] 5 16 - [(] 16 17 +Added line: 2886 +Added line: 2446 +Added line: 4203 [)] 17 18 +Added line: 8668 +Added line: 3122 +Added line: 4163 +Added line: 7587 +Added line: 9728 Added line: 6155 +Added line: 6399 +Added line: 9446 +Added line: 5568 +Added line: 4914 +Added line: 4692 [{] 19 20 +Added line: 2943 +Added line: 5335 +Added line: 4666 +Added line: 1518 Added line: 2865 +Added line: 5300 L28 [}] 1 2 -EOF +Added line: 8094 +Added line: 9415 +Added line: 5547 +Added line: 1582 +Added line: 4446 +Added line: 4883 +Added line: 8653 +Added line: 9489 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/specialComments.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/specialComments.txt index e08c1df43b..75751750a6 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/specialComments.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/specialComments.txt @@ -1,6 +1,95 @@ +Added line: 1987 +Added line: 3012 Added line: 509 +Added line: 5089 +Added line: 3655 +Added line: 369 +Added line: 6049 +Added line: 5151 +Added line: 3115 +Added line: 1307 Added line: 2243 +Added line: 9132 +Added line: 2839 +Added line: 9922 +Added line: 6050 +Added line: 9726 +Added line: 3819 +Added line: 1973 +Added line: 7615 +Added line: 960 +Added line: 1172 +Added line: 3365 +Added line: 1395 +Added line: 1366 +Added line: 8198 +Added line: 2710 +Added line: 4832 +Added line: 7913 +Added line: 8417 +Added line: 2707 L11 +Added line: 2584 +Added line: 5173 Added line: 6008 +Added line: 934 +Added line: 4762 +Added line: 3708 +Added line: 8042 +Added line: 8598 +Added line: 2088 +Added line: 9785 +Added line: 1114 +Added line: 1248 +Added line: 272 +Added line: 3113 +Added line: 5116 +Added line: 8900 +Added line: 6553 +Added line: 1764 +Added line: 5866 +Added line: 8931 +Added line: 7467 +Added line: 5385 +Added line: 1315 +Added line: 2561 +Added line: 7348 +Added line: 2665 +Added line: 5347 +Added line: 7134 +Added line: 3981 +Added line: 7105 +Added line: 7477 +Added line: 10 +Added line: 7001 +Added line: 9836 +Added line: 9396 +Added line: 9498 +Added line: 5774 +Added line: 1431 +Added line: 9092 +Added line: 1752 +Added line: 8398 +Added line: 7098 +Added line: 8413 +Added line: 2179 +Added line: 2516 +Added line: 4537 +Added line: 1159 +Added line: 5330 Added line: 7866 +Added line: 1683 +Added line: 2461 +Added line: 6293 +Added line: 3529 +Added line: 8117 +Added line: 3599 +Added line: 4394 +Added line: 7394 Added line: 2743 +Added line: 7455 +Added line: 459 +Added line: 7463 +Added line: 5329 +Added line: 6814 +Added line: 1792 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/tabWidth.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/tabWidth.txt index 7c3cc1f2de..c2ba24e19e 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/tabWidth.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/tabWidth.txt @@ -1,8 +1,97 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 2750 +Added line: 2057 +Added line: 9066 +Added line: 7220 L1 +Added line: 5577 +Added line: 1482 +Added line: 8531 +Added line: 2383 +Added line: 6714 +Added line: 5540 +Added line: 8032 +Added line: 2387 +Added line: 4305 +Added line: 290 +Added line: 6808 [int] 2 5 +Added line: 7856 +Added line: 1623 +Added line: 4367 +Added line: 5789 [i] 6 7 +Added line: 9731 +Added line: 7426 +Added line: 9718 [=] 8 9 +Added line: 1385 +Added line: 8886 +Added line: 4938 +Added line: 5810 +Added line: 8948 +Added line: 8884 +Added line: 9282 +Added line: 9370 +Added line: 2389 +Added line: 9642 +Added line: 9607 +Added line: 3459 +Added line: 4218 [0] 10 11 +Added line: 7726 +Added line: 3111 +Added line: 1687 +Added line: 108 +Added line: 586 +Added line: 2377 +Added line: 6581 +Added line: 5847 +Added line: 9645 +Added line: 1854 +Added line: 3035 +Added line: 7423 +Added line: 8612 +Added line: 6145 +Added line: 4974 +Added line: 8137 +Added line: 1437 +Added line: 711 +Added line: 2268 +Added line: 9097 +Added line: 2929 +Added line: 2590 +Added line: 5642 +Added line: 4034 +Added line: 6683 +Added line: 945 +Added line: 6332 +Added line: 6364 +Added line: 3773 +Added line: 3636 +Added line: 2184 +Added line: 2963 +Added line: 2232 +Added line: 9421 +Added line: 6690 +Added line: 471 +Added line: 4893 +Added line: 6279 +Added line: 2130 +Added line: 7727 +Added line: 5000 +Added line: 3882 +Added line: 4005 +Added line: 4780 [;] 11 12 EOF +Added line: 35 +Added line: 2233 +Added line: 4470 +Added line: 6659 +Added line: 697 +Added line: 6470 +Added line: 1088 +Added line: 2154 +Added line: 713 +Added line: 7769 diff --git a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/unicodeStrings.txt b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/unicodeStrings.txt index 39f38aa76d..8b37a91a26 100644 --- a/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/unicodeStrings.txt +++ b/pmd-cpp/src/test/resources/net/sourceforge/pmd/lang/cpp/cpd/testdata/unicodeStrings.txt @@ -1,31 +1,120 @@ - [Image] or [Truncated image[ Bcol Ecol -L6 +Added line: 3926 +Added line: 555 +Added line: 4797 +Added line: 3351 +Added line: 7648 +Added line: 4461 +Added line: 819 +Added line: 6626 +Added line: 49 [int] 1 4 [main] 5 9 +Added line: 4613 +Added line: 8200 +Added line: 5232 [(] 9 10 +Added line: 5151 [)] 10 11 +Added line: 4824 +Added line: 3551 +Added line: 5544 +Added line: 7417 +Added line: 8251 +Added line: 8262 +Added line: 2005 +Added line: 9999 +Added line: 4819 +Added line: 3723 L7 [{] 1 2 +Added line: 7270 +Added line: 4988 +Added line: 6682 L8 +Added line: 65 +Added line: 9060 +Added line: 7400 +Added line: 4001 +Added line: 4879 +Added line: 7225 +Added line: 1244 [std] 5 8 +Added line: 5512 +Added line: 7002 +Added line: 825 +Added line: 8141 [::] 8 10 [string] 10 16 [text] 17 21 +Added line: 85 +Added line: 7100 +Added line: 7753 +Added line: 9872 [(] 21 22 ["ąęćśźńó"] 22 31 +Added line: 1012 +Added line: 3394 +Added line: 1879 +Added line: 140 +Added line: 1467 +Added line: 4906 [)] 31 32 - [;] 32 33 +Added line: 5015 +Added line: 1127 +Added line: 5824 +Added line: 6359 +Added line: 2910 +Added line: 5000 +Added line: 6904 +Added line: 7335 L9 [std] 5 8 [::] 8 10 [cout] 10 14 +Added line: 5504 +Added line: 3736 +Added line: 5422 +Added line: 3842 [<<] 15 17 +Added line: 9503 +Added line: 9930 +Added line: 1820 [text] 18 22 +Added line: 1618 +Added line: 4457 +Added line: 5062 +Added line: 4562 +Added line: 9002 +Added line: 4364 +Added line: 5569 +Added line: 6093 [;] 22 23 +Added line: 973 L10 +Added line: 1246 +Added line: 8688 +Added line: 8962 +Added line: 4466 +Added line: 5897 +Added line: 5024 [return] 5 11 - [0] 12 13 +Added line: 1820 +Added line: 4981 [;] 13 14 +Added line: 8216 +Added line: 9301 L11 +Added line: 3424 +Added line: 7044 +Added line: 6223 +Added line: 9201 +Added line: 6936 +Added line: 4626 +Added line: 274 +Added line: 7180 +Added line: 8394 +Added line: 6417 +Added line: 8061 [}] 1 2 EOF +Added line: 5611 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/attributes.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/attributes.txt index 52b1579803..33c787c3da 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/attributes.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/attributes.txt @@ -1,34 +1,51 @@ [Image] or [Truncated image[ Bcol Ecol L1 [\[] 1 2 +Added line: 3151 [Serializable] 2 14 +Added line: 2081 [\]] 14 15 +Added line: 4341 L2 +Added line: 230 [public] 1 7 [class] 8 13 [SampleClass] 14 25 +Added line: 2537 L3 +Added line: 5658 +Added line: 9633 [{] 1 2 L5 [}] 1 2 L7 +Added line: 6598 [\[] 1 2 +Added line: 5105 [System] 2 8 [.] 8 9 [Runtime] 9 16 +Added line: 6457 [.] 16 17 [InteropServices] 17 32 [.] 32 33 Added line: 1044 [DllImport] 33 42 +Added line: 9874 [(] 42 43 ["user32.dll"] 43 55 +Added line: 5101 [)] 55 56 [\]] 56 57 L8 [extern] 1 7 +Added line: 1293 [static] 8 14 +Added line: 5370 +Added line: 6992 [void] 15 19 +Added line: 4492 +Added line: 2214 Added line: 5559 [SampleMethod] 20 32 [(] 32 33 @@ -38,21 +55,24 @@ L10 [void] 1 5 [MethodA] 6 13 [(] 13 14 +Added line: 8175 [\[] 14 15 [In] 15 17 [\]] 17 18 [\[] 18 19 [Out] 19 22 - [\]] 22 23 [ref] 24 27 +Added line: 2722 [double] 28 34 [x] 35 36 [)] 36 37 +Added line: 3388 [{] 38 39 [}] 40 41 L11 [void] 1 5 [MethodB] 6 13 +Added line: 7556 [(] 13 14 [\[] 14 15 [Out] 15 18 @@ -60,46 +80,66 @@ L11 [\[] 19 20 [In] 20 22 [\]] 22 23 +Added line: 4545 +Added line: 5234 +Added line: 720 [ref] 24 27 +Added line: 3350 [double] 28 34 [x] 35 36 [)] 36 37 +Added line: 9611 [{] 38 39 +Added line: 6042 +Added line: 9398 +Added line: 2514 [}] 40 41 +Added line: 4706 L12 [void] 1 5 [MethodC] 6 13 +Added line: 4374 [(] 13 14 [\[] 14 15 [In] 15 17 [,] 17 18 +Added line: 7186 [Out] 19 22 - [\]] 22 23 [ref] 24 27 [double] 28 34 [x] 35 36 +Added line: 2728 [)] 36 37 +Added line: 2882 [{] 38 39 [}] 40 41 L14 [\[] 1 2 [Conditional] 2 13 -Added line: 4444 +Added line: 6260 [(] 13 14 +Added line: 7016 ["DEBUG"] 14 21 [)] 21 22 +Added line: 8602 [,] 22 23 [Conditional] 24 35 +Added line: 128 [(] 35 36 ["TEST1"] 36 43 +Added line: 8778 [)] 43 44 [\]] 44 45 L15 [void] 1 5 [(] 17 18 [)] 18 19 +Added line: 4167 +Added line: 4075 L16 +Added line: 2055 [{] 1 2 +Added line: 4462 L18 [}] 1 2 L20 @@ -108,6 +148,7 @@ L20 [(] 11 12 ["user32.dll"] 12 24 [)] 24 25 +Added line: 9268 [\]] 25 26 L21 [\[] 1 2 @@ -117,6 +158,7 @@ L21 [,] 24 25 [SetLastError] 26 38 [=] 38 39 +Added line: 4043 [false] 39 44 [,] 44 45 [ExactSpelling] 46 59 @@ -125,7 +167,10 @@ Added line: 9706 [false] 60 65 [)] 65 66 [\]] 66 67 -L22 +Added line: 7242 +Added line: 8613 +Added line: 7467 +Added line: 1089 [\[] 1 2 [DllImport] 2 11 [(] 11 12 @@ -134,24 +179,35 @@ L22 [ExactSpelling] 26 39 [=] 39 40 [false] 40 45 +Added line: 1164 +Added line: 2430 [,] 45 46 [SetLastError] 47 59 +Added line: 8549 [=] 59 60 +Added line: 8627 [false] 60 65 +Added line: 822 [)] 65 66 [\]] 66 67 L24 +Added line: 8226 [using] 1 6 [System] 7 13 [;] 13 14 L25 +Added line: 9179 +Added line: 7081 [using] 1 6 [System] 7 13 [.] 13 14 +Added line: 9774 [Reflection] 14 24 +Added line: 5914 [;] 24 25 L26 [\[] 1 2 +Added line: 3850 [assembly] 2 10 [:] 10 11 [AssemblyTitleAttribute] 12 34 @@ -159,9 +215,13 @@ L26 ["Production assembly 4"] 35 58 [)] 58 59 [\]] 59 60 +Added line: 33 L27 +Added line: 652 [\[] 1 2 +Added line: 3384 [module] 2 8 +Added line: 867 [:] 8 9 [CLSCompliant] 10 22 [(] 22 23 @@ -169,19 +229,30 @@ L27 [)] 27 28 [\]] 28 29 L30 +Added line: 552 [\[] 1 2 [ValidatedContract] 2 19 +Added line: 9084 [\]] 19 20 L31 +Added line: 6490 +Added line: 5547 [int] 1 4 [Method1] 5 12 +Added line: 2880 +Added line: 8134 [(] 12 13 +Added line: 427 [)] 13 14 +Added line: 2414 [{] 15 16 +Added line: 3980 +Added line: 9858 [return] 17 23 [0] 24 25 [;] 25 26 - [}] 27 28 +Added line: 8586 +Added line: 3901 L34 [\[] 1 2 [method] 2 8 @@ -190,34 +261,49 @@ L34 Added line: 169 [\]] 27 28 L35 - [int] 1 4 +Added line: 8090 [Method2] 5 12 [(] 12 13 +Added line: 1037 [)] 13 14 +Added line: 6438 +Added line: 3489 +Added line: 1593 +Added line: 829 [{] 15 16 +Added line: 4175 [return] 17 23 [;] 25 26 [}] 27 28 L38 - [int] 1 4 [Method3] 5 12 [(] 12 13 [\[] 13 14 [ValidatedContract] 14 31 [\]] 31 32 +Added line: 3207 [string] 33 39 [contract] 40 48 +Added line: 1860 [)] 48 49 [{] 50 51 [return] 52 58 [0] 59 60 [;] 60 61 - [}] 62 63 +Added line: 4334 +Added line: 4689 +Added line: 6069 +Added line: 4335 L41 +Added line: 5171 [\[] 1 2 [return] 2 8 +Added line: 4500 [:] 8 9 +Added line: 4802 +Added line: 4259 [ValidatedContract] 10 27 +Added line: 7677 [\]] 27 28 L42 [int] 1 4 @@ -225,7 +311,10 @@ L42 [(] 12 13 [{] 15 16 [return] 17 23 +Added line: 4581 [0] 24 25 [;] 25 26 [}] 27 28 +Added line: 7360 EOF +Added line: 6669 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/attributes_ignored.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/attributes_ignored.txt index c2de96f13f..5964f6be39 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/attributes_ignored.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/attributes_ignored.txt @@ -1,109 +1,198 @@ +Added line: 5145 [Image] or [Truncated image[ Bcol Ecol +Added line: 1319 +Added line: 3431 L2 +Added line: 4353 [public] 1 7 [class] 8 13 +Added line: 4226 [SampleClass] 14 25 L3 +Added line: 5099 [{] 1 2 L5 [}] 1 2 +Added line: 7917 +Added line: 8031 L8 [extern] 1 7 [static] 8 14 [void] 15 19 [SampleMethod] 20 32 - [(] 32 33 - [)] 33 34 +Added line: 248 +Added line: 891 +Added line: 8010 [;] 34 35 L10 +Added line: 476 +Added line: 9322 [void] 1 5 +Added line: 1328 +Added line: 4607 +Added line: 3771 +Added line: 996 [MethodA] 6 13 +Added line: 9247 +Added line: 6838 [(] 13 14 [ref] 24 27 [double] 28 34 +Added line: 7407 [x] 35 36 +Added line: 6826 [)] 36 37 [{] 38 39 +Added line: 8546 [}] 40 41 +Added line: 4610 L11 +Added line: 745 +Added line: 1562 [void] 1 5 [MethodB] 6 13 [(] 13 14 +Added line: 915 [ref] 24 27 +Added line: 6270 [double] 28 34 +Added line: 1760 [x] 35 36 +Added line: 7735 +Added line: 7023 [)] 36 37 [{] 38 39 [}] 40 41 L12 [void] 1 5 +Added line: 5142 [MethodC] 6 13 +Added line: 5671 [(] 13 14 [ref] 24 27 +Added line: 8242 [double] 28 34 +Added line: 8067 [x] 35 36 +Added line: 8904 [)] 36 37 +Added line: 7747 +Added line: 6233 [{] 38 39 [}] 40 41 L15 - [void] 1 5 +Added line: 3504 [TraceMethod] 6 17 +Added line: 11 [(] 17 18 +Added line: 5353 +Added line: 2290 [)] 18 19 L16 +Added line: 9272 +Added line: 3836 +Added line: 8145 +Added line: 3576 +Added line: 9930 [{] 1 2 +Added line: 3391 L18 [}] 1 2 L24 [using] 1 6 [System] 7 13 +Added line: 5050 +Added line: 1142 +Added line: 6111 [;] 13 14 L25 +Added line: 3972 [using] 1 6 [System] 7 13 +Added line: 1986 +Added line: 5103 [.] 13 14 +Added line: 1391 [Reflection] 14 24 [;] 24 25 +Added line: 7807 L31 +Added line: 6890 +Added line: 3198 +Added line: 6612 +Added line: 3493 [int] 1 4 +Added line: 7510 [Method1] 5 12 [(] 12 13 +Added line: 4703 [)] 13 14 [{] 15 16 [return] 17 23 +Added line: 3614 +Added line: 4735 [0] 24 25 [;] 25 26 [}] 27 28 L35 +Added line: 3732 +Added line: 1118 [int] 1 4 - [Method2] 5 12 +Added line: 8820 [(] 12 13 +Added line: 9190 [)] 13 14 [{] 15 16 +Added line: 2457 [return] 17 23 [0] 24 25 +Added line: 2273 [;] 25 26 [}] 27 28 L38 [int] 1 4 +Added line: 124 [Method3] 5 12 [(] 12 13 [string] 33 39 [contract] 40 48 - [)] 48 49 +Added line: 870 [{] 50 51 +Added line: 1568 [return] 52 58 [0] 59 60 +Added line: 4239 +Added line: 1072 +Added line: 8658 [;] 60 61 [}] 62 63 +Added line: 728 L42 +Added line: 1517 +Added line: 712 [int] 1 4 +Added line: 1096 +Added line: 5493 [Method4] 5 12 +Added line: 3420 [(] 12 13 +Added line: 4401 +Added line: 1123 [)] 13 14 +Added line: 777 +Added line: 7695 [{] 15 16 +Added line: 2699 +Added line: 4515 [return] 17 23 +Added line: 9470 +Added line: 4754 +Added line: 4229 +Added line: 1646 +Added line: 7099 +Added line: 9433 [0] 24 25 +Added line: 9302 [;] 25 26 [}] 27 28 -EOF +Added line: 4551 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.txt index 1ed338be0c..2765c7f552 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.txt @@ -1,8 +1,97 @@ +Added line: 6812 +Added line: 1923 +Added line: 1784 +Added line: 4932 +Added line: 8199 +Added line: 649 +Added line: 3087 +Added line: 3336 +Added line: 8161 +Added line: 3249 +Added line: 6167 +Added line: 5843 +Added line: 1092 +Added line: 2852 +Added line: 2150 +Added line: 4098 [Image] or [Truncated image[ Bcol Ecol +Added line: 274 +Added line: 340 +Added line: 7984 +Added line: 8167 +Added line: 2968 +Added line: 7111 +Added line: 3389 +Added line: 5478 +Added line: 6519 +Added line: 1929 +Added line: 8017 +Added line: 5046 +Added line: 2002 +Added line: 4955 +Added line: 6774 +Added line: 8996 +Added line: 1683 +Added line: 2231 L3 +Added line: 1894 +Added line: 7892 +Added line: 8785 +Added line: 8104 +Added line: 707 +Added line: 7308 +Added line: 273 +Added line: 6922 [class] 1 6 +Added line: 6499 +Added line: 1973 [Foo] 7 10 +Added line: 9379 +Added line: 6595 +Added line: 7893 +Added line: 7772 +Added line: 5496 +Added line: 2137 +Added line: 2278 +Added line: 5312 +Added line: 4380 +Added line: 7243 +Added line: 3053 +Added line: 5193 +Added line: 2073 +Added line: 2418 +Added line: 2850 +Added line: 5869 +Added line: 3319 +Added line: 5647 [{] 11 12 +Added line: 9123 +Added line: 135 +Added line: 8269 +Added line: 2771 +Added line: 3444 +Added line: 7714 +Added line: 6665 +Added line: 2162 +Added line: 2594 +Added line: 4830 +Added line: 722 L8 [}] 2 3 +Added line: 6981 +Added line: 4343 +Added line: 2334 +Added line: 8398 +Added line: 7929 +Added line: 2507 +Added line: 4568 +Added line: 5971 +Added line: 7636 EOF +Added line: 8069 +Added line: 1906 +Added line: 3129 +Added line: 8204 +Added line: 9244 +Added line: 2300 +Added line: 9005 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/csharp7And8Additions.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/csharp7And8Additions.txt index 35e9e777af..c1c782aa3f 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/csharp7And8Additions.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/csharp7And8Additions.txt @@ -1,68 +1,104 @@ [Image] or [Truncated image[ Bcol Ecol -L1 +Added line: 1470 [#] 1 2 +Added line: 3534 +Added line: 9796 Added line: 4004 L2 - [using] 1 6 [System] 7 13 [;] 13 14 -L3 [using] 1 6 [System] 7 13 [Collections] 14 25 +Added line: 7752 [.] 25 26 [Generic] 26 33 [;] 33 34 L5 [class] 1 6 +Added line: 5638 [CSharp7And8Additions] 7 27 Added line: 775 +Added line: 2298 L6 [{] 1 2 L7 [private] 5 12 [static] 13 19 +Added line: 9135 +Added line: 2997 [void] 20 24 Added line: 3817 [Literals] 25 33 [(] 33 34 [)] 34 35 L8 +Added line: 9463 [{] 5 6 L9 +Added line: 8696 +Added line: 6420 +Added line: 9171 [int] 9 12 +Added line: 8986 [x] 13 14 +Added line: 6671 [=] 15 16 +Added line: 1964 +Added line: 7531 [30_000_000] 17 27 [;] 27 28 L10 [int] 9 12 +Added line: 8653 [b] 13 14 +Added line: 6910 [=] 15 16 +Added line: 1148 +Added line: 8551 [0b00101000] 17 27 [;] 27 28 L11 +Added line: 2520 +Added line: 8455 [}] 5 6 +Added line: 2837 +Added line: 4194 L13 +Added line: 4944 +Added line: 3087 [private] 5 12 [static] 13 19 +Added line: 3684 [unsafe] 20 26 [void] 27 31 +Added line: 2057 [DisplaySize] 32 43 - [<] 43 44 +Added line: 7194 +Added line: 6603 [T] 44 45 +Added line: 8516 [>] 45 46 Added line: 8436 [(] 46 47 [)] 47 48 +Added line: 8992 +Added line: 2999 [where] 49 54 [T] 55 56 +Added line: 9456 [:] 57 58 +Added line: 3248 [unmanaged] 59 68 L14 +Added line: 4063 [{] 5 6 L15 +Added line: 2707 +Added line: 4903 +Added line: 5719 [Console] 9 16 +Added line: 703 [.] 16 17 [WriteLine] 17 26 [(] 26 27 @@ -70,35 +106,58 @@ L15 [typeof] 30 36 [(] 36 37 [T] 37 38 +Added line: 5596 +Added line: 392 [)] 38 39 [ is unmanaged and its size is ] 40 70 [sizeof] 71 77 - [(] 77 78 [T] 78 79 +Added line: 8369 [)] 79 80 [ bytes] 81 87 ["] 87 88 - [)] 88 89 +Added line: 7334 +Added line: 3028 +Added line: 1641 +Added line: 8700 +Added line: 8665 [;] 89 90 +Added line: 5504 L16 +Added line: 5963 [}] 5 6 L18 +Added line: 3483 +Added line: 3656 +Added line: 2101 +Added line: 8171 +Added line: 7429 +Added line: 3773 +Added line: 6967 [private] 5 12 [static] 13 19 [void] 20 24 +Added line: 3025 [Operators] 25 34 +Added line: 6672 [(] 34 35 [)] 35 36 L19 [{] 5 6 L20 +Added line: 8683 [List] 9 13 [<] 13 14 [int] 14 17 [>] 17 18 +Added line: 2303 [?] 18 19 +Added line: 6104 +Added line: 4195 [l] 20 21 +Added line: 7667 [=] 22 23 +Added line: 3381 Added line: 8696 [null] 24 28 [;] 28 29 @@ -107,51 +166,81 @@ Added line: 8696 [??=] 12 15 [new] 16 19 [List] 20 24 +Added line: 4321 [<] 24 25 +Added line: 9988 [int] 25 28 +Added line: 7883 +Added line: 6333 [>] 28 29 [(] 29 30 +Added line: 2176 [)] 30 31 +Added line: 3905 [)] 31 32 [.] 32 33 [Add] 33 36 [(] 36 37 [5] 37 38 +Added line: 7415 [)] 38 39 [;] 39 40 L23 [var] 9 12 +Added line: 3891 [array] 13 18 - [=] 19 20 [new] 21 24 +Added line: 576 [int] 25 28 - [\[] 28 29 +Added line: 9015 +Added line: 9666 [\]] 29 30 [{] 31 32 [1] 33 34 +Added line: 9426 [,] 34 35 +Added line: 1173 [2] 36 37 [,] 37 38 +Added line: 2534 [3] 39 40 [,] 40 41 +Added line: 6139 +Added line: 8875 [4] 42 43 [,] 43 44 [5] 45 46 +Added line: 8146 +Added line: 6705 [}] 47 48 +Added line: 3027 [;] 48 49 +Added line: 9741 L24 +Added line: 1411 +Added line: 1969 +Added line: 5896 +Added line: 114 [var] 9 12 [slice1] 13 19 [array] 22 27 [\[] 27 28 [2] 28 29 [..] 29 31 +Added line: 1786 [^] 31 32 [3] 32 33 +Added line: 5649 [\]] 33 34 [;] 34 35 +Added line: 1511 L25 +Added line: 957 +Added line: 8504 [}] 5 6 +Added line: 8698 +Added line: 8224 +Added line: 5845 L26 [}] 1 2 EOF diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/listOfNumbers.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/listOfNumbers.txt index ff9bb1447a..db5cbbdc43 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/listOfNumbers.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/listOfNumbers.txt @@ -1,59 +1,76 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 1230 L1 [using] 1 6 [System] 7 13 +Added line: 7410 [;] 13 14 L2 [using] 1 6 [System] 7 13 [Collections] 14 25 [;] 25 26 +Added line: 2302 L3 [using] 1 6 [System] 7 13 [.] 13 14 +Added line: 310 [Collections] 14 25 [.] 25 26 [Generic] 26 33 [;] 33 34 L4 [public] 1 7 +Added line: 5549 [class] 8 13 [LongLists] 14 23 [{] 24 25 L5 +Added line: 5060 Added line: 5409 [List] 5 9 +Added line: 4990 [<] 9 10 +Added line: 7711 [byte] 10 14 [>] 14 15 [l] 16 17 [=] 18 19 +Added line: 4569 [new] 20 23 [List] 24 28 [<] 28 29 [byte] 29 33 +Added line: 7992 [>] 33 34 [{] 35 36 +Added line: 1509 L6 [0] 7 8 +Added line: 2164 [,] 8 9 [0] 9 10 [,] 10 11 [0] 11 12 [,] 12 13 +Added line: 6701 [0] 13 14 Added line: 1532 [,] 14 15 +Added line: 3247 [0] 15 16 [,] 16 17 +Added line: 9008 [0] 17 18 [,] 18 19 [0] 19 20 [,] 20 21 Added line: 7017 [0] 21 22 +Added line: 5026 [,] 22 23 +Added line: 5670 [0] 23 24 [,] 24 25 [0] 25 26 @@ -68,15 +85,19 @@ Added line: 7017 [,] 34 35 [0] 35 36 [,] 36 37 +Added line: 4342 [0] 37 38 +Added line: 9917 [,] 38 39 [0] 39 40 [,] 40 41 +Added line: 884 [0] 41 42 [,] 42 43 [0] 43 44 [,] 44 45 [0] 45 46 +Added line: 8706 [,] 46 47 [0] 47 48 [,] 48 49 @@ -86,7 +107,6 @@ Added line: 7017 [,] 52 53 [0] 53 54 [,] 54 55 - [0] 55 56 [,] 56 57 [0] 57 58 [,] 58 59 @@ -95,6 +115,7 @@ Added line: 7017 [0] 61 62 [,] 62 63 [0] 63 64 +Added line: 7917 [,] 64 65 [0] 65 66 [,] 66 67 @@ -109,15 +130,17 @@ Added line: 7017 [0] 75 76 [,] 76 77 [0] 77 78 +Added line: 7034 [,] 78 79 - [0] 79 80 [,] 80 81 [0] 81 82 [,] 82 83 [0] 83 84 [,] 84 85 +Added line: 9561 [0] 85 86 [,] 86 87 +Added line: 5888 [0] 87 88 [,] 88 89 [0] 89 90 @@ -126,6 +149,7 @@ Added line: 7017 [,] 92 93 [0] 93 94 [,] 94 95 +Added line: 9044 [0] 95 96 [,] 96 97 [0] 97 98 @@ -140,21 +164,27 @@ Added line: 5164 [0] 105 106 [,] 106 107 [0] 107 108 +Added line: 9229 [,] 108 109 [0] 109 110 [,] 110 111 +Added line: 2303 [0] 111 112 [,] 112 113 [0] 113 114 +Added line: 169 +Added line: 4060 [,] 114 115 [0] 115 116 [,] 116 117 [0] 117 118 [,] 118 119 [0] 119 120 +Added line: 1336 [,] 120 121 [,] 122 123 [0] 123 124 +Added line: 1503 [,] 124 125 [0] 125 126 [,] 126 127 @@ -166,31 +196,38 @@ Added line: 5164 [,] 132 133 [0] 133 134 [,] 134 135 +Added line: 861 [0] 135 136 [,] 136 137 [0] 137 138 [,] 138 139 +Added line: 6352 Added line: 1471 [,] 140 141 [0] 141 142 [,] 142 143 [0] 143 144 [,] 144 145 +Added line: 7500 [0] 145 146 [,] 146 147 [0] 147 148 [,] 148 149 [0] 149 150 +Added line: 2591 [,] 150 151 [0] 151 152 [,] 152 153 [0] 153 154 +Added line: 2865 [,] 154 155 [0] 155 156 [,] 156 157 [0] 157 158 +Added line: 1377 [,] 158 159 [0] 159 160 +Added line: 6232 [,] 160 161 [0] 161 162 [,] 162 163 @@ -198,16 +235,19 @@ Added line: 1471 [,] 164 165 [0] 165 166 [,] 166 167 - [0] 167 168 [,] 168 169 +Added line: 848 [0] 169 170 [,] 170 171 [0] 171 172 [,] 172 173 +Added line: 137 [0] 173 174 +Added line: 3830 [,] 174 175 [0] 175 176 [,] 176 177 +Added line: 6980 [0] 177 178 [,] 178 179 [0] 179 180 @@ -216,21 +256,26 @@ Added line: 1471 [,] 182 183 [0] 183 184 [,] 184 185 +Added line: 6648 [0] 185 186 [,] 186 187 [0] 187 188 [,] 188 189 [0] 189 190 +Added line: 6302 [,] 190 191 [0] 191 192 [,] 192 193 [0] 193 194 [,] 194 195 +Added line: 6933 [0] 195 196 [,] 196 197 [0] 197 198 +Added line: 4674 [,] 198 199 [0] 199 200 +Added line: 5234 [,] 200 201 [0] 201 202 [,] 202 203 @@ -243,6 +288,9 @@ Added line: 1471 [0] 209 210 [,] 210 211 [0] 211 212 +Added line: 482 +Added line: 5266 +Added line: 8363 [,] 212 213 [0] 213 214 [,] 214 215 @@ -254,12 +302,17 @@ Added line: 1471 [,] 220 221 [0] 221 222 [,] 222 223 +Added line: 5772 +Added line: 8186 +Added line: 9958 +Added line: 6434 [0] 223 224 [,] 224 225 - [0] 225 226 +Added line: 2487 [,] 226 227 [0] 227 228 [,] 228 229 +Added line: 2404 [0] 229 230 [,] 230 231 [0] 231 232 @@ -268,6 +321,7 @@ Added line: 1471 [,] 234 235 [0] 235 236 [,] 236 237 +Added line: 2238 [0] 237 238 [,] 238 239 [0] 239 240 @@ -275,15 +329,17 @@ Added line: 1471 [0] 241 242 [,] 242 243 [0] 243 244 +Added line: 7926 [,] 244 245 Added line: 7722 [0] 245 246 +Added line: 5852 [,] 246 247 [0] 247 248 [,] 248 249 [0] 249 250 [,] 250 251 - [0] 251 252 +Added line: 8825 [,] 252 253 [0] 253 254 [,] 254 255 @@ -292,8 +348,9 @@ Added line: 7722 [0] 257 258 [,] 258 259 [0] 259 260 - [,] 260 261 +Added line: 1148 [0] 261 262 +Added line: 3675 [,] 262 263 [0] 263 264 [,] 264 265 @@ -301,24 +358,31 @@ Added line: 7722 [,] 266 267 [0] 267 268 [,] 268 269 +Added line: 4928 [0] 269 270 [,] 270 271 +Added line: 8091 [0] 271 272 +Added line: 3102 [,] 272 273 [0] 273 274 [,] 274 275 [0] 275 276 [,] 276 277 +Added line: 1902 [0] 277 278 [,] 278 279 [0] 279 280 +Added line: 7841 [,] 280 281 [0] 281 282 [,] 282 283 +Added line: 2484 [,] 284 285 [0] 285 286 [,] 286 287 [0] 287 288 +Added line: 17 Added line: 25 [,] 288 289 [0] 289 290 @@ -326,31 +390,40 @@ Added line: 25 [0] 291 292 [,] 292 293 [0] 293 294 +Added line: 7749 +Added line: 2466 [,] 294 295 [0] 295 296 [,] 296 297 [0] 297 298 [,] 298 299 [0] 299 300 +Added line: 835 [,] 300 301 [0] 301 302 [,] 302 303 [0] 303 304 +Added line: 7506 +Added line: 4160 +Added line: 5968 [,] 304 305 [0] 305 306 [,] 306 307 -L7 [}] 5 6 +Added line: 1029 [;] 6 7 L8 [byte] 5 9 [\[] 9 10 +Added line: 3452 [\]] 11 12 [a] 13 14 [=] 15 16 [{] 17 18 [1] 18 19 [,] 19 20 +Added line: 3433 +Added line: 8615 [2] 20 21 [,] 21 22 [3] 22 23 @@ -367,11 +440,17 @@ L9 [\]] 11 12 [b] 13 14 [=] 15 16 +Added line: 5668 [{] 17 18 [{] 18 19 +Added line: 4314 +Added line: 8969 Added line: 5406 +Added line: 4198 [1] 19 20 +Added line: 7650 [,] 20 21 +Added line: 2698 [2] 21 22 [}] 22 23 [,] 23 24 @@ -381,19 +460,24 @@ Added line: 5406 [4] 27 28 [}] 28 29 [,] 29 30 +Added line: 6582 [{] 30 31 [5] 31 32 [,] 32 33 [6] 33 34 +Added line: 107 [}] 34 35 [}] 35 36 +Added line: 9705 [;] 36 37 +Added line: 5764 L10 [int] 5 8 [\[] 8 9 [\]] 10 11 [c] 12 13 [=] 14 15 +Added line: 1311 [{] 16 17 L11 [157] 7 10 @@ -401,20 +485,23 @@ L11 L12 [0377] 7 11 [,] 11 12 +Added line: 1839 L13 [36_000_000] 7 17 [,] 17 18 L14 +Added line: 3446 [0x3fff] 7 13 [,] 13 14 L15 [0X3FFF] 7 13 [,] 13 14 +Added line: 1919 L16 [328u] 7 11 - [,] 11 12 L17 [0x7FFFFFL] 7 16 +Added line: 8892 [,] 16 17 L18 [0776745ul] 7 16 @@ -423,6 +510,7 @@ L19 [18.46] 7 12 [,] 12 13 L20 +Added line: 8935 [18.46e0] 7 14 [,] 14 15 L21 @@ -434,6 +522,7 @@ Added line: 9558 [,] 15 16 L23 [}] 5 6 +Added line: 462 [;] 6 7 Added line: 1723 L24 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/listOfNumbers_ignored.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/listOfNumbers_ignored.txt index ead90830d3..72b6ae769f 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/listOfNumbers_ignored.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/listOfNumbers_ignored.txt @@ -1,68 +1,157 @@ - [Image] or [Truncated image[ Bcol Ecol L1 [using] 1 6 +Added line: 4863 +Added line: 3100 [System] 7 13 [;] 13 14 +Added line: 3233 [using] 1 6 Added line: 2021 +Added line: 7174 [System] 7 13 +Added line: 1933 [.] 13 14 [Collections] 14 25 +Added line: 5156 [;] 25 26 +Added line: 3546 +Added line: 3426 L3 [using] 1 6 [System] 7 13 +Added line: 5958 +Added line: 9987 +Added line: 1360 +Added line: 8221 +Added line: 764 Added line: 1924 [.] 13 14 [Collections] 14 25 +Added line: 3537 +Added line: 218 +Added line: 4064 +Added line: 7155 +Added line: 9384 +Added line: 8955 +Added line: 8434 +Added line: 8654 +Added line: 5125 [.] 25 26 +Added line: 210 +Added line: 6181 +Added line: 3673 +Added line: 3775 +Added line: 9185 [Generic] 26 33 [;] 33 34 +Added line: 6892 +Added line: 3404 L4 [public] 1 7 [class] 8 13 [LongLists] 14 23 +Added line: 469 +Added line: 750 +Added line: 4494 +Added line: 4156 +Added line: 9668 +Added line: 6621 [{] 24 25 L5 [List] 5 9 +Added line: 3177 [<] 9 10 -Added line: 5913 +Added line: 6623 +Added line: 109 [byte] 10 14 +Added line: 2138 +Added line: 2676 [>] 14 15 +Added line: 5751 +Added line: 182 +Added line: 1716 [l] 16 17 [=] 18 19 +Added line: 574 [new] 20 23 +Added line: 7121 +Added line: 9637 +Added line: 2690 [List] 24 28 [<] 28 29 +Added line: 4142 +Added line: 4836 [byte] 29 33 +Added line: 7483 +Added line: 7669 +Added line: 9185 +Added line: 4170 +Added line: 694 +Added line: 5690 +Added line: 3988 [>] 33 34 [;] 6 7 L8 +Added line: 8382 [byte] 5 9 +Added line: 3571 +Added line: 2201 +Added line: 2356 +Added line: 2626 Added line: 1542 +Added line: 2049 [\[] 9 10 [,] 10 11 +Added line: 5247 +Added line: 6288 +Added line: 6045 +Added line: 9337 [\]] 11 12 +Added line: 4714 +Added line: 2807 +Added line: 3440 Added line: 2427 +Added line: 5854 +Added line: 277 +Added line: 8949 [a] 13 14 +Added line: 7905 +Added line: 6344 [=] 15 16 [;] 28 29 +Added line: 9332 L9 [byte] 5 9 [\[] 9 10 [,] 10 11 [\]] 11 12 +Added line: 2699 +Added line: 3116 [b] 13 14 [=] 15 16 +Added line: 9944 [;] 36 37 [int] 5 8 +Added line: 4296 +Added line: 751 +Added line: 1600 [\[] 8 9 - [,] 9 10 +Added line: 4621 [\]] 10 11 [c] 12 13 [=] 14 15 +Added line: 4060 +Added line: 5798 L23 - [;] 6 7 +Added line: 1489 +Added line: 2938 +Added line: 6515 +Added line: 5878 +Added line: 3770 +Added line: 7794 +Added line: 851 L24 +Added line: 2961 +Added line: 9935 [}] 1 2 EOF diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/operatorsAndStuff.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/operatorsAndStuff.txt index c4ba67dcc1..a62314a29d 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/operatorsAndStuff.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/operatorsAndStuff.txt @@ -1,73 +1,162 @@ [Image] or [Truncated image[ Bcol Ecol -Added line: 9295 +Added line: 2117 +Added line: 3161 +Added line: 1724 +Added line: 8453 +Added line: 8950 +Added line: 1338 +Added line: 17 +Added line: 8076 +Added line: 6818 L1 +Added line: 2369 Added line: 9384 [class] 1 6 +Added line: 6675 Added line: 6547 [Foo] 7 10 +Added line: 3600 [{] 11 12 L2 +Added line: 3793 +Added line: 5057 +Added line: 4084 +Added line: 8910 [void] 3 7 [bar] 8 11 +Added line: 203 [(] 11 12 +Added line: 4750 [)] 12 13 +Added line: 7403 [{] 14 15 L3 Added line: 7949 +Added line: 138 [int] 5 8 [a] 9 10 +Added line: 4202 +Added line: 7033 +Added line: 1573 +Added line: 1793 Added line: 3054 +Added line: 6496 +Added line: 6674 +Added line: 9841 +Added line: 3251 +Added line: 1884 +Added line: 541 +Added line: 5307 +Added line: 7975 [=] 11 12 [1] 13 14 +Added line: 9406 +Added line: 9722 +Added line: 158 Added line: 6438 [>] 15 16 +Added line: 3294 +Added line: 191 [>] 16 17 +Added line: 5130 [2] 18 19 [;] 19 20 L4 +Added line: 7630 +Added line: 3228 +Added line: 308 [a] 5 6 [+=] 7 9 - [1] 10 11 +Added line: 6579 +Added line: 3315 [a] 5 6 +Added line: 8714 +Added line: 1838 [++] 6 8 - [;] 8 9 Added line: 7348 +Added line: 2773 +Added line: 7823 L6 +Added line: 8022 [/=] 7 9 +Added line: 585 +Added line: 2725 [3e2] 10 13 +Added line: 5135 +Added line: 5228 +Added line: 138 [;] 13 14 L7 +Added line: 693 +Added line: 942 +Added line: 1827 [float] 5 10 [f] 11 12 +Added line: 3424 Added line: 4785 +Added line: 4333 +Added line: 5463 [=] 13 14 [-] 15 16 +Added line: 600 [;] 19 20 +Added line: 5810 +Added line: 1319 L8 +Added line: 6225 +Added line: 3038 [f] 5 6 +Added line: 1787 +Added line: 4727 [*=] 7 9 +Added line: 6715 +Added line: 9416 +Added line: 5099 [2] 10 11 [;] 11 12 L9 [bool] 5 9 +Added line: 216 [b] 10 11 +Added line: 9293 +Added line: 8580 +Added line: 1065 [=] 12 13 [!] 14 15 +Added line: 5672 +Added line: 524 +Added line: 1402 [(] 16 17 Added line: 8995 +Added line: 841 [f] 17 18 +Added line: 2875 +Added line: 3520 [==] 19 21 +Added line: 4665 [2.0] 22 25 [||] 26 28 +Added line: 9270 [f] 29 30 - [>=] 31 33 [1.0] 34 37 +Added line: 520 [&&] 38 40 [f] 41 42 +Added line: 6580 +Added line: 6453 +Added line: 2405 [<=] 43 45 [2.0] 46 49 +Added line: 7655 [)] 49 50 +Added line: 1389 [}] 3 4 +Added line: 3675 +Added line: 925 L11 - [}] 1 2 +Added line: 3650 EOF +Added line: 6030 +Added line: 2937 +Added line: 5252 +Added line: 603 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/simpleClass.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/simpleClass.txt index bbe7ed6f13..c166660a6f 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/simpleClass.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/simpleClass.txt @@ -1,11 +1,100 @@ +Added line: 1359 +Added line: 6773 +Added line: 5900 +Added line: 2245 +Added line: 5198 +Added line: 3124 +Added line: 5229 +Added line: 3404 +Added line: 8144 +Added line: 8648 +Added line: 2668 +Added line: 7901 +Added line: 4693 +Added line: 791 +Added line: 6481 +Added line: 7178 +Added line: 901 +Added line: 2022 [Image] or [Truncated image[ Bcol Ecol +Added line: 1791 +Added line: 4705 +Added line: 7986 +Added line: 9217 +Added line: 1395 +Added line: 1626 +Added line: 3021 +Added line: 6060 +Added line: 8798 +Added line: 6668 L1 +Added line: 3536 +Added line: 6319 +Added line: 8292 +Added line: 2923 +Added line: 2762 +Added line: 493 +Added line: 3632 +Added line: 41 +Added line: 8561 +Added line: 6538 +Added line: 6528 +Added line: 9309 +Added line: 434 +Added line: 8881 +Added line: 3148 +Added line: 8733 +Added line: 653 +Added line: 3955 +Added line: 1661 [class] 1 6 [Foo] 7 10 +Added line: 6516 +Added line: 9450 +Added line: 3455 +Added line: 8323 [{] 11 12 +Added line: 577 +Added line: 756 +Added line: 9298 +Added line: 6255 [class] 13 18 +Added line: 6886 +Added line: 9784 +Added line: 9854 +Added line: 1678 +Added line: 6749 +Added line: 8954 +Added line: 6212 +Added line: 326 +Added line: 9186 +Added line: 5949 +Added line: 1513 +Added line: 7615 +Added line: 9346 +Added line: 1352 +Added line: 8822 [Foo] 19 22 - [{] 23 24 +Added line: 8744 +Added line: 7548 +Added line: 6964 [}] 25 26 - [}] 27 28 +Added line: 6889 +Added line: 5988 +Added line: 2244 +Added line: 2875 +Added line: 581 +Added line: 7500 +Added line: 3035 +Added line: 5759 +Added line: 3673 +Added line: 6202 +Added line: 66 +Added line: 1720 +Added line: 1411 +Added line: 3621 +Added line: 6510 +Added line: 5508 +Added line: 1918 EOF +Added line: 8709 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/simpleClassMethodMultipleLines.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/simpleClassMethodMultipleLines.txt index bf577c1410..29d276dee4 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/simpleClassMethodMultipleLines.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/simpleClassMethodMultipleLines.txt @@ -1,33 +1,122 @@ +Added line: 183 +Added line: 6711 +Added line: 4670 +Added line: 3949 +Added line: 4175 +Added line: 7209 Added line: 3741 +Added line: 8437 [Image] or [Truncated image[ Bcol Ecol +Added line: 7303 L1 [class] 1 6 +Added line: 1830 [Foo] 7 10 [{] 11 12 +Added line: 7876 L2 +Added line: 152 +Added line: 5163 +Added line: 8659 +Added line: 5654 +Added line: 6048 [public] 3 9 +Added line: 1570 [String] 10 16 +Added line: 8605 [foo] 17 20 [(] 20 21 +Added line: 5995 +Added line: 9377 +Added line: 7206 [int] 21 24 +Added line: 5955 [a] 25 26 Added line: 2944 +Added line: 9878 Added line: 2414 +Added line: 6268 [)] 26 27 +Added line: 4987 L3 +Added line: 3398 +Added line: 1461 +Added line: 2314 +Added line: 9244 +Added line: 4895 Added line: 7312 +Added line: 6261 +Added line: 653 +Added line: 6638 +Added line: 4808 +Added line: 9920 +Added line: 9014 [i] 9 10 +Added line: 7323 +Added line: 1800 +Added line: 4043 +Added line: 3602 [=] 11 12 [a] 13 14 +Added line: 1574 +Added line: 5034 [;] 14 15 +Added line: 6754 +Added line: 7237 +Added line: 5890 +Added line: 7886 L4 +Added line: 8076 [return] 5 11 +Added line: 5608 +Added line: 5398 +Added line: 6513 +Added line: 675 +Added line: 6261 ["x"] 12 15 +Added line: 3706 +Added line: 7361 +Added line: 8539 +Added line: 6945 +Added line: 5926 +Added line: 8270 [+] 16 17 [a] 18 19 +Added line: 2393 +Added line: 5668 [;] 19 20 -L5 +Added line: 3221 +Added line: 5910 +Added line: 637 +Added line: 1403 +Added line: 4007 +Added line: 2558 +Added line: 7941 +Added line: 2049 +Added line: 5676 +Added line: 4151 [}] 3 4 +Added line: 4933 +Added line: 4042 +Added line: 7672 +Added line: 5315 +Added line: 5380 +Added line: 9401 +Added line: 8226 +Added line: 344 +Added line: 2242 +Added line: 1529 L6 +Added line: 3996 +Added line: 8687 [}] 1 2 -EOF +Added line: 1465 +Added line: 7709 +Added line: 2967 +Added line: 7052 +Added line: 4962 +Added line: 9085 +Added line: 689 +Added line: 5905 +Added line: 8808 +Added line: 2665 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/specialComments.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/specialComments.txt index 10cc9e4453..99620c5392 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/specialComments.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/specialComments.txt @@ -1,6 +1,95 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 6662 +Added line: 2933 +Added line: 632 +Added line: 8887 +Added line: 2990 +Added line: 8069 +Added line: 3602 +Added line: 6135 Added line: 3796 +Added line: 8533 +Added line: 9890 +Added line: 5413 +Added line: 771 +Added line: 407 +Added line: 9943 +Added line: 6031 +Added line: 3286 +Added line: 6773 +Added line: 5882 EOF +Added line: 9008 Added line: 4905 +Added line: 7513 +Added line: 2763 +Added line: 810 +Added line: 3691 +Added line: 8722 +Added line: 7622 +Added line: 7234 +Added line: 8713 Added line: 8257 +Added line: 4392 +Added line: 4298 +Added line: 2444 +Added line: 7332 +Added line: 8681 +Added line: 89 +Added line: 5138 +Added line: 4766 +Added line: 4184 +Added line: 5161 +Added line: 3609 +Added line: 5616 +Added line: 5597 +Added line: 6021 +Added line: 629 +Added line: 417 Added line: 7737 +Added line: 7778 +Added line: 2177 +Added line: 6975 +Added line: 6413 +Added line: 2226 +Added line: 1380 +Added line: 9993 +Added line: 9021 +Added line: 788 +Added line: 259 +Added line: 5445 +Added line: 6035 +Added line: 5661 +Added line: 3158 +Added line: 1998 +Added line: 6634 +Added line: 3613 +Added line: 9253 +Added line: 4586 +Added line: 4141 +Added line: 8039 +Added line: 6050 +Added line: 5272 +Added line: 3277 +Added line: 2666 +Added line: 4838 +Added line: 1964 +Added line: 9863 +Added line: 3182 +Added line: 3765 +Added line: 9697 +Added line: 7245 +Added line: 3931 +Added line: 2139 +Added line: 3149 +Added line: 7191 +Added line: 4283 +Added line: 1385 +Added line: 7752 +Added line: 2281 +Added line: 1904 +Added line: 6057 +Added line: 8717 +Added line: 3894 +Added line: 5616 +Added line: 3230 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/strings.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/strings.txt index 4b716727b5..5faf391a14 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/strings.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/strings.txt @@ -1,42 +1,131 @@ +Added line: 2425 +Added line: 3257 +Added line: 7321 +Added line: 1569 Added line: 9587 +Added line: 795 +Added line: 2131 [Image] or [Truncated image[ Bcol Ecol Added line: 5945 L1 +Added line: 3168 [class] 1 6 [Foo] 7 10 [{] 11 12 +Added line: 6547 +Added line: 1456 +Added line: 606 +Added line: 285 L2 [void] 3 7 - [bar] 8 11 +Added line: 8832 +Added line: 5750 +Added line: 6065 +Added line: 298 +Added line: 6265 [(] 11 12 +Added line: 5506 +Added line: 7093 +Added line: 5056 +Added line: 6188 [)] 12 13 +Added line: 6244 +Added line: 9091 +Added line: 4810 [{] 14 15 +Added line: 7162 +Added line: 2313 +Added line: 9671 L4 [var] 5 8 [test] 9 13 +Added line: 7026 +Added line: 5632 [=] 14 15 +Added line: 8467 +Added line: 2682 +Added line: 5328 +Added line: 1162 +Added line: 6200 [$@"] 16 19 [test] 19 23 ["] 23 24 +Added line: 311 +Added line: 4826 +Added line: 9621 Added line: 3049 +Added line: 7855 L5 +Added line: 2364 +Added line: 4441 +Added line: 5694 +Added line: 9066 +Added line: 3895 +Added line: 4391 +Added line: 7769 +Added line: 2690 [var] 5 8 +Added line: 8909 +Added line: 9735 +Added line: 3682 [test2] 9 14 +Added line: 1669 +Added line: 3791 +Added line: 6701 +Added line: 6685 +Added line: 8458 +Added line: 7305 [=] 15 16 +Added line: 6501 +Added line: 7196 +Added line: 222 +Added line: 5302 [@$"] 17 20 [test] 20 24 ["] 24 25 +Added line: 6116 +Added line: 8305 [;] 25 26 +Added line: 2986 +Added line: 5077 +Added line: 340 +Added line: 8237 +Added line: 3418 +Added line: 2789 +Added line: 626 +Added line: 7106 +Added line: 972 L7 +Added line: 929 [String] 5 11 +Added line: 439 [query] 12 17 +Added line: 2073 [=] 18 19 Added line: 9129 -L8 +Added line: 319 +Added line: 2364 +Added line: 5907 [@"SELECT foo, bar\n FROM t[ 7 24 [;] 24 25 +Added line: 1850 +Added line: 3021 +Added line: 6569 +Added line: 5940 L11 [}] 3 4 +Added line: 608 +Added line: 6030 +Added line: 7649 L12 +Added line: 4973 +Added line: 9903 +Added line: 847 [}] 1 2 +Added line: 4199 +Added line: 6837 EOF +Added line: 1431 +Added line: 839 +Added line: 6413 +Added line: 5175 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/tabWidth.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/tabWidth.txt index f17391438a..fa35c4a9fc 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/tabWidth.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/tabWidth.txt @@ -1,12 +1,101 @@ +Added line: 7950 +Added line: 480 +Added line: 446 +Added line: 6323 +Added line: 7327 +Added line: 421 +Added line: 4274 +Added line: 8773 +Added line: 3889 +Added line: 4031 [Image] or [Truncated image[ Bcol Ecol +Added line: 6294 +Added line: 1927 +Added line: 6770 +Added line: 9237 +Added line: 8117 +Added line: 9952 +Added line: 2172 +Added line: 1717 +Added line: 1248 +Added line: 2447 +Added line: 3460 +Added line: 2505 +Added line: 1736 +Added line: 8154 +Added line: 2316 +Added line: 29 +Added line: 3909 Added line: 9417 +Added line: 4714 +Added line: 9029 +Added line: 479 +Added line: 7280 +Added line: 2721 +Added line: 6698 +Added line: 4541 +Added line: 1741 +Added line: 2120 +Added line: 5713 +Added line: 9735 +Added line: 3779 L1 [int] 2 5 Added line: 1529 +Added line: 3536 +Added line: 6964 Added line: 7206 -Added line: 194 +Added line: 6215 +Added line: 4355 +Added line: 1590 +Added line: 2979 +Added line: 3422 +Added line: 2258 +Added line: 1438 +Added line: 1828 +Added line: 4436 +Added line: 1975 +Added line: 709 +Added line: 9945 +Added line: 7346 +Added line: 7774 [=] 8 9 +Added line: 8957 +Added line: 5199 +Added line: 9393 +Added line: 581 +Added line: 7401 Added line: 2895 +Added line: 6147 +Added line: 586 +Added line: 6932 +Added line: 3302 +Added line: 5691 +Added line: 3595 +Added line: 4466 +Added line: 8541 +Added line: 2918 +Added line: 4597 +Added line: 4163 Added line: 6536 +Added line: 6016 Added line: 8289 +Added line: 2037 +Added line: 2130 +Added line: 9078 +Added line: 9156 +Added line: 9813 +Added line: 3954 +Added line: 4954 +Added line: 1808 +Added line: 9424 +Added line: 9665 +Added line: 554 [;] 11 12 +Added line: 2336 +Added line: 712 +Added line: 2333 +Added line: 3258 +Added line: 1303 +Added line: 5921 +Added line: 8401 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/usingDirectives.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/usingDirectives.txt index dfdc3ca434..660aa2b689 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/usingDirectives.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/usingDirectives.txt @@ -1,77 +1,166 @@ +Added line: 1672 +Added line: 5109 +Added line: 6780 [Image] or [Truncated image[ Bcol Ecol L1 [using] 1 6 Added line: 286 +Added line: 1169 +Added line: 7614 [System] 7 13 Added line: 7528 +Added line: 8868 +Added line: 1510 Added line: 1789 +Added line: 5374 +Added line: 8834 +Added line: 9004 +Added line: 9129 [.] 13 14 +Added line: 4719 +Added line: 9602 [Text] 14 18 +Added line: 861 +Added line: 2804 +Added line: 9402 [;] 18 19 +Added line: 2345 L2 [using] 1 6 +Added line: 4235 +Added line: 5116 Added line: 1080 - [System] 7 13 +Added line: 3384 [;] 13 14 L5 +Added line: 8828 +Added line: 6819 [public] 1 7 +Added line: 3624 +Added line: 8546 [class] 8 13 [MyClass] 14 21 [{] 22 23 L7 +Added line: 1458 [foo] 10 13 +Added line: 605 [)] 14 15 +Added line: 8966 +Added line: 2613 +Added line: 4033 [{] 16 17 L8 [using] 9 14 +Added line: 382 +Added line: 4266 [(] 15 16 [Font] 16 20 [font1] 21 26 [=] 27 28 +Added line: 8204 [new] 29 32 +Added line: 4033 +Added line: 321 +Added line: 9948 Added line: 4890 +Added line: 9259 +Added line: 1676 +Added line: 3421 [Font] 33 37 +Added line: 6241 +Added line: 4548 [(] 37 38 ["Arial"] 38 45 - [,] 45 46 Added line: 7233 +Added line: 3223 [10.0f] 47 52 +Added line: 5565 +Added line: 4441 [)] 52 53 Added line: 7311 - [)] 53 54 - [{] 55 56 +Added line: 2529 +Added line: 4749 L9 [byte] 11 15 [charset] 16 23 [=] 24 25 +Added line: 4873 [font1] 26 31 [.] 31 32 [GdiCharSet] 32 42 [;] 42 43 +Added line: 8658 [}] 9 10 +Added line: 9608 +Added line: 9165 +Added line: 9174 +Added line: 9369 +Added line: 778 +Added line: 1385 L12 [using] 9 14 +Added line: 9412 +Added line: 4293 +Added line: 6781 +Added line: 3905 +Added line: 8121 [var] 15 18 +Added line: 9920 [font1] 19 24 [=] 25 26 +Added line: 6262 +Added line: 5275 +Added line: 4837 [new] 27 30 +Added line: 7714 +Added line: 5627 +Added line: 7720 [Font] 31 35 +Added line: 7396 +Added line: 6238 [(] 35 36 +Added line: 1786 ["Arial"] 36 43 +Added line: 3453 +Added line: 4655 +Added line: 9612 +Added line: 3881 [,] 43 44 [10.0f] 45 50 [)] 50 51 +Added line: 686 +Added line: 5916 +Added line: 5373 [;] 51 52 +Added line: 4954 L13 +Added line: 7047 [byte] 9 13 +Added line: 5517 Added line: 4945 [charset] 14 21 +Added line: 2165 +Added line: 1644 [=] 22 23 +Added line: 884 +Added line: 5735 +Added line: 1622 [font1] 24 29 +Added line: 3250 [.] 29 30 +Added line: 7158 [GdiCharSet] 30 40 L14 +Added line: 1979 +Added line: 7519 +Added line: 9559 [}] 5 6 +Added line: 3299 L16 +Added line: 2543 [}] 1 2 +Added line: 9531 EOF +Added line: 2061 +Added line: 8638 diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/usingDirectives_ignored.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/usingDirectives_ignored.txt index e0d87e2fa2..263b7d2cd6 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/usingDirectives_ignored.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/usingDirectives_ignored.txt @@ -1,67 +1,156 @@ +Added line: 9949 +Added line: 3295 [Image] or [Truncated image[ Bcol Ecol -L5 +Added line: 2222 +Added line: 7011 +Added line: 8884 +Added line: 5817 [public] 1 7 +Added line: 6317 +Added line: 6702 +Added line: 6426 [class] 8 13 [MyClass] 14 21 Added line: 6387 +Added line: 9931 [{] 22 23 L7 [void] 5 9 [(] 13 14 +Added line: 9857 [)] 14 15 +Added line: 5469 +Added line: 5355 +Added line: 6206 +Added line: 4423 L8 +Added line: 7910 +Added line: 9035 +Added line: 2487 +Added line: 8923 +Added line: 7893 +Added line: 4784 [using] 9 14 +Added line: 1414 [(] 15 16 +Added line: 5014 +Added line: 2448 +Added line: 6797 +Added line: 6662 +Added line: 4293 [Font] 16 20 +Added line: 5517 [font1] 21 26 +Added line: 4550 +Added line: 3757 [=] 27 28 Added line: 3540 +Added line: 9267 [new] 29 32 +Added line: 8776 [Font] 33 37 +Added line: 5785 [(] 37 38 +Added line: 6183 +Added line: 3653 +Added line: 7208 ["Arial"] 38 45 +Added line: 380 [,] 45 46 +Added line: 2613 [10.0f] 47 52 [)] 52 53 [)] 53 54 +Added line: 1603 [{] 55 56 +Added line: 3831 +Added line: 507 +Added line: 1621 +Added line: 3394 +Added line: 2730 L9 Added line: 8093 +Added line: 6709 +Added line: 4728 +Added line: 5411 +Added line: 6687 +Added line: 738 +Added line: 8112 +Added line: 9926 [byte] 11 15 +Added line: 9815 [=] 24 25 [font1] 26 31 +Added line: 7233 +Added line: 2536 [.] 31 32 +Added line: 1400 +Added line: 5427 [GdiCharSet] 32 42 +Added line: 7565 +Added line: 6950 +Added line: 3753 [;] 42 43 [}] 9 10 [using] 9 14 +Added line: 8596 Added line: 2723 +Added line: 9175 [var] 15 18 [font1] 19 24 - [=] 25 26 -Added line: 4893 +Added line: 6656 +Added line: 9890 +Added line: 9616 Added line: 8717 +Added line: 3202 +Added line: 3070 +Added line: 2727 Added line: 1658 [new] 27 30 +Added line: 7983 [Font] 31 35 +Added line: 4344 [(] 35 36 ["Arial"] 36 43 +Added line: 1264 [,] 43 44 +Added line: 2104 +Added line: 9492 +Added line: 5951 Added line: 2145 [10.0f] 45 50 +Added line: 7871 Added line: 4167 +Added line: 6696 +Added line: 1924 +Added line: 1370 +Added line: 1518 [)] 50 51 +Added line: 8536 [;] 51 52 +Added line: 823 +Added line: 7570 L13 [byte] 9 13 [charset] 14 21 [=] 22 23 +Added line: 2730 +Added line: 9873 [font1] 24 29 [.] 29 30 [GdiCharSet] 30 40 [;] 40 41 +Added line: 8740 +Added line: 2828 +Added line: 4289 L14 [}] 5 6 +Added line: 5599 L16 +Added line: 9679 [}] 1 2 +Added line: 3712 +Added line: 705 +Added line: 2164 +Added line: 8074 EOF diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/comment.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/comment.txt index 313acd2ac6..def49cb282 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/comment.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/comment.txt @@ -1,11 +1,100 @@ +Added line: 5856 +Added line: 4366 +Added line: 3963 +Added line: 5728 [Image] or [Truncated image[ Bcol Ecol +Added line: 3532 +Added line: 5194 +Added line: 9094 +Added line: 4943 +Added line: 5163 +Added line: 212 +Added line: 109 +Added line: 9756 +Added line: 6543 L3 -Added line: 1413 +Added line: 3505 +Added line: 7043 +Added line: 8937 +Added line: 3654 +Added line: 172 +Added line: 6191 +Added line: 7565 +Added line: 6351 +Added line: 4766 +Added line: 7311 +Added line: 4679 Added line: 993 +Added line: 6757 +Added line: 1376 +Added line: 4257 +Added line: 7691 +Added line: 3556 +Added line: 7505 +Added line: 2187 +Added line: 6882 +Added line: 1718 +Added line: 5420 +Added line: 4501 +Added line: 5911 +Added line: 646 +Added line: 6126 +Added line: 8441 +Added line: 7590 +Added line: 6475 +Added line: 1380 +Added line: 3666 +Added line: 5227 +Added line: 1130 +Added line: 3084 +Added line: 9106 +Added line: 111 +Added line: 3792 +Added line: 8644 Added line: 4840 Added line: 5272 +Added line: 893 +Added line: 213 +Added line: 4996 +Added line: 9701 +Added line: 7292 +Added line: 3397 Added line: 6546 -Added line: 364 +Added line: 5751 +Added line: 1054 +Added line: 5606 +Added line: 4374 +Added line: 8456 +Added line: 171 +Added line: 4655 +Added line: 7470 [var] 1 4 +Added line: 8747 +Added line: 5155 +Added line: 6638 +Added line: 4441 +Added line: 9497 +Added line: 2499 +Added line: 8834 +Added line: 503 +Added line: 5999 +Added line: 5923 +Added line: 6488 +Added line: 3708 +Added line: 1623 +Added line: 3566 +Added line: 6514 +Added line: 2191 +Added line: 8826 [0] 9 10 +Added line: 3521 +Added line: 2266 +Added line: 1447 +Added line: 6755 +Added line: 6592 EOF +Added line: 2324 +Added line: 9569 +Added line: 874 +Added line: 6200 +Added line: 8474 diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escape_sequences.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escape_sequences.txt index 35f6b4abc7..b1b5ebc247 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escape_sequences.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escape_sequences.txt @@ -1,17 +1,106 @@ +Added line: 8927 +Added line: 4640 [Image] or [Truncated image[ Bcol Ecol +Added line: 7439 L1 +Added line: 5050 +Added line: 1837 +Added line: 3057 +Added line: 4719 +Added line: 5525 +Added line: 6664 [var] 1 4 - [newline] 5 12 - [=] 13 14 - ['\\n'] 15 19 +Added line: 8669 +Added line: 7286 +Added line: 7430 +Added line: 4594 +Added line: 2554 +Added line: 3410 +Added line: 4297 L2 +Added line: 370 +Added line: 8184 +Added line: 3373 +Added line: 9568 +Added line: 3384 +Added line: 4795 [var] 1 4 +Added line: 57 +Added line: 4454 +Added line: 4048 +Added line: 7124 [dollar] 5 11 +Added line: 7462 +Added line: 7078 +Added line: 3539 +Added line: 6564 +Added line: 1275 +Added line: 831 +Added line: 5322 +Added line: 6562 +Added line: 7787 +Added line: 6078 +Added line: 3682 +Added line: 6086 +Added line: 5462 +Added line: 3865 +Added line: 3170 +Added line: 227 +Added line: 8884 +Added line: 6655 +Added line: 7771 [=] 12 13 ['$newLine'] 14 24 +Added line: 7083 +Added line: 6230 +Added line: 955 +Added line: 8361 +Added line: 3762 +Added line: 9560 +Added line: 1616 +Added line: 9666 +Added line: 2945 L3 +Added line: 8550 +Added line: 2265 +Added line: 6023 +Added line: 7661 +Added line: 9259 +Added line: 1787 +Added line: 6905 [var] 1 4 +Added line: 3334 +Added line: 4001 [escaped_dollar] 5 19 +Added line: 5791 +Added line: 4718 [=] 20 21 +Added line: 3944 +Added line: 7947 +Added line: 3231 +Added line: 4091 +Added line: 656 +Added line: 8668 +Added line: 1981 +Added line: 9982 +Added line: 9432 ["\\$"] 22 26 +Added line: 4733 +Added line: 1212 +Added line: 6282 +Added line: 6035 +Added line: 1752 +Added line: 3264 +Added line: 9784 +Added line: 3118 +Added line: 3783 +Added line: 4569 +Added line: 1299 +Added line: 6972 +Added line: 9250 EOF +Added line: 6965 +Added line: 7885 +Added line: 8815 +Added line: 5312 +Added line: 2255 diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_backslash.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_backslash.txt index b5b13f53c3..1046f1d875 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_backslash.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_backslash.txt @@ -1,17 +1,106 @@ - [Image] or [Truncated image[ Bcol Ecol +Added line: 3386 +Added line: 4064 +Added line: 1221 +Added line: 8482 +Added line: 1135 +Added line: 3386 +Added line: 4917 +Added line: 2139 L1 +Added line: 5952 +Added line: 5365 +Added line: 4228 +Added line: 1716 +Added line: 198 +Added line: 608 +Added line: 8490 +Added line: 9681 [var] 1 4 [separator] 5 14 [=] 15 16 ['\\\\'] 17 21 L2 +Added line: 1851 +Added line: 6531 +Added line: 4278 +Added line: 4436 +Added line: 3911 +Added line: 8108 +Added line: 7858 +Added line: 9782 +Added line: 3196 +Added line: 5218 [var] 1 4 +Added line: 261 +Added line: 1334 [separators] 5 15 +Added line: 7005 +Added line: 4330 +Added line: 2000 +Added line: 2817 +Added line: 4396 +Added line: 5814 +Added line: 9679 +Added line: 5701 +Added line: 8138 +Added line: 1404 +Added line: 1501 +Added line: 2425 +Added line: 4670 [=] 16 17 +Added line: 2749 [const] 18 23 +Added line: 6949 +Added line: 7254 +Added line: 6487 +Added line: 5662 +Added line: 9144 +Added line: 7957 +Added line: 5566 +Added line: 6673 +Added line: 4080 +Added line: 4524 [\[] 24 25 +Added line: 6088 +Added line: 6418 +Added line: 1501 +Added line: 4324 +Added line: 9034 +Added line: 1222 +Added line: 4259 +Added line: 2007 +Added line: 6330 +Added line: 8742 +Added line: 4804 ['/'] 25 28 +Added line: 7851 +Added line: 624 +Added line: 4900 +Added line: 2105 +Added line: 2144 +Added line: 4279 +Added line: 9470 +Added line: 6791 [,] 28 29 +Added line: 5874 +Added line: 8842 +Added line: 2746 +Added line: 8819 +Added line: 3715 +Added line: 1067 ['\\\\'] 30 34 +Added line: 8771 +Added line: 9223 +Added line: 848 +Added line: 2586 +Added line: 1966 +Added line: 3629 [\]] 34 35 EOF +Added line: 3792 +Added line: 6936 +Added line: 1878 +Added line: 2767 +Added line: 4420 +Added line: 8157 +Added line: 6147 diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_dollar.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_dollar.txt index 8c2134eacc..10d4b797d1 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_dollar.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_dollar.txt @@ -1,7 +1,96 @@ +Added line: 1868 +Added line: 2448 +Added line: 5659 +Added line: 1121 +Added line: 9113 +Added line: 1535 +Added line: 1249 +Added line: 1267 +Added line: 7244 +Added line: 1926 +Added line: 9138 +Added line: 1488 +Added line: 4526 +Added line: 7011 [Image] or [Truncated image[ Bcol Ecol +Added line: 1045 +Added line: 6459 +Added line: 1318 +Added line: 9979 +Added line: 5654 +Added line: 4456 +Added line: 6292 +Added line: 3846 +Added line: 7162 +Added line: 6538 +Added line: 9721 L1 +Added line: 3774 +Added line: 8634 +Added line: 2015 +Added line: 9322 +Added line: 8163 +Added line: 1103 +Added line: 6496 +Added line: 3150 +Added line: 7573 +Added line: 2497 +Added line: 9740 +Added line: 9124 +Added line: 8701 +Added line: 1064 +Added line: 4091 +Added line: 7751 +Added line: 4443 +Added line: 2496 +Added line: 9800 +Added line: 3297 +Added line: 8982 +Added line: 5152 +Added line: 7295 +Added line: 6533 +Added line: 4287 +Added line: 3296 +Added line: 9939 +Added line: 157 [var] 1 4 +Added line: 2024 +Added line: 90 +Added line: 3756 +Added line: 181 +Added line: 4802 +Added line: 8654 +Added line: 3615 [multiLineStringWithDollar] 5 30 +Added line: 1435 +Added line: 6397 +Added line: 407 +Added line: 7080 [=] 31 32 +Added line: 4463 ["""\n \\$\n """] 33 10 +Added line: 9818 +Added line: 5458 +Added line: 9469 +Added line: 6135 +Added line: 10 +Added line: 7100 EOF +Added line: 3888 +Added line: 8133 +Added line: 3864 +Added line: 9768 +Added line: 5315 +Added line: 6921 +Added line: 1273 +Added line: 9597 +Added line: 1420 +Added line: 7687 +Added line: 3533 +Added line: 7910 +Added line: 3373 +Added line: 3680 +Added line: 2614 +Added line: 4302 +Added line: 7756 +Added line: 6660 diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_string.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_string.txt index a81c0fe250..534bd67e7a 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_string.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/escaped_string.txt @@ -1,24 +1,113 @@ +Added line: 8107 +Added line: 7805 [Image] or [Truncated image[ Bcol Ecol +Added line: 896 +Added line: 4187 +Added line: 6047 +Added line: 1765 +Added line: 2676 Added line: 8773 L1 +Added line: 439 +Added line: 1349 +Added line: 8240 +Added line: 2469 +Added line: 1952 Added line: 9603 +Added line: 7358 [var] 1 4 [a] 5 6 +Added line: 1195 +Added line: 9021 +Added line: 555 +Added line: 825 +Added line: 4888 +Added line: 9047 +Added line: 7561 +Added line: 275 +Added line: 5298 +Added line: 769 +Added line: 9934 +Added line: 7481 +Added line: 9249 +Added line: 9737 +Added line: 6551 +Added line: 5330 +Added line: 3269 +Added line: 3340 +Added line: 6284 +Added line: 4919 +Added line: 2961 +Added line: 2001 +Added line: 8791 +Added line: 5307 +Added line: 7212 +Added line: 471 +Added line: 4992 [=] 7 8 +Added line: 6309 +Added line: 7767 ["a"] 9 12 -L2 +Added line: 6103 +Added line: 7007 [b] 5 6 +Added line: 3115 +Added line: 2916 +Added line: 8678 [=] 7 8 - ["b"] 9 12 +Added line: 4060 +Added line: 7726 +Added line: 7214 +Added line: 1727 +Added line: 2829 +Added line: 8370 +Added line: 7549 +Added line: 1211 [var] 1 4 +Added line: 6543 +Added line: 2099 +Added line: 4960 +Added line: 4856 +Added line: 5297 +Added line: 2629 +Added line: 3188 +Added line: 2411 +Added line: 5521 +Added line: 5741 +Added line: 2203 +Added line: 9608 Added line: 3219 +Added line: 7203 +Added line: 3486 [c] 5 6 +Added line: 3063 +Added line: 5406 +Added line: 9092 [=] 7 8 +Added line: 1257 +Added line: 7556 ["c"] 9 12 +Added line: 7613 +Added line: 2197 +Added line: 6812 L4 +Added line: 3468 +Added line: 4909 +Added line: 7884 +Added line: 4351 +Added line: 5458 +Added line: 1602 [var] 1 4 +Added line: 6706 +Added line: 6145 +Added line: 4082 [x] 5 6 [=] 7 8 +Added line: 6912 +Added line: 8003 +Added line: 848 ["$a(b: $b, c: \\"$c\\")"] 9 31 Added line: 1431 +Added line: 8392 +Added line: 8875 EOF diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/imports.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/imports.txt index 49ab402048..0b6ef1d2b0 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/imports.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/imports.txt @@ -1,2 +1,91 @@ +Added line: 609 +Added line: 7292 +Added line: 3554 +Added line: 3232 +Added line: 7372 +Added line: 733 +Added line: 9743 +Added line: 8830 +Added line: 3627 +Added line: 3815 +Added line: 7617 +Added line: 7012 +Added line: 1715 +Added line: 7197 +Added line: 6101 +Added line: 2306 +Added line: 1075 +Added line: 7174 +Added line: 2483 +Added line: 512 +Added line: 4629 +Added line: 7492 +Added line: 2251 +Added line: 9448 +Added line: 3070 +Added line: 4751 +Added line: 1826 +Added line: 5129 +Added line: 3765 +Added line: 8632 +Added line: 6487 +Added line: 7990 +Added line: 9020 +Added line: 387 +Added line: 489 +Added line: 5473 +Added line: 8548 +Added line: 173 +Added line: 156 +Added line: 3083 +Added line: 9658 +Added line: 8917 +Added line: 9548 +Added line: 4198 +Added line: 1433 +Added line: 8080 +Added line: 1796 +Added line: 2930 +Added line: 5963 +Added line: 8309 +Added line: 1250 [Image] or [Truncated image[ Bcol Ecol +Added line: 4854 +Added line: 8363 +Added line: 9268 +Added line: 7804 +Added line: 7446 +Added line: 9188 +Added line: 2558 +Added line: 1947 +Added line: 5557 +Added line: 341 +Added line: 5 +Added line: 1251 +Added line: 7043 +Added line: 9561 +Added line: 2731 +Added line: 4926 +Added line: 8340 +Added line: 476 +Added line: 8167 +Added line: 1684 +Added line: 2379 +Added line: 4977 +Added line: 9016 +Added line: 6872 EOF +Added line: 5227 +Added line: 9115 +Added line: 7986 +Added line: 3191 +Added line: 2630 +Added line: 8878 +Added line: 6110 +Added line: 717 +Added line: 2212 +Added line: 7881 +Added line: 8037 +Added line: 6042 +Added line: 1201 +Added line: 2266 diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/increment.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/increment.txt index 8c533624aa..2c976e7c10 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/increment.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/increment.txt @@ -1,34 +1,51 @@ +Added line: 8364 +Added line: 2711 [Image] or [Truncated image[ Bcol Ecol +Added line: 3159 L3 +Added line: 2093 [var] 1 4 [x] 5 6 [=] 7 8 [0] 9 10 L5 [void] 1 5 +Added line: 9536 +Added line: 5013 [increment1] 6 16 +Added line: 4854 [(] 16 17 +Added line: 5914 [)] 17 18 +Added line: 1240 [{] 19 20 [x] 21 22 [+=] 23 25 [1] 26 27 +Added line: 6156 [}] 29 30 +Added line: 1075 L6 [void] 1 5 [increment2] 6 16 +Added line: 3428 Added line: 6960 [)] 17 18 - [{] 19 20 [x] 21 22 +Added line: 4526 [+=] 23 25 [1] 26 27 [}] 29 30 +Added line: 6263 +Added line: 9145 L7 Added line: 4253 [void] 1 5 [increment3] 6 16 +Added line: 6893 +Added line: 4936 [(] 16 17 +Added line: 6570 [)] 17 18 [{] 19 20 [x] 21 22 @@ -38,9 +55,13 @@ Added line: 4253 L8 [void] 1 5 [increment4] 6 16 +Added line: 5433 [(] 16 17 +Added line: 7544 [)] 17 18 [{] 19 20 +Added line: 3955 +Added line: 1104 [x] 21 22 [+=] 23 25 [1] 26 27 @@ -53,13 +74,16 @@ L9 [{] 19 20 [x] 21 22 [+=] 23 25 +Added line: 3601 [1] 26 27 [}] 29 30 L10 [void] 1 5 +Added line: 5548 [increment6] 6 16 [(] 16 17 [)] 17 18 +Added line: 6477 [{] 19 20 [+=] 23 25 [1] 26 27 @@ -70,42 +94,70 @@ L11 [(] 16 17 [)] 17 18 [{] 19 20 +Added line: 4325 +Added line: 733 [x] 21 22 [+=] 23 25 [1] 26 27 Added line: 6858 [}] 29 30 L12 +Added line: 2524 [void] 1 5 [increment8] 6 16 [(] 16 17 +Added line: 8945 +Added line: 2018 [)] 17 18 +Added line: 206 +Added line: 5757 [{] 19 20 +Added line: 384 +Added line: 7482 +Added line: 3540 [x] 21 22 [+=] 23 25 +Added line: 2064 [1] 26 27 [}] 29 30 L13 [void] 1 5 +Added line: 5455 +Added line: 7564 +Added line: 8830 +Added line: 5723 [increment9] 6 16 [(] 16 17 +Added line: 12 [)] 17 18 [{] 19 20 [+=] 23 25 [1] 26 27 +Added line: 6297 +Added line: 8497 +Added line: 507 +Added line: 9279 +Added line: 4079 [}] 29 30 +Added line: 1767 +Added line: 2868 L14 [void] 1 5 +Added line: 3878 Added line: 4358 +Added line: 7492 [increment10] 6 17 [(] 17 18 - [)] 18 19 +Added line: 636 +Added line: 958 [{] 20 21 [x] 22 23 [+=] 24 26 [1] 27 28 [}] 30 31 L15 +Added line: 9365 +Added line: 8034 [void] 1 5 [increment11] 6 17 [(] 17 18 @@ -115,35 +167,55 @@ L15 [+=] 24 26 [1] 27 28 [}] 30 31 +Added line: 2364 L16 +Added line: 1682 [void] 1 5 [increment12] 6 17 [(] 17 18 +Added line: 4899 [)] 18 19 - [{] 20 21 +Added line: 675 +Added line: 2671 [x] 22 23 [+=] 24 26 [1] 27 28 +Added line: 4066 +Added line: 8452 +Added line: 2411 [}] 30 31 +Added line: 9599 L17 [void] 1 5 [increment13] 6 17 [(] 17 18 +Added line: 4071 [)] 18 19 [{] 20 21 [x] 22 23 [+=] 24 26 [1] 27 28 [}] 30 31 +Added line: 4793 L18 +Added line: 7153 [void] 1 5 [increment14] 6 17 +Added line: 1471 +Added line: 3027 [(] 17 18 [)] 18 19 +Added line: 2702 [{] 20 21 [x] 22 23 +Added line: 1088 [+=] 24 26 +Added line: 94 +Added line: 2258 +Added line: 1086 +Added line: 9931 [1] 27 28 +Added line: 4143 [}] 30 31 L19 [void] 1 5 @@ -151,27 +223,36 @@ L19 [(] 17 18 [)] 18 19 [{] 20 21 +Added line: 3964 +Added line: 1162 [x] 22 23 [+=] 24 26 +Added line: 1203 [1] 27 28 - [}] 30 31 L20 [void] 1 5 +Added line: 8062 +Added line: 7010 +Added line: 1478 +Added line: 626 [increment16] 6 17 [(] 17 18 - [)] 18 19 [{] 20 21 +Added line: 197 +Added line: 8492 [x] 22 23 [+=] 24 26 +Added line: 5851 [1] 27 28 - [}] 30 31 +Added line: 2571 +Added line: 6153 L21 [void] 1 5 [increment17] 6 17 [(] 17 18 [)] 18 19 +Added line: 6716 [{] 20 21 - [x] 22 23 [+=] 24 26 Added line: 1388 [1] 27 28 @@ -184,7 +265,10 @@ L22 [{] 20 21 [x] 22 23 [+=] 24 26 +Added line: 500 +Added line: 6129 [1] 27 28 +Added line: 6454 [}] 30 31 L23 [void] 1 5 @@ -193,12 +277,16 @@ L23 [)] 18 19 [{] 20 21 [x] 22 23 +Added line: 5843 [+=] 24 26 [1] 27 28 [}] 30 31 L24 +Added line: 9362 [void] 1 5 [increment20] 6 17 +Added line: 3104 +Added line: 2216 [(] 17 18 [)] 18 19 [{] 20 21 @@ -206,4 +294,5 @@ L24 [+=] 24 26 [1] 27 28 [}] 30 31 +Added line: 2183 EOF diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex.txt index 282bbb7bdf..b4294eafee 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex.txt @@ -1,17 +1,106 @@ +Added line: 1468 [Image] or [Truncated image[ Bcol Ecol -L1 +Added line: 4623 +Added line: 5204 +Added line: 2952 +Added line: 9960 +Added line: 3752 +Added line: 2062 +Added line: 4826 +Added line: 1364 [class] 1 6 +Added line: 1952 +Added line: 7343 +Added line: 6313 +Added line: 284 [MyClass] 7 14 +Added line: 4166 +Added line: 4617 +Added line: 2509 +Added line: 1688 +Added line: 4061 +Added line: 6416 +Added line: 1783 +Added line: 6516 +Added line: 9909 +Added line: 9402 +Added line: 9732 +Added line: 1744 [{] 15 16 +Added line: 29 L2 +Added line: 6141 +Added line: 5689 +Added line: 3909 +Added line: 6954 +Added line: 911 +Added line: 1987 +Added line: 1914 +Added line: 1446 +Added line: 3604 +Added line: 2630 +Added line: 9615 +Added line: 6117 +Added line: 5956 +Added line: 7312 +Added line: 7405 +Added line: 2755 +Added line: 7770 +Added line: 1769 [final] 3 8 [regex] 9 14 +Added line: 6937 +Added line: 7190 +Added line: 10000 +Added line: 1922 +Added line: 4348 +Added line: 3885 +Added line: 7117 +Added line: 8050 +Added line: 5609 +Added line: 6079 +Added line: 3101 +Added line: 1550 +Added line: 4251 [=] 15 16 +Added line: 8241 +Added line: 6266 +Added line: 3449 +Added line: 1287 +Added line: 4413 +Added line: 3369 +Added line: 3261 +Added line: 3226 +Added line: 7053 [new] 17 20 [RegExp] 21 27 +Added line: 3764 +Added line: 843 [(] 27 28 +Added line: 1665 +Added line: 3574 +Added line: 5300 +Added line: 7033 [r'^--(\[a-zA-Z\\-_0-9\]+)(=(.*))?$[ 28 60 [)] 60 61 +Added line: 5688 +Added line: 5835 +Added line: 5680 +Added line: 2720 +Added line: 5215 +Added line: 4934 L3 +Added line: 7607 +Added line: 9585 [}] 1 2 +Added line: 9447 +Added line: 8097 +Added line: 1449 +Added line: 8534 EOF +Added line: 1188 +Added line: 1504 +Added line: 5419 +Added line: 8521 +Added line: 7470 +Added line: 9246 diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex2.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex2.txt index a19e49f721..e3aca52c45 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex2.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex2.txt @@ -1,19 +1,108 @@ +Added line: 8174 +Added line: 7882 +Added line: 441 +Added line: 4353 +Added line: 1357 +Added line: 516 +Added line: 9763 [Image] or [Truncated image[ Bcol Ecol +Added line: 7860 +Added line: 5630 L1 +Added line: 942 +Added line: 6133 +Added line: 7812 +Added line: 3652 +Added line: 4162 +Added line: 7550 +Added line: 3650 +Added line: 3346 +Added line: 1761 +Added line: 640 +Added line: 752 +Added line: 785 +Added line: 2591 +Added line: 7880 +Added line: 3068 +Added line: 4404 +Added line: 5660 [class] 1 6 [{] 15 16 +Added line: 3932 +Added line: 1530 +Added line: 1273 +Added line: 1576 +Added line: 432 +Added line: 3290 [final] 3 8 +Added line: 7488 +Added line: 2387 [regex] 9 14 +Added line: 5811 +Added line: 9873 +Added line: 6061 +Added line: 950 +Added line: 7174 +Added line: 2208 +Added line: 6433 +Added line: 2504 +Added line: 1002 +Added line: 1725 +Added line: 7113 [=] 15 16 [new] 17 20 [RegExp] 21 27 +Added line: 1609 +Added line: 1759 +Added line: 8210 +Added line: 5366 +Added line: 266 Added line: 8970 - [(] 27 28 +Added line: 3891 Added line: 597 +Added line: 7546 +Added line: 7386 +Added line: 254 [r"(^\[a-zA-Z\]\[-+.a-zA-Z\\d\]*://[ 28 65 - [)] 65 66 +Added line: 4480 +Added line: 2392 +Added line: 2352 +Added line: 7866 +Added line: 529 +Added line: 3165 +Added line: 5535 +Added line: 5585 +Added line: 2664 +Added line: 7593 +Added line: 5075 +Added line: 3011 +Added line: 2934 +Added line: 9267 Added line: 7404 +Added line: 6017 +Added line: 4487 +Added line: 9309 +Added line: 2396 +Added line: 2317 +Added line: 4207 +Added line: 1677 [}] 1 2 -EOF +Added line: 215 +Added line: 938 +Added line: 7826 +Added line: 8148 +Added line: 4242 Added line: 534 +Added line: 5096 +Added line: 4520 +Added line: 772 +Added line: 6134 +Added line: 5564 +Added line: 8443 +Added line: 591 +Added line: 1317 Added line: 9956 +Added line: 5690 +Added line: 2666 +Added line: 2992 +Added line: 9784 diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex3.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex3.txt index cde3cb0f31..1669e489a6 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex3.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/regex3.txt @@ -1,17 +1,106 @@ +Added line: 3165 +Added line: 2921 +Added line: 887 +Added line: 8383 +Added line: 83 +Added line: 103 +Added line: 5808 [Image] or [Truncated image[ Bcol Ecol L1 +Added line: 9007 +Added line: 2748 +Added line: 6548 +Added line: 4690 +Added line: 6488 +Added line: 5683 +Added line: 1531 +Added line: 6588 +Added line: 5915 [class] 1 6 +Added line: 2664 +Added line: 3055 +Added line: 4201 +Added line: 3497 [MyClass] 7 14 +Added line: 4066 [{] 15 16 +Added line: 8539 +Added line: 6016 +Added line: 5770 +Added line: 6833 +Added line: 9254 +Added line: 667 +Added line: 4322 +Added line: 2906 +Added line: 7696 +Added line: 3056 +Added line: 8989 +Added line: 6922 +Added line: 5652 +Added line: 3788 +Added line: 980 +Added line: 6845 +Added line: 5488 +Added line: 2461 +Added line: 3082 +Added line: 3239 +Added line: 5592 +Added line: 7580 +Added line: 2032 +Added line: 8860 +Added line: 5777 +Added line: 7695 L2 +Added line: 6058 +Added line: 6654 [final] 3 8 - [regex] 9 14 +Added line: 8474 +Added line: 216 +Added line: 4776 +Added line: 5137 +Added line: 3152 +Added line: 9335 +Added line: 2358 +Added line: 5985 +Added line: 4586 [=] 15 16 +Added line: 3465 +Added line: 8511 +Added line: 1002 +Added line: 8220 +Added line: 9114 [new] 17 20 - [RegExp] 21 27 +Added line: 1670 +Added line: 6780 +Added line: 1766 +Added line: 8605 +Added line: 9926 [(] 27 28 +Added line: 2082 +Added line: 79 +Added line: 8590 +Added line: 6931 [r'''\[ \\t\\r\\n"'\\\\/\]'''] 28 49 +Added line: 7512 [)] 49 50 -L3 +Added line: 3511 +Added line: 2159 +Added line: 717 +Added line: 7390 +Added line: 9403 +Added line: 1406 +Added line: 3341 +Added line: 9809 [}] 1 2 +Added line: 2566 EOF +Added line: 813 +Added line: 8172 +Added line: 371 +Added line: 7219 +Added line: 754 +Added line: 4854 +Added line: 7606 +Added line: 1236 +Added line: 7812 +Added line: 4102 diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_interpolation.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_interpolation.txt index 61d6177ba8..53e09ee46d 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_interpolation.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_interpolation.txt @@ -1,22 +1,111 @@ +Added line: 2416 +Added line: 2559 +Added line: 378 +Added line: 7747 +Added line: 9123 [Image] or [Truncated image[ Bcol Ecol +Added line: 2056 L1 +Added line: 523 +Added line: 8364 +Added line: 5664 +Added line: 1814 +Added line: 3963 +Added line: 7333 +Added line: 3670 +Added line: 7199 +Added line: 7944 +Added line: 876 +Added line: 3418 +Added line: 7034 [var] 1 4 +Added line: 6141 +Added line: 7364 +Added line: 5231 [stringInStringUnicode] 5 26 +Added line: 5592 +Added line: 7866 +Added line: 2565 +Added line: 7052 +Added line: 3709 +Added line: 5081 +Added line: 806 +Added line: 2214 [=] 27 28 +Added line: 9133 ["${"∆"}"] 29 37 +Added line: 9498 L2 +Added line: 7664 +Added line: 6079 +Added line: 7232 +Added line: 6671 +Added line: 1830 +Added line: 3648 +Added line: 7183 [var] 1 4 +Added line: 9099 [stringInStringNewline] 5 26 - [=] 27 28 +Added line: 549 +Added line: 7063 +Added line: 1440 +Added line: 7650 +Added line: 6157 +Added line: 2119 +Added line: 9898 +Added line: 163 +Added line: 1199 +Added line: 1263 +Added line: 4285 +Added line: 9281 +Added line: 8557 +Added line: 8140 +Added line: 2578 ["${"\\n"}"] 29 38 +Added line: 5295 +Added line: 9105 +Added line: 9821 +Added line: 1246 +Added line: 7300 +Added line: 3256 L3 +Added line: 1217 [var] 1 4 +Added line: 3359 +Added line: 5543 [nestedInterpolation] 5 24 +Added line: 9904 +Added line: 3542 +Added line: 4415 +Added line: 8131 [=] 25 26 +Added line: 1675 +Added line: 3274 ["${"${"\\n"}"}"] 27 41 L4 +Added line: 5428 +Added line: 8870 +Added line: 1951 +Added line: 534 +Added line: 5543 [var] 1 4 +Added line: 5703 [interpolationWithMethodCall] 5 32 +Added line: 8224 +Added line: 1411 [=] 33 34 ["${foo("")}"] 35 47 +Added line: 6793 +Added line: 229 +Added line: 8817 EOF +Added line: 6605 +Added line: 1106 +Added line: 2762 +Added line: 9054 +Added line: 5404 +Added line: 4548 +Added line: 5447 +Added line: 9756 +Added line: 697 +Added line: 7377 diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_multiline.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_multiline.txt index 0500d83f76..a77feaee62 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_multiline.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_multiline.txt @@ -1,20 +1,109 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 9611 +Added line: 7208 +Added line: 1750 +Added line: 7953 +Added line: 3335 +Added line: 5648 +Added line: 5935 L1 +Added line: 474 +Added line: 2528 +Added line: 5602 +Added line: 7049 +Added line: 6809 +Added line: 6988 [class] 1 6 [{] 15 16 +Added line: 937 L2 +Added line: 8293 +Added line: 6724 +Added line: 5252 +Added line: 6003 +Added line: 2848 +Added line: 6576 [s1] 9 11 +Added line: 2801 +Added line: 282 +Added line: 2889 +Added line: 9579 +Added line: 6112 +Added line: 5597 Added line: 710 +Added line: 8297 +Added line: 1264 +Added line: 899 +Added line: 6852 +Added line: 7589 +Added line: 9869 +Added line: 1338 +Added line: 7641 [=] 12 13 +Added line: 4549 +Added line: 3522 Added line: 655 +Added line: 4449 +Added line: 8488 +Added line: 4857 +Added line: 6997 +Added line: 8029 +Added line: 4608 +Added line: 1746 +Added line: 276 +Added line: 2448 +Added line: 889 +Added line: 8089 ['''\nYou can create\nmulti-line st[ 14 4 -L7 +Added line: 8979 +Added line: 3045 +Added line: 2498 +Added line: 1510 +Added line: 8866 +Added line: 901 +Added line: 343 [var] 5 8 [s2] 9 11 +Added line: 6154 +Added line: 9042 +Added line: 9365 +Added line: 937 +Added line: 431 +Added line: 2994 +Added line: 8427 +Added line: 6972 +Added line: 776 +Added line: 2767 +Added line: 8586 +Added line: 253 [=] 12 13 +Added line: 6377 +Added line: 1494 ["""This is also a\nmulti-line stri[ 14 22 +Added line: 3559 L9 Added line: 7923 +Added line: 4501 +Added line: 7092 +Added line: 1175 Added line: 1897 +Added line: 581 +Added line: 4840 +Added line: 3243 +Added line: 1296 +Added line: 2682 +Added line: 7036 +Added line: 6407 +Added line: 4202 +Added line: 7423 +Added line: 4048 [}] 1 2 +Added line: 8766 +Added line: 383 +Added line: 7836 +Added line: 2463 +Added line: 3888 +Added line: 3312 EOF +Added line: 3455 +Added line: 7539 diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_with_backslashes.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_with_backslashes.txt index fe87f23400..62d0c2fd25 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_with_backslashes.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/string_with_backslashes.txt @@ -1,15 +1,104 @@ +Added line: 6284 +Added line: 3588 +Added line: 3007 [Image] or [Truncated image[ Bcol Ecol +Added line: 6046 +Added line: 2401 +Added line: 4304 +Added line: 6525 +Added line: 6460 +Added line: 7417 +Added line: 3971 +Added line: 9655 +Added line: 2646 +Added line: 7153 +Added line: 9437 +Added line: 411 +Added line: 5934 +Added line: 473 +Added line: 3513 +Added line: 4293 +Added line: 2863 +Added line: 8345 +Added line: 9333 +Added line: 3118 +Added line: 2819 Added line: 7998 +Added line: 5395 +Added line: 7749 +Added line: 3935 +Added line: 1084 +Added line: 8980 +Added line: 3410 +Added line: 5885 +Added line: 3260 Added line: 3033 +Added line: 4330 +Added line: 4752 +Added line: 1901 +Added line: 146 +Added line: 4354 +Added line: 129 +Added line: 9130 +Added line: 2815 [class] 1 6 [MyClass] 7 14 +Added line: 3486 +Added line: 4197 +Added line: 6459 +Added line: 3211 +Added line: 8093 +Added line: 2382 +Added line: 4398 +Added line: 8435 +Added line: 9209 +Added line: 2142 [{] 15 16 +Added line: 2536 +Added line: 9631 +Added line: 8635 +Added line: 6960 +Added line: 5822 +Added line: 6778 [final] 3 8 +Added line: 8128 Added line: 1825 +Added line: 866 +Added line: 3398 +Added line: 9620 +Added line: 5961 +Added line: 525 +Added line: 7164 [stringWithBackslashes] 9 30 +Added line: 9186 +Added line: 2075 +Added line: 6594 [=] 31 32 +Added line: 723 +Added line: 3235 +Added line: 6941 ["Escaping\\ spaces\\ should work"] 33 64 Added line: 2928 +Added line: 8613 +Added line: 46 +Added line: 5120 +Added line: 6965 L3 +Added line: 4780 [}] 1 2 +Added line: 715 +Added line: 420 +Added line: 7864 +Added line: 978 +Added line: 5281 +Added line: 869 +Added line: 3500 +Added line: 8383 +Added line: 3006 +Added line: 5503 +Added line: 7209 +Added line: 7852 +Added line: 9109 +Added line: 2467 EOF +Added line: 2661 diff --git a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/tabWidth.txt b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/tabWidth.txt index 647078548f..bd75fb6bfe 100644 --- a/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/tabWidth.txt +++ b/pmd-dart/src/test/resources/net/sourceforge/pmd/lang/dart/cpd/testdata/tabWidth.txt @@ -1,15 +1,104 @@ +Added line: 9604 +Added line: 648 +Added line: 2216 +Added line: 8796 +Added line: 804 +Added line: 1278 +Added line: 5501 +Added line: 3193 +Added line: 5276 [class] 1 6 +Added line: 9632 +Added line: 8981 +Added line: 5050 +Added line: 2954 [MyClass] 7 14 +Added line: 5897 +Added line: 1318 [{] 15 16 +Added line: 3781 +Added line: 1011 L2 +Added line: 4723 +Added line: 7109 +Added line: 1134 Added line: 7484 Added line: 5550 +Added line: 478 +Added line: 1487 +Added line: 6155 +Added line: 6888 +Added line: 7966 +Added line: 4510 +Added line: 1216 +Added line: 9399 +Added line: 8394 Added line: 6752 +Added line: 8195 +Added line: 7501 +Added line: 2328 +Added line: 2973 [var] 2 5 +Added line: 5030 +Added line: 8445 +Added line: 197 +Added line: 4714 +Added line: 5143 +Added line: 6042 +Added line: 9531 +Added line: 7775 +Added line: 2483 [s1] 6 8 Added line: 5248 +Added line: 8268 +Added line: 2290 [=] 9 10 +Added line: 5632 +Added line: 7775 +Added line: 464 +Added line: 9419 +Added line: 7313 ['test'] 11 17 +Added line: 9532 +Added line: 4556 +Added line: 9345 +Added line: 7728 +Added line: 8268 +Added line: 8631 +Added line: 1575 +Added line: 4852 +Added line: 9068 +Added line: 9899 L3 - [}] 1 2 -EOF +Added line: 3716 +Added line: 3118 +Added line: 246 +Added line: 5855 +Added line: 1216 +Added line: 6468 +Added line: 6779 +Added line: 6169 +Added line: 1511 +Added line: 469 +Added line: 2076 +Added line: 4796 +Added line: 4524 +Added line: 7111 +Added line: 6095 +Added line: 5172 +Added line: 3695 +Added line: 7192 +Added line: 5650 +Added line: 1705 +Added line: 1622 +Added line: 3890 +Added line: 8670 +Added line: 2735 +Added line: 6920 +Added line: 5023 +Added line: 7622 +Added line: 5766 +Added line: 8529 +Added line: 2350 +Added line: 5162 +Added line: 8766 diff --git a/pmd-doc/src/test/resources/expected/java.md b/pmd-doc/src/test/resources/expected/java.md index 857a3c2597..24dca19763 100644 --- a/pmd-doc/src/test/resources/expected/java.md +++ b/pmd-doc/src/test/resources/expected/java.md @@ -1,44 +1,133 @@ +Added line: 1834 +Added line: 3733 +Added line: 9037 +Added line: 8613 --- title: Java Rules +Added line: 131 +Added line: 9348 tags: [rule_references, java] summary: Index of all built-in rules available for Java +Added line: 3236 +Added line: 9084 language_name: Java +Added line: 9189 permalink: pmd_rules_java.html folder: pmd/rules Added line: 4550 +Added line: 2075 +Added line: 9478 editmepath: false +Added line: 4358 +Added line: 9801 +Added line: 684 +Added line: 3438 +Added line: 9815 --- +Added line: 3330 <!-- DO NOT EDIT THIS FILE. This file is generated. --> +Added line: 7220 +Added line: 363 {% include callout.html content="Sample ruleset to test rule doc generation. Here might be <script>alert('XSS');</script> as well. And "quotes". Inside CDATA <script>alert('XSS');</script>." %} +Added line: 1758 * [DeprecatedSample](pmd_rules_java_sample.html#deprecatedsample): <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> Just some description of a deprecated rule. RuleTag with quotes: Use {% rule "RenamedRule" %} ins... * [MovedRule](pmd_rules_java_sample.html#movedrule): <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> The rule has been moved to another ruleset. Use instead [JumbledIncrementer](pmd_rules_java_sample2.html#jumbledincrementer). -* [OverrideBothEqualsAndHashcode](pmd_rules_java_sample.html#overridebothequalsandhashcode): Override both 'public boolean Object.equals(Object other)', and 'public int Object.hashCode()', o... +Added line: 3564 +Added line: 3668 +Added line: 3516 * [RenamedRule1](pmd_rules_java_sample.html#renamedrule1): <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> The rule has been renamed. Use instead [JumbledIncrementer](pmd_rules_java_sample.html#jumbledincrementer). +Added line: 5600 +Added line: 2007 +Added line: 8799 +Added line: 9262 +Added line: 8952 +Added line: 5665 +Added line: 7802 * [RenamedRule2](pmd_rules_java_sample.html#renamedrule2): <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> The rule has been renamed. Use instead [JumbledIncrementer](pmd_rules_java_sample.html#jumbledincrementer). +Added line: 4843 +Added line: 5019 * [RenamedRule3](pmd_rules_java_sample.html#renamedrule3): <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> The rule has been renamed. Use instead [JumbledIncrementer](pmd_rules_java_sample.html#jumbledincrementer). +Added line: 1711 +Added line: 6752 +Added line: 9853 * [RenamedRule4](pmd_rules_java_sample.html#renamedrule4): <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> The rule has been renamed. Use instead [JumbledIncrementer](pmd_rules_java_sample.html#jumbledincrementer). +Added line: 5063 +Added line: 7216 +Added line: 485 +Added line: 286 +Added line: 791 +Added line: 4647 +Added line: 7581 +Added line: 404 +Added line: 8046 ## Additional rulesets +Added line: 8093 +Added line: 7700 +Added line: 9625 +Added line: 4839 +Added line: 2396 +Added line: 7290 +Added line: 3035 Added line: 202 Added line: 9435 +Added line: 8816 * Other ruleset (`rulesets/ruledoctest/other-ruleset.xml`): +Added line: 8117 - Ruleset which serves a specific use case, such as Getting Started. +Added line: 2834 +Added line: 5469 +Added line: 7485 +Added line: 2916 +Added line: 694 +Added line: 6898 +Added line: 2031 +Added line: 4708 +Added line: 6781 It contains the following rules: -Added line: 8922 +Added line: 8069 +Added line: 1741 +Added line: 3606 +Added line: 5363 +Added line: 356 [JumbledIncrementer](pmd_rules_java_sample.html#jumbledincrementer), [OverrideBothEqualsAndHashcode](pmd_rules_java_sample.html#overridebothequalsandhashcode) +Added line: 2652 * Sample Deprecated (`rulesets/ruledoctest/sample-deprecated.xml`): +Added line: 4610 +Added line: 5427 +Added line: 1818 <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> This ruleset is for backwards compatibility. +Added line: 2813 +Added line: 1848 +Added line: 8970 It contains the following rules: +Added line: 693 +Added line: 2194 +Added line: 7373 +Added line: 6578 +Added line: 3622 +Added line: 8849 +Added line: 8153 +Added line: 3727 +Added line: 7821 Added line: 5341 +Added line: 394 +Added line: 7985 +Added line: 4378 +Added line: 1526 +Added line: 8646 +Added line: 4357 +Added line: 8121 +Added line: 1867 [JumbledIncrementer](pmd_rules_java_sample.html#jumbledincrementer), [OldNameOfJumbledIncrementer](pmd_rules_java_sample.html#jumbledincrementer), [OverrideBothEqualsAndHashcode](pmd_rules_java_sample.html#overridebothequalsandhashcode) +Added line: 4998 diff --git a/pmd-doc/src/test/resources/expected/sample.md b/pmd-doc/src/test/resources/expected/sample.md index 0f6b993246..cdb9da7172 100644 --- a/pmd-doc/src/test/resources/expected/sample.md +++ b/pmd-doc/src/test/resources/expected/sample.md @@ -2,6 +2,7 @@ title: Sample permalink: pmd_rules_java_sample.html folder: pmd/rules/java +Added line: 7925 sidebaractiveurl: /pmd_rules_java.html editmepath: ../rulesets/ruledoctest/sample.xml keywords: Sample, XSSInDocumentation, OverrideBothEqualsAndHashcode, JumbledIncrementer, DeprecatedSample, RenamedRule1, RenamedRule2, RenamedRule3, RenamedRule4, MovedRule @@ -14,6 +15,7 @@ language: Java **Since:** PMD 1.0 +Added line: 9051 **Priority:** Medium (3) Just some description of a deprecated rule. @@ -23,6 +25,7 @@ RuleTag with quotes: Use {% rule "RenamedRule" %} instead. RuleTag without quotes: Use {% rule RenamedRule %} instead. RuleTag with full category and quotes: Use {% rule "java/sample/RenamedRule" %} instead. +Added line: 8400 RuleTag with full category and without quotes: Use {% rule java/sample/RenamedRule %} instead. @@ -30,15 +33,18 @@ RuleTag with full category and without quotes: Use {% rule java/sample/RenamedRu ``` xpath //ForStatement ``` +Added line: 7153 **Use this rule by referencing it:** +Added line: 8332 ``` xml <rule ref="category/java/sample.xml/DeprecatedSample" /> ``` ## JumbledIncrementer +Added line: 8345 -**Since:** PMD 1.0 +Added line: 2651 **Priority:** Medium (3) @@ -56,6 +62,7 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i **Example(s):** +Added line: 4222 {%raw%}public class JumbledIncrementerRule1 { public void foo() { for (int i = 0; i < 10; i++) { // only references 'i' @@ -64,6 +71,7 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i } } } +Added line: 1531 }{%endraw%} ``` @@ -87,19 +95,24 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i <rule ref="category/java/sample.xml/JumbledIncrementer" /> ``` +Added line: 8935 **Use this rule and customize it:** +Added line: 119 ``` xml <rule ref="category/java/sample.xml/JumbledIncrementer"> <properties> <property name="sampleAdditionalProperty" value="the value" /> <property name="sampleMultiStringProperty" value="Value1,Value2" /> <property name="sampleRegexProperty1" value="\/\*\s+(default|package)\s+\*\/" /> +Added line: 2181 +Added line: 4108 <property name="sampleRegexProperty2" value="[a-z]*" /> <property name="sampleRegexProperty3" value="\s+" /> <property name="sampleRegexProperty4" value="_dd_" /> <property name="sampleRegexProperty5" value="[0-9]{1,3}" /> <property name="sampleRegexProperty6" value="\b" /> <property name="sampleRegexProperty7" value="\n" /> +Added line: 914 </properties> </rule> ``` @@ -108,11 +121,13 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f;">Deprecated</span> +Added line: 342 The rule has been moved to another ruleset. Use instead: [JumbledIncrementer](pmd_rules_java_sample2.html#jumbledincrementer) **Since:** PMD 1.0 Added line: 956 +Added line: 4971 **Priority:** Medium (3) Avoid jumbled loop incrementers - its usually a mistake, and is confusing even if intentional. @@ -121,6 +136,7 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i ``` xpath //ForStatement [ +Added line: 2335 ForUpdate/StatementExpressionList/StatementExpression/PostfixExpression/PrimaryExpression/PrimaryPrefix/Name/@Image = ancestor::ForStatement/ForInit//VariableDeclaratorId/@Image @@ -132,19 +148,22 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i ``` java {%raw%}public class JumbledIncrementerRule1 { public void foo() { +Added line: 1792 for (int i = 0; i < 10; i++) { // only references 'i' - for (int k = 0; k < 20; i++) { // references both 'i' and 'k' System.out.println("Hello"); } } } }{%endraw%} ``` +Added line: 9938 +Added line: 4719 **Use this rule by referencing it:** ``` xml <rule ref="category/java/sample.xml/MovedRule" /> ``` +Added line: 5027 ## OverrideBothEqualsAndHashcode @@ -154,21 +173,30 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i **Minimum Language Version:** Java 1.5 +Added line: 9971 **Maximum Language Version:** Java 11 +Added line: 9643 +Added line: 2198 +Added line: 5407 Override both `public boolean Object.equals(Object other)`, and `public int Object.hashCode()`, or override neither. Even if you are inheriting a `hashCode()` from a parent class, consider implementing hashCode and explicitly delegating to your superclass. +Added line: 5717 Second paragraph. Code sample Third paragraph. +Added line: 4623 -**This rule is defined by the following Java class:** [net.sourceforge.pmd.lang.java.rule.errorprone.OverrideBothEqualsAndHashcodeRule](https://github.com/pmd/pmd/blob/main/net/sourceforge/pmd/lang/java/rule/errorprone/OverrideBothEqualsAndHashcodeRule.java) +Added line: 3030 +Added line: 1674 **Example(s):** +Added line: 5044 +Added line: 7224 ``` java {%raw%}public class Bar { // poor, missing a hashcode() method @@ -182,56 +210,66 @@ public class Baz { // poor, missing an equals() method // return some hash value } } - public class Foo { // perfect, both methods provided public boolean equals(Object other) { // do some comparison +Added line: 2400 } +Added line: 6608 public int hashCode() { // return some hash value } +Added line: 7720 } // A sample with double braces (#1898) +Added line: 9315 public class Foo { +Added line: 3822 public List<String> bar() { return new ArrayList<String>(){{ addAll("a","b","c"); }}; } }{%endraw%} ``` **Use this rule by referencing it:** +Added line: 2020 ``` xml <rule ref="category/java/sample.xml/OverrideBothEqualsAndHashcode" /> ``` ## RenamedRule1 +Added line: 9975 Added line: 7346 This rule has been renamed. Use instead: [JumbledIncrementer](#jumbledincrementer) **Since:** PMD 1.0 +Added line: 6829 **Priority:** Medium (3) Avoid jumbled loop incrementers - its usually a mistake, and is confusing even if intentional. +Added line: 1145 Added line: 6039 **This rule is defined by the following XPath expression:** ``` xpath -//ForStatement +Added line: 9900 [ ForUpdate/StatementExpressionList/StatementExpression/PostfixExpression/PrimaryExpression/PrimaryPrefix/Name/@Image = ancestor::ForStatement/ForInit//VariableDeclaratorId/@Image ] ``` +Added line: 7161 **Example(s):** ``` java {%raw%}public class JumbledIncrementerRule1 { public void foo() { +Added line: 8791 for (int i = 0; i < 10; i++) { // only references 'i' for (int k = 0; k < 20; i++) { // references both 'i' and 'k' System.out.println("Hello"); @@ -239,6 +277,7 @@ Added line: 6039 } } }{%endraw%} +Added line: 2141 ``` **This rule has the following properties:** @@ -247,6 +286,7 @@ Added line: 6039 |----|-------------|-----------| |sampleAdditionalProperty|the value|This is a additional property for tests| |sampleMultiStringProperty|Value1 , Value2|Test property with multiple strings| +Added line: 476 |sampleDeprecatedProperty|test|<span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> This is a sample deprecated property for tests| |sampleRegexProperty1|\\/\\\*\\s+(default\|package)\\s+\\\*\\/|The property is of type regex| |sampleRegexProperty2|\[a-z\]\*|The property is of type regex| @@ -256,17 +296,19 @@ Added line: 350 |sampleRegexProperty4|\_dd\_|The property is of type regex| |sampleRegexProperty5|\[0-9\]{1,3}|The property is of type regex| |sampleRegexProperty6|\\b|The property is of type regex| +Added line: 4056 |sampleRegexProperty7|\\n|The property is of type regex| **Use this rule with the default properties by just referencing it:** ``` xml +Added line: 4751 <rule ref="category/java/sample.xml/RenamedRule1" /> ``` **Use this rule and customize it:** ``` xml <rule ref="category/java/sample.xml/RenamedRule1"> - <properties> +Added line: 9156 <property name="sampleAdditionalProperty" value="the value" /> <property name="sampleMultiStringProperty" value="Value1,Value2" /> <property name="sampleRegexProperty1" value="\/\*\s+(default|package)\s+\*\/" /> @@ -277,9 +319,11 @@ Added line: 1247 <property name="sampleRegexProperty5" value="[0-9]{1,3}" /> <property name="sampleRegexProperty6" value="\b" /> <property name="sampleRegexProperty7" value="\n" /> +Added line: 5201 </properties> </rule> ``` +Added line: 876 ## RenamedRule2 @@ -287,6 +331,9 @@ Added line: 1247 This rule has been renamed. Use instead: [JumbledIncrementer](#jumbledincrementer) +Added line: 6020 +Added line: 3976 +Added line: 6265 **Since:** PMD 1.0 **Priority:** Medium (3) @@ -294,6 +341,7 @@ This rule has been renamed. Use instead: [JumbledIncrementer](#jumbledincremente Avoid jumbled loop incrementers - its usually a mistake, and is confusing even if intentional. **This rule is defined by the following XPath expression:** +Added line: 2050 ``` xpath //ForStatement [ @@ -304,6 +352,7 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i ``` **Example(s):** +Added line: 7227 ``` java {%raw%}public class JumbledIncrementerRule1 { @@ -314,8 +363,10 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i } } } +Added line: 838 }{%endraw%} ``` +Added line: 9846 **This rule has the following properties:** @@ -335,31 +386,39 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i **Use this rule with the default properties by just referencing it:** ``` xml <rule ref="category/java/sample.xml/RenamedRule2" /> +Added line: 7507 Added line: 6999 +Added line: 6364 ``` **Use this rule and customize it:** ``` xml +Added line: 2730 <rule ref="category/java/sample.xml/RenamedRule2"> +Added line: 4582 <properties> <property name="sampleAdditionalProperty" value="the value" /> <property name="sampleMultiStringProperty" value="Value1,Value2" /> <property name="sampleRegexProperty1" value="\/\*\s+(default|package)\s+\*\/" /> +Added line: 671 <property name="sampleRegexProperty2" value="[a-z]*" /> - <property name="sampleRegexProperty3" value="\s+" /> <property name="sampleRegexProperty4" value="_dd_" /> <property name="sampleRegexProperty5" value="[0-9]{1,3}" /> +Added line: 8110 <property name="sampleRegexProperty6" value="\b" /> <property name="sampleRegexProperty7" value="\n" /> </properties> </rule> +Added line: 5239 ``` ## RenamedRule3 Added line: 21 <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f;">Deprecated</span> +Added line: 6692 This rule has been renamed. Use instead: [JumbledIncrementer](#jumbledincrementer) +Added line: 6968 <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f;">Deprecated</span> @@ -371,26 +430,33 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i **This rule is defined by the following XPath expression:** ``` xpath +Added line: 4089 //ForStatement [ ForUpdate/StatementExpressionList/StatementExpression/PostfixExpression/PrimaryExpression/PrimaryPrefix/Name/@Image = ancestor::ForStatement/ForInit//VariableDeclaratorId/@Image +Added line: 7771 ] +Added line: 5499 ``` **Example(s):** ``` java {%raw%}public class JumbledIncrementerRule1 { +Added line: 4745 public void foo() { for (int i = 0; i < 10; i++) { // only references 'i' +Added line: 3556 for (int k = 0; k < 20; i++) { // references both 'i' and 'k' System.out.println("Hello"); +Added line: 7687 } } } }{%endraw%} +Added line: 5776 ``` **This rule has the following properties:** @@ -398,7 +464,6 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i |Name|Default Value|Description| |----|-------------|-----------| |sampleAdditionalProperty|the value|This is a additional property for tests| -|sampleMultiStringProperty|Value1 , Value2|Test property with multiple strings| |sampleDeprecatedProperty|test|<span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> This is a sample deprecated property for tests| |sampleRegexProperty1|\\/\\\*\\s+(default\|package)\\s+\\\*\\/|The property is of type regex| |sampleRegexProperty2|\[a-z\]\*|The property is of type regex| @@ -406,10 +471,12 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i |sampleRegexProperty4|\_dd\_|The property is of type regex| |sampleRegexProperty5|\[0-9\]{1,3}|The property is of type regex| |sampleRegexProperty6|\\b|The property is of type regex| +Added line: 1738 |sampleRegexProperty7|\\n|The property is of type regex| **Use this rule with the default properties by just referencing it:** ``` xml +Added line: 5814 <rule ref="category/java/sample.xml/RenamedRule3" /> ``` @@ -427,12 +494,14 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i <property name="sampleRegexProperty6" value="\b" /> <property name="sampleRegexProperty7" value="\n" /> </properties> +Added line: 977 </rule> ## RenamedRule4 <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f;">Deprecated</span> +Added line: 6306 This rule has been renamed. Use instead: [JumbledIncrementer](#jumbledincrementer) <span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f;">Deprecated</span> @@ -440,25 +509,33 @@ This rule has been renamed. Use instead: [JumbledIncrementer](#jumbledincremente **Since:** PMD 1.0 **Priority:** Medium (3) +Added line: 2549 +Added line: 5293 Avoid jumbled loop incrementers - its usually a mistake, and is confusing even if intentional. **This rule is defined by the following XPath expression:** ``` xpath +Added line: 5876 //ForStatement [ +Added line: 3711 ForUpdate/StatementExpressionList/StatementExpression/PostfixExpression/PrimaryExpression/PrimaryPrefix/Name/@Image +Added line: 9663 = ancestor::ForStatement/ForInit//VariableDeclaratorId/@Image ] ``` +Added line: 8879 **Example(s):** +Added line: 7842 ``` java {%raw%}public class JumbledIncrementerRule1 { public void foo() { for (int i = 0; i < 10; i++) { // only references 'i' +Added line: 959 for (int k = 0; k < 20; i++) { // references both 'i' and 'k' System.out.println("Hello"); } @@ -499,12 +576,15 @@ Avoid jumbled loop incrementers - its usually a mistake, and is confusing even i <property name="sampleRegexProperty4" value="_dd_" /> <property name="sampleRegexProperty5" value="[0-9]{1,3}" /> <property name="sampleRegexProperty6" value="\b" /> +Added line: 951 <property name="sampleRegexProperty7" value="\n" /> </properties> </rule> ``` +Added line: 7339 ## XSSInDocumentation +Added line: 4820 Added line: 9182 **Since:** PMD 0.1 @@ -515,9 +595,12 @@ Added line: 7878 <script>alert('XSS at the beginning');</script> HTML tags might appear at various places. Sometimes they should be escaped, sometimes not: +Added line: 1352 For example, in a code sample, it should <strong>not</strong> be escaped. +Added line: 939 This means, <script>alert('XSS');</script> is no problem here. +Added line: 6098 Also in backticks `<script>alert('XSS');</script>` like here it is no problem. The tags are already escaped in the text, e.g. <script>alert('XSS');</script>. @@ -535,19 +618,23 @@ should still not be executed. The paragraph after the quotation. +Added line: 9083 +Added line: 7421 > block quote +Added line: 3267 > in cdata If the description contains a code example, then e.g. "quotes" should not be escaped: ``` +Added line: 1952 +Added line: 991 if (0 > 1 && 0 < 1) { System.out.println("impossible"); } ``` - **This rule is defined by the following XPath expression:** ``` xpath //ForStatement @@ -562,6 +649,7 @@ if (0 > 1 && 0 < 1) { String s = "abc"; // the quotes should not be escaped in markdown. } } +Added line: 8945 // <script>alert('XSS');</script> }{%endraw%} ``` @@ -573,6 +661,7 @@ if (0 > 1 && 0 < 1) { |sampleRegexProperty|\\/\\\*\\s+(default\|package)\\s+\\\*\\/|The property is of type regex| |XSSpropertyTest|<script>alert('XSS');</script>|<script>alert('XSS');</script>| |escapingNeeded|this is escaped: \||You should be able to use \| in the description| +Added line: 5884 **Use this rule with the default properties by just referencing it:** ``` xml diff --git a/pmd-doc/src/test/resources/ruletagchecker/docs/pages/pmd/rules/java/bestpractices.md b/pmd-doc/src/test/resources/ruletagchecker/docs/pages/pmd/rules/java/bestpractices.md index 995ebd6621..a34af3218c 100644 --- a/pmd-doc/src/test/resources/ruletagchecker/docs/pages/pmd/rules/java/bestpractices.md +++ b/pmd-doc/src/test/resources/ruletagchecker/docs/pages/pmd/rules/java/bestpractices.md @@ -1,6 +1,95 @@ +Added line: 2318 +Added line: 7825 +Added line: 646 +Added line: 1105 +Added line: 7474 +Added line: 4440 +Added line: 8076 +Added line: 3514 +Added line: 8922 +Added line: 3203 +Added line: 775 +Added line: 8057 +Added line: 2744 +Added line: 9200 +Added line: 559 +Added line: 2621 +Added line: 1818 +Added line: 8874 +Added line: 807 +Added line: 2148 +Added line: 9788 +Added line: 9234 +Added line: 5134 +Added line: 9059 +Added line: 9139 +Added line: 8776 +Added line: 6925 ## AvoidPrintStackTrace +Added line: 2655 Added line: 2007 +Added line: 8455 +Added line: 594 +Added line: 7799 +Added line: 4282 +Added line: 2465 +Added line: 7145 +Added line: 182 +Added line: 5973 +Added line: 9444 +Added line: 6063 +Added line: 9095 +Added line: 8616 +Added line: 3831 +Added line: 1072 +Added line: 4159 +Added line: 8974 +Added line: 7078 +Added line: 8361 +Added line: 484 +Added line: 4275 Added line: 7823 +Added line: 4443 Added line: 7549 +Added line: 6540 +Added line: 2385 +Added line: 7033 +Added line: 755 +Added line: 4303 +Added line: 2160 +Added line: 1531 +Added line: 9126 +Added line: 544 +Added line: 5830 +Added line: 3279 +Added line: 281 +Added line: 2555 +Added line: 2224 +Added line: 4152 +Added line: 2837 +Added line: 4712 +Added line: 1084 +Added line: 5327 +Added line: 2741 +Added line: 4439 +Added line: 6803 +Added line: 6245 +Added line: 5984 +Added line: 3903 +Added line: 5493 +Added line: 7773 +Added line: 2978 +Added line: 3683 +Added line: 1025 +Added line: 3342 +Added line: 211 +Added line: 7848 +Added line: 1524 +Added line: 1658 +Added line: 2675 +Added line: 3749 +Added line: 9605 +Added line: 7091 +Added line: 7503 Added line: 6613 diff --git a/pmd-doc/src/test/resources/ruletagchecker/docs/pages/ruletag-examples.md b/pmd-doc/src/test/resources/ruletagchecker/docs/pages/ruletag-examples.md index ca33c366c3..b7046c23b0 100644 --- a/pmd-doc/src/test/resources/ruletagchecker/docs/pages/ruletag-examples.md +++ b/pmd-doc/src/test/resources/ruletagchecker/docs/pages/ruletag-examples.md @@ -1,22 +1,111 @@ --- +Added line: 6994 title: Sample Page with rule tags +Added line: 1912 +Added line: 8953 +Added line: 3531 +Added line: 2961 +Added line: 3529 +Added line: 3202 +Added line: 7603 +Added line: 6014 +Added line: 8326 +Added line: 1412 permalink: rule_tag_samples.html +Added line: 1925 --- +Added line: 5077 +Added line: 8095 +Added line: 6681 +Added line: 8835 +Added line: 5912 +Added line: 7513 +Added line: 4770 This is a link to the rule AvoidPrintStackTrace: {% rule "java/bestpractices/AvoidPrintStackTrace" %}. +Added line: 9572 +Added line: 5164 This is a link to the rule AvoidPrintStackTrace without quotes: {% rule java/bestpractices/AvoidPrintStackTrace %}. +Added line: 6607 +Added line: 8245 +Added line: 6360 +Added line: 1049 +Added line: 8785 +Added line: 3678 +Added line: 9037 +Added line: 9404 +Added line: 9120 +Added line: 9300 +Added line: 7131 +Added line: 1401 +Added line: 7596 This is the same link, but the rule tag is not closed properly: {% rule "java/bestpractices/AvoidPrintStackTrace" %). - -Now this is link to a rule inside a category, which doesn't exist: +Added line: 9954 +Added line: 2252 +Added line: 2017 +Added line: 5078 +Added line: 1594 +Added line: 4573 +Added line: 3697 +Added line: 8998 +Added line: 2572 +Added line: 6589 +Added line: 2576 +Added line: 8522 +Added line: 2324 +Added line: 9868 +Added line: 361 +Added line: 399 +Added line: 3839 +Added line: 9171 +Added line: 6313 +Added line: 1858 +Added line: 9302 +Added line: 7973 +Added line: 4388 +Added line: 5724 +Added line: 2128 +Added line: 9125 +Added line: 1356 +Added line: 9973 +Added line: 2178 +Added line: 9709 +Added line: 9168 {% rule "java/notexistingcategory/AvoidPrintStackTrace" %}. - This is link to a rule, which doesn't exist: {% rule "java/bestpractices/NotExistingRule" %}. +Added line: 4931 This is a rule tag, which has only one quote: {% rule "java/bestpractices/OtherRule %}. +Added line: 8925 +Added line: 6614 +Added line: 2062 This is a rule tag, which has only one quote: {% rule java/bestpractices/OtherRule" %}. - -This is a rule tag, that references a rule in the same category: {% rule OtherRule %} (correct). +Added line: 8704 +Added line: 6069 +Added line: 8982 +Added line: 8799 +Added line: 3796 +Added line: 4062 +Added line: 9821 +Added line: 7031 +Added line: 5616 +Added line: 8480 This is a rule tag, that references a rule in the same category: {% rule "OtherRule" %} (correct). +Added line: 9163 +Added line: 7796 +Added line: 9120 +Added line: 1632 +Added line: 1982 +Added line: 2190 This is a rule tag, that references a rule in the same category: {% rule "OtherRule %} (missing quote). +Added line: 7847 +Added line: 3714 +Added line: 7277 This is a rule tag, that references a rule in the same category: {% rule OtherRule" %} (missing quote). +Added line: 8123 +Added line: 9130 +Added line: 9167 +Added line: 3980 +Added line: 230 +Added line: 2909 diff --git a/pmd-fortran/src/test/resources/net/sourceforge/pmd/lang/fortran/cpd/testdata/sample.txt b/pmd-fortran/src/test/resources/net/sourceforge/pmd/lang/fortran/cpd/testdata/sample.txt index d72661a6f0..3c40a67aa5 100644 --- a/pmd-fortran/src/test/resources/net/sourceforge/pmd/lang/fortran/cpd/testdata/sample.txt +++ b/pmd-fortran/src/test/resources/net/sourceforge/pmd/lang/fortran/cpd/testdata/sample.txt @@ -9,13 +9,13 @@ L2 L3 [implicit] 8 16 [none] 17 21 -L9 [character] 8 17 [*] 17 18 [60] 18 20 [COMMANDE] 21 29 L10 [integer] 8 15 +Added line: 2714 [*] 15 16 [4] 16 17 [IOS] 18 21 @@ -32,9 +32,11 @@ L13 [1] 8 9 [ERRONE] 18 24 [,] 24 25 +Added line: 457 L14 [1] 8 9 [CONF] 18 22 +Added line: 2324 [,] 22 23 L15 [1] 8 9 @@ -44,6 +46,7 @@ L16 [1] 8 9 [DEBUT_MOT] 18 27 [,] 27 28 +Added line: 4734 L17 [1] 8 9 [FIN_MOT] 18 25 @@ -77,6 +80,8 @@ L24 [PREMIERE_LETTRE] 18 33 [,] 33 34 L25 +Added line: 6184 +Added line: 5584 [1] 8 9 [DERNIERE_LETTRE] 18 33 [,] 33 34 @@ -86,7 +91,9 @@ L26 [,] 36 37 L27 [1] 8 9 +Added line: 7091 [APRES_MAJ] 18 27 +Added line: 7472 [,] 27 28 L28 [1] 8 9 @@ -95,6 +102,8 @@ L28 L29 [1] 8 9 [TAILLE_LIGNE] 18 30 +Added line: 6291 +Added line: 6765 [,] 30 31 L30 [1] 8 9 @@ -103,6 +112,7 @@ L32 [parameter] 8 17 [(] 17 18 [NB_MOTS_MAX] 18 29 +Added line: 8256 [=] 30 31 [9] 32 33 [)] 33 34 @@ -112,6 +122,7 @@ L34 [ERRONE] 18 24 [=] 25 26 [1] 27 28 +Added line: 4063 [)] 28 29 L35 [parameter] 8 17 @@ -121,6 +132,7 @@ L35 [-] 27 28 [1] 29 30 [)] 30 31 +Added line: 8065 L36 [parameter] 8 17 [(] 17 18 @@ -146,6 +158,7 @@ L39 [parameter] 8 17 [(] 17 18 [INTERVALLE_MAJ_MIN] 18 36 +Added line: 3253 [=] 37 38 [32] 39 41 [)] 41 42 @@ -157,6 +170,7 @@ L41 [96] 30 32 [)] 32 33 L42 +Added line: 3674 [parameter] 8 17 [(] 17 18 [TAILLE_COLONNE] 18 32 @@ -166,12 +180,15 @@ L42 L43 [parameter] 8 17 [(] 17 18 +Added line: 9072 [TAILLE_LIGNE] 18 30 +Added line: 2941 [=] 31 32 [12] 33 35 [)] 35 36 L44 [parameter] 8 17 +Added line: 1951 [(] 17 18 [LIGNES_DESC] 18 29 [=] 30 31 @@ -186,6 +203,7 @@ L46 [TAILLE_COLONNE] 24 38 [,] 38 39 [TAILLE_LIGNE] 39 51 +Added line: 4066 [)] 51 52 L47 [character] 8 17 @@ -226,6 +244,7 @@ L52 [,] 15 16 [*] 16 17 [)] 17 18 +Added line: 3871 [' | Bonjour, et bienvenue dan[ 19 80 L53 [write] 8 13 @@ -242,7 +261,9 @@ L54 [,] 15 16 [*] 16 17 [)] 17 18 +Added line: 6710 [' '] 19 22 +Added line: 823 L55 [write] 8 13 [(] 13 14 @@ -251,9 +272,11 @@ L55 [*] 16 17 [)] 17 18 [' '] 19 22 +Added line: 3964 L56 [write] 8 13 [(] 13 14 +Added line: 9451 [*] 14 15 [,] 15 16 [*] 16 17 @@ -267,16 +290,20 @@ L57 [*] 16 17 [)] 17 18 [' '] 19 22 +Added line: 2747 L58 [write] 8 13 [(] 13 14 [*] 14 15 +Added line: 7698 [,] 15 16 [*] 16 17 [)] 17 18 [' _ TASK pour creer une tache (e[ 19 84 L59 +Added line: 8566 [write] 8 13 +Added line: 4610 [(] 13 14 [*] 14 15 [,] 15 16 @@ -298,6 +325,7 @@ L61 [,] 15 16 [*] 16 17 [)] 17 18 +Added line: 4219 [' '] 19 22 L62 [write] 8 13 @@ -309,6 +337,7 @@ L62 [' _ REMOVE pour enlever une tach[ 19 77 L63 [write] 8 13 +Added line: 3966 [(] 13 14 Added line: 5213 [*] 14 15 @@ -317,7 +346,9 @@ Added line: 5213 [)] 17 18 [' '] 19 22 L64 +Added line: 3269 [write] 8 13 +Added line: 9923 [(] 13 14 [*] 14 15 [,] 15 16 @@ -335,18 +366,22 @@ L65 L66 [write] 8 13 [(] 13 14 +Added line: 5652 [*] 14 15 +Added line: 6431 [,] 15 16 [*] 16 17 [)] 17 18 [' _ CANCEL, DONE, TODO pour modi[ 19 100 L67 [write] 8 13 +Added line: 7095 [(] 13 14 [*] 14 15 [,] 15 16 [*] 16 17 [)] 17 18 +Added line: 2292 [' '] 19 22 L70 [do] 8 10 @@ -355,6 +390,7 @@ L70 [IOS] 18 21 [.] 22 23 [ne] 23 25 +Added line: 2932 [.] 25 26 [SORTIE] 27 33 [)] 33 34 @@ -389,7 +425,9 @@ L81 [MOTS_COMMANDE] 24 37 [(] 38 39 [COMPTEUR] 39 47 +Added line: 9870 [)] 47 48 +Added line: 2406 [=] 49 50 [' '] 51 54 L82 @@ -397,7 +435,6 @@ L82 [do] 20 22 L86 [call] 16 20 - [SAISIE] 21 27 [(] 27 28 [COMMANDE] 28 36 [,] 36 37 @@ -419,6 +456,7 @@ L91 [(] 49 50 [COMMANDE] 50 58 [)] 58 59 +Added line: 6688 L92 [COMPTEUR] 24 32 [=] 33 34 @@ -440,15 +478,19 @@ L93 [lt] 81 83 [.] 83 84 [NB_MOTS_MAX] 85 96 +Added line: 5127 [)] 96 97 L94 [=] 42 43 [POSITION_ESPACE] 44 59 [+] 60 61 +Added line: 9723 Added line: 6894 [1] 62 63 L97 +Added line: 2208 [POSITION_ESPACE] 32 47 +Added line: 8338 [POSITION_ESPACE] 50 65 [+] 66 67 [index] 68 73 @@ -457,6 +499,7 @@ L97 [(] 84 85 [DEBUT_MOT] 85 94 [:] 94 95 +Added line: 6894 [)] 95 96 [,] 96 97 [' '] 98 101 @@ -477,6 +520,7 @@ L101 [(] 68 69 [DEBUT_MOT] 69 78 [:] 79 80 +Added line: 9546 [FIN_MOT] 81 88 [)] 88 89 L104 @@ -487,14 +531,18 @@ L104 [COMPTEUR] 51 59 [)] 59 60 [.] 61 62 - [ne] 62 64 [.] 64 65 +Added line: 6346 [' '] 66 69 [)] 69 70 +Added line: 4193 [then] 71 75 +Added line: 1546 +Added line: 2811 L105 [NB_MOTS] 40 47 [=] 48 49 +Added line: 6045 [NB_MOTS] 50 57 [+] 58 59 [1] 60 61 @@ -510,6 +558,7 @@ L107 L108 [end] 24 27 [do] 28 30 +Added line: 2709 L112 [do] 24 26 [COMPTEUR] 27 35 @@ -518,7 +567,10 @@ L112 [,] 39 40 [NB_MOTS] 41 48 L113 +Added line: 4502 [do] 32 34 +Added line: 6502 +Added line: 4373 [NUM_CARACTERE] 35 48 [=] 49 50 [PREMIERE_LETTRE] 51 66 @@ -539,24 +591,29 @@ L114 [NUM_CARACTERE] 89 102 [)] 102 103 [)] 103 104 +Added line: 2638 L115 [1] 8 9 [.] 10 11 [gt] 11 13 [.] 13 14 +Added line: 3506 +Added line: 8584 [APRES_MAJ] 15 24 [)] 24 25 [then] 26 30 L116 - [MOTS_COMMANDE] 48 61 [(] 62 63 +Added line: 3316 +Added line: 9577 [COMPTEUR] 63 71 - [)] 71 72 +Added line: 2098 [(] 72 73 [NUM_CARACTERE] 73 86 [:] 86 87 [NUM_CARACTERE] 87 100 [)] 100 101 +Added line: 2704 [=] 102 103 L117 [1] 8 9 @@ -572,24 +629,30 @@ Added line: 3647 [(] 45 46 [NUM_CARACTERE] 46 59 [:] 59 60 - [NUM_CARACTERE] 60 73 +Added line: 2758 [)] 73 74 +Added line: 6826 [)] 74 75 [-] 76 77 [INTERVALLE_MAJ_MIN] 78 96 [)] 96 97 L118 [end] 40 43 +Added line: 3080 [if] 44 46 L119 [end] 32 35 +Added line: 3094 [do] 36 38 L120 +Added line: 8694 [end] 24 27 [do] 28 30 L133 [if] 24 26 +Added line: 9432 [(] 27 28 +Added line: 8382 [NB_MOTS] 28 35 [.] 36 37 [eq] 37 39 @@ -604,10 +667,12 @@ L134 [,] 39 40 [*] 40 41 [)] 41 42 +Added line: 1518 [' '] 43 46 L135 [write] 32 37 [(] 37 38 +Added line: 8341 [*] 38 39 [,] 39 40 [*] 40 41 @@ -616,6 +681,7 @@ L135 L136 [else] 24 28 L139 +Added line: 5216 [if] 32 34 [(] 35 36 [MOTS_COMMANDE] 36 49 @@ -633,11 +699,12 @@ L140 [call] 40 44 [TACHE] 45 50 [(] 50 51 +Added line: 7107 [MOTS_COMMANDE] 51 64 [,] 64 65 [DESC] 66 70 +Added line: 4873 [,] 70 71 - [N] 72 73 [)] 73 74 L141 [else] 32 36 @@ -645,18 +712,24 @@ L141 [(] 40 41 [MOTS_COMMANDE] 41 54 [(] 55 56 +Added line: 4579 [ACTION] 56 62 +Added line: 3952 [)] 62 63 [.] 64 65 [eq] 65 67 [.] 67 68 ['SHOW'] 69 75 +Added line: 6759 +Added line: 7128 [)] 75 76 [then] 77 81 L143 [call] 40 44 [SHOW] 45 49 [(] 49 50 +Added line: 1409 +Added line: 2435 [MOTS_COMMANDE] 50 63 [,] 63 64 [N] 65 66 @@ -675,23 +748,30 @@ L144 ['REMOVE'] 69 77 [)] 77 78 [then] 79 83 +Added line: 9711 +Added line: 9305 L146 [call] 40 44 [REMOVE] 45 51 [(] 51 52 [MOTS_COMMANDE] 52 65 +Added line: 4579 [,] 65 66 [DESC] 67 71 [,] 71 72 [N] 73 74 [)] 74 75 L147 +Added line: 134 [else] 32 36 +Added line: 542 [if] 37 39 [(] 40 41 [MOTS_COMMANDE] 41 54 [(] 55 56 +Added line: 9940 [ACTION] 56 62 +Added line: 5380 [)] 62 63 Added line: 8264 [.] 64 65 @@ -713,14 +793,15 @@ L150 [if] 37 39 [(] 40 41 [MOTS_COMMANDE] 41 54 +Added line: 118 [(] 55 56 +Added line: 6479 [ACTION] 56 62 [)] 62 63 [.] 64 65 [eq] 65 67 [.] 67 68 ['CANCEL'] 69 77 - [)] 77 78 [then] 79 83 L152 [call] 40 44 @@ -731,6 +812,7 @@ L152 [N] 67 68 [)] 68 69 L153 +Added line: 9237 [else] 32 36 [if] 37 39 [(] 40 41 @@ -739,6 +821,7 @@ L153 [ACTION] 56 62 [)] 62 63 [.] 64 65 +Added line: 46 [eq] 65 67 [.] 67 68 ['DONE'] 69 75 @@ -755,8 +838,10 @@ L155 L156 [else] 32 36 [if] 37 39 +Added line: 6519 [(] 40 41 [MOTS_COMMANDE] 41 54 +Added line: 4863 [(] 55 56 [ACTION] 56 62 [)] 62 63 @@ -771,6 +856,7 @@ L158 [TODO] 45 49 [(] 49 50 [MOTS_COMMANDE] 50 63 +Added line: 9344 [,] 63 64 [N] 65 66 [)] 66 67 @@ -792,6 +878,7 @@ L161 [*] 48 49 [)] 49 50 ['L'] 51 54 +Added line: 4764 ['action suivante n'] 54 73 ['a pas ete'] 73 84 [,] 84 85 @@ -802,10 +889,10 @@ L162 [MOTS_COMMANDE] 25 38 [(] 39 40 [ACTION] 40 46 +Added line: 7510 [)] 46 47 L163 [end] 32 35 - [if] 36 38 L164 [end] 24 27 [if] 28 30 @@ -817,4 +904,6 @@ L166 [do] 12 14 L167 [end] 8 11 +Added line: 3316 +Added line: 8628 EOF diff --git a/pmd-gherkin/src/test/resources/net/sourceforge/pmd/lang/gherkin/cpd/testdata/annotatedSource.txt b/pmd-gherkin/src/test/resources/net/sourceforge/pmd/lang/gherkin/cpd/testdata/annotatedSource.txt index cf05f81f6b..d447bef53e 100644 --- a/pmd-gherkin/src/test/resources/net/sourceforge/pmd/lang/gherkin/cpd/testdata/annotatedSource.txt +++ b/pmd-gherkin/src/test/resources/net/sourceforge/pmd/lang/gherkin/cpd/testdata/annotatedSource.txt @@ -2,15 +2,20 @@ L1 [@AnnotatedSource] 1 17 [\n] 18 19 +Added line: 883 +Added line: 8573 L2 +Added line: 3833 [Feature:] 1 9 [Annotated] 10 19 [Source] 20 26 [\n] 26 27 L3 [The] 3 6 +Added line: 447 [annotated] 7 16 [source] 17 23 +Added line: 1885 [displays] 24 32 [violations] 33 43 [in] 44 46 @@ -27,19 +32,23 @@ L3 L4 [\n] 3 4 L5 +Added line: 7251 [Rules:] 3 9 +Added line: 5009 [\n] 9 10 L6 [1] 3 4 [Annotation] 5 15 [metrics] 16 23 - [can] 24 27 +Added line: 5609 +Added line: 8649 [be] 28 30 [selected] 31 39 [with] 40 44 [a] 45 46 [dropdown] 47 55 [menu.] 56 61 +Added line: 9134 [Only] 62 66 [enabled] 67 74 [metrics] 75 82 @@ -51,6 +60,8 @@ L7 [2] 3 4 [When] 5 9 [the] 10 13 +Added line: 690 +Added line: 7054 [annotated] 14 23 [source] 24 30 [is] 31 33 @@ -65,13 +76,16 @@ L7 [that] 83 87 [metric] 88 94 [should] 95 101 +Added line: 690 [be] 102 104 [selected.] 105 114 [\n] 114 115 +Added line: 636 L8 [3] 3 4 [A] 5 6 [user] 7 11 +Added line: 1497 [can] 12 15 [scroll] 16 22 [through] 23 30 @@ -82,16 +96,18 @@ L8 [buttons] 56 63 [(illustrated] 64 76 [by] 77 79 +Added line: 3848 [up] 80 82 [and] 83 86 [down] 87 91 [arrows).] 92 100 [The] 101 104 [arrows] 105 111 - [wrap] 112 116 [around] 117 123 [the] 124 127 [document.] 128 137 +Added line: 9878 +Added line: 4832 [\n] 137 138 L9 [4] 3 4 @@ -100,6 +116,7 @@ L9 [collumn] 15 22 ["Type"] 23 29 [is] 30 32 +Added line: 8559 [only] 33 37 [shown] 38 43 [when] 44 48 @@ -110,6 +127,7 @@ L9 [\n] 78 79 L10 [\n] 1 2 +Added line: 3910 L11 [Scenario:] 3 12 [Select] 13 19 @@ -119,6 +137,7 @@ L11 [\n] 33 34 L12 [Given] 4 9 +Added line: 7121 [the] 10 13 [Annotated] 14 23 [Source] 24 30 @@ -135,21 +154,27 @@ L13 [dropdown] 27 35 [menu] 36 40 [containing] 41 51 +Added line: 8084 ["Metric:"] 52 61 [\n] 61 62 L14 [And] 6 9 [the] 10 13 [user] 14 18 +Added line: 5984 [clicks] 19 25 [on] 26 28 [the] 29 32 [dropdown] 33 41 [option] 42 48 +Added line: 7042 +Added line: 7771 ["Violations/Coding] 49 67 [Standard] 68 76 +Added line: 5008 [Violations"] 77 88 [\n] 88 89 +Added line: 93 L15 [Then] 5 9 [the] 10 13 @@ -173,6 +198,7 @@ L16 [in] 34 36 [the] 37 40 [table] 41 46 +Added line: 1313 [should] 47 53 [be] 54 56 [on] 57 59 @@ -190,11 +216,11 @@ L18 [the] 30 33 [arrows,] 34 41 [or] 42 44 +Added line: 3522 ["a"] 45 48 [and] 49 52 ["z"] 53 56 [keys,] 57 62 - [to] 63 65 [scroll] 66 72 [through] 73 80 [the] 81 84 @@ -204,6 +230,7 @@ L19 [Given] 3 8 [the] 9 12 [Annotated] 13 22 +Added line: 1124 [Source] 23 29 [for] 30 33 [file] 34 38 @@ -213,6 +240,7 @@ L20 [And] 5 8 [metric] 9 15 ["Coding] 16 23 +Added line: 2738 [Standard] 24 32 [Violation] 33 42 [Annotations"] 43 55 @@ -220,10 +248,12 @@ L20 [selected] 59 67 [\n] 67 68 L21 +Added line: 4520 [When] 4 8 [the] 9 12 [user] 13 17 [clicks] 18 24 +Added line: 4718 [on] 25 27 [the] 28 31 [down] 32 36 @@ -233,9 +263,11 @@ L22 [And] 5 8 [the] 9 12 [user] 13 17 +Added line: 2060 [presses] 18 25 [the] 26 29 ["Z"] 30 33 +Added line: 859 [key] 34 37 [\n] 37 38 L23 @@ -254,14 +286,17 @@ L24 [user] 13 17 [clicks] 18 24 [on] 25 27 +Added line: 5631 [the] 28 31 [up] 32 34 [arrow] 35 40 [\n] 40 41 L25 +Added line: 7191 [And] 5 8 [the] 9 12 [user] 13 17 +Added line: 6554 [presses] 18 25 [the] 26 29 ["A"] 30 33 @@ -271,6 +306,7 @@ L26 [Then] 4 8 [the] 9 12 [selected] 13 21 +Added line: 9674 [annotation] 22 32 [in] 33 35 [the] 36 39 @@ -285,11 +321,14 @@ L26 L27 [\n] 1 2 L28 +Added line: 5313 [@Rule2] 3 9 [\n] 9 10 L29 [Scenario Outline:] 3 20 +Added line: 436 [If] 21 23 +Added line: 2557 [the] 24 27 [user] 28 32 [opens] 33 38 @@ -297,6 +336,7 @@ L29 [annotated] 43 52 [source] 53 59 [from] 60 64 +Added line: 4660 [e.g.] 65 69 [the] 70 73 [dashboard] 74 83 @@ -305,6 +345,7 @@ L29 [metric,] 90 97 [\n] 97 98 L30 +Added line: 5908 [only] 5 9 [the] 10 13 [related] 14 21 @@ -315,6 +356,7 @@ L30 [\n] 50 51 L31 [Given] 3 8 +Added line: 7938 [the] 9 12 [Dashboard] 13 22 [\n] 22 23 @@ -340,17 +382,21 @@ L34 [\n] 38 39 L35 [When] 4 8 - [a] 9 10 [user] 11 15 [opens] 16 21 +Added line: 6061 [the] 22 25 [file] 26 30 +Added line: 432 ["clalgorithm_settings.c"] 31 55 [using] 56 61 +Added line: 7960 [the] 62 65 [metric] 66 72 [table] 73 78 +Added line: 2485 [\n] 78 79 +Added line: 4883 L36 [Then] 4 8 [a] 9 10 @@ -372,6 +418,7 @@ L37 [annotations] 18 29 ["<annotations>"] 30 45 [should] 46 52 +Added line: 779 [be] 53 55 [selected] 56 64 [\n] 64 65 @@ -380,9 +427,12 @@ L38 L39 [Examples:] 3 12 [\n] 12 13 -L40 +Added line: 6298 +Added line: 3427 +Added line: 2017 [| metric ] 3 32 [| annotations [ 32 72 +Added line: 3221 [|] 72 73 [\n] 73 74 L41 @@ -397,6 +447,7 @@ L42 [\n] 75 76 L43 [| TQI Compiler Warnings ] 3 32 +Added line: 7332 [| Compiler Warning Annotations [ 32 72 [|] 72 73 [\n] 75 76 @@ -408,10 +459,12 @@ L44 L45 [| TQI Dead Code ] 3 32 [| Dead Code Annotations [ 32 72 +Added line: 1856 [|] 72 73 [\n] 75 76 L46 [| TQI Code Duplication ] 3 32 +Added line: 9754 [| Code Duplication Annotations [ 32 72 [|] 72 73 [\n] 73 74 @@ -436,6 +489,7 @@ L49 [Given] 5 10 [the] 11 14 [Annotated] 15 24 +Added line: 5857 [Source] 25 31 [for] 32 35 [file] 36 40 @@ -448,14 +502,14 @@ L50 ["Coding] 22 29 [Standard] 30 38 [Violations"] 39 50 +Added line: 48 +Added line: 3502 [is] 51 53 [selected] 54 62 - [\n] 62 63 L51 [When] 5 9 [the] 11 14 [user] 15 19 - [opens] 20 25 [the] 26 29 [dropdown] 30 38 [menu] 39 43 @@ -463,8 +517,12 @@ L51 [\n] 51 52 L52 [And] 5 8 +Added line: 4064 +Added line: 6846 [the] 11 14 [user] 15 19 +Added line: 1482 +Added line: 3629 [clicks] 20 26 [on] 27 29 [the] 30 33 @@ -475,11 +533,13 @@ L52 L53 [Then] 5 9 [there] 11 16 +Added line: 4752 [should] 17 23 [be] 24 26 [1] 27 28 [violation] 29 38 [\n] 38 39 +Added line: 949 L54 [And] 5 8 [the] 11 14 @@ -490,8 +550,11 @@ L54 [source] 42 48 [code] 49 53 [should] 54 60 +Added line: 6187 [be] 61 63 +Added line: 3732 [on] 64 66 +Added line: 7635 [line] 67 71 [57] 72 74 [\n] 74 75 @@ -499,28 +562,35 @@ L55 [And] 5 8 [the] 11 14 [annotation] 15 25 +Added line: 3852 [should] 26 32 [be] 33 35 [of] 36 38 +Added line: 2711 [level] 39 44 [5] 45 46 [\n] 47 48 L56 [\n] 1 2 L57 +Added line: 4308 +Added line: 513 [@PR27030] 3 11 [\n] 11 12 -L58 [Scenario Outline:] 3 20 [The] 21 24 [user] 25 29 +Added line: 9183 [should] 30 36 [be] 37 39 [able] 40 44 +Added line: 8214 [to] 45 47 [filter] 48 54 [Coding] 55 61 +Added line: 6499 [Standard] 62 70 +Added line: 2793 [Violations] 71 81 [by] 82 84 [Level,] 85 91 @@ -537,6 +607,8 @@ L59 [file] 36 40 ["HIE://12939/main/Implementatie/DR[ 41 108 [\n] 108 109 +Added line: 5995 +Added line: 4765 L60 [And] 5 8 [metric] 9 15 @@ -551,19 +623,25 @@ L61 [opens] 19 24 [the] 25 28 [dropdown] 29 37 +Added line: 4421 [menu] 38 42 [containing] 43 53 ["<filter>"] 54 64 [inside] 65 71 +Added line: 2556 [the] 72 75 +Added line: 1551 +Added line: 2570 [filter] 76 82 [bar] 83 86 [\n] 86 87 L62 [And] 5 8 +Added line: 3610 [the] 9 12 [user] 13 17 [clicks] 18 24 +Added line: 7089 [on] 25 27 [the] 28 31 [dropdown] 32 40 @@ -578,6 +656,7 @@ L63 [<number>] 26 34 [violations] 35 45 [\n] 45 46 +Added line: 2308 L64 [\n] 5 6 L65 @@ -587,21 +666,26 @@ L66 [| metric ] 5 35 [| filter ] 35 51 [| option ] 51 65 +Added line: 1834 [| number ] 65 75 [|] 75 76 [\n] 76 77 +Added line: 370 L67 [| Coding Standard Violations ] 5 35 [| Level ] 35 51 [| 2 ] 51 65 [| 7 ] 65 75 +Added line: 5108 +Added line: 5438 [|] 75 76 [\n] 77 78 L68 [| Coding Standard Violations ] 5 35 +Added line: 8420 [| Category ] 35 51 - [| Comments ] 51 65 [| 1 ] 65 75 +Added line: 9996 [|] 75 76 [\n] 76 77 L69 @@ -615,7 +699,9 @@ L70 [| Coding Standard Violations ] 5 35 [| Suppressions ] 35 51 [| Yes ] 51 65 +Added line: 9671 [| 0 ] 65 75 +Added line: 7740 [|] 75 76 [\n] 76 77 L71 @@ -623,6 +709,7 @@ L71 [| Coverage Type ] 35 51 [| Decision ] 51 65 [| 7 ] 65 75 +Added line: 5638 [|] 75 76 [\n] 76 77 L72 @@ -630,8 +717,10 @@ L72 [| Kind ] 35 51 [| Issue ] 51 65 [| 10 ] 65 75 +Added line: 9388 [|] 75 76 [\n] 76 77 L73 [\n] 1 2 +Added line: 1555 EOF diff --git a/pmd-gherkin/src/test/resources/net/sourceforge/pmd/lang/gherkin/cpd/testdata/docstring.txt b/pmd-gherkin/src/test/resources/net/sourceforge/pmd/lang/gherkin/cpd/testdata/docstring.txt index 69bc047928..cea08077d1 100644 --- a/pmd-gherkin/src/test/resources/net/sourceforge/pmd/lang/gherkin/cpd/testdata/docstring.txt +++ b/pmd-gherkin/src/test/resources/net/sourceforge/pmd/lang/gherkin/cpd/testdata/docstring.txt @@ -1,17 +1,106 @@ -Added line: 2629 +Added line: 5671 +Added line: 885 +Added line: 1955 +Added line: 9482 +Added line: 4297 +Added line: 3446 +Added line: 5871 +Added line: 7471 +Added line: 4449 [Image] or [Truncated image[ Bcol Ecol +Added line: 8207 +Added line: 2279 Added line: 9528 +Added line: 9571 +Added line: 3393 +Added line: 492 +Added line: 6098 +Added line: 5013 Added line: 329 +Added line: 9677 +Added line: 5345 +Added line: 5999 Added line: 1536 L1 +Added line: 900 +Added line: 1390 +Added line: 4215 +Added line: 3204 +Added line: 1268 +Added line: 2201 +Added line: 3590 +Added line: 2495 +Added line: 8631 +Added line: 5094 +Added line: 7925 +Added line: 8573 +Added line: 7377 +Added line: 4169 +Added line: 8754 +Added line: 5742 [Given] 1 6 [I] 7 8 +Added line: 5420 +Added line: 7801 [have] 9 13 +Added line: 1104 +Added line: 9450 Added line: 3613 +Added line: 9797 [a] 14 15 +Added line: 1200 [lot] 16 19 +Added line: 5802 +Added line: 5277 +Added line: 1549 [say:] 23 27 +Added line: 5862 +Added line: 5274 +Added line: 8546 +Added line: 2271 +Added line: 9181 +Added line: 7629 [\n] 27 28 +Added line: 217 +Added line: 6191 +Added line: 7883 +Added line: 6656 +Added line: 6071 +Added line: 2475 +Added line: 9850 +Added line: 7720 +Added line: 4333 +Added line: 3515 +Added line: 2225 L2 - ["""\n One\n Two\n Three\n """] 1 5 +Added line: 3683 +Added line: 1120 +Added line: 4389 +Added line: 5610 +Added line: 8336 +Added line: 9708 +Added line: 7696 +Added line: 3579 +Added line: 6060 +Added line: 6499 +Added line: 7204 +Added line: 3769 +Added line: 9881 +Added line: 8973 EOF +Added line: 5338 +Added line: 3902 +Added line: 361 +Added line: 3511 +Added line: 6215 +Added line: 3686 +Added line: 8856 +Added line: 7408 +Added line: 688 +Added line: 1366 +Added line: 1184 +Added line: 7757 +Added line: 7169 +Added line: 6537 +Added line: 9553 +Added line: 9517 diff --git a/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/btrfs.txt b/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/btrfs.txt index 448ac2b977..4062222e25 100644 --- a/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/btrfs.txt +++ b/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/btrfs.txt @@ -2,6 +2,7 @@ L9 [package] 1 8 [btrfs] 9 14 +Added line: 6256 L21 [import] 1 7 ["C"] 8 11 @@ -17,11 +18,13 @@ L26 L27 ["os"] 2 6 L28 +Added line: 9316 ["path"] 2 8 L29 ["path/filepath"] 2 17 L30 ["strconv"] 2 11 +Added line: 2589 L31 ["strings"] 2 11 L32 @@ -48,6 +51,7 @@ L43 ["github.com/pkg/errors"] 2 25 L44 ["github.com/sirupsen/logrus"] 2 30 +Added line: 5717 L45 ["golang.org/x/sys/unix"] 2 25 L46 @@ -165,6 +169,7 @@ L71 L72 [return] 3 9 [nil] 10 13 +Added line: 5910 [,] 13 14 [err] 15 18 L73 @@ -176,7 +181,6 @@ L75 [graphdriver] 16 27 [.] 27 28 [FsMagicBtrfs] 28 40 - [{] 41 42 L76 [return] 3 9 [nil] 10 13 @@ -187,6 +191,7 @@ L76 L77 [}] 2 3 L79 +Added line: 1313 [rootUID] 2 9 [,] 9 10 [rootGID] 11 18 @@ -291,6 +296,7 @@ L97 [nil] 12 15 [{] 16 17 L98 +Added line: 2604 [return] 3 9 [nil] 10 13 [,] 13 14 @@ -310,7 +316,6 @@ L101 [driver] 2 8 [:=] 9 11 [&] 12 13 - [Driver] 13 19 [{] 19 20 L102 [home] 3 7 @@ -408,6 +413,7 @@ L120 [,] 7 8 [option] 9 15 [:=] 16 18 +Added line: 9747 [range] 19 24 [opt] 25 28 [{] 29 30 @@ -439,6 +445,7 @@ L123 [err] 35 38 L124 [}] 3 4 +Added line: 3057 L125 [key] 3 6 [=] 7 8 @@ -447,6 +454,7 @@ L125 [ToLower] 17 24 [(] 24 25 [key] 25 28 +Added line: 266 [)] 28 29 L126 [switch] 3 9 @@ -483,6 +491,8 @@ L130 L131 [}] 4 5 L132 +Added line: 7466 +Added line: 2949 [userDiskQuota] 4 17 [=] 18 19 [true] 20 24 @@ -504,6 +514,7 @@ L135 [,] 18 19 [userDiskQuota] 20 33 [,] 33 34 +Added line: 1299 [fmt] 35 38 [.] 38 39 [Errorf] 39 45 @@ -530,6 +541,7 @@ L142 [Driver] 6 12 [struct] 13 19 [{] 20 21 +Added line: 9493 L144 [home] 2 6 [string] 15 21 @@ -539,7 +551,6 @@ L145 [\]] 16 17 [idtools] 17 24 [.] 24 25 - [IDMap] 25 30 L146 [gidMaps] 2 9 [\[] 15 16 @@ -569,6 +580,7 @@ L153 [)] 16 17 [String] 18 24 [(] 24 25 +Added line: 7164 [)] 25 26 [string] 27 33 [{] 34 35 @@ -699,7 +711,6 @@ L172 [\]] 52 53 [string] 53 59 [,] 59 60 - [error] 61 66 [)] 66 67 [{] 68 69 L173 @@ -709,6 +720,7 @@ L173 [nil] 14 17 L174 [}] 1 2 +Added line: 7116 L177 [func] 1 5 [(] 6 7 @@ -744,6 +756,7 @@ L182 [if] 2 4 [err] 5 8 [!=] 9 11 +Added line: 8750 [nil] 12 15 [{] 16 17 L183 @@ -758,6 +771,7 @@ L186 [nil] 18 21 [{] 22 23 L187 +Added line: 9739 [return] 3 9 [errors] 10 16 [.] 16 17 @@ -853,6 +867,7 @@ L203 [return] 3 9 [nil] 10 13 [,] 13 14 +Added line: 419 [fmt] 15 18 [.] 18 19 [Errorf] 19 25 @@ -987,6 +1002,7 @@ L227 [\]] 14 15 [=] 16 17 [C] 18 19 +Added line: 7021 [.] 19 20 [char] 20 24 [(] 24 25 @@ -1005,6 +1021,7 @@ L230 [.] 21 22 [Syscall] 22 29 [(] 29 30 +Added line: 5151 [unix] 30 34 [.] 34 35 [SYS_IOCTL] 35 44 @@ -1044,6 +1061,7 @@ L233 [(] 20 21 ["Failed to create btrfs subvolume:[ 21 59 [,] 59 60 +Added line: 7906 [errno] 61 66 [.] 66 67 [Error] 67 72 @@ -1081,6 +1099,8 @@ L239 L240 [if] 2 4 [err] 5 8 +Added line: 5461 +Added line: 8288 [!=] 9 11 [nil] 12 15 [{] 16 17 @@ -1088,6 +1108,7 @@ L241 [return] 3 9 [err] 10 13 L242 +Added line: 5829 [}] 2 3 L243 [defer] 2 7 @@ -1104,6 +1125,7 @@ L245 [(] 25 26 [dest] 26 30 [)] 30 31 +Added line: 8994 L246 [if] 2 4 [err] 5 8 @@ -1146,6 +1168,7 @@ L254 [cs] 6 8 [=] 9 10 [C] 11 12 +Added line: 5907 [.] 12 13 [CString] 13 20 [(] 20 21 @@ -1171,6 +1194,7 @@ L256 [Pointer] 16 23 [(] 23 24 [cs] 24 26 +Added line: 2370 [)] 26 27 [)] 27 28 L258 @@ -1212,7 +1236,6 @@ L259 L260 [if] 2 4 [errno] 5 10 - [!=] 11 13 [0] 14 15 [{] 16 17 L261 @@ -1224,6 +1247,7 @@ L261 ["Failed to create btrfs snapshot: [ 21 58 [,] 58 59 [errno] 60 65 +Added line: 3658 [.] 65 66 [Error] 66 71 [(] 71 72 @@ -1268,6 +1292,7 @@ L268 [&] 26 27 [bufStat] 27 34 [)] 34 35 +Added line: 922 [;] 35 36 [err] 37 40 [!=] 41 43 @@ -1291,7 +1316,6 @@ L273 [BTRFS_FIRST_FREE_OBJECTID] 26 51 [,] 51 52 [nil] 53 56 -L274 [}] 1 2 L276 [func] 1 5 @@ -1311,6 +1335,7 @@ L277 [dir] 2 5 [,] 5 6 [err] 7 10 +Added line: 14 [:=] 11 13 [openDir] 14 21 [(] 21 22 @@ -1350,6 +1375,7 @@ L284 [C] 11 12 [.] 12 13 [struct_btrfs_ioctl_vol_args] 13 40 +Added line: 4505 L287 [walkSubvolumes] 2 16 [:=] 17 19 @@ -1395,6 +1421,7 @@ L293 L294 [return] 4 10 [fmt] 11 14 +Added line: 3575 [.] 14 15 [Errorf] 15 21 [(] 21 22 @@ -1415,6 +1442,7 @@ L298 [p] 19 20 [!=] 21 23 [fullPath] 24 32 +Added line: 2144 [{] 33 34 L299 [sv] 4 6 @@ -1431,9 +1459,11 @@ L300 [!=] 11 13 [nil] 14 17 [{] 18 19 +Added line: 7095 L301 [return] 5 11 [fmt] 12 15 +Added line: 4648 [.] 15 16 [Errorf] 16 22 [(] 22 23 @@ -1474,6 +1504,7 @@ L304 [err] 66 69 [!=] 70 72 [nil] 73 76 +Added line: 9117 [{] 77 78 L305 [return] 6 12 @@ -1482,7 +1513,6 @@ L305 [Errorf] 17 23 [(] 23 24 ["Failed to destroy btrfs child sub[ 24 89 - [,] 89 90 [p] 91 92 [,] 92 93 [dirpath] 94 101 @@ -1538,6 +1568,7 @@ L312 [)] 85 86 L313 [}] 2 3 +Added line: 8920 L315 [if] 2 4 [quotaEnabled] 5 17 @@ -1585,6 +1616,7 @@ L320 [.] 23 24 [Syscall] 24 31 [(] 31 32 +Added line: 9377 [unix] 32 36 [.] 36 37 [SYS_IOCTL] 37 46 @@ -1636,10 +1668,12 @@ L323 [,] 121 122 [errno] 123 128 [.] 128 129 +Added line: 8434 [Error] 129 134 [(] 134 135 [)] 135 136 [)] 136 137 +Added line: 5685 L324 [}] 4 5 L325 @@ -1652,8 +1686,10 @@ L326 [WithField] 11 20 [(] 20 21 ["storage-driver"] 21 37 +Added line: 4442 [,] 37 38 ["btrfs"] 39 46 +Added line: 3494 [)] 46 47 [.] 47 48 [Errorf] 48 54 @@ -1678,10 +1714,12 @@ L332 [,] 7 8 [c] 9 10 [:=] 11 13 +Added line: 5508 [range] 14 19 [\[] 20 21 [\]] 21 22 [byte] 22 26 +Added line: 8581 [(] 26 27 [name] 27 31 [)] 31 32 @@ -1897,6 +1935,7 @@ L370 [.] 6 7 [cmd] 7 10 [=] 11 12 +Added line: 2971 [C] 13 14 [.] 14 15 [BTRFS_QUOTA_CTL_ENABLE] 15 37 @@ -1973,17 +2012,20 @@ L380 [}] 1 2 L382 [func] 1 5 +Added line: 4641 [(] 6 7 [d] 7 8 [*] 9 10 [Driver] 10 16 [)] 16 17 [subvolDisableQuota] 18 36 +Added line: 6675 [(] 36 37 [)] 37 38 [error] 39 44 [{] 45 46 L383 +Added line: 4005 [d] 2 3 [.] 3 4 [updateQuotaStatus] 4 21 @@ -2034,6 +2076,7 @@ L395 [args] 6 10 [C] 11 12 [.] 12 13 +Added line: 2419 [struct_btrfs_ioctl_quota_ctl_args] 13 46 L396 [args] 2 6 @@ -2054,6 +2097,7 @@ L397 [.] 21 22 [Syscall] 22 29 [(] 29 30 +Added line: 187 [unix] 30 34 [.] 34 35 [SYS_IOCTL] 35 44 @@ -2063,6 +2107,7 @@ L397 [dir] 55 58 [)] 58 59 [,] 59 60 +Added line: 4665 [C] 61 62 [.] 62 63 [BTRFS_IOC_QUOTA_CTL] 63 82 @@ -2125,6 +2170,7 @@ L408 [(] 35 36 [)] 36 37 [error] 38 43 +Added line: 3209 [{] 44 45 L409 [d] 2 3 @@ -2144,12 +2190,14 @@ L412 [nil] 10 13 L413 [}] 2 3 +Added line: 3720 L415 [dir] 2 5 [,] 5 6 [err] 7 10 [:=] 11 13 [openDir] 14 21 +Added line: 7963 [(] 21 22 [d] 22 23 [.] 23 24 @@ -2220,6 +2268,7 @@ L424 [!=] 11 13 [0] 14 15 [{] 16 17 +Added line: 8898 L425 [return] 3 9 [fmt] 10 13 @@ -2279,6 +2328,8 @@ L436 [defer] 2 7 [closeDir] 8 16 [(] 16 17 +Added line: 7720 +Added line: 9427 [dir] 17 20 [)] 20 21 L438 @@ -2294,6 +2345,7 @@ L439 [.] 10 11 [max_referenced] 11 25 [=] 26 27 +Added line: 993 [C] 28 29 [.] 29 30 [__u64] 30 35 @@ -2388,6 +2440,7 @@ L455 [dir] 2 5 [,] 5 6 [err] 7 10 +Added line: 8751 [:=] 11 13 [openDir] 14 21 [(] 21 22 @@ -2427,6 +2480,7 @@ L462 [.] 22 23 [BTRFS_QUOTA_TREE_OBJECTID] 23 48 L463 +Added line: 6856 [args] 2 6 [.] 6 7 [key] 7 10 @@ -2564,6 +2618,7 @@ L475 [:=] 5 7 [(] 8 9 [*] 9 10 +Added line: 3751 [C] 10 11 [.] 11 12 [struct_btrfs_ioctl_search_header] 12 44 @@ -2628,6 +2683,7 @@ L483 [,] 5 6 [err] 7 10 Added line: 5408 +Added line: 5978 [:=] 11 13 [openDir] 14 21 [(] 21 22 @@ -2683,6 +2739,7 @@ L492 [,] 44 45 [getDirFd] 46 54 [(] 54 55 +Added line: 9323 [dir] 55 58 [)] 58 59 [,] 59 60 @@ -2695,7 +2752,6 @@ L493 [(] 10 11 [unsafe] 11 17 [.] 17 18 - [Pointer] 18 25 [(] 25 26 [&] 26 27 [args] 27 31 @@ -2708,6 +2764,7 @@ L494 [!=] 11 13 [0] 14 15 [{] 16 17 +Added line: 5970 L495 [return] 3 9 [0] 10 11 @@ -2744,6 +2801,7 @@ L498 [.] 16 17 [Errorf] 17 23 [(] 23 24 +Added line: 7829 ["Invalid qgroup id for %s: 0"] 24 53 [,] 53 54 [dir] 55 58 @@ -2813,6 +2871,7 @@ L509 [.] 20 21 [subvolumesDir] 21 34 [(] 34 35 +Added line: 3872 [)] 35 36 [,] 36 37 [id] 38 40 @@ -2876,6 +2935,7 @@ Added line: 3146 [)] 36 37 L518 [}] 1 2 +Added line: 7912 L522 [func] 1 5 [(] 6 7 @@ -2907,6 +2967,7 @@ L523 [id] 18 20 [,] 20 21 [parent] 22 28 +Added line: 3028 [,] 28 29 [opts] 30 34 [)] 34 35 @@ -2917,6 +2978,7 @@ L527 [(] 6 7 [d] 7 8 [*] 9 10 +Added line: 8561 [Driver] 10 16 [)] 16 17 [Create] 18 24 @@ -2932,6 +2994,7 @@ L527 [.] 61 62 [CreateOpts] 62 72 [)] 72 73 +Added line: 4256 [error] 74 79 [{] 80 81 L528 @@ -2962,6 +3025,7 @@ L529 [)] 46 47 L530 [rootUID] 2 9 +Added line: 1 [,] 9 10 [rootGID] 11 18 [,] 18 19 @@ -3020,6 +3084,7 @@ L534 [!=] 106 108 [nil] 109 112 [{] 113 114 +Added line: 82 L535 [return] 3 9 [err] 10 13 @@ -3087,6 +3152,7 @@ L545 L546 [}] 3 4 L547 +Added line: 4260 [if] 3 5 [!] 6 7 [st] 7 9 @@ -3096,6 +3162,7 @@ L547 [)] 16 17 [{] 18 19 L548 +Added line: 1283 [return] 4 10 [fmt] 11 14 [.] 14 15 @@ -3117,7 +3184,6 @@ L550 [,] 37 38 [subvolumes] 39 49 [,] 49 50 - [id] 51 53 [)] 53 54 [;] 54 55 [err] 56 59 @@ -3148,6 +3214,7 @@ L556 L557 [storageOpt] 3 13 [=] 14 15 +Added line: 8145 [opts] 16 20 [.] 20 21 [StorageOpt] 21 31 @@ -3164,6 +3231,7 @@ L560 ["size"] 25 31 [\]] 31 32 [;] 32 33 +Added line: 1537 [ok] 34 36 [{] 37 38 L561 @@ -3192,6 +3260,7 @@ L562 [{] 63 64 L563 [return] 4 10 +Added line: 1353 [err] 11 14 L564 [}] 3 4 @@ -3282,6 +3351,7 @@ L572 [byte] 55 59 [(] 59 60 [fmt] 60 63 +Added line: 3938 [.] 63 64 [Sprint] 64 70 [(] 70 71 @@ -3294,6 +3364,7 @@ L572 [)] 91 92 [,] 92 93 [0644] 94 98 +Added line: 2810 [)] 98 99 [;] 99 100 [err] 101 104 @@ -3353,6 +3424,7 @@ L583 L585 [mountLabel] 2 12 [:=] 13 15 +Added line: 4236 [""] 16 18 L586 [if] 2 4 @@ -3378,6 +3450,7 @@ L590 [.] 27 28 [Join] 28 32 [(] 32 33 +Added line: 8625 [subvolumes] 33 43 [,] 43 44 [id] 45 47 @@ -3443,6 +3516,7 @@ L600 [err] 10 13 [:=] 14 16 [units] 17 22 +Added line: 8089 [.] 22 23 [RAMInBytes] 23 33 [(] 33 34 @@ -3523,6 +3597,7 @@ L615 [{] 30 31 L616 [return] 3 9 +Added line: 8779 [fmt] 10 13 [.] 13 14 [Errorf] 14 20 @@ -3586,6 +3661,7 @@ L619 [options] 93 100 [.] 100 101 [minSpace] 101 109 +Added line: 3465 [)] 109 110 [)] 110 111 [)] 111 112 @@ -3601,6 +3677,7 @@ L621 [(] 31 32 [)] 32 33 [;] 33 34 +Added line: 6089 [err] 35 38 [!=] 39 41 [nil] 42 45 @@ -3608,6 +3685,7 @@ L621 L622 [return] 3 9 [err] 10 13 +Added line: 3431 L623 [}] 2 3 L624 @@ -3643,6 +3721,7 @@ L629 [:=] 6 8 [d] 9 10 [.] 10 11 +Added line: 6875 [subvolumesDirID] 11 26 [(] 26 27 [id] 27 29 @@ -3662,6 +3741,7 @@ L630 [;] 27 28 [err] 29 32 [!=] 33 35 +Added line: 4231 [nil] 36 39 [{] 40 41 L631 @@ -3717,11 +3797,14 @@ L637 [}] 3 4 L638 [}] 2 3 +Added line: 1851 [else] 4 8 [if] 9 11 +Added line: 1019 [!] 12 13 [os] 13 15 [.] 15 16 +Added line: 1490 [IsNotExist] 16 26 [(] 26 27 [err] 27 30 @@ -3781,6 +3864,7 @@ L648 [!=] 45 47 [nil] 48 51 [{] 52 53 +Added line: 7191 L649 [return] 3 9 [err] 10 13 @@ -3788,6 +3872,7 @@ L650 [}] 2 3 L651 [return] 2 8 +Added line: 9571 [d] 9 10 [.] 10 11 [subvolRescanQuota] 11 28 @@ -3896,6 +3981,7 @@ L666 [nil] 62 65 [{] 66 67 L667 +Added line: 8123 [if] 3 5 [size] 6 10 [,] 10 11 @@ -3960,6 +4046,7 @@ L671 [)] 41 42 [;] 42 43 [err] 44 47 +Added line: 7574 [!=] 48 50 [nil] 51 54 [{] 55 56 @@ -4041,7 +4128,9 @@ L690 [)] 23 24 L691 [return] 2 8 +Added line: 3200 [err] 9 12 +Added line: 8350 [==] 13 15 [nil] 16 19 L692 diff --git a/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/hello.txt b/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/hello.txt index 2eb70bf345..ebd341a4e0 100644 --- a/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/hello.txt +++ b/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/hello.txt @@ -1,33 +1,122 @@ +Added line: 1272 +Added line: 3327 [Image] or [Truncated image[ Bcol Ecol +Added line: 4989 +Added line: 4158 +Added line: 6863 +Added line: 7981 +Added line: 25 +Added line: 4137 +Added line: 9330 +Added line: 453 Added line: 6244 L21 [import] 1 7 - [(] 8 9 +Added line: 6174 +Added line: 6460 L22 ["fmt"] 2 7 L24 +Added line: 4234 +Added line: 6610 +Added line: 346 +Added line: 4906 +Added line: 1756 L25 [)] 1 2 +Added line: 3491 +Added line: 5077 +Added line: 4730 +Added line: 5146 L27 +Added line: 1241 +Added line: 7777 +Added line: 3295 [func] 1 5 +Added line: 8546 +Added line: 5208 +Added line: 4457 +Added line: 3526 +Added line: 8757 +Added line: 5140 +Added line: 8813 +Added line: 7605 +Added line: 4009 +Added line: 7889 Added line: 8857 [main] 6 10 - [(] 10 11 +Added line: 9995 +Added line: 832 +Added line: 7255 +Added line: 2589 [)] 11 12 +Added line: 2630 +Added line: 2895 +Added line: 7657 +Added line: 8664 +Added line: 7721 +Added line: 9008 [{] 13 14 +Added line: 6884 +Added line: 8944 +Added line: 6312 +Added line: 794 L28 +Added line: 356 +Added line: 3156 +Added line: 7099 +Added line: 1494 +Added line: 9753 +Added line: 106 [fmt] 2 5 +Added line: 6218 +Added line: 3970 +Added line: 4763 [.] 5 6 [Println] 6 13 -Added line: 302 +Added line: 21 +Added line: 2360 +Added line: 3665 +Added line: 5555 +Added line: 1874 +Added line: 6965 +Added line: 761 +Added line: 5638 +Added line: 8917 [(] 13 14 +Added line: 2256 +Added line: 1282 +Added line: 8005 +Added line: 4548 +Added line: 2203 [stringutil] 14 24 +Added line: 9052 +Added line: 4140 [.] 24 25 - [Reverse] 25 32 +Added line: 515 +Added line: 5256 +Added line: 1422 +Added line: 6603 +Added line: 71 +Added line: 103 +Added line: 183 +Added line: 1323 +Added line: 9615 +Added line: 7120 +Added line: 8301 [(] 32 33 ["!selpmaxe oG ,olleH"] 33 54 +Added line: 9010 +Added line: 3683 +Added line: 2543 [)] 54 55 +Added line: 4086 +Added line: 9458 [)] 55 56 +Added line: 9128 Added line: 2702 - [}] 1 2 +Added line: 7879 +Added line: 4399 +Added line: 5930 +Added line: 7816 EOF diff --git a/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/issue-1751.txt b/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/issue-1751.txt index 8677940263..499ba47851 100644 --- a/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/issue-1751.txt +++ b/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/issue-1751.txt @@ -1,86 +1,175 @@ +Added line: 2414 +Added line: 7983 +Added line: 6266 +Added line: 9584 +Added line: 6991 [Image] or [Truncated image[ Bcol Ecol Added line: 8396 L1 [func] 1 5 +Added line: 9592 +Added line: 8080 +Added line: 1968 +Added line: 6524 +Added line: 9252 [test] 6 10 [(] 10 11 +Added line: 440 +Added line: 7266 [in] 11 13 +Added line: 7481 +Added line: 2834 +Added line: 1433 [*] 14 15 [Value] 15 20 [,] 20 21 [param] 22 27 +Added line: 9701 +Added line: 4293 +Added line: 7834 [*] 28 29 [Value] 29 34 +Added line: 5109 +Added line: 1555 [)] 34 35 [(] 36 37 +Added line: 4659 +Added line: 6072 [*] 37 38 [Value] 38 43 [,] 43 44 +Added line: 1748 +Added line: 3409 +Added line: 9412 +Added line: 6822 +Added line: 8866 [*] 45 46 +Added line: 7084 [Error] 46 51 [)] 51 52 [{] 53 54 L2 +Added line: 6442 [output] 2 8 [:=] 9 11 +Added line: 6094 +Added line: 2314 [strings] 12 19 Added line: 7040 [.] 19 20 [Replace] 20 27 +Added line: 2602 [in] 28 30 [.] 30 31 +Added line: 2593 +Added line: 787 [(] 37 38 - [)] 38 39 +Added line: 5915 +Added line: 9975 +Added line: 3765 [,] 39 40 ["\\\\"] 41 45 [,] 45 46 +Added line: 5906 +Added line: 7195 +Added line: 5359 ["\\\\\\\\"] 47 53 [,] 53 54 +Added line: 7286 +Added line: 2402 +Added line: 110 [-] 55 56 [1] 56 57 [)] 57 58 +Added line: 100 +Added line: 5455 +Added line: 8911 L3 +Added line: 660 +Added line: 1493 +Added line: 1545 +Added line: 7307 [output] 2 8 +Added line: 8452 [=] 9 10 +Added line: 7412 [strings] 11 18 [.] 18 19 Added line: 4576 [(] 26 27 [output] 27 33 +Added line: 2573 +Added line: 3722 +Added line: 2220 [,] 33 34 ["\\""] 35 39 +Added line: 7276 [,] 39 40 +Added line: 324 +Added line: 4153 ["\\\\\\""] 41 47 [,] 47 48 +Added line: 2920 +Added line: 3900 [-] 49 50 [1] 50 51 - [)] 51 52 +Added line: 1803 L4 +Added line: 132 [output] 2 8 [=] 9 10 [strings] 11 18 [.] 18 19 +Added line: 7329 +Added line: 2718 +Added line: 5967 +Added line: 1470 +Added line: 7864 [Replace] 19 26 +Added line: 6687 +Added line: 4613 [(] 26 27 +Added line: 1361 [output] 27 33 +Added line: 5730 [,] 33 34 +Added line: 1119 +Added line: 6317 ["'"] 35 38 [,] 38 39 ["\\\\'"] 40 45 +Added line: 1378 [,] 45 46 +Added line: 3397 [-] 47 48 - [1] 48 49 +Added line: 1951 +Added line: 9688 [)] 49 50 +Added line: 7111 L5 [return] 2 8 [AsValue] 9 16 +Added line: 3375 +Added line: 159 +Added line: 8607 [(] 16 17 [output] 17 23 +Added line: 4232 [)] 23 24 +Added line: 6503 Added line: 200 +Added line: 2947 +Added line: 7906 [,] 24 25 [nil] 26 29 +Added line: 6808 +Added line: 4349 L6 +Added line: 9813 Added line: 9493 +Added line: 916 +Added line: 192 +Added line: 8507 [}] 1 2 EOF +Added line: 3328 diff --git a/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/sample_unicode.txt b/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/sample_unicode.txt index ecc27507ff..d0c042376a 100644 --- a/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/sample_unicode.txt +++ b/pmd-go/src/test/resources/net/sourceforge/pmd/lang/go/cpd/testdata/sample_unicode.txt @@ -1,41 +1,82 @@ +Added line: 7247 +Added line: 4590 +Added line: 1500 +Added line: 4916 [Image] or [Truncated image[ Bcol Ecol L1 +Added line: 7235 +Added line: 4829 +Added line: 1241 +Added line: 2776 [func] 1 5 [main] 6 10 +Added line: 7259 [(] 10 11 [)] 11 12 +Added line: 6574 +Added line: 8879 [{] 13 14 +Added line: 7641 L3 [str] 2 5 +Added line: 5647 +Added line: 272 [:=] 6 8 +Added line: 1731 ["hello world"] 9 22 +Added line: 3734 L4 +Added line: 592 +Added line: 5491 [slice] 2 7 [:=] 8 10 - [str] 11 14 +Added line: 5106 +Added line: 2514 [\[] 14 15 +Added line: 4903 +Added line: 2298 +Added line: 8426 [4] 15 16 +Added line: 7059 [:] 16 17 [\]] 17 18 L5 +Added line: 9219 [fmt] 2 5 +Added line: 9991 [.] 5 6 [Println] 6 13 +Added line: 1352 +Added line: 1039 [(] 13 14 +Added line: 9253 [slice] 14 19 +Added line: 5007 [)] 19 20 +Added line: 5772 L9 +Added line: 6615 [bytes] 2 7 [:=] 8 10 +Added line: 8417 +Added line: 8464 +Added line: 8106 [\[] 11 12 [\]] 12 13 +Added line: 971 +Added line: 4145 [byte] 13 17 +Added line: 4796 [(] 17 18 [str] 18 21 [)] 21 22 L10 [bytes] 2 7 +Added line: 6378 +Added line: 225 +Added line: 9468 [\[] 7 8 +Added line: 9314 [2] 8 9 [\]] 9 10 [=] 11 12 @@ -43,47 +84,95 @@ L10 L11 [str] 2 5 [=] 6 7 +Added line: 353 +Added line: 1644 +Added line: 9094 [string] 8 14 +Added line: 9924 +Added line: 5116 [(] 14 15 [bytes] 15 20 +Added line: 2060 [)] 20 21 L12 +Added line: 2708 [fmt] 2 5 +Added line: 2288 +Added line: 2971 +Added line: 5697 +Added line: 335 +Added line: 3230 [.] 5 6 [Println] 6 13 [(] 13 14 +Added line: 150 [str] 14 17 - [)] 17 18 +Added line: 1409 L15 +Added line: 381 +Added line: 6177 [runes] 2 7 [:=] 8 10 +Added line: 8106 +Added line: 9259 +Added line: 1677 +Added line: 4439 [\[] 11 12 +Added line: 4363 [\]] 12 13 [rune] 13 17 - [(] 17 18 +Added line: 7760 +Added line: 6279 +Added line: 5819 [str] 18 21 [)] 21 22 +Added line: 4910 +Added line: 3503 +Added line: 1233 L16 [runes] 2 7 [\[] 7 8 [0] 8 9 [\]] 9 10 +Added line: 4366 +Added line: 2647 [=] 11 12 ['哈'] 13 16 +Added line: 7458 +Added line: 7276 L17 [str] 2 5 +Added line: 5685 +Added line: 6678 [=] 6 7 +Added line: 4923 [string] 8 14 +Added line: 1001 [(] 14 15 +Added line: 7181 [runes] 15 20 [)] 20 21 +Added line: 3995 +Added line: 8232 L18 [fmt] 2 5 - [.] 5 6 [Println] 6 13 +Added line: 796 +Added line: 9365 [(] 13 14 [str] 14 17 +Added line: 8914 +Added line: 1500 +Added line: 7041 [)] 17 18 L20 +Added line: 3247 +Added line: 7188 +Added line: 189 +Added line: 6228 [}] 1 2 +Added line: 3137 +Added line: 2587 EOF +Added line: 761 +Added line: 8412 diff --git a/pmd-groovy/src/test/resources/net/sourceforge/pmd/lang/groovy/cpd/testdata/cpdoff.txt b/pmd-groovy/src/test/resources/net/sourceforge/pmd/lang/groovy/cpd/testdata/cpdoff.txt index 3eddf282e4..0728f20a62 100644 --- a/pmd-groovy/src/test/resources/net/sourceforge/pmd/lang/groovy/cpd/testdata/cpdoff.txt +++ b/pmd-groovy/src/test/resources/net/sourceforge/pmd/lang/groovy/cpd/testdata/cpdoff.txt @@ -1,19 +1,24 @@ +Added line: 2724 [Image] or [Truncated image[ Bcol Ecol L1 [// Copied from https://github.com/[ 1 49 [\n] 49 50 +Added line: 4846 L2 [net] 9 12 [.] 12 13 [sourceforge] 13 24 [.] 24 25 [pmd] 25 28 +Added line: 691 +Added line: 6145 [.] 28 29 [cpd] 29 32 [\n] 32 33 +Added line: 9898 L3 [/**\n * User: Eric\n * Date: 4/30/[ 1 4 -L6 +Added line: 2468 [\n] 4 5 L7 [class] 1 6 @@ -24,7 +29,9 @@ L7 [V] 16 17 [>] 17 18 [extends] 19 26 +Added line: 6825 [BTreeNode] 27 36 +Added line: 2389 [<] 36 37 [K] 37 38 [>] 38 39 @@ -40,17 +47,25 @@ L9 L10 [\n] 1 2 L11 +Added line: 3962 +Added line: 1660 +Added line: 9879 [BlockManager] 2 14 [<] 14 15 [V] 15 16 [>] 16 17 +Added line: 1925 [manager] 18 25 [\n] 25 26 L12 [\n] 1 2 L13 +Added line: 1823 +Added line: 2064 [BTree] 2 7 +Added line: 9093 [(] 7 8 +Added line: 5794 [)] 8 9 [{] 10 11 [\n] 11 12 @@ -58,58 +73,82 @@ L14 [instance] 3 11 [=] 12 13 [this] 14 18 +Added line: 1307 +Added line: 5146 [\n] 18 19 L15 [getLeaf] 3 10 [(] 10 11 [this] 11 15 +Added line: 1911 [)] 15 16 [\n] 16 17 L16 [manager] 3 10 +Added line: 3462 [=] 11 12 [new] 13 16 [BlockManager] 17 29 [<] 29 30 [>] 30 31 [(] 31 32 +Added line: 7843 [)] 32 33 [\n] 33 34 +Added line: 4409 +Added line: 3876 L17 +Added line: 7045 [}] 2 3 [\n] 3 4 L18 - [\n] 1 2 +Added line: 7391 +Added line: 2101 +Added line: 636 +Added line: 8684 +Added line: 5478 L19 [// CPD-OFF] 2 12 L57 [\n] 11 12 +Added line: 3371 L58 +Added line: 2635 +Added line: 2794 [\n] 1 2 L59 +Added line: 8477 [def] 2 5 [add] 6 9 +Added line: 2002 +Added line: 2942 [(] 9 10 [K] 10 11 [key] 12 15 - [,] 15 16 +Added line: 1882 [V] 17 18 [value] 19 24 [)] 24 25 - [{] 26 27 +Added line: 1576 +Added line: 9002 [\n] 27 28 -L60 +Added line: 9044 [\n] 1 2 L61 [if] 3 5 +Added line: 3924 +Added line: 1510 [(] 6 7 [count] 7 12 +Added line: 6790 [>] 13 14 - [0] 15 16 +Added line: 7397 [&&] 17 19 [search] 20 26 +Added line: 2609 [(] 26 27 [key] 27 30 +Added line: 7591 [)] 30 31 [)] 31 32 [{] 33 34 @@ -120,16 +159,22 @@ L62 [IllegalArgumentException] 14 38 [(] 38 39 ["$] 39 41 +Added line: 18 +Added line: 6358 +Added line: 4819 [key] 41 44 [is already in the tree"] 45 68 +Added line: 6867 [)] 68 69 [\n] 69 70 -L63 +Added line: 7484 [}] 3 4 [\n] 4 5 L64 [\n] 1 2 +Added line: 3571 L65 +Added line: 4250 [BlockManager] 3 15 [.] 15 16 [Block] 16 21 @@ -137,34 +182,55 @@ L65 [BlockElement] 22 34 [<] 34 35 [V] 35 36 +Added line: 5446 +Added line: 1426 [>] 36 37 [element] 38 45 +Added line: 4156 [=] 46 47 +Added line: 1475 [manager] 48 55 +Added line: 2523 [.] 55 56 [element] 56 63 [\n] 63 64 +Added line: 4266 L66 [element] 3 10 [.] 10 11 [value] 11 16 +Added line: 2087 [=] 17 18 +Added line: 6526 [value] 19 24 +Added line: 3701 [\n] 24 25 L67 +Added line: 97 +Added line: 3039 [\n] 1 2 L68 +Added line: 2314 [super] 3 8 [.] 8 9 [add] 9 12 +Added line: 2145 +Added line: 4490 [key] 13 16 [,] 16 17 [element] 18 25 [\n] 25 26 +Added line: 6640 L69 [}] 2 3 +Added line: 6890 +Added line: 1312 [\n] 3 4 +Added line: 9790 +Added line: 9836 L70 +Added line: 916 +Added line: 6232 [\n] 1 2 L71 [def] 2 5 @@ -172,12 +238,16 @@ L71 [(] 12 13 [K] 13 14 [key] 15 18 +Added line: 8187 +Added line: 4639 +Added line: 9541 [)] 18 19 [{] 20 21 +Added line: 4488 [\n] 21 22 -L72 L73 [if] 3 5 +Added line: 2921 [(] 6 7 [count] 7 12 [>] 13 14 @@ -188,17 +258,25 @@ L73 [(] 27 28 [key] 28 31 [)] 31 32 +Added line: 5302 +Added line: 7247 +Added line: 9770 [)] 32 33 +Added line: 7228 [{] 34 35 [\n] 35 36 -L74 +Added line: 9139 +Added line: 8892 [throw] 4 9 [new] 10 13 [IllegalArgumentException] 14 38 [(] 38 39 ["$] 39 41 [key] 41 44 +Added line: 7686 [is not in the tree"] 45 64 +Added line: 3188 +Added line: 2253 [)] 64 65 [\n] 65 66 L75 @@ -207,22 +285,29 @@ Added line: 1632 [\n] 4 5 L76 Added line: 2718 +Added line: 7415 [\n] 1 2 +Added line: 282 L77 [super] 3 8 [.] 8 9 [delete] 9 15 [key] 16 19 Added line: 208 - [\n] 19 20 +Added line: 8865 +Added line: 1065 L78 +Added line: 7655 [\n] 1 2 L79 [if] 3 5 [(] 6 7 Added line: 2800 +Added line: 8021 +Added line: 106 [count] 7 12 [==] 13 15 +Added line: 1410 [0] 16 17 [{] 19 20 [\n] 20 21 @@ -233,13 +318,17 @@ L80 [)] 16 17 [\n] 17 18 L81 +Added line: 941 [}] 3 4 [\n] 4 5 +Added line: 5177 Added line: 1245 L82 [}] 2 3 [\n] 3 4 L83 +Added line: 3565 +Added line: 7909 [}] 1 2 [\n] 2 3 EOF diff --git a/pmd-groovy/src/test/resources/net/sourceforge/pmd/lang/groovy/cpd/testdata/sample.txt b/pmd-groovy/src/test/resources/net/sourceforge/pmd/lang/groovy/cpd/testdata/sample.txt index 2bc2b66f3d..235049b547 100644 --- a/pmd-groovy/src/test/resources/net/sourceforge/pmd/lang/groovy/cpd/testdata/sample.txt +++ b/pmd-groovy/src/test/resources/net/sourceforge/pmd/lang/groovy/cpd/testdata/sample.txt @@ -1,5 +1,6 @@ [Image] or [Truncated image[ Bcol Ecol L1 +Added line: 5149 [// Copied from https://github.com/[ 1 49 [\n] 49 50 L2 @@ -12,14 +13,14 @@ L2 [.] 28 29 [cpd] 29 32 [\n] 32 33 +Added line: 9058 L3 [/**\n * User: Eric\n * Date: 4/30/[ 1 4 L6 [\n] 4 5 -L7 [class] 1 6 [BTree] 7 12 - [<] 12 13 +Added line: 548 [K] 13 14 [,] 14 15 [V] 16 17 @@ -30,16 +31,20 @@ L7 [K] 37 38 [>] 38 39 [{] 40 41 +Added line: 8455 [\n] 41 42 L8 [\n] 1 2 L9 +Added line: 8795 [static] 2 8 [def] 9 12 [instance] 13 21 +Added line: 2063 [\n] 21 22 L10 [\n] 1 2 +Added line: 1038 L11 [BlockManager] 2 14 [<] 14 15 @@ -49,11 +54,14 @@ L11 [\n] 25 26 L12 [\n] 1 2 +Added line: 5524 L13 [BTree] 2 7 [(] 7 8 +Added line: 4038 [)] 8 9 [{] 10 11 +Added line: 8661 [\n] 11 12 L14 [instance] 3 11 @@ -61,7 +69,6 @@ L14 [this] 14 18 [\n] 18 19 L15 - [getLeaf] 3 10 [(] 10 11 [this] 11 15 [)] 15 16 @@ -73,8 +80,8 @@ L16 [BlockManager] 17 29 [<] 29 30 [>] 30 31 - [(] 31 32 [)] 32 33 +Added line: 6751 [\n] 33 34 L17 [}] 2 3 @@ -101,16 +108,23 @@ L22 [left] 16 20 [=] 21 22 [clone] 23 28 +Added line: 1002 [(] 28 29 [)] 29 30 [\n] 30 31 +Added line: 9390 +Added line: 7566 L23 [BTreeNode] 3 12 [<] 12 13 [K] 13 14 [>] 14 15 [right] 16 21 +Added line: 8166 +Added line: 4690 +Added line: 2069 [=] 22 23 +Added line: 3963 [clone] 24 29 [(] 29 30 [)] 30 31 @@ -120,8 +134,10 @@ L24 L25 [// assign parent to this] 3 27 [\n] 27 28 +Added line: 3570 L26 [\[] 3 4 +Added line: 6119 [left] 4 8 [,] 8 9 [right] 10 15 @@ -130,25 +146,35 @@ L26 [parent] 18 24 [=] 25 26 [this] 27 31 +Added line: 2272 +Added line: 1876 [\n] 31 32 L27 [\n] 1 2 -L28 +Added line: 2569 [// Assign the left and right point[ 3 45 [\n] 45 46 L29 [left] 3 7 +Added line: 3766 [.] 7 8 [pointers] 8 16 [=] 17 18 [pointers] 19 27 +Added line: 9448 +Added line: 4837 +Added line: 9367 +Added line: 2224 [.] 27 28 +Added line: 6281 [subList] 28 35 [(] 35 36 [0] 36 37 +Added line: 398 [,] 37 38 [count] 39 44 [/] 45 46 +Added line: 5236 [2] 47 48 [as] 49 51 [int] 52 55 @@ -156,6 +182,7 @@ L29 [as] 57 59 [LinkedList] 60 70 [\n] 70 71 +Added line: 9761 L30 [right] 3 8 [.] 8 9 @@ -164,7 +191,9 @@ L30 [pointers] 20 28 [.] 28 29 [subList] 29 36 +Added line: 8422 [(] 36 37 +Added line: 3266 [count] 37 42 [/] 43 44 [2] 45 46 @@ -177,44 +206,61 @@ L30 [LinkedList] 65 75 [\n] 75 76 L31 +Added line: 5370 [\n] 1 2 L32 +Added line: 7933 +Added line: 9040 [// clear the rightmost left key] 3 34 [\n] 34 35 L33 +Added line: 4450 [if] 3 5 [(] 6 7 [left] 7 11 [.] 11 12 [internalNode] 12 24 [)] 24 25 +Added line: 3291 [{] 26 27 [\n] 27 28 L34 [left] 4 8 +Added line: 9715 [.] 8 9 +Added line: 2654 [pointers] 9 17 - [\[] 17 18 [-] 18 19 +Added line: 8492 +Added line: 3863 [1] 19 20 [\]] 20 21 [.] 21 22 [key] 22 25 +Added line: 1652 [=] 26 27 [null] 28 32 [\n] 32 33 L35 +Added line: 8411 [}] 3 4 [\n] 4 5 +Added line: 441 +Added line: 2446 L36 [else] 3 7 +Added line: 3055 [{] 8 9 +Added line: 9794 [\n] 9 10 L37 [left] 4 8 [.] 8 9 +Added line: 6684 +Added line: 6215 [rightSibling] 9 21 [=] 22 23 +Added line: 3286 [right] 24 29 [\n] 29 30 L38 @@ -224,14 +270,17 @@ L38 [=] 22 23 [left] 24 28 [\n] 28 29 +Added line: 1481 L39 [}] 3 4 +Added line: 2027 [\n] 4 5 L40 [\n] 1 2 L41 [// reassign the parent node if not[ 3 45 [\n] 45 46 +Added line: 9881 L42 [if] 3 5 [(] 6 7 @@ -242,21 +291,26 @@ L42 [\n] 21 22 L43 [\[] 4 5 +Added line: 7220 [left] 5 9 [,] 9 10 [right] 11 16 +Added line: 6752 [\]] 16 17 [.] 17 18 [each] 18 22 [{] 23 24 +Added line: 7559 [node] 25 29 [->] 30 32 +Added line: 2407 [node] 33 37 [.] 37 38 [pointers] 38 46 [*.] 46 48 [value] 48 53 [*.] 53 55 +Added line: 9523 [parent] 55 61 [=] 62 63 [node] 64 68 @@ -267,6 +321,7 @@ L44 [\n] 4 5 L45 [\n] 1 2 +Added line: 2383 L46 [// add the children to this] 3 30 [\n] 30 31 @@ -277,10 +332,13 @@ L47 [(] 17 18 [)] 18 19 [\n] 19 20 +Added line: 6655 L48 [addDirect] 3 12 +Added line: 7929 [(] 12 13 [new] 13 16 +Added line: 3722 [BTreeEntry] 17 27 [(] 27 28 [right] 28 33 @@ -288,11 +346,13 @@ L48 [smallestKey] 34 45 [,] 45 46 [left] 47 51 +Added line: 5894 [)] 51 52 [)] 52 53 [\n] 53 54 L49 [addDirect] 3 12 +Added line: 1067 [(] 12 13 [new] 13 16 [BTreeEntry] 17 27 @@ -310,18 +370,22 @@ L51 [\n] 35 36 L52 [if] 3 5 +Added line: 8026 [(] 6 7 - [leafNode] 7 15 [)] 15 16 [{] 17 18 +Added line: 9436 +Added line: 7844 [\n] 18 19 L53 [getPointer] 4 14 [(] 14 15 [this] 15 19 [)] 19 20 +Added line: 9740 [\n] 20 21 L54 +Added line: 7296 [}] 3 4 [\n] 4 5 L55 @@ -331,11 +395,13 @@ L56 [\n] 1 2 L57 [def] 2 5 +Added line: 6844 [add] 6 9 [(] 9 10 [K] 10 11 [key] 12 15 [,] 15 16 +Added line: 9506 [V] 17 18 [value] 19 24 [)] 24 25 @@ -345,8 +411,10 @@ L58 [\n] 1 2 L59 [if] 3 5 +Added line: 7852 [(] 6 7 [count] 7 12 +Added line: 8975 [>] 13 14 [0] 15 16 [&&] 17 19 @@ -358,9 +426,12 @@ L59 [{] 33 34 [\n] 34 35 L60 +Added line: 1496 [throw] 4 9 +Added line: 8274 [new] 10 13 [IllegalArgumentException] 14 38 +Added line: 570 [(] 38 39 ["$] 39 41 [key] 41 44 @@ -383,11 +454,12 @@ L63 [>] 36 37 [element] 38 45 [=] 46 47 - [manager] 48 55 [.] 55 56 [element] 56 63 +Added line: 7333 [\n] 63 64 L64 +Added line: 4491 [element] 3 10 [.] 10 11 [value] 11 16 @@ -402,11 +474,16 @@ L66 [add] 9 12 [key] 13 16 [,] 16 17 +Added line: 5773 +Added line: 9325 [element] 18 25 +Added line: 887 [\n] 25 26 +Added line: 172 L67 [}] 2 3 [\n] 3 4 +Added line: 6711 L68 [\n] 1 2 L69 @@ -418,26 +495,30 @@ L69 [)] 18 19 [{] 20 21 [\n] 21 22 +Added line: 7157 L70 +Added line: 494 [\n] 1 2 L71 [if] 3 5 [(] 6 7 +Added line: 4604 [count] 7 12 [>] 13 14 [0] 15 16 [&&] 17 19 [!] 20 21 [search] 21 27 +Added line: 7477 [(] 27 28 [key] 28 31 [)] 31 32 [)] 32 33 +Added line: 2468 [{] 34 35 [\n] 35 36 L72 [throw] 4 9 - [new] 10 13 [IllegalArgumentException] 14 38 [(] 38 39 ["$] 39 41 @@ -445,33 +526,39 @@ L72 [is not in the tree"] 45 64 [)] 64 65 [\n] 65 66 +Added line: 6191 L73 [}] 3 4 [\n] 4 5 L74 [\n] 1 2 L75 +Added line: 4751 +Added line: 2634 [super] 3 8 [.] 8 9 [delete] 9 15 [key] 16 19 [\n] 19 20 +Added line: 5842 L76 [\n] 1 2 L77 [if] 3 5 +Added line: 6818 [(] 6 7 [count] 7 12 [==] 13 15 [0] 16 17 [)] 17 18 [{] 19 20 +Added line: 3097 [\n] 20 21 L78 [getLeaf] 4 11 [(] 11 12 +Added line: 7704 [this] 12 16 - [)] 16 17 [\n] 17 18 L79 [}] 3 4 @@ -481,5 +568,7 @@ L80 [\n] 3 4 L81 [}] 1 2 +Added line: 7481 +Added line: 1804 [\n] 2 3 EOF diff --git a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleHtmlFile.txt b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleHtmlFile.txt index 31aa42e139..ec85980ed5 100644 --- a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleHtmlFile.txt +++ b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleHtmlFile.txt @@ -1,15 +1,104 @@ +Added line: 4754 +Added line: 8919 +Added line: 1348 +Added line: 5920 +Added line: 8984 +Added line: 3013 +Added line: 5829 +Added line: 7025 +Added line: 5471 +- #document[@NodeName = "#document"] +Added line: 5999 +Added line: 3009 +Added line: 8831 +Added line: 9753 +Added line: 9259 +Added line: 5073 +- #doctype[@Name = "html", @NodeName = "#doctype", @PublicId = "", @SystemId = ""] +Added line: 1248 +Added line: 2329 +Added line: 6182 +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n"] +Added line: 789 +Added line: 9713 +Added line: 6513 +Added line: 5439 +Added line: 7721 +Added line: 986 +Added line: 6452 +Added line: 1813 +Added line: 6303 +Added line: 4515 +Added line: 8286 +Added line: 9099 +Added line: 4421 +Added line: 6754 +Added line: 9004 +- html[@NodeName = "html"] +Added line: 493 +Added line: 8829 | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 3840 +Added line: 4864 +Added line: 8398 +Added line: 2715 +Added line: 3964 +Added line: 7518 +Added line: 641 | +- head[@NodeName = "head"] +Added line: 2692 +Added line: 1950 +Added line: 661 | | +- #text[@NodeName = "#text", @Text = "hello", @WholeText = "hello"] - | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 9030 +Added line: 9135 +Added line: 3281 +Added line: 1688 +Added line: 8624 +Added line: 3138 +Added line: 5492 +Added line: 2910 +Added line: 7222 +Added line: 1874 +Added line: 36 +Added line: 6420 +Added line: 8291 +Added line: 3135 +Added line: 5363 +Added line: 7902 +Added line: 3670 +Added line: 929 +Added line: 8721 +Added line: 5582 +Added line: 6951 +Added line: 7428 +Added line: 9823 +Added line: 6839 +Added line: 9261 +Added line: 9540 +Added line: 61 +Added line: 8036 +Added line: 4729 +Added line: 2789 | +- body[@NodeName = "body"] +Added line: 9172 | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 6168 +Added line: 9467 +Added line: 9989 +Added line: 6475 +Added line: 8839 +Added line: 3668 | | +- h1[@NodeName = "h1"] +Added line: 2220 +Added line: 37 | | | +- #text[@NodeName = "#text", @Text = "world", @WholeText = "world"] | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n"] +Added line: 2137 +Added line: 491 +Added line: 471 +Added line: 9239 +Added line: 9360 +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n"] +Added line: 1906 diff --git a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleHtmlFile2.txt b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleHtmlFile2.txt index 6e90423dff..a62b67b382 100644 --- a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleHtmlFile2.txt +++ b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleHtmlFile2.txt @@ -1,15 +1,104 @@ +Added line: 58 +Added line: 6638 +Added line: 1685 +Added line: 4001 +Added line: 2775 +- #document[@BeginColumn = 1, @BeginLine = 1, @EndColumn = 8, @EndLine = 7] - +- #doctype[@BeginColumn = 1, @BeginLine = 1, @EndColumn = 15, @EndLine = 1] - +- #text[@BeginColumn = 16, @BeginLine = 1, @EndColumn = 16, @EndLine = 1] +Added line: 4797 +Added line: 7742 +Added line: 6145 +- html[@BeginColumn = 1, @BeginLine = 2, @EndColumn = 7, @EndLine = 7] | +- #text[@BeginColumn = 7, @BeginLine = 2, @EndColumn = 4, @EndLine = 3] +Added line: 233 +Added line: 1046 +Added line: 1091 +Added line: 1638 +Added line: 9066 +Added line: 1321 +Added line: 9564 +Added line: 9729 +Added line: 6451 +Added line: 2127 +Added line: 3219 +Added line: 3668 +Added line: 901 +Added line: 4172 +Added line: 9827 +Added line: 560 +Added line: 825 +Added line: 2799 +Added line: 2138 +Added line: 4212 +Added line: 3179 +Added line: 8673 +Added line: 1596 +Added line: 6439 +Added line: 7253 | +- head[@BeginColumn = 5, @BeginLine = 3, @EndColumn = 22, @EndLine = 3] +Added line: 9494 +Added line: 4079 +Added line: 3012 | | +- #text[@BeginColumn = 11, @BeginLine = 3, @EndColumn = 15, @EndLine = 3] +Added line: 7478 +Added line: 7690 +Added line: 9995 +Added line: 2462 +Added line: 1523 +Added line: 166 | +- #text[@BeginColumn = 23, @BeginLine = 3, @EndColumn = 4, @EndLine = 4] +Added line: 9781 +Added line: 5731 +Added line: 9359 +Added line: 1777 +Added line: 1862 +Added line: 8858 +Added line: 9278 +Added line: 6506 +Added line: 9006 +Added line: 1195 +Added line: 4288 | +- body[@BeginColumn = 5, @BeginLine = 4, @EndColumn = 11, @EndLine = 6] +Added line: 4327 +Added line: 7877 +Added line: 9894 | | +- #text[@BeginColumn = 11, @BeginLine = 4, @EndColumn = 8, @EndLine = 5] +Added line: 8880 +Added line: 2475 +Added line: 4821 +Added line: 533 +Added line: 4978 +Added line: 8624 +Added line: 3020 +Added line: 7091 +Added line: 2492 +Added line: 2129 +Added line: 5477 +Added line: 6228 | | +- h1[@BeginColumn = 9, @BeginLine = 5, @EndColumn = 22, @EndLine = 5] +Added line: 880 +Added line: 8448 +Added line: 4392 +Added line: 7639 +Added line: 7268 | | | +- #text[@BeginColumn = 13, @BeginLine = 5, @EndColumn = 17, @EndLine = 5] | | +- #text[@BeginColumn = 23, @BeginLine = 5, @EndColumn = 4, @EndLine = 6] +Added line: 6164 +Added line: 3349 +Added line: 3225 | +- #text[@BeginColumn = 12, @BeginLine = 6, @EndColumn = 12, @EndLine = 6] +Added line: 5984 +Added line: 6513 +Added line: 2025 +Added line: 9200 +Added line: 5512 +Added line: 2650 +Added line: 6679 +Added line: 4140 +- #text[@BeginColumn = 8, @BeginLine = 7, @EndColumn = 8, @EndLine = 7] +Added line: 2438 +Added line: 6877 +Added line: 3801 +Added line: 8043 +Added line: 4421 +Added line: 1606 +Added line: 6175 diff --git a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleXmlFile.txt b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleXmlFile.txt index 1373551c19..84942f5fc9 100644 --- a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleXmlFile.txt +++ b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/SimpleXmlFile.txt @@ -1,9 +1,98 @@ +Added line: 3128 +Added line: 6214 +- #document[@NodeName = "#document"] +Added line: 4101 +Added line: 1367 +Added line: 823 +Added line: 8756 +Added line: 2870 +- #declaration[@Name = "xml", @NodeName = "#declaration"] +Added line: 4883 +Added line: 6299 +Added line: 459 +Added line: 7680 +Added line: 885 +Added line: 6519 +Added line: 3302 +Added line: 3662 +Added line: 6293 +Added line: 4712 +Added line: 4975 +Added line: 7893 +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n"] +Added line: 5777 +Added line: 970 +Added line: 7884 +Added line: 9697 +Added line: 9108 +- root[@NodeName = "root"] +Added line: 2560 +Added line: 2316 | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 7672 +Added line: 4054 +Added line: 671 +Added line: 5659 +Added line: 7410 +Added line: 6149 +Added line: 1202 +Added line: 4064 +Added line: 5620 +Added line: 170 +Added line: 9648 +Added line: 1318 +Added line: 2787 +Added line: 1010 +Added line: 7177 +Added line: 9274 +Added line: 6308 +Added line: 6509 +Added line: 948 +Added line: 6508 +Added line: 1004 +Added line: 9958 +Added line: 1495 +Added line: 2000 +Added line: 3844 +Added line: 9420 +Added line: 4320 +Added line: 311 +Added line: 1002 +Added line: 5741 +Added line: 8608 +Added line: 7376 +Added line: 2673 +Added line: 804 +Added line: 5183 +Added line: 3033 +Added line: 1644 +Added line: 9271 +Added line: 9264 +Added line: 7667 | +- child[@NodeName = "child", @attr1 = "value1"] - | | +- #text[@NodeName = "#text", @Text = "text & entities", @WholeText = "text & entities"] +Added line: 6334 +Added line: 3250 +Added line: 6882 +Added line: 9751 +Added line: 8578 +Added line: 2543 +Added line: 5022 +Added line: 4160 +Added line: 2609 +Added line: 8034 +Added line: 8769 +Added line: 161 +Added line: 2054 | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n"] +Added line: 3557 +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n"] +Added line: 9608 +Added line: 3091 +Added line: 7213 +Added line: 2664 +Added line: 3716 +Added line: 7325 +Added line: 6817 +Added line: 9134 +Added line: 7570 +Added line: 1899 diff --git a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/TemplateFragment.txt b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/TemplateFragment.txt index 4659b5deb0..f7e054cb4a 100644 --- a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/TemplateFragment.txt +++ b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/ast/testdata/TemplateFragment.txt @@ -1,65 +1,149 @@ +Added line: 5166 +Added line: 9837 +- #document[@NodeName = "#document"] +- #comment[@Data = " from https://raw.githubusercontent.com/trailheadapps/lwc-recipes-oss/main/src/modules/ui/app/app.html ", @NodeName = "#comment"] +Added line: 8837 +Added line: 9703 +Added line: 754 +Added line: 8620 +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n"] +- template[@NodeName = "template"] +Added line: 1949 +Added line: 6846 +Added line: 5671 | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | +- section[@NodeName = "section", @class = "content container page-background"] +Added line: 1631 | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | +- ui-navbar[@NodeName = "ui-navbar", @nav-items = "{navigationItems}", @oncategorychange = "{handleCategoryChange}", @selected-item = "{currentNavigationItem}"] - | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 7441 +Added line: 4943 Added line: 285 | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n\n "] +Added line: 3310 | | +- article[@NodeName = "article", @class = "container"] +Added line: 5144 | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | +- div[@NodeName = "div"] +Added line: 6882 | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 5790 +Added line: 2824 +Added line: 5279 | | | | +- template[@NodeName = "template", @if:true = "{navigationItems.hello.visible}"] +Added line: 7162 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 9914 | | | | | +- recipe-hello[@NodeName = "recipe-hello"] +Added line: 8309 +Added line: 8992 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 8236 +Added line: 6796 | | | | | +- recipe-hello-binding[@NodeName = "recipe-hello-binding"] +Added line: 5426 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 3125 | | | | | +- recipe-hello-expressions[@NodeName = "recipe-hello-expressions"] +Added line: 4010 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 8961 +Added line: 4237 +Added line: 3605 +Added line: 4847 Added line: 1917 | | | | | +- recipe-hello-expressions-track[@NodeName = "recipe-hello-expressions-track"] - | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 7562 +Added line: 5881 +Added line: 9849 +Added line: 2541 +Added line: 5621 +Added line: 2126 | | | | | +- recipe-hello-conditional-rendering[@NodeName = "recipe-hello-conditional-rendering"] +Added line: 3122 | | | | | +- recipe-hello-for-each[@NodeName = "recipe-hello-for-each"] +Added line: 4949 | | | | | +- recipe-hello-iterator[@NodeName = "recipe-hello-iterator"] +Added line: 6027 +Added line: 734 Added line: 582 +Added line: 7591 +Added line: 5225 +Added line: 1537 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | +- template[@NodeName = "template", @if:true = "{navigationItems.composition.visible}"] +Added line: 1050 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] Added line: 2853 Added line: 2974 | | | | | +- recipe-composition-basics[@NodeName = "recipe-composition-basics"] | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 7439 +Added line: 8938 | | | | | +- recipe-composition-iteration[@NodeName = "recipe-composition-iteration"] | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 2861 | | | | | +- recipe-composition-contact-search[@NodeName = "recipe-composition-contact-search"] +Added line: 714 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | | +- recipe-composition-dynamic[@NodeName = "recipe-composition-dynamic"] | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | +- template[@NodeName = "template", @if:true = "{navigationItems.child.visible}"] | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 4562 +Added line: 4851 +Added line: 6055 +Added line: 9096 | | | | | +- recipe-event-simple[@NodeName = "recipe-event-simple"] +Added line: 5706 +Added line: 3525 +Added line: 3875 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 1712 | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 4871 +Added line: 488 +Added line: 9762 | | | | +- template[@NodeName = "template", @if:true = "{navigationItems.parent.visible}"] +Added line: 7225 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 136 +Added line: 7566 | | | | | +- recipe-api-property[@NodeName = "recipe-api-property"] +Added line: 1699 +Added line: 5536 +Added line: 4286 +Added line: 1266 +Added line: 8622 +Added line: 6216 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 7526 | | | | | +- recipe-api-function[@NodeName = "recipe-api-function"] +Added line: 1500 +Added line: 8189 +Added line: 7435 +Added line: 7353 +Added line: 4574 +Added line: 3545 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | | +- recipe-api-setter-getter[@NodeName = "recipe-api-setter-getter"] | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 1083 | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 1278 | | | | +- template[@NodeName = "template", @if:true = "{navigationItems.misc.visible}"] +Added line: 6850 +Added line: 1982 +Added line: 7854 +Added line: 3658 +Added line: 4470 +Added line: 5700 +Added line: 7158 +Added line: 4223 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | | +- recipe-misc-shared-java-script[@NodeName = "recipe-misc-shared-java-script"] | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] @@ -67,19 +151,24 @@ Added line: 2974 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | | +- recipe-misc-dom-query[@NodeName = "recipe-misc-dom-query"] | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 7696 | | | | | +- recipe-misc-multiple-templates[@NodeName = "recipe-misc-multiple-templates"] | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] - | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | +- template[@NodeName = "template", @if:true = "{navigationItems.party.visible}"] | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | | | +- recipe-libs-d3[@NodeName = "recipe-libs-d3"] +Added line: 5389 | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] - | | | | | +- recipe-libs-chartjs[@NodeName = "recipe-libs-chartjs"] - | | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 2972 +Added line: 4767 +Added line: 5500 +Added line: 2272 | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 2670 | | | | +- ui-navfooter[@NodeName = "ui-navfooter", @label-next = "{nextNavigationItem}", @label-previous = "{previousNavigationItem}", @onnextclicked = "{handleNavigateNext}", @onpreviousclicked = "{handleNavigatePrevious}"] | | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] +Added line: 1673 | | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n "] | +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n"] +- #text[@NodeName = "#text", @Text = " ", @WholeText = "\n"] diff --git a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/InvalidHtml.txt b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/InvalidHtml.txt index 2cc097ffd2..6da2c280f4 100644 --- a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/InvalidHtml.txt +++ b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/InvalidHtml.txt @@ -1,22 +1,111 @@ +Added line: 2649 [Image] or [Truncated image[ Bcol Ecol +Added line: 8515 +Added line: 3608 +Added line: 2678 L1 +Added line: 4652 +Added line: 4334 +Added line: 4576 +Added line: 6906 [#document] 1 8 [#doctype] 1 15 +Added line: 6506 +Added line: 7769 [\n] 16 16 +Added line: 3325 +Added line: 4858 L2 [html] 1 7 +Added line: 2090 [\n] 17 17 +Added line: 9695 +Added line: 7230 +Added line: 4862 +Added line: 1406 L3 +Added line: 5408 +Added line: 7888 +Added line: 8040 +Added line: 5982 [body] 1 7 +Added line: 1635 +Added line: 6323 +Added line: 190 +Added line: 1291 +Added line: 6191 [\n] 7 7 -L4 +Added line: 2955 +Added line: 7808 +Added line: 9140 +Added line: 6498 +Added line: 687 +Added line: 8728 +Added line: 5754 +Added line: 9815 +Added line: 639 +Added line: 6896 +Added line: 4860 +Added line: 6436 +Added line: 3210 +Added line: 2024 +Added line: 7854 +Added line: 9259 +Added line: 5541 +Added line: 9949 +Added line: 971 [#comment] 1 36 +Added line: 6522 +Added line: 5055 +Added line: 6892 [\n] 37 37 L5 +Added line: 9640 [div] 1 22 +Added line: 1286 +Added line: 5241 +Added line: 695 +Added line: 4135 +Added line: 723 +Added line: 9768 +Added line: 1009 [\n] 22 22 +Added line: 6090 +Added line: 7341 +Added line: 8957 +Added line: 2797 +Added line: 5064 +Added line: 3122 L6 +Added line: 3506 +Added line: 6915 [\n] 8 8 +Added line: 9811 L7 +Added line: 50 +Added line: 9235 +Added line: 5694 +Added line: 235 +Added line: 5520 +Added line: 9128 +Added line: 6434 +Added line: 2730 +Added line: 4171 +Added line: 6472 +Added line: 458 +Added line: 6228 +Added line: 8762 +Added line: 8274 +Added line: 9473 +Added line: 3305 +Added line: 8407 +Added line: 6380 +Added line: 548 +Added line: 1659 +Added line: 7388 +Added line: 530 [\n] 8 8 EOF +Added line: 9084 +Added line: 7773 +Added line: 9689 diff --git a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/MetaTag.txt b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/MetaTag.txt index 5a6a1fb47b..c19942259b 100644 --- a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/MetaTag.txt +++ b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/MetaTag.txt @@ -1,31 +1,120 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 4587 +Added line: 4788 +Added line: 2898 +Added line: 3018 +Added line: 7516 +Added line: 410 +Added line: 435 Added line: 611 -Added line: 7215 +Added line: 6257 +Added line: 969 +Added line: 5711 [#document] 1 8 +Added line: 8480 +Added line: 3700 +Added line: 7083 +Added line: 3549 +Added line: 3557 +Added line: 7153 +Added line: 1124 +Added line: 6803 +Added line: 39 [\n] 16 16 +Added line: 4647 +Added line: 2104 +Added line: 1141 +Added line: 4607 +Added line: 5141 +Added line: 2740 +Added line: 8982 +Added line: 7919 +Added line: 4377 +Added line: 4943 +Added line: 4613 Added line: 575 +Added line: 9036 L2 +Added line: 6225 +Added line: 3987 +Added line: 1126 +Added line: 7393 [html] 1 7 +Added line: 9505 [\n] 17 17 Added line: 3568 +Added line: 5659 +Added line: 6614 Added line: 8408 +Added line: 8463 +Added line: 5000 +Added line: 7324 +Added line: 6536 [head] 1 7 +Added line: 7507 +Added line: 7039 [\n ] 7 4 L4 - [#comment] 5 66 +Added line: 9110 +Added line: 301 [\n ] 67 4 L5 +Added line: 4250 +Added line: 2126 +Added line: 3963 +Added line: 7580 +Added line: 9855 +Added line: 7196 +Added line: 600 +Added line: 4938 +Added line: 5895 [meta] 5 27 +Added line: 2326 +Added line: 4492 +Added line: 1509 +Added line: 3511 +Added line: 9603 +Added line: 1247 +Added line: 4883 +Added line: 3435 +Added line: 4182 [\n] 27 27 L6 +Added line: 3149 +Added line: 8889 +Added line: 3885 +Added line: 2487 +Added line: 5886 +Added line: 5007 +Added line: 9396 +Added line: 4241 +Added line: 8048 +Added line: 8363 [\n] 8 8 +Added line: 5184 +Added line: 9033 +Added line: 7349 L7 [body] 1 7 +Added line: 5992 +Added line: 8401 [\n] 7 7 -L8 Added line: 6474 [\n] 8 8 +Added line: 7398 +Added line: 1884 +Added line: 3780 +Added line: 8487 +Added line: 4008 +Added line: 1617 +Added line: 8846 Added line: 8900 - [\n] 8 8 +Added line: 1684 +Added line: 2891 +Added line: 3989 EOF -Added line: 6200 +Added line: 998 +Added line: 9463 +Added line: 5649 +Added line: 6163 +Added line: 7958 diff --git a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/SimpleHtmlFile.txt b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/SimpleHtmlFile.txt index 3876c78744..2fdb3ae06e 100644 --- a/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/SimpleHtmlFile.txt +++ b/pmd-html/src/test/resources/net/sourceforge/pmd/lang/html/cpd/testdata/SimpleHtmlFile.txt @@ -1,24 +1,113 @@ +Added line: 8203 [Image] or [Truncated image[ Bcol Ecol +Added line: 1153 +Added line: 356 +Added line: 494 +Added line: 808 +Added line: 3790 +Added line: 6018 +Added line: 6766 L1 +Added line: 9655 [#document] 1 8 - [#doctype] 1 15 +Added line: 5487 +Added line: 7541 +Added line: 7322 +Added line: 2851 +Added line: 4450 +Added line: 4853 +Added line: 3700 +Added line: 2705 +Added line: 9602 +Added line: 8565 [\n] 16 16 +Added line: 3346 +Added line: 5414 +Added line: 1960 +Added line: 6387 L2 - [html] 1 7 - [\n ] 7 4 +Added line: 2542 +Added line: 3900 +Added line: 5189 +Added line: 5318 +Added line: 3289 +Added line: 2978 +Added line: 4413 +Added line: 857 L3 +Added line: 1420 +Added line: 6288 [head] 5 22 +Added line: 2414 [hello] 11 15 +Added line: 4612 +Added line: 8545 +Added line: 6455 +Added line: 7068 +Added line: 988 +Added line: 2325 +Added line: 8504 +Added line: 9277 [\n ] 23 4 +Added line: 3176 +Added line: 4846 +Added line: 6799 +Added line: 3211 +Added line: 6275 +Added line: 2856 +Added line: 9851 +Added line: 7139 +Added line: 4769 +Added line: 328 +Added line: 7694 L4 +Added line: 8020 [body] 5 11 +Added line: 6803 +Added line: 7152 [\n ] 11 8 +Added line: 8608 +Added line: 5032 +Added line: 7952 +Added line: 6993 L5 [h1] 9 22 +Added line: 7748 +Added line: 2742 +Added line: 6963 +Added line: 511 +Added line: 1706 +Added line: 2961 [world] 13 17 +Added line: 5971 +Added line: 2656 +Added line: 5904 +Added line: 1276 [\n ] 23 4 +Added line: 8725 +Added line: 7782 +Added line: 1595 +Added line: 6453 +Added line: 6552 +Added line: 1525 L6 +Added line: 5866 [\n] 12 12 +Added line: 9987 +Added line: 5380 +Added line: 2629 +Added line: 9003 +Added line: 2559 +Added line: 6870 +Added line: 4389 L7 [\n] 8 8 -EOF +Added line: 1504 +Added line: 3012 +Added line: 67 +Added line: 6356 +Added line: 3353 +Added line: 5283 +Added line: 6390 +Added line: 1048 +Added line: 3602 diff --git a/pmd-java/src/main/javadoc/net/sourceforge/pmd/lang/java/ast/doc-files/README.md b/pmd-java/src/main/javadoc/net/sourceforge/pmd/lang/java/ast/doc-files/README.md index fd1a2ff519..44796d1169 100644 --- a/pmd-java/src/main/javadoc/net/sourceforge/pmd/lang/java/ast/doc-files/README.md +++ b/pmd-java/src/main/javadoc/net/sourceforge/pmd/lang/java/ast/doc-files/README.md @@ -1,3 +1,92 @@ +Added line: 1506 +Added line: 9380 +Added line: 5778 +Added line: 9550 +Added line: 7887 +Added line: 5317 +Added line: 1074 +Added line: 8981 +Added line: 9372 +Added line: 3479 +Added line: 1659 +Added line: 5136 +Added line: 810 Added line: 3349 +Added line: 4886 +Added line: 7997 +Added line: 7359 +Added line: 5557 +Added line: 8825 +Added line: 9256 +Added line: 4511 +Added line: 338 +Added line: 6523 +Added line: 2148 +Added line: 8727 +Added line: 9509 +Added line: 9462 +Added line: 4181 +Added line: 5005 +Added line: 7467 +Added line: 7231 +Added line: 4051 +Added line: 5731 +Added line: 46 +Added line: 4103 +Added line: 8436 +Added line: 4890 +Added line: 8207 +Added line: 1888 +Added line: 8586 +Added line: 3578 +Added line: 5109 +Added line: 5206 +Added line: 155 +Added line: 847 +Added line: 9205 +Added line: 6168 +Added line: 9663 +Added line: 7950 +Added line: 8913 +Added line: 1628 +Added line: 802 +Added line: 9258 +Added line: 7061 Added line: 2112 +Added line: 2974 +Added line: 6917 +Added line: 240 The images in this directory were generated, sources and generation script can be found in <https://github.com/oowekyala/tree-doc-images>. +Added line: 7061 +Added line: 496 +Added line: 1722 +Added line: 7452 +Added line: 8354 +Added line: 6699 +Added line: 3265 +Added line: 6717 +Added line: 9123 +Added line: 3547 +Added line: 5367 +Added line: 9177 +Added line: 8187 +Added line: 9193 +Added line: 4609 +Added line: 9832 +Added line: 8782 +Added line: 1339 +Added line: 7264 +Added line: 5872 +Added line: 8086 +Added line: 3909 +Added line: 2707 +Added line: 9120 +Added line: 9777 +Added line: 3809 +Added line: 3851 +Added line: 4038 +Added line: 2269 +Added line: 9171 +Added line: 2878 +Added line: 5903 +Added line: 9202 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt index 378487daea..abfc820f03 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt @@ -1,83 +1,162 @@ +Added line: 3269 +Added line: 4812 +- CompilationUnit[@PackageName = ""] +Added line: 9657 +Added line: 6674 +Added line: 2074 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Bug1429", @CanonicalName = "Bug1429", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Bug1429", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 9386 +Added line: 3822 +Added line: 4412 +- ClassBody[@Empty = false, @Size = 1] +Added line: 7391 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "getAttributeTuples", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] +Added line: 7161 +Added line: 925 +Added line: 8856 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Set"] +Added line: 8245 Added line: 8516 - | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] +- ReturnStatement[] +Added line: 808 +- CastExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] - +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Set"] | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 2807 +Added line: 7229 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 9390 +- ConditionalExpression[@CompileTimeConstant = false, @ParenthesisDepth = 1, @Parenthesized = true] +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3722 +Added line: 9636 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "attributes", @Name = "attributes", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7068 +Added line: 2157 +Added line: 4850 +Added line: 4564 | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6353 +Added line: 5264 +- MethodCall[@CompileTimeConstant = false, @Image = "emptySet", @MethodName = "emptySet", @ParenthesisDepth = 0, @Parenthesized = false] | +- AmbiguousName[@CompileTimeConstant = false, @Image = "Collections", @Name = "Collections", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5660 +Added line: 4947 | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 9231 +Added line: 4827 +Added line: 2755 | +- ArgumentList[@Empty = true, @Size = 0] -Added line: 489 +Added line: 8791 +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "HashSet"] +Added line: 2041 | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 1236 +Added line: 1125 +Added line: 9733 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 2808 +Added line: 1034 +Added line: 1442 +- ArgumentList[@Empty = false, @Size = 1] +- MethodCall[@CompileTimeConstant = false, @Image = "collect", @MethodName = "collect", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3822 +- ArgumentList[@Empty = false, @Size = 2] +- MethodCall[@CompileTimeConstant = false, @Image = "keySet", @MethodName = "keySet", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3085 +Added line: 1474 +Added line: 3718 +Added line: 3182 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "attributes", @Name = "attributes", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7185 | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 9771 +- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Transformer"] +Added line: 84 +- ArgumentList[@Empty = true, @Size = 0] +Added line: 4953 +- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "Bug1429$1", @CanonicalName = null, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_ANONYMOUS] +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "transform", @Overridden = true, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 9653 | +- Annotation[@SimpleName = "Override"] +Added line: 2340 +Added line: 1657 Added line: 7186 +Added line: 8132 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Override"] +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] +Added line: 8524 +Added line: 6405 +Added line: 2347 +Added line: 457 +- FormalParameters[@Empty = false, @Size = 1] - | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 1563 | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] +Added line: 687 +Added line: 8187 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 264 +Added line: 8471 +- Block[@Empty = false, @Size = 5, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 4160 | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "key"] +Added line: 7863 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "key", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- CastExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9798 +Added line: 6920 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 8198 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2909 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 609 | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "value"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "value", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7985 +Added line: 6330 | +- MethodCall[@CompileTimeConstant = false, @Image = "get", @MethodName = "get", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "attributes", @Name = "attributes", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6035 +Added line: 2004 +Added line: 3733 | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "HGXLIFFTypeConfiguration"] Added line: 726 +Added line: 9917 +Added line: 6098 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "key", @Name = "key", @ParenthesisDepth = 0, @Parenthesized = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7921 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 1304 +Added line: 6342 +Added line: 1093 +Added line: 7394 +Added line: 3680 +Added line: 4303 | +- VariableDeclarator[@Initializer = true, @Name = "result"] +Added line: 6723 +Added line: 8968 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "key", @Name = "key", @ParenthesisDepth = 0, @Parenthesized = false] +- IfStatement[@Else = false] @@ -85,16 +164,26 @@ Added line: 726 | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "StringUtils", @Name = "StringUtils", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "value", @Name = "value", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2443 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 5764 | +- ExpressionStatement[] +Added line: 3492 | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "concat", @MethodName = "concat", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "concat", @MethodName = "concat", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1060 +Added line: 940 +Added line: 712 +Added line: 6067 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ":", @Empty = false, @Image = "\":\"", @Length = 1, @LiteralText = "\":\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] - | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 5692 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "value", @Name = "value", @ParenthesisDepth = 0, @Parenthesized = false] +- ReturnStatement[] +Added line: 5802 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1891 +Added line: 189 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1530.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1530.txt index fd9ec36b8d..0bd10201f8 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1530.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1530.txt @@ -1,21 +1,110 @@ +Added line: 9579 +Added line: 5104 +Added line: 1689 +Added line: 6143 +Added line: 4416 +Added line: 6290 +Added line: 4733 +Added line: 9650 +Added line: 7213 +Added line: 5385 +Added line: 4867 +Added line: 2642 +Added line: 922 +Added line: 601 +Added line: 41 Added line: 3218 +- CompilationUnit[@PackageName = ""] +Added line: 7554 +Added line: 2546 +Added line: 9263 +Added line: 7366 +Added line: 1440 +Added line: 932 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Bug1530", @CanonicalName = "Bug1530", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Bug1530", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 9651 +Added line: 458 +Added line: 239 +Added line: 2643 +Added line: 3453 +Added line: 7910 Added line: 5773 +Added line: 316 +Added line: 3733 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 5785 +- ClassBody[@Empty = false, @Size = 1] +Added line: 4628 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] - +- VoidType[] +Added line: 725 +Added line: 6309 +Added line: 5161 +Added line: 3026 +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] - +- ExpressionStatement[] +Added line: 4038 +Added line: 8308 +Added line: 429 +Added line: 8374 +Added line: 343 +Added line: 9073 +Added line: 8223 +Added line: 9581 +Added line: 2247 +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3868 +Added line: 91 +Added line: 3165 +Added line: 4715 +Added line: 8606 +Added line: 390 +Added line: 9662 +Added line: 1623 +Added line: 2981 +Added line: 6344 +Added line: 8754 +Added line: 6450 +Added line: 7409 +Added line: 8926 +Added line: 1629 +Added line: 4562 +- FieldAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "currentChild", @Name = "currentChild", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2718 +Added line: 8482 +Added line: 3757 +Added line: 3479 +Added line: 4335 +Added line: 7724 +Added line: 634 +Added line: 38 +Added line: 8874 Added line: 5938 Added line: 7391 +- CastExpression[@CompileTimeConstant = false, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 8642 +Added line: 1957 +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "PathElement"] +- MethodCall[@CompileTimeConstant = false, @Image = "getUserObject", @MethodName = "getUserObject", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4189 +Added line: 4613 | +- AmbiguousName[@CompileTimeConstant = false, @Image = "stack", @Name = "stack", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3709 +Added line: 3837 +Added line: 5401 +Added line: 8023 +Added line: 4502 +Added line: 3440 +Added line: 2183 +Added line: 6794 +Added line: 4782 +Added line: 1366 +Added line: 4957 +Added line: 1049 +Added line: 3670 +Added line: 6549 +Added line: 7125 | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 7919 +- ArgumentList[@Empty = true, @Size = 0] +Added line: 8993 +Added line: 9516 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts1.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts1.txt index 605b2cee70..36ab5a8fec 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts1.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts1.txt @@ -1,7 +1,96 @@ +Added line: 1952 +Added line: 6292 +Added line: 1758 +Added line: 6406 +Added line: 4620 +Added line: 1022 +Added line: 310 +Added line: 3834 +Added line: 4579 +Added line: 6890 +Added line: 6372 +- CompilationUnit[@PackageName = ""] +Added line: 329 +Added line: 7969 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "a", @ImportedSimpleName = "a", @ModuleImport = false, @PackageName = "", @Static = false] +Added line: 8724 +Added line: 9750 +Added line: 3831 +Added line: 8825 +Added line: 478 +Added line: 9791 +Added line: 2749 +Added line: 9287 +- EmptyDeclaration[] +Added line: 3472 +Added line: 4552 +Added line: 2453 +Added line: 3398 +Added line: 746 +Added line: 1468 +Added line: 7256 +Added line: 6269 +Added line: 9114 +Added line: 7216 +Added line: 2349 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "b", @ImportedSimpleName = "b", @ModuleImport = false, @PackageName = "", @Static = false] +Added line: 5248 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Foo", @CanonicalName = "Foo", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Foo", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 3558 +Added line: 8857 +Added line: 9938 +Added line: 3992 +Added line: 495 +Added line: 498 +Added line: 3624 +Added line: 7828 +Added line: 1441 +Added line: 6492 +Added line: 9391 +Added line: 1807 +Added line: 4150 +Added line: 29 +Added line: 3837 +Added line: 7436 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 5448 +Added line: 5626 +Added line: 6762 +Added line: 6253 +Added line: 4511 +Added line: 2380 +Added line: 9630 +Added line: 8412 +Added line: 2314 +Added line: 5677 +- ClassBody[@Empty = true, @Size = 0] +Added line: 9194 +Added line: 400 +Added line: 3033 +Added line: 8588 +Added line: 2542 +Added line: 5084 +Added line: 8117 +Added line: 4041 +Added line: 6871 +Added line: 3772 +Added line: 8192 +Added line: 7699 +Added line: 4106 +Added line: 5039 +Added line: 9677 +Added line: 4474 +Added line: 2525 +Added line: 6197 +Added line: 9196 +Added line: 1200 +Added line: 1561 +Added line: 1133 +Added line: 7380 +Added line: 8093 +Added line: 2087 +Added line: 2779 +Added line: 4143 +Added line: 4389 +Added line: 6658 +Added line: 6322 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts2.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts2.txt index 7cf765808a..c1d7e8ce77 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts2.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts2.txt @@ -1,8 +1,97 @@ Added line: 2536 +Added line: 4907 +Added line: 2730 +Added line: 46 +Added line: 100 +Added line: 3900 +Added line: 9824 +Added line: 9615 +Added line: 7143 +Added line: 6277 +Added line: 7997 +Added line: 574 +Added line: 3185 +Added line: 1077 +Added line: 3818 +Added line: 1572 +Added line: 8494 +- CompilationUnit[@PackageName = "c"] +Added line: 560 +Added line: 9492 +Added line: 9817 +- PackageDeclaration[@Name = "c"] +Added line: 4759 +Added line: 6381 +Added line: 6147 +Added line: 5971 Added line: 7361 -Added line: 1271 +Added line: 5293 +Added line: 7507 +Added line: 57 +Added line: 288 +Added line: 9565 +Added line: 788 +Added line: 7819 +Added line: 6491 +Added line: 8806 +Added line: 9183 +Added line: 1211 +Added line: 3393 +Added line: 9043 +Added line: 476 +Added line: 5702 +Added line: 7346 +Added line: 7557 +Added line: 2497 +Added line: 6352 +Added line: 5774 +Added line: 4199 +Added line: 5119 +Added line: 145 +Added line: 6739 +Added line: 9264 +Added line: 7175 +Added line: 5494 +Added line: 1000 +Added line: 385 +Added line: 6139 +Added line: 3820 Added line: 9152 +Added line: 6878 +Added line: 952 +Added line: 8682 +Added line: 908 +Added line: 1768 +Added line: 2818 +Added line: 7066 +Added line: 2843 +Added line: 5622 +Added line: 4484 +Added line: 8544 +Added line: 1141 +Added line: 195 +Added line: 7126 +Added line: 3901 +Added line: 5123 +Added line: 8760 +Added line: 835 +Added line: 83 +Added line: 7217 +Added line: 6756 +Added line: 1706 +Added line: 2679 +Added line: 6481 +Added line: 343 +Added line: 7837 +Added line: 8268 +Added line: 2268 +Added line: 1126 +Added line: 4495 +Added line: 11 +Added line: 9297 +Added line: 1405 +Added line: 8300 +- EmptyDeclaration[] +Added line: 4876 +Added line: 9240 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "b", @ImportedSimpleName = "b", @ModuleImport = false, @PackageName = "", @Static = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts3.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts3.txt index 31fcd5f0f8..40a45adbcb 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts3.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts3.txt @@ -1,11 +1,100 @@ -+- CompilationUnit[@PackageName = "c"] +Added line: 3737 +Added line: 8374 +Added line: 7996 +Added line: 3415 +Added line: 6751 +Added line: 7149 +Added line: 9450 +Added line: 4400 +- PackageDeclaration[@Name = "c"] Added line: 2746 +Added line: 3433 +Added line: 7243 +Added line: 4755 +Added line: 3399 +Added line: 3699 +Added line: 2593 +Added line: 7636 +Added line: 8067 +Added line: 3689 +Added line: 4163 +Added line: 6198 +Added line: 2005 +Added line: 4999 +Added line: 4066 +Added line: 4284 +Added line: 3181 +Added line: 2224 +Added line: 3926 +Added line: 695 +Added line: 3100 +Added line: 8023 +Added line: 6765 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "a", @ImportedSimpleName = "a", @ModuleImport = false, @PackageName = "", @Static = false] +Added line: 5855 +Added line: 2256 +Added line: 1040 +Added line: 9972 +Added line: 5388 +Added line: 5581 +Added line: 5176 +Added line: 9604 +Added line: 881 +Added line: 2219 +Added line: 1936 +Added line: 6774 +Added line: 4915 +Added line: 999 +Added line: 9243 +Added line: 8229 +Added line: 9004 +Added line: 8892 Added line: 2788 +Added line: 3765 +Added line: 3522 +Added line: 7434 +Added line: 8056 +Added line: 5601 +Added line: 8479 +Added line: 4834 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "c.Foo", @CanonicalName = "c.Foo", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "c", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Foo", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 3407 +Added line: 146 +Added line: 6246 +Added line: 760 +Added line: 7932 +Added line: 9080 +Added line: 8861 +Added line: 125 +Added line: 3153 +Added line: 7966 +Added line: 3678 +Added line: 6826 +Added line: 9725 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] - | +- ClassBody[@Empty = true, @Size = 0] +Added line: 1382 +Added line: 4203 +Added line: 3528 +Added line: 6632 +Added line: 8927 +Added line: 7905 +Added line: 5440 +Added line: 8859 +- EmptyDeclaration[] +Added line: 2448 +Added line: 299 +Added line: 7950 +Added line: 2157 +Added line: 6303 +Added line: 2807 +Added line: 25 +Added line: 7408 +Added line: 2076 +Added line: 3567 Added line: 8067 +Added line: 8210 +Added line: 704 +Added line: 2925 +Added line: 9558 +Added line: 3871 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug1780OuterClass.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug1780OuterClass.txt index 414c7a1d96..a366994247 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug1780OuterClass.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug1780OuterClass.txt @@ -1,70 +1,159 @@ +- CompilationUnit[@PackageName = "com.pmd.test"] +Added line: 9229 +Added line: 4858 +- PackageDeclaration[@Name = "com.pmd.test"] +Added line: 3927 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2817 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.pmd.test.GitHubBug1780OuterClass", @CanonicalName = "com.pmd.test.GitHubBug1780OuterClass", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "com.pmd.test", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GitHubBug1780OuterClass", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 2085 +Added line: 2854 +Added line: 3699 +Added line: 6312 +Added line: 7819 +Added line: 6074 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 4] +Added line: 8201 +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "GitHubBug1780OuterClass", @Name = "GitHubBug1780OuterClass", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] +Added line: 7180 +Added line: 2127 +Added line: 8573 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] Added line: 6239 Added line: 3199 | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 370 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 7186 +Added line: 498 +Added line: 6872 +Added line: 8256 +Added line: 3484 +Added line: 7827 | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3032 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6390 +Added line: 6604 +Added line: 2764 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] Added line: 2232 +Added line: 1150 +Added line: 9292 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 2193 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.pmd.test.GitHubBug1780OuterClass$InnerClass", @CanonicalName = "com.pmd.test.GitHubBug1780OuterClass.InnerClass", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "com.pmd.test", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "InnerClass", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 63 +Added line: 1145 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassBody[@Empty = false, @Size = 1] +Added line: 325 +Added line: 4078 +Added line: 4176 | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "InnerClass", @Name = "InnerClass", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] - | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1921 +Added line: 1146 +Added line: 4606 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3408 +Added line: 7265 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 2884 +Added line: 404 +Added line: 399 +Added line: 4438 +Added line: 4619 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 870 +Added line: 6235 +Added line: 8337 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Inner Class Constructor", @Empty = false, @Image = "\"Inner Class Constructor\"", @Length = 23, @LiteralText = "\"Inner Class Constructor\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 797 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.pmd.test.GitHubBug1780OuterClass$StaticInnerClass", @CanonicalName = "com.pmd.test.GitHubBug1780OuterClass.StaticInnerClass", @EffectiveVisibility = Visibility.V_PRIVATE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "com.pmd.test", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "StaticInnerClass", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PRIVATE] +Added line: 7686 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] +Added line: 1234 +Added line: 496 +Added line: 3537 +Added line: 6167 | +- ExtendsList[@Empty = false, @Size = 1] - | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "InnerClass"] +Added line: 9848 +Added line: 3031 +Added line: 5157 +Added line: 3474 +Added line: 4483 | +- ClassBody[@Empty = false, @Size = 1] - | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Image = "StaticInnerClass", @Name = "StaticInnerClass", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] +Added line: 6483 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 6586 +Added line: 8216 +Added line: 882 | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = true, @Super = true, @This = false] +Added line: 7830 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 8646 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "GitHubBug1780OuterClass"] | | | +- ArgumentList[@Empty = true, @Size = 0] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 97 +Added line: 2168 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3924 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 931 +Added line: 5521 +Added line: 1771 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "StaticInnerClass Constructor", @Empty = false, @Image = "\"StaticInnerClass Constructor\"", @Length = 28, @LiteralText = "\"StaticInnerClass Constructor\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 2615 +Added line: 5521 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] Added line: 5854 +Added line: 282 +Added line: 4566 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 7822 +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] +Added line: 9519 | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 633 +Added line: 6739 +Added line: 3743 +Added line: 8613 +Added line: 8132 +Added line: 3224 | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] -Added line: 7462 +Added line: 7802 | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 7983 +Added line: 1990 +Added line: 8376 +Added line: 7184 | +- ArrayTypeDim[@Varargs = false] +Added line: 1684 +Added line: 7396 +Added line: 8559 +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 2964 +Added line: 5160 +- ExpressionStatement[] +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "StaticInnerClass"] +Added line: 5699 +Added line: 6881 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "GitHubBug1780OuterClass"] +- ArgumentList[@Empty = true, @Size = 0] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug207.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug207.txt index 357b8a63e3..c4500cedda 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug207.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug207.txt @@ -1,27 +1,116 @@ +Added line: 8003 +Added line: 2262 Added line: 1284 +Added line: 7859 +- CompilationUnit[@PackageName = ""] +Added line: 679 +Added line: 93 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GitHubBug207", @CanonicalName = "GitHubBug207", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GitHubBug207", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 4218 +Added line: 5912 +- ClassBody[@Empty = false, @Size = 1] - +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] +Added line: 2184 +Added line: 2107 +Added line: 1844 +Added line: 9404 +Added line: 9352 +Added line: 8953 +Added line: 8155 +Added line: 7197 +Added line: 8767 +Added line: 3849 +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "HttpMessageWriter"] +Added line: 6664 | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 8717 +Added line: 4065 +Added line: 7805 Added line: 4726 +Added line: 4698 +Added line: 9324 +Added line: 2356 +Added line: 5411 +Added line: 1985 +Added line: 7737 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Resource"] +- FormalParameters[@Empty = false, @Size = 1] +Added line: 8169 +Added line: 7961 | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 163 Added line: 5917 +Added line: 4773 | +- ClassType[@FullyQualified = true, @PackageQualifier = "BodyInserter", @SimpleName = "Context"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "context", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8438 +Added line: 4425 +Added line: 5573 +Added line: 4871 +Added line: 6918 +Added line: 8189 +Added line: 9553 +Added line: 7155 +Added line: 3637 +Added line: 8969 +Added line: 9687 +Added line: 6576 +Added line: 5635 +Added line: 4099 +Added line: 1751 +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 1333 +- ReturnStatement[] +Added line: 9334 +Added line: 5556 +Added line: 4153 +Added line: 6772 +Added line: 6394 +Added line: 9580 +Added line: 9964 +Added line: 9134 +Added line: 3134 Added line: 5152 - +- MethodCall[@CompileTimeConstant = false, @Image = "map", @MethodName = "map", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9180 +Added line: 7371 +Added line: 6557 +Added line: 2047 +Added line: 229 +Added line: 5237 Added line: 221 +Added line: 9526 +Added line: 3742 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "context", @Name = "context", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9847 +Added line: 6878 Added line: 5304 +Added line: 7470 +- ArgumentList[@Empty = false, @Size = 1] +Added line: 769 +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = false, @MethodName = "cast", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8127 +Added line: 1492 +Added line: 4209 +Added line: 4813 +Added line: 2022 +Added line: 8992 +Added line: 8859 +Added line: 2027 Added line: 8916 +Added line: 6229 +Added line: 453 +Added line: 5904 +Added line: 4585 +Added line: 3422 +Added line: 7796 +Added line: 5377 +Added line: 5770 +Added line: 7361 +Added line: 5865 +Added line: 8575 +Added line: 7178 Added line: 9370 +Added line: 3465 +Added line: 2759 +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Resource"] +Added line: 9657 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug208.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug208.txt index 45eb3e7212..f6e6eaef42 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug208.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug208.txt @@ -1,28 +1,117 @@ +Added line: 7234 +Added line: 6156 +Added line: 7338 +- CompilationUnit[@PackageName = ""] +Added line: 3351 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GitHubBug208", @CanonicalName = "GitHubBug208", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GitHubBug208", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 1261 +Added line: 9419 +Added line: 1680 +Added line: 6878 +Added line: 2946 +Added line: 6585 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] Added line: 2250 +Added line: 2987 +Added line: 6565 +Added line: 6809 +Added line: 7673 +- ClassBody[@Empty = false, @Size = 1] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 1993 +Added line: 3066 +Added line: 7378 +Added line: 4248 +Added line: 960 +Added line: 1457 +- VoidType[] +Added line: 7129 +Added line: 1223 +Added line: 6313 +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 7334 +Added line: 3461 +Added line: 2970 +- LocalClassStatement[] +Added line: 7676 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GitHubBug208$1LocalClass", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = false, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "LocalClass", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_LOCAL] - +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | +- Annotation[@SimpleName = "Lazy"] +Added line: 9347 +Added line: 3430 +Added line: 7916 +Added line: 7926 +Added line: 7542 +Added line: 489 Added line: 1535 +Added line: 3591 +Added line: 1580 +Added line: 1189 +Added line: 8097 | +- Annotation[@SimpleName = "Configuration"] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Configuration"] +Added line: 7230 +Added line: 117 +Added line: 1435 +- ClassBody[@Empty = false, @Size = 1] +Added line: 9972 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Name = "foo", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] +Added line: 1189 +Added line: 7802 +Added line: 6341 +Added line: 5242 +Added line: 817 +Added line: 5867 +Added line: 8469 +Added line: 7032 +Added line: 3263 +Added line: 5697 +Added line: 5936 +Added line: 8283 +Added line: 1263 Added line: 7088 +Added line: 2574 +Added line: 2950 +Added line: 9810 +Added line: 5094 +Added line: 7793 +Added line: 1767 +Added line: 652 +Added line: 434 +Added line: 5721 +Added line: 4861 +Added line: 9761 +Added line: 9486 +Added line: 1990 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8873 +Added line: 5860 +Added line: 6895 +Added line: 4305 +Added line: 6155 +Added line: 8269 +Added line: 1361 | +- Annotation[@SimpleName = "Bean"] +Added line: 2556 +Added line: 3711 +Added line: 1385 +Added line: 9973 +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] - +- FormalParameters[@Empty = true, @Size = 0] Added line: 2782 +Added line: 5202 +Added line: 1241 +Added line: 3811 +Added line: 2647 +Added line: 2226 +Added line: 3919 +Added line: 4348 Added line: 5028 +Added line: 3082 +Added line: 7938 +- Block[@Empty = false, @Size = 1, @containsComment = false] - +- ReturnStatement[] - +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6600 +Added line: 8374 +Added line: 3238 +Added line: 9433 +Added line: 7159 +Added line: 4709 +Added line: 864 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug309.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug309.txt index 22b9ac7b82..50f6755170 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug309.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug309.txt @@ -1,45 +1,134 @@ +Added line: 5668 +- CompilationUnit[@PackageName = ""] +- ImportDeclaration[@ImportOnDemand = true, @ImportedName = "java.util", @ImportedSimpleName = null, @ModuleImport = false, @PackageName = "java.util", @Static = false] +Added line: 3882 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GitHubBug309", @CanonicalName = "GitHubBug309", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GitHubBug309", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 2434 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 2029 +Added line: 11 +Added line: 4174 +Added line: 6811 +Added line: 9921 +Added line: 7678 +Added line: 5218 +Added line: 2697 +Added line: 5819 +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 3880 +Added line: 4341 +Added line: 99 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] - +- VoidType[] +Added line: 5889 +Added line: 9614 +Added line: 1763 +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] +Added line: 161 +Added line: 6402 +Added line: 8514 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 7725 | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 5141 +Added line: 4084 | | +- ArrayTypeDim[@Varargs = false] +Added line: 8567 +Added line: 798 +Added line: 9385 +Added line: 4872 +Added line: 6641 | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8310 +- Block[@Empty = false, @Size = 2, @containsComment = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Runnable"] +Added line: 6096 +Added line: 1908 | +- VariableDeclarator[@Initializer = true, @Name = "r11"] +Added line: 1880 +Added line: 5005 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r11", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 6401 | +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = true, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7185 | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3174 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Main"] | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 9985 +Added line: 8315 +Added line: 2895 +Added line: 3237 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 6063 +Added line: 4855 +Added line: 8818 +Added line: 1356 +Added line: 2266 +Added line: 8124 +Added line: 1267 +Added line: 6272 +Added line: 414 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8420 +Added line: 3042 +Added line: 2055 +Added line: 1140 +Added line: 6593 +Added line: 2038 +Added line: 466 +Added line: 4669 +Added line: 1676 +Added line: 2393 +Added line: 3391 +Added line: 6727 +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IntFunction"] +Added line: 5540 | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 7684 | +- ArrayType[@ArrayDepth = 1] +Added line: 6601 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] - | +- ArrayDimensions[@Empty = false, @Size = 1] - | +- ArrayTypeDim[@Varargs = false] +Added line: 970 +Added line: 556 +Added line: 571 +Added line: 9518 +Added line: 2823 +- VariableDeclarator[@Initializer = true, @Name = "r13"] +Added line: 9271 +Added line: 7600 +Added line: 89 +Added line: 3960 +Added line: 3191 +Added line: 2033 +Added line: 5892 +Added line: 2447 +Added line: 376 +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r13", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9704 +Added line: 7579 +Added line: 345 +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = true, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2615 +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9260 +Added line: 2363 +Added line: 9189 | +- ArrayType[@ArrayDepth = 1] +Added line: 106 +Added line: 1637 +Added line: 7987 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 9900 +Added line: 1944 | +- ArrayDimensions[@Empty = false, @Size = 1] | +- ArrayTypeDim[@Varargs = false] +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 4827 +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 7979 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug3642.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug3642.txt index c2541ff3e3..8da9ebef46 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug3642.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug3642.txt @@ -1,15 +1,104 @@ +Added line: 1009 +Added line: 3682 +Added line: 2155 +Added line: 8158 +Added line: 8303 +Added line: 1486 +Added line: 5128 +Added line: 650 +Added line: 7144 +Added line: 1404 +Added line: 9124 +Added line: 2537 +Added line: 9637 +Added line: 8948 +Added line: 3718 +Added line: 841 +Added line: 2940 +Added line: 6091 +Added line: 4067 Added line: 4803 +Added line: 9106 +Added line: 567 +Added line: 5057 +Added line: 8427 +Added line: 11 +Added line: 3183 +Added line: 1983 +Added line: 2443 +Added line: 7883 +Added line: 1335 +Added line: 8145 Added line: 1377 +- CompilationUnit[@PackageName = ""] +Added line: 704 +Added line: 1829 +Added line: 2566 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GitHubBug3642", @CanonicalName = "GitHubBug3642", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GitHubBug3642", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 9757 Added line: 3327 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 1494 +Added line: 8865 Added line: 63 +- AnnotationTypeDeclaration[@Abstract = true, @Annotation = true, @Anonymous = false, @BinaryName = "GitHubBug3642$Foo", @CanonicalName = "GitHubBug3642.Foo", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Foo", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 4344 +Added line: 5285 +Added line: 1055 +- ModifierList[@EffectiveModifiers = (JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = ()] +- AnnotationTypeBody[@Empty = false, @Size = 1] - +- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "v1", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] +Added line: 311 +Added line: 9666 +Added line: 7593 +Added line: 620 +Added line: 3185 +Added line: 3691 +Added line: 7596 +Added line: 6283 +Added line: 1499 +Added line: 431 +Added line: 3207 +Added line: 6264 +Added line: 2637 +Added line: 7949 +Added line: 1651 +Added line: 3847 +Added line: 5035 +Added line: 9194 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] +Added line: 7903 +Added line: 6581 +Added line: 991 +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 5530 +Added line: 9707 +Added line: 6569 +Added line: 6722 +Added line: 163 +Added line: 4633 +- FormalParameters[@Empty = true, @Size = 0] +Added line: 2711 +Added line: 1105 +Added line: 2880 +Added line: 8565 +Added line: 4518 +Added line: 8801 +Added line: 8595 +Added line: 9089 +Added line: 8698 +Added line: 315 +Added line: 3438 +Added line: 7580 +Added line: 5882 +Added line: 7150 +Added line: 7948 +Added line: 1190 +Added line: 1140 +Added line: 7838 +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 7607 +Added line: 3387 +Added line: 5518 +Added line: 2855 +Added line: 4807 +Added line: 250 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1333.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1333.txt index 40d62cf610..8a662ea54f 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1333.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1333.txt @@ -1,65 +1,154 @@ +Added line: 6767 +Added line: 5916 +Added line: 625 Added line: 2185 +- CompilationUnit[@PackageName = ""] Added line: 7265 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Bug1333", @CanonicalName = "Bug1333", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Bug1333", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 9863 +Added line: 2819 +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] +- ClassBody[@Empty = false, @Size = 4] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 4771 +Added line: 8004 +Added line: 1835 +Added line: 4121 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Logger"] | +- VariableDeclarator[@Initializer = true, @Name = "LOG"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "LOG", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 5905 | +- MethodCall[@CompileTimeConstant = false, @Image = "getLogger", @MethodName = "getLogger", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9289 | +- AmbiguousName[@CompileTimeConstant = false, @Image = "LoggerFactory", @Name = "LoggerFactory", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1763 +Added line: 1863 | +- ArgumentList[@Empty = false, @Size = 1] | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4351 +Added line: 7741 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Foo"] +Added line: 434 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "deleteDirectoriesByNamePattern", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 4956 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] Added line: 3172 +Added line: 787 +Added line: 8066 | +- MethodCall[@CompileTimeConstant = false, @Image = "delete", @MethodName = "delete", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9130 +Added line: 2127 | +- ArgumentList[@Empty = false, @Size = 1] | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | +- LambdaParameterList[@Empty = false, @Size = 1] +Added line: 2306 +Added line: 4522 | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7585 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "path", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 5137 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 70 +Added line: 8186 +Added line: 1552 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "path", @Name = "path", @ParenthesisDepth = 0, @Parenthesized = false] - +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "delete", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] +Added line: 9240 +Added line: 7891 +Added line: 5653 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- VoidType[] +Added line: 6201 Added line: 3068 | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 3787 +Added line: 8900 +Added line: 6573 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 1010 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Consumer"] +Added line: 962 | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = true, @UpperBound = false] +Added line: 2509 +Added line: 9731 +Added line: 6981 +Added line: 7123 +Added line: 396 +Added line: 1631 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "consumer", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 686 +Added line: 6453 +Added line: 2356 +Added line: 3245 +Added line: 3469 +Added line: 5912 +Added line: 8535 +Added line: 712 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] +Added line: 8463 +Added line: 7342 +Added line: 6960 +Added line: 9122 | +- MethodCall[@CompileTimeConstant = false, @Image = "debug", @MethodName = "debug", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6845 +Added line: 4727 +Added line: 5833 +Added line: 1348 +Added line: 2571 +Added line: 2240 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "LOG", @Name = "LOG", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- MethodCall[@CompileTimeConstant = false, @Image = "toString", @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 307 +Added line: 2871 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "consumer", @Name = "consumer", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5503 +Added line: 4107 | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "deleteDirectory", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] +Added line: 554 +Added line: 1091 +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] -Added line: 2919 +Added line: 3356 +Added line: 8980 +- VoidType[] +Added line: 7167 +Added line: 5128 +- FormalParameters[@Empty = false, @Size = 1] +Added line: 4401 +Added line: 4341 +Added line: 3545 +Added line: 3747 +Added line: 2471 +Added line: 4822 +Added line: 9480 +Added line: 4630 | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "path", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 4115 +- Block[@Empty = false, @Size = 1, @containsComment = false] +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "debug", @MethodName = "debug", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6123 +Added line: 2480 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "LOG", @Name = "LOG", @ParenthesisDepth = 0, @Parenthesized = false] +- ArgumentList[@Empty = false, @Size = 1] +Added line: 2110 +Added line: 2311 +Added line: 4065 +Added line: 9248 +Added line: 3554 +Added line: 6572 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "path", @Name = "path", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4478 +Added line: 9038 +Added line: 6732 +Added line: 8678 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1470.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1470.txt index ccf04bc9a9..398336ba6d 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1470.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1470.txt @@ -1,56 +1,129 @@ +- PackageDeclaration[@Name = "com.sample.test"] - | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "rx.Observable", @ImportedSimpleName = "Observable", @ModuleImport = false, @PackageName = "rx", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "rx.Subscriber", @ImportedSimpleName = "Subscriber", @ModuleImport = false, @PackageName = "rx", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.sample.test.pmdTest", @CanonicalName = "com.sample.test.pmdTest", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "com.sample.test", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "pmdTest", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 3389 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 1956 +- ClassBody[@Empty = false, @Size = 3] +Added line: 9710 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = false, @Visibility = Visibility.V_PRIVATE] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.BOOLEAN] +Added line: 8547 +Added line: 7619 +Added line: 8108 +Added line: 9976 Added line: 194 | +- VariableDeclarator[@Initializer = false, @Name = "stuff"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "stuff", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 4428 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "testSuper", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 729 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Observable"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 8734 +Added line: 9007 +Added line: 1947 +Added line: 5444 +Added line: 8833 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Boolean"] +Added line: 1340 | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 3692 +Added line: 9407 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 3430 +Added line: 6843 +Added line: 7920 Added line: 9606 +Added line: 5416 | +- ReturnStatement[] +Added line: 4890 +Added line: 9464 +Added line: 32 +Added line: 6493 | +- MethodCall[@CompileTimeConstant = false, @Image = "map", @MethodName = "map", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "create", @MethodName = "create", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1345 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Observable"] +Added line: 9376 +Added line: 6622 +Added line: 4400 +Added line: 9396 +Added line: 5619 Added line: 5388 +Added line: 7837 +Added line: 978 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- LambdaExpression[@Arity = 1, @BlockBody = true, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- LambdaParameterList[@Empty = false, @Size = 1] +Added line: 2235 +Added line: 4455 | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] +Added line: 6613 +Added line: 6854 +Added line: 5033 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] Added line: 6322 +Added line: 9210 +Added line: 865 +Added line: 8046 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Subscriber"] +Added line: 974 +Added line: 3677 +Added line: 6365 +Added line: 8714 +Added line: 338 | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] - | | | | +- WildcardType[@LowerBound = true, @UpperBound = false] +Added line: 6449 +Added line: 9639 +Added line: 1036 +Added line: 4085 +Added line: 5284 +Added line: 3138 +Added line: 395 +Added line: 3833 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 4462 +Added line: 5855 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "subscriber", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "stuff", @Name = "stuff", @ParenthesisDepth = 0, @Parenthesized = false] | | +- BooleanLiteral[@CompileTimeConstant = true, @LiteralText = "true", @ParenthesisDepth = 0, @Parenthesized = false, @True = true] +Added line: 6894 +Added line: 8521 | +- ArgumentList[@Empty = false, @Size = 1] | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1109 | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2146 +Added line: 1677 +Added line: 9727 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "authToken", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 5507 +Added line: 5583 +Added line: 2885 | +- BooleanLiteral[@CompileTimeConstant = true, @LiteralText = "false", @ParenthesisDepth = 0, @Parenthesized = false, @True = false] +Added line: 6299 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "testSuper2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 653 +Added line: 3185 +Added line: 6708 +Added line: 6544 +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Observable"] | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 8084 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Boolean"] +Added line: 1132 +Added line: 9185 +Added line: 6715 +Added line: 5461 +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] +- ReturnStatement[] @@ -59,21 +132,37 @@ Added line: 6322 | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Observable"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 2561 | +- LambdaExpression[@Arity = 1, @BlockBody = true, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9440 +Added line: 8280 | +- LambdaParameterList[@Empty = false, @Size = 1] | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] +Added line: 530 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4662 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "subscriber", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 6740 +Added line: 2608 | +- ExpressionStatement[] +Added line: 2177 +Added line: 7206 | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "stuff", @Name = "stuff", @ParenthesisDepth = 0, @Parenthesized = false] | +- BooleanLiteral[@CompileTimeConstant = true, @LiteralText = "true", @ParenthesisDepth = 0, @Parenthesized = false, @True = true] +- ArgumentList[@Empty = false, @Size = 1] +Added line: 9816 +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1422 +Added line: 4559 +- LambdaParameterList[@Empty = false, @Size = 1] | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1543 +Added line: 9530 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "authToken", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +- BooleanLiteral[@CompileTimeConstant = true, @LiteralText = "false", @ParenthesisDepth = 0, @Parenthesized = false, @True = false] Added line: 7323 +Added line: 2201 +Added line: 5107 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug206.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug206.txt index efe523ff27..579fc9aa46 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug206.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug206.txt @@ -1,23 +1,112 @@ +Added line: 478 +Added line: 5854 +Added line: 187 Added line: 418 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 1041 +- AnnotationTypeBody[@Empty = false, @Size = 1] -Added line: 4 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PUBLIC, @Static = true, @Visibility = Visibility.V_PUBLIC] +Added line: 7128 +Added line: 5762 +Added line: 8729 +Added line: 8672 +Added line: 8333 +Added line: 539 +Added line: 8986 +Added line: 1100 +Added line: 6761 +Added line: 806 +Added line: 973 +Added line: 143 +Added line: 9546 +Added line: 5003 +Added line: 1710 +Added line: 629 +Added line: 1801 +Added line: 2883 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] - | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] -Added line: 5012 +Added line: 7339 +Added line: 3505 +Added line: 7746 +Added line: 1824 +Added line: 2231 +Added line: 5139 +Added line: 7745 +Added line: 5498 +Added line: 9810 +Added line: 3481 +Added line: 1127 +Added line: 4767 +Added line: 9243 +Added line: 4758 +Added line: 7697 +Added line: 735 +Added line: 3363 +Added line: 9757 | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 512 +Added line: 5780 +Added line: 2894 +Added line: 2515 +Added line: 1350 +Added line: 3021 +Added line: 8178 +Added line: 4062 +Added line: 9722 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] +Added line: 4432 Added line: 8802 +Added line: 6461 Added line: 4533 +Added line: 312 Added line: 1897 +Added line: 7730 +Added line: 8261 +Added line: 1031 Added line: 7296 +Added line: 2318 +- VariableDeclarator[@Initializer = true, @Name = "interner"] +Added line: 6456 +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PUBLIC, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "interner", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +Added line: 1068 +Added line: 9390 +Added line: 5567 +Added line: 3701 +Added line: 6475 +Added line: 3036 +Added line: 5297 +Added line: 4810 Added line: 1705 +Added line: 6313 +Added line: 5771 +Added line: 104 +Added line: 2194 +Added line: 6604 +Added line: 1320 +Added line: 5365 +Added line: 6422 +Added line: 5134 +- MethodCall[@CompileTimeConstant = false, @Image = "withInitial", @MethodName = "withInitial", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4802 Added line: 1922 +Added line: 3587 +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2119 +Added line: 7748 +Added line: 6797 +Added line: 5614 +Added line: 4421 +Added line: 393 +Added line: 6471 +Added line: 9865 +Added line: 5093 +Added line: 8306 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ThreadLocal"] +- ArgumentList[@Empty = false, @Size = 1] +Added line: 531 +- AmbiguousName[@CompileTimeConstant = false, @Image = "Interners", @Name = "Interners", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1398 +Added line: 5890 +Added line: 7607 +Added line: 5914 +Added line: 6218 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt index cfc06c4d05..6895bf6faf 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt @@ -1,7 +1,6 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Superclass", @CanonicalName = "Superclass", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Superclass", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | +- ClassBody[@Empty = false, @Size = 3] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Superclass", @Name = "Superclass", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- FormalParameters[@Empty = true, @Size = 0] @@ -13,15 +12,18 @@ | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 81 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Class"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "V"] +Added line: 9075 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "clazz", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] - | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "doStuff", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2989 | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] +Added line: 4757 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "T"] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] @@ -35,9 +37,10 @@ | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 2] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Outer", @Name = "Outer", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] +Added line: 3977 +Added line: 4805 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- FormalParameters[@Empty = true, @Size = 0] - | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -64,6 +67,7 @@ | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Inner"] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Outer"] +Added line: 3311 | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Child", @Name = "Child", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -75,13 +79,16 @@ | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = true, @Super = true, @This = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9869 | | +- ArgumentList[@Empty = true, @Size = 0] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 8197 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 3592 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Child constructor", @Empty = false, @Image = "\"Child constructor\"", @Length = 17, @LiteralText = "\"Child constructor\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases", @CanonicalName = "ParserCornerCases", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ParserCornerCases", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] @@ -90,6 +97,7 @@ | +- ClassBody[@Empty = false, @Size = 8] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "ParserCornerCases", @Name = "ParserCornerCases", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 6855 | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = true, @This = false] @@ -105,13 +113,17 @@ Added line: 5679 | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExplicitConstructorInvocation[@ArgumentCount = 2, @MethodName = "new", @Qualified = false, @Super = false, @This = true] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 6109 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] +Added line: 4778 | | +- ArgumentList[@Empty = false, @Size = 2] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | +- ConstructorDeclaration[@Abstract = false, @Arity = 2, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "ParserCornerCases", @Name = "ParserCornerCases", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 2188 | | +- TypeParameters[@Empty = false, @Size = 1] +Added line: 4290 Added line: 8991 | | | +- TypeParameter[@Image = "W", @Name = "W", @TypeBound = false] | | +- FormalParameters[@Empty = false, @Size = 2] @@ -119,10 +131,13 @@ Added line: 8991 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9198 +Added line: 2611 | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5300 | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] @@ -139,12 +154,16 @@ Added line: 8991 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "title", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = false, @This = true] +Added line: 6198 | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "testGeneric", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STRICTFP), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STRICTFP)] +Added line: 5432 +Added line: 211 | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 2, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 9721 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableDeclarator[@Initializer = true, @Name = "o"] @@ -161,6 +180,7 @@ Added line: 8991 | | +- VariableDeclarator[@Initializer = true, @Name = "v"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "v", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "thisGeneric", @MethodName = "thisGeneric", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1350 | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] @@ -171,10 +191,10 @@ Added line: 8991 | | +- TypeParameters[@Empty = false, @Size = 1] | | | +- TypeParameter[@Image = "X", @Name = "X", @TypeBound = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "X"] - | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "X"] +Added line: 6206 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ReturnStatement[] @@ -184,6 +204,7 @@ Added line: 8991 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Class"] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 2830 | | +- ReturnStatement[] | | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 1, @Parenthesized = true] | | +- ArrayType[@ArrayDepth = 1] @@ -193,9 +214,11 @@ Added line: 8991 | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "bitwiseOperator", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] +Added line: 5082 | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- IfStatement[@Else = false] +Added line: 5017 | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.NE, @ParenthesisDepth = 0, @Parenthesized = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.AND, @ParenthesisDepth = 1, @Parenthesized = true] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "modifiers", @Name = "modifiers", @ParenthesisDepth = 0, @Parenthesized = false] @@ -210,6 +233,7 @@ Added line: 8991 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "shift ", @Empty = false, @Image = "\"shift \"", @Length = 6, @LiteralText = "\"shift \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "PmdTestParent", @CanonicalName = "PmdTestParent", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PmdTestParent", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5469 | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "PmdTestParent", @Name = "PmdTestParent", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] @@ -221,19 +245,23 @@ Added line: 8991 | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "PmdTestChild", @CanonicalName = "PmdTestChild", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PmdTestChild", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3587 | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "PmdTestParent"] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "PmdTestChild", @Name = "PmdTestChild", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 3114 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 1808 | +- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | +- ArgumentList[@Empty = true, @Size = 0] | +- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "PmdTestChild$1", @CanonicalName = null, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_ANONYMOUS] +Added line: 1293 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "create", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] @@ -255,6 +283,7 @@ Added line: 6440 | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3153 | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "memoryMonitor", @Name = "memoryMonitor", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] @@ -265,6 +294,8 @@ Added line: 6440 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] +Added line: 3932 +Added line: 480 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = false, @Name = "name"] @@ -276,9 +307,12 @@ Added line: 6440 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 9907 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3320 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "SimpleBean"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 4369 | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "SimpleBeanUser", @Name = "SimpleBeanUser", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -289,21 +323,25 @@ Added line: 6440 | +- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "SimpleBean"] | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 6369 | +- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "SimpleBeanUser$1", @CanonicalName = null, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_ANONYMOUS] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- Initializer[@Static = false] +Added line: 7242 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 2098 | +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "name", @Name = "name", @ParenthesisDepth = 0, @Parenthesized = false] Added line: 803 +Added line: 7976 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "test", @Empty = false, @Image = "\"test\"", @Length = 4, @LiteralText = "\"test\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SimpleBeanUser2", @CanonicalName = "SimpleBeanUser2", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SimpleBeanUser2", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ExtendsList[@Empty = false, @Size = 1] - | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "SimpleBeanUser"] | +- ClassBody[@Empty = false, @Size = 1] +Added line: 2641 | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "SimpleBeanUser2", @Name = "SimpleBeanUser2", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- FormalParameters[@Empty = true, @Size = 0] @@ -311,12 +349,13 @@ Added line: 803 | +- ArgumentList[@Empty = false, @Size = 1] | +- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "SimpleBean"] - | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 3768 | +- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "SimpleBeanUser2$1", @CanonicalName = null, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_ANONYMOUS] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- Initializer[@Static = false] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 9297 | +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "name", @Name = "name", @ParenthesisDepth = 0, @Parenthesized = false] @@ -336,13 +375,17 @@ Added line: 803 | | | | +- Annotation[@SimpleName = "SuppressWarnings"] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "SuppressWarnings"] | | | | +- AnnotationMemberList[@Empty = false, @Size = 1] +Added line: 7037 | | | | +- MemberValuePair[@Image = "value", @Name = "value", @Shorthand = true] | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "unchecked", @Empty = false, @Image = "\"unchecked\"", @Length = 9, @LiteralText = "\"unchecked\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "i"] +Added line: 8986 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = true, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +Added line: 521 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.LT, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9900 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "10", @IntLiteral = true, @Integral = true, @LiteralText = "10", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 10.0, @ValueAsFloat = 10.0, @ValueAsInt = 10, @ValueAsLong = 10] | | +- ForUpdate[] @@ -352,6 +395,7 @@ Added line: 803 | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- ForStatement[] | | +- ForInit[] +Added line: 5642 | | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- Annotation[@SimpleName = "SuppressWarnings"] @@ -360,7 +404,6 @@ Added line: 803 | | | | +- MemberValuePair[@Image = "value", @Name = "value", @Shorthand = true] | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "unchecked", @Empty = false, @Image = "\"unchecked\"", @Length = 9, @LiteralText = "\"unchecked\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Iterator"] - | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = true, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "it", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "iterator", @MethodName = "iterator", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "values", @MethodName = "values", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "Fachabteilung", @Name = "Fachabteilung", @ParenthesisDepth = 0, @Parenthesized = false] @@ -388,18 +431,23 @@ Added line: 803 | | | +- Annotation[@SimpleName = "SuppressWarnings"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "SuppressWarnings"] | | | +- AnnotationMemberList[@Empty = false, @Size = 1] +Added line: 6366 | | | +- MemberValuePair[@Image = "value", @Name = "value", @Shorthand = true] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "unchecked", @Empty = false, @Image = "\"unchecked\"", @Length = 9, @LiteralText = "\"unchecked\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = false, @Name = "s"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = true, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 3210 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "l", @Name = "l", @ParenthesisDepth = 0, @Parenthesized = false] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "FooBlock", @CanonicalName = "FooBlock", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "FooBlock", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 5420 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = true, @Size = 0] +Added line: 4713 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "MyFoo", @CanonicalName = "MyFoo", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "MyFoo", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7028 | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "MyFoo", @Name = "MyFoo", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -409,6 +457,7 @@ Added line: 803 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "FooBlock"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +Added line: 3493 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Foo", @CanonicalName = "Foo", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Foo", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ExtendsList[@Empty = false, @Size = 1] @@ -417,6 +466,8 @@ Added line: 803 | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Foo", @Name = "Foo", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 7112 +Added line: 5619 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | +- ArgumentList[@Empty = false, @Size = 1] @@ -426,17 +477,23 @@ Added line: 803 | +- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "Foo$1", @CanonicalName = null, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_ANONYMOUS] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] +Added line: 6353 | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "valueOf", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] +Added line: 621 | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 3805 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "object", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 219 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3517 +Added line: 7913 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "fish"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "fish", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -446,6 +503,7 @@ Added line: 803 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SuperTest", @CanonicalName = "SuperTest", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SuperTest", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] +Added line: 8439 | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "iterator", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Iterator"] @@ -464,10 +522,11 @@ Added line: 803 | | +- ReturnStatement[] | | +- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Iterator"] +Added line: 7522 | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 395 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "E"] | | +- ArgumentList[@Empty = true, @Size = 0] - | | +- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "SuperTest$1", @CanonicalName = null, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_ANONYMOUS] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassBody[@Empty = false, @Size = 4] | | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_ANONYMOUS, @Static = false, @Visibility = Visibility.V_PACKAGE] @@ -477,25 +536,31 @@ Added line: 803 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "E"] | | | +- VariableDeclarator[@Initializer = true, @Name = "wrapped"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_ANONYMOUS, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "wrapped", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 2363 +Added line: 210 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "iterator", @MethodName = "iterator", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- SuperExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ImmutableSet"] | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 1438 | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "hasNext", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] | | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BOOLEAN] | | | +- FormalParameters[@Empty = true, @Size = 0] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | | +- ReturnStatement[] +Added line: 2127 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "hasNext", @MethodName = "hasNext", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "wrapped", @Name = "wrapped", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "next", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] +Added line: 175 | | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "E"] | | | +- FormalParameters[@Empty = true, @Size = 0] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 3359 | | | +- ReturnStatement[] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "next", @MethodName = "next", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "wrapped", @Name = "wrapped", @ParenthesisDepth = 0, @Parenthesized = false] @@ -504,6 +569,7 @@ Added line: 803 | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "remove", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] +Added line: 8477 | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 2, @containsComment = false] | | +- IfStatement[@Else = false] @@ -539,7 +605,9 @@ Added line: 803 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Class"] +Added line: 5610 | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 2985 | | +- WildcardType[@LowerBound = false, @UpperBound = true] | +- VariableDeclarator[@Initializer = true, @Name = "c"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "c", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -547,6 +615,7 @@ Added line: 803 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3286 | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- PrimitiveType[@Kind = PrimitiveTypeKind.SHORT] @@ -572,14 +641,19 @@ Added line: 803 | +- PrimitiveType[@Kind = PrimitiveTypeKind.CHAR] +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7758 | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8602 | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] +Added line: 5735 +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3519 | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- VoidType[] +Added line: 4775 +- IfStatement[@Else = false] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] @@ -587,14 +661,19 @@ Added line: 803 | | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4844 | | | | | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2267 | | | | | | | | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 4057 +Added line: 9697 Added line: 3697 | | | | | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | | | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8549 | | | | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.SHORT] | | | | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] @@ -604,12 +683,16 @@ Added line: 3697 | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] +Added line: 1863 +Added line: 101 | | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4710 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.CHAR] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 224 | | | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] @@ -618,8 +701,10 @@ Added line: 3697 | | +- VoidType[] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- IfStatement[@Else = false] +Added line: 5157 | +- MethodCall[@CompileTimeConstant = false, @Image = "equals", @MethodName = "equals", @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 3125 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- MethodCall[@CompileTimeConstant = false, @Image = "getName", @MethodName = "getName", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 1, @Parenthesized = true] @@ -627,15 +712,19 @@ Added line: 3697 | | +- ArgumentList[@Empty = true, @Size = 0] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- IfStatement[@Else = false] +Added line: 1704 +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "equals", @MethodName = "equals", @ParenthesisDepth = 1, @Parenthesized = true] | | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] +Added line: 6204 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "clazz", @Name = "clazz", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "equals", @MethodName = "equals", @ParenthesisDepth = 1, @Parenthesized = true] | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 5217 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 4963 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "clazz", @Name = "clazz", @ParenthesisDepth = 0, @Parenthesized = false] +- Block[@Empty = true, @Size = 0, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt index a3b43f4352..4bac379f0f 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt @@ -10,6 +10,7 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.List", @ImportedSimpleName = "List", @ModuleImport = false, @PackageName = "java.util", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.Map", @ImportedSimpleName = "Map", @ModuleImport = false, @PackageName = "java.util", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.zip.ZipEntry", @ImportedSimpleName = "ZipEntry", @ModuleImport = false, @PackageName = "java.util.zip", @Static = false] +Added line: 3773 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases17", @CanonicalName = "ParserCornerCases17", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ParserCornerCases17", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 9] @@ -24,50 +25,62 @@ Added line: 5170 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 2608 | +- Block[@Empty = false, @Size = 9, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] +Added line: 4947 | | +- VariableDeclarator[@Initializer = true, @Name = "aByte"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "aByte", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- CastExpression[@CompileTimeConstant = true, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00100001", @IntLiteral = true, @Integral = true, @LiteralText = "0b00100001", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 33.0, @ValueAsFloat = 33.0, @ValueAsInt = 33, @ValueAsLong = 33] +Added line: 1049 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 1456 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.SHORT] | | +- VariableDeclarator[@Initializer = true, @Name = "aShort"] +Added line: 8970 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "aShort", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- CastExpression[@CompileTimeConstant = true, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.SHORT] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b1010000101000101", @IntLiteral = true, @Integral = true, @LiteralText = "0b1010000101000101", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 41285.0, @ValueAsFloat = 41285.0, @ValueAsInt = 41285, @ValueAsLong = 41285] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5254 +Added line: 3340 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "anInt1"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "anInt1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00000000100000000010100001010001", @IntLiteral = true, @Integral = true, @LiteralText = "0b00000000100000000010100001010001", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 8398929.0, @ValueAsFloat = 8398929.0, @ValueAsInt = 8398929, @ValueAsLong = 8398929] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 7906 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "anInt2"] +Added line: 1984 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "anInt2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 3119 | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b101", @IntLiteral = true, @Integral = true, @LiteralText = "0b101", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "anInt3"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "anInt3", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0B101", @IntLiteral = true, @Integral = true, @LiteralText = "0B101", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 782 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "aLong"] +Added line: 658 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "aLong", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b0000000000000000000000000000000000000000100010001000010000010000L", @IntLiteral = false, @Integral = true, @LiteralText = "0b0000000000000000000000000000000000000000100010001000010000010000L", @LongLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 8946704.0, @ValueAsFloat = 8946704.0, @ValueAsInt = 8946704, @ValueAsLong = 8946704] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] Added line: 5816 | | +- ArrayType[@ArrayDepth = 1] +Added line: 4453 | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | +- ArrayTypeDim[@Varargs = false] @@ -75,10 +88,13 @@ Added line: 5816 | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "phases", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00110001", @IntLiteral = true, @Integral = true, @LiteralText = "0b00110001", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 49.0, @ValueAsFloat = 49.0, @ValueAsInt = 49, @ValueAsLong = 49] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b01100010", @IntLiteral = true, @Integral = true, @LiteralText = "0b01100010", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 98.0, @ValueAsFloat = 98.0, @ValueAsInt = 98, @ValueAsLong = 98] +Added line: 1814 | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b11000100", @IntLiteral = true, @Integral = true, @LiteralText = "0b11000100", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 196.0, @ValueAsFloat = 196.0, @ValueAsInt = 196, @ValueAsLong = 196] +Added line: 3142 | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b10001001", @IntLiteral = true, @Integral = true, @LiteralText = "0b10001001", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 137.0, @ValueAsFloat = 137.0, @ValueAsInt = 137, @ValueAsLong = 137] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00010011", @IntLiteral = true, @Integral = true, @LiteralText = "0b00010011", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 19.0, @ValueAsFloat = 19.0, @ValueAsInt = 19, @ValueAsLong = 19] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00100110", @IntLiteral = true, @Integral = true, @LiteralText = "0b00100110", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 38.0, @ValueAsFloat = 38.0, @ValueAsInt = 38, @ValueAsLong = 38] +Added line: 2891 | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b01001100", @IntLiteral = true, @Integral = true, @LiteralText = "0b01001100", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 76.0, @ValueAsFloat = 76.0, @ValueAsInt = 76, @ValueAsLong = 76] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b10011000", @IntLiteral = true, @Integral = true, @LiteralText = "0b10011000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 152.0, @ValueAsFloat = 152.0, @ValueAsInt = 152, @ValueAsLong = 152] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -100,6 +116,7 @@ Added line: 5816 | | +- VariableDeclarator[@Initializer = true, @Name = "register"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "register", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.AND, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5824 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "instruction", @Name = "instruction", @ParenthesisDepth = 0, @Parenthesized = false] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00001111", @IntLiteral = true, @Integral = true, @LiteralText = "0b00001111", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 15.0, @ValueAsFloat = 15.0, @ValueAsInt = 15, @ValueAsLong = 15] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] @@ -123,16 +140,18 @@ Added line: 5816 | | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00110000", @IntLiteral = true, @Integral = true, @LiteralText = "0b00110000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 48.0, @ValueAsFloat = 48.0, @ValueAsInt = 48, @ValueAsLong = 48] | | +- BreakStatement[@Label = null] | +- SwitchFallthroughBranch[@Default = false] +Added line: 4645 | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b01000000", @IntLiteral = true, @Integral = true, @LiteralText = "0b01000000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 64.0, @ValueAsFloat = 64.0, @ValueAsInt = 64, @ValueAsLong = 64] +Added line: 1637 | | +- BreakStatement[@Label = null] +Added line: 3319 | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b01010000", @IntLiteral = true, @Integral = true, @LiteralText = "0b01010000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 80.0, @ValueAsFloat = 80.0, @ValueAsInt = 80, @ValueAsLong = 80] | | +- BreakStatement[@Label = null] | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] - | | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b01100000", @IntLiteral = true, @Integral = true, @LiteralText = "0b01100000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 96.0, @ValueAsFloat = 96.0, @ValueAsInt = 96, @ValueAsLong = 96] | | +- BreakStatement[@Label = null] | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] @@ -147,6 +166,7 @@ Added line: 5816 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "underscoreInNumericLiterals", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] +Added line: 4447 | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 15, @containsComment = true] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -154,18 +174,19 @@ Added line: 5816 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "creditCardNumber"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "creditCardNumber", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] - | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1111_2222_3333_4444L", @IntLiteral = false, @Integral = true, @LiteralText = "1111_2222_3333_4444L", @LongLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.111222233334444E15, @ValueAsFloat = 1.11122226E15, @ValueAsInt = -1770257748, @ValueAsLong = 1111222233334444] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "socialSecurityNumber"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "socialSecurityNumber", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "999_99_9999L", @IntLiteral = false, @Integral = true, @LiteralText = "999_99_9999L", @LongLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 9.99999999E8, @ValueAsFloat = 1.0E9, @ValueAsInt = 999999999, @ValueAsLong = 999999999] +Added line: 7891 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.FLOAT] | | +- VariableDeclarator[@Initializer = true, @Name = "pi"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "pi", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9229 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = true, @Image = "3.14_15F", @IntLiteral = false, @Integral = false, @LiteralText = "3.14_15F", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.1415, @ValueAsFloat = 3.1415, @ValueAsInt = 3, @ValueAsLong = 3] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -178,31 +199,42 @@ Added line: 5816 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "hexWords"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "hexWords", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5920 | | +- NumericLiteral[@Base = 16, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0x0001_CAFE", @IntLiteral = true, @Integral = true, @LiteralText = "0x0001_CAFE", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 117502.0, @ValueAsFloat = 117502.0, @ValueAsInt = 117502, @ValueAsLong = 117502] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "maxLong"] - | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "maxLong", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 16, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0x7fff_ffff_ffff_ffffL", @IntLiteral = false, @Integral = true, @LiteralText = "0x7fff_ffff_ffff_ffffL", @LongLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 9.223372036854776E18, @ValueAsFloat = 9.223372E18, @ValueAsInt = -1, @ValueAsLong = 9223372036854775807] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7476 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] +Added line: 9406 +Added line: 4861 +Added line: 8417 | | +- VariableDeclarator[@Initializer = true, @Name = "nybbles"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "nybbles", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b0010_0101", @IntLiteral = true, @Integral = true, @LiteralText = "0b0010_0101", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 37.0, @ValueAsFloat = 37.0, @ValueAsInt = 37, @ValueAsLong = 37] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3689 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] +Added line: 3279 +Added line: 1676 +Added line: 199 | | +- VariableDeclarator[@Initializer = true, @Name = "bytes"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "bytes", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00000000_10001000_10000100_00010000", @IntLiteral = true, @Integral = true, @LiteralText = "0b00000000_10001000_10000100_00010000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 8946704.0, @ValueAsFloat = 8946704.0, @ValueAsInt = 8946704, @ValueAsLong = 8946704] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 3828 | | +- VariableDeclarator[@Initializer = true, @Name = "_52"] - | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_52", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 815 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 4508 +Added line: 9273 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] @@ -218,6 +250,7 @@ Added line: 5816 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 2128 | | +- VariableDeclarator[@Initializer = true, @Name = "x4"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x4", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "5_______2", @IntLiteral = true, @Integral = true, @LiteralText = "5_______2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 52.0, @ValueAsFloat = 52.0, @ValueAsInt = 52, @ValueAsLong = 52] @@ -231,10 +264,12 @@ Added line: 5816 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x9"] +Added line: 5023 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x9", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 8, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0_52", @IntLiteral = true, @Integral = true, @LiteralText = "0_52", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3464 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "x10"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x10", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -245,7 +280,9 @@ Added line: 5816 | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 4, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 1428 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8756 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "dayOfWeekArg"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "dayOfWeekArg", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -264,6 +301,7 @@ Added line: 5711 | | | +- ExpressionStatement[] | | | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "typeOfDay", @Name = "typeOfDay", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2110 | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Start of work week", @Empty = false, @Image = "\"Start of work week\"", @Length = 18, @LiteralText = "\"Start of work week\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- BreakStatement[@Label = null] | | +- SwitchFallthroughBranch[@Default = false] @@ -272,6 +310,7 @@ Added line: 5711 | | +- SwitchFallthroughBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Wednesday", @Empty = false, @Image = "\"Wednesday\"", @Length = 9, @LiteralText = "\"Wednesday\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 6474 | | +- SwitchFallthroughBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Thursday", @Empty = false, @Image = "\"Thursday\"", @Length = 8, @LiteralText = "\"Thursday\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -282,6 +321,7 @@ Added line: 5711 | | | +- BreakStatement[@Label = null] | | +- SwitchFallthroughBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 3194 | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Friday", @Empty = false, @Image = "\"Friday\"", @Length = 6, @LiteralText = "\"Friday\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- ExpressionStatement[] | | | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] @@ -289,18 +329,24 @@ Added line: 5711 | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "End of work week", @Empty = false, @Image = "\"End of work week\"", @Length = 16, @LiteralText = "\"End of work week\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- BreakStatement[@Label = null] | | +- SwitchFallthroughBranch[@Default = false] +Added line: 1937 | | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 1266 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Saturday", @Empty = false, @Image = "\"Saturday\"", @Length = 8, @LiteralText = "\"Saturday\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- SwitchFallthroughBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Sunday", @Empty = false, @Image = "\"Sunday\"", @Length = 6, @LiteralText = "\"Sunday\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- ExpressionStatement[] | | | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6400 | | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "typeOfDay", @Name = "typeOfDay", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9137 | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Weekend", @Empty = false, @Image = "\"Weekend\"", @Length = 7, @LiteralText = "\"Weekend\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- BreakStatement[@Label = null] +Added line: 4627 | | +- SwitchFallthroughBranch[@Default = true] | | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 7165 | | +- ThrowStatement[] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] @@ -310,19 +356,25 @@ Added line: 5711 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "dayOfWeekArg", @Name = "dayOfWeekArg", @ParenthesisDepth = 0, @Parenthesized = false] | +- ReturnStatement[] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "typeOfDay", @Name = "typeOfDay", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 804 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases17$MyClass", @CanonicalName = "ParserCornerCases17.MyClass", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "MyClass", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "X", @Name = "X", @TypeBound = false] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "MyClass", @Name = "MyClass", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] +Added line: 8201 +Added line: 2029 +Added line: 1942 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 7584 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "T"] +Added line: 4221 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "typeInferenceForGenericInstanceCreation", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] @@ -343,6 +395,7 @@ Added line: 5711 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = true, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "HashMap"] | | | +- TypeArguments[@Diamond = true, @Empty = true, @Size = 0] +Added line: 2292 | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -350,13 +403,16 @@ Added line: 5711 | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "list"] +Added line: 8738 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "list", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = true, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ArrayList"] | | | +- TypeArguments[@Diamond = true, @Empty = true, @Size = 0] | | +- ArgumentList[@Empty = true, @Size = 0] | +- ExpressionStatement[] +Added line: 63 | | +- MethodCall[@CompileTimeConstant = false, @Image = "add", @MethodName = "add", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1646 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "list", @Name = "list", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A", @Empty = false, @Image = "\"A\"", @Length = 1, @LiteralText = "\"A\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -375,18 +431,25 @@ Added line: 5711 | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "addAll", @MethodName = "addAll", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "list", @Name = "list", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7262 | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 5177 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "list2", @Name = "list2", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9815 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "MyClass"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 3688 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] | +- VariableDeclarator[@Initializer = true, @Name = "myObject"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "myObject", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = true, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 4097 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "MyClass"] | | +- TypeArguments[@Diamond = true, @Empty = true, @Size = 0] +Added line: 5967 +Added line: 1933 | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "", @Empty = true, @Image = "\"\"", @Length = 0, @LiteralText = "\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "theTryWithResourcesStatement", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] @@ -398,7 +461,9 @@ Added line: 5711 | +- Block[@Empty = false, @Size = 7, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2833 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 6291 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "path", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "/foo", @Empty = false, @Image = "\"/foo\"", @Length = 4, @LiteralText = "\"/foo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- TryStatement[@TryWithResources = true] @@ -412,7 +477,7 @@ Added line: 5711 | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "BufferedReader"] | | | +- ArgumentList[@Empty = false, @Size = 1] - | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 7445 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "FileReader"] | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "path", @Name = "path", @ParenthesisDepth = 0, @Parenthesized = false] @@ -429,14 +494,18 @@ Added line: 5711 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "outputFileName"] +Added line: 2819 +Added line: 8521 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "outputFileName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "/foo-out", @Empty = false, @Image = "\"/foo-out\"", @Length = 8, @LiteralText = "\"/foo-out\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 6271 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "zipFileName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "zipFileName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "/foo.zip", @Empty = false, @Image = "\"/foo.zip\"", @Length = 8, @LiteralText = "\"/foo.zip\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 2708 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = true, @PackageQualifier = "java.nio.charset", @SimpleName = "Charset"] @@ -447,30 +516,36 @@ Added line: 5711 | | | +- ClassType[@FullyQualified = true, @PackageQualifier = "java.nio.charset", @SimpleName = "Charset"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "US-ASCII", @Empty = false, @Image = "\"US-ASCII\"", @Length = 8, @LiteralText = "\"US-ASCII\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5182 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = true, @PackageQualifier = "java.nio.file", @SimpleName = "Path"] | | +- VariableDeclarator[@Initializer = true, @Name = "outputFilePath"] +Added line: 2983 Added line: 4455 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "outputFilePath", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "get", @MethodName = "get", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = true, @PackageQualifier = "java.nio.file", @SimpleName = "Paths"] +Added line: 2164 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "outputFileName", @Name = "outputFileName", @ParenthesisDepth = 0, @Parenthesized = false] | +- TryStatement[@TryWithResources = true] - | +- ResourceList[@Empty = false, @Size = 2, @TrailingSemiColon = false] | | +- Resource[@ConciseResource = false] | | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = true, @PackageQualifier = "java.util.zip", @SimpleName = "ZipFile"] +Added line: 1697 | | | +- VariableDeclarator[@Initializer = true, @Name = "zf"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "zf", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = true, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | | +- ClassType[@FullyQualified = true, @PackageQualifier = "java.util.zip", @SimpleName = "ZipFile"] +Added line: 39 | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 5639 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zipFileName", @Name = "zipFileName", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Resource[@ConciseResource = false] +Added line: 1640 | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = true, @PackageQualifier = "java.io", @SimpleName = "BufferedWriter"] @@ -478,6 +553,8 @@ Added line: 4455 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "writer", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = true, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "newBufferedWriter", @MethodName = "newBufferedWriter", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 380 +Added line: 3464 | | | +- ClassType[@FullyQualified = true, @PackageQualifier = "java.nio.file", @SimpleName = "Files"] | | +- ArgumentList[@Empty = false, @Size = 2] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "outputFilePath", @Name = "outputFilePath", @ParenthesisDepth = 0, @Parenthesized = false] @@ -494,9 +571,11 @@ Added line: 4455 | | +- VariableDeclarator[@Initializer = true, @Name = "entries"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = true, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "entries", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "entries", @MethodName = "entries", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9864 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zf", @Name = "zf", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- MethodCall[@CompileTimeConstant = false, @Image = "hasMoreElements", @MethodName = "hasMoreElements", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6727 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "entries", @Name = "entries", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 3, @containsComment = false] @@ -520,6 +599,7 @@ Added line: 4455 | | | +- CastExpression[@CompileTimeConstant = false, @ParenthesisDepth = 1, @Parenthesized = true] | | | | +- ClassType[@FullyQualified = true, @PackageQualifier = "java.util.zip", @SimpleName = "ZipEntry"] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "nextElement", @MethodName = "nextElement", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 588 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "entries", @Name = "entries", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- ArgumentList[@Empty = true, @Size = 0] @@ -539,6 +619,7 @@ Added line: 4455 | +- FormalParameters[@Empty = true, @Size = 0] | +- ThrowsList[@Empty = false, @Size = 2] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IOException"] +Added line: 6065 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "SQLException"] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- TryStatement[@TryWithResources = false] @@ -548,16 +629,20 @@ Added line: 4455 | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "File"] | | | | +- ArgumentList[@Empty = false, @Size = 1] - | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "foo", @Empty = false, @Image = "\"foo\"", @Length = 3, @LiteralText = "\"foo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- ArgumentList[@Empty = true, @Size = 0] Added line: 4532 | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ThrowStatement[] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 1175 +Added line: 8745 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "SQLException"] +Added line: 4228 | | +- ArgumentList[@Empty = true, @Size = 0] | +- CatchClause[] | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = true, @Name = "ex", @Visibility = Visibility.V_PACKAGE] +Added line: 2331 +Added line: 5434 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- UnionType[] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IOException"] @@ -565,7 +650,9 @@ Added line: 4532 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = true, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "ex", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- ExpressionStatement[] +Added line: 8437 | | +- MethodCall[@CompileTimeConstant = false, @Image = "printStackTrace", @MethodName = "printStackTrace", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3553 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "ex", @Name = "ex", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- ThrowStatement[] @@ -581,7 +668,9 @@ Added line: 4532 +- VariableDeclarator[@Initializer = true, @Name = "initialSizeGlobal"] +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "initialSizeGlobal", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +- CastExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1567 +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 3498 +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.MUL, @ParenthesisDepth = 1, @Parenthesized = true] +- MethodCall[@CompileTimeConstant = false, @Image = "size", @MethodName = "size", @ParenthesisDepth = 0, @Parenthesized = false] | +- AmbiguousName[@CompileTimeConstant = false, @Image = "profilingContext.m_profileItems", @Name = "profilingContext.m_profileItems", @ParenthesisDepth = 0, @Parenthesized = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt index d30ef647a7..80b9ddf6a3 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt @@ -1,10 +1,12 @@ +- CompilationUnit[@PackageName = ""] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.awt.Button", @ImportedSimpleName = "Button", @ModuleImport = false, @PackageName = "java.awt", @Static = false] +Added line: 9388 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.io.File", @ImportedSimpleName = "File", @ModuleImport = false, @PackageName = "java.io", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.io.FileFilter", @ImportedSimpleName = "FileFilter", @ModuleImport = false, @PackageName = "java.io", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.security.PrivilegedAction", @ImportedSimpleName = "PrivilegedAction", @ModuleImport = false, @PackageName = "java.security", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.Comparator", @ImportedSimpleName = "Comparator", @ModuleImport = false, @PackageName = "java.util", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.concurrent.Callable", @ImportedSimpleName = "Callable", @ModuleImport = false, @PackageName = "java.util.concurrent", @Static = false] +Added line: 3354 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.function.Function", @ImportedSimpleName = "Function", @ModuleImport = false, @PackageName = "java.util.function", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.function.IntFunction", @ImportedSimpleName = "IntFunction", @ModuleImport = false, @PackageName = "java.util.function", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.function.Supplier", @ImportedSimpleName = "Supplier", @ModuleImport = false, @PackageName = "java.util.function", @Static = false] @@ -15,31 +17,38 @@ | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "lambdas", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] +Added line: 108 +Added line: 9977 | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 24, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 686 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "FileFilter"] +Added line: 1212 | | | +- VariableDeclarator[@Initializer = true, @Name = "java"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "java", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4196 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "File"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 3748 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "endsWith", @MethodName = "endsWith", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5950 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getName", @MethodName = "getName", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 5087 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ".java", @Empty = false, @Image = "\".java\"", @Length = 5, @LiteralText = "\".java\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "FileFilter"] | | | +- VariableDeclarator[@Initializer = true, @Name = "java2"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "java2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] - | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -50,6 +59,7 @@ | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ".java", @Empty = false, @Image = "\".java\"", @Length = 5, @LiteralText = "\".java\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 120 | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "FileFilter"] @@ -68,21 +78,24 @@ | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ".java", @Empty = false, @Image = "\".java\"", @Length = 5, @LiteralText = "\".java\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "FileFilter"] | | | +- VariableDeclarator[@Initializer = true, @Name = "java4"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "java4", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 1, @Parenthesized = true] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] +Added line: 7442 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "endsWith", @MethodName = "endsWith", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getName", @MethodName = "getName", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5318 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 4126 | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ".java", @Empty = false, @Image = "\".java\"", @Length = 5, @LiteralText = "\".java\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- ExpressionStatement[] +Added line: 104 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "forEach", @MethodName = "forEach", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "parallel", @MethodName = "parallel", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "range", @MethodName = "range", @ParenthesisDepth = 0, @Parenthesized = false] @@ -92,12 +105,14 @@ | | | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "length", @Name = "length", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "array", @Name = "array", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 9447 | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- LambdaExpression[@Arity = 1, @BlockBody = true, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 901 | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | | +- ExpressionStatement[] | | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] @@ -107,11 +122,13 @@ | | | +- MethodCall[@CompileTimeConstant = false, @Image = "apply", @MethodName = "apply", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "generator", @Name = "generator", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 2427 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ArrayType[@ArrayDepth = 1] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "FileFilter"] +Added line: 8617 | | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | | +- ArrayTypeDim[@Varargs = false] | | | +- VariableDeclarator[@Initializer = true, @Name = "filters"] @@ -122,6 +139,7 @@ | | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | | +- ArrayTypeDim[@Varargs = false] | | | +- ArrayInitializer[@CompileTimeConstant = false, @Length = 3, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7269 | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] @@ -129,6 +147,7 @@ | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "exists", @MethodName = "exists", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4437 | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- LambdaParameterList[@Empty = false, @Size = 1] @@ -140,11 +159,14 @@ | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 1] +Added line: 5491 | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 4353 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "startsWith", @MethodName = "startsWith", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getName", @MethodName = "getName", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2185 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- ArgumentList[@Empty = false, @Size = 1] @@ -162,6 +184,7 @@ | | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7747 | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "exists", @MethodName = "exists", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] @@ -215,6 +238,7 @@ Added line: 7290 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Runnable"] | | | +- VariableDeclarator[@Initializer = true, @Name = "r"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1678 | | | +- LambdaExpression[@Arity = 0, @BlockBody = true, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = true, @Size = 0] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -231,15 +255,16 @@ Added line: 7290 | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Runnable"] | | | +- VariableDeclarator[@Initializer = true, @Name = "sup"] - | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "sup", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- LambdaExpression[@Arity = 0, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = true, @Size = 0] | | | +- LambdaExpression[@Arity = 0, @BlockBody = true, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = true, @Size = 0] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | | +- ExpressionStatement[] +Added line: 8762 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6927 | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | | +- ArgumentList[@Empty = false, @Size = 1] @@ -255,10 +280,12 @@ Added line: 7290 | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Callable"] +Added line: 4189 | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] | | | +- VariableDeclarator[@Initializer = true, @Name = "c2"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "c2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5375 | | | +- ConditionalExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "flag", @Name = "flag", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaExpression[@Arity = 0, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = true, @ParenthesisDepth = 1, @Parenthesized = true] @@ -266,7 +293,6 @@ Added line: 7290 | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "23", @IntLiteral = true, @Integral = true, @LiteralText = "23", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 23.0, @ValueAsFloat = 23.0, @ValueAsInt = 23, @ValueAsLong = 23] | | | +- LambdaExpression[@Arity = 0, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = true, @ParenthesisDepth = 1, @Parenthesized = true] | | | +- LambdaParameterList[@Empty = true, @Size = 0] - | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "42", @IntLiteral = true, @Integral = true, @LiteralText = "42", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] @@ -290,6 +316,7 @@ Added line: 7290 | | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ParserCornerCases18"] | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 8814 | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -297,6 +324,7 @@ Added line: 7290 | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableDeclarator[@Initializer = true, @Name = "comparer"] +Added line: 9363 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "comparer", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- LambdaExpression[@Arity = 2, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 2] @@ -311,6 +339,7 @@ Added line: 7290 | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s2", @Name = "s2", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ExpressionStatement[] +Added line: 782 | | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "comparer", @Name = "comparer", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaExpression[@Arity = 2, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] @@ -319,13 +348,16 @@ Added line: 7290 | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5468 | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "compareToIgnoreCase", @MethodName = "compareToIgnoreCase", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s1", @Name = "s1", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s2", @Name = "s2", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4812 | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1109 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Button"] | | | +- VariableDeclarator[@Initializer = true, @Name = "button"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "button", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -337,6 +369,7 @@ Added line: 7290 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "button", @Name = "button", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1018 | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -374,8 +407,10 @@ Added line: 9023 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "lambda2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- LambdaExpression[@Arity = 2, @BlockBody = true, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 2] +Added line: 2600 | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5261 | | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] @@ -383,6 +418,7 @@ Added line: 9023 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 4816 | | | +- ExpressionStatement[] | | | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] @@ -404,6 +440,7 @@ Added line: 9023 | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | | +- ExpressionStatement[] +Added line: 5925 | | | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -435,6 +472,7 @@ Added line: 9023 | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "d", @Name = "d", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 8073 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "TriConsumer"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 3] @@ -446,12 +484,14 @@ Added line: 9023 | | +- LambdaExpression[@Arity = 3, @BlockBody = true, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- LambdaParameterList[@Empty = false, @Size = 3] | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] +Added line: 6630 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] +Added line: 2117 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "d", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -464,6 +504,7 @@ Added line: 9023 | | | +- Annotation[@SimpleName = "FunctionalInterface"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "FunctionalInterface"] | | +- TypeParameters[@Empty = false, @Size = 3] +Added line: 4043 | | | +- TypeParameter[@Image = "A", @Name = "A", @TypeBound = false] | | | +- TypeParameter[@Image = "B", @Name = "B", @TypeBound = false] | | | +- TypeParameter[@Image = "C", @Name = "C", @TypeBound = false] @@ -477,6 +518,8 @@ Added line: 9023 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 2251 +Added line: 2921 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "B"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -489,9 +532,10 @@ Added line: 9023 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Runnable"] | | +- VariableDeclarator[@Initializer = true, @Name = "r1"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "r1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 3826 +Added line: 526 | | +- LambdaExpression[@Arity = 0, @BlockBody = true, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- LambdaParameterList[@Empty = true, @Size = 0] - | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -535,6 +579,7 @@ Added line: 9023 | | +- VoidType[] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 9780 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ArrayType[@ArrayDepth = 1] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "FileFilter"] @@ -582,8 +627,8 @@ Added line: 9023 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c1", @Name = "c1", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6325 | | +- MethodCall[@CompileTimeConstant = false, @Image = "getKey", @MethodName = "getKey", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c2", @Name = "c2", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "methodReferences", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] @@ -594,6 +639,7 @@ Added line: 9023 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Runnable"] | | | +- VariableDeclarator[@Initializer = true, @Name = "r"] +Added line: 8744 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = false, @MethodName = "toDoLater", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] @@ -608,6 +654,7 @@ Added line: 9023 | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1893 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ParserCornerCases18"] | | | +- VariableDeclarator[@Initializer = true, @Name = "pc"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "pc", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -627,17 +674,21 @@ Added line: 9023 | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableDeclarator[@Initializer = true, @Name = "s"] +Added line: 3995 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = false, @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2371 | | | +- SuperExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Runnable"] | | | +- VariableDeclarator[@Initializer = true, @Name = "r2"] +Added line: 4072 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = false, @MethodName = "staticMethod", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ParserCornerCases18"] +Added line: 3686 | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IntFunction"] @@ -647,14 +698,15 @@ Added line: 9023 | | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | | +- ArrayTypeDim[@Varargs = false] | | | +- VariableDeclarator[@Initializer = true, @Name = "arrayMaker"] +Added line: 6848 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "arrayMaker", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = true, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2684 | | | +- ArrayType[@ArrayDepth = 1] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | +- ArrayTypeDim[@Varargs = false] - | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] @@ -662,11 +714,14 @@ Added line: 9023 | | | +- ArrayTypeDim[@Varargs = false] | | +- VariableDeclarator[@Initializer = true, @Name = "array"] | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "array", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 3536 | | +- MethodCall[@CompileTimeConstant = false, @Image = "apply", @MethodName = "apply", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "arrayMaker", @Name = "arrayMaker", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "10", @IntLiteral = true, @Integral = true, @LiteralText = "10", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 10.0, @ValueAsFloat = 10.0, @ValueAsInt = 10, @ValueAsLong = 10] +Added line: 5624 | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases18$PmdMethodReferenceTest", @CanonicalName = "ParserCornerCases18.PmdMethodReferenceTest", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PmdMethodReferenceTest", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 4210 | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | | +- ClassBody[@Empty = false, @Size = 3] | | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] @@ -674,6 +729,7 @@ Added line: 9023 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Function"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 2] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] +Added line: 2648 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] | | | +- VariableDeclarator[@Initializer = false, @Name = "theFunction"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "theFunction", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] @@ -709,9 +765,11 @@ Added line: 9023 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 8018 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "run", @Empty = false, @Image = "\"run\"", @Length = 3, @LiteralText = "\"run\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "typeAnnotations", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 5840 | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] @@ -733,6 +791,7 @@ Added line: 9023 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "MyObject"] +Added line: 2235 | | | +- Annotation[@SimpleName = "Interned"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Interned"] | | +- ArgumentList[@Empty = true, @Size = 0] @@ -754,9 +813,11 @@ Added line: 5369 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 3301 | | +- ThrowsList[@Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "TemperatureException"] | | | +- Annotation[@SimpleName = "Critical"] +Added line: 4074 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Critical"] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases18$X", @CanonicalName = "ParserCornerCases18.X", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "X", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] @@ -764,6 +825,7 @@ Added line: 5369 | | +- ClassBody[@Empty = false, @Size = 3] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "lambaWithIf", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 3718 | | | +- VoidType[] | | | +- FormalParameters[@Empty = true, @Size = 0] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -798,6 +860,7 @@ Added line: 5369 | | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "hashCode", @MethodName = "hashCode", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "b", @Name = "b", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 2954 | | | | +- IfStatement[@Else = false] | | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "equals", @MethodName = "equals", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] @@ -817,12 +880,13 @@ Added line: 5369 | | | +- VoidType[] | | | +- FormalParameters[@Empty = true, @Size = 0] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 7563 | | | +- ExpressionStatement[] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "count", @MethodName = "count", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "sorted", @MethodName = "sorted", @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "of", @MethodName = "of", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Stream"] +Added line: 8919 | | | | | +- ArgumentList[@Empty = false, @Size = 3] | | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] @@ -849,6 +913,8 @@ Added line: 5369 | | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "hashCode", @MethodName = "hashCode", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2654 +Added line: 3824 | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "b", @Name = "b", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | | +- IfStatement[@Else = false] @@ -858,6 +924,7 @@ Added line: 5369 | | | | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "X"] | | | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 3250 | | | | | +- ExpressionStatement[] | | | | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] @@ -865,29 +932,34 @@ Added line: 5369 | | | | +- ReturnStatement[] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 4996 | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "lambdaWithPropertyAssignment", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] +Added line: 3972 | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "event", @Name = "event", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "object", @Name = "object", @ParenthesisDepth = 0, @Parenthesized = false] | | +- LambdaExpression[@Arity = 0, @BlockBody = true, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- LambdaParameterList[@Empty = true, @Size = 0] +Added line: 1163 | | +- Block[@Empty = false, @Size = 2, @containsComment = true] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Request"] | | | +- VariableDeclarator[@Initializer = true, @Name = "request"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "request", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9161 | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Request"] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- ExpressionStatement[] | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "id", @Name = "id", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3683 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "request", @Name = "request", @ParenthesisDepth = 0, @Parenthesized = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "42", @IntLiteral = true, @Integral = true, @LiteralText = "42", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "testWildCardWithAnnotation", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] @@ -895,11 +967,13 @@ Added line: 5369 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "List"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = false, @UpperBound = true] +Added line: 6052 | | | +- Annotation[@SimpleName = "AnnotatedUsage"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "AnnotatedUsage"] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ReturnStatement[] +Added line: 4228 | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "testAnnotationsToArrayElements", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] @@ -911,7 +985,6 @@ Added line: 5369 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Nullable"] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] - | | +- ReturnStatement[] | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "getBytes", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] @@ -934,6 +1007,7 @@ Added line: 2733 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "NonNull"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = false, @UpperBound = true] +Added line: 7702 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "T"] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -975,6 +1049,7 @@ Added line: 2733 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "T"] | | | +- ArrayDimensions[@Empty = false, @Size = 2] | | | +- ArrayTypeDim[@Varargs = false] +Added line: 3995 | | | +- ArrayTypeDim[@Varargs = false] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] @@ -982,11 +1057,13 @@ Added line: 2733 | | | +- ArrayType[@ArrayDepth = 2] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "T"] | | | | +- ArrayDimensions[@Empty = false, @Size = 2] +Added line: 5117 | | | | +- ArrayTypeDim[@Varargs = false] | | | | | +- Annotation[@SimpleName = "Anno"] | | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Anno"] | | | | +- ArrayTypeDim[@Varargs = false] | | | | +- Annotation[@SimpleName = "Anno"] +Added line: 5480 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Anno"] | | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "arr", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 2, @containsComment = false] @@ -997,6 +1074,7 @@ Added line: 2733 | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | | +- ThrowStatement[] | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 9555 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "NullPointerException"] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- ReturnStatement[] @@ -1019,13 +1097,13 @@ Added line: 2733 | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | +- FormalParameters[@Empty = false, @Size = 1] - | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @Varargs = true, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | | +- ArrayType[@ArrayDepth = 1] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | | +- ArrayTypeDim[@Varargs = true] | | | | +- Annotation[@SimpleName = "NotNull"] +Added line: 8402 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "NotNull"] | | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "array", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -1045,6 +1123,7 @@ Added line: 2733 | | | +- MemberValuePair[@Image = "value", @Name = "value", @Shorthand = true] | | | +- MemberValueArrayInitializer[] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "TYPE_USE", @Name = "TYPE_USE", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2266 | | +- AnnotationTypeBody[@Empty = true, @Size = 0] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "testMultiDimArrayWithAnnotations", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] @@ -1060,6 +1139,7 @@ Added line: 2733 | | +- ArrayType[@ArrayDepth = 3] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- ArrayDimensions[@Empty = false, @Size = 3] +Added line: 6525 | | +- ArrayDimExpr[@Varargs = false] | | | +- Annotation[@SimpleName = "NonNull"] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "NonNull"] @@ -1073,6 +1153,7 @@ Added line: 5236 | | +- Annotation[@SimpleName = "NonNull"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "NonNull"] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +Added line: 4709 | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "methodWithReceiverParameter", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] @@ -1089,6 +1170,7 @@ Added line: 5236 | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 1680 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "other", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "methodWithReceiverParameterWithAnnotation", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] @@ -1101,6 +1183,7 @@ Added line: 5236 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "AnnotatedUsage"] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4256 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "other", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] @@ -1120,6 +1203,7 @@ Added line: 5236 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- FormalParameters[@Empty = true, @Size = 0] | | +- ReceiverParameter[] +Added line: 5981 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ParserCornerCases18"] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "DefaultIterator", @CanonicalName = "DefaultIterator", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "DefaultIterator", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] @@ -1130,6 +1214,7 @@ Added line: 5236 +- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "hasNext", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.BOOLEAN] +Added line: 5276 | +- FormalParameters[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "next", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] @@ -1145,6 +1230,7 @@ Added line: 5236 | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9407 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -1154,6 +1240,7 @@ Added line: 5236 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | | +- MethodCall[@CompileTimeConstant = false, @Image = "hasNext", @MethodName = "hasNext", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8861 | | +- ArgumentList[@Empty = true, @Size = 0] | +- ForUpdate[] | | +- StatementExpressionList[@Empty = false, @Size = 1] @@ -1164,6 +1251,7 @@ Added line: 5236 | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "staticInterfaceMethods", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +Added line: 7072 +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -1171,6 +1259,7 @@ Added line: 5236 +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5988 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +- ArgumentList[@Empty = false, @Size = 1] +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "", @Empty = true, @Image = "\"\"", @Length = 0, @LiteralText = "\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt index 66044a3d21..fb4b91c0e6 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt @@ -1,41 +1,130 @@ -+- CompilationUnit[@PackageName = ""] +Added line: 5536 +Added line: 2859 +Added line: 1802 +Added line: 3079 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SwitchStatements", @CanonicalName = "SwitchStatements", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SwitchStatements", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 1641 +Added line: 3673 +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "myMethod", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 5819 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- VoidType[] +Added line: 3432 +Added line: 9459 +Added line: 4175 +Added line: 2113 +Added line: 6604 +Added line: 3989 +- FormalParameters[@Empty = true, @Size = 0] +Added line: 4488 +Added line: 4215 +Added line: 5498 +- Block[@Empty = false, @Size = 4, @containsComment = false] +Added line: 4051 +Added line: 1954 +Added line: 1612 +Added line: 357 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "a"] - | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 6085 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 8052 +Added line: 5640 +Added line: 2594 +Added line: 5723 Added line: 3135 +Added line: 6900 +Added line: 8284 +Added line: 7558 +Added line: 3586 +Added line: 1930 +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] Added line: 308 +Added line: 2055 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8377 | +- SwitchFallthroughBranch[@Default = false] +Added line: 8326 +Added line: 3983 +Added line: 8638 +Added line: 9829 +Added line: 386 Added line: 3424 +Added line: 7692 +Added line: 2420 | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 1036 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 7370 +Added line: 6050 +Added line: 89 | +- SwitchFallthroughBranch[@Default = true] +Added line: 9403 | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 132 +Added line: 8645 +- SwitchStatement[@DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] +Added line: 6879 +Added line: 6442 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1410 +Added line: 9045 +Added line: 9402 Added line: 1020 +Added line: 8379 +Added line: 2 +Added line: 640 +Added line: 5378 +Added line: 9808 +Added line: 7420 +Added line: 9748 +Added line: 8471 +Added line: 5184 +Added line: 6434 +Added line: 6223 +Added line: 1159 +Added line: 382 +Added line: 8761 +Added line: 6199 +Added line: 9390 +Added line: 1828 +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] +- SwitchFallthroughBranch[@Default = false] +Added line: 9190 +Added line: 8811 +Added line: 9832 +Added line: 9880 +Added line: 7424 +Added line: 9664 +Added line: 1955 +Added line: 325 +Added line: 2014 +Added line: 237 | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 6973 +Added line: 9308 +Added line: 3281 +Added line: 2202 +Added line: 4453 +Added line: 1933 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 6232 | | +- ArgumentList[@Empty = false, @Size = 1] | +- BreakStatement[@Label = null] +Added line: 6619 Added line: 1149 +- SwitchFallthroughBranch[@Default = true] +Added line: 2732 +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 9416 +Added line: 9095 +Added line: 8732 +Added line: 944 +Added line: 8959 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchWithFallthrough.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchWithFallthrough.txt index 0adc451073..42c0619c26 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchWithFallthrough.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchWithFallthrough.txt @@ -1,26 +1,115 @@ +Added line: 7415 +Added line: 8228 +Added line: 698 +Added line: 1537 +Added line: 2861 Added line: 7539 +Added line: 188 +Added line: 9486 +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SwitchWithFallthrough", @CanonicalName = "SwitchWithFallthrough", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SwitchWithFallthrough", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 567 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 9292 +Added line: 7053 +Added line: 8918 +Added line: 9973 +Added line: 9790 +Added line: 3719 +Added line: 8747 Added line: 7959 +Added line: 5134 +Added line: 2248 Added line: 2876 +Added line: 129 +Added line: 1052 +- ClassBody[@Empty = false, @Size = 1] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 7471 +Added line: 2976 +Added line: 5412 +Added line: 2210 +Added line: 1000 +Added line: 7995 +Added line: 3104 +Added line: 4754 +Added line: 2797 +Added line: 8809 +- VoidType[] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 8797 +Added line: 910 +Added line: 8016 +Added line: 6689 +Added line: 2316 +Added line: 1753 +Added line: 4119 +Added line: 5121 +Added line: 8827 +Added line: 7042 +Added line: 561 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 6772 +Added line: 4629 +Added line: 8801 +Added line: 7514 +Added line: 2295 | +- VariableDeclarator[@Initializer = true, @Name = "a"] +Added line: 5584 +Added line: 4956 +Added line: 6834 +Added line: 8296 +Added line: 3726 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 4150 +Added line: 4037 +Added line: 3949 +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] +Added line: 2446 +Added line: 5840 +Added line: 6613 +Added line: 9390 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] - +- SwitchFallthroughBranch[@Default = false] +Added line: 9091 +Added line: 2499 +Added line: 2213 +Added line: 6625 +Added line: 5346 +Added line: 4255 +Added line: 4682 +Added line: 4278 +Added line: 8878 +Added line: 6424 +Added line: 7960 +Added line: 2859 +Added line: 3404 +Added line: 2614 +Added line: 6173 +Added line: 9632 | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 4000 +Added line: 38 Added line: 8600 Added line: 3571 +Added line: 8562 +Added line: 7536 +Added line: 3141 +Added line: 1393 +Added line: 8144 +Added line: 1897 +Added line: 1774 +Added line: 1298 +Added line: 9678 Added line: 3450 Added line: 3725 +Added line: 5903 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- SwitchFallthroughBranch[@Default = true] +Added line: 4885 +Added line: 2188 +Added line: 1324 +Added line: 7720 +Added line: 449 Added line: 7601 Added line: 7822 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SynchronizedStmts.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SynchronizedStmts.txt index 173c1be4c0..8e105d1c06 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SynchronizedStmts.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SynchronizedStmts.txt @@ -1,13 +1,102 @@ +Added line: 6920 +Added line: 8517 +Added line: 9443 +Added line: 4960 +Added line: 4546 +- CompilationUnit[@PackageName = ""] +Added line: 4135 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Sync", @CanonicalName = "Sync", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Sync", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 9343 +Added line: 1036 +Added line: 48 +Added line: 4883 +Added line: 7332 +Added line: 3055 +Added line: 5619 +Added line: 3730 +Added line: 5620 +Added line: 9371 +Added line: 7346 +Added line: 9715 +Added line: 8185 +Added line: 4699 +Added line: 9247 +Added line: 9547 +Added line: 4370 +Added line: 3642 +Added line: 9684 +Added line: 2583 +Added line: 2036 +Added line: 8080 +Added line: 521 +Added line: 5858 +Added line: 9747 +Added line: 8831 +Added line: 5088 +Added line: 7993 +Added line: 5595 +Added line: 6864 +Added line: 4722 +Added line: 8529 +Added line: 8092 +Added line: 9505 +Added line: 3457 +Added line: 7031 +Added line: 6343 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - +- ClassBody[@Empty = false, @Size = 1] +Added line: 5787 +Added line: 1103 +Added line: 4594 +Added line: 7063 +Added line: 5933 +Added line: 3596 +Added line: 2982 +Added line: 445 +Added line: 5006 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "getInstance", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 8204 +Added line: 6301 +Added line: 7687 +Added line: 7562 +Added line: 7843 +Added line: 5745 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 8218 +Added line: 8907 +- VoidType[] +Added line: 3963 +Added line: 1535 +Added line: 2358 +- FormalParameters[@Empty = true, @Size = 0] +Added line: 6150 +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 2604 +Added line: 4499 +Added line: 9297 +Added line: 374 +Added line: 2023 +- SynchronizedStatement[] +Added line: 3960 +Added line: 6579 +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +Added line: 7293 +Added line: 8066 +Added line: 6027 +Added line: 2586 +Added line: 8568 +Added line: 3756 +Added line: 3956 +Added line: 748 +Added line: 7987 +Added line: 2229 +Added line: 586 +Added line: 130 +Added line: 4259 +Added line: 9877 +Added line: 3012 +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 8564 +Added line: 323 +- ReturnStatement[] +Added line: 5081 +Added line: 4278 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/MultipleCaseLabels.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/MultipleCaseLabels.txt index a9007b4787..943f0c71f6 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/MultipleCaseLabels.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/MultipleCaseLabels.txt @@ -1,67 +1,122 @@ +Added line: 2472 +Added line: 2738 +Added line: 6511 +Added line: 4594 +- CompilationUnit[@PackageName = ""] +Added line: 4126 +Added line: 8350 +Added line: 7891 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "MultipleCaseLabels", @CanonicalName = "MultipleCaseLabels", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "MultipleCaseLabels", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 8] - +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] +Added line: 2300 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 8793 | +- VariableDeclarator[@Initializer = true, @Name = "MONDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "MONDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] - +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] +Added line: 2153 +Added line: 7135 +Added line: 1987 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 5328 | +- VariableDeclarator[@Initializer = true, @Name = "TUESDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "TUESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 8329 +Added line: 34 | +- VariableDeclarator[@Initializer = true, @Name = "WEDNESDAY"] +Added line: 6382 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "WEDNESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 6637 +Added line: 8756 +Added line: 9729 +Added line: 7769 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +Added line: 1282 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] +Added line: 3103 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "THURSDAY"] +Added line: 7851 +Added line: 7646 +Added line: 8492 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "THURSDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "4", @IntLiteral = true, @Integral = true, @LiteralText = "4", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 4.0, @ValueAsFloat = 4.0, @ValueAsInt = 4, @ValueAsLong = 4] +Added line: 7697 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 795 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "FRIDAY"] +Added line: 4270 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "FRIDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 1183 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "5", @IntLiteral = true, @Integral = true, @LiteralText = "5", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] - +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 5970 +Added line: 963 +Added line: 7512 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] +Added line: 8650 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "SATURDAY"] +Added line: 8200 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SATURDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 2645 +Added line: 2413 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "6", @IntLiteral = true, @Integral = true, @LiteralText = "6", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 6.0, @ValueAsFloat = 6.0, @ValueAsInt = 6, @ValueAsLong = 6] - +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 8898 +Added line: 6361 +Added line: 1661 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 2155 | +- VariableDeclarator[@Initializer = true, @Name = "SUNDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SUNDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 1397 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 9183 +- VoidType[] +Added line: 5441 +Added line: 2204 +Added line: 5126 +Added line: 6432 +- FormalParameters[@Empty = false, @Size = 1] +Added line: 9582 | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 4172 +Added line: 5631 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 116 +Added line: 7238 | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 3022 +Added line: 2700 +Added line: 4281 | | +- ArrayTypeDim[@Varargs = false] +Added line: 6943 | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 2, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 2492 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 8859 +Added line: 9885 | +- VariableDeclarator[@Initializer = true, @Name = "day"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "day", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "THURSDAY", @Name = "THURSDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8721 +Added line: 5649 +Added line: 1463 +- SwitchStatement[@DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "day", @Name = "day", @ParenthesisDepth = 0, @Parenthesized = false] +- SwitchFallthroughBranch[@Default = false] @@ -71,43 +126,77 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "SUNDAY", @Name = "SUNDAY", @ParenthesisDepth = 0, @Parenthesized = false] | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9544 +Added line: 5863 +Added line: 2898 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2647 +Added line: 4795 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] - | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " 6", @Empty = false, @Image = "\" 6\"", @Length = 3, @LiteralText = "\" 6\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 4700 | +- BreakStatement[@Label = null] +- SwitchFallthroughBranch[@Default = false] | +- SwitchLabel[@Default = false, @PatternLabel = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "TUESDAY", @Name = "TUESDAY", @ParenthesisDepth = 0, @Parenthesized = false] | +- ExpressionStatement[] +Added line: 142 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1292 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " 7", @Empty = false, @Image = "\" 7\"", @Length = 3, @LiteralText = "\" 7\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- BreakStatement[@Label = null] +Added line: 9607 +- SwitchFallthroughBranch[@Default = false] +Added line: 8475 | +- SwitchLabel[@Default = false, @PatternLabel = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "THURSDAY", @Name = "THURSDAY", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "SATURDAY", @Name = "SATURDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6004 | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1154 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1790 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9156 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 5172 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " 8", @Empty = false, @Image = "\" 8\"", @Length = 3, @LiteralText = "\" 8\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5876 | +- BreakStatement[@Label = null] +- SwitchFallthroughBranch[@Default = false] +Added line: 3454 +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 3900 +Added line: 256 +Added line: 2252 +Added line: 5488 +Added line: 6830 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "WEDNESDAY", @Name = "WEDNESDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 601 +Added line: 3392 +Added line: 5079 +Added line: 7480 +Added line: 6358 +Added line: 8604 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5776 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8691 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 7167 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " 9", @Empty = false, @Image = "\" 9\"", @Length = 3, @LiteralText = "\" 9\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 1822 +Added line: 9970 +Added line: 8467 +Added line: 8617 +- BreakStatement[@Label = null] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SimpleSwitchExpressions.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SimpleSwitchExpressions.txt index 63cbacf6b4..bc24c270c2 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SimpleSwitchExpressions.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SimpleSwitchExpressions.txt @@ -1,4 +1,7 @@ +- CompilationUnit[@PackageName = ""] +Added line: 6383 +Added line: 9651 +Added line: 1174 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SimpleSwitchExpressions", @CanonicalName = "SimpleSwitchExpressions", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SimpleSwitchExpressions", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 9] @@ -7,79 +10,127 @@ | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "MONDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "MONDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] - | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 8393 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 9071 | +- VariableDeclarator[@Initializer = true, @Name = "TUESDAY"] - | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "TUESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 7970 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 4770 | +- VariableDeclarator[@Initializer = true, @Name = "WEDNESDAY"] +Added line: 8901 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "WEDNESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 8818 +Added line: 8286 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "THURSDAY"] - | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "THURSDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] - | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "4", @IntLiteral = true, @Integral = true, @LiteralText = "4", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 4.0, @ValueAsFloat = 4.0, @ValueAsInt = 4, @ValueAsLong = 4] - +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 3016 +Added line: 4580 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 8023 +Added line: 2431 | +- VariableDeclarator[@Initializer = true, @Name = "FRIDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "FRIDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 8822 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "5", @IntLiteral = true, @Integral = true, @LiteralText = "5", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "SATURDAY"] +Added line: 5332 +Added line: 4618 +Added line: 8376 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SATURDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 1919 +Added line: 7436 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "6", @IntLiteral = true, @Integral = true, @LiteralText = "6", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 6.0, @ValueAsFloat = 6.0, @ValueAsInt = 6, @ValueAsLong = 6] +Added line: 4772 +Added line: 2215 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 4487 | +- VariableDeclarator[@Initializer = true, @Name = "SUNDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SUNDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 4323 +Added line: 252 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 4767 +Added line: 3781 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1704 +Added line: 1486 +Added line: 6126 +Added line: 8268 +Added line: 5095 | | +- ArrayType[@ArrayDepth = 1] +Added line: 9288 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 3432 | | | +- ArrayTypeDim[@Varargs = false] | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 3, @containsComment = false] +Added line: 2031 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6915 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 8971 | | +- VariableDeclarator[@Initializer = true, @Name = "day"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "day", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "FRIDAY", @Name = "FRIDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6194 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "numLetters"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "numLetters", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5651 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "day", @Name = "day", @ParenthesisDepth = 0, @Parenthesized = false] | | +- SwitchArrowBranch[@Default = false] +Added line: 3997 +Added line: 5439 | | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 5321 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "MONDAY", @Name = "MONDAY", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "FRIDAY", @Name = "FRIDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2507 +Added line: 8864 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "SUNDAY", @Name = "SUNDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2773 +Added line: 564 +Added line: 4257 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "6", @IntLiteral = true, @Integral = true, @LiteralText = "6", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 6.0, @ValueAsFloat = 6.0, @ValueAsInt = 6, @ValueAsLong = 6] +Added line: 2031 +Added line: 4488 | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "TUESDAY", @Name = "TUESDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9361 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] +Added line: 8232 +Added line: 5348 +Added line: 3095 | | +- SwitchArrowBranch[@Default = false] +Added line: 5121 | | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 1651 +Added line: 9466 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "THURSDAY", @Name = "THURSDAY", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "SATURDAY", @Name = "SATURDAY", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "8", @IntLiteral = true, @Integral = true, @LiteralText = "8", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 8.0, @ValueAsFloat = 8.0, @ValueAsInt = 8, @ValueAsLong = 8] @@ -92,40 +143,78 @@ | | +- Block[@Empty = false, @Size = 3, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3151 +Added line: 8553 +Added line: 9700 | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 5832 | | | +- VariableDeclarator[@Initializer = true, @Name = "k"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "k", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] - | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.MUL, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8785 +Added line: 7464 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "day", @Name = "day", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +Added line: 4362 +Added line: 2582 | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 3740 +Added line: 5902 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 8622 +Added line: 98 | | | +- VariableDeclarator[@Initializer = true, @Name = "result"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "f", @MethodName = "f", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 8789 +Added line: 975 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "k", @Name = "k", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6586 | | +- YieldStatement[] +Added line: 1499 +Added line: 7108 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false] | +- ExpressionStatement[] - | +- MethodCall[@CompileTimeConstant = false, @Image = "printf", @MethodName = "printf", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2521 +Added line: 3543 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4256 +Added line: 9382 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 7453 +Added line: 1536 +Added line: 338 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "NumLetters: %d%n", @Empty = false, @Image = "\"NumLetters: %d%n\"", @Length = 16, @LiteralText = "\"NumLetters: %d%n\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5445 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "numLetters", @Name = "numLetters", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "f", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false] +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +- FormalParameters[@Empty = false, @Size = 1] +Added line: 6086 +Added line: 8359 +Added line: 2253 +Added line: 9287 | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 2331 +Added line: 2086 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "k", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7877 +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 4892 +- ReturnStatement[] +Added line: 6904 +Added line: 5487 +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.MUL, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4069 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "k", @Name = "k", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4656 +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +Added line: 4908 +Added line: 2257 +Added line: 2254 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchExpressions.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchExpressions.txt index 72c512b849..5782e968cc 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchExpressions.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchExpressions.txt @@ -7,19 +7,23 @@ | +- EnumBody[@Empty = false, @SeparatorSemi = true, @Size = 7, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "MONDAY", @MethodName = "new", @Name = "MONDAY", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] - | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "MONDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "TUESDAY", @MethodName = "new", @Name = "TUESDAY", @Visibility = Visibility.V_PUBLIC] +Added line: 9582 | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "TUESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "WEDNESDAY", @MethodName = "new", @Name = "WEDNESDAY", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 8911 +Added line: 72 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "WEDNESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +Added line: 4805 | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "THURSDAY", @MethodName = "new", @Name = "THURSDAY", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "THURSDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "FRIDAY", @MethodName = "new", @Name = "FRIDAY", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "FRIDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +Added line: 3306 | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "SATURDAY", @MethodName = "new", @Name = "SATURDAY", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SATURDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] @@ -28,9 +32,11 @@ | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SUNDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PUBLIC, @Static = true, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL)] +Added line: 1947 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "BAZ"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PUBLIC, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BAZ", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +Added line: 9756 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] @@ -41,7 +47,7 @@ | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] - | | | +- ArrayTypeDim[@Varargs = false] +Added line: 8397 | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 15, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -50,12 +56,16 @@ | | +- VariableDeclarator[@Initializer = true, @Name = "day"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "day", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "THURSDAY", @Name = "THURSDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5108 +Added line: 1494 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Day"] +Added line: 6704 | +- SwitchStatement[@DefaultCase = false, @EnumSwitch = true, @ExhaustiveEnumSwitch = true, @FallthroughSwitch = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "day", @Name = "day", @ParenthesisDepth = 0, @Parenthesized = false] | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 1530 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "MONDAY", @Name = "MONDAY", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "FRIDAY", @Name = "FRIDAY", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "SUNDAY", @Name = "SUNDAY", @ParenthesisDepth = 0, @Parenthesized = false] @@ -66,12 +76,19 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "6", @IntLiteral = true, @Integral = true, @LiteralText = "6", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 6.0, @ValueAsFloat = 6.0, @ValueAsInt = 6, @ValueAsLong = 6] | | +- SwitchArrowBranch[@Default = false] +Added line: 2365 | | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "TUESDAY", @Name = "TUESDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8356 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5270 | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1616 | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9148 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 8453 +Added line: 8274 | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] | | +- SwitchArrowBranch[@Default = false] @@ -84,18 +101,22 @@ | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "8", @IntLiteral = true, @Integral = true, @LiteralText = "8", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 8.0, @ValueAsFloat = 8.0, @ValueAsInt = 8, @ValueAsLong = 8] +Added line: 7053 | | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "WEDNESDAY", @Name = "WEDNESDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 794 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 7352 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "9", @IntLiteral = true, @Integral = true, @LiteralText = "9", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 9.0, @ValueAsFloat = 9.0, @ValueAsInt = 9, @ValueAsLong = 9] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 535 | | +- VariableDeclarator[@Initializer = true, @Name = "numLetters"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "numLetters", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = false, @EnumSwitch = true, @ExhaustiveEnumSwitch = true, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -104,10 +125,15 @@ | | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "MONDAY", @Name = "MONDAY", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "FRIDAY", @Name = "FRIDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2877 +Added line: 9469 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "SUNDAY", @Name = "SUNDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8776 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "6", @IntLiteral = true, @Integral = true, @LiteralText = "6", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 6.0, @ValueAsFloat = 6.0, @ValueAsInt = 6, @ValueAsLong = 6] | | +- SwitchArrowBranch[@Default = false] +Added line: 9861 | | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 7573 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "TUESDAY", @Name = "TUESDAY", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] | | +- SwitchArrowBranch[@Default = false] @@ -115,6 +141,8 @@ | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "THURSDAY", @Name = "THURSDAY", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "SATURDAY", @Name = "SATURDAY", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "8", @IntLiteral = true, @Integral = true, @LiteralText = "8", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 8.0, @ValueAsFloat = 8.0, @ValueAsInt = 8, @ValueAsLong = 8] +Added line: 6414 +Added line: 1002 | | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "WEDNESDAY", @Name = "WEDNESDAY", @ParenthesisDepth = 0, @Parenthesized = false] @@ -125,15 +153,24 @@ | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 1982 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "numLetters=%d%n", @Empty = false, @Image = "\"numLetters=%d%n\"", @Length = 15, @LiteralText = "\"numLetters=%d%n\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "numLetters", @Name = "numLetters", @ParenthesisDepth = 0, @Parenthesized = false] | +- ExpressionStatement[] +Added line: 7379 +Added line: 8310 +Added line: 1065 +Added line: 1157 | | +- MethodCall[@CompileTimeConstant = false, @Image = "howMany", @MethodName = "howMany", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 3241 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "howMany", @MethodName = "howMany", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4211 | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6469 +Added line: 5405 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "howMany", @MethodName = "howMany", @ParenthesisDepth = 0, @Parenthesized = false] @@ -143,20 +180,23 @@ | | +- MethodCall[@CompileTimeConstant = false, @Image = "howManyExpr", @MethodName = "howManyExpr", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 9045 | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "howManyExpr", @MethodName = "howManyExpr", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = false, @Size = 1] - | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +Added line: 7263 | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "howManyExpr", @MethodName = "howManyExpr", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3831 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "j"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "j", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = true, @EnumSwitch = true, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4975 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "day", @Name = "day", @ParenthesisDepth = 0, @Parenthesized = false] | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = false] @@ -168,19 +208,27 @@ | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | | +- SwitchArrowBranch[@Default = true] | | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 546 | | +- Block[@Empty = false, @Size = 3, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 3798 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "k"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "k", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "length", @MethodName = "length", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4947 +Added line: 9489 +Added line: 7527 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "toString", @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "day", @Name = "day", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4238 | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 3744 | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4674 | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "result"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -193,23 +241,30 @@ | | +- MethodCall[@CompileTimeConstant = false, @Image = "printf", @MethodName = "printf", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2317 +Added line: 3470 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 2] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "j=%d%n", @Empty = false, @Image = "\"j=%d%n\"", @Length = 6, @LiteralText = "\"j=%d%n\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] - | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "j", @Name = "j", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 8185 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 9265 | | +- VariableDeclarator[@Initializer = true, @Name = "s"] - | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9385 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Foo", @Empty = false, @Image = "\"Foo\"", @Length = 3, @LiteralText = "\"Foo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5085 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "result"] +Added line: 778 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5578 | | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1665 | | +- SwitchFallthroughBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Foo", @Empty = false, @Image = "\"Foo\"", @Length = 3, @LiteralText = "\"Foo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -220,16 +275,17 @@ | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Bar", @Empty = false, @Image = "\"Bar\"", @Length = 3, @LiteralText = "\"Bar\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- YieldStatement[] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +Added line: 3530 | | +- SwitchFallthroughBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Baz", @Empty = false, @Image = "\"Baz\"", @Length = 3, @LiteralText = "\"Baz\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- YieldStatement[] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "BAZ", @Name = "BAZ", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6003 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "SwitchExpressions"] | | +- SwitchFallthroughBranch[@Default = true] | | +- SwitchLabel[@Default = true, @PatternLabel = false] - | | +- ExpressionStatement[] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -238,31 +294,44 @@ | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Neither Foo nor Bar, hmmm...", @Empty = false, @Image = "\"Neither Foo nor Bar, hmmm...\"", @Length = 28, @LiteralText = "\"Neither Foo nor Bar, hmmm...\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- YieldStatement[] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +Added line: 6271 | +- ExpressionStatement[] +Added line: 2271 | +- MethodCall[@CompileTimeConstant = false, @Image = "printf", @MethodName = "printf", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1175 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 916 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "result=%d%n", @Empty = false, @Image = "\"result=%d%n\"", @Length = 11, @LiteralText = "\"result=%d%n\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false] - +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "howMany", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] +Added line: 6344 | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 1466 +Added line: 5458 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "k", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8189 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 49 +Added line: 7702 | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] +Added line: 1712 +Added line: 6301 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "k", @Name = "k", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6587 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2951 +Added line: 8282 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "one", @Empty = false, @Image = "\"one\"", @Length = 3, @LiteralText = "\"one\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -270,32 +339,46 @@ | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3951 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "two", @Empty = false, @Image = "\"two\"", @Length = 3, @LiteralText = "\"two\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = true] +Added line: 4532 +Added line: 9218 | +- SwitchLabel[@Default = true, @PatternLabel = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6700 +Added line: 9288 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] - | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 7369 +Added line: 8683 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "many", @Empty = false, @Image = "\"many\"", @Length = 4, @LiteralText = "\"many\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "howManyExpr", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] +Added line: 8270 | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 482 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 6832 +Added line: 8458 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "k", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8649 +Added line: 9105 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5119 +Added line: 2654 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -304,15 +387,18 @@ | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "one", @Empty = false, @Image = "\"one\"", @Length = 3, @LiteralText = "\"one\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 4918 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "two", @Empty = false, @Image = "\"two\"", @Length = 3, @LiteralText = "\"two\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 1265 | +- SwitchArrowBranch[@Default = true] | +- SwitchLabel[@Default = true, @PatternLabel = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "many", @Empty = false, @Image = "\"many\"", @Length = 4, @LiteralText = "\"many\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "f", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false] +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] +Added line: 4791 +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] @@ -323,4 +409,7 @@ +- ReturnStatement[] +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.MUL, @ParenthesisDepth = 0, @Parenthesized = false] +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "k", @Name = "k", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7056 +Added line: 7557 +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +Added line: 4558 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchRules.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchRules.txt index c02d98faaf..663a0cfea5 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchRules.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchRules.txt @@ -1,115 +1,204 @@ +- CompilationUnit[@PackageName = ""] +Added line: 7075 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SwitchRules", @CanonicalName = "SwitchRules", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SwitchRules", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 5387 +- ClassBody[@Empty = false, @Size = 8] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 5396 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] +Added line: 9668 +Added line: 3611 +Added line: 7604 +Added line: 9132 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 6488 | +- VariableDeclarator[@Initializer = true, @Name = "MONDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "MONDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 4788 +Added line: 5051 +Added line: 5552 +Added line: 5730 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 6525 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] +Added line: 3722 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 7054 | +- VariableDeclarator[@Initializer = true, @Name = "TUESDAY"] +Added line: 6930 +Added line: 2137 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 8141 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 2842 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "WEDNESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 2846 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 285 +Added line: 2055 | +- VariableDeclarator[@Initializer = true, @Name = "THURSDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "THURSDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "4", @IntLiteral = true, @Integral = true, @LiteralText = "4", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 4.0, @ValueAsFloat = 4.0, @ValueAsInt = 4, @ValueAsLong = 4] - +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 4670 +Added line: 1382 +Added line: 4938 +Added line: 4658 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 6363 | +- VariableDeclarator[@Initializer = true, @Name = "FRIDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "FRIDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 3442 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "5", @IntLiteral = true, @Integral = true, @LiteralText = "5", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] +Added line: 4980 +Added line: 2090 +Added line: 9941 +Added line: 8306 +Added line: 549 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 6532 | +- VariableDeclarator[@Initializer = true, @Name = "SATURDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SATURDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "6", @IntLiteral = true, @Integral = true, @LiteralText = "6", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 6.0, @ValueAsFloat = 6.0, @ValueAsInt = 6, @ValueAsLong = 6] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 8293 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] +Added line: 6299 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 3356 | +- VariableDeclarator[@Initializer = true, @Name = "SUNDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SUNDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] +Added line: 4400 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 8870 Added line: 2419 - +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 4526 +Added line: 12 +Added line: 3438 +Added line: 4221 +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3554 +Added line: 9728 +Added line: 8387 | +- ArrayType[@ArrayDepth = 1] +Added line: 2926 +Added line: 6085 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] | | +- ArrayTypeDim[@Varargs = false] +Added line: 3062 +Added line: 8515 Added line: 6664 +Added line: 2114 | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 2, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6242 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "day"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "day", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1798 +Added line: 9674 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "WEDNESDAY", @Name = "WEDNESDAY", @ParenthesisDepth = 0, @Parenthesized = false] +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] +Added line: 2073 +Added line: 6332 +Added line: 5188 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "day", @Name = "day", @ParenthesisDepth = 0, @Parenthesized = false] +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false, @PatternLabel = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "MONDAY", @Name = "MONDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8796 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "FRIDAY", @Name = "FRIDAY", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "SUNDAY", @Name = "SUNDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9767 +Added line: 3100 +Added line: 639 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6054 +Added line: 6557 +Added line: 2930 +Added line: 7058 +Added line: 8760 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 5904 Added line: 4318 +Added line: 1771 +Added line: 6155 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 1468 +Added line: 553 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " 6", @Empty = false, @Image = "\" 6\"", @Length = 3, @LiteralText = "\" 6\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false, @PatternLabel = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "TUESDAY", @Name = "TUESDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3761 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6071 Added line: 6981 +Added line: 7815 +Added line: 5331 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4850 +Added line: 5090 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] - | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 749 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " 7", @Empty = false, @Image = "\" 7\"", @Length = 3, @LiteralText = "\" 7\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- SwitchArrowBranch[@Default = false] +Added line: 3625 | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 7807 +Added line: 8909 +Added line: 1421 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "THURSDAY", @Name = "THURSDAY", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "SATURDAY", @Name = "SATURDAY", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1957 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 8040 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " 8", @Empty = false, @Image = "\" 8\"", @Length = 3, @LiteralText = "\" 8\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5481 +- SwitchArrowBranch[@Default = false] +Added line: 1448 | +- SwitchLabel[@Default = false, @PatternLabel = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "WEDNESDAY", @Name = "WEDNESDAY", @ParenthesisDepth = 0, @Parenthesized = false] - | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 3538 | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9848 +Added line: 8815 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 1689 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " 9", @Empty = false, @Image = "\" 9\"", @Length = 3, @LiteralText = "\" 9\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- SwitchArrowBranch[@Default = true] +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 5512 +- ThrowStatement[] +Added line: 2973 +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] +Added line: 5181 +- ArgumentList[@Empty = true, @Size = 0] +Added line: 2938 +Added line: 4162 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/YieldStatements.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/YieldStatements.txt index 766c74cde2..91743adbcb 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/YieldStatements.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/YieldStatements.txt @@ -1,83 +1,172 @@ +- CompilationUnit[@PackageName = ""] +Added line: 8289 +Added line: 541 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "YieldStatements", @CanonicalName = "YieldStatements", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "YieldStatements", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] - +- ClassBody[@Empty = false, @Size = 1] +Added line: 3941 +Added line: 3852 +- Initializer[@Static = false] +- Block[@Empty = false, @Size = 5, @containsComment = false] +Added line: 9947 +Added line: 8686 +Added line: 9583 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 8419 +Added line: 3935 +Added line: 5201 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1686 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "yield"] +Added line: 1494 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "yield", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 3960 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "yield", @Name = "yield", @ParenthesisDepth = 0, @Parenthesized = false] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +Added line: 7637 +Added line: 6830 +- ExpressionStatement[] +Added line: 2155 +Added line: 880 +Added line: 4928 +Added line: 3623 | +- MethodCall[@CompileTimeConstant = false, @Image = "yield", @MethodName = "yield", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 8843 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +Added line: 3342 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "yield", @MethodName = "yield", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4882 | +- ArgumentList[@Empty = false, @Size = 2] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4965 +Added line: 1726 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "b", @Name = "b", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6599 +Added line: 6839 +- ExpressionStatement[] +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "yield", @Name = "yield", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3779 +Added line: 1299 +Added line: 5735 +Added line: 3702 +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "e", @Name = "e", @ParenthesisDepth = 0, @Parenthesized = false] +- SwitchArrowBranch[@Default = false] +Added line: 9597 +Added line: 826 +Added line: 8576 +- SwitchLabel[@Default = false, @PatternLabel = false] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- Block[@Empty = false, @Size = 12, @containsComment = true] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "yield", @MethodName = "yield", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1443 | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 8469 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3073 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "b", @Name = "b", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9093 +Added line: 8932 +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "yield", @Name = "yield", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8455 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +Added line: 5563 +Added line: 441 +- YieldStatement[] +Added line: 9181 +Added line: 9141 +Added line: 8735 +Added line: 6383 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 1, @Parenthesized = true, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +- YieldStatement[] +Added line: 8506 | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.PRE_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "bar", @Name = "bar", @ParenthesisDepth = 0, @Parenthesized = false] +- YieldStatement[] +Added line: 3423 +Added line: 7961 | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.PRE_DECREMENT, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 174 | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "bar", @Name = "bar", @ParenthesisDepth = 0, @Parenthesized = false] - +- ExpressionStatement[] +Added line: 5695 +Added line: 7473 +Added line: 1388 +Added line: 976 +Added line: 9657 +Added line: 7597 +Added line: 9583 +Added line: 2645 +Added line: 1717 | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "yield", @Name = "yield", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6473 +- ExpressionStatement[] | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.POST_DECREMENT, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "yield", @Name = "yield", @ParenthesisDepth = 0, @Parenthesized = false] +- IfStatement[@Else = true] +Added line: 1496 +Added line: 4131 | +- BooleanLiteral[@CompileTimeConstant = true, @LiteralText = "true", @ParenthesisDepth = 0, @Parenthesized = false, @True = true] | +- YieldStatement[] +Added line: 5754 +Added line: 9171 +Added line: 401 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 1, @Parenthesized = true, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | +- YieldStatement[] +Added line: 7822 +Added line: 9817 +Added line: 9571 +Added line: 2490 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "4", @IntLiteral = true, @Integral = true, @LiteralText = "4", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 4.0, @ValueAsFloat = 4.0, @ValueAsInt = 4, @ValueAsLong = 4] +- ExpressionStatement[] +Added line: 4498 +Added line: 541 | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9530 | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "yield", @Name = "yield", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8038 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "foo", @Name = "foo", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] - | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 7034 +Added line: 8702 +Added line: 3146 +Added line: 535 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "4", @IntLiteral = true, @Integral = true, @LiteralText = "4", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 4.0, @ValueAsFloat = 4.0, @ValueAsInt = 4, @ValueAsLong = 4] +Added line: 7752 | +- Block[@Empty = false, @Size = 1, @containsComment = false] - | +- YieldStatement[] - | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "5", @IntLiteral = true, @Integral = true, @LiteralText = "5", @LongLiteral = false, @ParenthesisDepth = 1, @Parenthesized = true, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] +Added line: 9615 +Added line: 6410 +- YieldStatement[] | +- LambdaExpression[@Arity = 0, @BlockBody = true, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- LambdaParameterList[@Empty = true, @Size = 0] +Added line: 3396 +Added line: 6397 +Added line: 9980 +Added line: 6813 +Added line: 1973 +Added line: 4011 +Added line: 1871 +Added line: 6301 | +- Block[@Empty = true, @Size = 0, @containsComment = false] +Added line: 4366 +Added line: 9698 +Added line: 4481 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "yield", @MethodName = "yield", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9055 +Added line: 6540 +Added line: 1591 +Added line: 7420 | +- ArgumentList[@Empty = true, @Size = 0] - +- YieldStatement[] +Added line: 2564 +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 1, @Parenthesized = true, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/NonSealedIdentifier.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/NonSealedIdentifier.txt index 387f34278d..adc2cd60fe 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/NonSealedIdentifier.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/NonSealedIdentifier.txt @@ -1,53 +1,142 @@ +Added line: 8627 +- CompilationUnit[@PackageName = ""] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] -Added line: 9372 +Added line: 5381 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 4651 +Added line: 9950 Added line: 7390 +Added line: 3655 +Added line: 7366 +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] - | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 431 +Added line: 3329 +Added line: 8016 +Added line: 6302 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3813 | +- ArrayType[@ArrayDepth = 1] +Added line: 1930 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 6550 Added line: 4565 | | +- ArrayDimensions[@Empty = false, @Size = 1] | | +- ArrayTypeDim[@Varargs = false] +Added line: 7658 +Added line: 9554 +Added line: 8104 +Added line: 858 +Added line: 2430 Added line: 3469 | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5558 +Added line: 1548 +- Block[@Empty = false, @Size = 5, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6335 +Added line: 598 Added line: 8178 +Added line: 6476 +Added line: 5774 +Added line: 9705 +Added line: 3976 +Added line: 4472 +Added line: 157 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 9080 +Added line: 2092 +Added line: 4687 | +- VariableDeclarator[@Initializer = true, @Name = "result"] +Added line: 8805 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5765 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +Added line: 8817 +Added line: 5394 +Added line: 3592 Added line: 1291 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2972 +Added line: 1979 +Added line: 788 +Added line: 3060 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 6440 +Added line: 5645 Added line: 234 -Added line: 3992 +Added line: 5229 +Added line: 4243 Added line: 9928 | +- VariableDeclarator[@Initializer = true, @Name = "non"] +Added line: 3378 +Added line: 8288 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "non", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1673 +Added line: 1934 +Added line: 710 +Added line: 7944 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] Added line: 7983 +Added line: 6196 +Added line: 1371 +Added line: 4182 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5360 +Added line: 3094 | +- VariableDeclarator[@Initializer = true, @Name = "sealed"] +Added line: 5400 +Added line: 96 +Added line: 7278 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +Added line: 1583 | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3423 | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.SUB, @ParenthesisDepth = 0, @Parenthesized = false] -Added line: 2653 +Added line: 7618 +Added line: 3501 +Added line: 7511 +Added line: 1680 +Added line: 7529 +Added line: 3699 +Added line: 8725 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "non", @Name = "non", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6488 +Added line: 1607 +Added line: 1453 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "sealed", @Name = "sealed", @ParenthesisDepth = 0, @Parenthesized = false] Added line: 6461 +Added line: 6454 +Added line: 2986 +Added line: 5642 +Added line: 4902 +Added line: 210 +Added line: 6172 +Added line: 6650 +Added line: 7335 +Added line: 9594 +- ExpressionStatement[] +Added line: 2821 Added line: 9615 +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9341 +Added line: 3899 +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7563 +Added line: 9707 +Added line: 7084 | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 1869 +Added line: 6709 +- ArgumentList[@Empty = false, @Size = 1] +Added line: 960 +Added line: 1958 +Added line: 2124 +Added line: 9266 +Added line: 2703 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5405 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt index 78b99b1812..0f00cba3b7 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt @@ -1,30 +1,48 @@ +Added line: 7760 +Added line: 5391 +- CompilationUnit[@PackageName = ""] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "javax.script.ScriptEngine", @ImportedSimpleName = "ScriptEngine", @ModuleImport = false, @PackageName = "javax.script", @Static = false] +Added line: 8715 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "javax.script.ScriptEngineManager", @ImportedSimpleName = "ScriptEngineManager", @ModuleImport = false, @PackageName = "javax.script", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "TextBlocks", @CanonicalName = "TextBlocks", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "TextBlocks", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 4414 +Added line: 3403 +Added line: 4015 +Added line: 9766 +Added line: 5439 +- VoidType[] +Added line: 798 | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6582 | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] - | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 9290 | | +- ArrayTypeDim[@Varargs = false] | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +- ThrowsList[@Empty = false, @Size = 1] +Added line: 5873 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Exception"] +Added line: 5357 +Added line: 8071 +Added line: 1332 +Added line: 4298 +Added line: 1038 +Added line: 2537 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9863 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "html"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "html", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "<html>\n <body>\n <p>Hello, world</p>\n </body>\n</html>\n", @Empty = false, @Image = "\"\"\"\n <html> \n <body>\n <p>Hello, world</p> \n </body> \n </html> \n \"\"\"", @Length = 66, @LiteralText = "\"\"\"\n <html> \n <body>\n <p>Hello, world</p> \n </body> \n </html> \n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- ExpressionStatement[] - | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2725 +Added line: 6599 +Added line: 5529 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] @@ -32,7 +50,9 @@ +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 268 | +- VariableDeclarator[@Initializer = true, @Name = "query"] +Added line: 1574 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "query", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] Added line: 297 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "SELECT `EMP_ID`, `LAST_NAME` FROM `EMPLOYEE_TB`\nWHERE `CITY` = \'INDIANAPOLIS\'\nORDER BY `EMP_ID`, `LAST_NAME`;\n", @Empty = false, @Image = "\"\"\"\n SELECT `EMP_ID`, `LAST_NAME` FROM `EMPLOYEE_TB`\n WHERE `CITY` = \'INDIANAPOLIS\'\n ORDER BY `EMP_ID`, `LAST_NAME`;\n \"\"\"", @Length = 110, @LiteralText = "\"\"\"\n SELECT `EMP_ID`, `LAST_NAME` FROM `EMPLOYEE_TB`\n WHERE `CITY` = \'INDIANAPOLIS\'\n ORDER BY `EMP_ID`, `LAST_NAME`;\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] @@ -42,30 +62,43 @@ Added line: 297 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] Added line: 9481 +Added line: 1906 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "query", @Name = "query", @ParenthesisDepth = 0, @Parenthesized = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ScriptEngine"] | +- VariableDeclarator[@Initializer = true, @Name = "engine"] +Added line: 2370 +Added line: 7986 +Added line: 650 +Added line: 2799 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "engine", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "getEngineByName", @MethodName = "getEngineByName", @ParenthesisDepth = 0, @Parenthesized = false] - | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ScriptEngineManager"] | | +- ArgumentList[@Empty = true, @Size = 0] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "js", @Empty = false, @Image = "\"js\"", @Length = 2, @LiteralText = "\"js\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5587 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 1027 +Added line: 9868 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | +- VariableDeclarator[@Initializer = true, @Name = "obj"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "eval", @MethodName = "eval", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6467 +Added line: 360 +Added line: 1028 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "engine", @Name = "engine", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "function hello() {\n print(\'\"Hello, world\"\');\n}\n\nhello();\n", @Empty = false, @Image = "\"\"\"\n function hello() {\n print(\'\"Hello, world\"\');\n }\n \n hello();\n \"\"\"", @Length = 60, @LiteralText = "\"\"\"\n function hello() {\n print(\'\"Hello, world\"\');\n }\n \n hello();\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +Added line: 8541 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 2465 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 2004 | +- VariableDeclarator[@Initializer = true, @Name = "htmlWithEscapes"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "htmlWithEscapes", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "<html>\r\n <body>\r\n <p>Hello, world</p>\r\n </body>\r\n</html>\r\n", @Empty = false, @Image = "\"\"\"\n <html>\\r\n <body>\\r\n <p>Hello, world</p>\\r\n </body>\\r\n </html>\\r\n \"\"\"", @Length = 71, @LiteralText = "\"\"\"\n <html>\\r\n <body>\\r\n <p>Hello, world</p>\\r\n </body>\\r\n </html>\\r\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] @@ -83,95 +116,140 @@ Added line: 9481 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "season", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "winter", @Empty = false, @Image = "\"\"\"\n winter\"\"\"", @Length = 6, @LiteralText = "\"\"\"\n winter\"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 6372 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 3858 | +- VariableDeclarator[@Initializer = true, @Name = "period"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "period", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "winter\n", @Empty = false, @Image = "\"\"\"\n winter\n \"\"\"", @Length = 7, @LiteralText = "\"\"\"\n winter\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4364 | +- VariableDeclarator[@Initializer = true, @Name = "greeting"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "greeting", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9213 +Added line: 1588 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hi, \"Bob\"\n", @Empty = false, @Image = "\"\"\"\n Hi, \"Bob\"\n \"\"\"", @Length = 10, @LiteralText = "\"\"\"\n Hi, \"Bob\"\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "salutation"] Added line: 1891 +Added line: 2277 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "salutation", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hi,\n \"Bob\"\n", @Empty = false, @Image = "\"\"\"\n Hi,\n \"Bob\"\n \"\"\"", @Length = 11, @LiteralText = "\"\"\"\n Hi,\n \"Bob\"\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 2617 +Added line: 4111 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "empty"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "empty", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] - | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "", @Empty = true, @Image = "\"\"\"\n \"\"\"", @Length = 0, @LiteralText = "\"\"\"\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +Added line: 1191 +Added line: 6062 +Added line: 906 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 2786 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 413 | +- VariableDeclarator[@Initializer = true, @Name = "quote"] +Added line: 9727 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "quote", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7606 +Added line: 2444 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "\"\n", @Empty = false, @Image = "\"\"\"\n \"\n \"\"\"", @Length = 2, @LiteralText = "\"\"\"\n \"\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] - +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "backslash"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "backslash", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "\\\n", @Empty = false, @Image = "\"\"\"\n \\\\\n \"\"\"", @Length = 2, @LiteralText = "\"\"\"\n \\\\\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +Added line: 5073 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 4309 +Added line: 567 | +- VariableDeclarator[@Initializer = true, @Name = "normalStringLiteral"] +Added line: 7987 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "normalStringLiteral", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "test", @Empty = false, @Image = "\"test\"", @Length = 4, @LiteralText = "\"test\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] Added line: 4657 +Added line: 1836 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6663 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 6798 | +- VariableDeclarator[@Initializer = true, @Name = "code"] Added line: 4039 +Added line: 3571 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "code", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4506 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 3734 +Added line: 9826 | +- VariableDeclarator[@Initializer = true, @Name = "text"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "text", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", @Empty = false, @Image = "\"\"\"\n Lorem ipsum dolor sit amet, consectetur adipiscing \\\n elit, sed do eiusmod tempor incididunt ut labore \\\n et dolore magna aliqua.\\\n \"\"\"", @Length = 123, @LiteralText = "\"\"\"\n Lorem ipsum dolor sit amet, consectetur adipiscing \\\n elit, sed do eiusmod tempor incididunt ut labore \\\n et dolore magna aliqua.\\\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] - +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] Added line: 6287 +Added line: 8936 +Added line: 6172 | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "text", @Name = "text", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3130 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "colors"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "colors", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "red \ngreen \nblue \n", @Empty = false, @Image = "\"\"\"\n red \\s\n green\\s\n blue \\s\n \"\"\"", @Length = 21, @LiteralText = "\"\"\"\n red \\s\n green\\s\n blue \\s\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +Added line: 6562 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9785 +Added line: 73 +Added line: 6175 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8600 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 1880 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 4028 +Added line: 9416 +Added line: 1010 +Added line: 6000 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "colors", @Name = "colors", @ParenthesisDepth = 0, @Parenthesized = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 9004 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6129 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "emptyLine"] +Added line: 7315 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "emptyLine", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "\ntest\n", @Empty = false, @Image = "\"\"\"\n\ntest\n\"\"\"", @Length = 6, @LiteralText = "\"\"\"\n\ntest\n\"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2132 +Added line: 7902 +Added line: 5267 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] Added line: 2544 +Added line: 601 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] Added line: 7794 +Added line: 8299 | +- MethodCall[@CompileTimeConstant = false, @Image = "replaceAll", @MethodName = "replaceAll", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6140 Added line: 7814 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "emptyLine", @Name = "emptyLine", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 2] @@ -179,19 +257,30 @@ Added line: 7814 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "<LF>", @Empty = false, @Image = "\"<LF>\"", @Length = 4, @LiteralText = "\"<LF>\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3410 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 4342 +Added line: 2108 | +- VariableDeclarator[@Initializer = true, @Name = "bs"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "bs", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "\\test\n", @Empty = false, @Image = "\"\"\"\n \\\\test\n \"\"\"", @Length = 6, @LiteralText = "\"\"\"\n \\\\test\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1541 +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9756 +Added line: 8643 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 5467 +- ArgumentList[@Empty = false, @Size = 1] +Added line: 3499 +- MethodCall[@CompileTimeConstant = false, @Image = "replaceAll", @MethodName = "replaceAll", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1239 +Added line: 8107 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "bs", @Name = "bs", @ParenthesisDepth = 0, @Parenthesized = false] +- ArgumentList[@Empty = false, @Size = 2] +Added line: 3801 +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "\n", @Empty = false, @Image = "\"\\n\"", @Length = 1, @LiteralText = "\"\\n\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] - +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "<LF>", @Empty = false, @Image = "\"<LF>\"", @Length = 4, @LiteralText = "\"<LF>\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5707 Added line: 2434 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalClassAndInterfaceDeclarations.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalClassAndInterfaceDeclarations.txt index 341ea7034b..2744ab8bd3 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalClassAndInterfaceDeclarations.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalClassAndInterfaceDeclarations.txt @@ -1,37 +1,126 @@ +- CompilationUnit[@PackageName = ""] +Added line: 2979 +Added line: 9395 +Added line: 9248 +Added line: 9436 +Added line: 4361 +Added line: 3958 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalClassAndInterfaceDeclarations", @CanonicalName = "LocalClassAndInterfaceDeclarations", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "LocalClassAndInterfaceDeclarations", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 779 +Added line: 1389 +- ClassBody[@Empty = false, @Size = 1] +Added line: 3836 +Added line: 1672 +Added line: 1468 +Added line: 1222 +Added line: 7132 +- Initializer[@Static = false] +Added line: 6031 +Added line: 3650 +- Block[@Empty = false, @Size = 3, @containsComment = true] +Added line: 986 +Added line: 1608 +Added line: 7042 +Added line: 3130 +- LocalClassStatement[] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalClassAndInterfaceDeclarations$1MyLocalClass", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = false, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "MyLocalClass", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6112 +Added line: 4537 +Added line: 8874 +Added line: 926 | +- ClassBody[@Empty = false, @Size = 3] +Added line: 6479 +Added line: 1728 +Added line: 2284 +Added line: 2271 | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Static = true, @Visibility = Visibility.V_PACKAGE] +Added line: 9832 +Added line: 5359 +Added line: 7548 +Added line: 9889 +Added line: 1641 +Added line: 6233 | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 1856 | | +- VariableDeclarator[@Initializer = true, @Name = "constantField"] +Added line: 1810 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "constantField", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 8584 +Added line: 4850 +Added line: 7580 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 6290 +Added line: 1078 +Added line: 2704 +Added line: 5530 | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Static = true, @Visibility = Visibility.V_PACKAGE] +Added line: 4531 | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = false, @Name = "staticField"] +Added line: 9994 +Added line: 3921 +Added line: 1587 +Added line: 9616 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "staticField", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 7027 +Added line: 4175 +Added line: 9006 | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Name = "staticMethod", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +Added line: 3580 +Added line: 7433 +Added line: 7056 +Added line: 5289 +Added line: 5937 +Added line: 535 +Added line: 3931 +Added line: 32 | +- VoidType[] +Added line: 676 | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- LocalClassStatement[] +Added line: 9625 | +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "LocalClassAndInterfaceDeclarations$1MyLocalInterface", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = false, @Interface = true, @Local = true, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "MyLocalInterface", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_LOCAL] +Added line: 1918 +Added line: 4041 +Added line: 3330 +Added line: 3244 +Added line: 6955 +Added line: 7079 +Added line: 1039 +Added line: 790 +Added line: 7644 +Added line: 9077 +Added line: 942 +Added line: 4415 +Added line: 717 | +- ModifierList[@EffectiveModifiers = (JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = ()] +Added line: 1972 +Added line: 4689 +Added line: 601 | +- ClassBody[@Empty = true, @Size = 0] - +- LocalClassStatement[] +Added line: 375 +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalClassAndInterfaceDeclarations$1MyLocalEnum", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = true, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyLocalEnum", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_LOCAL] +Added line: 7717 +Added line: 2649 +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 9434 +Added line: 7755 +Added line: 4166 +- EnumBody[@Empty = false, @SeparatorSemi = false, @Size = 1, @TrailingComma = false] +Added line: 2715 +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_LOCAL, @Image = "A", @MethodName = "new", @Name = "A", @Visibility = Visibility.V_PUBLIC] +Added line: 2070 +Added line: 2245 +Added line: 7498 +Added line: 1975 +Added line: 3306 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "A", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +Added line: 4328 +Added line: 3591 +Added line: 2835 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalRecords.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalRecords.txt index 43856e366f..3af003e95d 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalRecords.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalRecords.txt @@ -1,16 +1,22 @@ +- CompilationUnit[@PackageName = ""] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.stream.Collectors", @ImportedSimpleName = "Collectors", @ModuleImport = false, @PackageName = "java.util.stream", @Static = false] +Added line: 3832 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.List", @ImportedSimpleName = "List", @ModuleImport = false, @PackageName = "java.util", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords", @CanonicalName = "LocalRecords", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "LocalRecords", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 4186 +- ClassBody[@Empty = false, @Size = 6] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$Merchant", @CanonicalName = "LocalRecords.Merchant", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "Merchant", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 1007 +Added line: 4985 | +- ClassBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 2, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "computeSales", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] +Added line: 8131 | +- FormalParameters[@Empty = false, @Size = 2] +Added line: 1921 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Merchant"] @@ -20,77 +26,111 @@ | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "month", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 2754 | +- ReturnStatement[] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "month", @Name = "month", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 2, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "findTopMerchants", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] +Added line: 599 +Added line: 9310 +Added line: 434 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "List"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] - | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Merchant"] | +- FormalParameters[@Empty = false, @Size = 2] - | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "List"] +Added line: 2314 +Added line: 424 | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 7311 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Merchant"] +Added line: 98 +Added line: 6316 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "merchants", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7223 +Added line: 6810 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 7101 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "month", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalClassStatement[] | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$1MerchantSales", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MerchantSales", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_LOCAL] +Added line: 3056 | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Merchant"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "merchant", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 5018 | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "sales", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = true, @Size = 0] | +- ReturnStatement[] +Added line: 7136 +Added line: 3298 +Added line: 9957 | +- MethodCall[@CompileTimeConstant = false, @Image = "collect", @MethodName = "collect", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5401 | +- MethodCall[@CompileTimeConstant = false, @Image = "map", @MethodName = "map", @ParenthesisDepth = 0, @Parenthesized = false] | | +- MethodCall[@CompileTimeConstant = false, @Image = "sorted", @MethodName = "sorted", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "map", @MethodName = "map", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8203 +Added line: 5435 | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "stream", @MethodName = "stream", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1907 | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "merchants", @Name = "merchants", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3782 | | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 8328 | | | | +- ArgumentList[@Empty = false, @Size = 1] | | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- LambdaParameterList[@Empty = false, @Size = 1] +Added line: 4949 | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] +Added line: 2627 | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "merchant", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] - | | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 69 +Added line: 9435 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "MerchantSales"] | | | | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 1631 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "merchant", @Name = "merchant", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2075 +Added line: 3717 | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "computeSales", @MethodName = "computeSales", @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 6327 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "merchant", @Name = "merchant", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9667 +Added line: 9770 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "month", @Name = "month", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- LambdaExpression[@Arity = 2, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7471 | | | +- LambdaParameterList[@Empty = false, @Size = 2] +Added line: 2426 | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "m1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "m2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 8571 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "compare", @MethodName = "compare", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2512 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Double"] +Added line: 4385 +Added line: 4727 | | | +- ArgumentList[@Empty = false, @Size = 2] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "sales", @MethodName = "sales", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "m2", @Name = "m2", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "sales", @MethodName = "sales", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4476 +Added line: 3054 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "m1", @Name = "m1", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- ArgumentList[@Empty = false, @Size = 1] @@ -102,8 +142,11 @@ | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Collectors"] | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 2947 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "methodWithLocalRecordAndModifiers", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3998 +Added line: 8635 | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 4, @containsComment = false] @@ -112,47 +155,72 @@ | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 7844 | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = true, @Size = 0] | +- LocalClassStatement[] +Added line: 2504 +Added line: 9584 | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$1MyRecord2", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyRecord2", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 6999 +Added line: 9000 | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = true, @Size = 0] | +- LocalClassStatement[] +Added line: 8494 | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$1MyRecord3", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyRecord3", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 2858 | | | +- Annotation[@SimpleName = "Deprecated"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Deprecated"] | | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 5452 | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 5356 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 7634 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = true, @Size = 0] +Added line: 1808 | +- LocalClassStatement[] | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$1MyRecord4", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyRecord4", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_LOCAL] +Added line: 4028 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | | +- Annotation[@SimpleName = "Deprecated"] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Deprecated"] +Added line: 6360 +Added line: 9866 | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] +Added line: 4918 | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 4842 +Added line: 4917 +Added line: 8418 +Added line: 9784 +Added line: 7110 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 7694 | +- RecordBody[@Empty = true, @Size = 0] +Added line: 2464 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "methodWithLocalClass", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 2866 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 9394 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- LocalClassStatement[] +Added line: 4371 | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$1MyLocalClass", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = false, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "MyLocalClass", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = true, @Size = 0] @@ -160,35 +228,56 @@ +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +Added line: 8095 +- Block[@Empty = false, @Size = 5, @containsComment = false] - +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "result"] +Added line: 5453 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5664 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +Added line: 1674 +Added line: 6041 +Added line: 6193 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 8026 +Added line: 7166 +Added line: 8078 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "non"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "non", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7865 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 6454 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4307 +Added line: 4286 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "sealed"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "sealed", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +Added line: 4722 +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1978 | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.SUB, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "non", @Name = "non", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1760 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "sealed", @Name = "sealed", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7040 +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7784 +Added line: 794 +Added line: 8629 +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6278 | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +- ArgumentList[@Empty = false, @Size = 1] +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4986 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/NonSealedIdentifier.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/NonSealedIdentifier.txt index c9ab9fd63d..4cae9b328f 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/NonSealedIdentifier.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/NonSealedIdentifier.txt @@ -1,49 +1,138 @@ +Added line: 8377 +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "NonSealedIdentifier", @CanonicalName = "NonSealedIdentifier", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "NonSealedIdentifier", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 2070 +Added line: 2069 +Added line: 3788 +Added line: 3928 +Added line: 4074 +- ClassBody[@Empty = false, @Size = 1] +Added line: 5436 +Added line: 3118 +Added line: 8007 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 6530 +Added line: 2764 +Added line: 7806 +Added line: 6745 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8804 | +- ArrayType[@ArrayDepth = 1] +Added line: 9008 +Added line: 1876 +Added line: 6195 +Added line: 3440 +Added line: 4860 | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 7555 +Added line: 8434 +Added line: 3701 +Added line: 6746 Added line: 8330 +Added line: 8987 +Added line: 2718 +Added line: 8795 +Added line: 4340 +Added line: 1715 | | +- ArrayTypeDim[@Varargs = false] +Added line: 7341 +Added line: 7868 +Added line: 2700 +Added line: 7709 +Added line: 9210 +Added line: 4825 Added line: 7970 +Added line: 731 +Added line: 5759 +Added line: 8746 +Added line: 9203 +Added line: 1902 | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7505 +- Block[@Empty = false, @Size = 5, @containsComment = false] +Added line: 1007 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 9488 +Added line: 1497 +Added line: 9265 +Added line: 1235 +Added line: 786 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1535 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 7248 Added line: 2449 | +- VariableDeclarator[@Initializer = true, @Name = "result"] Added line: 9238 +Added line: 6639 +Added line: 6315 +Added line: 3306 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 293 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +Added line: 1461 +Added line: 4400 +Added line: 4045 +Added line: 6466 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 1012 | +- VariableDeclarator[@Initializer = true, @Name = "non"] +Added line: 7962 +Added line: 7461 +Added line: 2115 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "non", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1673 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 4015 +Added line: 2857 +Added line: 627 +Added line: 1481 +Added line: 3676 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] - | +- VariableDeclarator[@Initializer = true, @Name = "sealed"] +Added line: 2113 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "sealed", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] - | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +Added line: 7936 +Added line: 3842 +- ExpressionStatement[] +Added line: 8550 +Added line: 1913 +Added line: 1413 | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "non", @Name = "non", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8462 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "sealed", @Name = "sealed", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7523 +Added line: 7939 +Added line: 8299 +- ExpressionStatement[] Added line: 2338 +Added line: 3912 +Added line: 5355 +Added line: 6276 +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4517 +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7697 +Added line: 4346 +Added line: 1411 +Added line: 4232 | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9676 +Added line: 9826 +Added line: 1562 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +- ArgumentList[@Empty = false, @Size = 1] - +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3003 +Added line: 52 +Added line: 9608 +Added line: 4584 +Added line: 2432 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/PatternMatchingInstanceof.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/PatternMatchingInstanceof.txt index c1e0751303..c144bfcdc9 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/PatternMatchingInstanceof.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/PatternMatchingInstanceof.txt @@ -3,17 +3,21 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.ElementType.FIELD", @ImportedSimpleName = "FIELD", @ModuleImport = false, @PackageName = "java.lang.annotation.ElementType", @Static = true] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.ElementType.LOCAL_VARIABLE", @ImportedSimpleName = "LOCAL_VARIABLE", @ModuleImport = false, @PackageName = "java.lang.annotation.ElementType", @Static = true] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.ElementType.METHOD", @ImportedSimpleName = "METHOD", @ModuleImport = false, @PackageName = "java.lang.annotation.ElementType", @Static = true] +Added line: 2446 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.ElementType.MODULE", @ImportedSimpleName = "MODULE", @ModuleImport = false, @PackageName = "java.lang.annotation.ElementType", @Static = true] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.ElementType.PACKAGE", @ImportedSimpleName = "PACKAGE", @ModuleImport = false, @PackageName = "java.lang.annotation.ElementType", @Static = true] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.ElementType.PARAMETER", @ImportedSimpleName = "PARAMETER", @ModuleImport = false, @PackageName = "java.lang.annotation.ElementType", @Static = true] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.ElementType.TYPE", @ImportedSimpleName = "TYPE", @ModuleImport = false, @PackageName = "java.lang.annotation.ElementType", @Static = true] +Added line: 1855 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.ElementType", @ImportedSimpleName = "ElementType", @ModuleImport = false, @PackageName = "java.lang.annotation", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.Target", @ImportedSimpleName = "Target", @ModuleImport = false, @PackageName = "java.lang.annotation", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "PatternMatchingInstanceof", @CanonicalName = "PatternMatchingInstanceof", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PatternMatchingInstanceof", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 5275 +- ClassBody[@Empty = false, @Size = 5] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = false, @Visibility = Visibility.V_PRIVATE] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] +Added line: 8887 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "s"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] @@ -23,22 +27,29 @@ | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 8, @containsComment = false] +Added line: 8258 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8952 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableDeclarator[@Initializer = true, @Name = "obj"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "abc", @Empty = false, @Image = "\"abc\"", @Length = 3, @LiteralText = "\"abc\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- IfStatement[@Else = true] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5568 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 2565 +Added line: 2305 +Added line: 3925 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 3, @containsComment = false] | | | +- ExpressionStatement[] +Added line: 5376 | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -48,37 +59,50 @@ | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a) obj == s: ", @Empty = false, @Image = "\"a) obj == s: \"", @Length = 13, @LiteralText = "\"a) obj == s: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 878 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ExpressionStatement[] | | | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9673 | | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "other value", @Empty = false, @Image = "\"other value\"", @Length = 11, @LiteralText = "\"other value\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 9926 | | | +- ExpressionStatement[] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 1523 | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "changed s to ", @Empty = false, @Image = "\"changed s to \"", @Length = 13, @LiteralText = "\"changed s to \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ": obj == s: ", @Empty = false, @Image = "\": obj == s: \"", @Length = 12, @LiteralText = "\": obj == s: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 2138 | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 2289 +Added line: 1630 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 398 | | +- Block[@Empty = false, @Size = 1, @containsComment = true] | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2828 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6276 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 2811 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "b) obj == s: ", @Empty = false, @Image = "\"b) obj == s: \"", @Length = 13, @LiteralText = "\"b) obj == s: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 8509 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5113 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | +- IfStatement[@Else = true] | | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.NEGATION, @ParenthesisDepth = 0, @Parenthesized = false] @@ -86,22 +110,29 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 7408 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = true] | | | +- ExpressionStatement[] +Added line: 1614 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7969 +Added line: 2156 | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 3632 | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "c) obj == s: ", @Empty = false, @Image = "\"c) obj == s: \"", @Length = 13, @LiteralText = "\"c) obj == s: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 3951 | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Block[@Empty = false, @Size = 1, @containsComment = true] +Added line: 4361 | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -110,39 +141,52 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "d) obj == s: ", @Empty = false, @Image = "\"d) obj == s: \"", @Length = 13, @LiteralText = "\"d) obj == s: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5944 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 3146 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9004 +Added line: 5652 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | +- IfStatement[@Else = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_AND, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 32 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 7777 | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "length", @MethodName = "length", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 9839 +Added line: 5521 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | | +- Block[@Empty = false, @Size = 1, @containsComment = true] - | | +- ExpressionStatement[] +Added line: 5579 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 1110 +Added line: 9147 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "e) obj == s: ", @Empty = false, @Image = "\"e) obj == s: \"", @Length = 13, @LiteralText = "\"e) obj == s: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 2029 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | +- IfStatement[@Else = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2567 +Added line: 4075 | | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -150,11 +194,14 @@ | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "length", @MethodName = "length", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9550 +Added line: 4522 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] - | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "5", @IntLiteral = true, @Integral = true, @LiteralText = "5", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] +Added line: 9533 | | +- Block[@Empty = false, @Size = 1, @containsComment = true] | | +- ExpressionStatement[] +Added line: 7227 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -171,7 +218,9 @@ | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] +Added line: 4837 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 9027 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = true] | | | +- ExpressionStatement[] @@ -180,29 +229,38 @@ | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 5379 +Added line: 7320 | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "g) obj == s: ", @Empty = false, @Image = "\"g) obj == s: \"", @Length = 13, @LiteralText = "\"g) obj == s: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Block[@Empty = false, @Size = 1, @containsComment = true] +Added line: 108 | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9861 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3424 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "h) obj == s: ", @Empty = false, @Image = "\"h) obj == s: \"", @Length = 13, @LiteralText = "\"h) obj == s: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 5766 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | +- IfStatement[@Else = true] +Added line: 1598 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5653 | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7447 +Added line: 334 | | | | +- Annotation[@SimpleName = "Deprecated"] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Deprecated"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] @@ -213,12 +271,17 @@ | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 5420 +Added line: 1367 | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "i) obj == s: ", @Empty = false, @Image = "\"i) obj == s: \"", @Length = 13, @LiteralText = "\"i) obj == s: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 7993 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1834 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1065 | | +- Block[@Empty = false, @Size = 1, @containsComment = true] | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -230,7 +293,9 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "j) obj == s: ", @Empty = false, @Image = "\"j) obj == s: \"", @Length = 13, @LiteralText = "\"j) obj == s: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1209 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4767 | +- IfStatement[@Else = true] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] @@ -262,30 +327,42 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "l) obj == s: ", @Empty = false, @Image = "\"l) obj == s: \"", @Length = 13, @LiteralText = "\"l) obj == s: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 4596 +Added line: 3736 | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- VoidType[] +Added line: 7934 +Added line: 473 | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 941 +Added line: 7170 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 5454 +Added line: 9684 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | +- ArrayTypeDim[@Varargs = false] | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] - | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "test", @MethodName = "test", @ParenthesisDepth = 0, @Parenthesized = false] | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "PatternMatchingInstanceof"] | | +- ArgumentList[@Empty = true, @Size = 0] | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 643 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "PatternMatchingInstanceof$Foo", @CanonicalName = "PatternMatchingInstanceof.Foo", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Foo", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 6393 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5800 +Added line: 8367 | +- ClassBody[@Empty = false, @Size = 1] +Added line: 5296 | +- Initializer[@Static = false] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -294,24 +371,36 @@ | | +- VariableDeclarator[@Initializer = true, @Name = "f"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9552 +Added line: 2991 +Added line: 8420 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | +- VariableDeclarator[@Initializer = true, @Name = "o"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4031 +Added line: 4609 +Added line: 6085 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5484 +Added line: 2104 | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8623 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Foo"] | +- Annotation[@SimpleName = "Nullable"] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Nullable"] +- AnnotationTypeDeclaration[@Abstract = true, @Annotation = true, @Anonymous = false, @BinaryName = "PatternMatchingInstanceof$Nullable", @CanonicalName = "PatternMatchingInstanceof.Nullable", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Nullable", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +- ModifierList[@EffectiveModifiers = (JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = ()] | +- Annotation[@SimpleName = "Target"] +Added line: 1819 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Target"] +Added line: 4674 | +- AnnotationMemberList[@Empty = false, @Size = 1] | +- MemberValuePair[@Image = "value", @Name = "value", @Shorthand = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "TYPE_USE", @Name = "TYPE_USE", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 499 | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ElementType"] +Added line: 6923 +- AnnotationTypeBody[@Empty = true, @Size = 0] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Point.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Point.txt index 69c46693e0..67cc3bb06e 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Point.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Point.txt @@ -1,46 +1,135 @@ +Added line: 2928 +Added line: 863 +- CompilationUnit[@PackageName = ""] +Added line: 443 +Added line: 1780 +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Point", @CanonicalName = "Point", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Point", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 8199 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 7437 +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] +Added line: 2966 | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 9290 +Added line: 9835 +Added line: 1352 +Added line: 4319 +Added line: 3419 | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 5504 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 5087 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +- RecordBody[@Empty = false, @Size = 1] +Added line: 5773 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 7639 +Added line: 4037 +Added line: 1006 +Added line: 1369 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 5544 +Added line: 5542 +Added line: 880 +Added line: 95 +Added line: 2987 +Added line: 5 +Added line: 2001 +Added line: 176 +- FormalParameters[@Empty = false, @Size = 1] +Added line: 7250 +Added line: 8347 | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 306 +Added line: 4811 +Added line: 9370 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2361 +Added line: 8946 | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 7287 +Added line: 2801 +Added line: 1805 +Added line: 3439 | | +- ArrayTypeDim[@Varargs = false] +Added line: 723 +Added line: 8075 +Added line: 8222 Added line: 2375 +Added line: 4405 +Added line: 902 +Added line: 8234 | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 2566 +Added line: 9376 +Added line: 9688 +Added line: 5384 +Added line: 199 +- Block[@Empty = false, @Size = 2, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 5101 +Added line: 1283 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8528 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] +Added line: 5654 +Added line: 5098 +Added line: 1489 +Added line: 8219 | +- VariableDeclarator[@Initializer = true, @Name = "p"] +Added line: 5412 +Added line: 1956 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9723 +Added line: 7971 | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 3709 +Added line: 1273 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 4426 Added line: 9696 +Added line: 9872 +Added line: 9059 +Added line: 9954 +Added line: 7007 +Added line: 6240 +Added line: 8502 +Added line: 3629 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] Added line: 6629 +Added line: 400 +- ExpressionStatement[] +Added line: 875 +Added line: 5551 +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9197 Added line: 7706 +Added line: 7473 +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3906 | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2952 +Added line: 1255 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 2162 Added line: 4380 +Added line: 6447 +Added line: 6252 +- ArgumentList[@Empty = false, @Size = 1] +Added line: 9057 +Added line: 3758 +Added line: 892 +Added line: 1796 +Added line: 660 +Added line: 8750 +Added line: 2951 +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5896 +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "p = ", @Empty = false, @Image = "\"p = \"", @Length = 4, @LiteralText = "\"p = \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Records.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Records.txt index d30d7ce1f6..4d39ffccbe 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Records.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Records.txt @@ -1,14 +1,17 @@ -+- CompilationUnit[@PackageName = ""] +Added line: 7522 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.io.IOException", @ImportedSimpleName = "IOException", @ModuleImport = false, @PackageName = "java.io", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.Target", @ImportedSimpleName = "Target", @ModuleImport = false, @PackageName = "java.lang.annotation", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.ElementType", @ImportedSimpleName = "ElementType", @ModuleImport = false, @PackageName = "java.lang.annotation", @Static = false] +Added line: 4823 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.Objects", @ImportedSimpleName = "Objects", @ModuleImport = false, @PackageName = "java.util", @Static = false] +Added line: 9885 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records", @CanonicalName = "Records", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Records", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 10] +- AnnotationTypeDeclaration[@Abstract = true, @Annotation = true, @Anonymous = false, @BinaryName = "Records$Nullable", @CanonicalName = "Records.Nullable", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Nullable", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = ()] | | +- Annotation[@SimpleName = "Target"] +Added line: 8463 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Target"] | | +- AnnotationMemberList[@Empty = false, @Size = 1] | | +- MemberValuePair[@Image = "value", @Name = "value", @Shorthand = true] @@ -24,18 +27,20 @@ | | +- MemberValuePair[@Image = "value", @Name = "value", @Shorthand = true] | | +- MemberValueArrayInitializer[] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "CONSTRUCTOR", @Name = "CONSTRUCTOR", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ElementType"] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "PARAMETER", @Name = "PARAMETER", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3108 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ElementType"] | +- AnnotationTypeBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$MyComplex", @CanonicalName = "Records.MyComplex", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyComplex", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 9628 | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 1120 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "real", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] @@ -48,16 +53,27 @@ | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- Annotation[@SimpleName = "MyAnnotation"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "MyAnnotation"] +Added line: 8682 +Added line: 6413 | | +- FormalParameters[@Empty = false, @Size = 2] +Added line: 3250 | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 7502 +Added line: 4057 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- Annotation[@SimpleName = "MyAnnotation"] | | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "MyAnnotation"] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 8903 | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "real", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 3650 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 2339 +Added line: 8528 +Added line: 2989 +Added line: 1472 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "imaginary", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 3, @containsComment = false] | | +- IfStatement[@Else = false] @@ -70,9 +86,14 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "too big", @Empty = false, @Image = "\"too big\"", @Length = 7, @LiteralText = "\"too big\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- ExpressionStatement[] +Added line: 9163 +Added line: 1132 | | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4058 +Added line: 7289 | | | +- FieldAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "real", @Name = "real", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8821 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "real", @Name = "real", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ExpressionStatement[] | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] @@ -83,13 +104,18 @@ | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 7570 | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = true, @Size = 0] +Added line: 5557 | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$MyComplex$NestedClass", @CanonicalName = "Records.MyComplex.NestedClass", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "NestedClass", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 2241 | +- ClassBody[@Empty = true, @Size = 0] +Added line: 616 +Added line: 3146 +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$Range", @CanonicalName = "Records.Range", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Range", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] @@ -102,13 +128,18 @@ | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "hi", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = false, @Size = 2] +Added line: 4912 | +- CompactConstructorDeclaration[@EffectiveVisibility = Visibility.V_PUBLIC, @Image = "Range", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] - | | | +- Annotation[@SimpleName = "MyAnnotation"] +Added line: 7967 +Added line: 6584 +Added line: 2175 +Added line: 3300 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "MyAnnotation"] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- IfStatement[@Else = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8911 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ThrowStatement[] @@ -119,6 +150,7 @@ | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArgumentList[@Empty = false, @Size = 3] +Added line: 9938 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "(%d,%d)", @Empty = false, @Image = "\"(%d,%d)\"", @Length = 7, @LiteralText = "\"(%d,%d)\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] @@ -131,19 +163,29 @@ | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 3875 +Added line: 6337 | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "foo", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = false, @Size = 1] +Added line: 7598 | +- CompactConstructorDeclaration[@EffectiveVisibility = Visibility.V_PUBLIC, @Image = "RecordWithLambdaInCompactConstructor", @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 3199 +Added line: 476 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 2351 | +- ExpressionStatement[] +Added line: 5803 | +- MethodCall[@CompileTimeConstant = false, @Image = "requireNonNull", @MethodName = "requireNonNull", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Objects"] +Added line: 2896 | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 566 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "foo", @Name = "foo", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9311 | +- LambdaExpression[@Arity = 0, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = true, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | +- LambdaParameterList[@Empty = true, @Size = 0] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "foo", @Empty = false, @Image = "\"foo\"", @Length = 3, @LiteralText = "\"foo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -151,55 +193,87 @@ | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = true] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = true, @Visibility = Visibility.V_PRIVATE] +Added line: 8481 | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- Annotation[@SimpleName = "Nullable"] +Added line: 2609 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Nullable"] | | | +- Annotation[@SimpleName = "Deprecated"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Deprecated"] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 5141 | | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 975 | | | +- ArrayTypeDim[@Varargs = true] | | | +- Annotation[@SimpleName = "Nullable"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Nullable"] +Added line: 231 +Added line: 5338 | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$ArrayRec", @CanonicalName = "Records.ArrayRec", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "ArrayRec", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 8424 | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] +Added line: 562 +Added line: 6812 | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 7487 | | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 1974 +Added line: 6130 | | | +- ArrayTypeDim[@Varargs = false] | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +Added line: 1445 +Added line: 4628 +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$EmptyRec", @CanonicalName = "Records.EmptyRec", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "EmptyRec", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 4538 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 5455 | +- TypeParameters[@Empty = false, @Size = 1] +Added line: 4336 | | +- TypeParameter[@Image = "Type", @Name = "Type", @TypeBound = false] | +- RecordComponentList[@Empty = true, @Size = 0, @Varargs = false] +Added line: 7441 +Added line: 2883 | +- RecordBody[@Empty = false, @Size = 3] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "foo", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 657 | | +- VoidType[] +Added line: 5745 | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] +Added line: 9337 +Added line: 3218 | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "bar", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] +Added line: 7872 | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 4130 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Type"] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ReturnStatement[] +Added line: 3955 +Added line: 335 +Added line: 6081 +Added line: 1982 | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "baz", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- VoidType[] +Added line: 531 | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 2, @containsComment = false] +Added line: 363 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1983 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "EmptyRec"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] @@ -207,38 +281,53 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = true, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "EmptyRec"] - | | | +- TypeArguments[@Diamond = true, @Empty = true, @Size = 0] | | +- ArgumentList[@Empty = true, @Size = 0] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 903 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 9062 +Added line: 492 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "r", @Name = "r", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "Records$Person", @CanonicalName = "Records.Person", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "Person", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 4994 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 562 | +- ClassBody[@Empty = false, @Size = 2] +Added line: 4846 | +- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "firstName", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- FormalParameters[@Empty = true, @Size = 0] | +- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "lastName", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] +Added line: 6950 +Added line: 4715 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 7248 | +- FormalParameters[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$PersonRecord", @CanonicalName = "Records.PersonRecord", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "PersonRecord", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 1756 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 6640 +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] +Added line: 5904 | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 7334 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "firstName", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 9253 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lastName", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +- ImplementsList[@Empty = false, @Size = 2] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Person"] | +- ClassType[@FullyQualified = true, @PackageQualifier = "java.io", @SimpleName = "Serializable"] +Added line: 9724 +Added line: 4202 +- RecordBody[@Empty = true, @Size = 0] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/LocalVars.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/LocalVars.txt index e095f7c6a6..fdc72a1d7a 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/LocalVars.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/LocalVars.txt @@ -1,25 +1,114 @@ +Added line: 824 +Added line: 5335 +Added line: 1451 +Added line: 3507 +- CompilationUnit[@PackageName = ""] +Added line: 8855 +Added line: 3019 +Added line: 9566 +Added line: 6423 +Added line: 7704 +Added line: 990 +Added line: 3851 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalVars", @CanonicalName = "LocalVars", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "LocalVars", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 3873 +- ClassBody[@Empty = false, @Size = 1] +Added line: 3857 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "aMethod", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 5459 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 5846 +Added line: 8052 +Added line: 1396 +Added line: 8809 +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +Added line: 1012 +Added line: 1395 +Added line: 1043 +- Block[@Empty = false, @Size = 2, @containsComment = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 7087 +Added line: 3204 +Added line: 320 +Added line: 803 +Added line: 8722 +Added line: 8167 +Added line: 2698 +Added line: 1355 +Added line: 7899 +Added line: 8293 +Added line: 2719 +Added line: 9256 +Added line: 6654 +Added line: 5235 +Added line: 9128 +Added line: 9566 Added line: 7671 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8768 +Added line: 108 +Added line: 4384 +Added line: 3922 +Added line: 2510 +Added line: 3451 | +- VariableDeclarator[@Initializer = true, @Name = "sealed"] Added line: 9473 +Added line: 1839 +Added line: 4281 +Added line: 1444 +Added line: 3476 Added line: 5178 +Added line: 3853 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "sealed", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1898 +Added line: 7460 +Added line: 1211 +Added line: 5345 | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5294 +- ExpressionStatement[] +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9928 +Added line: 4113 +Added line: 7440 +Added line: 1641 +Added line: 2548 +Added line: 4177 +Added line: 9182 +Added line: 2210 +Added line: 16 +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "sealed", @Name = "sealed", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8939 +Added line: 2135 +Added line: 8287 +- MethodCall[@CompileTimeConstant = false, @Image = "getClass", @MethodName = "getClass", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 461 +Added line: 3897 +Added line: 3086 +Added line: 5089 +Added line: 4138 +Added line: 1223 +Added line: 1280 +Added line: 6348 +Added line: 4693 Added line: 7828 +Added line: 6130 +Added line: 7719 | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 951 +Added line: 6220 +Added line: 5293 | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 6020 +Added line: 2912 +Added line: 4106 +Added line: 1180 +- ArgumentList[@Empty = true, @Size = 0] +Added line: 239 +Added line: 6933 +Added line: 4096 +Added line: 4375 +Added line: 7884 +Added line: 1166 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/SealedInnerClasses.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/SealedInnerClasses.txt index 47d4006729..7316901c3d 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/SealedInnerClasses.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/SealedInnerClasses.txt @@ -1,26 +1,115 @@ +Added line: 3253 +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SealedInnerClasses", @CanonicalName = "SealedInnerClasses", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SealedInnerClasses", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 4536 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 1083 +Added line: 6947 +Added line: 9643 +Added line: 3571 +- ClassBody[@Empty = false, @Size = 2] +Added line: 8884 +Added line: 6472 +Added line: 7651 +Added line: 4492 +Added line: 8927 +Added line: 4345 +Added line: 18 +Added line: 5900 +Added line: 5679 +Added line: 3687 +Added line: 7840 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SealedInnerClasses$Square", @CanonicalName = "SealedInnerClasses.Square", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Square", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 4034 +Added line: 7964 +Added line: 6114 +Added line: 5068 +Added line: 914 | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED), @ExplicitModifiers = (JModifier.SEALED)] +Added line: 9222 +Added line: 4642 +Added line: 4388 | +- ImplementsList[@Empty = false, @Size = 1] +Added line: 7952 +Added line: 6123 +Added line: 4013 +Added line: 3623 +Added line: 6445 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Squircle"] +Added line: 3883 +Added line: 8761 +Added line: 3745 | +- ClassBody[@Empty = false, @Size = 2] +Added line: 1410 +Added line: 3226 +Added line: 8715 | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SealedInnerClasses$Square$OtherSquare", @CanonicalName = "SealedInnerClasses.Square.OtherSquare", @EffectiveVisibility = Visibility.V_PRIVATE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "OtherSquare", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PRIVATE] +Added line: 7880 +Added line: 8655 +Added line: 8107 +Added line: 6186 | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.NON_SEALED), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.NON_SEALED)] +Added line: 4947 +Added line: 46 +Added line: 4933 | | +- ExtendsList[@Empty = false, @Size = 1] +Added line: 7250 +Added line: 6422 +Added line: 1549 +Added line: 8381 +Added line: 6367 +Added line: 2199 +Added line: 6417 +Added line: 8252 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Square"] +Added line: 2304 | | +- ClassBody[@Empty = true, @Size = 0] +Added line: 9709 +Added line: 1714 | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SealedInnerClasses$Square$StaticClass", @CanonicalName = "SealedInnerClasses.Square.StaticClass", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "StaticClass", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 7357 +Added line: 8593 +Added line: 2322 | +- ModifierList[@EffectiveModifiers = (JModifier.NON_SEALED, JModifier.STATIC), @ExplicitModifiers = (JModifier.NON_SEALED, JModifier.STATIC)] +Added line: 1006 | +- ImplementsList[@Empty = false, @Size = 1] +Added line: 3290 +Added line: 3870 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Squircle"] +Added line: 9867 +Added line: 8741 +Added line: 1163 +Added line: 4575 +Added line: 103 +Added line: 5638 +Added line: 3758 | +- ClassBody[@Empty = true, @Size = 0] +Added line: 8790 +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "SealedInnerClasses$Squircle", @CanonicalName = "SealedInnerClasses.Squircle", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "Squircle", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.SEALED)] - +- PermitsList[@Empty = false, @Size = 2] +Added line: 9959 +Added line: 1118 +Added line: 7167 +Added line: 2875 +Added line: 3576 +Added line: 8772 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Square"] +Added line: 8548 +Added line: 4696 +Added line: 1003 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "StaticClass"] +Added line: 9972 +Added line: 8681 +Added line: 820 +Added line: 6724 +Added line: 6876 +Added line: 673 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Square"] +Added line: 7841 +Added line: 9967 +Added line: 8411 +Added line: 2218 +Added line: 3911 +- ClassBody[@Empty = true, @Size = 0] +Added line: 8533 +Added line: 9505 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/expression/Expr.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/expression/Expr.txt index c8b68c3960..51ee572045 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/expression/Expr.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/expression/Expr.txt @@ -1,11 +1,100 @@ +Added line: 1682 +- CompilationUnit[@PackageName = "com.example.expression"] +- PackageDeclaration[@Name = "com.example.expression"] +Added line: 7352 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "com.example.expression.Expr", @CanonicalName = "com.example.expression.Expr", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = false, @PackageName = "com.example.expression", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "Expr", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 5950 +Added line: 5268 +Added line: 918 +Added line: 2757 +Added line: 3093 +Added line: 5315 +Added line: 3938 +Added line: 7750 +Added line: 3571 +Added line: 9742 +Added line: 3462 +Added line: 6980 +Added line: 8850 +Added line: 8866 +Added line: 8053 +Added line: 1917 +Added line: 4721 +Added line: 73 +Added line: 3684 +Added line: 5003 +Added line: 4465 +Added line: 9449 +Added line: 3215 +Added line: 3340 +Added line: 3028 +Added line: 3610 +Added line: 1473 +Added line: 4993 +Added line: 1770 +Added line: 6203 +Added line: 4185 +Added line: 3291 +Added line: 4011 +Added line: 7859 +Added line: 6623 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.SEALED, JModifier.ABSTRACT), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.SEALED)] +Added line: 967 +Added line: 289 +- PermitsList[@Empty = false, @Size = 4] +Added line: 6754 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ConstantExpr"] +Added line: 2150 +Added line: 573 +Added line: 6203 +Added line: 1499 +Added line: 9050 +Added line: 5999 +Added line: 2254 +Added line: 6853 +Added line: 4001 +Added line: 7231 +Added line: 6478 +Added line: 1845 +Added line: 2970 +Added line: 5977 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "PlusExpr"] +Added line: 4357 +Added line: 1822 +Added line: 5374 +Added line: 941 +Added line: 5798 +Added line: 5739 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "TimesExpr"] +Added line: 3789 +Added line: 1729 +Added line: 9888 +Added line: 1183 +Added line: 775 +Added line: 9606 +Added line: 6117 +Added line: 4125 +Added line: 657 +Added line: 3299 +Added line: 5986 +Added line: 2609 +Added line: 9208 +Added line: 9929 +Added line: 1696 +Added line: 150 +Added line: 6848 +Added line: 2019 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "NegExpr"] +Added line: 8951 +- ClassBody[@Empty = true, @Size = 0] +Added line: 9721 +Added line: 4025 +Added line: 625 +Added line: 4237 +Added line: 7505 +Added line: 273 +Added line: 46 +Added line: 6612 +Added line: 870 +Added line: 8773 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Shape.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Shape.txt index 2a58c801dc..67e7d5cadb 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Shape.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Shape.txt @@ -1,12 +1,101 @@ +Added line: 6970 +Added line: 7636 Added line: 2547 +Added line: 3020 +Added line: 3220 +Added line: 2778 +Added line: 2231 +Added line: 887 +Added line: 188 +Added line: 2469 Added line: 4162 -+- CompilationUnit[@PackageName = "com.example.geometry"] -Added line: 8359 +Added line: 8939 +Added line: 5567 +Added line: 7272 +Added line: 9795 +Added line: 389 +Added line: 9806 +Added line: 7802 +Added line: 1105 +Added line: 2944 +Added line: 4707 +Added line: 1638 +Added line: 7298 +Added line: 1491 +Added line: 9116 +Added line: 590 +Added line: 3514 +Added line: 2345 +Added line: 7126 +Added line: 1246 +Added line: 3478 +Added line: 8214 +Added line: 2025 +Added line: 3005 +Added line: 1738 +Added line: 1813 +Added line: 5853 +Added line: 6174 +Added line: 333 +Added line: 1737 +Added line: 3034 +Added line: 8958 +Added line: 7140 +Added line: 5266 +Added line: 4092 +Added line: 8280 +Added line: 7022 +Added line: 5230 +Added line: 2336 +Added line: 314 +Added line: 5677 Added line: 4504 +Added line: 3025 +Added line: 948 +Added line: 1249 +Added line: 5017 +Added line: 2867 +Added line: 1631 +Added line: 2115 +Added line: 234 +Added line: 5119 +Added line: 7070 +Added line: 6375 +Added line: 6798 +Added line: 253 +Added line: 654 +Added line: 1927 +Added line: 5886 +Added line: 3011 +Added line: 5704 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.example.geometry.Shape", @CanonicalName = "com.example.geometry.Shape", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "com.example.geometry", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Shape", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 8035 +Added line: 1683 +Added line: 1571 +- PermitsList[@Empty = false, @Size = 3] +Added line: 1336 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] - | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Square"] +Added line: 9137 +Added line: 1994 +Added line: 5045 +Added line: 1516 +Added line: 9388 +Added line: 8669 +- ClassBody[@Empty = true, @Size = 0] +Added line: 7583 +Added line: 2568 +Added line: 9655 +Added line: 6844 +Added line: 3163 +Added line: 7818 +Added line: 101 +Added line: 3126 +Added line: 6019 Added line: 5850 +Added line: 7619 +Added line: 7650 +Added line: 2209 +Added line: 3490 +Added line: 7700 +Added line: 5219 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Square.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Square.txt index 6939b80ab6..dea93afb0a 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Square.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Square.txt @@ -1,8 +1,97 @@ +Added line: 8560 +Added line: 8198 +Added line: 7703 +Added line: 4482 +Added line: 9437 +Added line: 1845 +Added line: 2429 +Added line: 1653 +Added line: 6958 +Added line: 9016 +Added line: 1597 +Added line: 5167 +Added line: 180 +Added line: 6641 +Added line: 1967 +Added line: 7976 +Added line: 8609 +Added line: 8254 +Added line: 3106 +Added line: 8169 +- CompilationUnit[@PackageName = "com.example.geometry"] +Added line: 8421 +Added line: 7289 +Added line: 3093 +Added line: 1231 +Added line: 121 +Added line: 2710 +Added line: 5245 +Added line: 9193 +Added line: 9298 +- PackageDeclaration[@Name = "com.example.geometry"] +Added line: 7434 +Added line: 5110 +Added line: 3504 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9464 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.example.geometry.Square", @CanonicalName = "com.example.geometry.Square", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "com.example.geometry", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Square", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 7264 +Added line: 5495 +Added line: 6229 +Added line: 6338 +Added line: 5408 +Added line: 545 +Added line: 4 +Added line: 3383 +Added line: 3919 +Added line: 6391 +Added line: 2889 +Added line: 3616 +Added line: 8585 +Added line: 1868 +Added line: 2924 +Added line: 2635 +Added line: 6458 +Added line: 601 +Added line: 7382 +Added line: 6783 +Added line: 7511 +Added line: 2928 +Added line: 1124 +Added line: 3233 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.NON_SEALED), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.NON_SEALED)] +Added line: 9330 +Added line: 2437 +Added line: 8496 +Added line: 5930 +Added line: 8957 +Added line: 1511 +- ExtendsList[@Empty = false, @Size = 1] +Added line: 8224 +Added line: 779 +Added line: 3292 +Added line: 7830 +Added line: 9480 +Added line: 7508 +Added line: 1623 +Added line: 7939 +Added line: 3784 +Added line: 9101 +Added line: 3771 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Shape"] +Added line: 1733 +Added line: 3252 +Added line: 5957 +Added line: 3621 +Added line: 6764 +Added line: 8587 +Added line: 2368 +Added line: 9325 +Added line: 2202 +Added line: 1821 +Added line: 5488 +Added line: 7639 +Added line: 2601 +Added line: 6369 +- ClassBody[@Empty = true, @Size = 0] +Added line: 5653 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/AnnotationValueInitializers.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/AnnotationValueInitializers.txt index f605b16b11..0eeba42e41 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/AnnotationValueInitializers.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/AnnotationValueInitializers.txt @@ -1,25 +1,114 @@ +Added line: 9885 +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "AnnotationValueInitializers", @CanonicalName = "AnnotationValueInitializers", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "AnnotationValueInitializers", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5218 +Added line: 8209 +Added line: 7678 +Added line: 1851 +Added line: 7696 Added line: 592 | | +- Annotation[@SimpleName = "MyAnnotation"] +Added line: 5409 +Added line: 5736 +Added line: 1254 +Added line: 7463 +Added line: 395 +Added line: 7931 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "MyAnnotation"] +Added line: 9492 +Added line: 4833 +Added line: 6972 +Added line: 1876 +Added line: 9160 +Added line: 6309 +Added line: 5678 +Added line: 8953 +Added line: 5051 +Added line: 6219 +Added line: 9641 +Added line: 9298 +Added line: 8981 +Added line: 5537 +Added line: 518 +Added line: 4591 +Added line: 8771 Added line: 9374 +Added line: 7234 +Added line: 7629 +Added line: 7955 +Added line: 9107 +Added line: 6455 +Added line: 1912 +Added line: 5950 +Added line: 3022 +Added line: 2580 +Added line: 3911 +Added line: 9980 +Added line: 3785 +Added line: 8561 | | +- AnnotationMemberList[@Empty = false, @Size = 2] +Added line: 4029 +Added line: 8001 +Added line: 4504 +Added line: 109 +Added line: 8092 | | +- MemberValuePair[@Image = "a", @Name = "a", @Shorthand = false] +Added line: 8612 Added line: 4717 +Added line: 7826 +Added line: 3308 +Added line: 7995 +Added line: 7052 +Added line: 9660 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 9391 +Added line: 1682 +Added line: 8426 | | +- MemberValuePair[@Image = "b", @Name = "b", @Shorthand = false] +Added line: 8759 +Added line: 2028 +Added line: 260 +Added line: 5654 +Added line: 6089 +Added line: 3872 +Added line: 1414 +Added line: 1682 +Added line: 6773 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "b", @Empty = false, @Image = "\"b\"", @Length = 1, @LiteralText = "\"b\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 2861 +Added line: 9809 | +- ClassBody[@Empty = true, @Size = 0] +Added line: 4044 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "AnnotationValueInitializers2", @CanonicalName = "AnnotationValueInitializers2", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "AnnotationValueInitializers2", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 1535 +Added line: 9592 +Added line: 4493 +Added line: 8453 +Added line: 1279 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "MyAnnotation"] +Added line: 7811 | +- AnnotationMemberList[@Empty = false, @Size = 2] +Added line: 6535 +Added line: 6533 +Added line: 6020 | +- MemberValuePair[@Image = "a", @Name = "a", @Shorthand = false] +Added line: 2488 +Added line: 7891 +Added line: 6778 +Added line: 5733 +Added line: 9995 +Added line: 4939 | | +- MemberValueArrayInitializer[] +Added line: 4431 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 6683 +Added line: 4365 Added line: 4010 | +- MemberValuePair[@Image = "b", @Name = "b", @Shorthand = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "#b", @Empty = false, @Image = "\"#b\"", @Length = 2, @LiteralText = "\"#b\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] Added line: 9433 +- ClassBody[@Empty = true, @Size = 0] +Added line: 7336 +Added line: 3520 +Added line: 1969 +Added line: 6438 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/DealingWithNull.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/DealingWithNull.txt index b46792cbc8..6015975a2c 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/DealingWithNull.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/DealingWithNull.txt @@ -5,12 +5,16 @@ +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testFooBar", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] +Added line: 5547 | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 4319 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 3379 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 5709 | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] @@ -18,54 +22,70 @@ | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4765 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 2732 +Added line: 9921 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Oops", @Empty = false, @Image = "\"Oops\"", @Length = 4, @LiteralText = "\"Oops\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] +Added line: 1543 | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Foo", @Empty = false, @Image = "\"Foo\"", @Length = 3, @LiteralText = "\"Foo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Bar", @Empty = false, @Image = "\"Bar\"", @Length = 3, @LiteralText = "\"Bar\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3283 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Great", @Empty = false, @Image = "\"Great\"", @Length = 5, @LiteralText = "\"Great\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 8387 | +- SwitchArrowBranch[@Default = true] | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 8840 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 6693 | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Ok", @Empty = false, @Image = "\"Ok\"", @Length = 2, @LiteralText = "\"Ok\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testStringOrNull", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +Added line: 3444 | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 3328 +Added line: 1826 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] Added line: 8755 +Added line: 8866 | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9854 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6884 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9631 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String: ", @Empty = false, @Image = "\"String: \"", @Length = 8, @LiteralText = "\"String: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] Added line: 7852 +Added line: 9748 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] @@ -74,13 +94,17 @@ Added line: 7852 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 9690 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "null", @Empty = false, @Image = "\"null\"", @Length = 4, @LiteralText = "\"null\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = true] - | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 283 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7933 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 6252 +Added line: 1865 | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "default case", @Empty = false, @Image = "\"default case\"", @Length = 12, @LiteralText = "\"default case\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testStringOrDefaultNull", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] @@ -97,14 +121,16 @@ Added line: 7852 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 7961 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] Added line: 4747 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 1542 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3788 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] -Added line: 3935 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] @@ -116,8 +142,9 @@ Added line: 3935 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9269 | +- ArgumentList[@Empty = false, @Size = 1] - | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "null or default case", @Empty = false, @Image = "\"null or default case\"", @Length = 20, @LiteralText = "\"null or default case\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 1677 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test2", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] @@ -126,9 +153,13 @@ Added line: 3935 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 6001 +Added line: 5479 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8707 +Added line: 4487 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] @@ -138,6 +169,7 @@ Added line: 3935 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 5754 Added line: 8076 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] @@ -154,9 +186,13 @@ Added line: 8993 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 8229 +Added line: 1330 +Added line: 4670 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5792 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -164,40 +200,53 @@ Added line: 8993 | | +- ArgumentList[@Empty = false, @Size = 1] | +- SwitchArrowBranch[@Default = true] | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 1449 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "default", @Empty = false, @Image = "\"default\"", @Length = 7, @LiteralText = "\"default\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 8932 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test3", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 8431 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 7848 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5893 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 4, @containsComment = false] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4304 | | +- SwitchFallthroughBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 9789 +Added line: 1256 | | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4129 | | | +- ExpressionStatement[] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 3324 | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "null", @Empty = false, @Image = "\"null\"", @Length = 4, @LiteralText = "\"null\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 7375 | | | +- BreakStatement[@Label = null] +Added line: 7921 | | +- SwitchFallthroughBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6372 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7896 | | | +- ExpressionStatement[] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -209,18 +258,20 @@ Added line: 8993 | | +- SwitchFallthroughBranch[@Default = true] | | +- SwitchLabel[@Default = true, @PatternLabel = false] | | +- ExpressionStatement[] - | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 7951 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "default case", @Empty = false, @Image = "\"default case\"", @Length = 12, @LiteralText = "\"default case\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- BreakStatement[@Label = null] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1829 | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = false] Added line: 1717 +Added line: 4460 | | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -228,6 +279,7 @@ Added line: 1717 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "null", @Empty = false, @Image = "\"null\"", @Length = 4, @LiteralText = "\"null\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 2698 | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] @@ -241,7 +293,9 @@ Added line: 1717 | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String", @Empty = false, @Image = "\"String\"", @Length = 6, @LiteralText = "\"String\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- SwitchArrowBranch[@Default = true] +Added line: 5447 | | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 7179 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -251,29 +305,38 @@ Added line: 1717 | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | | +- SwitchFallthroughBranch[@Default = false] -Added line: 2350 | | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 1991 +Added line: 2426 | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | | +- SwitchFallthroughBranch[@Default = true] | | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 125 | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3682 +Added line: 5287 +Added line: 9955 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "The rest (including null)", @Empty = false, @Image = "\"The rest (including null)\"", @Length = 25, @LiteralText = "\"The rest (including null)\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] +Added line: 903 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = true] | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 3085 | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8033 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8614 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "The rest (including null)", @Empty = false, @Image = "\"The rest (including null)\"", @Length = 25, @LiteralText = "\"The rest (including null)\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 9570 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] @@ -287,7 +350,14 @@ Added line: 2350 +- Block[@Empty = false, @Size = 12, @containsComment = false] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "testStringOrDefaultNull", @MethodName = "testStringOrDefaultNull", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3248 +Added line: 8265 +Added line: 3362 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 5180 +Added line: 3027 +Added line: 9687 +Added line: 1189 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "test", @Empty = false, @Image = "\"test\"", @Length = 4, @LiteralText = "\"test\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "test2", @MethodName = "test2", @ParenthesisDepth = 0, @Parenthesized = false] @@ -296,51 +366,70 @@ Added line: 2350 +- TryStatement[@TryWithResources = false] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] +Added line: 4213 | | +- MethodCall[@CompileTimeConstant = false, @Image = "test2", @MethodName = "test2", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 430 | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- CatchClause[] | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = false, @Name = "e", @Visibility = Visibility.V_PACKAGE] Added line: 7734 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6564 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "NullPointerException"] - | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = true, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "e", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 92 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 8680 | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5080 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 444 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 2319 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "e", @Name = "e", @ParenthesisDepth = 0, @Parenthesized = false] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "test3", @MethodName = "test3", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6641 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +- ExpressionStatement[] +Added line: 9479 +Added line: 4342 +Added line: 8860 | +- MethodCall[@CompileTimeConstant = false, @Image = "test3", @MethodName = "test3", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "test", @Empty = false, @Image = "\"test\"", @Length = 4, @LiteralText = "\"test\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 8700 +- ExpressionStatement[] +Added line: 9664 | +- MethodCall[@CompileTimeConstant = false, @Image = "test3", @MethodName = "test3", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8005 | +- ArgumentList[@Empty = false, @Size = 1] | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "testFooBar", @MethodName = "testFooBar", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8945 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "testFooBar", @MethodName = "testFooBar", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Foo", @Empty = false, @Image = "\"Foo\"", @Length = 3, @LiteralText = "\"Foo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 4787 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "testFooBar", @MethodName = "testFooBar", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Bar", @Empty = false, @Image = "\"Bar\"", @Length = 3, @LiteralText = "\"Bar\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ExpressionStatement[] +Added line: 4484 +Added line: 209 | +- MethodCall[@CompileTimeConstant = false, @Image = "testFooBar", @MethodName = "testFooBar", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] Added line: 9839 +Added line: 764 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "baz", @Empty = false, @Image = "\"baz\"", @Length = 3, @LiteralText = "\"baz\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "testStringOrNull", @MethodName = "testStringOrNull", @ParenthesisDepth = 0, @Parenthesized = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/EnhancedTypeCheckingSwitch.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/EnhancedTypeCheckingSwitch.txt index 6c64b0d5d4..7c4c1f1a20 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/EnhancedTypeCheckingSwitch.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/EnhancedTypeCheckingSwitch.txt @@ -1,40 +1,65 @@ +Added line: 7113 +Added line: 9606 +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "EnhancedTypeCheckingSwitch", @CanonicalName = "EnhancedTypeCheckingSwitch", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "EnhancedTypeCheckingSwitch", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 928 +Added line: 4810 +Added line: 795 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 4] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "EnhancedTypeCheckingSwitch$Point", @CanonicalName = "EnhancedTypeCheckingSwitch.Point", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Point", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 3116 +Added line: 933 | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] +Added line: 6260 | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] - | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 9631 +Added line: 6956 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 8019 | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 2153 | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 3065 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "j", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "EnhancedTypeCheckingSwitch$Color", @CanonicalName = "EnhancedTypeCheckingSwitch.Color", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Color", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- EnumBody[@Empty = false, @SeparatorSemi = true, @Size = 3, @TrailingComma = false] +Added line: 5284 +Added line: 7653 +Added line: 6251 +Added line: 3860 | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "RED", @MethodName = "new", @Name = "RED", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 8181 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "RED", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +Added line: 1318 | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "GREEN", @MethodName = "new", @Name = "GREEN", @Visibility = Visibility.V_PUBLIC] +Added line: 7715 +Added line: 205 | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 2892 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "GREEN", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] +Added line: 7846 +Added line: 7585 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BLUE", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "typeTester", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 7209 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] - | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7157 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 9505 | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] @@ -43,8 +68,8 @@ | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6161 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "null", @Empty = false, @Image = "\"null\"", @Length = 4, @LiteralText = "\"null\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] @@ -53,6 +78,7 @@ | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6498 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] @@ -62,19 +88,40 @@ | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Color"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 2968 +Added line: 5202 +Added line: 1402 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1565 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2381 +Added line: 209 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1050 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Color: ", @Empty = false, @Image = "\"Color: \"", @Length = 7, @LiteralText = "\"Color: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 3521 +Added line: 7572 | | +- MethodCall[@CompileTimeConstant = false, @Image = "toString", @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5046 +Added line: 3028 Added line: 1848 +Added line: 7231 +Added line: 8116 +Added line: 807 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 590 +Added line: 569 +Added line: 1381 +Added line: 7824 | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 5756 | +- SwitchArrowBranch[@Default = false] +Added line: 9861 | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 9428 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] @@ -82,6 +129,7 @@ Added line: 1848 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1489 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] @@ -89,22 +137,35 @@ Added line: 1848 | | +- MethodCall[@CompileTimeConstant = false, @Image = "toString", @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "p", @Name = "p", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 7591 +Added line: 1740 +Added line: 3341 +Added line: 7290 +Added line: 7056 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 5403 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7765 +Added line: 2498 | | | +- ArrayType[@ArrayDepth = 1] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 1744 | | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | | +- ArrayTypeDim[@Varargs = false] | | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "ia", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9926 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 9516 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1520 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Array of ints of length", @Empty = false, @Image = "\"Array of ints of length\"", @Length = 23, @LiteralText = "\"Array of ints of length\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 2925 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "length", @Name = "length", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "ia", @Name = "ia", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = true] @@ -113,40 +174,52 @@ Added line: 1848 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 6559 | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Something else", @Empty = false, @Image = "\"Something else\"", @Length = 14, @LiteralText = "\"Something else\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 6279 Added line: 9781 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] Added line: 4403 +Added line: 7761 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 3032 +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 3208 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] +Added line: 4908 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] | | +- ArrayTypeDim[@Varargs = false] +Added line: 1949 | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 9, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 8868 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8789 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | +- VariableDeclarator[@Initializer = true, @Name = "o"] - | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "test", @Empty = false, @Image = "\"test\"", @Length = 4, @LiteralText = "\"test\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "typeTester", @MethodName = "typeTester", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] +- ExpressionStatement[] +Added line: 3464 | +- MethodCall[@CompileTimeConstant = false, @Image = "typeTester", @MethodName = "typeTester", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] - | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "BLUE", @Name = "BLUE", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 61 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Color"] +Added line: 1026 +Added line: 7708 +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2055 | +- ArrayAllocation[@ArrayDepth = 1, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ArrayType[@ArrayDepth = 1] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] @@ -154,34 +227,50 @@ Added line: 4403 | | +- ArrayTypeDim[@Varargs = false] | +- ArrayInitializer[@CompileTimeConstant = false, @Length = 4, @ParenthesisDepth = 0, @Parenthesized = false] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] - | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +Added line: 6335 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "4", @IntLiteral = true, @Integral = true, @LiteralText = "4", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 4.0, @ValueAsFloat = 4.0, @ValueAsInt = 4, @ValueAsLong = 4] +Added line: 2489 +- ExpressionStatement[] +Added line: 2627 +Added line: 8042 +Added line: 5542 | +- MethodCall[@CompileTimeConstant = false, @Image = "typeTester", @MethodName = "typeTester", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6316 +Added line: 8227 +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7404 | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | +- ArgumentList[@Empty = false, @Size = 2] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] +Added line: 2853 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "8", @IntLiteral = true, @Integral = true, @LiteralText = "8", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 8.0, @ValueAsFloat = 8.0, @ValueAsInt = 8, @ValueAsLong = 8] +Added line: 9758 +Added line: 6873 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "typeTester", @MethodName = "typeTester", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6284 | +- ArgumentList[@Empty = false, @Size = 1] Added line: 4900 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 394 +Added line: 7199 +Added line: 239 | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3757 | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | +- ArgumentList[@Empty = true, @Size = 0] - +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "typeTester", @MethodName = "typeTester", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4792 Added line: 5205 +- ArgumentList[@Empty = false, @Size = 1] +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6243 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ExhaustiveSwitch.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ExhaustiveSwitch.txt index 0690ebc5ba..5ffb8e8282 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ExhaustiveSwitch.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ExhaustiveSwitch.txt @@ -2,17 +2,21 @@ +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch", @CanonicalName = "ExhaustiveSwitch", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ExhaustiveSwitch", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 13] +Added line: 9358 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "coverage", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6135 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] +Added line: 6528 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5117 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] @@ -28,15 +32,18 @@ | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] +Added line: 7770 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] - | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = true] | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 9530 +Added line: 1992 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "coverageStatement", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 3006 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] @@ -46,7 +53,9 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 9585 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 3046 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -54,26 +63,35 @@ | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2033 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 326 | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 8833 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | +- BreakStatement[@Label = null] | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 3501 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 8882 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- ExpressionStatement[] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8015 | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 8658 +Added line: 1128 | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Integer", @Empty = false, @Image = "\"Integer\"", @Length = 7, @LiteralText = "\"Integer\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- BreakStatement[@Label = null] | +- SwitchFallthroughBranch[@Default = true] | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 3976 | +- BreakStatement[@Label = null] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch$S", @CanonicalName = "ExhaustiveSwitch.S", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "S", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.SEALED)] @@ -83,7 +101,9 @@ | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "C"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch$A", @CanonicalName = "ExhaustiveSwitch.A", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "A", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 6237 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] +Added line: 3164 | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "S"] | +- ClassBody[@Empty = true, @Size = 0] @@ -96,6 +116,7 @@ | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 7807 | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] @@ -105,39 +126,55 @@ +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testSealedExhaustive", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 5247 | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 2107 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5121 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "S"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5241 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7747 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8455 +Added line: 2062 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 6431 +Added line: 3861 | +- SwitchArrowBranch[@Default = false] +Added line: 3159 | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "B"] +Added line: 7738 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8293 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | +- SwitchArrowBranch[@Default = false] +Added line: 3957 | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 4176 | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "C"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "switchStatementExhaustive", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 4678 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] +Added line: 167 | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -145,22 +182,31 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] +Added line: 9292 +Added line: 3011 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9163 | | +- SwitchFallthroughBranch[@Default = false] +Added line: 7993 | | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1214 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- ExpressionStatement[] +Added line: 4776 | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6521 +Added line: 214 | | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7710 | | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | | | +- ArgumentList[@Empty = false, @Size = 1] | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A", @Empty = false, @Image = "\"A\"", @Length = 1, @LiteralText = "\"A\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- BreakStatement[@Label = null] - | | +- SwitchFallthroughBranch[@Default = false] +Added line: 1531 | | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -168,13 +214,15 @@ | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- ExpressionStatement[] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7453 | | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | | | +- ArgumentList[@Empty = false, @Size = 1] | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "C", @Empty = false, @Image = "\"C\"", @Length = 1, @LiteralText = "\"C\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- BreakStatement[@Label = null] +Added line: 1557 | | +- SwitchFallthroughBranch[@Default = true] +Added line: 4197 | | +- SwitchLabel[@Default = true, @PatternLabel = false] | | +- ExpressionStatement[] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -193,23 +241,29 @@ | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "E"] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "F"] | +- ClassBody[@Empty = true, @Size = 0] +Added line: 4495 +Added line: 2532 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch$E", @CanonicalName = "ExhaustiveSwitch.E", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "E", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "X", @Name = "X", @TypeBound = false] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "I"] +Added line: 8845 | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch$F", @CanonicalName = "ExhaustiveSwitch.F", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "F", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | +- TypeParameters[@Empty = false, @Size = 1] +Added line: 7187 | | +- TypeParameter[@Image = "Y", @Name = "Y", @TypeBound = false] +Added line: 953 | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "I"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Y"] +Added line: 8064 | +- ClassBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testGenericSealedExhaustive", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] @@ -218,13 +272,16 @@ | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "I"] +Added line: 5268 | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] +Added line: 1084 | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] - | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3276 +Added line: 3358 | +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false, @PatternLabel = true] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] @@ -235,22 +292,32 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "bi", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "42", @IntLiteral = true, @Integral = true, @LiteralText = "42", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 4886 +Added line: 7769 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 7348 +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 9706 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 3388 +Added line: 5059 | | +- ArrayDimensions[@Empty = false, @Size = 1] | | +- ArrayTypeDim[@Varargs = false] | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 2418 +- Block[@Empty = false, @Size = 13, @containsComment = false] +Added line: 2592 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2358 +Added line: 8055 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] - | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 6527 | +- ArgumentList[@Empty = false, @Size = 1] | +- MethodCall[@CompileTimeConstant = false, @Image = "coverage", @MethodName = "coverage", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] @@ -259,11 +326,13 @@ | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2230 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- MethodCall[@CompileTimeConstant = false, @Image = "coverage", @MethodName = "coverage", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "42", @IntLiteral = true, @Integral = true, @LiteralText = "42", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] +Added line: 6181 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -274,19 +343,23 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] - | +- ArgumentList[@Empty = true, @Size = 0] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "coverageStatement", @MethodName = "coverageStatement", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 2314 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a string", @Empty = false, @Image = "\"a string\"", @Length = 8, @LiteralText = "\"a string\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "coverageStatement", @MethodName = "coverageStatement", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 190 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "21", @IntLiteral = true, @Integral = true, @LiteralText = "21", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 21.0, @ValueAsFloat = 21.0, @ValueAsInt = 21, @ValueAsLong = 21] +Added line: 8822 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "coverageStatement", @MethodName = "coverageStatement", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 5956 +Added line: 1944 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | +- ArgumentList[@Empty = true, @Size = 0] +- ExpressionStatement[] @@ -295,25 +368,32 @@ | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 1363 | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5298 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A:", @Empty = false, @Image = "\"A:\"", @Length = 2, @LiteralText = "\"A:\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "testSealedExhaustive", @MethodName = "testSealedExhaustive", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 662 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9570 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5280 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1583 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "B:", @Empty = false, @Image = "\"B:\"", @Length = 2, @LiteralText = "\"B:\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "testSealedExhaustive", @MethodName = "testSealedExhaustive", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] - | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 5567 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "B"] +Added line: 3919 | +- ArgumentList[@Empty = true, @Size = 0] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -325,36 +405,45 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "C:", @Empty = false, @Image = "\"C:\"", @Length = 2, @LiteralText = "\"C:\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "testSealedExhaustive", @MethodName = "testSealedExhaustive", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 3253 | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "C"] | +- ArgumentList[@Empty = false, @Size = 1] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- ExpressionStatement[] +Added line: 4863 +Added line: 3795 | +- MethodCall[@CompileTimeConstant = false, @Image = "switchStatementExhaustive", @MethodName = "switchStatementExhaustive", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] +Added line: 6416 | +- ArgumentList[@Empty = true, @Size = 0] +- ExpressionStatement[] +Added line: 611 | +- MethodCall[@CompileTimeConstant = false, @Image = "switchStatementExhaustive", @MethodName = "switchStatementExhaustive", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "B"] | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 9857 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "switchStatementExhaustive", @MethodName = "switchStatementExhaustive", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "C"] | +- ArgumentList[@Empty = false, @Size = 1] - | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +- ExpressionStatement[] +Added line: 761 +Added line: 5048 +Added line: 8997 +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6196 +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +- ArgumentList[@Empty = false, @Size = 1] - +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2803 +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "F:", @Empty = false, @Image = "\"F:\"", @Length = 2, @LiteralText = "\"F:\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodCall[@CompileTimeConstant = false, @Image = "testGenericSealedExhaustive", @MethodName = "testGenericSealedExhaustive", @ParenthesisDepth = 0, @Parenthesized = false] +- ArgumentList[@Empty = false, @Size = 1] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/GuardedPatterns.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/GuardedPatterns.txt index c50eb46388..2713b119c6 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/GuardedPatterns.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/GuardedPatterns.txt @@ -1,5 +1,7 @@ +Added line: 5159 +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GuardedPatterns", @CanonicalName = "GuardedPatterns", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GuardedPatterns", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 1611 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 8] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] @@ -11,7 +13,9 @@ | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 691 | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] +Added line: 208 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] @@ -22,6 +26,7 @@ | | | +- Guard[] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "length", @MethodName = "length", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2976 | | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] @@ -29,6 +34,7 @@ | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 4144 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "single char string", @Empty = false, @Image = "\"single char string\"", @Length = 18, @LiteralText = "\"single char string\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] @@ -37,11 +43,13 @@ | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 3109 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 804 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3304 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] - | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "string", @Empty = false, @Image = "\"string\"", @Length = 6, @LiteralText = "\"string\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] @@ -54,28 +62,35 @@ | | | +- MethodCall[@CompileTimeConstant = false, @Image = "intValue", @MethodName = "intValue", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 97 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 8136 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 9392 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "integer 1", @Empty = false, @Image = "\"integer 1\"", @Length = 9, @LiteralText = "\"integer 1\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = true] +Added line: 608 +Added line: 7541 | +- SwitchLabel[@Default = true, @PatternLabel = false] - | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] - | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "default case", @Empty = false, @Image = "\"default case\"", @Length = 12, @LiteralText = "\"default case\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 8449 Added line: 8616 +Added line: 5506 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testIdentifierWhen", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9360 +Added line: 7193 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 3712 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "when", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] @@ -83,9 +98,9 @@ Added line: 8616 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] Added line: 4162 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5483 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] - | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "when", @Name = "when", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testIdentifierWhen", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] @@ -93,14 +108,18 @@ Added line: 4162 | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5939 +Added line: 187 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "when"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "when", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1313 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2113 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "when", @Name = "when", @ParenthesisDepth = 0, @Parenthesized = false] @@ -113,25 +132,32 @@ Added line: 4162 | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1630 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] +Added line: 1222 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] +Added line: 7505 Added line: 2806 | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 9518 | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 1, @Parenthesized = true] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "length", @MethodName = "length", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7913 | | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 2365 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8681 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] @@ -141,6 +167,7 @@ Added line: 2806 | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9974 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -150,6 +177,10 @@ Added line: 2806 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "string", @Empty = false, @Image = "\"string\"", @Length = 6, @LiteralText = "\"string\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] +Added line: 8059 +Added line: 3814 +Added line: 4943 +Added line: 1474 | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -158,8 +189,14 @@ Added line: 2806 | | | +- Guard[] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "intValue", @MethodName = "intValue", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9003 +Added line: 610 +Added line: 5669 | | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1280 +Added line: 942 | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 2508 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -167,15 +204,24 @@ Added line: 2806 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "integer 1", @Empty = false, @Image = "\"integer 1\"", @Length = 9, @LiteralText = "\"integer 1\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 6977 +Added line: 8279 +Added line: 3868 +Added line: 5923 +Added line: 5671 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 7693 | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2887 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 5478 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "null!", @Empty = false, @Image = "\"null!\"", @Length = 5, @LiteralText = "\"null!\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 4046 | +- SwitchArrowBranch[@Default = true] | +- SwitchLabel[@Default = true, @PatternLabel = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -184,6 +230,7 @@ Added line: 2350 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 5924 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "default case", @Empty = false, @Image = "\"default case\"", @Length = 12, @LiteralText = "\"default case\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "instanceOfPattern", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] @@ -194,23 +241,28 @@ Added line: 4185 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 2906 | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- IfStatement[@Else = false] +Added line: 1237 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_AND, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8842 +Added line: 6403 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 215 | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +- MethodCall[@CompileTimeConstant = false, @Image = "length", @MethodName = "length", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] +Added line: 7916 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -219,7 +271,10 @@ Added line: 4185 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A string containing at least two characters", @Empty = false, @Image = "\"A string containing at least two characters\"", @Length = 43, @LiteralText = "\"A string containing at least two characters\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- IfStatement[@Else = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_AND, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9567 | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.NE, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3624 +Added line: 276 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_AND, @ParenthesisDepth = 1, @Parenthesized = true] @@ -227,6 +282,7 @@ Added line: 4185 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 3589 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -240,28 +296,42 @@ Added line: 4185 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4493 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 699 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A string containing at least three characters", @Empty = false, @Image = "\"A string containing at least three characters\"", @Length = 45, @LiteralText = "\"A string containing at least three characters\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- IfStatement[@Else = false] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_AND, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 725 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 4826 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8840 +Added line: 1490 | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8953 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 656 | | +- MethodCall[@CompileTimeConstant = false, @Image = "length", @MethodName = "length", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3088 | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "4", @IntLiteral = true, @Integral = true, @LiteralText = "4", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 4.0, @ValueAsFloat = 4.0, @ValueAsInt = 4, @ValueAsLong = 4] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] +Added line: 4788 +Added line: 2342 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6416 +Added line: 8857 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9736 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A string containing at least four characters", @Empty = false, @Image = "\"A string containing at least four characters\"", @Length = 44, @LiteralText = "\"A string containing at least four characters\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -273,6 +343,7 @@ Added line: 4185 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8774 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- IfStatement[@Else = true] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_AND, @ParenthesisDepth = 0, @Parenthesized = false] @@ -283,6 +354,7 @@ Added line: 4185 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 11 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] | | +- MethodCall[@CompileTimeConstant = false, @Image = "length", @MethodName = "length", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] @@ -291,8 +363,10 @@ Added line: 4185 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2472 +Added line: 7296 +Added line: 3204 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] @@ -300,27 +374,37 @@ Added line: 4185 | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6870 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7786 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 6492 | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Not a string", @Empty = false, @Image = "\"Not a string\"", @Length = 12, @LiteralText = "\"Not a string\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 7439 +- VoidType[] +Added line: 2624 | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 5607 | | +- ArrayTypeDim[@Varargs = false] +Added line: 7774 | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 6033 +- Block[@Empty = false, @Size = 9, @containsComment = false] - +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "test", @MethodName = "test", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ExpressionStatement[] +Added line: 3423 +Added line: 6854 | +- MethodCall[@CompileTimeConstant = false, @Image = "test", @MethodName = "test", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 5364 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "fooo", @Empty = false, @Image = "\"fooo\"", @Length = 4, @LiteralText = "\"fooo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "test", @MethodName = "test", @ParenthesisDepth = 0, @Parenthesized = false] @@ -335,8 +419,12 @@ Added line: 4185 | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "abcde", @Empty = false, @Image = "\"abcde\"", @Length = 5, @LiteralText = "\"abcde\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- TryStatement[@TryWithResources = false] +Added line: 1308 | +- Block[@Empty = false, @Size = 1, @containsComment = true] +Added line: 7449 +Added line: 6491 | | +- ExpressionStatement[] +Added line: 9190 | | +- MethodCall[@CompileTimeConstant = false, @Image = "test", @MethodName = "test", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] @@ -354,10 +442,11 @@ Added line: 4185 | +- MethodCall[@CompileTimeConstant = false, @Image = "testWithNull", @MethodName = "testWithNull", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6326 +- ExpressionStatement[] - | +- MethodCall[@CompileTimeConstant = false, @Image = "testScopeOfPatternVariableDeclarations", @MethodName = "testScopeOfPatternVariableDeclarations", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 4348 +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "testScopeOfPatternVariableDeclarations", @MethodName = "testScopeOfPatternVariableDeclarations", @ParenthesisDepth = 0, @Parenthesized = false] +- ArgumentList[@Empty = false, @Size = 1] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep440_RecordPatterns.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep440_RecordPatterns.txt index 8756417a53..a99472cff8 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep440_RecordPatterns.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep440_RecordPatterns.txt @@ -1,7 +1,10 @@ +- CompilationUnit[@PackageName = ""] +Added line: 6817 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns", @CanonicalName = "Jep440_RecordPatterns", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep440_RecordPatterns", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 15] +Added line: 4310 +Added line: 5132 +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$Point", @CanonicalName = "Jep440_RecordPatterns.Point", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Point", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] @@ -10,16 +13,20 @@ | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 9082 | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 9099 | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printSum", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +Added line: 5158 | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2096 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -29,7 +36,9 @@ | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] +Added line: 1777 | | +- PatternList[@Empty = false, @Size = 2] +Added line: 4213 | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] @@ -45,30 +54,39 @@ | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 4031 | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y", @Name = "y", @ParenthesisDepth = 0, @Parenthesized = false] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$Color", @CanonicalName = "Jep440_RecordPatterns.Color", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Color", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 5124 | +- EnumBody[@Empty = false, @SeparatorSemi = false, @Size = 3, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "RED", @MethodName = "new", @Name = "RED", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "RED", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +Added line: 1861 | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "GREEN", @MethodName = "new", @Name = "GREEN", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 1613 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "GREEN", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 9567 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BLUE", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +Added line: 7707 +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$ColoredPoint", @CanonicalName = "Jep440_RecordPatterns.ColoredPoint", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "ColoredPoint", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 4167 | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 7524 | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 5088 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Color"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] @@ -77,25 +95,36 @@ | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 4660 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] +Added line: 4361 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "upperLeft", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 7989 +Added line: 491 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] +Added line: 3262 +Added line: 1713 +Added line: 980 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lowerRight", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printColorOfUpperLeftPoint", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +Added line: 3009 | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 670 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9360 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- IfStatement[@Else = false] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "r", @Name = "r", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3449 | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] @@ -104,26 +133,33 @@ | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4514 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Color"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 506 +Added line: 8298 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lr", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 7468 | +- ExpressionStatement[] +Added line: 4157 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4397 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 569 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printXCoordOfUpperLeftPointWithPatterns", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 1089 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] @@ -131,36 +167,48 @@ | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1861 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 5796 | +- IfStatement[@Else = false] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "r", @Name = "r", @ParenthesisDepth = 0, @Parenthesized = false] | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- RecordPattern[] +Added line: 7085 +Added line: 402 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] | | +- PatternList[@Empty = false, @Size = 2] | | +- RecordPattern[] +Added line: 8480 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- RecordPattern[] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | | | | +- PatternList[@Empty = false, @Size = 2] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 1894 | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 7388 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 18 +Added line: 4633 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 99 | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 6153 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8482 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lr", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2698 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] @@ -168,9 +216,12 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Upper-left corner: ", @Empty = false, @Image = "\"Upper-left corner: \"", @Length = 19, @LiteralText = "\"Upper-left corner: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$Pair", @CanonicalName = "Jep440_RecordPatterns.Pair", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Pair", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 3141 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] +Added line: 8923 | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 6724 | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] @@ -180,10 +231,14 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "patternsCanFailToMatch", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +Added line: 2467 | +- VoidType[] +Added line: 6887 | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 8329 +Added line: 540 | +- Block[@Empty = false, @Size = 2, @containsComment = false] +Added line: 7554 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Pair"] @@ -198,6 +253,7 @@ | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "p", @Name = "p", @ParenthesisDepth = 0, @Parenthesized = false] | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 74 | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Pair"] | | +- PatternList[@Empty = false, @Size = 2] @@ -212,29 +268,36 @@ | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4131 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7441 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1529 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6912 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2859 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ", ", @Empty = false, @Image = "\", \"", @Length = 2, @LiteralText = "\", \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "t", @Name = "t", @ParenthesisDepth = 0, @Parenthesized = false] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6638 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Not a pair of strings", @Empty = false, @Image = "\"Not a pair of strings\"", @Length = 21, @LiteralText = "\"Not a pair of strings\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$MyPair", @CanonicalName = "Jep440_RecordPatterns.MyPair", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyPair", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 7268 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 2] +Added line: 8937 | | +- TypeParameter[@Image = "S", @Name = "S", @TypeBound = false] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] +Added line: 6633 | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "S"] @@ -243,72 +306,87 @@ | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "T"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "snd", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 3724 | +- RecordBody[@Empty = true, @Size = 0] +- EmptyDeclaration[] +Added line: 5784 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "recordInference", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 1066 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "MyPair"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 2] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] +Added line: 635 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "pair", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- SwitchStatement[@DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "pair", @Name = "pair", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false, @PatternLabel = true] - | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "MyPair"] | | +- PatternList[@Empty = false, @Size = 2] +Added line: 8231 | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "f", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3623 +Added line: 4027 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 5103 +Added line: 4337 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "matched", @Empty = false, @Image = "\"matched\"", @Length = 7, @LiteralText = "\"matched\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$Box", @CanonicalName = "Jep440_RecordPatterns.Box", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Box", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] +Added line: 3424 | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 2120 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "T"] +Added line: 626 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test1", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 2398 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] +Added line: 9933 | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 6566 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "bbs", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 8736 | +- IfStatement[@Else = false] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "bbs", @Name = "bbs", @ParenthesisDepth = 0, @Parenthesized = false] | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] +Added line: 4596 | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] - | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- PatternList[@Empty = false, @Size = 1] | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] @@ -316,9 +394,9 @@ | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5807 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] - | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] @@ -326,39 +404,50 @@ | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String ", @Empty = false, @Image = "\"String \"", @Length = 7, @LiteralText = "\"String \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8870 +Added line: 4835 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test2", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +- VoidType[] +Added line: 3524 +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 4497 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 3983 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "bbs", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 2751 +- Block[@Empty = false, @Size = 1, @containsComment = false] +- IfStatement[@Else = false] - +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "bbs", @Name = "bbs", @ParenthesisDepth = 0, @Parenthesized = false] | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- RecordPattern[] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | +- PatternList[@Empty = false, @Size = 1] +Added line: 1650 | +- RecordPattern[] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | +- PatternList[@Empty = false, @Size = 1] +Added line: 334 | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 1, @containsComment = false] +- ExpressionStatement[] +Added line: 8184 +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +- ArgumentList[@Empty = false, @Size = 1] +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7814 +Added line: 6328 +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String ", @Empty = false, @Image = "\"String \"", @Length = 7, @LiteralText = "\"String \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 1644 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep441_PatternMatchingForSwitch.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep441_PatternMatchingForSwitch.txt index fce6b81fdf..50e1865275 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep441_PatternMatchingForSwitch.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep441_PatternMatchingForSwitch.txt @@ -9,16 +9,24 @@ | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] +Added line: 6285 +Added line: 5601 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8132 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 3960 +Added line: 1317 | +- ReturnStatement[] +Added line: 9160 | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 6566 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] +Added line: 6553 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -29,6 +37,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 2327 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Long"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "l", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -36,10 +45,12 @@ | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 2804 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "long %d", @Empty = false, @Image = "\"long %d\"", @Length = 7, @LiteralText = "\"long %d\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "l", @Name = "l", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 6684 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Double"] @@ -52,25 +63,30 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "d", @Name = "d", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 4360 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5671 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 6815 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String %s", @Empty = false, @Image = "\"String %s\"", @Length = 9, @LiteralText = "\"String %s\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = true] | +- SwitchLabel[@Default = true, @PatternLabel = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "toString", @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7386 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testFooBarNew", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 2488 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] @@ -92,7 +108,9 @@ | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Foo", @Empty = false, @Image = "\"Foo\"", @Length = 3, @LiteralText = "\"Foo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Bar", @Empty = false, @Image = "\"Bar\"", @Length = 3, @LiteralText = "\"Bar\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1412 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2892 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] @@ -107,15 +125,26 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Ok", @Empty = false, @Image = "\"Ok\"", @Length = 2, @LiteralText = "\"Ok\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testStringNew", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +Added line: 878 | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 7879 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6309 +Added line: 9947 +Added line: 4448 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 7632 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "response", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8940 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- SwitchStatement[@DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "response", @Name = "response", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6497 +Added line: 8525 +Added line: 7121 +Added line: 9792 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] @@ -135,20 +164,24 @@ | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3825 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1028 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "You got it", @Empty = false, @Image = "\"You got it\"", @Length = 10, @LiteralText = "\"You got it\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 3925 +Added line: 1830 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "equalsIgnoreCase", @MethodName = "equalsIgnoreCase", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 8665 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "NO", @Empty = false, @Image = "\"NO\"", @Length = 2, @LiteralText = "\"NO\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] @@ -158,6 +191,7 @@ | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Shame", @Empty = false, @Image = "\"Shame\"", @Length = 5, @LiteralText = "\"Shame\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 2755 | +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false, @PatternLabel = true] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] @@ -166,11 +200,11 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] +Added line: 6440 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] - | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Sorry?", @Empty = false, @Image = "\"Sorry?\"", @Length = 6, @LiteralText = "\"Sorry?\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testStringEnhanced", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] @@ -178,6 +212,7 @@ | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4016 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "response", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -186,26 +221,32 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7799 | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 3180 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "y", @Empty = false, @Image = "\"y\"", @Length = 1, @LiteralText = "\"y\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Y", @Empty = false, @Image = "\"Y\"", @Length = 1, @LiteralText = "\"Y\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] +Added line: 4665 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 2409 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "You got it", @Empty = false, @Image = "\"You got it\"", @Length = 10, @LiteralText = "\"You got it\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] - | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 7236 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "n", @Empty = false, @Image = "\"n\"", @Length = 1, @LiteralText = "\"n\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 6963 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "N", @Empty = false, @Image = "\"N\"", @Length = 1, @LiteralText = "\"N\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9755 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] @@ -236,7 +277,9 @@ | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 6534 | | | +- Guard[] +Added line: 2229 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "equalsIgnoreCase", @MethodName = "equalsIgnoreCase", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = false, @Size = 1] @@ -245,6 +288,7 @@ | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 496 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] @@ -252,23 +296,31 @@ | +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false, @PatternLabel = true] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 5478 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 638 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 391 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4892 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 2451 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Sorry?", @Empty = false, @Image = "\"Sorry?\"", @Length = 6, @LiteralText = "\"Sorry?\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "Jep441_PatternMatchingForSwitch$CardClassification", @CanonicalName = "Jep441_PatternMatchingForSwitch.CardClassification", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "CardClassification", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.SEALED)] | +- PermitsList[@Empty = false, @Size = 2] +Added line: 5661 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Suit"] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Tarot"] | +- ClassBody[@Empty = true, @Size = 0] +Added line: 1083 +Added line: 8386 +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep441_PatternMatchingForSwitch$Suit", @CanonicalName = "Jep441_PatternMatchingForSwitch.Suit", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Suit", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ImplementsList[@Empty = false, @Size = 1] @@ -290,6 +342,8 @@ | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "CardClassification"] +Added line: 7907 +Added line: 9607 | +- ClassBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "exhaustiveSwitchWithoutEnumSupport", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] @@ -298,6 +352,7 @@ | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "CardClassification"] +Added line: 6550 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- SwitchStatement[@DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] @@ -305,32 +360,40 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 6842 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Suit"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9257 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1823 +Added line: 7244 | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "CLUBS", @Name = "CLUBS", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Suit"] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] +Added line: 9222 +Added line: 9417 +Added line: 4032 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] - | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "It\'s clubs", @Empty = false, @Image = "\"It\'s clubs\"", @Length = 10, @LiteralText = "\"It\'s clubs\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Suit"] +Added line: 2491 | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1009 | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "DIAMONDS", @Name = "DIAMONDS", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Suit"] @@ -339,7 +402,9 @@ | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7601 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 6925 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "It\'s diamonds", @Empty = false, @Image = "\"It\'s diamonds\"", @Length = 13, @LiteralText = "\"It\'s diamonds\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] @@ -361,6 +426,9 @@ | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 1669 +Added line: 1920 +Added line: 7436 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "It\'s hearts", @Empty = false, @Image = "\"It\'s hearts\"", @Length = 11, @LiteralText = "\"It\'s hearts\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] @@ -382,6 +450,7 @@ | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Tarot"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8199 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -389,17 +458,19 @@ | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 7139 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "It\'s a tarot", @Empty = false, @Image = "\"It\'s a tarot\"", @Length = 12, @LiteralText = "\"It\'s a tarot\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "exhaustiveSwitchWithBetterEnumSupport", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 2369 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 4605 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "CardClassification"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] - | +- Block[@Empty = false, @Size = 1, @containsComment = false] - | +- SwitchStatement[@DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] +Added line: 4743 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] @@ -408,15 +479,21 @@ | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Suit"] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] +Added line: 6628 +Added line: 3103 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 9386 +Added line: 5695 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "It\'s clubs", @Empty = false, @Image = "\"It\'s clubs\"", @Length = 10, @LiteralText = "\"It\'s clubs\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] +Added line: 7526 | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "DIAMONDS", @Name = "DIAMONDS", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 425 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Suit"] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -429,26 +506,32 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "It\'s diamonds", @Empty = false, @Image = "\"It\'s diamonds\"", @Length = 13, @LiteralText = "\"It\'s diamonds\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 5914 | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "HEARTS", @Name = "HEARTS", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Suit"] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] +Added line: 7545 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 395 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "It\'s hearts", @Empty = false, @Image = "\"It\'s hearts\"", @Length = 11, @LiteralText = "\"It\'s hearts\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] +Added line: 9515 | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "SPADES", @Name = "SPADES", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Suit"] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 3179 | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] @@ -468,22 +551,25 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "It\'s a tarot", @Empty = false, @Image = "\"It\'s a tarot\"", @Length = 12, @LiteralText = "\"It\'s a tarot\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "Jep441_PatternMatchingForSwitch$Currency", @CanonicalName = "Jep441_PatternMatchingForSwitch.Currency", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "Currency", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 1500 | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.SEALED)] | +- PermitsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Coin"] | +- ClassBody[@Empty = true, @Size = 0] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep441_PatternMatchingForSwitch$Coin", @CanonicalName = "Jep441_PatternMatchingForSwitch.Coin", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Coin", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Currency"] | +- EnumBody[@Empty = false, @SeparatorSemi = false, @Size = 2, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "HEADS", @MethodName = "new", @Name = "HEADS", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 8167 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "HEADS", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "TAILS", @MethodName = "new", @Name = "TAILS", @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "TAILS", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +Added line: 2704 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "goodEnumSwitch1", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 8422 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] @@ -497,6 +583,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "HEADS", @Name = "HEADS", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3446 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Coin"] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -505,6 +592,7 @@ | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 3102 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Heads", @Empty = false, @Image = "\"Heads\"", @Length = 5, @LiteralText = "\"Heads\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] @@ -526,6 +614,7 @@ +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4479 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Coin"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -535,14 +624,15 @@ | +- SwitchLabel[@Default = false, @PatternLabel = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "HEADS", @Name = "HEADS", @ParenthesisDepth = 0, @Parenthesized = false] | +- Block[@Empty = false, @Size = 1, @containsComment = false] - | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6004 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Heads", @Empty = false, @Image = "\"Heads\"", @Length = 5, @LiteralText = "\"Heads\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- SwitchArrowBranch[@Default = false] +Added line: 4714 +- SwitchLabel[@Default = false, @PatternLabel = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "TAILS", @Name = "TAILS", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -551,7 +641,6 @@ +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] - | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +- ArgumentList[@Empty = false, @Size = 1] +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Tails", @Empty = false, @Image = "\"Tails\"", @Length = 5, @LiteralText = "\"Tails\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/PatternsInSwitchLabels.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/PatternsInSwitchLabels.txt index c78fee3b6c..a31b108aac 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/PatternsInSwitchLabels.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/PatternsInSwitchLabels.txt @@ -1,67 +1,134 @@ +Added line: 4281 +Added line: 3181 +- CompilationUnit[@PackageName = ""] +Added line: 7777 +Added line: 6301 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "PatternsInSwitchLabels", @CanonicalName = "PatternsInSwitchLabels", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PatternsInSwitchLabels", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 4665 +Added line: 5947 +- ClassBody[@Empty = false, @Size = 1] +Added line: 3149 +Added line: 6149 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +Added line: 7423 +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 4345 +Added line: 6435 | | +- ArrayDimensions[@Empty = false, @Size = 1] | | +- ArrayTypeDim[@Varargs = false] | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1126 +- Block[@Empty = false, @Size = 3, @containsComment = false] - +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 8192 +Added line: 9447 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3671 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | +- VariableDeclarator[@Initializer = true, @Name = "o"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 821 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "123L", @IntLiteral = false, @Integral = true, @LiteralText = "123L", @LongLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 123.0, @ValueAsFloat = 123.0, @ValueAsInt = 123, @ValueAsLong = 123] +Added line: 982 +Added line: 5731 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 2159 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4103 +Added line: 5061 +Added line: 2776 +Added line: 1530 +Added line: 7493 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "formatted"] +Added line: 9254 +Added line: 8852 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "formatted", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] +Added line: 884 +Added line: 8784 +Added line: 1489 | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 4499 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7536 +Added line: 6701 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] +Added line: 865 +Added line: 2965 +Added line: 1728 +Added line: 165 +Added line: 8029 +Added line: 5723 +Added line: 6308 +Added line: 1243 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9440 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 344 +Added line: 8901 +Added line: 3337 +Added line: 7663 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "int %d", @Empty = false, @Image = "\"int %d\"", @Length = 6, @LiteralText = "\"int %d\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 7877 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9045 +Added line: 1207 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Long"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "l", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1808 +Added line: 7916 +Added line: 7647 +Added line: 3791 +Added line: 2366 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 5724 | | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 2146 +Added line: 8573 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "long %d", @Empty = false, @Image = "\"long %d\"", @Length = 7, @LiteralText = "\"long %d\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 3374 +Added line: 3666 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "l", @Name = "l", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6018 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 21 +Added line: 8667 +Added line: 1810 +Added line: 7809 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3453 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Double"] - | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "d", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9282 +Added line: 8822 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 7493 +Added line: 7449 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "double %f", @Empty = false, @Image = "\"double %f\"", @Length = 9, @LiteralText = "\"double %f\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 2173 +Added line: 8488 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "d", @Name = "d", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] @@ -69,21 +136,43 @@ | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1766 +Added line: 7215 +Added line: 5148 +Added line: 9535 +Added line: 8075 | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1024 +Added line: 1580 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3487 +Added line: 2605 +Added line: 416 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 6749 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String %s", @Empty = false, @Image = "\"String %s\"", @Length = 9, @LiteralText = "\"String %s\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 9483 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = true] - | +- SwitchLabel[@Default = true, @PatternLabel = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "toString", @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5196 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6757 +Added line: 9914 +Added line: 4970 +Added line: 9840 | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 1979 +Added line: 3812 +Added line: 8640 +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2444 +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +- ArgumentList[@Empty = false, @Size = 1] +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "formatted", @Name = "formatted", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1246 +Added line: 33 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatterns.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatterns.txt index 5a16a8df6e..f5e6a9c187 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatterns.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatterns.txt @@ -1,3 +1,4 @@ +Added line: 3222 +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatterns", @CanonicalName = "RecordPatterns", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "RecordPatterns", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] @@ -6,7 +7,11 @@ | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 98 +Added line: 3319 | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 7081 +Added line: 6590 | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] @@ -17,11 +22,13 @@ +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatterns$Color", @CanonicalName = "RecordPatterns.Color", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Color", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- EnumBody[@Empty = false, @SeparatorSemi = false, @Size = 3, @TrailingComma = false] +Added line: 2843 | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "RED", @MethodName = "new", @Name = "RED", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "RED", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "GREEN", @MethodName = "new", @Name = "GREEN", @Visibility = Visibility.V_PUBLIC] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 3628 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "GREEN", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] @@ -33,13 +40,16 @@ | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 6026 | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 3616 | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Color"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] Added line: 1200 +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatterns$Rectangle", @CanonicalName = "RecordPatterns.Rectangle", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Rectangle", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 6182 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] @@ -47,7 +57,9 @@ Added line: 1200 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "upperLeft", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 5935 | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 9354 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lowerRight", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] @@ -62,12 +74,14 @@ Added line: 1200 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- IfStatement[@Else = false] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 756 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 4413 | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -77,6 +91,7 @@ Added line: 1200 | | +- MethodCall[@CompileTimeConstant = false, @Image = "x", @MethodName = "x", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "p", @Name = "p", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 2406 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] @@ -97,6 +112,7 @@ Added line: 1200 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 3401 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] @@ -109,6 +125,7 @@ Added line: 1200 | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | | +- PatternList[@Empty = false, @Size = 2] +Added line: 4318 | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] @@ -128,25 +145,33 @@ Added line: 2623 | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y", @Name = "y", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 894 +Added line: 5304 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printUpperLeftColoredPoint", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8532 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] +Added line: 8956 +Added line: 8899 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- IfStatement[@Else = false] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "r", @Name = "r", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3357 | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 3253 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] +Added line: 6275 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "ul", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -175,10 +200,12 @@ Added line: 2623 | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "r", @Name = "r", @ParenthesisDepth = 0, @Parenthesized = false] | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] - | | +- RecordPattern[] +Added line: 4864 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] | | +- PatternList[@Empty = false, @Size = 2] +Added line: 8125 | | +- RecordPattern[] +Added line: 3598 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] @@ -193,6 +220,7 @@ Added line: 2623 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lr", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 6257 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -201,15 +229,15 @@ Added line: 2623 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] - +- MethodDeclaration[@Abstract = false, @Arity = 6, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "createRectangle", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] +Added line: 176 | +- FormalParameters[@Empty = false, @Size = 6] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 4127 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "x1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] - | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "y1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -221,22 +249,28 @@ Added line: 2623 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "x2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5210 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 4233 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "y2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5067 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Color"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "c2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8455 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] | | +- VariableDeclarator[@Initializer = true, @Name = "r"] +Added line: 8029 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] +Added line: 9574 | | +- ArgumentList[@Empty = false, @Size = 2] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] @@ -246,12 +280,14 @@ Added line: 2623 | | | | +- ArgumentList[@Empty = false, @Size = 2] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x1", @Name = "x1", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y1", @Name = "y1", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5066 +Added line: 8571 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c1", @Name = "c1", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7755 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] | | +- ArgumentList[@Empty = false, @Size = 2] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | | | +- ArgumentList[@Empty = false, @Size = 2] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x2", @Name = "x2", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y2", @Name = "y2", @ParenthesisDepth = 0, @Parenthesized = false] @@ -262,9 +298,11 @@ Added line: 2623 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 6578 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] +Added line: 3621 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- IfStatement[@Else = false] @@ -282,19 +320,26 @@ Added line: 2623 | | | | +- PatternList[@Empty = false, @Size = 2] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2705 +Added line: 6907 | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 6430 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3902 +Added line: 3915 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 4301 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lr", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] +Added line: 6544 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2313 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] @@ -311,12 +356,16 @@ Added line: 2623 | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] +Added line: 6226 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 5263 +Added line: 745 | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "nestedPatternsCanFailToMatch", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 2211 | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -331,14 +380,15 @@ Added line: 2623 | +- IfStatement[@Else = true] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "p", @Name = "p", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Pair"] +Added line: 872 | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1249 | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] @@ -346,8 +396,11 @@ Added line: 2623 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2949 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7520 +Added line: 542 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] @@ -367,43 +420,54 @@ Added line: 2623 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] - | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "T"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 9961 +Added line: 9893 +Added line: 2888 | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test1a", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 287 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "bo", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 7928 +Added line: 7892 | +- IfStatement[@Else = false] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "bo", @Name = "bo", @ParenthesisDepth = 0, @Parenthesized = false] | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8229 | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- PatternList[@Empty = false, @Size = 1] +Added line: 8679 +Added line: 3223 | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 6870 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] +Added line: 3705 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 9675 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 220 | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String ", @Empty = false, @Image = "\"String \"", @Length = 7, @LiteralText = "\"String \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] @@ -412,6 +476,7 @@ Added line: 2623 | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 592 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] @@ -431,6 +496,8 @@ Added line: 2623 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 640 +Added line: 3906 | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -442,9 +509,13 @@ Added line: 2623 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7529 | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 3132 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 7544 +Added line: 3551 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] @@ -461,7 +532,9 @@ Added line: 2623 | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 6857 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 6695 | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -472,8 +545,10 @@ Added line: 2623 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String ", @Empty = false, @Image = "\"String \"", @Length = 7, @LiteralText = "\"String \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test3", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 6719 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] +Added line: 6708 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] @@ -495,6 +570,7 @@ Added line: 3998 | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- PatternList[@Empty = false, @Size = 1] +Added line: 3573 | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | +- PatternList[@Empty = false, @Size = 1] @@ -502,6 +578,9 @@ Added line: 3998 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 2996 +Added line: 6390 +Added line: 8873 | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -514,12 +593,15 @@ Added line: 3998 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test4", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] +Added line: 2481 | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] +Added line: 5749 | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] +Added line: 1242 | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "bo", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -536,6 +618,7 @@ Added line: 3998 Added line: 6971 | | +- PatternList[@Empty = false, @Size = 1] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 334 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -546,28 +629,34 @@ Added line: 6971 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6148 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String ", @Empty = false, @Image = "\"String \"", @Length = 7, @LiteralText = "\"String \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatterns$Empty", @CanonicalName = "RecordPatterns.Empty", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Empty", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = true, @Size = 0, @Varargs = false] +Added line: 6445 | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "foo", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 233 | +- VoidType[] +Added line: 3108 | +- FormalParameters[@Empty = false, @Size = 1] - | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- IfStatement[@Else = false] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3844 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2244 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Empty"] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7301 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- RecordPattern[] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatternsExhaustiveSwitch.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatternsExhaustiveSwitch.txt index 86fba55241..816dd4ea24 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatternsExhaustiveSwitch.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatternsExhaustiveSwitch.txt @@ -1,6 +1,11 @@ +- CompilationUnit[@PackageName = ""] +Added line: 883 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch", @CanonicalName = "RecordPatternsExhaustiveSwitch", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "RecordPatternsExhaustiveSwitch", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 3588 +Added line: 4430 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 8404 +Added line: 4 Added line: 3640 +- ClassBody[@Empty = false, @Size = 7] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$A", @CanonicalName = "RecordPatternsExhaustiveSwitch.A", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "A", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] @@ -9,22 +14,31 @@ Added line: 3640 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$B", @CanonicalName = "RecordPatternsExhaustiveSwitch.B", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "B", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ExtendsList[@Empty = false, @Size = 1] +Added line: 4287 +Added line: 9670 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$I", @CanonicalName = "RecordPatternsExhaustiveSwitch.I", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "I", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 5575 +Added line: 8473 | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.SEALED)] +Added line: 8090 | +- PermitsList[@Empty = false, @Size = 2] +Added line: 7044 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "C"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$C", @CanonicalName = "RecordPatternsExhaustiveSwitch.C", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "C", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ImplementsList[@Empty = false, @Size = 1] +Added line: 4031 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "I"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$D", @CanonicalName = "RecordPatternsExhaustiveSwitch.D", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "D", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 8971 | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "I"] +Added line: 8737 | +- ClassBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$Pair", @CanonicalName = "RecordPatternsExhaustiveSwitch.Pair", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Pair", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] @@ -32,72 +46,108 @@ Added line: 3640 | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 5820 | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "T"] - | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 7807 +Added line: 9613 +Added line: 229 | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 7195 | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "T"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 4033 | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +Added line: 3057 +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 5, @containsComment = false] +Added line: 5438 +Added line: 154 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Pair"] +Added line: 8503 +Added line: 2957 +Added line: 7256 +Added line: 7424 | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] | +- VariableDeclarator[@Initializer = true, @Name = "p1"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 3184 +Added line: 1225 | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5574 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Pair"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 9110 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "I"] +Added line: 3684 | +- VariableDeclarator[@Initializer = true, @Name = "p2"] +Added line: 2681 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +- SwitchStatement[@DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "p1", @Name = "p1", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2583 | +- SwitchArrowBranch[@Default = false] +Added line: 9608 +Added line: 2061 | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- RecordPattern[] +Added line: 2693 +Added line: 1688 +Added line: 4004 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Pair"] +Added line: 7564 | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] | | | +- PatternList[@Empty = false, @Size = 2] +Added line: 4114 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 4254 +Added line: 1032 +Added line: 1406 +Added line: 6908 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] +Added line: 121 | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9126 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "B"] +Added line: 1562 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8575 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 8863 | | | +- RecordPattern[] +Added line: 4568 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Pair"] - | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 8396 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "B"] +Added line: 8414 | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] +Added line: 7923 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] Added line: 1757 @@ -108,47 +158,64 @@ Added line: 1757 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 6055 +Added line: 6984 | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Pair"] - | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] | | +- PatternList[@Empty = false, @Size = 2] +Added line: 9432 | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] +Added line: 1513 +Added line: 1117 Added line: 2319 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a1", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2480 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "A"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a2", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9725 +Added line: 4887 +Added line: 3021 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8501 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2800 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "exhaustive now", @Empty = false, @Image = "\"exhaustive now\"", @Length = 14, @LiteralText = "\"exhaustive now\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- SwitchStatement[@DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | +- SwitchArrowBranch[@Default = false] +Added line: 4105 Added line: 7335 | | +- SwitchLabel[@Default = false, @PatternLabel = true] Added line: 3145 | | | +- RecordPattern[] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Pair"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 9091 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "I"] +Added line: 1622 +Added line: 8361 | | | +- PatternList[@Empty = false, @Size = 2] Added line: 2105 +Added line: 6413 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "I"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 7114 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "C"] - | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7475 +Added line: 7266 +Added line: 6548 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] @@ -163,10 +230,13 @@ Added line: 2105 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "I"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 9203 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "D"] +Added line: 6631 +Added line: 1211 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "d", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2155 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] @@ -184,8 +254,10 @@ Added line: 2105 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "C"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 6718 Added line: 7319 | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 2720 Added line: 1794 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "I"] @@ -193,29 +265,43 @@ Added line: 1794 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7902 +Added line: 5854 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] - | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6944 +Added line: 1825 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 5658 | | +- RecordPattern[] +Added line: 2314 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Pair"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "I"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 4664 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "D"] +Added line: 6480 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "d", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] Added line: 4282 +Added line: 1626 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 786 +Added line: 8820 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "C"] +Added line: 6513 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5825 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 4053 +Added line: 4202 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- SwitchArrowBranch[@Default = false] +- SwitchLabel[@Default = false, @PatternLabel = true] @@ -234,8 +320,11 @@ Added line: 3312 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "D"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "d2", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6870 +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +- ArgumentList[@Empty = false, @Size = 1] +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 3880 +Added line: 1959 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RefiningPatternsInSwitch.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RefiningPatternsInSwitch.txt index 7f072fdff9..589a10dee3 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RefiningPatternsInSwitch.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RefiningPatternsInSwitch.txt @@ -2,6 +2,7 @@ +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RefiningPatternsInSwitch", @CanonicalName = "RefiningPatternsInSwitch", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "RefiningPatternsInSwitch", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 7] +Added line: 499 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RefiningPatternsInSwitch$Shape", @CanonicalName = "RefiningPatternsInSwitch.Shape", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Shape", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ClassBody[@Empty = true, @Size = 0] @@ -9,11 +10,14 @@ | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Shape"] +Added line: 5421 +Added line: 2979 | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RefiningPatternsInSwitch$Triangle", @CanonicalName = "RefiningPatternsInSwitch.Triangle", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Triangle", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Shape"] +Added line: 5921 Added line: 3397 | +- ClassBody[@Empty = false, @Size = 3] | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = false, @Visibility = Visibility.V_PRIVATE] @@ -31,55 +35,77 @@ Added line: 3397 | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3961 Added line: 7471 | | +- FieldAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "area", @Name = "area", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "area", @Name = "area", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1288 +Added line: 82 | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "calculateArea", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1257 +Added line: 7207 +Added line: 2948 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] +Added line: 250 +Added line: 600 +Added line: 2854 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "area", @Name = "area", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testTriangle", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] +Added line: 7923 +Added line: 3873 | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Shape"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 3451 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2929 +Added line: 4865 | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- BreakStatement[@Label = null] +Added line: 1273 | +- SwitchFallthroughBranch[@Default = false] - | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 8068 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Triangle"] +Added line: 373 +Added line: 7744 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- IfStatement[@Else = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "calculateArea", @MethodName = "calculateArea", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3184 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "t", @Name = "t", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "100", @IntLiteral = true, @Integral = true, @LiteralText = "100", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 100.0, @ValueAsFloat = 100.0, @ValueAsInt = 100, @ValueAsLong = 100] Added line: 7055 | | +- Block[@Empty = false, @Size = 2, @containsComment = false] +Added line: 6044 +Added line: 5429 | | +- ExpressionStatement[] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 1720 | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6134 +Added line: 2862 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Large triangle", @Empty = false, @Image = "\"Large triangle\"", @Length = 14, @LiteralText = "\"Large triangle\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] - | | +- BreakStatement[@Label = null] | +- SwitchFallthroughBranch[@Default = true] +Added line: 3620 | +- SwitchLabel[@Default = true, @PatternLabel = false] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -87,88 +113,132 @@ Added line: 7055 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 634 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A shape, possibly a small triangle", @Empty = false, @Image = "\"A shape, possibly a small triangle\"", @Length = 34, @LiteralText = "\"A shape, possibly a small triangle\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 7230 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testTriangleRefined", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 864 +Added line: 6654 +Added line: 5109 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Shape"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] +Added line: 3197 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] +Added line: 7421 | | +- SwitchLabel[@Default = false, @PatternLabel = false] | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 880 | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- BreakStatement[@Label = null] +Added line: 4029 +Added line: 5349 +Added line: 7775 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 3549 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 5280 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Triangle"] +Added line: 1217 | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "calculateArea", @MethodName = "calculateArea", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "t", @Name = "t", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 9024 +Added line: 7428 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "100", @IntLiteral = true, @Integral = true, @LiteralText = "100", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 100.0, @ValueAsFloat = 100.0, @ValueAsInt = 100, @ValueAsLong = 100] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5329 +Added line: 8025 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7745 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 8735 +Added line: 6517 +Added line: 4352 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Large triangle", @Empty = false, @Image = "\"Large triangle\"", @Length = 14, @LiteralText = "\"Large triangle\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 7148 | +- SwitchArrowBranch[@Default = true] | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 9571 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9178 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1584 +Added line: 9606 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A shape, possibly a small triangle", @Empty = false, @Image = "\"A shape, possibly a small triangle\"", @Length = 34, @LiteralText = "\"A shape, possibly a small triangle\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testTriangleRefined2", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +Added line: 5787 +Added line: 3286 +Added line: 8431 | +- VoidType[] +Added line: 8893 | +- FormalParameters[@Empty = false, @Size = 1] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Shape"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 2822 +Added line: 3553 +Added line: 6438 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] Added line: 8375 | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 7496 +Added line: 5480 | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- BreakStatement[@Label = null] | +- SwitchArrowBranch[@Default = false] +Added line: 285 | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Triangle"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7145 | | | +- Guard[] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 890 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "calculateArea", @MethodName = "calculateArea", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "t", @Name = "t", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3150 | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "100", @IntLiteral = true, @Integral = true, @LiteralText = "100", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 100.0, @ValueAsFloat = 100.0, @ValueAsInt = 100, @ValueAsLong = 100] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 2883 | | +- ArgumentList[@Empty = false, @Size = 1] Added line: 9688 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Large triangle", @Empty = false, @Image = "\"Large triangle\"", @Length = 14, @LiteralText = "\"Large triangle\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] - | +- SwitchArrowBranch[@Default = false] +Added line: 2461 +Added line: 167 | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 7949 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9832 +Added line: 451 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Triangle"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -178,25 +248,31 @@ Added line: 9688 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Small triangle", @Empty = false, @Image = "\"Small triangle\"", @Length = 14, @LiteralText = "\"Small triangle\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = true] +Added line: 7461 | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 1873 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5252 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Non-triangle", @Empty = false, @Image = "\"Non-triangle\"", @Length = 12, @LiteralText = "\"Non-triangle\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5870 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 1190 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 9628 | | +- ArrayTypeDim[@Varargs = false] | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] - +- Block[@Empty = false, @Size = 12, @containsComment = false] +Added line: 7230 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Triangle"] @@ -213,11 +289,16 @@ Added line: 9688 | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Triangle"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 7555 | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "10", @IntLiteral = true, @Integral = true, @LiteralText = "10", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 10.0, @ValueAsFloat = 10.0, @ValueAsInt = 10, @ValueAsLong = 10] +Added line: 4702 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2434 +Added line: 1170 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] +Added line: 226 | +- VariableDeclarator[@Initializer = true, @Name = "rect"] +Added line: 4855 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "rect", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] @@ -225,16 +306,19 @@ Added line: 9688 | +- MethodCall[@CompileTimeConstant = false, @Image = "testTriangle", @MethodName = "testTriangle", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "large", @Name = "large", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7897 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "testTriangle", @MethodName = "testTriangle", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 540 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "small", @Name = "small", @ParenthesisDepth = 0, @Parenthesized = false] +- ExpressionStatement[] +Added line: 1993 | +- MethodCall[@CompileTimeConstant = false, @Image = "testTriangle", @MethodName = "testTriangle", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "rect", @Name = "rect", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2315 +- ExpressionStatement[] - | +- MethodCall[@CompileTimeConstant = false, @Image = "testTriangleRefined", @MethodName = "testTriangleRefined", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "large", @Name = "large", @ParenthesisDepth = 0, @Parenthesized = false] +- ExpressionStatement[] @@ -246,14 +330,19 @@ Added line: 9688 | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "rect", @Name = "rect", @ParenthesisDepth = 0, @Parenthesized = false] +- ExpressionStatement[] +Added line: 7113 +Added line: 3363 | +- MethodCall[@CompileTimeConstant = false, @Image = "testTriangleRefined2", @MethodName = "testTriangleRefined2", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "large", @Name = "large", @ParenthesisDepth = 0, @Parenthesized = false] +- ExpressionStatement[] +Added line: 6178 | +- MethodCall[@CompileTimeConstant = false, @Image = "testTriangleRefined2", @MethodName = "testTriangleRefined2", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "small", @Name = "small", @ParenthesisDepth = 0, @Parenthesized = false] +- ExpressionStatement[] +Added line: 4797 +- MethodCall[@CompileTimeConstant = false, @Image = "testTriangleRefined2", @MethodName = "testTriangleRefined2", @ParenthesisDepth = 0, @Parenthesized = false] +- ArgumentList[@Empty = false, @Size = 1] +Added line: 8002 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "rect", @Name = "rect", @ParenthesisDepth = 0, @Parenthesized = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ScopeOfPatternVariableDeclarations.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ScopeOfPatternVariableDeclarations.txt index ee01695dd4..26aba36825 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ScopeOfPatternVariableDeclarations.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ScopeOfPatternVariableDeclarations.txt @@ -1,15 +1,23 @@ +- CompilationUnit[@PackageName = ""] +Added line: 2704 +Added line: 6217 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ScopeOfPatternVariableDeclarations", @CanonicalName = "ScopeOfPatternVariableDeclarations", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ScopeOfPatternVariableDeclarations", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 8301 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 4] +Added line: 4807 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testSwitchBlock", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 9406 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 3472 +Added line: 9562 +Added line: 9128 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] @@ -21,12 +29,18 @@ | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5809 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "charValue", @MethodName = "charValue", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5035 +Added line: 4075 | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 7559 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] | | +- ExpressionStatement[] +Added line: 33 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5709 | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] @@ -37,47 +51,69 @@ | +- SwitchLabel[@Default = true, @PatternLabel = false] | +- BreakStatement[@Label = null] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testSwitchRule", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 6855 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] +Added line: 8840 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 3269 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 2361 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Character"] +Added line: 7647 +Added line: 8736 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 2, @containsComment = false] | | +- IfStatement[@Else = false] +Added line: 4674 | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "charValue", @MethodName = "charValue", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9625 | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 1655 | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | | +- ExpressionStatement[] +Added line: 4506 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 4877 +Added line: 5026 | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Ding!", @Empty = false, @Image = "\"Ding!\"", @Length = 5, @LiteralText = "\"Ding!\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3811 +Added line: 9103 +Added line: 9545 +Added line: 9777 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Character", @Empty = false, @Image = "\"Character\"", @Length = 9, @LiteralText = "\"Character\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] +Added line: 4000 +Added line: 6607 +Added line: 4177 | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 1646 +Added line: 2388 +Added line: 9823 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -101,29 +137,52 @@ | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Object"] +Added line: 1502 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 100 +Added line: 8153 | +- SwitchStatement[@DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] +Added line: 5316 +Added line: 1445 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 3575 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Character"] +Added line: 279 +Added line: 6856 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 484 +Added line: 9316 +Added line: 5093 +Added line: 1947 | | +- IfStatement[@Else = false] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5619 +Added line: 293 +Added line: 5414 +Added line: 452 | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "charValue", @MethodName = "charValue", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1959 | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] +Added line: 6981 | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | | +- ExpressionStatement[] +Added line: 3774 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "print", @MethodName = "print", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7186 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 9374 +Added line: 9523 +Added line: 502 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Ding ", @Empty = false, @Image = "\"Ding \"", @Length = 5, @LiteralText = "\"Ding \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- IfStatement[@Else = false] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] @@ -131,18 +190,22 @@ | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "9", @IntLiteral = true, @Integral = true, @LiteralText = "9", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 9.0, @ValueAsFloat = 9.0, @ValueAsInt = 9, @ValueAsLong = 9] - | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 1051 +Added line: 7200 | | | +- ExpressionStatement[] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "print", @MethodName = "print", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3384 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] - | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Tab ", @Empty = false, @Image = "\"Tab \"", @Length = 4, @LiteralText = "\"Tab \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 9970 | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 566 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6602 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "character", @Empty = false, @Image = "\"character\"", @Length = 9, @LiteralText = "\"character\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -151,22 +214,34 @@ | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 29 +Added line: 5300 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "fall-through", @Empty = false, @Image = "\"fall-through\"", @Length = 12, @LiteralText = "\"fall-through\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 1970 +Added line: 6304 +Added line: 945 +Added line: 9871 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +Added line: 6589 +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 1154 | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 7065 | | +- ArrayTypeDim[@Varargs = false] +Added line: 5766 | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 932 +- Block[@Empty = false, @Size = 4, @containsComment = false] +Added line: 7243 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "testSwitchBlock", @MethodName = "testSwitchBlock", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] @@ -180,21 +255,35 @@ | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "testSwitchRule", @MethodName = "testSwitchRule", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = false, @Size = 1] - | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "42", @IntLiteral = true, @Integral = true, @LiteralText = "42", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] - | +- CatchClause[] +Added line: 2489 +Added line: 2915 +Added line: 3428 +Added line: 683 +Added line: 9827 +Added line: 3530 +Added line: 7589 +Added line: 881 | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = false, @Name = "e", @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalStateException"] +Added line: 5163 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = true, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "e", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 8246 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2550 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8347 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] - | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "e", @Name = "e", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6343 +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "test2", @MethodName = "test2", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3535 +Added line: 6568 +Added line: 6972 +- ArgumentList[@Empty = false, @Size = 1] +- CharLiteral[@CompileTimeConstant = true, @Image = "\'\\t\'", @LiteralText = "\'\\t\'", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8203 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22/Jep456_UnnamedPatternsAndVariables.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22/Jep456_UnnamedPatternsAndVariables.txt index fdcfa66286..489a1bfcc3 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22/Jep456_UnnamedPatternsAndVariables.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22/Jep456_UnnamedPatternsAndVariables.txt @@ -1,3 +1,6 @@ +Added line: 1611 +Added line: 9986 +Added line: 808 +- CompilationUnit[@PackageName = ""] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.ArrayDeque", @ImportedSimpleName = "ArrayDeque", @ModuleImport = false, @PackageName = "java.util", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.List", @ImportedSimpleName = "List", @ModuleImport = false, @PackageName = "java.util", @Static = false] @@ -10,6 +13,7 @@ | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 2203 | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] @@ -28,6 +32,7 @@ | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "GREEN", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] +Added line: 8669 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BLUE", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$ColoredPoint", @CanonicalName = "Jep456_UnamedPatternsAndVariables.ColoredPoint", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "ColoredPoint", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] @@ -55,6 +60,7 @@ | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] | | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 5957 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | | | +- ArgumentList[@Empty = false, @Size = 2] @@ -70,9 +76,12 @@ | | | +- RecordPattern[] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] | | | +- PatternList[@Empty = false, @Size = 2] +Added line: 6270 | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 642 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] +Added line: 4264 | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -83,16 +92,20 @@ | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6051 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "x", @MethodName = "x", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "p", @Name = "p", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 5605 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " ", @Empty = false, @Image = "\" \"", @Length = 1, @LiteralText = "\" \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 9476 | | +- MethodCall[@CompileTimeConstant = false, @Image = "y", @MethodName = "y", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "p", @Name = "p", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 954 | +- IfStatement[@Else = false] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "r", @Name = "r", @ParenthesisDepth = 0, @Parenthesized = false] @@ -100,11 +113,11 @@ | | +- RecordPattern[] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ColoredPoint"] | | +- PatternList[@Empty = false, @Size = 2] - | | +- RecordPattern[] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1444 | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] @@ -126,11 +139,13 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y", @Name = "y", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$Ball", @CanonicalName = "Jep456_UnamedPatternsAndVariables.Ball", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Ball", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT), @ExplicitModifiers = (JModifier.SEALED, JModifier.ABSTRACT)] +Added line: 8097 +Added line: 9807 | +- PermitsList[@Empty = false, @Size = 3] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "RedBall"] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "BlueBall"] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "GreenBall"] - | +- ClassBody[@Empty = true, @Size = 0] +Added line: 6667 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$RedBall", @CanonicalName = "Jep456_UnamedPatternsAndVariables.RedBall", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "RedBall", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ExtendsList[@Empty = false, @Size = 1] @@ -151,6 +166,7 @@ | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = true] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Ball"] +Added line: 9584 | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] @@ -159,7 +175,6 @@ Added line: 7435 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "content", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "unnamedPatterns2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 5, @containsComment = false] @@ -168,31 +183,45 @@ Added line: 7435 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = false, @UpperBound = true] +Added line: 7304 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Ball"] +Added line: 8025 | | +- VariableDeclarator[@Initializer = true, @Name = "b"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5527 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = true, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = true, @Empty = true, @Size = 0] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 9746 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "RedBall"] +Added line: 5690 | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 8153 | +- SwitchStatement[@DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] Added line: 5000 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "b", @Name = "b", @ParenthesisDepth = 0, @Parenthesized = false] | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | | +- RecordPattern[] +Added line: 6136 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] +Added line: 9747 | | | | +- PatternList[@Empty = false, @Size = 1] +Added line: 2673 +Added line: 2475 +Added line: 6913 +Added line: 531 | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 6160 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] Added line: 6150 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "RedBall"] Added line: 1544 | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = true, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "processBox", @MethodName = "processBox", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6296 | | | +- ArgumentList[@Empty = false, @Size = 1] Added line: 4648 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "b", @Name = "b", @ParenthesisDepth = 0, @Parenthesized = false] @@ -204,7 +233,7 @@ Added line: 4648 | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "BlueBall"] - | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = true, @Visibility = Visibility.V_LOCAL] +Added line: 2177 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "processBox", @MethodName = "processBox", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "b", @Name = "b", @ParenthesisDepth = 0, @Parenthesized = false] @@ -218,12 +247,15 @@ Added line: 4648 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "GreenBall"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "stopProcessing", @MethodName = "stopProcessing", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 647 | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 9507 | +- SwitchStatement[@DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "b", @Name = "b", @ParenthesisDepth = 0, @Parenthesized = false] | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = true] | | | | +- RecordPattern[] +Added line: 4059 | | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | | | +- PatternList[@Empty = false, @Size = 1] | | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] @@ -269,16 +301,19 @@ Added line: 4648 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "b", @Name = "b", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 3298 | | | +- RecordPattern[] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 1835 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "RedBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = true, @Visibility = Visibility.V_LOCAL] | | | +- RecordPattern[] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] +Added line: 1074 | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "BlueBall"] @@ -303,6 +338,8 @@ Added line: 4648 | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 3969 +Added line: 2169 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] @@ -322,8 +359,11 @@ Added line: 4648 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$Order", @CanonicalName = "Jep456_UnamedPatternsAndVariables.Order", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Order", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = true, @Size = 0] +Added line: 1403 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] +Added line: 6534 | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] +Added line: 5009 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "LIMIT"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "LIMIT", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] @@ -335,17 +375,23 @@ Added line: 4648 | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +Added line: 9756 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "unnamedVariables", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 397 | +- VoidType[] +Added line: 9015 | +- FormalParameters[@Empty = false, @Size = 1] - | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 9937 +Added line: 8389 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "List"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Order"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "orders", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 7, @containsComment = false] +Added line: 2724 +Added line: 7989 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] @@ -362,17 +408,27 @@ Added line: 4648 | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- IfStatement[@Else = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.LT, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7787 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "total", @Name = "total", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 208 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "LIMIT", @Name = "LIMIT", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] +Added line: 8937 | | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "total", @Name = "total", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2587 | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4026 +Added line: 1752 +Added line: 8383 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 7767 +Added line: 2469 +Added line: 4581 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "total: ", @Empty = false, @Image = "\"total: \"", @Length = 7, @LiteralText = "\"total: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -382,8 +438,11 @@ Added line: 4648 | | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 1981 +Added line: 1704 | | | +- VariableDeclarator[@Initializer = true, @Name = "i"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = true, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8430 | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = true, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = true, @Visibility = Visibility.V_LOCAL] @@ -391,20 +450,25 @@ Added line: 4648 | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.LT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1856 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "10", @IntLiteral = true, @Integral = true, @LiteralText = "10", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 10.0, @ValueAsFloat = 10.0, @ValueAsInt = 10, @ValueAsLong = 10] | | +- ForUpdate[] +Added line: 6953 | | | +- StatementExpressionList[@Empty = false, @Size = 1] | | | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] +Added line: 1888 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 9003 | | +- ArgumentList[@Empty = false, @Size = 1] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9724 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Queue"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] @@ -416,6 +480,7 @@ Added line: 4648 | | +- ArgumentList[@Empty = true, @Size = 0] | +- WhileStatement[] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GE, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7867 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "size", @MethodName = "size", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] @@ -423,11 +488,11 @@ Added line: 4648 | | +- Block[@Empty = false, @Size = 4, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8773 | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -435,22 +500,27 @@ Added line: 4648 | | | +- VariableDeclarator[@Initializer = true, @Name = "y"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "y", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1344 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2417 +Added line: 5202 | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = true, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 7349 | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | | +- VariableDeclarator[@Initializer = true, @Name = "p"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 5441 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | | +- ArgumentList[@Empty = false, @Size = 2] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] @@ -468,8 +538,10 @@ Added line: 4648 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 139 | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] +Added line: 7463 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = true, @Visibility = Visibility.V_LOCAL] @@ -479,6 +551,7 @@ Added line: 4648 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "_"] +Added line: 6113 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] @@ -486,20 +559,24 @@ Added line: 4648 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] +Added line: 927 | +- VariableDeclarator[@Initializer = true, @Name = "p"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9300 +Added line: 2136 | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Point"] | +- ArgumentList[@Empty = false, @Size = 2] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +Added line: 9924 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$ScopedContext", @CanonicalName = "Jep456_UnamedPatternsAndVariables.ScopedContext", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ScopedContext", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "AutoCloseable"] | +- ClassBody[@Empty = false, @Size = 2] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "close", @Overridden = true, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 8832 | | | +- Annotation[@SimpleName = "Override"] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Override"] | | +- VoidType[] @@ -507,29 +584,34 @@ Added line: 4648 | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "acquire", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 706 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ScopedContext"] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] +Added line: 9196 | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ScopedContext"] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "unusedVariables2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 791 +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 4, @containsComment = false] +- TryStatement[@TryWithResources = true] | +- ResourceList[@Empty = false, @Size = 1, @TrailingSemiColon = false] - | | +- Resource[@ConciseResource = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = true, @Static = false, @TypeInferred = true, @Unnamed = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "acquire", @MethodName = "acquire", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7722 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ScopedContext"] | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 3410 +Added line: 3243 | +- Block[@Empty = true, @Size = 0, @containsComment = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -545,6 +627,7 @@ Added line: 4648 | | | +- VariableDeclarator[@Initializer = true, @Name = "i"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "parseInt", @MethodName = "parseInt", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6174 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] | | | +- ArgumentList[@Empty = false, @Size = 1] @@ -572,11 +655,13 @@ Added line: 4648 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Bad number: ", @Empty = false, @Image = "\"Bad number: \"", @Length = 12, @LiteralText = "\"Bad number: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | +- CatchClause[] +Added line: 5706 | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = false, @Name = "_", @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Exception"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = true, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = true, @Visibility = Visibility.V_PACKAGE] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 4230 | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -586,22 +671,26 @@ Added line: 4648 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "error...", @Empty = false, @Image = "\"error...\"", @Length = 8, @LiteralText = "\"error...\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "collect", @MethodName = "collect", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9667 +- MethodCall[@CompileTimeConstant = false, @Image = "stream", @MethodName = "stream", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "of", @MethodName = "of", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "List"] | | +- ArgumentList[@Empty = false, @Size = 2] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "a", @Empty = false, @Image = "\"a\"", @Length = 1, @LiteralText = "\"a\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 9844 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "b", @Empty = false, @Image = "\"b\"", @Length = 1, @LiteralText = "\"b\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 2460 +- ArgumentList[@Empty = false, @Size = 1] +Added line: 7899 +- MethodCall[@CompileTimeConstant = false, @Image = "toMap", @MethodName = "toMap", @ParenthesisDepth = 0, @Parenthesized = false] +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Collectors"] +Added line: 2954 +- ArgumentList[@Empty = false, @Size = 2] +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = false, @MethodName = "toUpperCase", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] - | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExplicitlyTyped = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] +- LambdaParameterList[@Empty = false, @Size = 1] | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep447_StatementsBeforeSuper.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep447_StatementsBeforeSuper.txt index 1b7670e329..e9b6a35a66 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep447_StatementsBeforeSuper.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep447_StatementsBeforeSuper.txt @@ -1,7 +1,10 @@ +- CompilationUnit[@PackageName = ""] +Added line: 4736 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.math.BigInteger", @ImportedSimpleName = "BigInteger", @ModuleImport = false, @PackageName = "java.math", @Static = false] +Added line: 7237 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.nio.charset.StandardCharsets", @ImportedSimpleName = "StandardCharsets", @ModuleImport = false, @PackageName = "java.nio.charset", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.security.cert.Certificate", @ImportedSimpleName = "Certificate", @ModuleImport = false, @PackageName = "java.security.cert", @Static = false] +Added line: 3602 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.security.interfaces.DSAPublicKey", @ImportedSimpleName = "DSAPublicKey", @ModuleImport = false, @PackageName = "java.security.interfaces", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.security.interfaces.RSAKey", @ImportedSimpleName = "RSAKey", @ModuleImport = false, @PackageName = "java.security.interfaces", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper", @CanonicalName = "Jep447_StatementsBeforeSuper", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep447_StatementsBeforeSuper", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] @@ -14,29 +17,44 @@ | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 7681 | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 5011 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$PositiveBigInteger", @CanonicalName = "Jep447_StatementsBeforeSuper.PositiveBigInteger", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PositiveBigInteger", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ExtendsList[@Empty = false, @Size = 1] +Added line: 7624 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "BigInteger"] | +- ClassBody[@Empty = false, @Size = 1] +Added line: 2712 +Added line: 1812 +Added line: 5811 | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "PositiveBigInteger", @Name = "PositiveBigInteger", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] +Added line: 548 +Added line: 6194 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 6500 | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 3035 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "value", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 3, @containsComment = false] +Added line: 6000 +Added line: 7927 +Added line: 9220 | +- IfStatement[@Else = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.LE, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "value", @Name = "value", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6919 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | | +- ThrowStatement[] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 351 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "non-positive value", @Empty = false, @Image = "\"non-positive value\"", @Length = 18, @LiteralText = "\"non-positive value\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] @@ -46,6 +64,7 @@ | | +- MethodCall[@CompileTimeConstant = false, @Image = "valueOf", @MethodName = "valueOf", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 8809 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "value", @Name = "value", @ParenthesisDepth = 0, @Parenthesized = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = true, @This = false] @@ -55,19 +74,26 @@ | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Super", @Name = "Super", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] +Added line: 3865 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 9076 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] +Added line: 5114 +Added line: 470 | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | +- ArrayTypeDim[@Varargs = false] | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "bytes", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Sub", @CanonicalName = "Jep447_StatementsBeforeSuper.Sub", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Sub", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 5187 +Added line: 8563 +Added line: 7322 | +- ExtendsList[@Empty = false, @Size = 1] +Added line: 8181 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Super"] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Sub", @Name = "Sub", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] @@ -77,32 +103,52 @@ | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Certificate"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "certificate", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 4054 | +- Block[@Empty = false, @Size = 4, @containsComment = false] +Added line: 5866 +Added line: 1477 +Added line: 274 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] +Added line: 7681 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "publicKey", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 2441 | | +- MethodCall[@CompileTimeConstant = false, @Image = "getPublicKey", @MethodName = "getPublicKey", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7870 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "certificate", @Name = "certificate", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4915 | | +- ArgumentList[@Empty = true, @Size = 0] Added line: 7958 +Added line: 8362 +Added line: 1636 +Added line: 3125 | +- IfStatement[@Else = false] +Added line: 4635 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "publicKey", @Name = "publicKey", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ThrowStatement[] +Added line: 7080 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 7526 +Added line: 273 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "null certificate", @Empty = false, @Image = "\"null certificate\"", @Length = 16, @LiteralText = "\"null certificate\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 8917 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 5019 | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | +- ArrayType[@ArrayDepth = 1] +Added line: 7858 | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | +- ArrayTypeDim[@Varargs = false] | | +- VariableDeclarator[@Initializer = true, @Name = "byteArray"] | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "byteArray", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1545 | | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9238 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "publicKey", @Name = "publicKey", @ParenthesisDepth = 0, @Parenthesized = false] | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = true] @@ -116,27 +162,37 @@ Added line: 7958 | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "UTF_8", @Name = "UTF_8", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3447 +Added line: 4073 +Added line: 4476 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "StandardCharsets"] | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 1268 | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 3131 | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "DSAPublicKey"] - | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "dsaKey", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7536 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getBytes", @MethodName = "getBytes", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7828 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "toString", @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "dsaKey", @Name = "dsaKey", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 8596 | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "UTF_8", @Name = "UTF_8", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 988 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "StandardCharsets"] +Added line: 763 | | +- SwitchArrowBranch[@Default = true] - | | +- SwitchLabel[@Default = true, @PatternLabel = false] | | +- ArrayAllocation[@ArrayDepth = 1, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] Added line: 1966 +Added line: 3613 | | +- ArrayType[@ArrayDepth = 1] +Added line: 6596 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | +- ArrayDimensions[@Empty = false, @Size = 1] | | +- ArrayDimExpr[@Varargs = false] @@ -145,9 +201,10 @@ Added line: 1966 | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "byteArray", @Name = "byteArray", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$F", @CanonicalName = "Jep447_StatementsBeforeSuper.F", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "F", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] Added line: 9992 | +- ClassBody[@Empty = true, @Size = 0] +Added line: 3215 +Added line: 9598 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Super2", @CanonicalName = "Jep447_StatementsBeforeSuper.Super2", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Super2", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassBody[@Empty = false, @Size = 1] @@ -160,31 +217,42 @@ Added line: 9992 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "f1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "F"] +Added line: 8500 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "f2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 7892 | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Sub2", @CanonicalName = "Jep447_StatementsBeforeSuper.Sub2", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Sub2", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] Added line: 8119 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ExtendsList[@Empty = false, @Size = 1] +Added line: 6179 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Super2"] | +- ClassBody[@Empty = false, @Size = 1] - | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Sub2", @Name = "Sub2", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = true] | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 6363 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = true] +Added line: 8279 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3714 | | +- VariableDeclarator[@Initializer = true, @Name = "f"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8269 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "F"] +Added line: 9764 | | +- ArgumentList[@Empty = true, @Size = 0] | +- ExplicitConstructorInvocation[@ArgumentCount = 2, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | +- ArgumentList[@Empty = false, @Size = 2] +Added line: 4025 +Added line: 486 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2540 +Added line: 2370 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Range", @CanonicalName = "Jep447_StatementsBeforeSuper.Range", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Range", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] @@ -194,6 +262,7 @@ Added line: 8119 | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lo", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 8650 | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "hi", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] @@ -203,7 +272,7 @@ Added line: 8119 | +- FormalParameters[@Empty = false, @Size = 3] Added line: 6607 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6255 | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "lo", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] @@ -214,12 +283,13 @@ Added line: 6607 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "maxDistance", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 372 | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- IfStatement[@Else = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- ThrowStatement[] +Added line: 139 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] | | +- ArgumentList[@Empty = false, @Size = 1] @@ -227,37 +297,51 @@ Added line: 6607 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArgumentList[@Empty = false, @Size = 3] +Added line: 2926 +Added line: 8571 +Added line: 5528 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "(%d,%d)", @Empty = false, @Image = "\"(%d,%d)\"", @Length = 7, @LiteralText = "\"(%d,%d)\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 1494 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] | +- IfStatement[@Else = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.SUB, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7242 +Added line: 4093 +Added line: 4008 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4560 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "maxDistance", @Name = "maxDistance", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- ThrowStatement[] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 3944 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9666 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 5922 | | +- ArgumentList[@Empty = false, @Size = 4] +Added line: 8838 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "(%d,%d,%d", @Empty = false, @Image = "\"(%d,%d,%d\"", @Length = 9, @LiteralText = "\"(%d,%d,%d\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3235 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "maxDistance", @Name = "maxDistance", @ParenthesisDepth = 0, @Parenthesized = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 2, @MethodName = "new", @Qualified = false, @Super = false, @This = true] | +- ArgumentList[@Empty = false, @Size = 2] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Color", @CanonicalName = "Jep447_StatementsBeforeSuper.Color", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Color", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 4892 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] +- EnumBody[@Empty = false, @SeparatorSemi = true, @Size = 4, @TrailingComma = false] +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BLUE", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] +Added line: 7344 | +- ArgumentList[@Empty = false, @Size = 1] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Image = "Color", @Name = "Color", @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @containsComment = false] @@ -269,6 +353,8 @@ Added line: 6607 | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5347 +Added line: 1617 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = false] @@ -277,9 +363,12 @@ Added line: 6607 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | | +- ThrowStatement[] +Added line: 2201 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 6318 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] | | +- ArgumentList[@Empty = true, @Size = 0] | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = false, @This = true] +Added line: 8833 | +- ArgumentList[@Empty = true, @Size = 0] +- EmptyDeclaration[] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep459_StringTemplates.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep459_StringTemplates.txt index 2b3fe88546..5ba559925e 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep459_StringTemplates.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep459_StringTemplates.txt @@ -1,6 +1,8 @@ +- CompilationUnit[@PackageName = ""] +Added line: 4751 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.StringTemplate.RAW", @ImportedSimpleName = "RAW", @ModuleImport = false, @PackageName = "java.lang.StringTemplate", @Static = true] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.FormatProcessor.FMT", @ImportedSimpleName = "FMT", @ModuleImport = false, @PackageName = "java.util.FormatProcessor", @Static = true] +Added line: 3677 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.io.File", @ImportedSimpleName = "File", @ModuleImport = false, @PackageName = "java.io", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.time.format.DateTimeFormatter", @ImportedSimpleName = "DateTimeFormatter", @ModuleImport = false, @PackageName = "java.time.format", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.time.LocalTime", @ImportedSimpleName = "LocalTime", @ModuleImport = false, @PackageName = "java.time", @Static = false] @@ -15,6 +17,7 @@ | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "date", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] +Added line: 8013 | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "time", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] @@ -27,11 +30,14 @@ Added line: 1162 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] +Added line: 9125 +Added line: 4771 | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 19, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 4085 | | +- VariableDeclarator[@Initializer = true, @Name = "firstName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "firstName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Bill", @Empty = false, @Image = "\"Bill\"", @Length = 4, @LiteralText = "\"Bill\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -40,6 +46,7 @@ Added line: 1162 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "lastName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "lastName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 2492 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Duck", @Empty = false, @Image = "\"Duck\"", @Length = 4, @LiteralText = "\"Duck\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -58,6 +65,7 @@ Added line: 1162 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "sortName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "sortName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5823 | | +- TemplateExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringTemplate = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "STR", @Name = "STR", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Template[] @@ -68,6 +76,7 @@ Added line: 1162 | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8620 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -93,12 +102,12 @@ Added line: 3053 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y", @Name = "y", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] - | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "s2"] - | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8022 | | +- TemplateExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringTemplate = true] +Added line: 6101 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "STR", @Name = "STR", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Template[] | | +- TemplateFragment[@Content = "\"You have a \\{"] @@ -113,9 +122,11 @@ Added line: 3053 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Request"] | | +- ArgumentList[@Empty = false, @Size = 3] +Added line: 9663 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "2022-03-25", @Empty = false, @Image = "\"2022-03-25\"", @Length = 10, @LiteralText = "\"2022-03-25\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "15:34", @Empty = false, @Image = "\"15:34\"", @Length = 5, @LiteralText = "\"15:34\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "8.8.8.8", @Empty = false, @Image = "\"8.8.8.8\"", @Length = 7, @LiteralText = "\"8.8.8.8\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 6419 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] @@ -128,7 +139,6 @@ Added line: 8021 | | +- TemplateFragment[@Content = "\"Access at \\{"] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "date", @Name = "date", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "req", @Name = "req", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- TemplateFragment[@Content = "} \\{"] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "time", @Name = "time", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "req", @Name = "req", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "} from \\{"] @@ -136,10 +146,12 @@ Added line: 8021 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "req", @Name = "req", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 8243 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "filePath"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "filePath", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 441 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "tmp.dat", @Empty = false, @Image = "\"tmp.dat\"", @Length = 7, @LiteralText = "\"tmp.dat\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -147,10 +159,12 @@ Added line: 8021 | | +- VariableDeclarator[@Initializer = true, @Name = "file"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "file", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 3434 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "File"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "filePath", @Name = "filePath", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 7649 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "old"] @@ -158,6 +172,7 @@ Added line: 8021 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6199 | | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "The file ", @Empty = false, @Image = "\"The file \"", @Length = 9, @LiteralText = "\"The file \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "filePath", @Name = "filePath", @ParenthesisDepth = 0, @Parenthesized = false] @@ -171,6 +186,7 @@ Added line: 8021 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " exist", @Empty = false, @Image = "\" exist\"", @Length = 6, @LiteralText = "\" exist\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6710 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "msg"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "msg", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -191,6 +207,7 @@ Added line: 8021 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "time"] +Added line: 2184 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "time", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- TemplateExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringTemplate = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "STR", @Name = "STR", @ParenthesisDepth = 0, @Parenthesized = false] @@ -201,6 +218,7 @@ Added line: 8021 | | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "DateTimeFormatter"] | | | | +- ArgumentList[@Empty = false, @Size = 1] | | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "HH:mm:ss", @Empty = false, @Image = "\"HH:mm:ss\"", @Length = 8, @LiteralText = "\"HH:mm:ss\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 2828 | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "now", @MethodName = "now", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -220,11 +238,13 @@ Added line: 8021 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "data", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- TemplateExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringTemplate = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "STR", @Name = "STR", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1567 | | +- Template[] | | +- TemplateFragment[@Content = "\"\\{"] | | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "index", @Name = "index", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}, \\{"] +Added line: 4951 | | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "index", @Name = "index", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}, \\{"] @@ -235,7 +255,9 @@ Added line: 8021 | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "index", @Name = "index", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 2995 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8219 | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -249,9 +271,12 @@ Added line: 8021 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 9522 | | +- VariableDeclarator[@Initializer = true, @Name = "s3"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s3", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 6108 | | +- TemplateExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringTemplate = true] +Added line: 8060 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "STR", @Name = "STR", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Template[] | | +- TemplateFragment[@Content = "\"\\{"] @@ -271,11 +296,14 @@ Added line: 8021 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "fruit", @Name = "fruit", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | | | +- TemplateFragment[@Content = "}\""] +Added line: 9756 | | +- TemplateFragment[@Content = "}\""] +Added line: 8882 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "s4"] +Added line: 9754 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s4", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "STR", @Name = "STR", @ParenthesisDepth = 0, @Parenthesized = false] | +- Template[] @@ -284,6 +312,7 @@ Added line: 8021 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "fruit", @Name = "fruit", @ParenthesisDepth = 0, @Parenthesized = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | +- TemplateFragment[@Content = "}, \\{"] +Added line: 3854 | +- TemplateExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringTemplate = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "STR", @Name = "STR", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Template[] @@ -296,22 +325,25 @@ Added line: 8021 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "fruit", @Name = "fruit", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | | +- TemplateFragment[@Content = "}\""] - | +- TemplateFragment[@Content = "}\""] +Added line: 199 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "getOfferType", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] +Added line: 2785 +Added line: 7718 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "_getOfferType_", @Empty = false, @Image = "\"_getOfferType_\"", @Length = 14, @LiteralText = "\"_getOfferType_\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 9967 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "multilineTemplateExpressions", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 6453 | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] - | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 10, @containsComment = true] +Added line: 6422 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "title"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "title", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "My Web Page", @Empty = false, @Image = "\"My Web Page\"", @Length = 11, @LiteralText = "\"My Web Page\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -328,6 +360,7 @@ Added line: 8021 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "html", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- TemplateExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringTemplate = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "STR", @Name = "STR", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4335 | | +- Template[] | | +- TemplateFragment[@Content = "\"\"\"\n <html>\n <head>\n <title>\\{"] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "title", @Name = "title", @ParenthesisDepth = 0, @Parenthesized = false] @@ -341,9 +374,12 @@ Added line: 8021 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "name", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Joan Smith", @Empty = false, @Image = "\"Joan Smith\"", @Length = 10, @LiteralText = "\"Joan Smith\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 5760 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "phone"] +Added line: 4953 +Added line: 1048 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "phone", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "555-123-4567", @Empty = false, @Image = "\"555-123-4567\"", @Length = 12, @LiteralText = "\"555-123-4567\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -366,9 +402,10 @@ Added line: 8021 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "phone", @Name = "phone", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\",\n \"address\": \"\\{"] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "address", @Name = "address", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- TemplateFragment[@Content = "}\"\n }\n \"\"\""] | +- LocalClassStatement[] +Added line: 5050 | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep459_StringTemplates$1Rectangle", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Rectangle", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_LOCAL] +Added line: 988 | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- RecordComponentList[@Empty = false, @Size = 3, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] @@ -382,16 +419,20 @@ Added line: 8021 | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] +Added line: 8650 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "height", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = false, @Size = 1] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Name = "area", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2486 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 9085 | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ReturnStatement[] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.MUL, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "width", @Name = "width", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2332 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "height", @Name = "height", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] Added line: 5032 @@ -404,6 +445,7 @@ Added line: 5032 | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "zone", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- ArrayAllocation[@ArrayDepth = 1, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayType[@ArrayDepth = 1] +Added line: 2735 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | +- ArrayTypeDim[@Varargs = false] @@ -429,6 +471,8 @@ Added line: 5032 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 8898 +Added line: 7082 | +- VariableDeclarator[@Initializer = true, @Name = "table"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "table", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- TemplateExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringTemplate = true] @@ -436,8 +480,11 @@ Added line: 5032 | +- Template[] | +- TemplateFragment[@Content = "\"\"\"\n Description Width Height Area\n \\{"] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "name", @Name = "name", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4771 | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7209 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7578 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | +- TemplateFragment[@Content = "} \\{"] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "width", @Name = "width", @ParenthesisDepth = 0, @Parenthesized = false] @@ -451,6 +498,7 @@ Added line: 5032 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | +- TemplateFragment[@Content = "} \\{"] | +- MethodCall[@CompileTimeConstant = false, @Image = "area", @MethodName = "area", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4180 | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] @@ -460,10 +508,10 @@ Added line: 1838 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "name", @Name = "name", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5529 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | +- TemplateFragment[@Content = "} \\{"] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "width", @Name = "width", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | +- TemplateFragment[@Content = "} \\{"] @@ -474,12 +522,15 @@ Added line: 8082 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | +- TemplateFragment[@Content = "} \\{"] | +- MethodCall[@CompileTimeConstant = false, @Image = "area", @MethodName = "area", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 430 | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}\n \\{"] +Added line: 4738 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "name", @Name = "name", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8453 | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] @@ -487,13 +538,19 @@ Added line: 8082 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "width", @Name = "width", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6139 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | +- TemplateFragment[@Content = "} \\{"] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "height", @Name = "height", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4312 +Added line: 8822 +Added line: 2931 +Added line: 5396 | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | +- TemplateFragment[@Content = "} \\{"] +Added line: 9840 | +- MethodCall[@CompileTimeConstant = false, @Image = "area", @MethodName = "area", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] @@ -553,12 +610,12 @@ Added line: 7908 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] Added line: 2011 - | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | +- ArrayTypeDim[@Varargs = false] | | +- VariableDeclarator[@Initializer = true, @Name = "zone"] | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "zone", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 1508 | | +- ArrayAllocation[@ArrayDepth = 1, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Rectangle"] @@ -583,24 +640,32 @@ Added line: 2011 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Charlie", @Empty = false, @Image = "\"Charlie\"", @Length = 7, @LiteralText = "\"Charlie\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "7.1", @IntLiteral = false, @Integral = false, @LiteralText = "7.1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.1, @ValueAsFloat = 7.1, @ValueAsInt = 7, @ValueAsLong = 7] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "11.23", @IntLiteral = false, @Integral = false, @LiteralText = "11.23", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 11.23, @ValueAsFloat = 11.23, @ValueAsInt = 11, @ValueAsLong = 11] +Added line: 2081 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "table"] +Added line: 5793 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "table", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- TemplateExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringTemplate = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "FMT", @Name = "FMT", @ParenthesisDepth = 0, @Parenthesized = false] | +- Template[] +Added line: 3136 +Added line: 3366 +Added line: 6396 | +- TemplateFragment[@Content = "\"\"\"\n Description Width Height Area\n %-12s\\{"] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "name", @Name = "name", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +Added line: 3228 | +- TemplateFragment[@Content = "} %7.2f\\{"] +Added line: 3178 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "width", @Name = "width", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +Added line: 7360 | +- TemplateFragment[@Content = "} %7.2f\\{"] | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "height", @Name = "height", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -610,6 +675,7 @@ Added line: 2011 | +- MethodCall[@CompileTimeConstant = false, @Image = "area", @MethodName = "area", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1032 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}\n %-12s\\{"] @@ -630,6 +696,7 @@ Added line: 2011 | +- TemplateFragment[@Content = "} %7.2f\\{"] | +- MethodCall[@CompileTimeConstant = false, @Image = "area", @MethodName = "area", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 765 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | | +- ArgumentList[@Empty = true, @Size = 0] @@ -652,17 +719,22 @@ Added line: 2011 | +- MethodCall[@CompileTimeConstant = false, @Image = "area", @MethodName = "area", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8446 | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}\n \\{"] +Added line: 3363 | +- MethodCall[@CompileTimeConstant = false, @Image = "repeat", @MethodName = "repeat", @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " ", @Empty = false, @Image = "\" \"", @Length = 1, @LiteralText = "\" \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 7480 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "28", @IntLiteral = true, @Integral = true, @LiteralText = "28", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 28.0, @ValueAsFloat = 28.0, @ValueAsInt = 28, @ValueAsLong = 28] +Added line: 8445 | +- TemplateFragment[@Content = "} Total %7.2f\\{"] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "area", @MethodName = "area", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1830 | | | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] | | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] @@ -670,6 +742,7 @@ Added line: 2011 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "area", @MethodName = "area", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArrayAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6528 | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- MethodCall[@CompileTimeConstant = false, @Image = "area", @MethodName = "area", @ParenthesisDepth = 0, @Parenthesized = false] @@ -677,6 +750,8 @@ Added line: 2011 Added line: 7504 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zone", @Name = "zone", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +Added line: 6199 +Added line: 2697 | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}\n \"\"\""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "ensuringSafety", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] @@ -691,6 +766,8 @@ Added line: 7504 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "name", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Joan", @Empty = false, @Image = "\"Joan\"", @Length = 4, @LiteralText = "\"Joan\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 3167 +Added line: 9789 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "StringTemplate"] | | +- VariableDeclarator[@Initializer = true, @Name = "st"] @@ -708,7 +785,9 @@ Added line: 7504 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "info", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "process", @MethodName = "process", @ParenthesisDepth = 0, @Parenthesized = false] | +- AmbiguousName[@CompileTimeConstant = false, @Image = "STR", @Name = "STR", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1231 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 2380 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "st", @Name = "st", @ParenthesisDepth = 0, @Parenthesized = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep459_StringTemplates$User", @CanonicalName = "Jep459_StringTemplates.User", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "User", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] @@ -719,6 +798,7 @@ Added line: 7504 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "firstName", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] +Added line: 6617 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "accountNumber", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] @@ -728,17 +808,24 @@ Added line: 7504 | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 3, @containsComment = true] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 2938 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "s1"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- TemplateExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringTemplate = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "STR", @Name = "STR", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8706 | | +- Template[] +Added line: 4567 | | +- TemplateFragment[@Content = "\"Welcome to your account\""] +Added line: 4763 +Added line: 5870 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "User"] | | +- VariableDeclarator[@Initializer = true, @Name = "user"] +Added line: 9624 +Added line: 5084 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "user", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "User"] @@ -759,9 +846,11 @@ Added line: 7504 | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}, to your account \\{"] | +- MethodCall[@CompileTimeConstant = false, @Image = "accountNumber", @MethodName = "accountNumber", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8543 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "user", @Name = "user", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}\""] +Added line: 6212 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "emptyEmbeddedExpression", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +- VoidType[] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses1.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses1.txt index 60fdf7cee4..930ad0ff28 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses1.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses1.txt @@ -1,16 +1,105 @@ +Added line: 3990 +Added line: 7488 +Added line: 6492 +Added line: 5596 +Added line: 6328 +Added line: 911 +Added line: 4252 +Added line: 1595 +Added line: 4010 +- CompilationUnit[@PackageName = ""] +Added line: 6532 +Added line: 320 +Added line: 5975 +Added line: 2253 +Added line: 4068 +Added line: 4754 +Added line: 3327 +Added line: 4402 +Added line: 6529 +Added line: 7057 +Added line: 4514 +- ImplicitClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "", @CanonicalName = null, @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = true, @UnnamedToplevelClass = true, @Visibility = Visibility.V_PACKAGE] +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 876 +Added line: 2064 +Added line: 8915 +Added line: 5688 +Added line: 3340 +Added line: 3627 +Added line: 947 +Added line: 3179 +- ClassBody[@Empty = false, @Size = 1] - +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 1108 +Added line: 9124 +Added line: 9855 +Added line: 5231 +Added line: 5889 +Added line: 9549 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7302 +- VoidType[] +Added line: 3988 +Added line: 6228 +Added line: 2593 +- FormalParameters[@Empty = true, @Size = 0] +Added line: 6433 +Added line: 3663 +Added line: 4287 +Added line: 54 +Added line: 1385 +Added line: 5489 +Added line: 4053 +Added line: 3180 +Added line: 4354 +Added line: 7799 +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 7573 +Added line: 5929 +- ExpressionStatement[] +Added line: 8869 +Added line: 7082 +Added line: 2255 +Added line: 9429 +Added line: 1268 +Added line: 6180 +Added line: 9601 +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1159 +Added line: 4229 +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3678 +Added line: 783 +Added line: 9455 +Added line: 4543 +Added line: 7860 +Added line: 1917 +Added line: 2965 +Added line: 1117 +Added line: 630 +Added line: 6813 +Added line: 2313 +Added line: 4284 +Added line: 3125 +Added line: 9807 +Added line: 7028 +Added line: 8693 +Added line: 2905 +Added line: 1702 +Added line: 6716 +Added line: 6273 +Added line: 820 | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9509 +Added line: 7422 +Added line: 3860 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 8861 +Added line: 6499 +Added line: 6283 +Added line: 353 +Added line: 8561 +- ArgumentList[@Empty = false, @Size = 1] - +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello World", @Empty = false, @Image = "\"Hello World\"", @Length = 11, @LiteralText = "\"Hello World\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 987 +Added line: 2798 +Added line: 7569 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses2.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses2.txt index 739afb809f..450d594f23 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses2.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses2.txt @@ -1,24 +1,113 @@ +Added line: 9947 +Added line: 4469 +Added line: 5576 +Added line: 2766 +Added line: 8605 +Added line: 7629 +Added line: 6070 +Added line: 8776 +- CompilationUnit[@PackageName = ""] +Added line: 1343 +Added line: 2539 +Added line: 6204 +Added line: 5739 +- ImplicitClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "", @CanonicalName = null, @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = true, @UnnamedToplevelClass = true, @Visibility = Visibility.V_PACKAGE] +Added line: 2949 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 681 +- ClassBody[@Empty = false, @Size = 2] +Added line: 7596 +Added line: 905 +Added line: 2799 +Added line: 2221 +Added line: 9678 +Added line: 2438 +Added line: 7167 +Added line: 1677 +Added line: 3506 +Added line: 6632 +Added line: 3181 +Added line: 6919 +Added line: 1384 +Added line: 5178 +Added line: 6062 +Added line: 4779 +Added line: 8299 +Added line: 3602 +Added line: 6529 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "greeting", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] +Added line: 4651 +Added line: 281 +Added line: 5587 +Added line: 306 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6164 +Added line: 8358 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 5080 +Added line: 4154 +Added line: 4800 +Added line: 1437 +Added line: 9590 | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 6420 +Added line: 3257 +Added line: 7384 +Added line: 9515 +Added line: 2592 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 3378 | +- ReturnStatement[] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello, World!", @Empty = false, @Image = "\"Hello, World!\"", @Length = 13, @LiteralText = "\"Hello, World!\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 3902 +Added line: 1266 +Added line: 6769 +Added line: 9606 +Added line: 1360 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 9464 +Added line: 6467 +Added line: 329 +Added line: 7641 +Added line: 9220 +Added line: 7721 +Added line: 9908 +Added line: 7320 +Added line: 3062 +Added line: 1547 +Added line: 1509 +Added line: 3277 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5969 +Added line: 6828 +- VoidType[] +Added line: 7649 +Added line: 7554 +- FormalParameters[@Empty = true, @Size = 0] +Added line: 6216 +- Block[@Empty = false, @Size = 1, @containsComment = false] +- ExpressionStatement[] +Added line: 7996 +Added line: 2295 +Added line: 1955 +Added line: 2799 +Added line: 7488 +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] - | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] - | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 8898 +Added line: 8935 +Added line: 7998 +Added line: 1986 +Added line: 3075 +Added line: 3680 +- ArgumentList[@Empty = false, @Size = 1] +Added line: 1589 +Added line: 9726 +Added line: 4992 +Added line: 4240 +- MethodCall[@CompileTimeConstant = false, @Image = "greeting", @MethodName = "greeting", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5947 +Added line: 6071 +Added line: 6096 +- ArgumentList[@Empty = true, @Size = 0] +Added line: 6672 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses3.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses3.txt index 0b2d0ef243..8fc5bdb6e5 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses3.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses3.txt @@ -1,22 +1,111 @@ +Added line: 2218 +- CompilationUnit[@PackageName = ""] +Added line: 1549 +- ImplicitClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "", @CanonicalName = null, @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = true, @UnnamedToplevelClass = true, @Visibility = Visibility.V_PACKAGE] +Added line: 5941 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - +- ClassBody[@Empty = false, @Size = 2] +Added line: 206 +Added line: 3214 +Added line: 372 +Added line: 8941 +Added line: 9851 +Added line: 6690 +Added line: 5339 +Added line: 3062 +Added line: 2042 +Added line: 3627 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] +Added line: 5500 +Added line: 4846 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 8411 +Added line: 865 +Added line: 5275 +Added line: 6036 +Added line: 8998 +Added line: 3994 | +- VariableDeclarator[@Initializer = true, @Name = "greeting"] +Added line: 1739 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "greeting", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 698 +Added line: 814 +Added line: 651 +Added line: 4778 +Added line: 2536 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello, World!", @Empty = false, @Image = "\"Hello, World!\"", @Length = 13, @LiteralText = "\"Hello, World!\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 6047 +Added line: 8573 +Added line: 6290 +Added line: 5106 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 324 +Added line: 6900 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6973 +Added line: 8440 +Added line: 3712 +Added line: 443 +Added line: 8559 +Added line: 6685 +Added line: 1729 +Added line: 3112 +Added line: 7200 +Added line: 6790 +Added line: 8123 +Added line: 4415 +Added line: 1363 +Added line: 3180 +Added line: 8264 +Added line: 6483 +Added line: 1117 +- VoidType[] - +- FormalParameters[@Empty = true, @Size = 0] +Added line: 633 +Added line: 1940 +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 4650 +- ExpressionStatement[] +Added line: 9392 +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9691 +Added line: 490 +Added line: 8468 +Added line: 3780 +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4862 | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5386 +Added line: 3212 +Added line: 1098 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 181 +Added line: 7265 +Added line: 5705 +Added line: 7439 +Added line: 486 +Added line: 6467 +Added line: 4136 +Added line: 9562 +- ArgumentList[@Empty = false, @Size = 1] +Added line: 2895 +Added line: 2338 +Added line: 3569 +Added line: 2237 +Added line: 957 +Added line: 3431 +Added line: 4789 +Added line: 8285 +Added line: 8989 +Added line: 1243 +Added line: 9987 +Added line: 8890 +Added line: 938 +Added line: 1739 +Added line: 8210 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "greeting", @Name = "greeting", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6922 +Added line: 8564 +Added line: 6438 +Added line: 6985 +Added line: 4341 +Added line: 3762 +Added line: 9299 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses4WithImports.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses4WithImports.txt index 6a3af670f5..30624a900f 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses4WithImports.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses4WithImports.txt @@ -1,38 +1,127 @@ -+- CompilationUnit[@PackageName = ""] +Added line: 9318 +Added line: 229 +Added line: 2863 +Added line: 9808 +Added line: 9284 +Added line: 2245 +Added line: 5680 +Added line: 1412 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.Arrays", @ImportedSimpleName = "Arrays", @ModuleImport = false, @PackageName = "java.util", @Static = false] +Added line: 653 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.stream.Collectors", @ImportedSimpleName = "Collectors", @ModuleImport = false, @PackageName = "java.util.stream", @Static = false] +Added line: 3475 +Added line: 6545 +Added line: 8579 +Added line: 1320 +Added line: 9917 +Added line: 8342 +Added line: 5929 +Added line: 7457 +Added line: 3132 +- ImplicitClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "", @CanonicalName = null, @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = true, @UnnamedToplevelClass = true, @Visibility = Visibility.V_PACKAGE] +Added line: 3297 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8377 +- ClassBody[@Empty = false, @Size = 2] +Added line: 3468 +Added line: 2193 +Added line: 5905 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5275 +Added line: 7715 +Added line: 9983 +Added line: 4240 +Added line: 2180 +Added line: 2131 +Added line: 697 +Added line: 4295 +Added line: 3504 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "greeting"] +Added line: 7202 +Added line: 3438 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "greeting", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] - | +- MethodCall[@CompileTimeConstant = false, @Image = "collect", @MethodName = "collect", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 892 +Added line: 6589 +Added line: 7835 +Added line: 5798 +Added line: 2965 +Added line: 8463 +Added line: 8611 | +- MethodCall[@CompileTimeConstant = false, @Image = "stream", @MethodName = "stream", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9586 +Added line: 1410 +Added line: 2364 | | +- MethodCall[@CompileTimeConstant = false, @Image = "asList", @MethodName = "asList", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7441 +Added line: 617 +Added line: 4647 +Added line: 6759 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2349 +Added line: 8523 +Added line: 6360 +Added line: 5117 +Added line: 4132 +Added line: 7163 +Added line: 4872 +Added line: 5084 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Arrays"] | | | +- ArgumentList[@Empty = false, @Size = 2] - | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello", @Empty = false, @Image = "\"Hello\"", @Length = 5, @LiteralText = "\"Hello\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 9874 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "World!", @Empty = false, @Image = "\"World!\"", @Length = 6, @LiteralText = "\"World!\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 2250 +Added line: 9692 +Added line: 6252 +Added line: 4871 +Added line: 4797 +Added line: 2162 | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 9200 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 4308 | +- MethodCall[@CompileTimeConstant = false, @Image = "joining", @MethodName = "joining", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2207 +Added line: 4163 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Collectors"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6427 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ", ", @Empty = false, @Image = "\", \"", @Length = 2, @LiteralText = "\", \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 4263 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8709 +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 4595 +Added line: 3453 +Added line: 9545 +Added line: 8768 +Added line: 4370 +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4099 +Added line: 6409 +Added line: 2891 +Added line: 4065 +Added line: 2513 +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2675 | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5223 +Added line: 6791 +Added line: 8712 +Added line: 7933 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 6463 +Added line: 6397 +Added line: 302 +Added line: 2796 +- ArgumentList[@Empty = false, @Size = 1] +Added line: 1722 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "greeting", @Name = "greeting", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1561 +Added line: 9018 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23/Jep467_MarkdownDocumentationComments.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23/Jep467_MarkdownDocumentationComments.txt index b814782ef3..82505bd9da 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23/Jep467_MarkdownDocumentationComments.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23/Jep467_MarkdownDocumentationComments.txt @@ -1,34 +1,123 @@ +- CompilationUnit[@PackageName = ""] +Added line: 734 +Added line: 7593 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.Locale", @ImportedSimpleName = "Locale", @ModuleImport = false, @PackageName = "java.util", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep467_MarkdownDocumentationComments", @CanonicalName = "Jep467_MarkdownDocumentationComments", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep467_MarkdownDocumentationComments", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 2] +Added line: 3207 +Added line: 7588 +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "name", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 4969 +Added line: 6039 +Added line: 7391 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 3103 +Added line: 8434 +Added line: 1658 +Added line: 6601 +Added line: 4917 +Added line: 3565 +Added line: 5894 +Added line: 6509 +Added line: 5376 +Added line: 7004 +Added line: 1581 +Added line: 2964 +Added line: 1004 +Added line: 8671 +Added line: 2926 +Added line: 4930 +Added line: 8520 | +- FormalParameters[@Empty = false, @Size = 1] +Added line: 5555 | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 4420 +Added line: 8339 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "prefix", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 227 +Added line: 2433 +Added line: 361 +Added line: 5868 +Added line: 7446 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 5957 +Added line: 8961 +Added line: 3897 +Added line: 8202 +Added line: 7038 +Added line: 4316 +Added line: 8188 | +- ReturnStatement[] +Added line: 9450 +Added line: 5011 +Added line: 9138 +Added line: 5203 | +- MethodCall[@CompileTimeConstant = false, @Image = "toUpperCase", @MethodName = "toUpperCase", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1716 +Added line: 6363 +Added line: 5054 | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 7807 +Added line: 452 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "prefix", @Name = "prefix", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5174 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "name", @Empty = false, @Image = "\"name\"", @Length = 4, @LiteralText = "\"name\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 2566 +Added line: 2603 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "ROOT", @Name = "ROOT", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2108 +Added line: 4031 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Locale"] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "toString", @Overridden = true, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 6753 +Added line: 765 | +- Annotation[@SimpleName = "Override"] +Added line: 8844 +Added line: 6427 +Added line: 4828 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Override"] +Added line: 6218 +Added line: 3507 +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 9637 +- FormalParameters[@Empty = true, @Size = 0] +Added line: 459 +Added line: 78 +Added line: 9261 +Added line: 3910 +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 2677 +Added line: 7351 +Added line: 9348 +Added line: 6807 +Added line: 5324 +Added line: 7621 +Added line: 4032 +Added line: 1162 +Added line: 6001 +Added line: 619 +Added line: 5631 +Added line: 7652 +- ReturnStatement[] +Added line: 8496 +Added line: 5002 +Added line: 3169 +- MethodCall[@CompileTimeConstant = false, @Image = "toString", @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] - +- SuperExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] - +- ArgumentList[@Empty = true, @Size = 0] +Added line: 5121 +Added line: 6493 +Added line: 582 +Added line: 6579 +Added line: 9715 +Added line: 9666 +Added line: 8589 +Added line: 6758 +Added line: 9338 +Added line: 7689 +Added line: 5090 +Added line: 6239 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep455_PrimitiveTypesInPatternsInstanceofAndSwitch.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep455_PrimitiveTypesInPatternsInstanceofAndSwitch.txt index 850597a25e..914533b4f3 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep455_PrimitiveTypesInPatternsInstanceofAndSwitch.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep455_PrimitiveTypesInPatternsInstanceofAndSwitch.txt @@ -2,6 +2,10 @@ +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep455_PrimitiveTypesInPatternsInstanceofAndSwitch", @CanonicalName = "Jep455_PrimitiveTypesInPatternsInstanceofAndSwitch", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep455_PrimitiveTypesInPatternsInstanceofAndSwitch", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 5] +Added line: 1654 +Added line: 9245 +Added line: 5292 +Added line: 576 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "instanceofWithPrimitiveTypes", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- VoidType[] @@ -20,6 +24,7 @@ | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] +Added line: 7989 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -30,6 +35,7 @@ | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "b = ", @Empty = false, @Image = "\"b = \"", @Length = 4, @LiteralText = "\"b = \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "b", @Name = "b", @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " is an int", @Empty = false, @Image = "\" is an int\"", @Length = 10, @LiteralText = "\" is an int\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 3816 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] @@ -37,8 +43,11 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "42", @IntLiteral = true, @Integral = true, @LiteralText = "42", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] | +- IfStatement[@Else = false] +Added line: 28 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3492 +Added line: 5715 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -52,13 +61,14 @@ | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "i = ", @Empty = false, @Image = "\"i = \"", @Length = 4, @LiteralText = "\"i = \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " can be converted to byte", @Empty = false, @Image = "\" can be converted to byte\"", @Length = 25, @LiteralText = "\" can be converted to byte\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 2356 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "bigInt"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "bigInt", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1000", @IntLiteral = true, @Integral = true, @LiteralText = "1000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1000.0, @ValueAsFloat = 1000.0, @ValueAsInt = 1000, @ValueAsLong = 1000] +Added line: 9212 | +- IfStatement[@Else = true] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "bigInt", @Name = "bigInt", @ParenthesisDepth = 0, @Parenthesized = false] @@ -70,17 +80,22 @@ | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 9292 | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "bigInt = ", @Empty = false, @Image = "\"bigInt = \"", @Length = 9, @LiteralText = "\"bigInt = \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5220 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "bigInt", @Name = "bigInt", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 5725 | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 4650 | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 4586 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "bigInt = ", @Empty = false, @Image = "\"bigInt = \"", @Length = 9, @LiteralText = "\"bigInt = \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -88,6 +103,8 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " cannot be converted to byte", @Empty = false, @Image = "\" cannot be converted to byte\"", @Length = 28, @LiteralText = "\" cannot be converted to byte\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 8921 +Added line: 2281 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "i2"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "i2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -96,7 +113,9 @@ | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8052 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 1187 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "i2 as float: ", @Empty = false, @Image = "\"i2 as float: \"", @Length = 13, @LiteralText = "\"i2 as float: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] @@ -107,6 +126,7 @@ | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3907 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] @@ -116,8 +136,11 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i2", @Name = "i2", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] +Added line: 4723 | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 128 +Added line: 1421 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] @@ -136,28 +159,35 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "i2 as Number: ", @Empty = false, @Image = "\"i2 as Number: \"", @Length = 14, @LiteralText = "\"i2 as Number: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] - | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i2", @Name = "i2", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Number"] - | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.FLOAT] +Added line: 5003 +Added line: 6083 | | +- VariableDeclarator[@Initializer = true, @Name = "f"] +Added line: 7288 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = true, @Image = "1000.0f", @IntLiteral = false, @Integral = false, @LiteralText = "1000.0f", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1000.0, @ValueAsFloat = 1000.0, @ValueAsInt = 1000, @ValueAsLong = 1000] | +- ExpressionStatement[] +Added line: 6102 +Added line: 6707 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 7924 +Added line: 7384 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "f as byte: ", @Empty = false, @Image = "\"f as byte: \"", @Length = 11, @LiteralText = "\"f as byte: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 6389 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] +Added line: 576 | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -167,6 +197,7 @@ | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "f as int: ", @Empty = false, @Image = "\"f as int: \"", @Length = 10, @LiteralText = "\"f as int: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 5363 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] @@ -179,15 +210,21 @@ | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "f as double: ", @Empty = false, @Image = "\"f as double: \"", @Length = 13, @LiteralText = "\"f as double: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 1573 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 612 +Added line: 1540 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | +- VariableDeclarator[@Initializer = true, @Name = "d"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "d", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 769 +Added line: 713 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "1000.0d", @IntLiteral = false, @Integral = false, @LiteralText = "1000.0d", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1000.0, @ValueAsFloat = 1000.0, @ValueAsInt = 1000, @ValueAsLong = 1000] +Added line: 3900 | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -195,6 +232,7 @@ | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6503 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "d as byte: ", @Empty = false, @Image = "\"d as byte: \"", @Length = 11, @LiteralText = "\"d as byte: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "d", @Name = "d", @ParenthesisDepth = 0, @Parenthesized = false] @@ -207,11 +245,13 @@ | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6927 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "d as int: ", @Empty = false, @Image = "\"d as int: \"", @Length = 10, @LiteralText = "\"d as int: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "d", @Name = "d", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 8232 | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -221,15 +261,20 @@ | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "d as float: ", @Empty = false, @Image = "\"d as float: \"", @Length = 12, @LiteralText = "\"d as float: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 6324 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "d", @Name = "d", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.FLOAT] +Added line: 1460 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5260 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] | | +- VariableDeclarator[@Initializer = true, @Name = "ii"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "ii", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9579 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1000", @IntLiteral = true, @Integral = true, @LiteralText = "1000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1000.0, @ValueAsFloat = 1000.0, @ValueAsInt = 1000, @ValueAsLong = 1000] +Added line: 9276 | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -238,25 +283,31 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "ii as int: ", @Empty = false, @Image = "\"ii as int: \"", @Length = 11, @LiteralText = "\"ii as int: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] - | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "ii", @Name = "ii", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1895 +Added line: 8002 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- ExpressionStatement[] +Added line: 1166 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 107 +Added line: 5512 +Added line: 3437 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "ii as float: ", @Empty = false, @Image = "\"ii as float: \"", @Length = 13, @LiteralText = "\"ii as float: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "ii", @Name = "ii", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5496 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.FLOAT] | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5842 | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] @@ -264,16 +315,22 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "ii as double: ", @Empty = false, @Image = "\"ii as double: \"", @Length = 14, @LiteralText = "\"ii as double: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "ii", @Name = "ii", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Integer"] | | +- VariableDeclarator[@Initializer = true, @Name = "ii2"] +Added line: 7197 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "ii2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 4472 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "16_777_217", @IntLiteral = true, @Integral = true, @LiteralText = "16_777_217", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.6777217E7, @ValueAsFloat = 1.6777216E7, @ValueAsInt = 16777217, @ValueAsLong = 16777217] +Added line: 5726 | +- ExpressionStatement[] +Added line: 9549 +Added line: 5837 +Added line: 677 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8276 | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] @@ -281,28 +338,35 @@ | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "ii2 as float: ", @Empty = false, @Image = "\"ii2 as float: \"", @Length = 14, @LiteralText = "\"ii2 as float: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 9546 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "ii2", @Name = "ii2", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7702 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4636 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.FLOAT] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 433 | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "ii2 as double: ", @Empty = false, @Image = "\"ii2 as double: \"", @Length = 15, @LiteralText = "\"ii2 as double: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.INSTANCEOF, @ParenthesisDepth = 1, @Parenthesized = true] +Added line: 7801 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "ii2", @Name = "ii2", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] +Added line: 4126 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "primitiveTypePatternsInInstanceof", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +Added line: 1070 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7758 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "i"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -317,6 +381,7 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] +Added line: 8285 | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -328,30 +393,35 @@ | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "i cannot be coverted to byte without loss...", @Empty = false, @Image = "\"i cannot be coverted to byte without loss...\"", @Length = 44, @LiteralText = "\"i cannot be coverted to byte without loss...\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "primitiveTypePatternsInSwitch", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +Added line: 9206 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 2, @containsComment = false] +Added line: 9225 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "i"] +Added line: 481 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1000", @IntLiteral = true, @Integral = true, @LiteralText = "1000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1000.0, @ValueAsFloat = 1000.0, @ValueAsInt = 1000, @ValueAsLong = 1000] | +- SwitchStatement[@DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = true] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | +- SwitchFallthroughBranch[@Default = false] +Added line: 4474 | +- SwitchLabel[@Default = false, @PatternLabel = true] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] +Added line: 7131 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "d", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8891 | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -369,6 +439,7 @@ | +- Block[@Empty = false, @Size = 5, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 6332 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.FLOAT] | | +- VariableDeclarator[@Initializer = true, @Name = "v"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "v", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -379,18 +450,24 @@ | | +- VariableDeclarator[@Initializer = true, @Name = "f"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = false, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7771 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "v", @Name = "v", @ParenthesisDepth = 0, @Parenthesized = false] | | +- SwitchArrowBranch[@Default = false] +Added line: 4989 | | | +- SwitchLabel[@Default = false, @PatternLabel = false] +Added line: 5082 | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = true, @Image = "0f", @IntLiteral = false, @Integral = false, @LiteralText = "0f", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = true, @Image = "5f", @IntLiteral = false, @Integral = false, @LiteralText = "5f", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = true] +Added line: 5258 | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] +Added line: 3723 | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.FLOAT] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | | | +- Guard[] +Added line: 9011 | | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = true, @Image = "1f", @IntLiteral = false, @Integral = false, @LiteralText = "1f", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] @@ -412,11 +489,15 @@ | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6528 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "f = ", @Empty = false, @Image = "\"f = \"", @Length = 4, @LiteralText = "\"f = \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 9100 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7660 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 3717 | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BOOLEAN] | | +- VariableDeclarator[@Initializer = true, @Name = "b"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] @@ -431,8 +512,10 @@ | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6058 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "b was true", @Empty = false, @Image = "\"b was true\"", @Length = 10, @LiteralText = "\"b was true\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- SwitchArrowBranch[@Default = false] +Added line: 233 | +- SwitchLabel[@Default = false, @PatternLabel = false] | | +- BooleanLiteral[@CompileTimeConstant = true, @LiteralText = "false", @ParenthesisDepth = 0, @Parenthesized = false, @True = false] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -443,7 +526,11 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "b was false", @Empty = false, @Image = "\"b was false\"", @Length = 11, @LiteralText = "\"b was false\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +Added line: 6902 +Added line: 4843 +Added line: 7369 +- VoidType[] +Added line: 7063 +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] @@ -451,6 +538,7 @@ | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] | | +- ArrayTypeDim[@Varargs = false] +Added line: 99 | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 4, @containsComment = false] +- ExpressionStatement[] @@ -459,6 +547,7 @@ +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "primitiveTypePatternsInInstanceof", @MethodName = "primitiveTypePatternsInInstanceof", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 4062 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "primitiveTypePatternsInSwitch", @MethodName = "primitiveTypePatternsInSwitch", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = true, @Size = 0] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep476_ModuleImportDeclarations.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep476_ModuleImportDeclarations.txt index 4d9c0bf131..355a58887a 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep476_ModuleImportDeclarations.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep476_ModuleImportDeclarations.txt @@ -1,55 +1,144 @@ +Added line: 1544 +Added line: 9065 +- CompilationUnit[@PackageName = ""] +Added line: 960 +Added line: 3563 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.base", @ImportedSimpleName = null, @ModuleImport = true, @PackageName = null, @Static = false] +Added line: 524 +Added line: 3819 +Added line: 4646 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.desktop", @ImportedSimpleName = null, @ModuleImport = true, @PackageName = null, @Static = false] +Added line: 4686 +Added line: 5348 +Added line: 3291 +Added line: 5249 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.List", @ImportedSimpleName = "List", @ModuleImport = false, @PackageName = "java.util", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep476_ModuleImportDeclarations", @CanonicalName = "Jep476_ModuleImportDeclarations", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep476_ModuleImportDeclarations", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 7792 +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] Added line: 8461 +Added line: 3787 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +Added line: 3406 +Added line: 9385 +Added line: 5772 +Added line: 1102 +- FormalParameters[@Empty = false, @Size = 1] Added line: 9916 | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 2506 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 45 +Added line: 3229 | +- ArrayType[@ArrayDepth = 1] +Added line: 8374 +Added line: 4264 +Added line: 204 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] - | | +- ArrayDimensions[@Empty = false, @Size = 1] +Added line: 3971 +Added line: 1975 +Added line: 2742 | | +- ArrayTypeDim[@Varargs = false] | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 2772 +Added line: 3864 +Added line: 2938 +Added line: 9230 +Added line: 230 +Added line: 9477 +- Block[@Empty = false, @Size = 4, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7028 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "File"] +Added line: 8772 | +- VariableDeclarator[@Initializer = true, @Name = "f"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9148 +Added line: 4224 +Added line: 806 +Added line: 8938 | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "File"] +Added line: 6938 +Added line: 1279 +Added line: 1005 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ".", @Empty = false, @Image = "\".\"", @Length = 1, @LiteralText = "\".\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 4439 +Added line: 2584 +Added line: 4238 +Added line: 7696 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "List"] +Added line: 6366 +Added line: 2204 | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] +Added line: 2933 +Added line: 6870 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "File"] +Added line: 1060 +Added line: 9293 +Added line: 5201 | +- VariableDeclarator[@Initializer = true, @Name = "myList"] +Added line: 9598 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "myList", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 6322 +Added line: 1041 +Added line: 1588 +Added line: 9104 | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = true, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 1046 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "ArrayList"] - | | +- TypeArguments[@Diamond = true, @Empty = true, @Size = 0] +Added line: 929 +Added line: 675 +Added line: 502 +Added line: 335 | +- ArgumentList[@Empty = true, @Size = 0] +- ExpressionStatement[] +Added line: 2881 +Added line: 873 +Added line: 4879 | +- MethodCall[@CompileTimeConstant = false, @Image = "add", @MethodName = "add", @ParenthesisDepth = 0, @Parenthesized = false] - | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "myList", @Name = "myList", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2796 Added line: 8440 +Added line: 5048 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6439 +Added line: 363 +Added line: 7052 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8156 +Added line: 6941 +Added line: 6826 +Added line: 5997 +- ExpressionStatement[] +Added line: 2305 +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8784 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 8467 +Added line: 6999 +- ArgumentList[@Empty = false, @Size = 1] +Added line: 4720 +Added line: 8121 +Added line: 4844 +Added line: 2992 +Added line: 8411 +Added line: 1682 +Added line: 5568 +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 9497 +Added line: 7961 +Added line: 425 +Added line: 4487 +Added line: 4239 +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "myList = ", @Empty = false, @Image = "\"myList = \"", @Length = 9, @LiteralText = "\"myList = \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 1065 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "myList", @Name = "myList", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 832 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep477_ImplicitlyDeclaredClassesAndInstanceMainMethods1.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep477_ImplicitlyDeclaredClassesAndInstanceMainMethods1.txt index 1ea00bd0fb..e16ee3ce30 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep477_ImplicitlyDeclaredClassesAndInstanceMainMethods1.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep477_ImplicitlyDeclaredClassesAndInstanceMainMethods1.txt @@ -1,67 +1,156 @@ +- CompilationUnit[@PackageName = ""] +Added line: 6887 +Added line: 3651 +Added line: 9123 +Added line: 825 +Added line: 9274 +- ImplicitClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "", @CanonicalName = null, @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = true, @UnnamedToplevelClass = true, @Visibility = Visibility.V_PACKAGE] +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7741 +Added line: 5919 +Added line: 8031 +Added line: 2821 +Added line: 9711 +- ClassBody[@Empty = false, @Size = 1] +Added line: 7960 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 4239 +Added line: 7663 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +Added line: 3335 +Added line: 4403 +- Block[@Empty = false, @Size = 7, @containsComment = false] +- ExpressionStatement[] +Added line: 3937 +Added line: 6731 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5558 +Added line: 2849 +Added line: 4959 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7571 +Added line: 8705 +Added line: 6284 +Added line: 3788 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 6502 +Added line: 264 +Added line: 7865 | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 6794 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello World", @Empty = false, @Image = "\"Hello World\"", @Length = 11, @LiteralText = "\"Hello World\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 23 +Added line: 5301 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 8599 +Added line: 4291 +Added line: 8545 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello, World!", @Empty = false, @Image = "\"Hello, World!\"", @Length = 13, @LiteralText = "\"Hello, World!\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 8267 +Added line: 143 +Added line: 217 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 7796 | +- VariableDeclarator[@Initializer = true, @Name = "name"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "name", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "readln", @MethodName = "readln", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7570 +Added line: 4088 +Added line: 1586 +Added line: 3633 +Added line: 6533 +Added line: 2858 +Added line: 4368 | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Please enter your name: ", @Empty = false, @Image = "\"Please enter your name: \"", @Length = 24, @LiteralText = "\"Please enter your name: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "print", @MethodName = "print", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 2862 +Added line: 2682 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Pleased to meet you, ", @Empty = false, @Image = "\"Pleased to meet you, \"", @Length = 21, @LiteralText = "\"Pleased to meet you, \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 1572 +Added line: 6819 +Added line: 727 +Added line: 8966 +Added line: 975 +Added line: 2666 +Added line: 5021 +Added line: 8121 +Added line: 1162 +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6819 +Added line: 7254 +Added line: 6505 +Added line: 5863 +Added line: 5038 | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "name", @Name = "name", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7459 +Added line: 9157 +Added line: 8639 +Added line: 5988 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] +Added line: 49 +Added line: 7125 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1983 | +- VariableDeclarator[@Initializer = true, @Name = "authors"] +Added line: 1461 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "authors", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 9727 +Added line: 4959 | +- MethodCall[@CompileTimeConstant = false, @Image = "of", @MethodName = "of", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6142 +Added line: 4969 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "List"] | +- ArgumentList[@Empty = false, @Size = 6] +Added line: 9103 +Added line: 2568 +Added line: 6444 +Added line: 3659 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "James", @Empty = false, @Image = "\"James\"", @Length = 5, @LiteralText = "\"James\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Bill", @Empty = false, @Image = "\"Bill\"", @Length = 4, @LiteralText = "\"Bill\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5743 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Guy", @Empty = false, @Image = "\"Guy\"", @Length = 3, @LiteralText = "\"Guy\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Alex", @Empty = false, @Image = "\"Alex\"", @Length = 4, @LiteralText = "\"Alex\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Dan", @Empty = false, @Image = "\"Dan\"", @Length = 3, @LiteralText = "\"Dan\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] - | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Gavin", @Empty = false, @Image = "\"Gavin\"", @Length = 5, @LiteralText = "\"Gavin\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ForeachStatement[] +Added line: 1298 +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VariableDeclarator[@Initializer = false, @Name = "authorName"] +Added line: 1600 +Added line: 9780 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = true, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "authorName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 4918 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "authors", @Name = "authors", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8148 +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 5576 +- ExpressionStatement[] - +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1174 +- ArgumentList[@Empty = false, @Size = 1] +Added line: 3994 +Added line: 127 +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.ADD, @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "authorName", @Name = "authorName", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6973 +Added line: 4693 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ": ", @Empty = false, @Image = "\": \"", @Length = 2, @LiteralText = "\": \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 6765 +- MethodCall[@CompileTimeConstant = false, @Image = "length", @MethodName = "length", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4027 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "authorName", @Name = "authorName", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2136 +Added line: 6385 +- ArgumentList[@Empty = true, @Size = 0] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep477_ImplicitlyDeclaredClassesAndInstanceMainMethods2.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep477_ImplicitlyDeclaredClassesAndInstanceMainMethods2.txt index c2620dfe0a..00f4bfd8ca 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep477_ImplicitlyDeclaredClassesAndInstanceMainMethods2.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep477_ImplicitlyDeclaredClassesAndInstanceMainMethods2.txt @@ -1,63 +1,152 @@ +Added line: 3591 +- CompilationUnit[@PackageName = ""] +Added line: 265 +Added line: 6881 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.Arrays", @ImportedSimpleName = "Arrays", @ModuleImport = false, @PackageName = "java.util", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.stream.Collectors", @ImportedSimpleName = "Collectors", @ModuleImport = false, @PackageName = "java.util.stream", @Static = false] +Added line: 7771 +Added line: 605 +Added line: 8744 +Added line: 6573 +- ImplicitClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "", @CanonicalName = null, @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = true, @UnnamedToplevelClass = true, @Visibility = Visibility.V_PACKAGE] +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - +- ClassBody[@Empty = false, @Size = 4] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "greeting", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] +Added line: 8075 +Added line: 5027 +Added line: 9867 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9792 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 9465 | +- FormalParameters[@Empty = true, @Size = 0] +Added line: 3251 +Added line: 2996 | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 525 +Added line: 220 +Added line: 7661 +Added line: 8509 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello, World! (method)", @Empty = false, @Image = "\"Hello, World! (method)\"", @Length = 22, @LiteralText = "\"Hello, World! (method)\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5986 +Added line: 3740 +Added line: 3743 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2969 +Added line: 9561 +Added line: 9949 +Added line: 6279 +Added line: 991 +Added line: 4504 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 8306 | +- VariableDeclarator[@Initializer = true, @Name = "greetingText"] +Added line: 436 Added line: 7339 | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello, World! (text)", @Empty = false, @Image = "\"Hello, World! (text)\"", @Length = 20, @LiteralText = "\"Hello, World! (text)\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 4066 +Added line: 2738 +Added line: 5196 +Added line: 612 +Added line: 7403 +Added line: 5992 +Added line: 6010 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] +Added line: 5195 +Added line: 4618 +Added line: 4094 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 7656 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 6944 +Added line: 481 | +- VariableDeclarator[@Initializer = true, @Name = "greetingText2"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "greetingText2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] - | +- MethodCall[@CompileTimeConstant = false, @Image = "collect", @MethodName = "collect", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7623 +Added line: 3358 | +- MethodCall[@CompileTimeConstant = false, @Image = "stream", @MethodName = "stream", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4420 +Added line: 6482 +Added line: 3679 +Added line: 6576 +Added line: 6871 +Added line: 5141 | | +- MethodCall[@CompileTimeConstant = false, @Image = "asList", @MethodName = "asList", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 6016 | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Arrays"] | | | +- ArgumentList[@Empty = false, @Size = 3] +Added line: 1701 +Added line: 2175 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello", @Empty = false, @Image = "\"Hello\"", @Length = 5, @LiteralText = "\"Hello\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 8592 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "World!", @Empty = false, @Image = "\"World!\"", @Length = 6, @LiteralText = "\"World!\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 714 +Added line: 1155 | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "(with imports)", @Empty = false, @Image = "\"(with imports)\"", @Length = 14, @LiteralText = "\"(with imports)\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 8226 Added line: 1922 +Added line: 7787 +Added line: 1558 +Added line: 3510 | +- ArgumentList[@Empty = false, @Size = 1] Added line: 1043 | +- MethodCall[@CompileTimeConstant = false, @Image = "joining", @MethodName = "joining", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Collectors"] +Added line: 3226 +Added line: 3059 +Added line: 8560 +Added line: 5423 | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ", ", @Empty = false, @Image = "\", \"", @Length = 2, @LiteralText = "\", \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 8656 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +- VoidType[] +Added line: 4841 +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 3, @containsComment = false] +- ExpressionStatement[] +Added line: 6894 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] Added line: 4485 -Added line: 6975 +Added line: 9356 +Added line: 2986 +Added line: 3824 +Added line: 802 +Added line: 8883 +Added line: 5474 | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2004 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 2632 +Added line: 3653 +Added line: 1123 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] | +- ArgumentList[@Empty = false, @Size = 1] | +- MethodCall[@CompileTimeConstant = false, @Image = "greeting", @MethodName = "greeting", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4703 | +- ArgumentList[@Empty = true, @Size = 0] - +- ExpressionStatement[] +Added line: 8637 +Added line: 2405 +Added line: 1664 +Added line: 4220 +Added line: 6297 | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4201 +Added line: 6959 +Added line: 7114 +Added line: 6009 | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "greetingText", @Name = "greetingText", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 192 +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +- ArgumentList[@Empty = false, @Size = 1] +Added line: 5182 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "greetingText2", @Name = "greetingText2", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8334 +Added line: 6699 +Added line: 9643 +Added line: 3537 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.txt index a796c0b585..e36f7977d9 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.txt @@ -1,4 +1,6 @@ +Added line: 3447 +- CompilationUnit[@PackageName = ""] +Added line: 5349 +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.math.BigInteger", @ImportedSimpleName = "BigInteger", @ModuleImport = false, @PackageName = "java.math", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.nio.charset.StandardCharsets", @ImportedSimpleName = "StandardCharsets", @ModuleImport = false, @PackageName = "java.nio.charset", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.security.cert.Certificate", @ImportedSimpleName = "Certificate", @ModuleImport = false, @PackageName = "java.security.cert", @Static = false] @@ -11,13 +13,13 @@ | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Old", @Name = "Old", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] +Added line: 3466 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | +- ArgumentList[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$PositiveBigInteger", @CanonicalName = "Jep482_FlexibleConstructorBodies.PositiveBigInteger", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PositiveBigInteger", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "BigInteger"] | +- ClassBody[@Empty = false, @Size = 1] @@ -35,9 +37,12 @@ | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | | +- ThrowStatement[] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 7255 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] +Added line: 8576 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "non-positive value", @Empty = false, @Image = "\"non-positive value\"", @Length = 18, @LiteralText = "\"non-positive value\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 8532 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] @@ -45,30 +50,35 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "valueAsString", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "valueOf", @MethodName = "valueOf", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3040 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] +Added line: 8176 | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "value", @Name = "value", @ParenthesisDepth = 0, @Parenthesized = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "valueAsString", @Name = "valueAsString", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$Super", @CanonicalName = "Jep482_FlexibleConstructorBodies.Super", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Super", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 3936 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Super", @Name = "Super", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 391 | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] - | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | +- ArrayTypeDim[@Varargs = false] | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "bytes", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +Added line: 2057 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$Sub", @CanonicalName = "Jep482_FlexibleConstructorBodies.Sub", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Sub", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Super"] +Added line: 4404 | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Sub", @Name = "Sub", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] @@ -77,13 +87,19 @@ | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Certificate"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "certificate", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 481 +Added line: 3976 | +- Block[@Empty = false, @Size = 4, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "publicKey"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "publicKey", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5661 | | +- MethodCall[@CompileTimeConstant = false, @Image = "getPublicKey", @MethodName = "getPublicKey", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5491 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "certificate", @Name = "certificate", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 646 +Added line: 8354 | | +- ArgumentList[@Empty = true, @Size = 0] | +- IfStatement[@Else = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] @@ -91,17 +107,28 @@ | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ThrowStatement[] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] +Added line: 749 | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "null certificate", @Empty = false, @Image = "\"null certificate\"", @Length = 16, @LiteralText = "\"null certificate\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 9478 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | +- ArrayType[@ArrayDepth = 1] +Added line: 2135 +Added line: 319 +Added line: 9475 +Added line: 4212 +Added line: 6795 | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | +- ArrayTypeDim[@Varargs = false] +Added line: 7619 | | +- VariableDeclarator[@Initializer = true, @Name = "byteArray"] | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "byteArray", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 8171 +Added line: 5727 +Added line: 1706 | | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "publicKey", @Name = "publicKey", @ParenthesisDepth = 0, @Parenthesized = false] | | +- SwitchArrowBranch[@Default = false] @@ -117,6 +144,7 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "UTF_8", @Name = "UTF_8", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3983 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "StandardCharsets"] | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false, @PatternLabel = true] @@ -124,6 +152,7 @@ | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "DSAPublicKey"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "dsaKey", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5371 | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getBytes", @MethodName = "getBytes", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "toString", @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "dsaKey", @Name = "dsaKey", @ParenthesisDepth = 0, @Parenthesized = false] @@ -132,17 +161,21 @@ | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "UTF_8", @Name = "UTF_8", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "StandardCharsets"] +Added line: 7235 | | +- SwitchArrowBranch[@Default = true] | | +- SwitchLabel[@Default = true, @PatternLabel = false] +Added line: 7971 | | +- ArrayAllocation[@ArrayDepth = 1, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArrayType[@ArrayDepth = 1] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] +Added line: 9089 | | +- ArrayDimensions[@Empty = false, @Size = 1] | | +- ArrayDimExpr[@Varargs = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "byteArray", @Name = "byteArray", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4632 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$F", @CanonicalName = "Jep482_FlexibleConstructorBodies.F", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "F", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassBody[@Empty = true, @Size = 0] @@ -153,68 +186,85 @@ | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 2] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 8440 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "F"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "f1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "F"] +Added line: 4064 +Added line: 2975 | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "f2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] - +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$Sub2", @CanonicalName = "Jep482_FlexibleConstructorBodies.Sub2", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Sub2", @Static = false, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 57 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Super2"] | +- ClassBody[@Empty = false, @Size = 1] +Added line: 6066 | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Sub2", @Name = "Sub2", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = true] +Added line: 3224 +Added line: 1631 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] - | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = true] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5693 | | +- VariableDeclarator[@Initializer = true, @Name = "f"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "F"] | | +- ArgumentList[@Empty = true, @Size = 0] | +- ExplicitConstructorInvocation[@ArgumentCount = 2, @MethodName = "new", @Qualified = false, @Super = true, @This = false] +Added line: 6148 | +- ArgumentList[@Empty = false, @Size = 2] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 5008 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$Range", @CanonicalName = "Jep482_FlexibleConstructorBodies.Range", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Range", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lo", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 3378 | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "hi", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] +Added line: 8838 | +- RecordBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 3, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Range", @Name = "Range", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] +Added line: 8785 | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 3] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 5595 +Added line: 4360 +Added line: 9349 | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "lo", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 5025 | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "hi", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "maxDistance", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +Added line: 5670 | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- IfStatement[@Else = false] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4429 +Added line: 7211 | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ThrowStatement[] @@ -223,62 +273,89 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 73 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArgumentList[@Empty = false, @Size = 3] +Added line: 7227 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "(%d,%d)", @Empty = false, @Image = "\"(%d,%d)\"", @Length = 7, @LiteralText = "\"(%d,%d)\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 5032 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] - | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] | +- IfStatement[@Else = false] +Added line: 4320 | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7294 | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.SUB, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "maxDistance", @Name = "maxDistance", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ThrowStatement[] +Added line: 3072 +Added line: 723 | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] | | +- ArgumentList[@Empty = false, @Size = 1] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 3495 | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8372 | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] | | +- ArgumentList[@Empty = false, @Size = 4] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "(%d,%d,%d", @Empty = false, @Image = "\"(%d,%d,%d\"", @Length = 9, @LiteralText = "\"(%d,%d,%d\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 4738 +Added line: 7135 | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "maxDistance", @Name = "maxDistance", @ParenthesisDepth = 0, @Parenthesized = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 2, @MethodName = "new", @Qualified = false, @Super = false, @This = true] | +- ArgumentList[@Empty = false, @Size = 2] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 8742 +Added line: 3777 | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 7538 +Added line: 1301 +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$Color", @CanonicalName = "Jep482_FlexibleConstructorBodies.Color", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Color", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] +Added line: 9161 | +- EnumBody[@Empty = false, @SeparatorSemi = true, @Size = 4, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] +Added line: 3594 | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BLUE", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Unnamed = false, @Visibility = Visibility.V_PUBLIC] | | +- ArgumentList[@Empty = false, @Size = 1] +Added line: 547 | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +Added line: 6668 | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Image = "Color", @Name = "Color", @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @containsComment = false] | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Image = "Color", @Name = "Color", @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @containsComment = false] +Added line: 331 | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 3347 | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 2, @containsComment = false] +Added line: 1019 | | +- IfStatement[@Else = false] +Added line: 7586 +Added line: 1587 +Added line: 3787 | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.LT, @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 1298 | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | | | +- ThrowStatement[] | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] | | | +- ArgumentList[@Empty = true, @Size = 0] - | | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = false, @This = true] +Added line: 1207 +Added line: 5022 +Added line: 4103 | | +- ArgumentList[@Empty = true, @Size = 0] | +- EmptyDeclaration[] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$EarlyAssignmentToFieldsSuper", @CanonicalName = "Jep482_FlexibleConstructorBodies.EarlyAssignmentToFieldsSuper", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "EarlyAssignmentToFieldsSuper", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] @@ -286,13 +363,16 @@ | +- ClassBody[@Empty = false, @Size = 2] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "EarlyAssignmentToFieldsSuper", @Name = "EarlyAssignmentToFieldsSuper", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1508 | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] | | +- MethodCall[@CompileTimeConstant = false, @Image = "overriddenMethod", @MethodName = "overriddenMethod", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] +Added line: 8553 | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "overriddenMethod", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 9579 | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -304,15 +384,18 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "hello", @Empty = false, @Image = "\"hello\"", @Length = 5, @LiteralText = "\"hello\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$EarlyAssignmentToFieldsSub", @CanonicalName = "Jep482_FlexibleConstructorBodies.EarlyAssignmentToFieldsSub", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "EarlyAssignmentToFieldsSub", @Static = true, @TopLevel = false, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PUBLIC] +Added line: 6059 +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- ExtendsList[@Empty = false, @Size = 1] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "EarlyAssignmentToFieldsSuper"] +- ClassBody[@Empty = false, @Size = 3] +Added line: 4704 +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = false, @Name = "x"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] +Added line: 5029 +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "EarlyAssignmentToFieldsSub", @Name = "EarlyAssignmentToFieldsSub", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = true] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- FormalParameters[@Empty = false, @Size = 1] @@ -324,8 +407,9 @@ | +- ExpressionStatement[] | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] | | +- FieldAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] +Added line: 110 +Added line: 8873 | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "overriddenMethod", @Overridden = true, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] @@ -335,10 +419,15 @@ +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 102 +Added line: 1321 +- ExpressionStatement[] +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] +Added line: 2843 +- ArgumentList[@Empty = false, @Size = 1] +Added line: 529 +Added line: 8699 +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java8/UnnamedVariable.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java8/UnnamedVariable.txt index ec85c473a2..2b0dd836ac 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java8/UnnamedVariable.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java8/UnnamedVariable.txt @@ -1,24 +1,113 @@ +Added line: 9836 +- CompilationUnit[@PackageName = ""] +Added line: 7630 +Added line: 5237 +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "UnnamedVariable", @CanonicalName = "UnnamedVariable", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "UnnamedVariable", @Static = false, @TopLevel = true, @UnnamedToplevelClass = false, @Visibility = Visibility.V_PACKAGE] +Added line: 2183 +Added line: 1052 +Added line: 3707 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1104 +Added line: 3617 +Added line: 4516 +Added line: 3829 +Added line: 3156 +Added line: 3199 +Added line: 2760 +Added line: 1780 +Added line: 4422 +Added line: 4250 +Added line: 9056 +Added line: 1274 +Added line: 3414 +Added line: 4254 +Added line: 2543 +Added line: 1122 +- ClassBody[@Empty = false, @Size = 2] +Added line: 6581 +Added line: 40 +Added line: 7655 +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "method", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 8103 +Added line: 2762 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] +Added line: 3420 +Added line: 9456 +Added line: 986 | +- FormalParameters[@Empty = true, @Size = 0] - | +- Block[@Empty = false, @Size = 1, @containsComment = false] +Added line: 4606 +Added line: 9461 +Added line: 23 | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 2030 +Added line: 4493 +Added line: 2154 +Added line: 2741 +Added line: 8831 +Added line: 4370 +Added line: 2622 +Added line: 8292 +Added line: 9244 +Added line: 1734 +Added line: 4334 +Added line: 6463 +Added line: 3845 +Added line: 5696 +Added line: 1372 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "_"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "method2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] +Added line: 1660 +Added line: 3449 +Added line: 4116 +Added line: 294 +Added line: 9525 +Added line: 4214 +Added line: 5289 +Added line: 3040 +Added line: 5390 +Added line: 7346 +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] +Added line: 4696 +Added line: 6453 +Added line: 7167 +Added line: 5483 +Added line: 8019 +Added line: 7560 +Added line: 5955 +Added line: 6080 | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] +Added line: 1207 +Added line: 4687 +Added line: 5724 | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +Added line: 1130 | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +Added line: 7671 +Added line: 622 +Added line: 4965 +Added line: 6948 | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = true, @Size = 0, @containsComment = false] +Added line: 7501 +Added line: 7509 +Added line: 9770 +Added line: 5494 +Added line: 9323 +Added line: 4216 +Added line: 3553 +Added line: 6425 +Added line: 4466 +Added line: 1171 +Added line: 2599 +Added line: 862 +Added line: 2359 +Added line: 4614 +Added line: 2564 +Added line: 8081 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java9/jdk9_module_info.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java9/jdk9_module_info.txt index ded66a2a8b..13672f4a01 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java9/jdk9_module_info.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java9/jdk9_module_info.txt @@ -1,23 +1,112 @@ +Added line: 6839 +Added line: 3454 +Added line: 7075 +Added line: 2150 +- CompilationUnit[@PackageName = ""] +Added line: 5264 +Added line: 5949 Added line: 8515 +Added line: 4270 +Added line: 4184 +Added line: 6242 +Added line: 7697 +Added line: 4878 +Added line: 9032 +- ModuleDeclaration[@Name = "com.example.foo", @Open = true] +Added line: 4336 +Added line: 9605 +Added line: 6513 +Added line: 2335 +Added line: 1588 +Added line: 8552 +Added line: 3173 +Added line: 540 +Added line: 3046 +Added line: 684 +Added line: 1251 +- ModuleName[@Name = "com.example.foo"] +Added line: 4157 +Added line: 1757 +Added line: 5003 +Added line: 920 +Added line: 2929 +Added line: 5849 +Added line: 618 +Added line: 9590 +Added line: 785 +Added line: 6916 +Added line: 4646 +Added line: 351 +Added line: 1412 | +- ModuleName[@Name = "com.example.foo.http"] | +- ModuleName[@Name = "java.logging"] +Added line: 4893 +- ModuleRequiresDirective[@Static = false, @Transitive = true] +Added line: 6801 +Added line: 3977 +Added line: 7699 Added line: 1714 - | +- ModuleName[@Name = "com.example.foo.network"] +Added line: 4531 +Added line: 5381 +Added line: 2688 +Added line: 2869 +Added line: 5349 +Added line: 3266 +Added line: 2137 +Added line: 3348 +Added line: 3099 +- ModuleExportsDirective[@PackageName = "com.example.foo.bar"] +Added line: 7649 +Added line: 8657 +Added line: 9570 +Added line: 9731 +Added line: 8732 +- ModuleExportsDirective[@PackageName = "com.example.foo.internal"] +Added line: 2082 +Added line: 6871 +Added line: 347 +Added line: 9088 +Added line: 8907 +Added line: 1159 | +- ModuleName[@Name = "com.example.foo.probe"] +Added line: 383 +Added line: 909 +Added line: 3618 +Added line: 4579 +Added line: 355 +Added line: 7718 +Added line: 1614 +- ModuleUsesDirective[] +Added line: 6874 +Added line: 2200 | +- ClassType[@FullyQualified = true, @PackageQualifier = "com.example.foo.spi", @SimpleName = "Intf"] +Added line: 3654 +- ModuleProvidesDirective[] +Added line: 5422 +Added line: 4702 +Added line: 5229 +Added line: 7723 +Added line: 7637 +Added line: 1452 +Added line: 2251 | +- ClassType[@FullyQualified = true, @PackageQualifier = "com.example.foo.spi", @SimpleName = "Intf"] +Added line: 6368 | +- ClassType[@FullyQualified = true, @PackageQualifier = "com.example.foo", @SimpleName = "Impl"] -Added line: 1214 +- ModuleProvidesDirective[] +Added line: 3426 +Added line: 5864 +Added line: 269 +Added line: 7182 +Added line: 7116 +Added line: 5681 +- ClassType[@FullyQualified = true, @PackageQualifier = "com.example.foo.spi", @SimpleName = "Intf2"] +Added line: 9739 +Added line: 9141 +- ClassType[@FullyQualified = true, @PackageQualifier = "com.example.foo", @SimpleName = "Impl"] +Added line: 1220 Added line: 8194 +Added line: 9864 +Added line: 2062 +Added line: 2182 Added line: 8167 +Added line: 2930 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java9/jdk9_module_info_with_annot.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java9/jdk9_module_info_with_annot.txt index 77f361d53e..96c9085967 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java9/jdk9_module_info_with_annot.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java9/jdk9_module_info_with_annot.txt @@ -1,12 +1,101 @@ +Added line: 362 +Added line: 8973 +Added line: 8812 +Added line: 587 +Added line: 7521 +Added line: 5879 +Added line: 2217 +Added line: 4832 +Added line: 6077 +Added line: 5375 +Added line: 3724 +Added line: 9718 +- CompilationUnit[@PackageName = ""] +Added line: 8372 +Added line: 2373 +Added line: 8301 +Added line: 8602 +Added line: 8093 +- ModuleDeclaration[@Name = "jdk.pack", @Open = false] +Added line: 9009 +Added line: 3956 +Added line: 8895 +Added line: 6860 +Added line: 7261 +Added line: 9256 +Added line: 2027 +Added line: 9237 +Added line: 63 +Added line: 288 +- Annotation[@SimpleName = "Deprecated"] Added line: 7140 +Added line: 6818 +Added line: 6073 +Added line: 3407 +Added line: 6900 +Added line: 8124 +Added line: 2439 +Added line: 632 +Added line: 3548 +Added line: 906 +Added line: 1825 | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Deprecated"] +Added line: 1645 +Added line: 7324 +Added line: 1510 +Added line: 4045 +Added line: 164 +Added line: 605 +Added line: 3955 Added line: 8143 +Added line: 2801 | +- AnnotationMemberList[@Empty = false, @Size = 2] +Added line: 8496 +Added line: 9095 +Added line: 5036 +Added line: 4517 +Added line: 4923 | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "11", @Empty = false, @Image = "\"11\"", @Length = 2, @LiteralText = "\"11\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +Added line: 120 +Added line: 7444 +Added line: 6050 Added line: 9659 +Added line: 9622 +Added line: 6247 +Added line: 7781 +Added line: 2776 +Added line: 84 +Added line: 7240 +Added line: 9807 +Added line: 3255 +Added line: 5586 +Added line: 713 +Added line: 3183 +Added line: 219 +Added line: 1197 +Added line: 2787 +Added line: 8634 | +- MemberValuePair[@Image = "forRemoval", @Name = "forRemoval", @Shorthand = false] +Added line: 664 +Added line: 7964 +Added line: 256 +Added line: 5527 +Added line: 9090 +Added line: 335 +Added line: 4106 +Added line: 1410 +Added line: 5055 +Added line: 2702 +Added line: 2190 | +- BooleanLiteral[@CompileTimeConstant = true, @LiteralText = "true", @ParenthesisDepth = 0, @Parenthesized = false, @True = true] +Added line: 1857 +Added line: 9892 +Added line: 2336 +- ModuleName[@Name = "jdk.pack"] +Added line: 9365 +Added line: 1391 +Added line: 6053 +Added line: 2484 +Added line: 837 +Added line: 4282 +Added line: 436 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/SimpleClass.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/SimpleClass.txt index 5413ce445a..71df2d6b1e 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/SimpleClass.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/SimpleClass.txt @@ -1,23 +1,112 @@ -Added line: 7590 +Added line: 3566 +Added line: 262 +Added line: 6098 +Added line: 4320 [Image] or [Truncated image[ Bcol Ecol +Added line: 3600 +Added line: 4720 +Added line: 6665 L5 +Added line: 3789 +Added line: 3495 [public] 1 7 +Added line: 7249 [class] 8 13 +Added line: 5409 +Added line: 7796 +Added line: 2822 +Added line: 6702 +Added line: 454 [SimpleClass] 14 25 +Added line: 170 +Added line: 6536 [{] 26 27 +Added line: 6773 L6 [private] 5 12 +Added line: 2144 +Added line: 7987 +Added line: 2207 +Added line: 9998 +Added line: 4323 +Added line: 226 +Added line: 9643 +Added line: 8452 +Added line: 2729 [int] 13 16 +Added line: 8976 +Added line: 3099 +Added line: 6307 +Added line: 4596 +Added line: 981 Added line: 7309 +Added line: 851 +Added line: 3164 +Added line: 4025 +Added line: 9497 +Added line: 8937 +Added line: 2055 +Added line: 7190 +Added line: 4090 +Added line: 2460 L7 -Added line: 5624 +Added line: 1115 +Added line: 9237 +Added line: 9089 +Added line: 3280 +Added line: 7080 +Added line: 4063 +Added line: 9325 +Added line: 8381 +Added line: 8237 +Added line: 6920 +Added line: 5852 +Added line: 6601 +Added line: 8238 +Added line: 670 [private] 5 12 +Added line: 4753 +Added line: 4695 +Added line: 9258 +Added line: 73 +Added line: 8452 +Added line: 3985 +Added line: 4685 +Added line: 372 +Added line: 8604 +Added line: 3439 [void] 13 17 +Added line: 7854 +Added line: 2356 +Added line: 9289 +Added line: 2757 +Added line: 9657 [method] 18 24 [(] 24 25 [)] 25 26 +Added line: 585 +Added line: 3038 [{] 27 28 Added line: 715 +Added line: 3368 +Added line: 6097 +Added line: 6174 Added line: 95 +Added line: 5164 +Added line: 1904 +Added line: 7604 +Added line: 6743 [}] 1 2 +Added line: 3537 +Added line: 7739 +Added line: 5125 EOF +Added line: 4352 +Added line: 8518 +Added line: 4036 +Added line: 6553 +Added line: 1437 +Added line: 9557 +Added line: 9598 +Added line: 3123 +Added line: 4338 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/StringTemplateReduction.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/StringTemplateReduction.txt index 374b95fd54..9fce3cf75f 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/StringTemplateReduction.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/StringTemplateReduction.txt @@ -1,47 +1,136 @@ +Added line: 530 [Image] or [Truncated image[ Bcol Ecol +Added line: 7006 +Added line: 22 L13 +Added line: 6653 +Added line: 2971 +Added line: 5041 [class] 1 6 +Added line: 2432 +Added line: 596 +Added line: 324 +Added line: 4401 [StringTemplateReduction] 7 30 +Added line: 2098 [{] 31 32 L14 +Added line: 1676 +Added line: 2546 [boolean] 5 12 +Added line: 8764 +Added line: 997 +Added line: 6542 +Added line: 5794 +Added line: 8041 +Added line: 2333 [isRuleName] 13 23 +Added line: 3186 +Added line: 421 +Added line: 7465 +Added line: 576 +Added line: 4216 +Added line: 394 [(] 23 24 +Added line: 6789 +Added line: 67 [Object] 24 30 +Added line: 5970 +Added line: 1090 +Added line: 2219 [o] 31 32 +Added line: 2024 +Added line: 5689 +Added line: 3293 +Added line: 5812 +Added line: 366 +Added line: 7700 [)] 32 33 +Added line: 9209 [{] 34 35 +Added line: 396 +Added line: 288 L15 +Added line: 7196 +Added line: 4912 +Added line: 1719 [if] 9 11 [(] 12 13 +Added line: 4357 +Added line: 111 [o] 13 14 +Added line: 3241 +Added line: 3720 [!=] 15 17 +Added line: 6517 [null] 18 22 +Added line: 8204 +Added line: 3043 +Added line: 9007 +Added line: 7819 [)] 22 23 - [{] 24 25 +Added line: 132 +Added line: 2844 L16 +Added line: 5933 +Added line: 7349 [return] 13 19 - [true] 20 24 +Added line: 2966 +Added line: 5823 +Added line: 6237 +Added line: 9912 +Added line: 8979 +Added line: 86 +Added line: 582 +Added line: 86 L17 [}] 9 10 +Added line: 6646 +Added line: 4341 [else] 11 15 +Added line: 9244 +Added line: 973 +Added line: 8775 +Added line: 7612 +Added line: 9491 [if] 16 18 +Added line: 6027 +Added line: 3019 [(] 19 20 [o] 20 21 [.] 21 22 [equals] 22 28 +Added line: 38 [(] 28 29 +Added line: 1621 ["ref"] 29 34 +Added line: 9882 [)] 34 35 +Added line: 6806 +Added line: 9532 [)] 35 36 +Added line: 3259 [{] 37 38 L18 [return] 13 19 +Added line: 8692 +Added line: 7246 [false] 20 25 +Added line: 47 +Added line: 1417 +Added line: 9487 +Added line: 2743 +Added line: 157 +Added line: 5541 L19 +Added line: 5163 +Added line: 2593 +Added line: 6095 [}] 9 10 L20 - [}] 5 6 +Added line: 4457 +Added line: 4579 L21 [}] 1 2 EOF +Added line: 5479 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/StringTemplateReduction2.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/StringTemplateReduction2.txt index 1e40f80a18..225b7be30c 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/StringTemplateReduction2.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/StringTemplateReduction2.txt @@ -1,20 +1,109 @@ +Added line: 5325 +Added line: 4896 +Added line: 2978 +Added line: 8342 +Added line: 3043 [Image] or [Truncated image[ Bcol Ecol +Added line: 4442 L12 +Added line: 9545 +Added line: 106 +Added line: 5275 +Added line: 6263 +Added line: 786 +Added line: 1702 +Added line: 5312 +Added line: 682 +Added line: 1742 +Added line: 1119 +Added line: 6997 [class] 1 6 +Added line: 4757 +Added line: 7768 +Added line: 5326 +Added line: 3021 +Added line: 9546 +Added line: 6434 +Added line: 9106 +Added line: 1700 +Added line: 6578 [StringTemplateReduction2] 7 31 +Added line: 8498 +Added line: 3062 +Added line: 1694 +Added line: 4203 +Added line: 992 +Added line: 7676 +Added line: 7111 +Added line: 8715 +Added line: 5735 +Added line: 2945 +Added line: 7756 +Added line: 6844 +Added line: 3237 +Added line: 9206 +Added line: 3709 +Added line: 9838 +Added line: 7516 +Added line: 7990 +Added line: 552 +Added line: 2166 +Added line: 5385 +Added line: 7647 +Added line: 8379 +Added line: 4310 +Added line: 1772 +Added line: 6022 +Added line: 1089 +Added line: 9868 [{] 32 33 -L13 +Added line: 3578 +Added line: 3825 [{] 5 6 +Added line: 3818 +Added line: 1563 L14 +Added line: 8833 +Added line: 6528 +Added line: 8999 +Added line: 960 +Added line: 1116 +Added line: 2577 +Added line: 8850 +Added line: 9945 +Added line: 3943 +Added line: 4441 +Added line: 4283 [assert] 9 15 +Added line: 8737 +Added line: 7149 +Added line: 8293 [foo] 16 19 +Added line: 9691 [.] 19 20 +Added line: 2761 [equals] 20 26 [(] 26 27 [bar] 27 30 +Added line: 9132 [)] 30 31 +Added line: 5798 +Added line: 2591 +Added line: 8036 +Added line: 4573 L15 +Added line: 9194 [}] 5 6 +Added line: 236 L16 - [}] 1 2 +Added line: 8460 +Added line: 6227 +Added line: 8105 +Added line: 2609 +Added line: 4948 +Added line: 7884 +Added line: 3405 +Added line: 8757 +Added line: 2017 +Added line: 2145 EOF diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/discardedElements_ignore_annots.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/discardedElements_ignore_annots.txt index 986058bdf0..3331810958 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/discardedElements_ignore_annots.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/discardedElements_ignore_annots.txt @@ -1,34 +1,123 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 7577 +Added line: 1637 +Added line: 9970 +Added line: 2777 +Added line: 4218 +Added line: 4441 +Added line: 4563 +Added line: 5292 +Added line: 7143 +Added line: 7621 +Added line: 7153 +Added line: 9594 +Added line: 2936 +Added line: 6068 +Added line: 3825 +Added line: 1905 L16 +Added line: 5815 +Added line: 3692 +Added line: 7423 [public] 1 7 [class] 8 13 +Added line: 3711 +Added line: 9885 [Foo] 14 17 [{] 18 19 L21 +Added line: 350 +Added line: 9288 +Added line: 6715 [x] 9 10 [{] 5 6 +Added line: 1726 +Added line: 4138 L23 +Added line: 5578 +Added line: 3412 [x] 9 10 +Added line: 1356 +Added line: 6395 +Added line: 4381 [++] 10 12 +Added line: 6865 +Added line: 4706 +Added line: 835 +Added line: 9865 L24 +Added line: 6604 Added line: 8212 [foo] 9 12 +Added line: 6470 +Added line: 2255 +Added line: 9223 +Added line: 6483 +Added line: 4823 +Added line: 704 Added line: 1765 +Added line: 7558 +Added line: 6757 +Added line: 8786 +Added line: 6386 +Added line: 9798 +Added line: 1287 [(] 12 13 +Added line: 4189 +Added line: 4845 Added line: 9382 +Added line: 6125 [)] 13 14 +Added line: 4327 +Added line: 5469 L25 [}] 5 6 +Added line: 2686 +Added line: 2631 +Added line: 1468 +Added line: 503 +Added line: 7530 L33 [public] 5 11 +Added line: 4664 [void] 12 16 - [foo] 17 20 +Added line: 1495 +Added line: 3777 [)] 21 22 [{] 23 24 -L35 [}] 5 6 +Added line: 3232 +Added line: 329 +Added line: 371 +Added line: 8445 +Added line: 7166 +Added line: 5235 +Added line: 4757 +Added line: 857 +Added line: 6841 L36 +Added line: 6617 [}] 1 2 +Added line: 1470 +Added line: 1877 +Added line: 5683 +Added line: 8367 +Added line: 8006 +Added line: 2301 +Added line: 2863 +Added line: 113 +Added line: 3177 +Added line: 2121 +Added line: 3951 +Added line: 9450 +Added line: 8788 +Added line: 6126 +Added line: 4321 +Added line: 7961 Added line: 8846 EOF +Added line: 8388 +Added line: 7180 +Added line: 5752 Added line: 9798 +Added line: 4747 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/discardedElements_no_ignore_annots.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/discardedElements_no_ignore_annots.txt index 3e19496955..9b43db33a6 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/discardedElements_no_ignore_annots.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/discardedElements_no_ignore_annots.txt @@ -1,69 +1,158 @@ +Added line: 1450 [Image] or [Truncated image[ Bcol Ecol L15 +Added line: 6855 Added line: 6469 [@] 1 2 [Foo] 2 5 +Added line: 7793 L16 +Added line: 6876 +Added line: 8109 [public] 1 7 [class] 8 13 +Added line: 1596 [Foo] 14 17 +Added line: 6281 +Added line: 3182 +Added line: 3628 +Added line: 467 +Added line: 508 +Added line: 1181 [{] 18 19 L21 [int] 5 8 +Added line: 9629 +Added line: 5439 [x] 9 10 +Added line: 5406 +Added line: 4117 +Added line: 7848 +Added line: 7643 L22 +Added line: 3574 [{] 5 6 +Added line: 763 +Added line: 6422 +Added line: 4318 +Added line: 4657 +Added line: 6371 +Added line: 7943 +Added line: 2517 L23 [x] 9 10 +Added line: 9633 +Added line: 1723 +Added line: 3340 +Added line: 2006 +Added line: 2567 Added line: 3867 [++] 10 12 Added line: 7247 +Added line: 8154 +Added line: 4937 L24 [(] 12 13 [)] 13 14 L25 [}] 5 6 +Added line: 6704 +Added line: 588 +Added line: 2814 +Added line: 4059 L28 +Added line: 4800 +Added line: 9557 Added line: 76 [@] 5 6 [AnnotationWithParams] 6 26 +Added line: 6352 [(] 26 27 ["ugh"] 27 32 [)] 32 33 +Added line: 618 L29 [@] 5 6 +Added line: 1617 +Added line: 1234 +Added line: 6718 +Added line: 9976 +Added line: 3460 +Added line: 8665 +Added line: 848 +Added line: 1170 [AnnotationWithParams] 6 26 +Added line: 6599 +Added line: 9363 [(] 26 27 [{] 27 28 +Added line: 9294 +Added line: 5357 +Added line: 418 [@] 28 29 [Nested] 29 35 [(] 35 36 [,] 39 40 +Added line: 5935 L30 [@] 28 29 +Added line: 7136 +Added line: 2742 [Nested] 29 35 +Added line: 4118 [2] 36 37 +Added line: 7690 +Added line: 2744 +Added line: 2888 Added line: 8730 +Added line: 8500 [)] 37 38 [,] 39 40 +Added line: 6286 L31 [@] 28 29 [Nested] 29 35 +Added line: 3487 +Added line: 4237 +Added line: 6652 L32 +Added line: 9874 +Added line: 7320 +Added line: 1529 Added line: 1720 Added line: 9857 Added line: 2742 +Added line: 1872 +Added line: 9554 [}] 9 10 [)] 10 11 L33 - [void] 12 16 +Added line: 2799 Added line: 8837 - [foo] 17 20 +Added line: 9944 +Added line: 2892 +Added line: 2356 +Added line: 1414 +Added line: 9027 [(] 20 21 [)] 21 22 +Added line: 2208 Added line: 8370 -L35 +Added line: 7939 +Added line: 1178 +Added line: 6497 +Added line: 5677 +Added line: 653 +Added line: 9637 +Added line: 3972 +Added line: 9825 +Added line: 2430 +Added line: 1778 +Added line: 9211 [}] 5 6 +Added line: 8062 L36 [}] 1 2 -EOF +Added line: 9817 +Added line: 7226 +Added line: 25 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesClassLiteral.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesClassLiteral.txt index 2450d1da83..3b92feac80 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesClassLiteral.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesClassLiteral.txt @@ -1,40 +1,129 @@ +Added line: 8005 [Image] or [Truncated image[ Bcol Ecol L2 +Added line: 1906 +Added line: 5780 +Added line: 2218 +Added line: 1046 [public] 1 7 +Added line: 6245 +Added line: 525 [class] 8 13 [<IDENTIFIER>] 14 17 +Added line: 4546 [{] 18 19 +Added line: 4349 L3 [Foo] 5 8 +Added line: 4158 +Added line: 4660 [(] 8 9 +Added line: 1216 [)] 9 10 [{] 11 12 +Added line: 3561 +Added line: 679 +Added line: 1952 +Added line: 9874 +Added line: 5811 +Added line: 5126 +Added line: 6115 +Added line: 5804 L4 +Added line: 1023 +Added line: 7996 +Added line: 8988 +Added line: 1041 [}] 5 6 +Added line: 3095 +Added line: 7783 +Added line: 1976 L5 +Added line: 576 +Added line: 2175 +Added line: 5318 +Added line: 7460 +Added line: 4016 +Added line: 4592 +Added line: 6256 +Added line: 8866 +Added line: 2826 +Added line: 7358 +Added line: 1684 +Added line: 581 [public] 5 11 +Added line: 5441 [void] 12 16 +Added line: 5606 [<IDENTIFIER>] 17 20 [(] 20 21 +Added line: 544 +Added line: 387 +Added line: 5592 +Added line: 8512 +Added line: 7876 +Added line: 6917 +Added line: 4729 +Added line: 8531 +Added line: 1270 +Added line: 7727 +Added line: 77 [)] 21 22 - [{] 23 24 +Added line: 4231 +Added line: 3213 +Added line: 5362 +Added line: 8413 +Added line: 7668 L6 [<IDENTIFIER>] 9 12 +Added line: 1822 +Added line: 5682 +Added line: 104 +Added line: 5999 [.] 12 13 +Added line: 8570 +Added line: 3180 [<IDENTIFIER>] 13 16 [(] 16 17 +Added line: 5959 +Added line: 1755 +Added line: 5447 +Added line: 4420 +Added line: 1013 [<IDENTIFIER>] 17 20 +Added line: 94 +Added line: 2555 [.] 20 21 +Added line: 2867 [class] 21 26 +Added line: 2766 +Added line: 3198 +Added line: 9349 +Added line: 8123 +Added line: 9816 +Added line: 9620 [Foo] 26 27 +Added line: 468 +Added line: 713 [(] 28 29 [)] 29 30 +Added line: 8475 [->] 31 33 +Added line: 733 [{] 34 35 +Added line: 1607 [}] 35 36 - [)] 36 37 +Added line: 9064 +Added line: 9608 L8 [}] 5 6 +Added line: 200 +Added line: 3760 L9 +Added line: 9340 +Added line: 4373 +Added line: 9294 [}] 1 2 EOF +Added line: 125 +Added line: 6864 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesCtor.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesCtor.txt index 0fc12ac6e5..a103eccde4 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesCtor.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesCtor.txt @@ -1,6 +1,14 @@ +Added line: 9231 +Added line: 8824 [Image] or [Truncated image[ Bcol Ecol +Added line: 4952 +Added line: 6432 L2 +Added line: 6125 +Added line: 6541 [public] 1 7 +Added line: 4696 +Added line: 8326 [class] 8 13 [<IDENTIFIER>] 14 17 [extends] 18 25 @@ -8,85 +16,166 @@ L2 [{] 30 31 L4 [private] 5 12 - [<IDENTIFIER>] 13 16 +Added line: 8761 +Added line: 8391 [<IDENTIFIER>] 17 32 +Added line: 8011 L6 [public] 5 11 +Added line: 1826 [Foo] 12 15 [(] 15 16 +Added line: 4476 [int] 16 19 +Added line: 4742 [<IDENTIFIER>] 20 21 +Added line: 8745 [)] 21 22 [{] 23 24 +Added line: 7162 [super] 25 30 +Added line: 8347 +Added line: 1412 [(] 30 31 +Added line: 8315 [<IDENTIFIER>] 31 32 +Added line: 1347 +Added line: 709 +Added line: 7807 [)] 32 33 +Added line: 5721 [}] 35 36 +Added line: 5780 +Added line: 7392 L8 +Added line: 3842 [private] 5 12 -Added line: 9769 +Added line: 2342 +Added line: 7290 +Added line: 8431 [Foo] 13 16 - [(] 16 17 +Added line: 9660 +Added line: 3494 +Added line: 2872 [int] 17 20 [<IDENTIFIER>] 21 22 +Added line: 4581 [,] 22 23 +Added line: 1217 [<IDENTIFIER>] 24 30 [<IDENTIFIER>] 31 32 +Added line: 1561 +Added line: 6587 +Added line: 1864 [)] 32 33 [super] 36 41 +Added line: 3591 [(] 41 42 +Added line: 8117 [<IDENTIFIER>] 42 43 +Added line: 16 [,] 43 44 [<IDENTIFIER>] 45 46 +Added line: 3036 +Added line: 2984 +Added line: 7750 +Added line: 4814 [)] 46 47 +Added line: 500 [}] 49 50 +Added line: 5009 L10 [Foo] 19 22 +Added line: 8426 +Added line: 1589 [(] 22 23 - [int] 23 26 +Added line: 668 +Added line: 3208 Added line: 7557 +Added line: 6159 +Added line: 5084 +Added line: 2366 +Added line: 4849 [<IDENTIFIER>] 27 28 +Added line: 6115 [,] 28 29 +Added line: 9291 [<IDENTIFIER>] 30 36 +Added line: 7480 +Added line: 3159 Added line: 7099 [<IDENTIFIER>] 37 38 +Added line: 2992 [,] 38 39 [<IDENTIFIER>] 40 46 +Added line: 1121 [<IDENTIFIER>] 47 48 +Added line: 4973 [)] 48 49 [{] 50 51 +Added line: 4967 [super] 52 57 [(] 57 58 - [<IDENTIFIER>] 58 59 +Added line: 39 +Added line: 723 [,] 59 60 +Added line: 9841 +Added line: 1252 [<IDENTIFIER>] 61 62 +Added line: 3337 [,] 62 63 +Added line: 7195 +Added line: 9727 [<IDENTIFIER>] 64 65 [)] 65 66 +Added line: 6517 [}] 68 69 +Added line: 914 L12 +Added line: 598 +Added line: 135 +Added line: 6286 [private] 5 12 +Added line: 2790 +Added line: 8309 [static] 13 19 [class] 20 25 +Added line: 5782 [<IDENTIFIER>] 26 31 Added line: 6254 L14 +Added line: 39 [Inner] 9 14 +Added line: 4725 +Added line: 2588 [(] 14 15 +Added line: 4808 [)] 15 16 [{] 17 18 +Added line: 792 +Added line: 7370 +Added line: 6565 +Added line: 3464 [<IDENTIFIER>] 19 25 [.] 25 26 +Added line: 2965 [<IDENTIFIER>] 26 29 [.] 29 30 [<IDENTIFIER>] 30 37 [(] 37 38 ["Guess who?"] 38 50 +Added line: 4269 [)] 50 51 [}] 53 54 +Added line: 7558 Added line: 8567 +Added line: 1271 L16 +Added line: 2472 [}] 5 6 +Added line: 1608 +Added line: 4962 +Added line: 5178 L17 +Added line: 3346 EOF diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesEnum.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesEnum.txt index dae8c76c9d..2283bffaa9 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesEnum.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreIdentsPreservesEnum.txt @@ -1,31 +1,120 @@ +Added line: 8238 +Added line: 1357 +Added line: 8705 +Added line: 5185 [Image] or [Truncated image[ Bcol Ecol +Added line: 6971 +Added line: 8464 +Added line: 8845 +Added line: 3382 +Added line: 7675 +Added line: 3463 L2 +Added line: 134 +Added line: 4656 [public] 1 7 - [<IDENTIFIER>] 8 12 +Added line: 3470 [<IDENTIFIER>] 13 16 +Added line: 8756 +Added line: 2700 +Added line: 2352 [{] 17 18 +Added line: 9411 +Added line: 3535 L3 +Added line: 1227 [<IDENTIFIER>] 5 8 +Added line: 4870 +Added line: 3552 +Added line: 6234 +Added line: 5815 [(] 8 9 [1] 9 10 +Added line: 4624 +Added line: 2218 +Added line: 2835 +Added line: 3661 +Added line: 2687 +Added line: 9370 +Added line: 9846 +Added line: 4622 Added line: 8432 -Added line: 7105 +Added line: 8021 Added line: 2039 +Added line: 4204 +Added line: 3631 +Added line: 9273 +Added line: 9941 +Added line: 878 +Added line: 1363 +Added line: 1505 +Added line: 3866 +Added line: 5916 +Added line: 9180 +Added line: 2312 +Added line: 4521 +Added line: 8784 +Added line: 6959 +Added line: 7337 +Added line: 2047 +Added line: 5326 +Added line: 6076 +Added line: 8381 [)] 10 11 +Added line: 397 +Added line: 2624 [,] 11 12 -Added line: 4616 +Added line: 3297 +Added line: 7652 L4 +Added line: 5859 +Added line: 1888 +Added line: 2945 [<IDENTIFIER>] 5 8 +Added line: 1399 +Added line: 8001 [2] 9 10 +Added line: 1338 +Added line: 3152 +Added line: 9549 Added line: 9438 [)] 10 11 +Added line: 3963 +Added line: 8202 L6 +Added line: 1705 +Added line: 901 +Added line: 9179 +Added line: 9752 +Added line: 3635 +Added line: 104 +Added line: 1509 [Foo] 5 8 - [(] 8 9 +Added line: 4202 +Added line: 3510 [int] 9 12 [<IDENTIFIER>] 13 16 +Added line: 2637 [)] 16 17 +Added line: 9128 +Added line: 9526 +Added line: 8554 +Added line: 5951 +Added line: 4674 +Added line: 3105 +Added line: 2561 +Added line: 490 +Added line: 8900 L7 +Added line: 1241 +Added line: 4391 [}] 5 6 +Added line: 8773 +Added line: 3545 L8 +Added line: 5084 +Added line: 6875 +Added line: 2094 +Added line: 5289 +Added line: 2992 EOF diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreLiterals.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreLiterals.txt index 867ce63413..4fb73c57c4 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreLiterals.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreLiterals.txt @@ -1,52 +1,141 @@ Added line: 6112 [Image] or [Truncated image[ Bcol Ecol +Added line: 2225 +Added line: 4065 +Added line: 1397 +Added line: 926 +Added line: 9363 L1 +Added line: 7153 +Added line: 3827 [public] 1 7 +Added line: 8628 [class] 8 13 +Added line: 6443 [Foo] 14 17 +Added line: 9379 +Added line: 7522 +Added line: 1014 +Added line: 2971 +Added line: 2684 [{] 18 19 L2 [public] 5 11 +Added line: 702 +Added line: 1031 +Added line: 7205 +Added line: 3138 [void] 12 16 +Added line: 7823 +Added line: 2979 +Added line: 9237 [bar] 17 20 +Added line: 874 +Added line: 933 +Added line: 8022 +Added line: 8349 +Added line: 2661 +Added line: 6203 +Added line: 8430 +Added line: 3654 [(] 20 21 [)] 21 22 [{] 23 24 +Added line: 9134 +Added line: 7309 +Added line: 1408 L3 +Added line: 7619 [System] 9 15 Added line: 8325 [.] 15 16 +Added line: 865 [out] 16 19 - [.] 19 20 +Added line: 8369 +Added line: 1098 +Added line: 9903 [println] 20 27 +Added line: 8274 [(] 27 28 +Added line: 5751 +Added line: 45 +Added line: 2220 +Added line: 4092 +Added line: 7368 +Added line: 3588 +Added line: 9491 +Added line: 9865 +Added line: 9204 +Added line: 270 L4 +Added line: 471 +Added line: 6074 +Added line: 3781 [System] 9 15 Added line: 3270 - [.] 15 16 +Added line: 7245 +Added line: 8298 +Added line: 374 +Added line: 3892 [out] 16 19 +Added line: 8727 [.] 19 20 +Added line: 9730 [println] 20 27 +Added line: 7451 +Added line: 6864 +Added line: 6054 +Added line: 5072 +Added line: 2427 [(] 27 28 +Added line: 8657 +Added line: 3329 +Added line: 8116 +Added line: 4187 +Added line: 7146 [<STRING_LITERAL>] 28 35 - [)] 35 36 +Added line: 1016 +Added line: 8034 L5 [int] 9 12 +Added line: 6244 +Added line: 8155 [i] 13 14 +Added line: 4099 +Added line: 8882 +Added line: 1158 +Added line: 8342 +Added line: 9018 [=] 15 16 - [<INTEGER_LITERAL>] 17 18 +Added line: 4970 +Added line: 169 L6 - [System] 9 15 +Added line: 874 [.] 15 16 [out] 16 19 [.] 19 20 +Added line: 6248 +Added line: 416 +Added line: 3156 +Added line: 8298 +Added line: 9401 +Added line: 7833 [print] 20 25 Added line: 8450 [(] 25 26 +Added line: 5884 [<STRING_LITERAL>] 26 33 [)] 33 34 +Added line: 8909 L8 +Added line: 3803 +Added line: 359 [}] 5 6 +Added line: 644 +Added line: 8025 L9 +Added line: 3957 +Added line: 1970 +Added line: 8792 [}] 1 2 EOF diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreLiterals_noignore.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreLiterals_noignore.txt index d4fa2da847..6cdc6d4d5f 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreLiterals_noignore.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreLiterals_noignore.txt @@ -1,54 +1,143 @@ +Added line: 9859 +Added line: 7349 +Added line: 2798 +Added line: 4548 [Image] or [Truncated image[ Bcol Ecol L1 +Added line: 5753 +Added line: 7139 +Added line: 3930 +Added line: 1565 [public] 1 7 +Added line: 1869 +Added line: 5664 +Added line: 1231 [class] 8 13 +Added line: 2799 +Added line: 1119 +Added line: 6298 [Foo] 14 17 - [{] 18 19 +Added line: 1427 L2 [public] 5 11 - [void] 12 16 +Added line: 1658 +Added line: 4631 +Added line: 477 +Added line: 1304 +Added line: 5011 +Added line: 3329 [bar] 17 20 +Added line: 6548 +Added line: 1250 +Added line: 6546 +Added line: 4615 [(] 20 21 +Added line: 49 +Added line: 8629 [)] 21 22 +Added line: 6454 +Added line: 8173 +Added line: 7320 +Added line: 189 Added line: 5605 +Added line: 6153 [{] 23 24 L3 - [System] 9 15 +Added line: 6538 +Added line: 4657 [out] 16 19 +Added line: 7679 [.] 19 20 Added line: 321 Added line: 800 +Added line: 4281 [(] 27 28 +Added line: 1385 +Added line: 3913 +Added line: 2209 +Added line: 5883 +Added line: 1196 +Added line: 4363 +Added line: 9355 ["hello"] 28 35 [)] 35 36 L4 +Added line: 2144 [System] 9 15 +Added line: 3377 +Added line: 9579 +Added line: 3056 [out] 16 19 +Added line: 3997 [println] 20 27 +Added line: 867 [(] 27 28 +Added line: 1650 ["hello"] 28 35 +Added line: 8968 +Added line: 2173 L5 [int] 9 12 +Added line: 2681 +Added line: 1588 +Added line: 8128 [i] 13 14 -Added line: 9357 +Added line: 4231 [=] 15 16 [5] 17 18 +Added line: 1482 +Added line: 4288 +Added line: 7239 Added line: 2939 +Added line: 235 +Added line: 367 +Added line: 5556 +Added line: 5820 +Added line: 9038 +Added line: 926 Added line: 634 +Added line: 994 +Added line: 5235 +Added line: 3863 L6 +Added line: 1046 Added line: 3131 +Added line: 9791 +Added line: 7974 [System] 9 15 +Added line: 9335 +Added line: 9523 [.] 15 16 +Added line: 7906 +Added line: 8880 Added line: 4658 +Added line: 5443 +Added line: 9575 +Added line: 4067 [.] 19 20 +Added line: 3224 [print] 20 25 [(] 25 26 ["hello"] 26 33 -Added line: 7360 +Added line: 4196 +Added line: 5908 [)] 33 34 L8 +Added line: 6658 +Added line: 7665 +Added line: 3826 +Added line: 5980 [}] 5 6 +Added line: 8579 +Added line: 5037 +Added line: 6072 +Added line: 5426 L9 [}] 1 2 Added line: 530 +Added line: 2680 +Added line: 4213 EOF +Added line: 2594 +Added line: 3966 +Added line: 4904 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreSpecialAnnotations.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreSpecialAnnotations.txt index db4966737f..7a628a842e 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreSpecialAnnotations.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreSpecialAnnotations.txt @@ -1,22 +1,111 @@ Added line: 7743 +Added line: 5943 +Added line: 9930 L2 +Added line: 1558 +Added line: 4373 +Added line: 769 +Added line: 6153 +Added line: 1337 +Added line: 8022 Added line: 4941 +Added line: 3444 +Added line: 6343 +Added line: 7181 +Added line: 4511 +Added line: 8946 +Added line: 581 +Added line: 5485 +Added line: 6870 +Added line: 7928 +Added line: 8421 [@] 1 2 +Added line: 4672 +Added line: 9825 +Added line: 2064 [(] 18 19 - [{] 19 20 +Added line: 2351 +Added line: 935 +Added line: 9573 +Added line: 3702 +Added line: 762 +Added line: 8335 +Added line: 2161 ["woof"] 20 26 -Added line: 1552 +Added line: 4764 +Added line: 1963 +Added line: 6731 +Added line: 8471 +Added line: 6069 +Added line: 3239 +Added line: 6858 +Added line: 5207 +Added line: 6787 +Added line: 2424 +Added line: 7935 [,] 26 27 +Added line: 8620 +Added line: 4471 +Added line: 8270 +Added line: 7846 +Added line: 7583 +Added line: 5232 +Added line: 7890 +Added line: 1773 +Added line: 8607 +Added line: 8560 +Added line: 2528 Added line: 732 +Added line: 9112 Added line: 4875 L12 ["CPD-END"] 26 35 +Added line: 7659 +Added line: 9658 [}] 35 36 +Added line: 4394 L13 +Added line: 2642 +Added line: 5064 +Added line: 7082 +Added line: 9934 [Other] 7 12 - [{] 13 14 +Added line: 6178 +Added line: 3444 +Added line: 7523 +Added line: 3864 +Added line: 6394 +Added line: 5053 +Added line: 7683 +Added line: 8777 +Added line: 5550 +Added line: 8210 +Added line: 1151 +Added line: 98 +Added line: 1569 Added line: 5874 +Added line: 4198 +Added line: 7487 +Added line: 1017 +Added line: 6486 +Added line: 1719 Added line: 6743 +Added line: 6869 +Added line: 3334 +Added line: 5937 Added line: 3193 +Added line: 4016 +Added line: 4225 +Added line: 4578 +Added line: 6853 +Added line: 3774 +Added line: 6467 +Added line: 159 +Added line: 7536 +Added line: 9589 +Added line: 9234 Added line: 367 +Added line: 5906 +Added line: 4953 +Added line: 2099 Added line: 3499 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreSpecialAnnotations_ignore_annots.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreSpecialAnnotations_ignore_annots.txt index dfb7479334..0aba5685d2 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreSpecialAnnotations_ignore_annots.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/ignoreSpecialAnnotations_ignore_annots.txt @@ -1,9 +1,98 @@ +Added line: 6297 +Added line: 4835 +Added line: 6454 +Added line: 8446 [Image] or [Truncated image[ Bcol Ecol Added line: 7682 +Added line: 656 +Added line: 630 +Added line: 2481 +Added line: 1145 +Added line: 9909 +Added line: 3973 +Added line: 8621 +Added line: 3935 +Added line: 625 +Added line: 7981 +Added line: 3020 +Added line: 5375 +Added line: 6422 +Added line: 3847 +Added line: 4318 +Added line: 1734 Added line: 4312 +Added line: 6818 +Added line: 1491 +Added line: 5192 +Added line: 1201 +Added line: 8130 +Added line: 9999 +Added line: 9365 +Added line: 1258 +Added line: 1967 +Added line: 9832 +Added line: 4490 [class] 1 6 +Added line: 565 +Added line: 474 +Added line: 8419 +Added line: 5348 +Added line: 6268 +Added line: 6097 +Added line: 8453 +Added line: 6398 +Added line: 9438 +Added line: 508 [Other] 7 12 +Added line: 7310 +Added line: 193 +Added line: 7121 +Added line: 1310 +Added line: 1028 +Added line: 5296 +Added line: 6936 +Added line: 9877 +Added line: 4560 +Added line: 4993 +Added line: 12 +Added line: 8161 +Added line: 1571 +Added line: 3405 +Added line: 5511 +Added line: 9297 +Added line: 9935 +Added line: 534 +Added line: 3714 +Added line: 6051 +Added line: 8993 +Added line: 3996 +Added line: 8528 +Added line: 4087 +Added line: 1745 +Added line: 2077 +Added line: 4728 +Added line: 3407 +Added line: 175 +Added line: 7233 Added line: 5408 +Added line: 2586 +Added line: 965 +Added line: 2151 +Added line: 7175 [{] 13 14 +Added line: 7177 [}] 14 15 +Added line: 6695 +Added line: 9691 +Added line: 6565 +Added line: 433 +Added line: 7559 +Added line: 5682 +Added line: 1780 +Added line: 2494 +Added line: 4317 +Added line: 1577 EOF +Added line: 8745 +Added line: 9030 +Added line: 7133 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/simpleClassWithComments.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/simpleClassWithComments.txt index b55ad2b3a3..ae92060fcf 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/simpleClassWithComments.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/simpleClassWithComments.txt @@ -1,13 +1,102 @@ +Added line: 5639 +Added line: 1222 +Added line: 9225 +Added line: 5720 +Added line: 6683 +Added line: 247 +Added line: 3653 +Added line: 1479 +Added line: 4801 +Added line: 992 Added line: 4437 +Added line: 5671 +Added line: 1753 +Added line: 1519 +Added line: 9366 +Added line: 2870 +Added line: 7138 +Added line: 4336 +Added line: 8312 +Added line: 8889 +Added line: 4983 +Added line: 3004 +Added line: 9054 +Added line: 6328 +Added line: 458 +Added line: 4731 +Added line: 2309 +Added line: 4763 +Added line: 9184 +Added line: 1464 +Added line: 9749 +Added line: 7417 +Added line: 8010 +Added line: 6270 +Added line: 5599 +Added line: 1395 +Added line: 1141 +Added line: 2030 +Added line: 9913 +Added line: 3202 +Added line: 7329 +Added line: 1012 +Added line: 2846 +Added line: 3756 +Added line: 5257 +Added line: 7846 +Added line: 1932 [Image] or [Truncated image[ Bcol Ecol +Added line: 8650 +Added line: 869 +Added line: 3018 +Added line: 2263 +Added line: 6487 +Added line: 6106 Added line: 5974 Added line: 5162 +Added line: 3494 +Added line: 1048 +Added line: 1752 +Added line: 5564 Added line: 1114 +Added line: 438 +Added line: 451 +Added line: 6638 +Added line: 5063 +Added line: 2669 +Added line: 7302 Added line: 1761 Added line: 6604 - [class] 8 13 +Added line: 6068 +Added line: 7744 +Added line: 610 +Added line: 1306 +Added line: 7402 +Added line: 7876 [Foo] 14 17 +Added line: 7159 +Added line: 3142 +Added line: 5533 +Added line: 1736 +Added line: 3138 +Added line: 40 [{] 18 19 +Added line: 9197 +Added line: 5999 Added line: 1026 +Added line: 5204 +Added line: 4507 +Added line: 1709 +Added line: 2385 +Added line: 6411 +Added line: 6417 +Added line: 1984 Added line: 1151 +Added line: 4149 +Added line: 3702 +Added line: 267 +Added line: 6208 [}] 1 2 +Added line: 2091 +Added line: 1183 +Added line: 339 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/specialComments.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/specialComments.txt index 0d80530758..f7f2f0bbb0 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/specialComments.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/specialComments.txt @@ -1,12 +1,101 @@ +Added line: 7677 +Added line: 810 +Added line: 9150 +Added line: 2124 +Added line: 4158 [Image] or [Truncated image[ Bcol Ecol +Added line: 4479 +Added line: 5445 +Added line: 3549 +Added line: 4603 L13 +Added line: 9776 +Added line: 9768 +Added line: 7791 [class] 5 10 +Added line: 2314 +Added line: 7974 +Added line: 9947 +Added line: 2960 +Added line: 3450 Added line: 319 +Added line: 9158 +Added line: 2618 +Added line: 119 +Added line: 1657 +Added line: 5133 +Added line: 4383 +Added line: 2363 +Added line: 4187 +Added line: 7570 +Added line: 1246 +Added line: 3290 +Added line: 557 +Added line: 7932 +Added line: 6069 +Added line: 7521 +Added line: 5850 +Added line: 6535 +Added line: 3709 +Added line: 4603 +Added line: 8995 [Foo] 11 14 +Added line: 952 +Added line: 2864 +Added line: 3710 +Added line: 2731 +Added line: 5672 +Added line: 4031 +Added line: 7807 +Added line: 205 +Added line: 7060 +Added line: 2680 +Added line: 7421 +Added line: 4620 +Added line: 2215 +Added line: 3540 +Added line: 4080 +Added line: 9111 +Added line: 6242 L14 +Added line: 7080 +Added line: 7145 +Added line: 7781 +Added line: 7319 +Added line: 1369 +Added line: 7497 +Added line: 1653 +Added line: 6495 +Added line: 9496 +Added line: 1329 [class] 5 10 +Added line: 6397 +Added line: 415 +Added line: 3747 +Added line: 5206 +Added line: 5304 +Added line: 5141 +Added line: 1605 +Added line: 3454 +Added line: 1720 +Added line: 5732 +Added line: 1945 Added line: 7792 +Added line: 4173 Added line: 6164 +Added line: 6386 +Added line: 1495 +Added line: 8764 +Added line: 428 +Added line: 6735 +Added line: 6734 [Foo] 11 14 +Added line: 4286 L19 +Added line: 3347 +Added line: 8913 +Added line: 279 +Added line: 5154 +Added line: 7867 +Added line: 6024 EOF diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/tabWidth.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/tabWidth.txt index 0e22aecefb..512d38571c 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/tabWidth.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/cpd/testdata/tabWidth.txt @@ -1,15 +1,104 @@ +Added line: 4260 +Added line: 9264 +Added line: 3780 Added line: 1440 +Added line: 4749 +Added line: 5378 +Added line: 2730 +Added line: 8251 +Added line: 3004 +Added line: 7489 +Added line: 6658 +Added line: 8861 +Added line: 2638 +Added line: 9348 +Added line: 5831 +Added line: 573 +Added line: 3650 +Added line: 4835 +Added line: 2851 Added line: 5287 +Added line: 4624 +Added line: 9759 +Added line: 583 Added line: 8177 -L1 - [tabWidth] 7 15 +Added line: 6667 +Added line: 1499 +Added line: 511 +Added line: 5897 +Added line: 5593 +Added line: 1520 +Added line: 5104 +Added line: 1878 +Added line: 2656 +Added line: 6245 [{] 16 17 +Added line: 758 +Added line: 6720 +Added line: 5648 +Added line: 6147 +Added line: 7768 +Added line: 1986 +Added line: 9727 +Added line: 9251 +Added line: 7711 +Added line: 4928 +Added line: 5166 +Added line: 4937 +Added line: 5272 +Added line: 8124 +Added line: 2380 L2 [int] 2 5 +Added line: 7434 +Added line: 7065 +Added line: 3237 +Added line: 9952 [i] 6 7 +Added line: 6809 +Added line: 9303 +Added line: 210 +Added line: 748 [=] 8 9 +Added line: 4304 +Added line: 9157 [0] 10 11 +Added line: 382 +Added line: 7729 +Added line: 558 Added line: 3994 +Added line: 5101 Added line: 5727 +Added line: 2836 +Added line: 9125 +Added line: 674 +Added line: 552 +Added line: 8043 +Added line: 9507 +Added line: 5614 +Added line: 5446 +Added line: 2203 [}] 1 2 +Added line: 5388 +Added line: 5409 +Added line: 6733 +Added line: 5497 +Added line: 4681 +Added line: 8289 +Added line: 1084 +Added line: 4747 +Added line: 762 +Added line: 1134 +Added line: 1033 EOF +Added line: 5277 +Added line: 3043 +Added line: 5129 +Added line: 6248 +Added line: 2426 +Added line: 3309 +Added line: 2736 +Added line: 7011 +Added line: 8050 +Added line: 611 +Added line: 4239 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/IteratorUtilCopy.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/IteratorUtilCopy.txt index 5a81431fba..a787716cf7 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/IteratorUtilCopy.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/IteratorUtilCopy.txt @@ -1,6 +1,7 @@ +- CompilationUnit[] +- ImportDeclaration[] +- ImportDeclaration[] +Added line: 3207 +- ImportDeclaration[] +- ImportDeclaration[] +- ImportDeclaration[] @@ -12,6 +13,7 @@ +- ImportDeclaration[] +- ImportDeclaration[] +- ImportDeclaration[] +Added line: 1217 +- ImportDeclaration[] +- ImportDeclaration[] +- ImportDeclaration[] @@ -39,6 +41,7 @@ | +- VariableId[@Name = "MATCH_NONE", @TypeMirror = "int"] | +- NumericLiteral[@TypeMirror = "int"] +- ConstructorDeclaration[] +Added line: 8494 | +- ModifierList[] | +- FormalParameters[] | +- Block[] @@ -62,6 +65,7 @@ | +- FormalParameters[] | | +- FormalParameter[@TypeMirror = "java.util.Iterator<T>"] | | | +- ModifierList[] +Added line: 7889 | | | +- ClassType[@TypeMirror = "java.util.Iterator<T>"] | | | | +- TypeArguments[] | | | | +- ClassType[@TypeMirror = "T"] @@ -146,10 +150,12 @@ Added line: 7054 | | +- VariableAccess[@Name = "tmp", @TypeMirror = "java.util.List<T>"] | +- ReturnStatement[] | +- MethodCall[@Failed = false, @Function = "java.util.List<T>.iterator() -> java.util.Iterator<T>", @MethodName = "iterator", @TypeMirror = "java.util.Iterator<T>", @Unchecked = false, @VarargsCall = false] +Added line: 7604 | +- VariableAccess[@Name = "tmp", @TypeMirror = "java.util.List<T>"] | +- ArgumentList[] +- MethodDeclaration[@Name = "flatMap"] | +- ModifierList[] +Added line: 9591 | +- TypeParameters[] | | +- TypeParameter[@TypeMirror = "T"] | | +- TypeParameter[@TypeMirror = "R"] @@ -169,6 +175,7 @@ Added line: 7054 Added line: 7848 | | +- ClassType[@TypeMirror = "java.util.function.Function<? super T, ? extends @Nullable java.util.Iterator<? extends R>>"] | | | +- TypeArguments[] +Added line: 1834 | | | +- WildcardType[@TypeMirror = "? super T"] | | | | +- ClassType[@TypeMirror = "T"] | | | +- WildcardType[@TypeMirror = "? extends @Nullable java.util.Iterator<? extends R>"] @@ -176,6 +183,7 @@ Added line: 7848 | | | +- Annotation[@TypeMirror = "IteratorUtilCopy$Nullable"] | | | | +- ClassType[@TypeMirror = "IteratorUtilCopy$Nullable"] | | | +- TypeArguments[] +Added line: 2273 | | | +- WildcardType[@TypeMirror = "? extends R"] | | | +- ClassType[@TypeMirror = "R"] | | +- VariableId[@Name = "f", @TypeMirror = "java.util.function.Function<? super T, ? extends @Nullable java.util.Iterator<? extends R>>"] @@ -229,6 +237,7 @@ Added line: 7848 | | +- LocalVariableDeclaration[] | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "java.util.Iterator<? extends R>"] +Added line: 8176 | | | | +- TypeArguments[] | | | | +- WildcardType[@TypeMirror = "? extends R"] | | | | +- ClassType[@TypeMirror = "R"] @@ -287,6 +296,7 @@ Added line: 7848 | | | +- WildcardType[@TypeMirror = "? extends java.util.Iterator<? extends R>"] | | | +- ClassType[@TypeMirror = "java.util.Iterator<? extends R>"] | | | +- TypeArguments[] +Added line: 170 | | | +- WildcardType[@TypeMirror = "? extends R"] | | | +- ClassType[@TypeMirror = "R"] | | +- VariableId[@Name = "f", @TypeMirror = "java.util.function.Function<? super R, ? extends java.util.Iterator<? extends R>>"] @@ -295,6 +305,8 @@ Added line: 7848 | +- ConstructorCall[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator<R>.new() -> IteratorUtilCopy$AbstractIterator<R>", @MethodName = "new", @TypeMirror = "IteratorUtilCopy$AbstractIterator<R>", @Unchecked = false, @VarargsCall = false] | +- ClassType[@TypeMirror = "IteratorUtilCopy$AbstractIterator<R>"] | | +- TypeArguments[] +Added line: 7585 +Added line: 492 | | +- ClassType[@TypeMirror = "R"] | +- ArgumentList[] | +- AnonymousClassDeclaration[@TypeMirror = "IteratorUtilCopy$3"] @@ -336,12 +348,14 @@ Added line: 7848 | | +- AssignmentExpression[@TypeMirror = "java.util.Iterator<capture#... of ? extends R>"] | | +- VariableAccess[@Name = "current", @TypeMirror = "java.util.Iterator<? extends R>"] | | +- NullLiteral[@TypeMirror = "null"] +Added line: 9142 | +- IfStatement[] | +- MethodCall[@Failed = false, @Function = "java.util.Iterator<capture#... of ? extends R>.hasNext() -> boolean", @MethodName = "hasNext", @TypeMirror = "boolean", @Unchecked = false, @VarargsCall = false] | | +- VariableAccess[@Name = "iter", @TypeMirror = "java.util.Iterator<capture#... of ? extends R>"] | | +- ArgumentList[] | +- Block[] | | +- LocalVariableDeclaration[] +Added line: 216 | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "R"] | | | +- VariableDeclarator[] @@ -350,6 +364,7 @@ Added line: 7848 | | | +- VariableAccess[@Name = "iter", @TypeMirror = "java.util.Iterator<capture#... of ? extends R>"] | | | +- ArgumentList[] | | +- ExpressionStatement[] +Added line: 8519 | | | +- MethodCall[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator<R>.setNext(R) -> void", @MethodName = "setNext", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | | | +- ArgumentList[] | | | +- VariableAccess[@Name = "next", @TypeMirror = "R"] @@ -396,6 +411,7 @@ Added line: 7848 | | +- TypeArguments[] | | +- ClassType[@TypeMirror = "R"] | +- FormalParameters[] +Added line: 2155 | | +- FormalParameter[@TypeMirror = "java.util.Iterator<? extends T>"] | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "java.util.Iterator<? extends T>"] @@ -412,7 +428,9 @@ Added line: 7848 | | | +- WildcardType[@TypeMirror = "? extends R"] | | | +- ClassType[@TypeMirror = "R"] | | +- VariableId[@Name = "mapper", @TypeMirror = "java.util.function.Function<? super T, ? extends R>"] +Added line: 7160 | +- Block[] +Added line: 9715 | +- ReturnStatement[] | +- ConstructorCall[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator<R>.new() -> IteratorUtilCopy$AbstractIterator<R>", @MethodName = "new", @TypeMirror = "IteratorUtilCopy$AbstractIterator<R>", @Unchecked = false, @VarargsCall = false] | +- ClassType[@TypeMirror = "IteratorUtilCopy$AbstractIterator<R>"] @@ -426,6 +444,7 @@ Added line: 7848 | +- ModifierList[] | | +- Annotation[@TypeMirror = "java.lang.Override"] | | +- ClassType[@TypeMirror = "java.lang.Override"] +Added line: 2954 | +- VoidType[@TypeMirror = "void"] | +- FormalParameters[] | +- Block[] @@ -435,6 +454,7 @@ Added line: 7848 | | | +- ArgumentList[] | | +- Block[] | | +- LocalVariableDeclaration[] +Added line: 3845 | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "T"] | | | +- VariableDeclarator[] @@ -445,6 +465,7 @@ Added line: 7848 | | +- IfStatement[] | | +- InfixExpression[@TypeMirror = "boolean"] | | | +- VariableAccess[@Name = "next", @TypeMirror = "T"] +Added line: 9719 | | | +- NullLiteral[@TypeMirror = "null"] | | +- Block[] | | +- LocalVariableDeclaration[] @@ -464,12 +485,14 @@ Added line: 7848 | | +- ExpressionStatement[] | | | +- MethodCall[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator<R>.setNext(R) -> void", @MethodName = "setNext", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | | | +- ArgumentList[] +Added line: 4456 | | | +- VariableAccess[@Name = "map", @TypeMirror = "R"] | | +- ReturnStatement[] | +- ExpressionStatement[] | +- MethodCall[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator<R>.done() -> void", @MethodName = "done", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | +- ArgumentList[] +- MethodDeclaration[@Name = "filter"] +Added line: 4078 | +- ModifierList[] | +- TypeParameters[] | | +- TypeParameter[@TypeMirror = "T"] @@ -509,11 +532,12 @@ Added line: 6616 | | +- ClassType[@TypeMirror = "java.lang.Override"] | +- VoidType[@TypeMirror = "void"] | +- FormalParameters[] - | +- Block[] | +- WhileStatement[] | | +- MethodCall[@Failed = false, @Function = "java.util.Iterator<capture#... of ? extends T>.hasNext() -> boolean", @MethodName = "hasNext", @TypeMirror = "boolean", @Unchecked = false, @VarargsCall = false] +Added line: 7967 | | | +- VariableAccess[@Name = "it", @TypeMirror = "java.util.Iterator<capture#... of ? extends T>"] | | | +- ArgumentList[] +Added line: 7792 | | +- Block[] | | +- LocalVariableDeclaration[] | | | +- ModifierList[] @@ -531,6 +555,7 @@ Added line: 6616 | | +- Block[] | | +- ExpressionStatement[] | | | +- MethodCall[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator<T>.setNext(T) -> void", @MethodName = "setNext", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] +Added line: 9859 | | | +- ArgumentList[] | | | +- VariableAccess[@Name = "next", @TypeMirror = "T"] | | +- ReturnStatement[] @@ -538,6 +563,7 @@ Added line: 6616 | +- MethodCall[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator<T>.done() -> void", @MethodName = "done", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | +- ArgumentList[] +- MethodDeclaration[@Name = "peek"] +Added line: 4655 | +- ModifierList[] | +- TypeParameters[] | | +- TypeParameter[@TypeMirror = "T"] @@ -545,16 +571,19 @@ Added line: 6616 | | +- TypeArguments[] | | +- ClassType[@TypeMirror = "T"] | +- FormalParameters[] +Added line: 536 | | +- FormalParameter[@TypeMirror = "java.util.Iterator<? extends T>"] | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "java.util.Iterator<? extends T>"] | | | | +- TypeArguments[] | | | | +- WildcardType[@TypeMirror = "? extends T"] | | | | +- ClassType[@TypeMirror = "T"] +Added line: 9762 | | | +- VariableId[@Name = "iter", @TypeMirror = "java.util.Iterator<? extends T>"] | | +- FormalParameter[@TypeMirror = "java.util.function.Consumer<? super T>"] | | +- ModifierList[] | | +- ClassType[@TypeMirror = "java.util.function.Consumer<? super T>"] +Added line: 3296 | | | +- TypeArguments[] | | | +- WildcardType[@TypeMirror = "? super T"] | | | +- ClassType[@TypeMirror = "T"] @@ -581,6 +610,7 @@ Added line: 6616 | +- ModifierList[] | +- TypeParameters[] | | +- TypeParameter[@TypeMirror = "T"] +Added line: 7450 | | +- TypeParameter[@TypeMirror = "R"] | +- ClassType[@TypeMirror = "java.util.Iterator<R>"] | | +- TypeArguments[] @@ -627,13 +657,13 @@ Added line: 8799 | +- MethodDeclaration[@Name = "next"] | +- ModifierList[] | | +- Annotation[@TypeMirror = "java.lang.Override"] - | | +- ClassType[@TypeMirror = "java.lang.Override"] | +- ClassType[@TypeMirror = "R"] | +- FormalParameters[] | +- Block[] | +- ReturnStatement[] | +- MethodCall[@Failed = false, @Function = "java.util.function.Function<capture#... of ? super T, capture#... of ? extends R>.apply(capture#... of ? super T) -> capture#... of ? extends R", @MethodName = "apply", @TypeMirror = "capture#... of ? extends R", @Unchecked = false, @VarargsCall = false] | +- VariableAccess[@Name = "mapper", @TypeMirror = "java.util.function.Function<capture#... of ? super T, capture#... of ? extends R>"] +Added line: 8087 | +- ArgumentList[] | +- MethodCall[@Failed = false, @Function = "java.util.Iterator<capture#... of ? extends T>.next() -> capture#... of ? extends T", @MethodName = "next", @TypeMirror = "capture#... of ? extends T", @Unchecked = false, @VarargsCall = false] | +- VariableAccess[@Name = "iter", @TypeMirror = "java.util.Iterator<capture#... of ? extends T>"] @@ -649,13 +679,14 @@ Added line: 8799 | +- FormalParameters[] | | +- FormalParameter[@TypeMirror = "java.lang.Iterable<? extends T>"] | | | +- ModifierList[] - | | | +- ClassType[@TypeMirror = "java.lang.Iterable<? extends T>"] | | | | +- TypeArguments[] | | | | +- WildcardType[@TypeMirror = "? extends T"] +Added line: 7551 | | | | +- ClassType[@TypeMirror = "T"] | | | +- VariableId[@Name = "iter", @TypeMirror = "java.lang.Iterable<? extends T>"] | | +- FormalParameter[@TypeMirror = "java.util.function.Function<? super java.util.Iterator<? extends T>, ? extends java.util.Iterator<R>>"] | | +- ModifierList[] +Added line: 538 | | +- ClassType[@TypeMirror = "java.util.function.Function<? super java.util.Iterator<? extends T>, ? extends java.util.Iterator<R>>"] | | | +- TypeArguments[] | | | +- WildcardType[@TypeMirror = "? super java.util.Iterator<? extends T>"] @@ -666,6 +697,7 @@ Added line: 8799 | | | +- WildcardType[@TypeMirror = "? extends java.util.Iterator<R>"] | | | +- ClassType[@TypeMirror = "java.util.Iterator<R>"] | | | +- TypeArguments[] +Added line: 1704 | | | +- ClassType[@TypeMirror = "R"] | | +- VariableId[@Name = "mapper", @TypeMirror = "java.util.function.Function<? super java.util.Iterator<? extends T>, ? extends java.util.Iterator<R>>"] | +- Block[] @@ -717,9 +749,11 @@ Added line: 8799 | | | +- ClassType[@TypeMirror = "java.util.Iterator<? extends T>"] | | | | +- TypeArguments[] | | | | +- WildcardType[@TypeMirror = "? extends T"] +Added line: 4102 | | | | +- ClassType[@TypeMirror = "T"] | | | +- VariableId[@Name = "as", @TypeMirror = "java.util.Iterator<? extends T>"] | | +- FormalParameter[@TypeMirror = "java.util.Iterator<? extends T>"] +Added line: 8466 | | +- ModifierList[] | | +- ClassType[@TypeMirror = "java.util.Iterator<? extends T>"] | | | +- TypeArguments[] @@ -729,6 +763,7 @@ Added line: 8799 | +- Block[] | +- IfStatement[] | | +- UnaryExpression[@TypeMirror = "boolean"] +Added line: 709 | | | +- MethodCall[@Failed = false, @Function = "java.util.Iterator<capture#... of ? extends T>.hasNext() -> boolean", @MethodName = "hasNext", @TypeMirror = "boolean", @Unchecked = false, @VarargsCall = false] | | | +- VariableAccess[@Name = "as", @TypeMirror = "java.util.Iterator<capture#... of ? extends T>"] | | | +- ArgumentList[] @@ -755,20 +790,23 @@ Added line: 8799 | +- ConstructorCall[@Failed = false, @Function = "java.lang.Object.new() -> java.util.Iterator<T>", @MethodName = "new", @TypeMirror = "java.util.Iterator<T>", @Unchecked = false, @VarargsCall = false] | +- ClassType[@TypeMirror = "java.util.Iterator<T>"] | | +- TypeArguments[] +Added line: 2393 | | +- ClassType[@TypeMirror = "T"] | +- ArgumentList[] | +- AnonymousClassDeclaration[@TypeMirror = "IteratorUtilCopy$7"] | +- ModifierList[] - | +- ClassBody[] +Added line: 6563 | +- MethodDeclaration[@Name = "hasNext"] | | +- ModifierList[] | | | +- Annotation[@TypeMirror = "java.lang.Override"] | | | +- ClassType[@TypeMirror = "java.lang.Override"] | | +- PrimitiveType[@TypeMirror = "boolean"] +Added line: 8000 | | +- FormalParameters[] | | +- Block[] | | +- ReturnStatement[] | | +- InfixExpression[@TypeMirror = "boolean"] +Added line: 8966 | | +- MethodCall[@Failed = false, @Function = "java.util.Iterator<capture#... of ? extends T>.hasNext() -> boolean", @MethodName = "hasNext", @TypeMirror = "boolean", @Unchecked = false, @VarargsCall = false] | | | +- VariableAccess[@Name = "as", @TypeMirror = "java.util.Iterator<capture#... of ? extends T>"] | | | +- ArgumentList[] @@ -800,6 +838,7 @@ Added line: 8799 | +- ClassType[@TypeMirror = "java.util.Iterator<T>"] | | +- TypeArguments[] | | +- ClassType[@TypeMirror = "T"] +Added line: 1386 | +- FormalParameters[] | | +- FormalParameter[@TypeMirror = "java.util.Iterator<? extends T>"] | | +- ModifierList[] @@ -810,6 +849,7 @@ Added line: 8799 | | +- VariableId[@Name = "iter", @TypeMirror = "java.util.Iterator<? extends T>"] | +- Block[] | +- LocalVariableDeclaration[] +Added line: 4657 | | +- ModifierList[] | | +- ClassType[@TypeMirror = "java.util.Set<T>"] | | | +- TypeArguments[] @@ -834,6 +874,7 @@ Added line: 8799 | | +- TypeArguments[] | | +- ClassType[@TypeMirror = "T"] | +- FormalParameters[] +Added line: 6876 | | +- FormalParameter[@TypeMirror = "java.util.Iterator<? extends T>"] | | +- ModifierList[] | | +- ClassType[@TypeMirror = "java.util.Iterator<? extends T>"] @@ -853,7 +894,6 @@ Added line: 8799 | | | +- TypeArguments[] | | +- ArgumentList[] | +- WhileStatement[] - | | +- MethodCall[@Failed = false, @Function = "java.util.Iterator<capture#... of ? extends T>.hasNext() -> boolean", @MethodName = "hasNext", @TypeMirror = "boolean", @Unchecked = false, @VarargsCall = false] | | | +- VariableAccess[@Name = "it", @TypeMirror = "java.util.Iterator<capture#... of ? extends T>"] | | | +- ArgumentList[] | | +- Block[] @@ -864,6 +904,7 @@ Added line: 8799 | | +- MethodCall[@Failed = false, @Function = "java.util.Iterator<capture#... of ? extends T>.next() -> capture#... of ? extends T", @MethodName = "next", @TypeMirror = "capture#... of ? extends T", @Unchecked = false, @VarargsCall = false] | | +- VariableAccess[@Name = "it", @TypeMirror = "java.util.Iterator<capture#... of ? extends T>"] | | +- ArgumentList[] +Added line: 9358 | +- ReturnStatement[] | +- VariableAccess[@Name = "list", @TypeMirror = "java.util.List<T>"] +- MethodDeclaration[@Name = "toNonNullList"] @@ -905,12 +946,15 @@ Added line: 8799 | | | +- VariableId[@Name = "next", @TypeMirror = "T"] | | | +- MethodCall[@Failed = false, @Function = "java.util.Iterator<capture#... of ? extends T>.next() -> capture#... of ? extends T", @MethodName = "next", @TypeMirror = "capture#... of ? extends T", @Unchecked = false, @VarargsCall = false] | | | +- VariableAccess[@Name = "it", @TypeMirror = "java.util.Iterator<capture#... of ? extends T>"] +Added line: 8531 | | | +- ArgumentList[] | | +- IfStatement[] | | +- InfixExpression[@TypeMirror = "boolean"] | | | +- VariableAccess[@Name = "next", @TypeMirror = "T"] +Added line: 4309 | | | +- NullLiteral[@TypeMirror = "null"] | | +- Block[] +Added line: 5130 | | +- ExpressionStatement[] | | +- MethodCall[@Failed = false, @Function = "java.util.List<T>.add(T) -> boolean", @MethodName = "add", @TypeMirror = "boolean", @Unchecked = false, @VarargsCall = false] | | +- VariableAccess[@Name = "list", @TypeMirror = "java.util.List<T>"] @@ -936,6 +980,7 @@ Added line: 8799 | +- ReturnStatement[] | +- LambdaExpression[@TypeMirror = "java.lang.Iterable<T>"] | +- LambdaParameterList[] +Added line: 6830 | +- VariableAccess[@Name = "it", @TypeMirror = "java.util.Iterator<T>"] +- MethodDeclaration[@Name = "count"] | +- ModifierList[] @@ -944,6 +989,7 @@ Added line: 8799 | | +- FormalParameter[@TypeMirror = "java.util.Iterator<?>"] | | +- ModifierList[] | | +- ClassType[@TypeMirror = "java.util.Iterator<?>"] +Added line: 3091 | | | +- TypeArguments[] | | | +- WildcardType[@TypeMirror = "?"] | | +- VariableId[@Name = "it", @TypeMirror = "java.util.Iterator<?>"] @@ -966,8 +1012,8 @@ Added line: 8799 | | +- ExpressionStatement[] | | +- UnaryExpression[@TypeMirror = "int"] | | +- VariableAccess[@Name = "count", @TypeMirror = "int"] - | +- ReturnStatement[] | +- VariableAccess[@Name = "count", @TypeMirror = "int"] +Added line: 222 +- MethodDeclaration[@Name = "last"] | +- ModifierList[] | +- TypeParameters[] @@ -1041,6 +1087,7 @@ Added line: 8799 | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "java.util.Iterator<?>"] | | | | +- TypeArguments[] +Added line: 1203 | | | | +- WildcardType[@TypeMirror = "?"] | | | +- VariableId[@Name = "iterator", @TypeMirror = "java.util.Iterator<?>"] | | +- FormalParameter[@TypeMirror = "int"] @@ -1104,6 +1151,7 @@ Added line: 4249 | +- ModifierList[] | +- ClassBody[] | +- FieldDeclaration[] +Added line: 3990 | | +- ModifierList[] | | +- PrimitiveType[@TypeMirror = "int"] | | +- VariableId[@Name = "yielded", @TypeMirror = "int"] @@ -1130,9 +1178,12 @@ Added line: 4249 | | | +- ArgumentList[] | | +- Block[] | | +- ExpressionStatement[] +Added line: 4256 | | +- MethodCall[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator<T>.setNext(T) -> void", @MethodName = "setNext", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | | +- ArgumentList[] | | +- MethodCall[@Failed = false, @Function = "java.util.Iterator<capture#... of ? extends T>.next() -> capture#... of ? extends T", @MethodName = "next", @TypeMirror = "capture#... of ? extends T", @Unchecked = false, @VarargsCall = false] +Added line: 1674 +Added line: 5592 | | +- VariableAccess[@Name = "iterator", @TypeMirror = "java.util.Iterator<capture#... of ? extends T>"] | | +- ArgumentList[] | +- ExpressionStatement[] @@ -1149,7 +1200,7 @@ Added line: 4249 | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "java.util.Iterator<? extends T>"] | | | | +- TypeArguments[] - | | | | +- WildcardType[@TypeMirror = "? extends T"] +Added line: 470 | | | | +- ClassType[@TypeMirror = "T"] | | | +- VariableId[@Name = "source", @TypeMirror = "java.util.Iterator<? extends T>"] | | +- FormalParameter[@TypeMirror = "int"] @@ -1255,6 +1306,9 @@ Added line: 9168 | +- FieldDeclaration[] | | +- ModifierList[] | | +- ClassType[@TypeMirror = "T"] +Added line: 5590 +Added line: 8359 +Added line: 7027 | | +- VariableDeclarator[] | | +- VariableId[@Name = "next", @TypeMirror = "T"] | | +- VariableAccess[@Name = "seed", @TypeMirror = "T"] @@ -1262,7 +1316,9 @@ Added line: 9168 | +- ModifierList[] | | +- Annotation[@TypeMirror = "java.lang.Override"] | | +- ClassType[@TypeMirror = "java.lang.Override"] +Added line: 506 | +- VoidType[@TypeMirror = "void"] +Added line: 7512 | +- FormalParameters[] | +- Block[] | +- IfStatement[] @@ -1293,6 +1349,7 @@ Added line: 9168 | +- FormalParameters[] | | +- FormalParameter[@TypeMirror = "java.util.Iterator<? extends T>"] | | | +- ModifierList[] +Added line: 1084 | | | +- ClassType[@TypeMirror = "java.util.Iterator<? extends T>"] | | | | +- TypeArguments[] | | | | +- WildcardType[@TypeMirror = "? extends T"] @@ -1313,8 +1370,10 @@ Added line: 9168 | +- VariableAccess[@Name = "pred", @TypeMirror = "java.util.function.Predicate<capture#... of ? super T>"] | +- VariableAccess[@Name = "MATCH_ANY", @TypeMirror = "int"] +- MethodDeclaration[@Name = "allMatch"] +Added line: 9826 | +- ModifierList[] | +- TypeParameters[] +Added line: 9662 | | +- TypeParameter[@TypeMirror = "T"] | +- PrimitiveType[@TypeMirror = "boolean"] | +- FormalParameters[] @@ -1329,6 +1388,7 @@ Added line: 9168 | | +- ModifierList[] | | +- ClassType[@TypeMirror = "java.util.function.Predicate<? super T>"] | | | +- TypeArguments[] +Added line: 8641 | | | +- WildcardType[@TypeMirror = "? super T"] | | | +- ClassType[@TypeMirror = "T"] | | +- VariableId[@Name = "pred", @TypeMirror = "java.util.function.Predicate<? super T>"] @@ -1367,6 +1427,7 @@ Added line: 9168 | +- VariableAccess[@Name = "pred", @TypeMirror = "java.util.function.Predicate<capture#... of ? super T>"] | +- VariableAccess[@Name = "MATCH_NONE", @TypeMirror = "int"] +- MethodDeclaration[@Name = "matches"] +Added line: 1942 | +- ModifierList[] | +- TypeParameters[] | | +- TypeParameter[@TypeMirror = "T"] @@ -1431,6 +1492,8 @@ Added line: 9168 | | | +- VariableAccess[@Name = "value", @TypeMirror = "T"] | | +- IfStatement[] | | +- InfixExpression[@TypeMirror = "boolean"] +Added line: 493 +Added line: 5802 | | | +- VariableAccess[@Name = "match", @TypeMirror = "boolean"] | | | +- VariableAccess[@Name = "kindAll", @TypeMirror = "boolean"] | | +- Block[] @@ -1452,6 +1515,7 @@ Added line: 9168 | | +- ModifierList[] | | +- ClassType[@TypeMirror = "T"] | | +- VariableId[@Name = "value", @TypeMirror = "T"] +Added line: 4961 | +- Block[] | +- LocalClassStatement[] | | +- ClassDeclaration[@TypeMirror = "IteratorUtilCopy#SingletonIterator"] @@ -1470,6 +1534,7 @@ Added line: 9168 | | | +- ModifierList[] | | | | +- Annotation[@TypeMirror = "java.lang.Override"] | | | | +- ClassType[@TypeMirror = "java.lang.Override"] +Added line: 2394 | | | +- PrimitiveType[@TypeMirror = "boolean"] | | | +- FormalParameters[] | | | +- Block[] @@ -1509,6 +1574,7 @@ Added line: 8106 | | | | +- TypeArguments[] | | | | +- WildcardType[@TypeMirror = "? super T"] | | | | +- ClassType[@TypeMirror = "T"] +Added line: 8880 | | | +- VariableId[@Name = "action", @TypeMirror = "java.util.function.Consumer<? super T>"] | | +- Block[] | | +- ExpressionStatement[] @@ -1520,7 +1586,6 @@ Added line: 8106 | +- ConstructorCall[@Failed = false, @Function = "IteratorUtilCopy#SingletonIterator.new() -> IteratorUtilCopy#SingletonIterator", @MethodName = "new", @TypeMirror = "IteratorUtilCopy#SingletonIterator", @Unchecked = false, @VarargsCall = false] | +- ClassType[@TypeMirror = "IteratorUtilCopy#SingletonIterator"] | +- ArgumentList[] - +- MethodDeclaration[@Name = "asReversed"] | +- ModifierList[] | +- TypeParameters[] | | +- TypeParameter[@TypeMirror = "T"] @@ -1560,6 +1625,7 @@ Added line: 8106 | | +- VariableAccess[@Name = "lst", @TypeMirror = "java.util.List<T>"] | | +- ArgumentList[] | +- MethodDeclaration[@Name = "hasNext"] +Added line: 5402 | | +- ModifierList[] | | | +- Annotation[@TypeMirror = "java.lang.Override"] | | | +- ClassType[@TypeMirror = "java.lang.Override"] @@ -1568,6 +1634,7 @@ Added line: 8106 | | +- Block[] | | +- ReturnStatement[] | | +- MethodCall[@Failed = false, @Function = "java.util.ListIterator<T>.hasPrevious() -> boolean", @MethodName = "hasPrevious", @TypeMirror = "boolean", @Unchecked = false, @VarargsCall = false] +Added line: 4720 | | +- VariableAccess[@Name = "li", @TypeMirror = "java.util.ListIterator<T>"] | | +- ArgumentList[] | +- MethodDeclaration[@Name = "next"] @@ -1602,9 +1669,11 @@ Added line: 8106 | +- FormalParameters[] | | +- FormalParameter[@TypeMirror = "java.util.Iterator<? extends T>"] | | +- ModifierList[] +Added line: 7284 | | +- ClassType[@TypeMirror = "java.util.Iterator<? extends T>"] | | | +- TypeArguments[] | | | +- WildcardType[@TypeMirror = "? extends T"] +Added line: 6926 | | | +- ClassType[@TypeMirror = "T"] | | +- VariableId[@Name = "iter", @TypeMirror = "java.util.Iterator<? extends T>"] | +- Block[] @@ -1619,10 +1688,13 @@ Added line: 8106 | | +- ArgumentList[] | | +- VariableAccess[@Name = "iter", @TypeMirror = "java.util.Iterator<capture#... of ? extends T>"] | | +- NumericLiteral[@TypeMirror = "int"] +Added line: 5647 | +- BooleanLiteral[@TypeMirror = "boolean"] +- ClassDeclaration[@TypeMirror = "IteratorUtilCopy$AbstractIterator<T>"] | +- ModifierList[] +Added line: 455 | +- TypeParameters[] +Added line: 1217 | | +- TypeParameter[@TypeMirror = "T"] | +- ImplementsList[] | | +- ClassType[@TypeMirror = "java.util.Iterator<T>"] @@ -1630,12 +1702,14 @@ Added line: 8106 | | +- ClassType[@TypeMirror = "T"] | +- ClassBody[] | +- FieldDeclaration[] +Added line: 1403 | | +- ModifierList[] | | +- ClassType[@TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] | | +- VariableDeclarator[] | | +- VariableId[@Name = "state", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] | | +- FieldAccess[@Name = "NOT_READY", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] | | +- TypeExpression[@TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] +Added line: 4261 | | +- ClassType[@TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] | +- FieldDeclaration[] | | +- ModifierList[] @@ -1648,7 +1722,9 @@ Added line: 8106 | | | +- Annotation[@TypeMirror = "java.lang.Override"] | | | +- ClassType[@TypeMirror = "java.lang.Override"] | | +- PrimitiveType[@TypeMirror = "boolean"] +Added line: 2925 | | +- FormalParameters[] +Added line: 716 | | +- Block[] | | +- SwitchStatement[] | | +- VariableAccess[@Name = "state", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] @@ -1661,12 +1737,18 @@ Added line: 8106 | | | +- SwitchLabel[] | | | | +- VariableAccess[@Name = "READY", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] | | | +- ReturnStatement[] +Added line: 6451 | | | +- BooleanLiteral[@TypeMirror = "boolean"] | | +- SwitchFallthroughBranch[] +Added line: 5455 | | +- SwitchLabel[] +Added line: 3403 +Added line: 5354 | | +- ExpressionStatement[] | | | +- AssignmentExpression[@TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] | | | +- VariableAccess[@Name = "state", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] +Added line: 461 +Added line: 7006 | | | +- NullLiteral[@TypeMirror = "null"] | | +- ExpressionStatement[] | | | +- MethodCall[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator<T>.computeNext() -> void", @MethodName = "computeNext", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] @@ -1675,9 +1757,12 @@ Added line: 8106 | | | +- InfixExpression[@TypeMirror = "boolean"] | | | | +- VariableAccess[@Name = "state", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] | | | | +- NullLiteral[@TypeMirror = "null"] +Added line: 573 | | | +- Block[] | | | +- ThrowStatement[] +Added line: 283 | | | +- ConstructorCall[@Failed = false, @Function = "java.lang.IllegalStateException.new(java.lang.String) -> java.lang.IllegalStateException", @MethodName = "new", @TypeMirror = "java.lang.IllegalStateException", @Unchecked = false, @VarargsCall = false] +Added line: 3440 | | | +- ClassType[@TypeMirror = "java.lang.IllegalStateException"] | | | +- ArgumentList[] | | | +- StringLiteral[@TypeMirror = "java.lang.String"] @@ -1716,6 +1801,7 @@ Added line: 8106 | | +- VoidType[@TypeMirror = "void"] | | +- FormalParameters[] | | | +- FormalParameter[@TypeMirror = "T"] +Added line: 6761 | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "T"] | | | +- VariableId[@Name = "t", @TypeMirror = "T"] @@ -1726,6 +1812,7 @@ Added line: 8106 | | | +- VariableAccess[@Name = "t", @TypeMirror = "T"] | | +- ExpressionStatement[] | | +- AssignmentExpression[@TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] +Added line: 9901 | | +- VariableAccess[@Name = "state", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] | | +- FieldAccess[@Name = "READY", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] | | +- TypeExpression[@TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] @@ -1751,20 +1838,19 @@ Added line: 8106 | | +- EnumConstant[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator$State.new() -> IteratorUtilCopy$AbstractIterator$State", @MethodName = "new", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State", @Unchecked = false, @VarargsCall = false] | | | +- ModifierList[] | | | +- VariableId[@Name = "READY", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] +Added line: 4927 | | +- EnumConstant[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator$State.new() -> IteratorUtilCopy$AbstractIterator$State", @MethodName = "new", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State", @Unchecked = false, @VarargsCall = false] | | | +- ModifierList[] | | | +- VariableId[@Name = "NOT_READY", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] | | +- EnumConstant[@Failed = false, @Function = "IteratorUtilCopy$AbstractIterator$State.new() -> IteratorUtilCopy$AbstractIterator$State", @MethodName = "new", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State", @Unchecked = false, @VarargsCall = false] | | +- ModifierList[] | | +- VariableId[@Name = "DONE", @TypeMirror = "IteratorUtilCopy$AbstractIterator$State"] - | +- MethodDeclaration[@Name = "remove"] | +- ModifierList[] | | +- Annotation[@TypeMirror = "java.lang.Deprecated"] | | | +- ClassType[@TypeMirror = "java.lang.Deprecated"] | | +- Annotation[@TypeMirror = "java.lang.Override"] | | +- ClassType[@TypeMirror = "java.lang.Override"] | +- VoidType[@TypeMirror = "void"] - | +- FormalParameters[] | +- Block[] | +- ThrowStatement[] | +- ConstructorCall[@Failed = false, @Function = "java.lang.UnsupportedOperationException.new() -> java.lang.UnsupportedOperationException", @MethodName = "new", @TypeMirror = "java.lang.UnsupportedOperationException", @Unchecked = false, @VarargsCall = false] @@ -1774,6 +1860,7 @@ Added line: 8106 +- ModifierList[] +- TypeParameters[] | +- TypeParameter[@TypeMirror = "T"] +Added line: 9233 +- ExtendsList[] | +- ClassType[@TypeMirror = "IteratorUtilCopy$AbstractIterator<T>"] | +- TypeArguments[] @@ -1806,6 +1893,7 @@ Added line: 8106 | | +- SuperExpression[@TypeMirror = "IteratorUtilCopy$AbstractIterator<T>"] | | +- ArgumentList[] | +- ExpressionStatement[] +Added line: 5826 | | +- AssignmentExpression[@TypeMirror = "T"] | | +- VariableAccess[@Name = "currentValue", @TypeMirror = "T"] | | +- VariableAccess[@Name = "next", @TypeMirror = "T"] @@ -1842,6 +1930,7 @@ Added line: 5853 | +- Block[] | +- ExpressionStatement[] | | +- MethodCall[@Failed = false, @Function = "IteratorUtilCopy$AbstractPausingIterator<T>.ensureReadable() -> void", @MethodName = "ensureReadable", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] +Added line: 764 | | +- ArgumentList[] | +- ReturnStatement[] | +- VariableAccess[@Name = "currentValue", @TypeMirror = "T"] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/NestedLambdasAndMethodCalls.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/NestedLambdasAndMethodCalls.txt index c729da247d..bd44342ddf 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/NestedLambdasAndMethodCalls.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/NestedLambdasAndMethodCalls.txt @@ -1,32 +1,49 @@ +Added line: 8460 +- CompilationUnit[] +- PackageDeclaration[] | +- ModifierList[] +Added line: 3276 +Added line: 2626 +Added line: 6118 +- ImportDeclaration[] +Added line: 1919 +- ImportDeclaration[] Added line: 1688 +- ImportDeclaration[] +- ImportDeclaration[] - +- ClassDeclaration[@TypeMirror = "org.example.unusedPrivateMethod.NestedLambdasAndMethodCalls"] | +- ModifierList[] | +- ClassBody[] | +- MethodDeclaration[@Name = "main"] | | +- ModifierList[] +Added line: 3685 | | +- VoidType[@TypeMirror = "void"] | | +- FormalParameters[] +Added line: 7044 | | | +- FormalParameter[@TypeMirror = "java.lang.String[]"] | | | +- ModifierList[] | | | +- ArrayType[@TypeMirror = "java.lang.String[]"] | | | | +- ClassType[@TypeMirror = "java.lang.String"] | | | | +- ArrayDimensions[] - | | | | +- ArrayTypeDim[] +Added line: 5780 +Added line: 6317 +Added line: 1842 | | | +- VariableId[@Name = "args", @TypeMirror = "java.lang.String[]"] +Added line: 5352 +Added line: 6776 +Added line: 372 | | +- Block[] | | +- LocalVariableDeclaration[] | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "org.example.unusedPrivateMethod.Library"] | | | +- VariableDeclarator[] +Added line: 1595 | | | +- VariableId[@Name = "library", @TypeMirror = "org.example.unusedPrivateMethod.Library"] +Added line: 84 +Added line: 575 | | | +- ConstructorCall[@Failed = false, @Function = "org.example.unusedPrivateMethod.Library.new(java.util.Collection<org.example.unusedPrivateMethod.Book>) -> org.example.unusedPrivateMethod.Library", @MethodName = "new", @TypeMirror = "org.example.unusedPrivateMethod.Library", @Unchecked = false, @VarargsCall = false] +Added line: 8543 +Added line: 6909 +Added line: 9788 | | | +- ClassType[@TypeMirror = "org.example.unusedPrivateMethod.Library"] | | | +- ArgumentList[] | | | +- MethodCall[@Failed = false, @Function = "java.util.Collections.<T> emptySet() -> java.util.Set<org.example.unusedPrivateMethod.Book>", @MethodName = "emptySet", @TypeMirror = "java.util.Set<org.example.unusedPrivateMethod.Book>", @Unchecked = false, @VarargsCall = false] @@ -34,104 +51,148 @@ Added line: 1688 | | +- LocalVariableDeclaration[] | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] +Added line: 4252 | | | | +- TypeArguments[] +Added line: 7582 | | | | +- ClassType[@TypeMirror = "java.lang.String"] | | | | +- ClassType[@TypeMirror = "java.util.Map<java.lang.String, java.lang.String>"] | | | | +- TypeArguments[] | | | | +- ClassType[@TypeMirror = "java.lang.String"] | | | | +- ClassType[@TypeMirror = "java.lang.String"] +Added line: 4403 +Added line: 594 | | | +- VariableDeclarator[] | | | +- VariableId[@Name = "map", @TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] | | | +- MethodCall[@Failed = true, @Function = "(*unknown*).(*unknown method*)() -> (*unknown*)", @MethodName = "run", @TypeMirror = "(*unknown*)", @Unchecked = false, @VarargsCall = false] +Added line: 9449 | | | +- ConstructorCall[@Failed = true, @Function = "(*unknown*).(*unknown method*)() -> (*unknown*)", @MethodName = "new", @TypeMirror = "*Main", @Unchecked = false, @VarargsCall = false] +Added line: 9037 | | | | +- ClassType[@TypeMirror = "*Main"] | | | | +- ArgumentList[] +Added line: 6157 +Added line: 721 | | | +- ArgumentList[] | | | +- VariableAccess[@Name = "library", @TypeMirror = "org.example.unusedPrivateMethod.Library"] | | +- ExpressionStatement[] | | +- MethodCall[@Failed = false, @Function = "java.io.PrintStream.println(java.lang.Object) -> void", @MethodName = "println", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] Added line: 7649 +Added line: 8128 +Added line: 1181 | | +- FieldAccess[@Name = "out", @TypeMirror = "java.io.PrintStream"] | | | +- TypeExpression[@TypeMirror = "java.lang.System"] +Added line: 6446 +Added line: 962 | | | +- ClassType[@TypeMirror = "java.lang.System"] +Added line: 9145 | | +- ArgumentList[] | | +- VariableAccess[@Name = "map", @TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] | +- MethodDeclaration[@Name = "run"] | | +- ModifierList[] | | +- ClassType[@TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] +Added line: 8625 | | | +- ClassType[@TypeMirror = "java.lang.String"] | | | +- ClassType[@TypeMirror = "java.util.Map<java.lang.String, java.lang.String>"] +Added line: 5543 | | | +- TypeArguments[] - | | | +- ClassType[@TypeMirror = "java.lang.String"] +Added line: 1610 +Added line: 1262 | | | +- ClassType[@TypeMirror = "java.lang.String"] | | +- FormalParameters[] +Added line: 489 +Added line: 1017 | | | +- FormalParameter[@TypeMirror = "org.example.unusedPrivateMethod.Library"] | | | +- ModifierList[] +Added line: 6479 | | | +- ClassType[@TypeMirror = "org.example.unusedPrivateMethod.Library"] +Added line: 9088 +Added line: 2394 | | | +- VariableId[@Name = "library", @TypeMirror = "org.example.unusedPrivateMethod.Library"] | | +- Block[] | | +- ReturnStatement[] | | +- MethodCall[@Failed = false, @Function = "java.util.Optional<java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>.orElse(java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>) -> java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>", @MethodName = "orElse", @TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>", @Unchecked = false, @VarargsCall = false] | | +- MethodCall[@Failed = false, @Function = "java.util.stream.Stream<java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>.reduce(java.util.function.BinaryOperator<java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>) -> java.util.Optional<java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>", @MethodName = "reduce", @TypeMirror = "java.util.Optional<java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>", @Unchecked = false, @VarargsCall = false] +Added line: 8603 +Added line: 3998 | | | +- MethodCall[@Failed = false, @Function = "java.util.stream.Stream<org.example.unusedPrivateMethod.Book>.<R> map(java.util.function.Function<? super org.example.unusedPrivateMethod.Book, ? extends java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>) -> java.util.stream.Stream<java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>", @MethodName = "map", @TypeMirror = "java.util.stream.Stream<java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>", @Unchecked = false, @VarargsCall = false] Added line: 6466 | | | | +- MethodCall[@Failed = false, @Function = "java.util.Collection<org.example.unusedPrivateMethod.Book>.stream() -> java.util.stream.Stream<org.example.unusedPrivateMethod.Book>", @MethodName = "stream", @TypeMirror = "java.util.stream.Stream<org.example.unusedPrivateMethod.Book>", @Unchecked = false, @VarargsCall = false] | | | | | +- MethodCall[@Failed = false, @Function = "org.example.unusedPrivateMethod.Library.books() -> java.util.Collection<org.example.unusedPrivateMethod.Book>", @MethodName = "books", @TypeMirror = "java.util.Collection<org.example.unusedPrivateMethod.Book>", @Unchecked = false, @VarargsCall = false] +Added line: 9820 | | | | | | +- VariableAccess[@Name = "library", @TypeMirror = "org.example.unusedPrivateMethod.Library"] | | | | | | +- ArgumentList[] | | | | | +- ArgumentList[] | | | | +- ArgumentList[] | | | | +- LambdaExpression[@TypeMirror = "java.util.function.Function<org.example.unusedPrivateMethod.Book, java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>"] | | | | +- LambdaParameterList[] +Added line: 5579 | | | | | +- LambdaParameter[@TypeMirror = "org.example.unusedPrivateMethod.Book"] | | | | | +- ModifierList[] | | | | | +- VariableId[@Name = "book", @TypeMirror = "org.example.unusedPrivateMethod.Book"] | | | | +- MethodCall[@Failed = false, @Function = "java.util.stream.Stream<org.example.unusedPrivateMethod.Lender>.<R, A> collect(java.util.stream.Collector<? super org.example.unusedPrivateMethod.Lender, java.lang.Object, java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>) -> java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>", @MethodName = "collect", @TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>", @Unchecked = false, @VarargsCall = false] | | | | +- MethodCall[@Failed = false, @Function = "java.util.Collection<org.example.unusedPrivateMethod.Lender>.stream() -> java.util.stream.Stream<org.example.unusedPrivateMethod.Lender>", @MethodName = "stream", @TypeMirror = "java.util.stream.Stream<org.example.unusedPrivateMethod.Lender>", @Unchecked = false, @VarargsCall = false] | | | | | +- MethodCall[@Failed = false, @Function = "org.example.unusedPrivateMethod.Book.lenders() -> java.util.Collection<org.example.unusedPrivateMethod.Lender>", @MethodName = "lenders", @TypeMirror = "java.util.Collection<org.example.unusedPrivateMethod.Lender>", @Unchecked = false, @VarargsCall = false] +Added line: 603 | | | | | | +- VariableAccess[@Name = "book", @TypeMirror = "org.example.unusedPrivateMethod.Book"] +Added line: 7742 | | | | | | +- ArgumentList[] +Added line: 6177 | | | | | +- ArgumentList[] +Added line: 667 | | | | +- ArgumentList[] | | | | +- MethodCall[@Failed = false, @Function = "java.util.stream.Collectors.<T, K, U> toMap(java.util.function.Function<? super org.example.unusedPrivateMethod.Lender, ? extends java.lang.String>, java.util.function.Function<? super org.example.unusedPrivateMethod.Lender, ? extends java.util.Map<java.lang.String, java.lang.String>>) -> java.util.stream.Collector<org.example.unusedPrivateMethod.Lender, java.lang.Object, java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>", @MethodName = "toMap", @TypeMirror = "java.util.stream.Collector<org.example.unusedPrivateMethod.Lender, java.lang.Object, java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>", @Unchecked = false, @VarargsCall = false] | | | | +- TypeExpression[@TypeMirror = "java.util.stream.Collectors"] | | | | | +- ClassType[@TypeMirror = "java.util.stream.Collectors"] +Added line: 5694 | | | | +- ArgumentList[] | | | | +- MethodReference[@TypeMirror = "java.util.function.Function<org.example.unusedPrivateMethod.Lender, java.lang.String>"] | | | | | +- TypeExpression[@TypeMirror = "org.example.unusedPrivateMethod.Lender"] | | | | | +- ClassType[@TypeMirror = "org.example.unusedPrivateMethod.Lender"] | | | | +- LambdaExpression[@TypeMirror = "java.util.function.Function<org.example.unusedPrivateMethod.Lender, java.util.Map<java.lang.String, java.lang.String>>"] | | | | +- LambdaParameterList[] +Added line: 7337 | | | | | +- LambdaParameter[@TypeMirror = "org.example.unusedPrivateMethod.Lender"] +Added line: 9243 | | | | | +- ModifierList[] | | | | | +- VariableId[@Name = "lender", @TypeMirror = "org.example.unusedPrivateMethod.Lender"] | | | | +- MethodCall[@Failed = false, @Function = "java.util.Map.<K, V> of(java.lang.String, java.lang.String) -> java.util.Map<java.lang.String, java.lang.String>", @MethodName = "of", @TypeMirror = "java.util.Map<java.lang.String, java.lang.String>", @Unchecked = false, @VarargsCall = false] +Added line: 3289 | | | | +- TypeExpression[@TypeMirror = "java.util.Map"] | | | | | +- ClassType[@TypeMirror = "java.util.Map"] | | | | +- ArgumentList[] | | | | +- MethodCall[@Failed = false, @Function = "org.example.unusedPrivateMethod.Book.title() -> java.lang.String", @MethodName = "title", @TypeMirror = "java.lang.String", @Unchecked = false, @VarargsCall = false] | | | | | +- VariableAccess[@Name = "book", @TypeMirror = "org.example.unusedPrivateMethod.Book"] | | | | | +- ArgumentList[] +Added line: 5252 +Added line: 5096 +Added line: 8097 | | | | +- MethodCall[@Failed = false, @Function = "org.example.unusedPrivateMethod.Lender.status() -> java.lang.String", @MethodName = "status", @TypeMirror = "java.lang.String", @Unchecked = false, @VarargsCall = false] +Added line: 5554 | | | | +- VariableAccess[@Name = "lender", @TypeMirror = "org.example.unusedPrivateMethod.Lender"] | | | | +- ArgumentList[] | | | +- ArgumentList[] +Added line: 5628 +Added line: 6736 | | | +- MethodReference[@TypeMirror = "java.util.function.BinaryOperator<java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>>"] | | | +- ThisExpression[@TypeMirror = "org.example.unusedPrivateMethod.NestedLambdasAndMethodCalls"] | | +- ArgumentList[] | | +- NullLiteral[@TypeMirror = "null"] | +- MethodDeclaration[@Name = "reduceBooksAndLenderStatusByLender"] +Added line: 6414 | +- ModifierList[] | +- ClassType[@TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] | | +- TypeArguments[] | | +- ClassType[@TypeMirror = "java.lang.String"] Added line: 6740 | | +- ClassType[@TypeMirror = "java.util.Map<java.lang.String, java.lang.String>"] +Added line: 8107 | | +- TypeArguments[] +Added line: 4188 | | +- ClassType[@TypeMirror = "java.lang.String"] | | +- ClassType[@TypeMirror = "java.lang.String"] | +- FormalParameters[] | | +- FormalParameter[@TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] +Added line: 8262 +Added line: 4981 | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] | | | | +- TypeArguments[] @@ -144,53 +205,81 @@ Added line: 8935 | | | +- VariableId[@Name = "previousMap", @TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] | | +- FormalParameter[@TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] | | +- ModifierList[] +Added line: 6536 +Added line: 661 | | +- ClassType[@TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] | | | +- TypeArguments[] +Added line: 3582 | | | +- ClassType[@TypeMirror = "java.lang.String"] | | | +- ClassType[@TypeMirror = "java.util.Map<java.lang.String, java.lang.String>"] +Added line: 9925 | | | +- TypeArguments[] | | | +- ClassType[@TypeMirror = "java.lang.String"] - | | | +- ClassType[@TypeMirror = "java.lang.String"] +Added line: 9139 | | +- VariableId[@Name = "nextMap", @TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] - | +- Block[] | +- ExpressionStatement[] +Added line: 5508 | | +- MethodCall[@Failed = false, @Function = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>.putAll(java.util.Map<? extends java.lang.String, ? extends java.util.Map<java.lang.String, java.lang.String>>) -> void", @MethodName = "putAll", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | | +- VariableAccess[@Name = "previousMap", @TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] | | +- ArgumentList[] - | | +- VariableAccess[@Name = "nextMap", @TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] +Added line: 4606 | +- ReturnStatement[] | +- VariableAccess[@Name = "previousMap", @TypeMirror = "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>"] +Added line: 3437 +- RecordDeclaration[@TypeMirror = "org.example.unusedPrivateMethod.Lender"] +Added line: 7687 +Added line: 3125 | +- RecordComponentList[] +Added line: 8749 | | +- RecordComponent[@TypeMirror = "java.lang.String"] | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "java.lang.String"] +Added line: 597 | | | +- VariableId[@Name = "name", @TypeMirror = "java.lang.String"] +Added line: 2940 +Added line: 9654 | | +- RecordComponent[@TypeMirror = "java.lang.String"] +Added line: 7281 | | +- ModifierList[] +Added line: 8141 | | +- ClassType[@TypeMirror = "java.lang.String"] | | +- VariableId[@Name = "status", @TypeMirror = "java.lang.String"] | +- RecordBody[] +- RecordDeclaration[@TypeMirror = "org.example.unusedPrivateMethod.Book"] +Added line: 9190 +Added line: 5765 | +- ModifierList[] +Added line: 3726 | +- RecordComponentList[] | | +- RecordComponent[@TypeMirror = "java.lang.String"] +Added line: 7847 | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "java.lang.String"] | | | +- VariableId[@Name = "title", @TypeMirror = "java.lang.String"] | | +- RecordComponent[@TypeMirror = "java.util.Collection<org.example.unusedPrivateMethod.Lender>"] +Added line: 5147 | | +- ModifierList[] +Added line: 3420 +Added line: 7743 +Added line: 115 +Added line: 4661 | | +- ClassType[@TypeMirror = "java.util.Collection<org.example.unusedPrivateMethod.Lender>"] | | | +- TypeArguments[] | | | +- ClassType[@TypeMirror = "org.example.unusedPrivateMethod.Lender"] +Added line: 9841 | | +- VariableId[@Name = "lenders", @TypeMirror = "java.util.Collection<org.example.unusedPrivateMethod.Lender>"] +Added line: 2420 | +- RecordBody[] +- ModifierList[] +- RecordComponentList[] | +- RecordComponent[@TypeMirror = "java.util.Collection<org.example.unusedPrivateMethod.Book>"] +Added line: 9747 | +- ModifierList[] | +- ClassType[@TypeMirror = "java.util.Collection<org.example.unusedPrivateMethod.Book>"] - | | +- TypeArguments[] - | | +- ClassType[@TypeMirror = "org.example.unusedPrivateMethod.Book"] +Added line: 507 | +- VariableId[@Name = "books", @TypeMirror = "java.util.Collection<org.example.unusedPrivateMethod.Book>"] +- RecordBody[] +Added line: 774 +Added line: 8006 +Added line: 9914 +Added line: 1197 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/SwitchExpressionWithPatterns.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/SwitchExpressionWithPatterns.txt index e1cc096dfc..442a8387ba 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/SwitchExpressionWithPatterns.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/SwitchExpressionWithPatterns.txt @@ -1,42 +1,131 @@ +Added line: 9627 +Added line: 71 +Added line: 2478 +- CompilationUnit[] +- ClassDeclaration[@TypeMirror = "Example"] +Added line: 3700 +Added line: 4525 +Added line: 6501 +Added line: 7970 +Added line: 1484 +- ModifierList[] +Added line: 5045 +Added line: 1482 +Added line: 1361 +- ClassBody[] +Added line: 5661 +- MethodDeclaration[@Name = "foo"] +Added line: 3296 +Added line: 1119 +- ModifierList[] +Added line: 5802 +Added line: 8478 +Added line: 5800 +Added line: 2191 +Added line: 9190 +- ClassType[@TypeMirror = "java.lang.String"] - +- FormalParameters[] +Added line: 5690 | +- FormalParameter[@TypeMirror = "java.lang.Object"] +Added line: 523 | +- ModifierList[] +Added line: 8332 +Added line: 1514 | +- ClassType[@TypeMirror = "java.lang.Object"] +Added line: 2099 +Added line: 3468 | +- VariableId[@Name = "foo", @TypeMirror = "java.lang.Object"] +- Block[] +Added line: 7000 +Added line: 7059 +Added line: 3869 +- ReturnStatement[] +Added line: 3233 +Added line: 7576 +Added line: 89 +- SwitchExpression[@TypeMirror = "java.lang.String"] +Added line: 4335 +- VariableAccess[@Name = "foo", @TypeMirror = "java.lang.Object"] +- SwitchArrowBranch[] - | +- SwitchLabel[] +Added line: 8567 +Added line: 2298 +Added line: 9720 +Added line: 1879 +Added line: 9142 | | +- TypePattern[@TypeMirror = "char[]"] | | +- ModifierList[] +Added line: 2759 +Added line: 8504 +Added line: 9278 | | +- ArrayType[@TypeMirror = "char[]"] - | | | +- PrimitiveType[@TypeMirror = "char"] +Added line: 3254 +Added line: 7961 +Added line: 285 +Added line: 1909 +Added line: 6865 +Added line: 9165 +Added line: 8460 +Added line: 4863 +Added line: 9240 +Added line: 8477 | | | +- ArrayDimensions[] +Added line: 2910 | | | +- ArrayTypeDim[] +Added line: 6744 +Added line: 9298 +Added line: 3669 +Added line: 3015 +Added line: 3120 +Added line: 9590 +Added line: 6055 +Added line: 710 +Added line: 1297 | | +- VariableId[@Name = "array", @TypeMirror = "char[]"] +Added line: 292 | +- ConstructorCall[@Failed = false, @Function = "java.lang.String.new(char[]) -> java.lang.String", @MethodName = "new", @TypeMirror = "java.lang.String", @Unchecked = false, @VarargsCall = false] +Added line: 675 | +- ClassType[@TypeMirror = "java.lang.String"] | +- ArgumentList[] +Added line: 2783 | +- VariableAccess[@Name = "array", @TypeMirror = "char[]"] +- SwitchArrowBranch[] | +- SwitchLabel[] | | +- TypePattern[@TypeMirror = "java.lang.String"] | | +- ModifierList[] +Added line: 6170 +Added line: 2981 | | +- ClassType[@TypeMirror = "java.lang.String"] +Added line: 7577 +Added line: 7139 +Added line: 1076 +Added line: 4205 | | +- VariableId[@Name = "string", @TypeMirror = "java.lang.String"] | +- VariableAccess[@Name = "string", @TypeMirror = "java.lang.String"] +Added line: 4905 +Added line: 7491 +Added line: 136 +- SwitchArrowBranch[] +Added line: 8437 +Added line: 5474 +Added line: 8908 +Added line: 1430 +Added line: 3265 +- SwitchLabel[] +Added line: 7560 +Added line: 2853 +Added line: 1957 +Added line: 1663 +Added line: 590 +- ThrowStatement[] +Added line: 8873 +Added line: 462 +- ConstructorCall[@Failed = false, @Function = "java.lang.RuntimeException.new() -> java.lang.RuntimeException", @MethodName = "new", @TypeMirror = "java.lang.RuntimeException", @Unchecked = false, @VarargsCall = false] +Added line: 6006 +Added line: 9769 +Added line: 4160 +Added line: 2719 +Added line: 8307 +Added line: 2915 +- ClassType[@TypeMirror = "java.lang.RuntimeException"] +Added line: 7755 +- ArgumentList[] +Added line: 9001 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/UnnamedPatterns.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/UnnamedPatterns.txt index e1fa78ded1..c1cf772de9 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/UnnamedPatterns.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/UnnamedPatterns.txt @@ -1,7 +1,9 @@ +- CompilationUnit[] +- ImportDeclaration[] +Added line: 8687 +- ImportDeclaration[] +- ImportDeclaration[] +Added line: 7372 +- ImportDeclaration[] +- ClassDeclaration[@TypeMirror = "Jep456_UnamedPatternsAndVariables"] +- ModifierList[] @@ -16,16 +18,21 @@ | | +- RecordComponent[@TypeMirror = "int"] | | +- ModifierList[] | | +- PrimitiveType[@TypeMirror = "int"] +Added line: 5788 | | +- VariableId[@Name = "y", @TypeMirror = "int"] | +- RecordBody[] +- EnumDeclaration[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Color"] | +- ModifierList[] | +- EnumBody[] | +- EnumConstant[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables$Color.new() -> Jep456_UnamedPatternsAndVariables$Color", @MethodName = "new", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Color", @Unchecked = false, @VarargsCall = false] +Added line: 6479 | | +- ModifierList[] | | +- VariableId[@Name = "RED", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Color"] +Added line: 1506 | +- EnumConstant[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables$Color.new() -> Jep456_UnamedPatternsAndVariables$Color", @MethodName = "new", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Color", @Unchecked = false, @VarargsCall = false] | | +- ModifierList[] +Added line: 7333 +Added line: 4036 | | +- VariableId[@Name = "GREEN", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Color"] | +- EnumConstant[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables$Color.new() -> Jep456_UnamedPatternsAndVariables$Color", @MethodName = "new", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Color", @Unchecked = false, @VarargsCall = false] | +- ModifierList[] @@ -49,9 +56,13 @@ | +- Block[] | +- LocalVariableDeclaration[] | | +- ModifierList[] +Added line: 8584 | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$ColoredPoint"] | | +- VariableDeclarator[] | | +- VariableId[@Name = "r", @TypeMirror = "Jep456_UnamedPatternsAndVariables$ColoredPoint"] +Added line: 7524 +Added line: 1604 +Added line: 5811 | | +- ConstructorCall[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables$ColoredPoint.new(Jep456_UnamedPatternsAndVariables$Point, Jep456_UnamedPatternsAndVariables$Color) -> Jep456_UnamedPatternsAndVariables$ColoredPoint", @MethodName = "new", @TypeMirror = "Jep456_UnamedPatternsAndVariables$ColoredPoint", @Unchecked = false, @VarargsCall = false] | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$ColoredPoint"] | | +- ArgumentList[] @@ -59,11 +70,14 @@ | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Point"] | | | +- ArgumentList[] | | | +- NumericLiteral[@TypeMirror = "int"] +Added line: 6811 +Added line: 1202 | | | +- NumericLiteral[@TypeMirror = "int"] | | +- FieldAccess[@Name = "GREEN", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Color"] | | +- TypeExpression[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Color"] | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Color"] | +- IfStatement[] +Added line: 1718 | | +- InfixExpression[@TypeMirror = "boolean"] | | | +- VariableAccess[@Name = "r", @TypeMirror = "Jep456_UnamedPatternsAndVariables$ColoredPoint"] | | | +- PatternExpression[@TypeMirror = "Jep456_UnamedPatternsAndVariables$ColoredPoint"] @@ -76,14 +90,17 @@ | | | | +- VariableId[@Name = "p", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Point"] | | | +- TypePattern[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Color"] | | | +- ModifierList[] +Added line: 6267 | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Color"] | | | +- VariableId[@Name = "_", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Color"] | | +- Block[] | | +- ExpressionStatement[] | | +- MethodCall[@Failed = false, @Function = "java.io.PrintStream.println(java.lang.String) -> void", @MethodName = "println", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | | +- FieldAccess[@Name = "out", @TypeMirror = "java.io.PrintStream"] +Added line: 7040 | | | +- TypeExpression[@TypeMirror = "java.lang.System"] | | | +- ClassType[@TypeMirror = "java.lang.System"] +Added line: 9791 | | +- ArgumentList[] | | +- InfixExpression[@TypeMirror = "java.lang.String"] | | +- InfixExpression[@TypeMirror = "java.lang.String"] @@ -91,6 +108,7 @@ | | | | +- VariableAccess[@Name = "p", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Point"] | | | | +- ArgumentList[] | | | +- StringLiteral[@TypeMirror = "java.lang.String"] +Added line: 8328 | | +- MethodCall[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables$Point.y() -> int", @MethodName = "y", @TypeMirror = "int", @Unchecked = false, @VarargsCall = false] | | +- VariableAccess[@Name = "p", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Point"] | | +- ArgumentList[] @@ -103,7 +121,8 @@ | | +- PatternList[] | | +- RecordPattern[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Point"] | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Point"] - | | | +- PatternList[] +Added line: 60 +Added line: 2278 | | | +- TypePattern[@TypeMirror = "int"] | | | | +- ModifierList[] | | | | +- PrimitiveType[@TypeMirror = "int"] @@ -116,9 +135,12 @@ | +- Block[] | +- ExpressionStatement[] | +- MethodCall[@Failed = false, @Function = "java.io.PrintStream.println(java.lang.String) -> void", @MethodName = "println", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] +Added line: 3037 +Added line: 5139 | +- FieldAccess[@Name = "out", @TypeMirror = "java.io.PrintStream"] | | +- TypeExpression[@TypeMirror = "java.lang.System"] | | +- ClassType[@TypeMirror = "java.lang.System"] +Added line: 8098 | +- ArgumentList[] | +- InfixExpression[@TypeMirror = "java.lang.String"] | +- InfixExpression[@TypeMirror = "java.lang.String"] @@ -143,16 +165,21 @@ | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables#Ball"] | +- ClassBody[] +- ClassDeclaration[@TypeMirror = "Jep456_UnamedPatternsAndVariables#GreenBall"] +Added line: 9730 | +- ModifierList[] | +- ExtendsList[] | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables#Ball"] | +- ClassBody[] +Added line: 5014 +- RecordDeclaration[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<T extends Jep456_UnamedPatternsAndVariables#Ball>"] | +- ModifierList[] | +- TypeParameters[] | | +- TypeParameter[@TypeMirror = "T"] +Added line: 8310 | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables#Ball"] | +- RecordComponentList[] +Added line: 2086 +Added line: 454 | | +- RecordComponent[@TypeMirror = "T"] | | +- ModifierList[] | | +- ClassType[@TypeMirror = "T"] @@ -169,6 +196,7 @@ | | | +- TypeArguments[] | | | +- WildcardType[@TypeMirror = "? extends Jep456_UnamedPatternsAndVariables#Ball"] | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables#Ball"] +Added line: 8398 | | +- VariableDeclarator[] | | +- VariableId[@Name = "b", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<? extends Jep456_UnamedPatternsAndVariables#Ball>"] | | +- ConstructorCall[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables$Box<Jep456_UnamedPatternsAndVariables#RedBall>.new(Jep456_UnamedPatternsAndVariables#RedBall) -> Jep456_UnamedPatternsAndVariables$Box<Jep456_UnamedPatternsAndVariables#RedBall>", @MethodName = "new", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<Jep456_UnamedPatternsAndVariables#RedBall>", @Unchecked = false, @VarargsCall = false] @@ -188,37 +216,47 @@ | | | | +- TypePattern[@TypeMirror = "Jep456_UnamedPatternsAndVariables#RedBall"] | | | | +- ModifierList[] | | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables#RedBall"] +Added line: 8315 | | | | +- VariableId[@Name = "_", @TypeMirror = "Jep456_UnamedPatternsAndVariables#RedBall"] | | | +- MethodCall[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables.processBox(Jep456_UnamedPatternsAndVariables$Box<? extends Jep456_UnamedPatternsAndVariables#Ball>) -> void", @MethodName = "processBox", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | | | +- ArgumentList[] +Added line: 7812 +Added line: 6441 | | | +- VariableAccess[@Name = "b", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<capture#... of ? extends Jep456_UnamedPatternsAndVariables#Ball>"] | | +- SwitchArrowBranch[] | | | +- SwitchLabel[] | | | | +- RecordPattern[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<capture#... of ? extends Jep456_UnamedPatternsAndVariables#Ball>"] | | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box"] | | | | +- PatternList[] +Added line: 7283 | | | | +- TypePattern[@TypeMirror = "Jep456_UnamedPatternsAndVariables#BlueBall"] | | | | +- ModifierList[] +Added line: 1336 | | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables#BlueBall"] | | | | +- VariableId[@Name = "_", @TypeMirror = "Jep456_UnamedPatternsAndVariables#BlueBall"] | | | +- MethodCall[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables.processBox(Jep456_UnamedPatternsAndVariables$Box<? extends Jep456_UnamedPatternsAndVariables#Ball>) -> void", @MethodName = "processBox", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | | | +- ArgumentList[] +Added line: 780 | | | +- VariableAccess[@Name = "b", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<capture#... of ? extends Jep456_UnamedPatternsAndVariables#Ball>"] | | +- SwitchArrowBranch[] | | +- SwitchLabel[] | | | +- RecordPattern[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<capture#... of ? extends Jep456_UnamedPatternsAndVariables#Ball>"] | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box"] | | | +- PatternList[] +Added line: 6611 | | | +- TypePattern[@TypeMirror = "Jep456_UnamedPatternsAndVariables#GreenBall"] | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables#GreenBall"] | | | +- VariableId[@Name = "_", @TypeMirror = "Jep456_UnamedPatternsAndVariables#GreenBall"] | | +- MethodCall[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables.stopProcessing() -> void", @MethodName = "stopProcessing", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] +Added line: 8884 | | +- ArgumentList[] | +- SwitchStatement[] | | +- VariableAccess[@Name = "b", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<capture#... of ? extends Jep456_UnamedPatternsAndVariables#Ball>"] +Added line: 6242 | | +- SwitchArrowBranch[] | | | +- SwitchLabel[] +Added line: 4309 | | | | +- RecordPattern[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<capture#... of ? extends Jep456_UnamedPatternsAndVariables#Ball>"] | | | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box"] | | | | | +- PatternList[] @@ -235,9 +273,11 @@ | | | | +- VariableId[@Name = "_", @TypeMirror = "Jep456_UnamedPatternsAndVariables#BlueBall"] | | | +- MethodCall[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables.processBox(Jep456_UnamedPatternsAndVariables$Box<? extends Jep456_UnamedPatternsAndVariables#Ball>) -> void", @MethodName = "processBox", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | | | +- ArgumentList[] +Added line: 7577 | | | +- VariableAccess[@Name = "b", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<capture#... of ? extends Jep456_UnamedPatternsAndVariables#Ball>"] | | +- SwitchArrowBranch[] | | | +- SwitchLabel[] +Added line: 7820 | | | | +- RecordPattern[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<capture#... of ? extends Jep456_UnamedPatternsAndVariables#Ball>"] | | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box"] | | | | +- PatternList[] @@ -254,20 +294,25 @@ | | | +- PatternList[] | | | +- UnnamedPattern[@TypeMirror = "capture#... of ? extends Jep456_UnamedPatternsAndVariables#Ball"] | | +- MethodCall[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables.pickAnotherBox() -> void", @MethodName = "pickAnotherBox", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] +Added line: 2270 | | +- ArgumentList[] | +- LocalVariableDeclaration[] | | +- ModifierList[] +Added line: 2415 | | +- PrimitiveType[@TypeMirror = "int"] | | +- VariableDeclarator[] | | +- VariableId[@Name = "x", @TypeMirror = "int"] | | +- NumericLiteral[@TypeMirror = "int"] | +- SwitchStatement[] | +- VariableAccess[@Name = "b", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<capture#... of ? extends Jep456_UnamedPatternsAndVariables#Ball>"] +Added line: 6131 | +- SwitchArrowBranch[] | | +- SwitchLabel[] | | | +- RecordPattern[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<capture#... of ? extends Jep456_UnamedPatternsAndVariables#Ball>"] | | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box"] +Added line: 2246 | | | | +- PatternList[] +Added line: 4669 | | | | +- TypePattern[@TypeMirror = "Jep456_UnamedPatternsAndVariables#RedBall"] | | | | +- ModifierList[] | | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables#RedBall"] @@ -296,8 +341,8 @@ | +- ArgumentList[] +- MethodDeclaration[@Name = "processBox"] | +- ModifierList[] - | +- VoidType[@TypeMirror = "void"] | +- FormalParameters[] +Added line: 3314 | | +- FormalParameter[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<? extends Jep456_UnamedPatternsAndVariables#Ball>"] | | +- ModifierList[] | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Box<? extends Jep456_UnamedPatternsAndVariables#Ball>"] @@ -316,14 +361,17 @@ | +- VoidType[@TypeMirror = "void"] | +- FormalParameters[] | +- Block[] +Added line: 4620 +- ClassDeclaration[@TypeMirror = "Jep456_UnamedPatternsAndVariables#Order"] | +- ModifierList[] | +- ClassBody[] +- FieldDeclaration[] | +- ModifierList[] | +- PrimitiveType[@TypeMirror = "int"] +Added line: 7333 | +- VariableDeclarator[] | +- VariableId[@Name = "LIMIT", @TypeMirror = "int"] +Added line: 9467 | +- NumericLiteral[@TypeMirror = "int"] +- MethodDeclaration[@Name = "sideEffect"] | +- ModifierList[] @@ -342,6 +390,7 @@ | | | +- TypeArguments[] | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables#Order"] | | +- VariableId[@Name = "orders", @TypeMirror = "java.util.List<Jep456_UnamedPatternsAndVariables#Order>"] +Added line: 7017 | +- Block[] | +- LocalVariableDeclaration[] | | +- ModifierList[] @@ -350,14 +399,17 @@ | | +- VariableId[@Name = "total", @TypeMirror = "int"] | | +- NumericLiteral[@TypeMirror = "int"] | +- ForeachStatement[] +Added line: 2706 | | +- LocalVariableDeclaration[] +Added line: 6710 | | | +- ModifierList[] +Added line: 3829 | | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables#Order"] | | | +- VariableDeclarator[] - | | | +- VariableId[@Name = "_", @TypeMirror = "Jep456_UnamedPatternsAndVariables#Order"] | | +- VariableAccess[@Name = "orders", @TypeMirror = "java.util.List<Jep456_UnamedPatternsAndVariables#Order>"] | | +- Block[] | | +- IfStatement[] +Added line: 425 | | +- InfixExpression[@TypeMirror = "boolean"] | | | +- VariableAccess[@Name = "total", @TypeMirror = "int"] | | | +- VariableAccess[@Name = "LIMIT", @TypeMirror = "int"] @@ -370,8 +422,10 @@ | | +- FieldAccess[@Name = "out", @TypeMirror = "java.io.PrintStream"] | | | +- TypeExpression[@TypeMirror = "java.lang.System"] | | | +- ClassType[@TypeMirror = "java.lang.System"] +Added line: 4265 | | +- ArgumentList[] | | +- InfixExpression[@TypeMirror = "java.lang.String"] +Added line: 4313 | | +- StringLiteral[@TypeMirror = "java.lang.String"] | | +- VariableAccess[@Name = "total", @TypeMirror = "int"] | +- ForStatement[] @@ -381,44 +435,49 @@ | | | +- PrimitiveType[@TypeMirror = "int"] | | | +- VariableDeclarator[] | | | | +- VariableId[@Name = "i", @TypeMirror = "int"] +Added line: 1517 | | | | +- NumericLiteral[@TypeMirror = "int"] | | | +- VariableDeclarator[] | | | +- VariableId[@Name = "_", @TypeMirror = "int"] | | | +- MethodCall[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables.sideEffect() -> int", @MethodName = "sideEffect", @TypeMirror = "int", @Unchecked = false, @VarargsCall = false] | | | +- ArgumentList[] +Added line: 6270 | | +- InfixExpression[@TypeMirror = "boolean"] | | | +- VariableAccess[@Name = "i", @TypeMirror = "int"] | | | +- NumericLiteral[@TypeMirror = "int"] | | +- ForUpdate[] | | | +- StatementExpressionList[] | | | +- UnaryExpression[@TypeMirror = "int"] +Added line: 5027 | | | +- VariableAccess[@Name = "i", @TypeMirror = "int"] | | +- Block[] | | +- ExpressionStatement[] +Added line: 7415 | | +- MethodCall[@Failed = false, @Function = "java.io.PrintStream.println(int) -> void", @MethodName = "println", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | | +- FieldAccess[@Name = "out", @TypeMirror = "java.io.PrintStream"] | | | +- TypeExpression[@TypeMirror = "java.lang.System"] | | | +- ClassType[@TypeMirror = "java.lang.System"] +Added line: 3457 | | +- ArgumentList[] | | +- VariableAccess[@Name = "i", @TypeMirror = "int"] | +- LocalVariableDeclaration[] | | +- ModifierList[] | | +- ClassType[@TypeMirror = "java.util.Queue<java.lang.Integer>"] | | | +- TypeArguments[] +Added line: 9740 | | | +- ClassType[@TypeMirror = "java.lang.Integer"] | | +- VariableDeclarator[] | | +- VariableId[@Name = "q", @TypeMirror = "java.util.Queue<java.lang.Integer>"] | | +- ConstructorCall[@Failed = false, @Function = "java.util.ArrayDeque<java.lang.Integer>.new() -> java.util.ArrayDeque<java.lang.Integer>", @MethodName = "new", @TypeMirror = "java.util.ArrayDeque<java.lang.Integer>", @Unchecked = false, @VarargsCall = false] | | +- ClassType[@TypeMirror = "java.util.ArrayDeque"] | | | +- TypeArguments[] - | | +- ArgumentList[] | +- WhileStatement[] +Added line: 46 | | +- InfixExpression[@TypeMirror = "boolean"] | | | +- MethodCall[@Failed = false, @Function = "java.util.Collection<java.lang.Integer>.size() -> int", @MethodName = "size", @TypeMirror = "int", @Unchecked = false, @VarargsCall = false] | | | | +- VariableAccess[@Name = "q", @TypeMirror = "java.util.Queue<java.lang.Integer>"] | | | | +- ArgumentList[] | | | +- NumericLiteral[@TypeMirror = "int"] - | | +- Block[] | | +- LocalVariableDeclaration[] | | | +- ModifierList[] | | | +- PrimitiveType[@TypeMirror = "int"] @@ -429,13 +488,13 @@ | | | +- ArgumentList[] | | +- LocalVariableDeclaration[] | | | +- ModifierList[] +Added line: 2555 | | | +- PrimitiveType[@TypeMirror = "int"] | | | +- VariableDeclarator[] | | | +- VariableId[@Name = "y", @TypeMirror = "int"] | | | +- MethodCall[@Failed = false, @Function = "java.util.Queue<java.lang.Integer>.remove() -> java.lang.Integer", @MethodName = "remove", @TypeMirror = "java.lang.Integer", @Unchecked = false, @VarargsCall = false] | | | +- VariableAccess[@Name = "q", @TypeMirror = "java.util.Queue<java.lang.Integer>"] | | | +- ArgumentList[] - | | +- LocalVariableDeclaration[] | | | +- ModifierList[] | | | +- PrimitiveType[@TypeMirror = "int"] | | | +- VariableDeclarator[] @@ -452,45 +511,58 @@ | | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Point"] | | +- ArgumentList[] | | +- VariableAccess[@Name = "x", @TypeMirror = "int"] +Added line: 3857 | | +- VariableAccess[@Name = "y", @TypeMirror = "int"] | +- WhileStatement[] +Added line: 4473 | +- InfixExpression[@TypeMirror = "boolean"] +Added line: 1491 | | +- MethodCall[@Failed = false, @Function = "java.util.Collection<java.lang.Integer>.size() -> int", @MethodName = "size", @TypeMirror = "int", @Unchecked = false, @VarargsCall = false] | | | +- VariableAccess[@Name = "q", @TypeMirror = "java.util.Queue<java.lang.Integer>"] | | | +- ArgumentList[] | | +- NumericLiteral[@TypeMirror = "int"] | +- Block[] +Added line: 4324 | +- LocalVariableDeclaration[] | | +- ModifierList[] | | +- VariableDeclarator[] +Added line: 9991 | | +- VariableId[@Name = "x", @TypeMirror = "java.lang.Integer"] | | +- MethodCall[@Failed = false, @Function = "java.util.Queue<java.lang.Integer>.remove() -> java.lang.Integer", @MethodName = "remove", @TypeMirror = "java.lang.Integer", @Unchecked = false, @VarargsCall = false] | | +- VariableAccess[@Name = "q", @TypeMirror = "java.util.Queue<java.lang.Integer>"] | | +- ArgumentList[] | +- LocalVariableDeclaration[] | | +- ModifierList[] +Added line: 6797 +Added line: 2681 | | +- VariableDeclarator[] | | +- VariableId[@Name = "_", @TypeMirror = "java.lang.Integer"] | | +- MethodCall[@Failed = false, @Function = "java.util.Queue<java.lang.Integer>.remove() -> java.lang.Integer", @MethodName = "remove", @TypeMirror = "java.lang.Integer", @Unchecked = false, @VarargsCall = false] | | +- VariableAccess[@Name = "q", @TypeMirror = "java.util.Queue<java.lang.Integer>"] | | +- ArgumentList[] | +- LocalVariableDeclaration[] +Added line: 1960 | | +- ModifierList[] | | +- VariableDeclarator[] +Added line: 9070 | | +- VariableId[@Name = "_", @TypeMirror = "java.lang.Integer"] | | +- MethodCall[@Failed = false, @Function = "java.util.Queue<java.lang.Integer>.remove() -> java.lang.Integer", @MethodName = "remove", @TypeMirror = "java.lang.Integer", @Unchecked = false, @VarargsCall = false] | | +- VariableAccess[@Name = "q", @TypeMirror = "java.util.Queue<java.lang.Integer>"] +Added line: 2028 | | +- ArgumentList[] +Added line: 6289 | +- LocalVariableDeclaration[] | +- ModifierList[] | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Point"] | +- VariableDeclarator[] | +- VariableId[@Name = "p", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Point"] +Added line: 6978 | +- ConstructorCall[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables$Point.new(int, int) -> Jep456_UnamedPatternsAndVariables$Point", @MethodName = "new", @TypeMirror = "Jep456_UnamedPatternsAndVariables$Point", @Unchecked = false, @VarargsCall = false] | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$Point"] | +- ArgumentList[] | +- VariableAccess[@Name = "x", @TypeMirror = "java.lang.Integer"] | +- NumericLiteral[@TypeMirror = "int"] +Added line: 176 +- ClassDeclaration[@TypeMirror = "Jep456_UnamedPatternsAndVariables$ScopedContext"] | +- ModifierList[] | +- ImplementsList[] @@ -506,8 +578,10 @@ | +- MethodDeclaration[@Name = "acquire"] | +- ModifierList[] | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$ScopedContext"] +Added line: 9743 | +- FormalParameters[] | +- Block[] +Added line: 6087 | +- ReturnStatement[] | +- ConstructorCall[@Failed = false, @Function = "Jep456_UnamedPatternsAndVariables$ScopedContext.new() -> Jep456_UnamedPatternsAndVariables$ScopedContext", @MethodName = "new", @TypeMirror = "Jep456_UnamedPatternsAndVariables$ScopedContext", @Unchecked = false, @VarargsCall = false] | +- ClassType[@TypeMirror = "Jep456_UnamedPatternsAndVariables$ScopedContext"] @@ -541,7 +615,9 @@ | | | +- ModifierList[] | | | +- PrimitiveType[@TypeMirror = "int"] | | | +- VariableDeclarator[] +Added line: 675 | | | +- VariableId[@Name = "i", @TypeMirror = "int"] +Added line: 9383 | | | +- MethodCall[@Failed = false, @Function = "java.lang.Integer.parseInt(java.lang.String) -> int", @MethodName = "parseInt", @TypeMirror = "int", @Unchecked = false, @VarargsCall = false] | | | +- TypeExpression[@TypeMirror = "java.lang.Integer"] | | | | +- ClassType[@TypeMirror = "java.lang.Integer"] @@ -550,22 +626,27 @@ | | +- ExpressionStatement[] | | +- MethodCall[@Failed = false, @Function = "java.io.PrintStream.println(int) -> void", @MethodName = "println", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | | +- FieldAccess[@Name = "out", @TypeMirror = "java.io.PrintStream"] +Added line: 3001 | | | +- TypeExpression[@TypeMirror = "java.lang.System"] | | | +- ClassType[@TypeMirror = "java.lang.System"] | | +- ArgumentList[] +Added line: 7727 | | +- VariableAccess[@Name = "i", @TypeMirror = "int"] | +- CatchClause[] | | +- CatchParameter[] | | | +- ModifierList[] | | | +- ClassType[@TypeMirror = "java.lang.NumberFormatException"] | | | +- VariableId[@Name = "_", @TypeMirror = "java.lang.NumberFormatException"] +Added line: 8831 | | +- Block[] | | +- ExpressionStatement[] | | +- MethodCall[@Failed = false, @Function = "java.io.PrintStream.println(java.lang.String) -> void", @MethodName = "println", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | | +- FieldAccess[@Name = "out", @TypeMirror = "java.io.PrintStream"] | | | +- TypeExpression[@TypeMirror = "java.lang.System"] +Added line: 1155 | | | +- ClassType[@TypeMirror = "java.lang.System"] | | +- ArgumentList[] +Added line: 482 | | +- InfixExpression[@TypeMirror = "java.lang.String"] | | +- StringLiteral[@TypeMirror = "java.lang.String"] | | +- VariableAccess[@Name = "s", @TypeMirror = "java.lang.String"] @@ -573,36 +654,44 @@ | +- CatchParameter[] | | +- ModifierList[] | | +- ClassType[@TypeMirror = "java.lang.Exception"] +Added line: 4125 | | +- VariableId[@Name = "_", @TypeMirror = "java.lang.Exception"] | +- Block[] - | +- ExpressionStatement[] | +- MethodCall[@Failed = false, @Function = "java.io.PrintStream.println(java.lang.String) -> void", @MethodName = "println", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] | +- FieldAccess[@Name = "out", @TypeMirror = "java.io.PrintStream"] | | +- TypeExpression[@TypeMirror = "java.lang.System"] | | +- ClassType[@TypeMirror = "java.lang.System"] | +- ArgumentList[] +Added line: 9099 | +- StringLiteral[@TypeMirror = "java.lang.String"] +- ExpressionStatement[] +- MethodCall[@Failed = false, @Function = "java.util.stream.Stream<java.lang.String>.<R, A> collect(java.util.stream.Collector<? super java.lang.String, java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>>) -> java.util.Map<java.lang.Object, java.lang.String>", @MethodName = "collect", @TypeMirror = "java.util.Map<java.lang.Object, java.lang.String>", @Unchecked = false, @VarargsCall = false] +Added line: 1770 +Added line: 205 +- MethodCall[@Failed = false, @Function = "java.util.Collection<java.lang.String>.stream() -> java.util.stream.Stream<java.lang.String>", @MethodName = "stream", @TypeMirror = "java.util.stream.Stream<java.lang.String>", @Unchecked = false, @VarargsCall = false] | +- MethodCall[@Failed = false, @Function = "java.util.List.<E> of(java.lang.String, java.lang.String) -> java.util.List<java.lang.String>", @MethodName = "of", @TypeMirror = "java.util.List<java.lang.String>", @Unchecked = false, @VarargsCall = false] | | +- TypeExpression[@TypeMirror = "java.util.List"] | | | +- ClassType[@TypeMirror = "java.util.List"] | | +- ArgumentList[] +Added line: 8848 | | +- StringLiteral[@TypeMirror = "java.lang.String"] | | +- StringLiteral[@TypeMirror = "java.lang.String"] | +- ArgumentList[] +Added line: 7946 +- ArgumentList[] +- MethodCall[@Failed = false, @Function = "java.util.stream.Collectors.<T, K, U> toMap(java.util.function.Function<? super java.lang.String, ?>, java.util.function.Function<? super java.lang.String, ? extends java.lang.String>) -> java.util.stream.Collector<java.lang.String, java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>>", @MethodName = "toMap", @TypeMirror = "java.util.stream.Collector<java.lang.String, java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>>", @Unchecked = false, @VarargsCall = false] +- TypeExpression[@TypeMirror = "java.util.stream.Collectors"] | +- ClassType[@TypeMirror = "java.util.stream.Collectors"] +Added line: 6356 +- ArgumentList[] +- MethodReference[@TypeMirror = "java.util.function.Function<java.lang.String, java.lang.Object>"] | +- TypeExpression[@TypeMirror = "java.lang.String"] | +- ClassType[@TypeMirror = "java.lang.String"] +Added line: 2036 +- LambdaExpression[@TypeMirror = "java.util.function.Function<java.lang.String, java.lang.String>"] +- LambdaParameterList[] | +- LambdaParameter[@TypeMirror = "java.lang.String"] +Added line: 3624 | +- ModifierList[] | +- VariableId[@Name = "_", @TypeMirror = "java.lang.String"] +- StringLiteral[@TypeMirror = "java.lang.String"] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/UnresolvedThings.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/UnresolvedThings.txt index e51d1f31e0..41eed8114d 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/UnresolvedThings.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/types/dumptests/UnresolvedThings.txt @@ -1,84 +1,173 @@ +Added line: 9965 +- CompilationUnit[] +Added line: 7818 +Added line: 9862 +Added line: 2307 +- ImportDeclaration[] +Added line: 3416 +- ImportDeclaration[] +- ClassDeclaration[@TypeMirror = "Foo"] +Added line: 7474 +Added line: 2657 +Added line: 2832 +Added line: 6556 +Added line: 8848 +- ModifierList[] +Added line: 7853 +- ClassBody[] -Added line: 57 | +- ModifierList[] +Added line: 7330 | +- ClassType[@TypeMirror = "*User"] +Added line: 5106 +Added line: 7100 +Added line: 8952 | +- FormalParameters[] | | +- FormalParameter[@TypeMirror = "java.util.List<*Item>"] - | | +- ModifierList[] +Added line: 3193 +Added line: 9568 +Added line: 5309 | | +- ClassType[@TypeMirror = "java.util.List<*Item>"] +Added line: 5361 +Added line: 9690 | | | +- TypeArguments[] | | | +- ClassType[@TypeMirror = "*Item"] +Added line: 9603 | | +- VariableId[@Name = "loads", @TypeMirror = "java.util.List<*Item>"] | +- Block[] +Added line: 8359 +Added line: 8515 | +- LocalVariableDeclaration[] +Added line: 3809 +Added line: 7318 +Added line: 1162 | | +- ModifierList[] | | +- ClassType[@TypeMirror = "java.util.List<*SummaryDto.ItemDto>"] +Added line: 1538 +Added line: 2327 | | | +- TypeArguments[] +Added line: 3994 | | | +- ClassType[@TypeMirror = "*SummaryDto.ItemDto"] | | +- VariableDeclarator[] | | +- VariableId[@Name = "items", @TypeMirror = "java.util.List<*SummaryDto.ItemDto>"] Added line: 9804 +Added line: 2190 +Added line: 8451 +Added line: 3401 | | +- ConstructorCall[@Failed = false, @Function = "java.util.ArrayList<*SummaryDto.ItemDto>.new() -> java.util.ArrayList<*SummaryDto.ItemDto>", @MethodName = "new", @TypeMirror = "java.util.ArrayList<*SummaryDto.ItemDto>", @Unchecked = false, @VarargsCall = false] +Added line: 3238 | | +- ClassType[@TypeMirror = "java.util.ArrayList"] - | | | +- TypeArguments[] +Added line: 8435 | | +- ArgumentList[] +Added line: 5622 +Added line: 1098 | +- MethodCall[@Failed = false, @Function = "java.util.Map<(*unknown*), java.util.List<*Item>>.forEach(java.util.function.BiConsumer<? super (*unknown*), ? super java.util.List<*Item>>) -> void", @MethodName = "forEach", @TypeMirror = "void", @Unchecked = false, @VarargsCall = false] +Added line: 1583 | +- MethodCall[@Failed = false, @Function = "java.util.stream.Stream<*Item>.<R, A> collect(java.util.stream.Collector<? super *Item, java.lang.Object, java.util.Map<(*unknown*), java.util.List<*Item>>>) -> java.util.Map<(*unknown*), java.util.List<*Item>>", @MethodName = "collect", @TypeMirror = "java.util.Map<(*unknown*), java.util.List<*Item>>", @Unchecked = false, @VarargsCall = false] +Added line: 2370 +Added line: 9058 | | +- MethodCall[@Failed = false, @Function = "java.util.Collection<*Item>.stream() -> java.util.stream.Stream<*Item>", @MethodName = "stream", @TypeMirror = "java.util.stream.Stream<*Item>", @Unchecked = false, @VarargsCall = false] | | | +- VariableAccess[@Name = "loads", @TypeMirror = "java.util.List<*Item>"] | | | +- ArgumentList[] | | +- ArgumentList[] | | +- MethodCall[@Failed = false, @Function = "java.util.stream.Collectors.<T, K> groupingBy(java.util.function.Function<? super *Item, ? extends (*unknown*)>) -> java.util.stream.Collector<*Item, java.lang.Object, java.util.Map<(*unknown*), java.util.List<*Item>>>", @MethodName = "groupingBy", @TypeMirror = "java.util.stream.Collector<*Item, java.lang.Object, java.util.Map<(*unknown*), java.util.List<*Item>>>", @Unchecked = false, @VarargsCall = false] +Added line: 485 | | +- TypeExpression[@TypeMirror = "java.util.stream.Collectors"] Added line: 4352 | | +- ArgumentList[] | | +- MethodReference[@TypeMirror = "java.util.function.Function<*Item, (*unknown*)>"] | | +- AmbiguousName[@TypeMirror = "(*unknown*)"] +Added line: 5153 +Added line: 8108 | +- ArgumentList[] | +- LambdaExpression[@TypeMirror = "java.util.function.BiConsumer<(*unknown*), java.util.List<*Item>>"] | +- LambdaParameterList[] +Added line: 8789 | | +- LambdaParameter[@TypeMirror = "(*unknown*)"] | | | +- ModifierList[] +Added line: 5736 | | | +- VariableId[@Name = "a", @TypeMirror = "(*unknown*)"] +Added line: 5600 +Added line: 5248 +Added line: 5840 +Added line: 4513 +Added line: 7292 +Added line: 2779 +Added line: 7438 | | +- LambdaParameter[@TypeMirror = "java.util.List<*Item>"] Added line: 1219 +Added line: 8025 +Added line: 7674 +Added line: 5743 Added line: 2699 | | +- ModifierList[] +Added line: 8148 | | +- VariableId[@Name = "b", @TypeMirror = "java.util.List<*Item>"] | +- MethodCall[@Failed = false, @Function = "java.util.List<*SummaryDto.ItemDto>.add(*SummaryDto.ItemDto) -> boolean", @MethodName = "add", @TypeMirror = "boolean", @Unchecked = false, @VarargsCall = false] +Added line: 3584 | +- VariableAccess[@Name = "items", @TypeMirror = "java.util.List<*SummaryDto.ItemDto>"] +Added line: 2348 | +- ArgumentList[] +Added line: 3173 +Added line: 5707 +Added line: 3570 | +- MethodCall[@Failed = false, @Function = "Foo.buildItem(*BigDecimal, java.util.List<*Item>) -> *SummaryDto.ItemDto", @MethodName = "buildItem", @TypeMirror = "*SummaryDto.ItemDto", @Unchecked = false, @VarargsCall = false] | +- ArgumentList[] +Added line: 8199 | +- VariableAccess[@Name = "a", @TypeMirror = "(*unknown*)"] | +- VariableAccess[@Name = "b", @TypeMirror = "java.util.List<*Item>"] +- MethodDeclaration[@Name = "buildItem"] +Added line: 1966 +- ModifierList[] +- ClassType[@TypeMirror = "*SummaryDto.ItemDto"] Added line: 5247 +Added line: 1302 +Added line: 4721 +- FormalParameters[] +Added line: 1087 +Added line: 6187 | +- FormalParameter[@TypeMirror = "*BigDecimal"] +Added line: 8495 | | +- ModifierList[] | | +- ClassType[@TypeMirror = "*BigDecimal"] +Added line: 9826 | | +- VariableId[@Name = "a", @TypeMirror = "*BigDecimal"] +Added line: 2859 +Added line: 2142 +Added line: 8832 Added line: 2946 +Added line: 8934 | +- FormalParameter[@TypeMirror = "java.util.List<*Item>"] | +- ModifierList[] - | +- ClassType[@TypeMirror = "java.util.List<*Item>"] Added line: 4450 | | +- TypeArguments[] +Added line: 6638 +Added line: 6364 | | +- ClassType[@TypeMirror = "*Item"] +Added line: 2896 +Added line: 5859 | +- VariableId[@Name = "b", @TypeMirror = "java.util.List<*Item>"] +Added line: 983 +- Block[] +- ReturnStatement[] - +- MethodCall[@Failed = true, @Function = "(*unknown*).(*unknown method*)() -> (*unknown*)", @MethodName = "build", @TypeMirror = "(*unknown*)", @Unchecked = false, @VarargsCall = false] +Added line: 6989 +Added line: 9249 +Added line: 6133 +Added line: 3042 +Added line: 9358 +Added line: 7363 +Added line: 2940 +- MethodCall[@Failed = true, @Function = "(*unknown*).(*unknown method*)() -> (*unknown*)", @MethodName = "builder", @TypeMirror = "(*unknown*)", @Unchecked = false, @VarargsCall = false] +Added line: 2464 Added line: 2610 | +- AmbiguousName[@TypeMirror = "(*unknown*)"] +Added line: 5661 +Added line: 3975 +Added line: 3447 +Added line: 2669 | +- ArgumentList[] -Added line: 3417 +Added line: 1793 +Added line: 6201 +Added line: 8356 +Added line: 9577 +Added line: 4729 +Added line: 7033 diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/SimpleJavascriptFile.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/SimpleJavascriptFile.txt index 4a791e2cca..d6d7f4fe33 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/SimpleJavascriptFile.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/SimpleJavascriptFile.txt @@ -1,22 +1,111 @@ -+- AstRoot +Added line: 4683 +Added line: 9508 +Added line: 2288 +Added line: 431 +Added line: 4771 +Added line: 6107 +Added line: 2063 +Added line: 9119 +Added line: 2005 +Added line: 4651 +Added line: 4737 +Added line: 5085 +- VariableDeclaration +Added line: 1678 +Added line: 4897 | +- VariableInitializer +Added line: 9466 +Added line: 6940 +Added line: 117 +Added line: 7092 +Added line: 737 +Added line: 8588 +Added line: 1963 +Added line: 3753 | +- Name +Added line: 4962 +Added line: 7220 +Added line: 9383 +Added line: 797 +Added line: 9177 | +- NumberLiteral +Added line: 7774 | +- VariableInitializer +Added line: 941 +Added line: 1184 +Added line: 3314 | +- Name +Added line: 9192 +Added line: 4184 +Added line: 1392 +Added line: 87 | +- NumberLiteral +Added line: 845 +Added line: 1511 +Added line: 3886 +Added line: 5354 Added line: 3916 +Added line: 1389 +Added line: 5826 +Added line: 8997 +Added line: 322 +Added line: 4033 +Added line: 8197 +Added line: 636 +- FunctionNode +Added line: 1457 +Added line: 6263 +Added line: 3456 +Added line: 5074 +- Name +Added line: 1562 +Added line: 5724 +Added line: 2861 +Added line: 4296 +Added line: 8824 +Added line: 8128 +Added line: 453 +Added line: 5584 +- VariableDeclaration +Added line: 2110 | +- VariableInitializer Added line: 1023 +Added line: 3402 +Added line: 4007 +Added line: 6284 +Added line: 7246 +Added line: 2743 Added line: 8920 +Added line: 8462 +Added line: 6063 | +- Name +Added line: 5564 +Added line: 3018 +Added line: 3361 +Added line: 8062 +Added line: 8075 +Added line: 6600 +Added line: 1359 +Added line: 8805 | +- InfixExpression +Added line: 4935 | +- Name - | +- NumberLiteral +Added line: 8597 +Added line: 8579 +Added line: 1453 +Added line: 7492 +Added line: 7430 +Added line: 201 +Added line: 9880 +Added line: 7026 +Added line: 2922 +Added line: 6237 +- ReturnStatement +Added line: 9364 +Added line: 8461 +- Name +Added line: 5291 +Added line: 322 Added line: 2541 +Added line: 7650 +Added line: 9794 diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/decorators.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/decorators.txt index 34b51f5f12..64a0ed65be 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/decorators.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/decorators.txt @@ -1,28 +1,78 @@ +Added line: 6269 +- AstRoot +Added line: 5841 +Added line: 954 +Added line: 6248 +- EmptyStatement Added line: 7950 +Added line: 7335 +Added line: 9682 +Added line: 3049 +Added line: 8907 + +- EmptyStatement +Added line: 9667 +Added line: 8740 +Added line: 6119 +Added line: 5322 +Added line: 595 +Added line: 531 +Added line: 6765 +Added line: 2897 +Added line: 7585 +- EmptyStatement +- EmptyStatement - +- EmptyStatement - +- ExpressionStatement +Added line: 532 +Added line: 3105 Added line: 5736 +Added line: 4087 | +- XmlPropRef +Added line: 6428 +Added line: 506 +Added line: 9917 +Added line: 8172 +Added line: 6307 +Added line: 205 +Added line: 1593 | +- Name +- ExpressionStatement +- EmptyStatement +- Comment Added line: 317 +Added line: 2876 +Added line: 9171 +- ExpressionStatement +Added line: 7751 +Added line: 728 +Added line: 2431 | +- FunctionCall +Added line: 1198 | +- XmlPropRef +Added line: 3670 | | +- Name +Added line: 8386 +Added line: 3460 +Added line: 5076 | +- Name +Added line: 6618 +Added line: 2508 | +- ObjectLiteral +Added line: 4705 +Added line: 6181 | +- ObjectProperty +Added line: 3272 +Added line: 992 +Added line: 1190 +Added line: 2753 +Added line: 8655 +Added line: 6978 | +- Name | +- StringLiteral +Added line: 1377 +Added line: 4663 +- EmptyStatement +- EmptyStatement +Added line: 1122 +Added line: 7097 +- EmptyStatement +- Comment Added line: 6668 @@ -30,24 +80,63 @@ Added line: 2786 +- ExpressionStatement | +- Assignment | +- Name +Added line: 6846 | +- Name +Added line: 3102 | +- ObjectLiteral +Added line: 406 +Added line: 9999 | +- ObjectProperty +Added line: 3061 +Added line: 9842 +Added line: 5393 | | +- Name +Added line: 7775 +Added line: 9009 +Added line: 1454 Added line: 8761 +Added line: 9728 +Added line: 3885 +Added line: 206 +Added line: 4733 | | +- StringLiteral +Added line: 4664 +Added line: 4227 | +- ObjectProperty | | +- Name +Added line: 1337 Added line: 2874 +Added line: 8235 +Added line: 9481 +Added line: 8916 +Added line: 8107 | | +- Name +Added line: 8171 Added line: 7602 +Added line: 5525 +Added line: 768 +Added line: 9795 +Added line: 6693 +Added line: 5691 | +- ObjectProperty - | +- Name | +- StringLiteral +Added line: 2147 Added line: 3090 +Added line: 5801 | +- PropertyGet +Added line: 8067 | | +- KeywordLiteral +Added line: 8870 +Added line: 5178 +Added line: 615 | | +- Name +Added line: 3384 +Added line: 7324 +Added line: 1273 +Added line: 4139 | +- Name +Added line: 9428 +Added line: 6698 +- EmptyStatement +Added line: 568 +- EmptyStatement diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/issue3948.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/issue3948.txt index 0075f9af85..7b1892e7d3 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/issue3948.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/issue3948.txt @@ -1,11 +1,100 @@ +- ExpressionStatement +Added line: 3304 +Added line: 7228 +Added line: 4042 +Added line: 8360 +Added line: 7224 +Added line: 6067 +Added line: 6110 +Added line: 6947 Added line: 984 +Added line: 6895 +Added line: 6 +- Assignment +Added line: 2224 +Added line: 7402 +Added line: 5035 +- Name +Added line: 2104 +Added line: 5499 +Added line: 2910 +Added line: 9627 +Added line: 5385 +Added line: 8417 +Added line: 3673 +Added line: 9894 +- ObjectLiteral +Added line: 5826 +Added line: 5417 +Added line: 5202 +Added line: 4170 +Added line: 4578 +Added line: 7044 +Added line: 81 +Added line: 668 +Added line: 1791 +Added line: 5669 +Added line: 631 +Added line: 2750 +Added line: 139 +Added line: 6753 +Added line: 6852 +Added line: 9893 +Added line: 2681 +Added line: 8946 +Added line: 5939 +Added line: 4677 +Added line: 8234 +Added line: 7117 +Added line: 6538 Added line: 4386 +Added line: 7286 +Added line: 7683 +- ObjectProperty +Added line: 4863 +Added line: 4257 +Added line: 6754 +- Name +Added line: 4384 +Added line: 7136 +- FunctionNode +Added line: 2272 +Added line: 5242 +Added line: 2842 +Added line: 516 +Added line: 6881 +Added line: 1099 +Added line: 500 +Added line: 7132 +Added line: 6615 +Added line: 5132 Added line: 2401 +Added line: 8886 +Added line: 9913 +Added line: 2988 +Added line: 5925 +Added line: 3710 +Added line: 1535 +Added line: 6960 +Added line: 6141 +Added line: 1497 +Added line: 9633 +Added line: 802 +Added line: 7361 +- Block +Added line: 3889 +Added line: 6207 +Added line: 5666 +Added line: 8598 +Added line: 8791 +Added line: 4543 +Added line: 7492 +Added line: 1669 +Added line: 6454 +Added line: 325 +Added line: 1920 +Added line: 5143 +Added line: 3148 +Added line: 3997 +Added line: 8885 +Added line: 4838 diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/jquery-selector.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/jquery-selector.txt index 3b632d1073..ead5297810 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/jquery-selector.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/jquery-selector.txt @@ -1,6 +1,7 @@ +- AstRoot +- Comment +- EmptyStatement +Added line: 8474 +- EmptyStatement +- EmptyStatement +- EmptyStatement @@ -176,6 +177,7 @@ | | | | | +- InfixExpression | | | | | | +- InfixExpression | | | | | | | +- StringLiteral +Added line: 6772 | | | | | | | +- Name | | | | | | +- StringLiteral | | | | | +- Name @@ -238,6 +240,7 @@ | | | +- NewExpression | | | +- Name | | | +- InfixExpression +Added line: 4621 | | | +- StringLiteral | | | +- Name | | +- ObjectProperty @@ -326,6 +329,7 @@ | | +- Name | | +- Block | | +- VariableDeclaration +Added line: 3555 | | | +- VariableInitializer | | | +- Name | | | +- InfixExpression @@ -367,6 +371,7 @@ | | +- InfixExpression | | +- InfixExpression | | | +- Name +Added line: 7889 | | | +- NumberLiteral | | +- NumberLiteral | +- VariableInitializer @@ -509,6 +514,7 @@ | | | | | +- Name | | | | | +- Name | | | | +- Name +Added line: 2550 | | | +- Scope | | | +- Comment | | | +- IfStatement @@ -531,6 +537,7 @@ | | | | | | | | +- Name | | | | | | | | +- FunctionCall | | | | | | | | +- PropertyGet +Added line: 2102 | | | | | | | | | +- Name | | | | | | | | | +- Name | | | | | | | | +- Name @@ -573,6 +580,7 @@ | | | | | | +- Name | | | | | | +- Name | | | | | +- ReturnStatement +Added line: 2880 | | | | | +- Name | | | | +- Comment | | | +- IfStatement @@ -639,6 +647,7 @@ | | | +- Name | | +- Scope | | +- ExpressionStatement +Added line: 6876 | | | +- Assignment | | | +- Name | | | +- Name @@ -738,6 +747,7 @@ | | | | +- Name | | | +- ExpressionStatement | | | | +- Assignment +Added line: 6357 | | | | +- Name | | | | +- PropertyGet | | | | +- Name @@ -780,6 +790,7 @@ | | | | +- FunctionCall | | | | +- PropertyGet | | | | | +- Name +Added line: 5257 | | | | | +- Name | | | | +- Name | | | | +- FunctionCall @@ -826,6 +837,7 @@ | +- Name | +- Block | +- VariableDeclaration +Added line: 427 | | +- VariableInitializer | | +- Name | | +- ArrayLiteral @@ -836,6 +848,7 @@ | | +- Block | | +- Comment | | +- IfStatement +Added line: 644 | | | +- InfixExpression | | | | +- FunctionCall | | | | | +- PropertyGet @@ -901,6 +914,7 @@ | | +- Name | | +- Name | +- Name +Added line: 4202 +- Comment +- FunctionNode | +- Name @@ -937,6 +951,7 @@ | +- FunctionNode | +- Name | +- Block +Added line: 8784 | +- Comment | +- Comment | +- Comment @@ -1004,10 +1019,12 @@ | | | | | | +- Name | | | | | | +- Name | | | | | +- UnaryExpression +Added line: 3728 | | | | | +- Name | | | | +- InfixExpression | | | | +- FunctionCall | | | | | +- Name +Added line: 7098 | | | | | +- Name | | | | +- Name | | | +- ReturnStatement @@ -1022,6 +1039,7 @@ | | +- IfStatement | | +- InfixExpression | | | +- StringLiteral +Added line: 3822 | | | +- Name | | +- Scope | | +- ReturnStatement @@ -1084,6 +1102,7 @@ | | +- Assignment | | +- Name | | +- ElementGet +Added line: 5658 | | +- Name | | +- Name | +- Scope @@ -1118,7 +1137,6 @@ | | +- StringLiteral | +- Name +- Comment - +- FunctionNode | +- Name | +- Name | +- Block @@ -1365,6 +1383,7 @@ | | +- FunctionNode | | +- Name | | +- Name +Added line: 3113 | | +- Block | | +- IfStatement | | +- InfixExpression @@ -1387,6 +1406,7 @@ | | +- ObjectLiteral | | +- ObjectProperty | | | +- StringLiteral +Added line: 5104 | | | +- ObjectLiteral | | | +- ObjectProperty | | | | +- Name @@ -1522,6 +1542,7 @@ | | | | | | | +- Name | | | | | | | +- NumberLiteral | | | | | | +- Scope +Added line: 6143 | | | | | | +- ExpressionStatement | | | | | | +- FunctionCall | | | | | | +- Name @@ -1623,8 +1644,10 @@ Added line: 3702 | | | | | | +- Name | | | | | | +- Name | | | | | +- Name +Added line: 12 | | | | +- ElementGet | | | | +- Name +Added line: 6357 | | | | +- NumberLiteral | | | +- Scope | | | +- ReturnStatement @@ -1719,6 +1742,7 @@ Added line: 3702 | +- ObjectProperty | | +- Name | | +- ObjectLiteral +Added line: 1342 | | +- ObjectProperty | | | +- Name | | | +- FunctionNode @@ -1910,6 +1934,7 @@ Added line: 3702 | | | +- IfStatement | | | | +- InfixExpression | | | | | +- Name +Added line: 5407 | | | | | +- StringLiteral | | | | +- Scope | | | | +- ReturnStatement @@ -1946,11 +1971,13 @@ Added line: 3702 | | | | +- ReturnStatement | | | | +- InfixExpression | | | | +- Name +Added line: 3730 | | | | +- InfixExpression | | | | +- FunctionCall | | | | | +- PropertyGet | | | | | | +- Name | | | | | | +- Name +Added line: 3727 | | | | | +- UnaryExpression | | | | | +- PropertyGet | | | | | +- Name @@ -1997,6 +2024,7 @@ Added line: 3702 | | | | | | +- Name | | | | | +- NumberLiteral | | | | | +- InfixExpression +Added line: 6455 | | | | | +- PropertyGet | | | | | | +- Name | | | | | | +- Name @@ -2004,6 +2032,7 @@ Added line: 3702 | | | | +- InfixExpression | | | | +- Name | | | | +- StringLiteral +Added line: 7987 | | | +- ReturnStatement | | | +- KeywordLiteral | | +- ObjectProperty @@ -2020,6 +2049,7 @@ Added line: 3702 | | | | | +- Name | | | | | +- InfixExpression | | | | | +- FunctionCall +Added line: 8252 | | | | | | +- PropertyGet | | | | | | | +- Name | | | | | | | +- Name @@ -2030,7 +2060,6 @@ Added line: 3702 | | | | | +- Name | | | | | +- InfixExpression | | | | | +- FunctionCall - | | | | | | +- PropertyGet | | | | | | | +- Name | | | | | | | +- Name | | | | | | +- UnaryExpression @@ -2088,6 +2117,7 @@ Added line: 3702 | | | | | +- PropertyGet | | | | | +- Name | | | | | +- Name +Added line: 5790 | | | | +- VariableInitializer | | | | | +- Name | | | | | +- InfixExpression @@ -2097,7 +2127,6 @@ Added line: 3702 | | | | | +- PropertyGet | | | | | | +- Name | | | | | | +- Name - | | | | | +- Name | | | | +- VariableInitializer | | | | | +- Name | | | | | +- InfixExpression @@ -2142,6 +2171,7 @@ Added line: 3702 | | | | | | | | +- Name | | | | | | | | +- Name | | | | | | | +- NumberLiteral +Added line: 2761 | | | | | | +- Scope | | | | | | +- ReturnStatement | | | | | | +- KeywordLiteral @@ -2162,6 +2192,7 @@ Added line: 3702 | | | | +- ReturnStatement | | | | +- KeywordLiteral | | | +- ExpressionStatement +Added line: 1081 | | | | +- Assignment | | | | +- Name | | | | +- ArrayLiteral @@ -2177,6 +2208,7 @@ Added line: 3702 | | | +- IfStatement | | | | +- InfixExpression | | | | | +- Name +Added line: 8874 | | | | | +- Name | | | | +- Scope | | | | | +- Comment @@ -2206,6 +2238,7 @@ Added line: 3702 | | | | | | +- Name | | | | | | +- InfixExpression | | | | | | +- InfixExpression +Added line: 2321 | | | | | | | +- ElementGet | | | | | | | | +- Name | | | | | | | | +- NumberLiteral @@ -2249,6 +2282,7 @@ Added line: 3702 | | | | | | | +- Assignment | | | | | | | +- Name | | | | | | | +- Assignment +Added line: 639 | | | | | | | +- Name | | | | | | | +- NumberLiteral | | | | | | +- FunctionCall @@ -2260,6 +2294,7 @@ Added line: 3702 | | | | | +- IfStatement | | | | | +- InfixExpression | | | | | | +- InfixExpression +Added line: 7150 | | | | | | | +- PropertyGet | | | | | | | | +- Name | | | | | | | | +- Name @@ -2267,7 +2302,6 @@ Added line: 3702 | | | | | | +- InfixExpression | | | | | | +- UpdateExpression | | | | | | | +- Name - | | | | | | +- InfixExpression | | | | | | +- Name | | | | | | +- Name | | | | | +- Scope @@ -2290,10 +2324,13 @@ Added line: 3702 | | | | | | +- Assignment | | | | | | +- Name | | | | | | +- InfixExpression +Added line: 6805 | | | | | | +- ElementGet +Added line: 2717 | | | | | | | +- Name | | | | | | | +- Name | | | | | | +- ParenthesizedExpression +Added line: 7914 | | | | | | +- Assignment | | | | | | +- ElementGet | | | | | | | +- Name @@ -2403,6 +2440,7 @@ Added line: 8947 | | | | | +- Name | | | | +- Scope | | | | +- BreakStatement +Added line: 8780 | | | +- Comment | | | +- ExpressionStatement | | | | +- Assignment @@ -2420,12 +2458,14 @@ Added line: 8947 | | | | | +- Name | | | | | +- Name | | | | +- NumberLiteral +Added line: 4572 | | | +- InfixExpression | | | +- InfixExpression | | | | +- Name | | | | +- Name | | | +- NumberLiteral | | +- ObjectProperty +Added line: 3715 | | +- Name | | +- FunctionNode | | +- Name @@ -2445,6 +2485,7 @@ Added line: 8947 | | | | +- PropertyGet | | | | | +- Name | | | | | +- Name +Added line: 5924 | | | | +- Name | | | +- InfixExpression | | | +- ElementGet @@ -2476,6 +2517,7 @@ Added line: 198 | | +- IfStatement | | | +- InfixExpression | | | | +- PropertyGet +Added line: 3716 | | | | | +- Name | | | | | +- Name | | | | +- NumberLiteral @@ -2515,6 +2557,7 @@ Added line: 198 | | | | | | +- Name | | | | | | +- Name | | | | | | +- Name +Added line: 6738 | | | | | +- VariableInitializer | | | | | +- Name | | | | | +- PropertyGet @@ -2522,6 +2565,7 @@ Added line: 198 | | | | | +- Name | | | | +- WhileLoop | | | | +- UpdateExpression +Added line: 3107 | | | | | +- Name | | | | +- Scope | | | | +- ExpressionStatement @@ -2533,8 +2577,10 @@ Added line: 198 | | | | | | +- Name | | | | | +- Name | | | | | +- ElementGet +Added line: 911 | | | | | +- Name | | | | | +- Name +Added line: 1007 | | | | +- ExpressionStatement | | | | +- Assignment | | | | +- ElementGet @@ -2556,6 +2602,7 @@ Added line: 198 | | | +- FunctionCall | | | +- Name | | | +- Name +Added line: 8869 | | | +- NumberLiteral | | | +- Name | | +- ReturnStatement @@ -2604,6 +2651,7 @@ Added line: 198 | | | +- Name | | | +- Block | | | +- VariableDeclaration +Added line: 1024 | | | | +- VariableInitializer | | | | | +- Name | | | | +- VariableInitializer @@ -2630,6 +2678,7 @@ Added line: 198 | | | | +- Name | | | | +- ElementGet | | | | +- Name +Added line: 6200 | | | | +- Name | | | +- Scope | | | +- ExpressionStatement @@ -2646,6 +2695,7 @@ Added line: 198 | | | +- Name | | +- FunctionNode | | +- Name +Added line: 6692 | | +- Name | | +- Name | | +- Block @@ -2693,13 +2743,14 @@ Added line: 198 | | | | +- Name | | | | +- Name | | | | +- Name - | | | +- Name | | +- NumberLiteral +Added line: 1180 | +- ObjectProperty | | +- Name | | +- FunctionCall | | +- Name | | +- FunctionNode +Added line: 7424 | | +- Name | | +- Block | | +- ExpressionStatement @@ -2756,6 +2807,7 @@ Added line: 198 | | | +- Name | | | +- InfixExpression | | | +- StringLiteral +Added line: 8106 | | | +- Name | | +- ExpressionStatement | | | +- Assignment @@ -2826,6 +2878,7 @@ Added line: 198 | | | | +- Name | | | | +- PropertyGet | | | | +- Name +Added line: 7415 | | | | +- Name | | | +- InfixExpression | | | +- PropertyGet @@ -2920,6 +2973,7 @@ Added line: 198 | | +- Name | | +- Block | | +- Comment +Added line: 3158 | | +- Comment | | +- ReturnStatement | | +- InfixExpression @@ -2939,6 +2993,7 @@ Added line: 198 | | +- FunctionCall | | | +- Name | | | +- Name +Added line: 4526 | | | +- StringLiteral | | +- UnaryExpression | | +- UnaryExpression @@ -2992,6 +3047,7 @@ Added line: 198 | | | | +- Name | | | | +- PropertyGet | | | | +- Name +Added line: 2496 | | | | +- Name | | | +- Scope | | | +- IfStatement @@ -3064,11 +3120,13 @@ Added line: 198 | | | +- StringLiteral | | +- FunctionCall | | +- Name +Added line: 1427 | | +- Name | | +- StringLiteral | +- ObjectProperty | | +- Name | | +- FunctionNode +Added line: 1409 | | +- Name | | +- Block | | +- ReturnStatement @@ -3083,9 +3141,11 @@ Added line: 198 | | | +- Name | | +- StringLiteral | +- ObjectProperty +Added line: 2026 | | +- Name | | +- FunctionCall | | +- Name +Added line: 4564 | | +- FunctionNode | | +- Block | | +- ReturnStatement @@ -3234,6 +3294,7 @@ Added line: 198 | | | +- Name | | +- ReturnStatement | | +- Name +Added line: 3594 | +- ObjectProperty | +- Name | +- FunctionCall @@ -3249,6 +3310,7 @@ Added line: 198 | | +- ConditionalExpression | | +- InfixExpression | | | +- Name +Added line: 2262 | | | +- NumberLiteral | | +- InfixExpression | | | +- Name @@ -3355,6 +3417,7 @@ Added line: 198 | | +- Name | +- NewExpression | +- Name +Added line: 8117 +- FunctionNode | +- Name | +- Name @@ -3389,6 +3452,7 @@ Added line: 198 | | +- ConditionalExpression | | +- Name | | +- NumberLiteral +Added line: 1709 | | +- FunctionCall | | +- PropertyGet | | | +- Name @@ -3407,6 +3471,7 @@ Added line: 198 | | +- Name | | +- PropertyGet | | +- Name +Added line: 6528 | | +- Name | +- WhileLoop | | +- Name @@ -3466,7 +3531,6 @@ Added line: 198 | | | | | +- Name | | | | | +- Name | | | | +- Name - | | | +- Scope | | | +- ExpressionStatement | | | | +- Assignment | | | | +- Name @@ -3491,7 +3555,6 @@ Added line: 198 | | | | | | +- Name | | | | | | +- NumberLiteral | | | | | +- Name - | | | | +- Name | | | | +- StringLiteral | | | +- ExpressionStatement | | | +- Assignment @@ -3542,6 +3605,7 @@ Added line: 198 | | | | +- FunctionCall | | | | +- PropertyGet | | | | +- Name +Added line: 2358 | | | | +- Name | | | +- ExpressionStatement | | | | +- FunctionCall @@ -3661,6 +3725,7 @@ Added line: 198 | | | +- Name | | | +- StringLiteral | | +- VariableInitializer +Added line: 9423 | | +- Name | | +- UpdateExpression | | +- Name @@ -3710,6 +3775,7 @@ Added line: 198 | | +- VariableInitializer | | | +- Name | | +- VariableInitializer +Added line: 9194 | | +- Name | | +- ArrayLiteral | | +- Name @@ -3768,7 +3834,6 @@ Added line: 198 | | | +- InfixExpression | | | +- ElementGet | | | | +- Name - | | | | +- Name | | | +- ParenthesizedExpression | | | +- Assignment | | | +- ElementGet @@ -3831,6 +3896,7 @@ Added line: 198 | | | +- Name | | +- Comment | | +- IfStatement +Added line: 5923 | | +- ParenthesizedExpression | | | +- Assignment | | | +- ElementGet @@ -3872,6 +3938,7 @@ Added line: 198 | | | +- UpdateExpression | | | | +- Name | | | +- Scope +Added line: 8292 | | | +- IfStatement | | | +- UnaryExpression | | | | +- FunctionCall @@ -3892,6 +3959,7 @@ Added line: 198 +- FunctionNode | +- Name | +- Name +Added line: 6441 | +- Name | +- Name | +- Block @@ -3954,6 +4022,7 @@ Added line: 198 | | +- InfixExpression | | | +- Name | | | +- Name +Added line: 590 | | +- UpdateExpression | | | +- Name | | +- Scope @@ -3992,6 +4061,7 @@ Added line: 198 | | +- Name | +- ReturnStatement | +- Name +Added line: 71 +- FunctionNode | +- Name | +- Name @@ -4154,6 +4224,7 @@ Added line: 198 | | | +- Name | | +- WhileLoop | | +- UpdateExpression +Added line: 5351 | | | +- Name | | +- Scope | | +- IfStatement @@ -4202,6 +4273,7 @@ Added line: 198 | | | | +- PropertyGet | | | | +- Name | | | | +- Name +Added line: 5633 | | | +- WhileLoop | | | | +- UpdateExpression | | | | | +- Name @@ -4362,6 +4434,7 @@ Added line: 198 | | | +- ConditionalExpression | | | +- Name | | | +- NumberLiteral +Added line: 5484 | | | +- NumberLiteral | | +- VariableInitializer | | | +- Name @@ -4444,6 +4517,7 @@ Added line: 198 | | +- Name | +- ForLoop | | +- EmptyExpression +Added line: 1194 | | +- InfixExpression | | | +- Name | | | +- Name @@ -4494,6 +4568,7 @@ Added line: 748 | | | +- KeywordLiteral | | | +- PropertyGet | | | +- ElementGet +Added line: 2619 | | | | +- Name | | | | +- Name | | | +- Name @@ -4518,6 +4593,7 @@ Added line: 748 | | | | | +- Name | | | | +- Scope | | | | +- IfStatement +Added line: 7519 | | | | +- ElementGet | | | | | +- PropertyGet | | | | | | +- Name @@ -4555,6 +4631,7 @@ Added line: 748 | | | | | | | | | +- Name | | | | | | | | +- NumberLiteral | | | | | | | | +- InfixExpression +Added line: 1604 | | | | | | | | +- Name | | | | | | | | +- NumberLiteral | | | | | | | +- Name @@ -4563,6 +4640,7 @@ Added line: 748 | | | | | | +- Name | | | | | | +- ConditionalExpression | | | | | | +- InfixExpression +Added line: 2877 | | | | | | | +- PropertyGet | | | | | | | | +- ElementGet | | | | | | | | | +- Name @@ -4578,6 +4656,7 @@ Added line: 748 | | | | +- StringLiteral | | | +- Name | | | +- InfixExpression +Added line: 1899 | | | | +- InfixExpression | | | | | +- Name | | | | | +- Name @@ -4722,11 +4801,11 @@ Added line: 748 | | | +- Name | | +- ForLoop | | | +- EmptyExpression - | | | +- InfixExpression | | | | +- ParenthesizedExpression | | | | | +- Assignment | | | | | +- Name | | | | | +- ElementGet +Added line: 7961 | | | | | +- Name | | | | | +- Name | | | | +- KeywordLiteral @@ -4754,6 +4833,7 @@ Added line: 748 | | | | | | +- PropertyGet | | | | | | | +- Name | | | | | | | +- Name +Added line: 2137 | | | | | | +- Name | | | | | +- Scope | | | | | +- ExpressionStatement @@ -4798,6 +4878,9 @@ Added line: 748 | | | | +- Assignment | | | | +- Name | | | | +- Name +Added line: 8088 +Added line: 3822 +Added line: 2901 | | | +- IfStatement | | | +- Name | | | +- Scope @@ -4850,6 +4933,7 @@ Added line: 748 | | | +- WhileLoop | | | | +- ParenthesizedExpression | | | | | +- Assignment +Added line: 9110 | | | | | +- Name | | | | | +- ElementGet | | | | | +- Name @@ -4900,6 +4984,7 @@ Added line: 748 | | | | +- ExpressionStatement | | | | +- Assignment | | | | +- Name +Added line: 9041 | | | | +- FunctionCall | | | | +- Name | | | | +- Name @@ -4920,6 +5005,7 @@ Added line: 748 | | | | +- InfixExpression | | | | +- InfixExpression | | | | | +- PropertyGet +Added line: 4033 | | | | | | +- Name | | | | | | +- Name | | | | | +- NumberLiteral @@ -4930,9 +5016,11 @@ Added line: 748 | | | | | +- PropertyGet | | | | | +- Name | | | | | +- Name +Added line: 4390 | | | | +- NumberLiteral | | | +- Scope | | | +- ExpressionStatement +Added line: 8292 | | | +- FunctionCall | | | +- PropertyGet | | | | +- Name @@ -4972,6 +5060,7 @@ Added line: 748 | | +- VariableInitializer | | | +- Name | | | +- ArrayLiteral +Added line: 3733 | | +- VariableInitializer | | +- Name | | +- ElementGet @@ -5128,6 +5217,7 @@ Added line: 748 | | | | | +- PropertyGet | | | | | | +- Name | | | | | | +- Name +Added line: 4080 | | | | | +- NumberLiteral | | | | +- InfixExpression | | | | +- InfixExpression @@ -5212,7 +5302,6 @@ Added line: 1560 | | | | +- FunctionCall | | | | | +- PropertyGet | | | | | +- Name - | | | | | +- Name | | | | +- Name | | | +- Name | | +- ExpressionStatement diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/templateStrings.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/templateStrings.txt index e2387c0f5f..fe0f11bcf0 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/templateStrings.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/ast/testdata/templateStrings.txt @@ -1,14 +1,103 @@ +Added line: 7020 +Added line: 4077 +Added line: 3725 +Added line: 111 +Added line: 3628 +Added line: 564 +- AstRoot +Added line: 489 +Added line: 9628 +Added line: 868 +Added line: 9154 +Added line: 41 +Added line: 5189 +Added line: 1264 +Added line: 4830 +Added line: 4802 +Added line: 7826 +Added line: 5067 +Added line: 3161 +Added line: 2221 +Added line: 2383 +Added line: 3900 +Added line: 9779 +Added line: 2626 +Added line: 3504 +Added line: 5468 +Added line: 3403 +Added line: 4470 +Added line: 6263 +Added line: 1262 +Added line: 5150 +Added line: 3753 +Added line: 1476 +Added line: 4649 +Added line: 4661 +Added line: 1606 +Added line: 8095 +Added line: 7433 +Added line: 8666 +Added line: 6069 Added line: 7862 +Added line: 459 +Added line: 4042 +Added line: 9418 +Added line: 2448 +Added line: 7698 +- FunctionNode +Added line: 5089 +Added line: 6428 +Added line: 5494 +Added line: 6329 +Added line: 5936 +Added line: 4013 Added line: 2130 +- Block +Added line: 999 +Added line: 1768 +Added line: 6390 Added line: 7673 +Added line: 626 +Added line: 8804 +Added line: 7650 +Added line: 9399 +- VariableDeclaration +Added line: 1747 +Added line: 818 +Added line: 6988 +Added line: 2346 +Added line: 9998 +Added line: 947 +Added line: 7420 +Added line: 1249 +Added line: 4610 +Added line: 4947 +Added line: 8151 +Added line: 1984 +Added line: 7181 +Added line: 4803 +Added line: 5797 +Added line: 2352 | +- Name +Added line: 5439 +Added line: 5172 +Added line: 2426 +Added line: 2738 +Added line: 4423 Added line: 880 +Added line: 8939 +Added line: 5855 | +- StringLiteral +Added line: 2372 +Added line: 1287 +- VariableDeclaration +Added line: 8936 +Added line: 254 +Added line: 383 +Added line: 6834 +Added line: 3067 +Added line: 7538 +- Name Added line: 4632 +Added line: 1772 +- TemplateLiteral diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/decorator.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/decorator.txt index 0469118758..bf9ba6a4f5 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/decorator.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/decorator.txt @@ -1,26 +1,115 @@ +Added line: 5479 +Added line: 2795 +Added line: 6449 +Added line: 3023 +Added line: 8936 +Added line: 1300 [Image] or [Truncated image[ Bcol Ecol +Added line: 2285 +Added line: 8183 +Added line: 1473 +Added line: 8409 L2 +Added line: 5566 +Added line: 5621 +Added line: 1207 +Added line: 5799 +Added line: 9354 +Added line: 7961 +Added line: 1389 +Added line: 7499 [@] 1 2 +Added line: 3844 [annotation] 2 12 L3 - [class] 1 6 +Added line: 8332 +Added line: 6055 +Added line: 5202 +Added line: 2563 +Added line: 1163 +Added line: 4089 +Added line: 9482 +Added line: 9304 +Added line: 1834 +Added line: 3708 +Added line: 1071 +Added line: 9527 +Added line: 3256 [MyClass] 7 14 +Added line: 404 +Added line: 3558 +Added line: 3737 +Added line: 7533 +Added line: 6530 [{] 15 16 +Added line: 5555 +Added line: 6502 +Added line: 2978 +Added line: 854 +Added line: 8687 +Added line: 2649 +Added line: 3491 [}] 17 18 +Added line: 364 +Added line: 696 L5 +Added line: 1555 +Added line: 4831 +Added line: 2571 +Added line: 4836 +Added line: 8314 [function] 1 9 +Added line: 9427 [annotation] 10 20 +Added line: 8654 +Added line: 7245 +Added line: 2604 +Added line: 2199 +Added line: 8795 +Added line: 9917 +Added line: 3937 [(] 20 21 [target] 21 27 [)] 27 28 [{] 29 30 +Added line: 5424 +Added line: 2580 L7 - [target] 4 10 +Added line: 9867 +Added line: 5589 +Added line: 6908 +Added line: 8145 [.] 10 11 [annotated] 11 20 +Added line: 2116 +Added line: 7450 +Added line: 9425 +Added line: 9060 +Added line: 4523 +Added line: 4332 +Added line: 5146 +Added line: 6640 +Added line: 3896 +Added line: 3192 [=] 21 22 [true] 23 27 +Added line: 9934 +Added line: 184 +Added line: 8290 +Added line: 6664 +Added line: 739 +Added line: 7806 +Added line: 7228 +Added line: 359 +Added line: 4764 +Added line: 7423 +Added line: 6735 [;] 27 28 +Added line: 4527 +Added line: 4760 +Added line: 1751 L8 +Added line: 7736 [}] 1 2 EOF +Added line: 5390 diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/lineContinuations.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/lineContinuations.txt index 0fa7124a95..55cdfeea1d 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/lineContinuations.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/lineContinuations.txt @@ -1,18 +1,107 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 6208 L1 +Added line: 7675 +Added line: 8428 +Added line: 538 +Added line: 1708 +Added line: 9079 +Added line: 8263 +Added line: 9870 +Added line: 1014 +Added line: 7063 +Added line: 308 +Added line: 8563 +Added line: 349 +Added line: 4996 +Added line: 1204 Added line: 1239 +Added line: 8889 +Added line: 2594 [var] 1 4 +Added line: 732 +Added line: 4643 +Added line: 3852 +Added line: 1443 +Added line: 186 +Added line: 7547 +Added line: 9722 +Added line: 8621 +Added line: 1402 [s] 5 6 +Added line: 7817 +Added line: 3712 +Added line: 5939 ["a string continues"] 9 11 +Added line: 7805 +Added line: 3011 +Added line: 5999 +Added line: 5995 +Added line: 2613 +Added line: 887 +Added line: 1977 +Added line: 4600 +Added line: 307 +Added line: 1718 +Added line: 8601 +Added line: 7150 +Added line: 9721 +Added line: 4148 +Added line: 1838 +Added line: 2751 +Added line: 5999 L2 +Added line: 2659 +Added line: 7229 +Added line: 10 +Added line: 5628 [;] 11 12 -L3 +Added line: 6272 +Added line: 4966 +Added line: 3823 +Added line: 5555 +Added line: 4655 +Added line: 9346 [var] 1 4 [s] 5 6 - [=] 7 8 +Added line: 653 +Added line: 8678 +Added line: 9123 +Added line: 6847 +Added line: 7460 +Added line: 3855 +Added line: 3568 +Added line: 3048 +Added line: 5606 +Added line: 2848 +Added line: 5138 ["a string continues2"] 9 12 -L4 +Added line: 5954 +Added line: 2251 +Added line: 2156 +Added line: 8223 +Added line: 8227 +Added line: 2913 +Added line: 5947 +Added line: 6707 Added line: 2425 +Added line: 3091 +Added line: 991 +Added line: 7730 +Added line: 3507 +Added line: 9915 Added line: 2253 +Added line: 5167 +Added line: 6180 +Added line: 1035 +Added line: 2791 +Added line: 5200 +Added line: 6658 +Added line: 418 +Added line: 415 +Added line: 7514 [;] 12 13 +Added line: 7028 +Added line: 4839 +Added line: 2976 EOF diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/multilineCommentIgnore.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/multilineCommentIgnore.txt index 3ebbcb14f2..a66d5b77ad 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/multilineCommentIgnore.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/multilineCommentIgnore.txt @@ -1,12 +1,101 @@ +Added line: 5822 +Added line: 591 [Image] or [Truncated image[ Bcol Ecol +Added line: 2196 +Added line: 3245 +Added line: 5324 +Added line: 6226 +Added line: 2464 +Added line: 3193 +Added line: 1786 +Added line: 6614 +Added line: 9954 +Added line: 6251 +Added line: 8050 +Added line: 5617 +Added line: 5466 +Added line: 716 +Added line: 3009 +Added line: 9246 +Added line: 1871 +Added line: 7927 +Added line: 5179 +Added line: 8514 +Added line: 2573 +Added line: 6984 +Added line: 2701 +Added line: 5919 +Added line: 9675 L5 +Added line: 9949 +Added line: 5487 +Added line: 3190 +Added line: 4720 [var] 1 4 +Added line: 1523 [i] 5 6 +Added line: 3197 +Added line: 2677 +Added line: 2252 +Added line: 5640 +Added line: 8883 [=] 7 8 +Added line: 5363 +Added line: 1038 +Added line: 505 +Added line: 165 +Added line: 1168 +Added line: 2986 +Added line: 7986 [0] 9 10 +Added line: 1046 +Added line: 6369 +Added line: 8077 +Added line: 1702 +Added line: 168 +Added line: 6374 [;] 10 11 +Added line: 2766 +Added line: 4377 +Added line: 6979 +Added line: 6861 L10 +Added line: 3058 +Added line: 3608 +Added line: 1344 +Added line: 5945 +Added line: 117 +Added line: 6841 +Added line: 8823 +Added line: 9392 +Added line: 464 +Added line: 8584 +Added line: 1352 [i] 1 2 +Added line: 5218 +Added line: 1867 +Added line: 8281 +Added line: 8669 +Added line: 9030 +Added line: 5974 [++] 2 4 +Added line: 9974 +Added line: 976 +Added line: 9526 +Added line: 5176 +Added line: 4671 +Added line: 1091 +Added line: 7862 +Added line: 3236 +Added line: 2880 +Added line: 1682 [;] 4 5 +Added line: 7725 EOF +Added line: 1845 +Added line: 6514 +Added line: 8486 +Added line: 4382 +Added line: 3175 +Added line: 3356 +Added line: 6981 diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/simple.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/simple.txt index 60447768a1..eaa8a322b9 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/simple.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/simple.txt @@ -1,48 +1,137 @@ +Added line: 974 +Added line: 281 +Added line: 8787 +Added line: 675 [Image] or [Truncated image[ Bcol Ecol +Added line: 6294 +Added line: 4920 L1 [function] 1 9 +Added line: 9988 +Added line: 2583 [switchToRealPassword] 10 30 [(] 30 31 +Added line: 9883 +Added line: 4641 +Added line: 6093 +Added line: 9806 [)] 31 32 - [{] 33 34 +Added line: 6084 +Added line: 450 +Added line: 235 L2 +Added line: 8342 [var] 5 8 +Added line: 6411 +Added line: 1038 +Added line: 4237 [real] 9 13 +Added line: 3038 +Added line: 6077 [=] 14 15 [$] 16 17 +Added line: 7122 +Added line: 3210 [(] 17 18 - ['realPass'] 18 28 +Added line: 5483 +Added line: 886 +Added line: 1063 [)] 28 29 +Added line: 8091 L3 +Added line: 6641 +Added line: 909 +Added line: 2117 +Added line: 8105 [var] 5 8 [prompt] 9 15 - [=] 16 17 +Added line: 8396 +Added line: 1169 +Added line: 2231 +Added line: 1208 +Added line: 791 [$] 18 19 - [(] 19 20 ['promptPass'] 20 32 +Added line: 547 +Added line: 2498 +Added line: 180 [)] 32 33 L4 [real] 5 9 [.] 9 10 +Added line: 9001 +Added line: 6718 [style] 10 15 +Added line: 3134 +Added line: 8524 +Added line: 8611 [.] 15 16 [display] 16 23 +Added line: 138 [=] 24 25 ['inline'] 26 34 +Added line: 8497 L5 +Added line: 7345 +Added line: 1857 +Added line: 8423 +Added line: 1786 +Added line: 5575 +Added line: 6578 +Added line: 8998 [prompt] 5 11 +Added line: 9382 +Added line: 8936 +Added line: 2390 [.] 11 12 +Added line: 2376 +Added line: 1400 [style] 12 17 +Added line: 1347 [.] 17 18 [display] 18 25 - [=] 26 27 +Added line: 6144 +Added line: 1463 +Added line: 9864 +Added line: 6941 +Added line: 2104 ['none'] 28 34 +Added line: 3 +Added line: 3605 +Added line: 1005 +Added line: 3034 +Added line: 8592 +Added line: 6125 +Added line: 9726 +Added line: 9991 L6 +Added line: 8152 [real] 5 9 +Added line: 6858 [.] 9 10 +Added line: 364 +Added line: 5547 +Added line: 3075 [focus] 10 15 [(] 15 16 +Added line: 2315 +Added line: 7383 +Added line: 5042 +Added line: 6071 +Added line: 490 +Added line: 5565 +Added line: 5055 +Added line: 9769 [)] 16 17 +Added line: 6875 L7 [}] 1 2 +Added line: 8388 +Added line: 3724 +Added line: 3961 +Added line: 9245 +Added line: 4253 +Added line: 6677 +Added line: 8392 +Added line: 8910 EOF diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/simpleWithSemis.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/simpleWithSemis.txt index 4653da191d..f3cea5fbbd 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/simpleWithSemis.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/simpleWithSemis.txt @@ -1,15 +1,34 @@ +Added line: 780 +Added line: 4554 Added line: 3224 +Added line: 8076 [Image] or [Truncated image[ Bcol Ecol L1 +Added line: 7960 [function] 1 9 +Added line: 1496 [switchToRealPassword] 10 30 [(] 30 31 +Added line: 5089 +Added line: 664 +Added line: 3282 [{] 33 34 L2 +Added line: 6632 +Added line: 8294 +Added line: 569 [var] 5 8 +Added line: 2558 [real] 9 13 Added line: 7642 +Added line: 8069 +Added line: 8764 +Added line: 5362 +Added line: 3598 +Added line: 2806 +Added line: 4151 Added line: 9057 +Added line: 6767 [$] 16 17 [(] 17 18 ['realPass'] 18 28 @@ -17,39 +36,109 @@ Added line: 9057 [;] 29 30 L3 [var] 5 8 +Added line: 4400 [prompt] 9 15 +Added line: 8408 [=] 16 17 +Added line: 6552 +Added line: 3240 +Added line: 5170 [$] 18 19 +Added line: 9106 +Added line: 8619 +Added line: 3092 +Added line: 5186 +Added line: 5182 +Added line: 5969 +Added line: 1445 [(] 19 20 ['promptPass'] 20 32 [)] 32 33 +Added line: 6447 Added line: 1318 +Added line: 8885 [;] 33 34 Added line: 6893 +Added line: 6136 +Added line: 1024 +Added line: 9302 +Added line: 3280 +Added line: 1055 L4 +Added line: 4202 [real] 5 9 +Added line: 8110 +Added line: 1460 +Added line: 5255 +Added line: 4428 [style] 10 15 [.] 15 16 +Added line: 4958 [display] 16 23 +Added line: 8237 +Added line: 5096 +Added line: 1197 +Added line: 8724 +Added line: 890 +Added line: 2859 +Added line: 8817 +Added line: 4862 +Added line: 3602 [=] 24 25 +Added line: 6414 +Added line: 9887 ['inline'] 26 34 [;] 34 35 +Added line: 4068 L5 [prompt] 5 11 +Added line: 6661 +Added line: 2431 +Added line: 6831 [.] 11 12 +Added line: 2527 +Added line: 9837 [style] 12 17 +Added line: 8315 +Added line: 9182 +Added line: 5039 +Added line: 5947 [.] 17 18 [display] 18 25 +Added line: 9052 [=] 26 27 - ['none'] 28 34 +Added line: 2401 +Added line: 8672 +Added line: 5775 +Added line: 8296 +Added line: 2993 +Added line: 7773 [;] 34 35 +Added line: 7093 L6 [real] 5 9 +Added line: 2386 +Added line: 142 [.] 9 10 - [focus] 10 15 +Added line: 3163 +Added line: 4626 +Added line: 3110 +Added line: 5509 +Added line: 8407 [(] 15 16 [)] 16 17 +Added line: 9250 [;] 17 18 +Added line: 8440 L7 [}] 1 2 +Added line: 170 +Added line: 1695 +Added line: 8530 +Added line: 9171 +Added line: 8435 EOF +Added line: 6502 +Added line: 915 +Added line: 1969 +Added line: 1815 diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/singleLineCommentIgnore.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/singleLineCommentIgnore.txt index 3d3219fb95..93efd39afb 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/singleLineCommentIgnore.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/singleLineCommentIgnore.txt @@ -1,14 +1,103 @@ +Added line: 8737 +Added line: 8896 +Added line: 3753 [Image] or [Truncated image[ Bcol Ecol +Added line: 2467 +Added line: 8527 +Added line: 8466 +Added line: 5418 +Added line: 6217 +Added line: 5048 +Added line: 9874 +Added line: 6364 L3 Added line: 3170 +Added line: 6756 +Added line: 711 +Added line: 4066 +Added line: 9783 +Added line: 280 +Added line: 9548 +Added line: 5811 +Added line: 6007 +Added line: 7858 +Added line: 1458 +Added line: 2412 [var] 1 4 +Added line: 1429 +Added line: 4126 Added line: 802 +Added line: 9800 +Added line: 9473 +Added line: 5458 +Added line: 4106 +Added line: 561 +Added line: 7631 +Added line: 1666 +Added line: 8337 +Added line: 1991 [0] 9 10 +Added line: 4910 +Added line: 2042 +Added line: 1477 +Added line: 1815 +Added line: 2061 +Added line: 1898 +Added line: 8501 +Added line: 5833 +Added line: 3321 +Added line: 2686 +Added line: 7076 +Added line: 653 +Added line: 1279 +Added line: 3639 +Added line: 5571 +Added line: 3216 [;] 10 11 -L6 +Added line: 3902 +Added line: 652 +Added line: 5708 Added line: 3107 Added line: 5875 +Added line: 4555 +Added line: 92 +Added line: 6414 [i] 1 2 +Added line: 4535 +Added line: 1294 +Added line: 8087 +Added line: 5940 +Added line: 3642 +Added line: 5796 +Added line: 9386 +Added line: 4111 +Added line: 1992 [++] 2 4 +Added line: 8092 +Added line: 9524 +Added line: 4903 +Added line: 5896 +Added line: 9522 +Added line: 9909 +Added line: 7259 [;] 4 5 +Added line: 6800 +Added line: 9351 +Added line: 4053 +Added line: 6929 +Added line: 4579 +Added line: 2184 +Added line: 5754 +Added line: 765 +Added line: 2803 +Added line: 4809 +Added line: 9480 +Added line: 9832 +Added line: 1540 +Added line: 9348 +Added line: 3395 +Added line: 6351 +Added line: 3418 +Added line: 4570 +Added line: 2453 EOF diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/specialComments.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/specialComments.txt index 10cdceeed2..770d8845af 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/specialComments.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/specialComments.txt @@ -1,8 +1,97 @@ +Added line: 7250 +Added line: 1848 +Added line: 3809 +Added line: 1485 +Added line: 9422 +Added line: 9050 +Added line: 8261 +Added line: 7966 +Added line: 6165 +Added line: 2194 +Added line: 6421 +Added line: 2209 +Added line: 9675 +Added line: 2852 +Added line: 6656 +Added line: 1186 +Added line: 7567 +Added line: 7070 +Added line: 9305 +Added line: 4574 +Added line: 1554 +Added line: 4467 +Added line: 7241 +Added line: 7241 +Added line: 7366 +Added line: 3691 +Added line: 1250 +Added line: 5069 +Added line: 335 +Added line: 1216 +Added line: 4831 +Added line: 993 +Added line: 3762 +Added line: 883 +Added line: 1923 +Added line: 4849 +Added line: 8153 +Added line: 300 +Added line: 8195 +Added line: 9144 +Added line: 7380 +Added line: 1973 +Added line: 5288 +Added line: 4976 +Added line: 6627 +Added line: 3264 +Added line: 756 +Added line: 5902 Added line: 7113 +Added line: 6110 +Added line: 6805 +Added line: 2273 +Added line: 2793 +Added line: 4328 +Added line: 7189 +Added line: 2699 +Added line: 1614 +Added line: 2571 +Added line: 3230 +Added line: 2984 Added line: 803 +Added line: 8572 +Added line: 9584 +Added line: 5907 [Image] or [Truncated image[ Bcol Ecol Added line: 1616 +Added line: 1558 +Added line: 3030 +Added line: 5779 Added line: 2373 [}] 1 2 Added line: 8619 +Added line: 7256 +Added line: 8844 Added line: 7641 +Added line: 5798 +Added line: 5489 +Added line: 195 +Added line: 6816 +Added line: 2688 +Added line: 8269 +Added line: 1732 +Added line: 5125 +Added line: 7477 +Added line: 1685 +Added line: 5788 +Added line: 872 +Added line: 797 +Added line: 6588 +Added line: 7130 +Added line: 1723 +Added line: 7994 +Added line: 2974 +Added line: 5291 +Added line: 8338 +Added line: 2158 +Added line: 1829 diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/tabWidth.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/tabWidth.txt index 09f86c16cf..a430b334ef 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/tabWidth.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/tabWidth.txt @@ -1,50 +1,139 @@ +Added line: 4220 +Added line: 2163 +Added line: 2979 +Added line: 4057 [Image] or [Truncated image[ Bcol Ecol +Added line: 1951 +Added line: 4320 L1 +Added line: 736 +Added line: 7544 [function] 1 9 +Added line: 8240 [switchToRealPassword] 10 30 +Added line: 3285 +Added line: 9500 +Added line: 1969 +Added line: 5456 [(] 30 31 [)] 31 32 Added line: 5366 +Added line: 6044 +Added line: 8729 +Added line: 462 [{] 33 34 +Added line: 2986 +Added line: 151 +Added line: 4562 +Added line: 7980 +Added line: 4548 +Added line: 1535 +Added line: 7728 L2 [var] 2 5 [real] 6 10 +Added line: 4570 [=] 11 12 +Added line: 4183 +Added line: 8009 +Added line: 248 [$] 13 14 +Added line: 8211 [(] 14 15 +Added line: 137 ['realPass'] 15 25 [)] 25 26 +Added line: 6956 L3 [var] 2 5 +Added line: 774 [prompt] 6 12 [$] 15 16 +Added line: 1024 +Added line: 3213 +Added line: 7558 +Added line: 2933 +Added line: 2465 [(] 16 17 +Added line: 977 Added line: 5971 +Added line: 6370 ['promptPass'] 17 29 +Added line: 5109 +Added line: 7649 +Added line: 8929 +Added line: 6413 +Added line: 3690 +Added line: 2747 +Added line: 8338 +Added line: 6828 +Added line: 4530 +Added line: 972 [)] 29 30 +Added line: 5128 +Added line: 7000 +Added line: 3449 +Added line: 3300 +Added line: 4160 +Added line: 3448 Added line: 9003 +Added line: 1560 L4 +Added line: 2205 [real] 2 6 +Added line: 9438 +Added line: 8191 +Added line: 1917 +Added line: 5332 +Added line: 5064 +Added line: 2489 [.] 6 7 +Added line: 4647 +Added line: 6900 +Added line: 372 [style] 7 12 +Added line: 4211 [.] 12 13 - [display] 13 20 +Added line: 1447 [=] 21 22 ['inline'] 23 31 L5 [prompt] 2 8 +Added line: 7475 +Added line: 9481 +Added line: 4238 [.] 8 9 [style] 9 14 +Added line: 9191 +Added line: 5515 +Added line: 1841 [.] 14 15 [display] 15 22 +Added line: 9063 [=] 23 24 - ['none'] 25 31 +Added line: 8041 +Added line: 6885 L6 +Added line: 7716 [real] 2 6 - [.] 6 7 +Added line: 5598 +Added line: 1166 +Added line: 8345 +Added line: 3991 +Added line: 6242 +Added line: 856 +Added line: 9035 +Added line: 6437 +Added line: 9111 [focus] 7 12 [(] 12 13 +Added line: 4414 +Added line: 160 +Added line: 5851 [)] 13 14 +Added line: 5650 +Added line: 3195 L7 - [}] 1 2 +Added line: 9362 +Added line: 2749 EOF diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/templateStrings.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/templateStrings.txt index c8c6813ebe..a639ed243f 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/templateStrings.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/templateStrings.txt @@ -1,38 +1,127 @@ +Added line: 6873 [Image] or [Truncated image[ Bcol Ecol -L1 +Added line: 8957 +Added line: 8062 +Added line: 7465 +Added line: 9589 +Added line: 6959 +Added line: 6347 +Added line: 1343 +Added line: 9183 +Added line: 5142 [export] 1 7 - [default] 8 15 +Added line: 9074 +Added line: 7520 Added line: 9024 +Added line: 941 [class] 16 21 +Added line: 9585 [DrawLocation] 22 34 +Added line: 6298 +Added line: 6354 +Added line: 4898 +Added line: 8473 +Added line: 4490 +Added line: 4119 +Added line: 3621 +Added line: 2379 +Added line: 5837 [extends] 35 42 [joint] 43 48 +Added line: 3875 +Added line: 3270 +Added line: 6271 +Added line: 2693 +Added line: 4172 +Added line: 4993 +Added line: 9075 [.] 48 49 [shapes] 49 55 +Added line: 3316 [.] 55 56 +Added line: 9047 +Added line: 2199 [basic] 56 61 +Added line: 5667 +Added line: 3645 [.] 61 62 +Added line: 2790 +Added line: 9041 +Added line: 2532 +Added line: 3628 +Added line: 7983 [Generic] 62 69 +Added line: 7805 [{] 70 71 +Added line: 238 L2 +Added line: 2608 Added line: 7133 - [(] 16 17 +Added line: 479 +Added line: 783 +Added line: 7729 +Added line: 7939 [location] 17 25 [:] 25 26 +Added line: 7971 +Added line: 3464 +Added line: 9419 [ILocation] 27 36 +Added line: 5002 +Added line: 1149 Added line: 3708 +Added line: 4409 +Added line: 3757 +Added line: 8080 [)] 36 37 - [{] 38 39 L3 +Added line: 5434 +Added line: 8892 [this] 9 13 +Added line: 9738 +Added line: 3659 +Added line: 4732 +Added line: 7399 [.] 13 14 +Added line: 5798 +Added line: 998 +Added line: 8774 [markup] 14 20 +Added line: 843 +Added line: 1295 +Added line: 719 +Added line: 2847 Added line: 5654 +Added line: 9551 [`<g>\n <path class="locatio[ 23 12 +Added line: 6702 +Added line: 2498 +Added line: 8196 +Added line: 7735 +Added line: 1275 +Added line: 362 [;] 12 13 +Added line: 7065 +Added line: 5087 +Added line: 7219 L12 +Added line: 8905 +Added line: 9964 +Added line: 4836 [}] 5 6 +Added line: 7977 +Added line: 1720 L14 +Added line: 7927 +Added line: 3163 +Added line: 1287 [}] 1 2 +Added line: 8256 +Added line: 3759 +Added line: 713 Added line: 525 +Added line: 9753 +Added line: 7533 +Added line: 1571 EOF +Added line: 4650 diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/ts/SampleTypeScript.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/ts/SampleTypeScript.txt index 29df34e260..5d1ed3b754 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/ts/SampleTypeScript.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/ecmascript/cpd/testdata/ts/SampleTypeScript.txt @@ -1,42 +1,131 @@ +Added line: 8990 +Added line: 2749 +Added line: 2022 +Added line: 7759 +Added line: 4747 [Image] or [Truncated image[ Bcol Ecol +Added line: 5645 L1 +Added line: 4878 +Added line: 1350 +Added line: 6164 +Added line: 6799 [(] 1 2 +Added line: 8364 +Added line: 4464 [function] 2 10 +Added line: 6629 [(] 10 11 [)] 11 12 +Added line: 5130 L3 +Added line: 5082 +Added line: 8712 +Added line: 6374 [var] 1 4 - [x] 5 6 +Added line: 9841 +Added line: 730 [=] 7 8 +Added line: 2234 [1] 9 10 +Added line: 8200 [;] 10 11 +Added line: 753 +Added line: 9249 L4 +Added line: 1654 [var] 1 4 +Added line: 4832 [y] 5 6 +Added line: 5638 +Added line: 726 Added line: 5533 +Added line: 1369 +Added line: 690 +Added line: 1287 +Added line: 9136 +Added line: 2909 [=] 7 8 +Added line: 8362 Added line: 4621 +Added line: 586 +Added line: 6025 +Added line: 5286 +Added line: 9293 Added line: 2650 +Added line: 1227 [2] 9 10 [;] 10 11 +Added line: 3263 L5 +Added line: 6403 +Added line: 3975 [var] 1 4 +Added line: 8648 [z] 5 6 [=] 7 8 +Added line: 7672 +Added line: 4927 +Added line: 2163 [;] 10 11 +Added line: 6674 +Added line: 5652 +Added line: 9135 Added line: 8099 +Added line: 9864 +Added line: 655 +Added line: 9442 +Added line: 1509 L6 +Added line: 2168 +Added line: 9505 +Added line: 2537 +Added line: 9080 +Added line: 2615 +Added line: 4717 +Added line: 6996 +Added line: 8067 +Added line: 5704 [window] 1 7 [.] 7 8 +Added line: 7372 +Added line: 7576 [alert] 8 13 [(] 13 14 ['Test'] 14 20 +Added line: 4333 +Added line: 6947 +Added line: 9236 +Added line: 1613 +Added line: 9432 [)] 20 21 +Added line: 4314 +Added line: 9001 +Added line: 5300 +Added line: 4117 +Added line: 3734 +Added line: 2753 [;] 21 22 +Added line: 7824 +Added line: 7469 +Added line: 4188 +Added line: 5381 +Added line: 166 L9 +Added line: 9278 +Added line: 4010 [}] 1 2 +Added line: 8814 +Added line: 5681 +Added line: 5858 [)] 2 3 [(] 3 4 [)] 4 5 +Added line: 5709 +Added line: 9804 [;] 5 6 +Added line: 8561 +Added line: 3974 +Added line: 186 EOF +Added line: 5256 diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/typescript/cpd/testdata/APISample_Watch.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/typescript/cpd/testdata/APISample_Watch.txt index 5043121523..330b499779 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/typescript/cpd/testdata/APISample_Watch.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/typescript/cpd/testdata/APISample_Watch.txt @@ -1,13 +1,20 @@ - [Image] or [Truncated image[ Bcol Ecol +Added line: 7939 +Added line: 287 +Added line: 3586 L9 +Added line: 2466 +Added line: 3304 [{] 1 2 +Added line: 4039 L10 ["name"] 5 11 [:] 11 12 ["typescript"] 13 25 [,] 25 26 L11 +Added line: 3577 ["types"] 5 12 +Added line: 6867 [:] 12 13 ["/.ts/typescript.d.ts"] 14 36 L12 @@ -17,22 +24,26 @@ L21 [var] 9 12 [process] 13 20 [:] 20 21 +Added line: 6632 [any] 22 25 +Added line: 2414 [;] 25 26 L22 [declare] 1 8 [var] 9 12 [console] 13 20 [:] 20 21 - [any] 22 25 +Added line: 761 [;] 25 26 L23 [declare] 1 8 [var] 9 12 [os] 13 15 [:] 15 16 +Added line: 4583 [any] 17 20 [;] 20 21 +Added line: 7894 L25 [import] 1 7 [ts] 8 10 @@ -42,14 +53,18 @@ L25 ["typescript"] 21 33 [)] 33 34 [;] 34 35 +Added line: 3891 L27 [const] 1 6 [formatHost] 7 17 [:] 17 18 [ts] 19 21 [.] 21 22 +Added line: 5628 +Added line: 6966 [FormatDiagnosticsHost] 22 43 [=] 44 45 +Added line: 5229 [{] 46 47 L28 [getCanonicalFileName] 5 25 @@ -61,15 +76,18 @@ L28 L29 [getCurrentDirectory] 5 24 [:] 24 25 - [ts] 26 28 +Added line: 945 [.] 28 29 [sys] 29 32 +Added line: 4258 +Added line: 758 [.] 32 33 [getCurrentDirectory] 33 52 [,] 52 53 L30 [getNewLine] 5 15 [:] 15 16 +Added line: 9526 [(] 17 18 [)] 18 19 [=>] 20 22 @@ -81,6 +99,7 @@ L30 [,] 37 38 L31 [}] 1 2 +Added line: 9165 L33 [function] 1 9 [watchMain] 10 19 @@ -89,21 +108,31 @@ L33 [{] 22 23 L34 [const] 5 10 +Added line: 7030 [configPath] 11 21 [=] 22 23 +Added line: 3851 +Added line: 6245 [ts] 24 26 [.] 26 27 +Added line: 2609 +Added line: 1743 [findConfigFile] 27 41 [(] 41 42 ["./"] 57 61 [,] 61 62 +Added line: 3276 [ts] 63 65 +Added line: 3007 +Added line: 834 [.] 65 66 +Added line: 8364 [sys] 66 69 +Added line: 5605 [.] 69 70 - [fileExists] 70 80 [,] 80 81 ["tsconfig.json"] 82 97 +Added line: 7514 [)] 97 98 [;] 98 99 L35 @@ -112,30 +141,39 @@ L35 [!] 9 10 [configPath] 10 20 [)] 20 21 +Added line: 4411 [{] 22 23 L36 [throw] 9 14 [new] 15 18 [Error] 19 24 [(] 24 25 +Added line: 8372 ["Could not find a valid 'tsconfig.[ 25 66 [)] 66 67 [;] 67 68 L37 - [}] 5 6 +Added line: 583 L50 +Added line: 4084 [const] 5 10 +Added line: 1084 [host] 11 15 [=] 16 17 [ts] 18 20 [.] 20 21 +Added line: 2076 [createWatchCompilerHost] 21 44 [(] 44 45 [configPath] 45 55 +Added line: 4181 [,] 55 56 +Added line: 650 +Added line: 8326 [{] 57 58 [}] 58 59 [,] 59 60 +Added line: 3422 [ts] 61 63 [.] 63 64 [sys] 64 67 @@ -145,21 +183,28 @@ L51 [.] 11 12 [createSemanticDiagnosticsBuilderPr[ 12 51 [,] 51 52 +Added line: 4978 L52 [reportDiagnostic] 9 25 [,] 25 26 +Added line: 7200 L53 [reportWatchStatusChanged] 9 33 [,] 33 34 +Added line: 8570 L54 [)] 5 6 +Added line: 3680 [;] 6 7 L58 [const] 5 10 [origCreateProgram] 11 28 +Added line: 3619 [=] 29 30 - [host] 31 35 +Added line: 1211 +Added line: 4232 [.] 35 36 +Added line: 1591 [createProgram] 36 49 [;] 49 50 L59 @@ -167,32 +212,43 @@ L59 [.] 9 10 [createProgram] 10 23 [=] 24 25 - [(] 26 27 [rootNames] 27 36 [:] 36 37 [ReadonlyArray] 38 51 [<] 51 52 [string] 52 58 +Added line: 3298 +Added line: 1917 [>] 58 59 +Added line: 837 [,] 59 60 +Added line: 8532 [options] 61 68 [,] 68 69 [host] 70 74 +Added line: 4121 +Added line: 3938 [,] 74 75 [oldProgram] 76 86 [)] 86 87 [=>] 88 90 [{] 91 92 L60 +Added line: 4618 [console] 9 16 [.] 16 17 +Added line: 1565 +Added line: 8335 +Added line: 4328 [log] 17 20 [(] 20 21 ["** We're about to create the prog[ 21 63 [)] 63 64 +Added line: 8769 [;] 64 65 L61 [return] 9 15 +Added line: 7986 [origCreateProgram] 16 33 [(] 33 34 [rootNames] 34 43 @@ -205,6 +261,8 @@ L61 [)] 70 71 [;] 71 72 L62 +Added line: 6228 +Added line: 7700 [}] 5 6 L63 [const] 5 10 @@ -218,13 +276,17 @@ L65 [host] 5 9 [.] 9 10 [afterProgramCreate] 10 28 +Added line: 8924 +Added line: 8471 [=] 29 30 +Added line: 8101 [program] 31 38 - [=>] 39 41 [{] 42 43 +Added line: 3751 L66 [console] 9 16 [.] 16 17 +Added line: 4039 [log] 17 20 [(] 20 21 ["** We finished making the program[ 21 60 @@ -233,31 +295,40 @@ L66 L67 [origPostProgramCreate] 9 30 [!] 30 31 +Added line: 5758 [(] 31 32 +Added line: 5180 [program] 32 39 +Added line: 5779 [)] 39 40 [;] 40 41 L68 [}] 5 6 [;] 6 7 L71 +Added line: 474 [ts] 5 7 [.] 7 8 +Added line: 2879 [createWatchProgram] 8 26 [(] 26 27 +Added line: 4939 [host] 27 31 [)] 31 32 [;] 32 33 L72 [}] 1 2 L74 +Added line: 8017 [function] 1 9 +Added line: 1292 [reportDiagnostic] 10 26 [(] 26 27 [diagnostic] 27 37 [:] 37 38 [ts] 39 41 [.] 41 42 +Added line: 7738 [Diagnostic] 42 52 [)] 52 53 [{] 54 55 @@ -278,6 +349,7 @@ L76 [ts] 9 11 [.] 11 12 [flattenDiagnosticMessageText] 12 40 +Added line: 8090 [(] 40 41 [diagnostic] 41 51 [.] 51 52 @@ -300,12 +372,18 @@ L84 [(] 34 35 [diagnostic] 35 45 [:] 45 46 +Added line: 1362 [ts] 47 49 +Added line: 5965 [.] 49 50 [Diagnostic] 50 60 [)] 60 61 [{] 62 63 L85 +Added line: 3814 +Added line: 1072 +Added line: 3377 +Added line: 288 [console] 5 12 [.] 12 13 [info] 13 17 @@ -313,18 +391,29 @@ L85 [ts] 18 20 [.] 20 21 [formatDiagnostic] 21 37 +Added line: 6717 [(] 37 38 [diagnostic] 38 48 +Added line: 516 [,] 48 49 [formatHost] 50 60 +Added line: 8579 [)] 60 61 [)] 61 62 +Added line: 1299 [;] 62 63 L86 [}] 1 2 L88 [watchMain] 1 10 +Added line: 8487 +Added line: 438 +Added line: 4141 [(] 10 11 +Added line: 218 +Added line: 2883 +Added line: 1794 [)] 11 12 [;] 12 13 +Added line: 6121 EOF diff --git a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/typescript/cpd/testdata/greeter.txt b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/typescript/cpd/testdata/greeter.txt index 2d08fe872d..3d64765864 100644 --- a/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/typescript/cpd/testdata/greeter.txt +++ b/pmd-javascript/src/test/resources/net/sourceforge/pmd/lang/typescript/cpd/testdata/greeter.txt @@ -1,37 +1,126 @@ +Added line: 8764 +Added line: 1982 +Added line: 1762 +Added line: 5001 +Added line: 4090 +Added line: 1941 +Added line: 8843 Added line: 6061 +Added line: 6229 [Image] or [Truncated image[ Bcol Ecol -Added line: 2929 +Added line: 5292 +Added line: 221 +Added line: 9779 +Added line: 4940 L3 +Added line: 6905 +Added line: 7341 +Added line: 1492 [function] 1 9 +Added line: 5122 +Added line: 5564 [greeter] 10 17 +Added line: 7682 [(] 17 18 +Added line: 5679 +Added line: 1996 +Added line: 1012 Added line: 9077 +Added line: 9193 +Added line: 2099 +Added line: 2962 +Added line: 7531 +Added line: 694 +Added line: 5952 +Added line: 8964 [person] 18 24 +Added line: 9530 +Added line: 9890 +Added line: 9058 +Added line: 6472 +Added line: 373 +Added line: 6118 +Added line: 4395 +Added line: 2610 Added line: 7026 +Added line: 7017 +Added line: 8010 [)] 24 25 +Added line: 8866 +Added line: 2416 [{] 26 27 +Added line: 7843 L4 +Added line: 9270 +Added line: 359 +Added line: 3819 +Added line: 2121 +Added line: 9147 +Added line: 1589 +Added line: 4603 ["Hello, "] 10 19 [+] 20 21 +Added line: 4914 [person] 22 28 [;] 28 29 +Added line: 1031 L5 [}] 1 2 L7 [let] 1 4 +Added line: 1807 +Added line: 896 [user] 5 9 - [=] 10 11 +Added line: 5618 +Added line: 1850 +Added line: 2548 +Added line: 1534 +Added line: 6488 +Added line: 6459 +Added line: 1585 ["Jane User"] 12 23 +Added line: 5709 +Added line: 2747 +Added line: 1809 +Added line: 1180 [;] 23 24 [document] 1 9 +Added line: 4824 [.] 9 10 +Added line: 1984 +Added line: 3190 +Added line: 2751 +Added line: 4146 +Added line: 6038 +Added line: 1468 [body] 10 14 [.] 14 15 [textContent] 15 26 +Added line: 4687 +Added line: 3594 +Added line: 890 [=] 27 28 +Added line: 7211 +Added line: 5856 Added line: 1649 +Added line: 9924 +Added line: 8781 +Added line: 1918 +Added line: 2941 +Added line: 8955 +Added line: 6800 +Added line: 1317 +Added line: 4874 +Added line: 2555 +Added line: 4707 +Added line: 8208 [greeter] 29 36 [(] 36 37 [)] 41 42 +Added line: 7714 +Added line: 5625 +Added line: 5740 +Added line: 5024 +Added line: 260 [;] 42 43 EOF diff --git a/pmd-jsp/src/test/resources/net/sourceforge/pmd/lang/jsp/cpd/testdata/scriptletWithString.txt b/pmd-jsp/src/test/resources/net/sourceforge/pmd/lang/jsp/cpd/testdata/scriptletWithString.txt index 0d448cd32d..5955e162e4 100644 --- a/pmd-jsp/src/test/resources/net/sourceforge/pmd/lang/jsp/cpd/testdata/scriptletWithString.txt +++ b/pmd-jsp/src/test/resources/net/sourceforge/pmd/lang/jsp/cpd/testdata/scriptletWithString.txt @@ -1,19 +1,108 @@ [Image] or [Truncated image[ Bcol Ecol L1 - [<%--] 1 5 - [\nBSD-style license; for more info[ 5 78 +Added line: 2806 +Added line: 6310 +Added line: 1704 +Added line: 3037 +Added line: 4987 +Added line: 8472 +Added line: 5557 +Added line: 4295 +Added line: 7404 +Added line: 8720 +Added line: 361 +Added line: 9638 +Added line: 9684 +Added line: 5689 +Added line: 1371 +Added line: 8543 +Added line: 8111 +Added line: 2338 +Added line: 8130 +Added line: 962 +Added line: 2328 +Added line: 1135 +Added line: 1711 +Added line: 4839 +Added line: 2952 +Added line: 9710 +Added line: 2715 Added line: 501 +Added line: 8774 +Added line: 3052 +Added line: 3418 L3 +Added line: 4050 +Added line: 2356 Added line: 8120 [--%>] 1 5 +Added line: 1325 +Added line: 8536 +Added line: 6104 [<%] 1 3 +Added line: 8050 +Added line: 1659 +Added line: 4750 L7 [%>] 1 3 +Added line: 4669 L8 +Added line: 3913 +Added line: 2936 +Added line: 8292 +Added line: 9880 Added line: 7975 +Added line: 5440 +Added line: 449 +Added line: 9405 +Added line: 3791 +Added line: 3840 +Added line: 6026 [\n<!\[cdata\[\nString nodeContent [ 3 5 +Added line: 4980 +Added line: 9288 +Added line: 9353 +Added line: 1865 L12 +Added line: 6533 +Added line: 8991 +Added line: 5443 +Added line: 7532 +Added line: 595 +Added line: 7628 +Added line: 3402 +Added line: 7734 +Added line: 3888 +Added line: 7414 +Added line: 7337 +Added line: 6402 +Added line: 8970 +Added line: 3048 +Added line: 3655 +Added line: 5075 +Added line: 6967 +Added line: 2367 +Added line: 6846 +Added line: 1481 +Added line: 3000 +Added line: 1443 +Added line: 2897 +Added line: 6395 +Added line: 9130 +Added line: 6525 +Added line: 2719 +Added line: 1468 +Added line: 9084 [%>] 1 3 +Added line: 4690 EOF +Added line: 1710 +Added line: 2734 +Added line: 9881 +Added line: 9142 +Added line: 9687 +Added line: 8070 Added line: 1255 +Added line: 3906 Added line: 1024 +Added line: 4534 diff --git a/pmd-julia/src/test/resources/net/sourceforge/pmd/lang/julia/cpd/testdata/mathExample.txt b/pmd-julia/src/test/resources/net/sourceforge/pmd/lang/julia/cpd/testdata/mathExample.txt index 28eefa4c9f..f1b28ccbd8 100644 --- a/pmd-julia/src/test/resources/net/sourceforge/pmd/lang/julia/cpd/testdata/mathExample.txt +++ b/pmd-julia/src/test/resources/net/sourceforge/pmd/lang/julia/cpd/testdata/mathExample.txt @@ -1,64 +1,106 @@ +Added line: 3412 [Image] or [Truncated image[ Bcol Ecol L2 [function] 1 9 [sphere_vol] 10 20 [(] 20 21 Added line: 2015 +Added line: 4597 +Added line: 8013 Added line: 2719 [r] 21 22 +Added line: 4901 Added line: 777 +Added line: 4946 +Added line: 2337 +Added line: 6060 +Added line: 1210 [)] 22 23 +Added line: 4421 +Added line: 2345 +Added line: 985 L5 +Added line: 7780 +Added line: 5193 +Added line: 8714 [return] 3 9 [4] 10 11 [/] 11 12 [3] 12 13 [*] 13 14 [pi] 14 16 +Added line: 4130 [*] 16 17 [r] 17 18 [^] 18 19 [3] 19 20 +Added line: 8121 L6 - [end] 1 4 L9 +Added line: 3997 +Added line: 7494 [quadratic] 1 10 +Added line: 4999 [(] 10 11 [a] 11 12 +Added line: 6105 [,] 12 13 [sqr_term] 14 22 +Added line: 242 [,] 22 23 [b] 24 25 +Added line: 2756 [)] 25 26 [=] 27 28 +Added line: 7473 +Added line: 6113 +Added line: 2541 [(] 29 30 +Added line: 7531 +Added line: 9011 [-] 30 31 [b] 31 32 +Added line: 9068 [+] 33 34 +Added line: 6180 [sqr_term] 35 43 [)] 43 44 [/] 45 46 [2] 47 48 [a] 48 49 +Added line: 8542 L12 [quadratic2] 10 20 +Added line: 3404 +Added line: 5691 +Added line: 1825 [(] 20 21 +Added line: 9609 [a] 21 22 +Added line: 3663 +Added line: 3271 [::] 22 24 [Float64] 24 31 [,] 31 32 +Added line: 637 +Added line: 6291 [b] 33 34 [::] 34 36 [Float64] 36 43 [,] 43 44 [c] 45 46 [::] 46 48 +Added line: 273 [Float64] 48 55 [)] 55 56 L15 +Added line: 7999 Added line: 688 +Added line: 9366 Added line: 891 +Added line: 8479 [=] 12 13 +Added line: 4461 [sqrt] 14 18 [(] 18 19 [^] 20 21 @@ -68,80 +110,127 @@ Added line: 891 [a] 24 25 [*] 25 26 [c] 26 27 +Added line: 3907 [)] 27 28 L16 +Added line: 9961 [r1] 3 5 - [=] 6 7 [quadratic] 8 17 +Added line: 1657 [(] 17 18 +Added line: 8363 [a] 18 19 +Added line: 4932 [,] 19 20 [sqr_term] 21 29 [,] 29 30 [b] 31 32 +Added line: 7381 +Added line: 6468 [)] 32 33 L17 [r2] 3 5 [=] 6 7 +Added line: 6562 +Added line: 8160 Added line: 7695 [quadratic] 8 17 [(] 17 18 +Added line: 410 [a] 18 19 +Added line: 178 +Added line: 3176 +Added line: 1265 [,] 19 20 [-] 21 22 +Added line: 7262 [sqr_term] 22 30 +Added line: 5654 +Added line: 1205 [,] 30 31 [b] 32 33 [)] 33 34 +Added line: 5150 [r1] 3 5 [,] 5 6 - [r2] 7 9 +Added line: 3827 +Added line: 5315 +Added line: 3819 L21 Added line: 8767 [end] 1 4 L23 [=] 5 6 +Added line: 8909 [(] 17 18 +Added line: 394 [3] 18 19 [)] 19 20 -Added line: 4647 +Added line: 7836 +Added line: 1356 +Added line: 5618 L25 [using] 1 6 [Printf] 7 13 +Added line: 4246 +Added line: 1646 L26 +Added line: 9379 +Added line: 9693 +Added line: 8294 +Added line: 6518 +Added line: 57 +Added line: 8707 [@] 1 2 [printf] 2 8 ["volume = %0.3f\\n"] 9 27 [vol] 28 31 L29 +Added line: 6005 +Added line: 7386 +Added line: 2463 [quad1] 1 6 [,] 6 7 [quad2] 8 13 +Added line: 4879 +Added line: 3810 [=] 14 15 [quadratic2] 16 26 [(] 26 27 +Added line: 7637 [2.0] 27 30 +Added line: 5389 Added line: 9864 [,] 30 31 +Added line: 6183 [-] 32 33 [2.0] 33 36 +Added line: 9549 [,] 36 37 +Added line: 162 [-] 38 39 [12.0] 39 43 [)] 43 44 -L30 +Added line: 6925 +Added line: 8296 +Added line: 2648 [println] 1 8 +Added line: 1325 [(] 8 9 - ["result 1: "] 9 21 +Added line: 3920 [,] 21 22 [quad1] 23 28 [)] 28 29 L32 +Added line: 8845 +Added line: 8788 [println] 1 8 [(] 8 9 ["result 2: "] 9 21 Added line: 1028 [,] 21 22 [quad2] 23 28 +Added line: 4951 [)] 28 29 +Added line: 6400 EOF diff --git a/pmd-kotlin/src/main/antlr4/net/sourceforge/pmd/lang/kotlin/ast/README.md b/pmd-kotlin/src/main/antlr4/net/sourceforge/pmd/lang/kotlin/ast/README.md index a9b3d55de5..d69caf9f76 100644 --- a/pmd-kotlin/src/main/antlr4/net/sourceforge/pmd/lang/kotlin/ast/README.md +++ b/pmd-kotlin/src/main/antlr4/net/sourceforge/pmd/lang/kotlin/ast/README.md @@ -1,71 +1,160 @@ +Added line: 2409 # Kotlin Grammar +Added line: 1275 +Added line: 7304 The grammar files for Kotlin are taken from <https://github.com/Kotlin/kotlin-spec>, released under the +Added line: 5243 Apache License, Version 2.0: ``` +Added line: 108 Added line: 6427 Copyright 2000-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. +Added line: 1732 Licensed under the Apache License, Version 2.0 (the "License"); +Added line: 5034 +Added line: 9970 you may not use this file except in compliance with the License. +Added line: 5652 You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +Added line: 8337 +Added line: 5247 +Added line: 2425 +Added line: 1058 +Added line: 5180 Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and +Added line: 3373 +Added line: 1726 Added line: 1648 +Added line: 4200 +Added line: 2939 +Added line: 8288 +Added line: 5594 +Added line: 3329 +Added line: 1453 limitations under the License. Added line: 6473 +Added line: 2647 +Added line: 9935 ``` -The grammar files still use the Apache License, but are slightly modified. +Added line: 6958 +Added line: 8013 +Added line: 4199 +Added line: 5562 +Added line: 8534 +Added line: 2260 +Added line: 8940 +Added line: 2135 +Added line: 7023 +Added line: 1076 All other files in this PMD module are licensed under BSD. +Added line: 1456 +Added line: 2661 +Added line: 9468 +Added line: 2775 +Added line: 1231 +Added line: 4535 ## Currently used version +Added line: 1877 +Added line: 3425 * Release: <https://github.com/Kotlin/kotlin-spec/releases/tag/v1.8-rfc%2B0.1> * Source: <https://github.com/Kotlin/kotlin-spec/tree/v1.8-rfc%2B0.1/grammar/src/main/antlr> +Added line: 3412 +Added line: 6829 +Added line: 7984 +Added line: 2929 +Added line: 3829 +Added line: 1222 +Added line: 8463 +Added line: 7032 +Added line: 8341 +Added line: 5605 ### Modifications Some modifications are made in KotlinParser.g4: -* The file "KotlinParser.g4" is renamed to "Kotlin.g4" +Added line: 5098 * `grammar Kotlin` instead of KotlinParser +Added line: 4062 +Added line: 9196 +Added line: 6301 * Additional headers: +Added line: 3001 +Added line: 9376 +Added line: 1658 +Added line: 1286 ``` +Added line: 2896 +Added line: 6729 @header { +Added line: 2035 +Added line: 8629 +Added line: 8447 import net.sourceforge.pmd.lang.ast.impl.antlr4.*; -import net.sourceforge.pmd.lang.ast.AstVisitor; -} +Added line: 4056 +Added line: 9599 ``` * Additional members: +Added line: 8554 +Added line: 5807 ``` +Added line: 7453 +Added line: 3510 @parser::members { +Added line: 1652 static final AntlrNameDictionary DICO = new KotlinNameDictionary(VOCABULARY, ruleNames); @Override protected KotlinTerminalNode createPmdTerminal(ParserRuleContext parent, Token t) { return new KotlinTerminalNode(t); +Added line: 522 } +Added line: 9081 +Added line: 2813 +Added line: 3991 +Added line: 3285 +Added line: 1778 +Added line: 7524 +Added line: 4354 +Added line: 9337 +Added line: 7464 protected KotlinErrorNode createPmdError(ParserRuleContext parent, Token t) { return new KotlinErrorNode(t); - } +Added line: 1665 +Added line: 6716 +Added line: 8835 } +Added line: 5940 +Added line: 4582 +Added line: 859 * Additional options: +Added line: 1510 +Added line: 9664 +Added line: 1691 +Added line: 2049 +Added line: 7975 +Added line: 1227 +Added line: 4688 +Added line: 7618 Added line: 2877 ``` -contextSuperClass = 'KotlinInnerNode'; superClass = 'AntlrGeneratedParserBase<KotlinNode>'; ``` diff --git a/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/ast/testdata/Simple.txt b/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/ast/testdata/Simple.txt index 6c064b86f7..7f4484c889 100644 --- a/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/ast/testdata/Simple.txt +++ b/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/ast/testdata/Simple.txt @@ -1,15 +1,21 @@ +Added line: 7652 +- KotlinFile +- T-NL - +- PackageHeader +Added line: 5584 | +- T-PACKAGE +Added line: 7466 | +- Identifier | | +- SimpleIdentifier +Added line: 168 | | | +- T-Identifier | | +- T-DOT +Added line: 1777 | | +- SimpleIdentifier +Added line: 8528 Added line: 9599 | | | +- T-Identifier | | +- T-DOT +Added line: 9920 | | +- SimpleIdentifier | | | +- T-Identifier | | +- T-DOT @@ -18,13 +24,17 @@ Added line: 9599 | | +- T-DOT | | +- SimpleIdentifier | | | +- T-Identifier +Added line: 6398 | | +- T-DOT +Added line: 1213 | | +- SimpleIdentifier | | | +- T-Identifier | | +- T-DOT | | +- SimpleIdentifier | | +- T-Identifier | +- Semi +Added line: 3090 +Added line: 8737 | +- T-NL | +- T-NL +- ImportList @@ -34,14 +44,20 @@ Added line: 9599 | | +- T-CLASS | | +- SimpleIdentifier | | | +- T-Identifier +Added line: 9645 | | +- ClassBody +Added line: 4597 +Added line: 4161 | | +- T-LCURL +Added line: 6686 | | +- T-NL | | +- ClassMemberDeclarations +Added line: 5023 | | | | +- Declaration | | | | +- PropertyDeclaration | | | | +- Modifiers | | | | | +- Modifier +Added line: 4961 | | | | | +- VisibilityModifier | | | | | +- T-PRIVATE | | | | +- T-VAL @@ -52,15 +68,17 @@ Added line: 9599 | | | | +- Expression | | | | | +- Disjunction | | | | | +- Conjunction +Added line: 6663 | | | | | +- Equality | | | | | +- Comparison | | | | | +- GenericCallLikeComparison +Added line: 8615 | | | | | +- ElvisExpression | | | | | +- InfixFunctionCall | | | | | +- RangeExpression | | | | | +- AdditiveExpression - | | | | | +- MultiplicativeExpression | | | | | +- AsExpression +Added line: 7690 | | | | | +- PrefixUnaryExpression | | | | | +- PostfixUnaryExpression | | | | | +- PrimaryExpression @@ -68,6 +86,7 @@ Added line: 9599 | | | | | +- LineStringLiteral | | | | | +- T-QUOTE_OPEN | | | | | +- LineStringContent +Added line: 7691 | | | | | | +- T-LineStrText | | | | | +- T-QUOTE_CLOSE | | | | +- T-NL @@ -77,26 +96,39 @@ Added line: 9599 | | | | +- T-FUN | | | | +- SimpleIdentifier | | | | | +- T-Identifier +Added line: 1178 | | | | +- FunctionValueParameters +Added line: 7270 +Added line: 2509 +Added line: 5758 +Added line: 9635 | | | | | +- T-LPAREN +Added line: 942 | | | | | +- T-RPAREN +Added line: 6649 | | | | +- FunctionBody Added line: 2049 +Added line: 2342 | | | | +- T-ASSIGNMENT | | | | +- Expression | | | | +- Disjunction +Added line: 4885 | | | | +- Conjunction | | | | +- Equality | | | | +- Comparison | | | | +- GenericCallLikeComparison +Added line: 4242 | | | | +- InfixOperation | | | | +- ElvisExpression | | | | +- InfixFunctionCall | | | | +- RangeExpression | | | | +- AdditiveExpression +Added line: 856 +Added line: 6961 | | | | +- MultiplicativeExpression | | | | +- AsExpression | | | | +- PrefixUnaryExpression +Added line: 2242 | | | | +- PostfixUnaryExpression | | | | +- PrimaryExpression | | | | +- StringLiteral @@ -105,7 +137,9 @@ Added line: 2049 | | | | +- LineStringContent | | | | | +- T-LineStrText | | | | +- LineStringContent - | | | | | +- T-LineStrRef +Added line: 9610 +Added line: 9256 +Added line: 5108 | | | | +- LineStringContent | | | | | +- T-LineStrText | | | | +- T-QUOTE_CLOSE @@ -113,34 +147,44 @@ Added line: 2049 | | | +- T-NL | | +- T-RCURL | +- Semis +Added line: 6704 | +- T-NL +Added line: 3637 +Added line: 125 | +- T-NL +- TopLevelObject | +- Declaration +Added line: 1138 | | +- FunctionDeclaration | | +- T-FUN +Added line: 7167 | | +- SimpleIdentifier | | | +- T-Identifier | | +- FunctionValueParameters +Added line: 5968 | | | +- T-LPAREN | | | +- T-RPAREN | | +- FunctionBody | | +- Block | | +- T-LCURL | | +- T-NL +Added line: 9118 | | +- Statements Added line: 5487 - | | | +- Statement +Added line: 809 | | | | +- Declaration | | | | +- PropertyDeclaration | | | | +- T-VAL | | | | +- VariableDeclaration - | | | | | +- SimpleIdentifier | | | | | +- T-Identifier | | | | +- T-ASSIGNMENT +Added line: 1336 | | | | +- Expression | | | | +- Disjunction | | | | +- Conjunction +Added line: 2903 +Added line: 3801 +Added line: 2575 | | | | +- Equality | | | | +- Comparison | | | | +- GenericCallLikeComparison @@ -157,6 +201,7 @@ Added line: 5487 | | | | | +- SimpleIdentifier | | | | | +- T-Identifier | | | | +- PostfixUnarySuffix +Added line: 3049 | | | | +- CallSuffix | | | | +- ValueArguments | | | | +- T-LPAREN @@ -165,18 +210,23 @@ Added line: 5487 | | | | +- T-NL | | | +- Statement | | | | +- Expression +Added line: 6842 +Added line: 9887 | | | | +- Disjunction | | | | +- Conjunction | | | | +- Equality - | | | | +- Comparison | | | | +- GenericCallLikeComparison +Added line: 2490 | | | | +- InfixOperation | | | | +- ElvisExpression | | | | +- InfixFunctionCall | | | | +- RangeExpression | | | | +- AdditiveExpression +Added line: 363 | | | | +- MultiplicativeExpression +Added line: 6969 | | | | +- AsExpression +Added line: 665 | | | | +- PrefixUnaryExpression | | | | +- PostfixUnaryExpression | | | | +- PrimaryExpression @@ -184,42 +234,57 @@ Added line: 5487 Added line: 5170 | | | | | +- T-Identifier | | | | +- PostfixUnarySuffix +Added line: 499 | | | | +- CallSuffix +Added line: 4786 | | | | +- ValueArguments | | | | +- T-LPAREN | | | | +- ValueArgument | | | | | +- Expression | | | | | +- Disjunction +Added line: 5686 | | | | | +- Conjunction +Added line: 2493 | | | | | +- Equality Added line: 139 | | | | | +- Comparison | | | | | +- GenericCallLikeComparison | | | | | +- InfixOperation | | | | | +- ElvisExpression +Added line: 2473 | | | | | +- InfixFunctionCall +Added line: 4394 | | | | | +- RangeExpression | | | | | +- AdditiveExpression | | | | | +- MultiplicativeExpression +Added line: 1875 | | | | | +- AsExpression | | | | | +- PrefixUnaryExpression | | | | | +- PostfixUnaryExpression | | | | | +- PrimaryExpression | | | | | +- SimpleIdentifier +Added line: 278 | | | | | +- T-Identifier | | | | +- T-RPAREN +Added line: 7056 | | | +- Semis | | | | +- T-NL | | | +- Statement +Added line: 5940 | | | | +- Expression | | | | +- Disjunction +Added line: 2596 +Added line: 6002 | | | | +- Conjunction | | | | +- Equality | | | | +- Comparison +Added line: 3158 | | | | +- GenericCallLikeComparison | | | | +- InfixOperation | | | | +- ElvisExpression | | | | +- InfixFunctionCall +Added line: 2051 +Added line: 5517 | | | | +- RangeExpression | | | | +- AdditiveExpression | | | | +- MultiplicativeExpression @@ -228,44 +293,68 @@ Added line: 139 | | | | +- PostfixUnaryExpression | | | | +- PrimaryExpression | | | | | +- SimpleIdentifier +Added line: 716 | | | | | +- T-Identifier | | | | +- PostfixUnarySuffix | | | | +- CallSuffix +Added line: 6743 | | | | +- ValueArguments | | | | +- T-LPAREN | | | | +- ValueArgument | | | | | +- Expression +Added line: 1427 | | | | | +- Disjunction | | | | | +- Conjunction +Added line: 207 | | | | | +- Equality | | | | | +- Comparison | | | | | +- GenericCallLikeComparison | | | | | +- InfixOperation | | | | | +- ElvisExpression +Added line: 2191 +Added line: 4970 | | | | | +- InfixFunctionCall +Added line: 5330 +Added line: 451 | | | | | +- RangeExpression | | | | | +- AdditiveExpression | | | | | +- MultiplicativeExpression | | | | | +- AsExpression | | | | | +- PrefixUnaryExpression +Added line: 3461 | | | | | +- PostfixUnaryExpression | | | | | +- PrimaryExpression +Added line: 2346 +Added line: 1491 | | | | | | +- SimpleIdentifier +Added line: 2098 +Added line: 18 +Added line: 9499 | | | | | | +- T-Identifier | | | | | +- PostfixUnarySuffix | | | | | | +- NavigationSuffix +Added line: 3770 | | | | | | +- MemberAccessOperator | | | | | | | +- T-DOT | | | | | | +- SimpleIdentifier +Added line: 8263 | | | | | | +- T-Identifier +Added line: 6790 | | | | | +- PostfixUnarySuffix | | | | | +- CallSuffix +Added line: 2349 | | | | | +- ValueArguments +Added line: 5139 | | | | | +- T-LPAREN +Added line: 429 | | | | | +- T-RPAREN | | | | +- T-RPAREN +Added line: 8108 +Added line: 5884 | | | +- Semis | | | +- T-NL +Added line: 6472 +Added line: 7677 | | +- T-RCURL | +- Semis | +- T-NL diff --git a/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/comment.txt b/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/comment.txt index eddecf1f34..d9a4acfdaa 100644 --- a/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/comment.txt +++ b/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/comment.txt @@ -1,7 +1,96 @@ +Added line: 73 +Added line: 4549 +Added line: 6584 +Added line: 4647 [Image] or [Truncated image[ Bcol Ecol +Added line: 594 +Added line: 7964 +Added line: 7281 L7 +Added line: 9763 +Added line: 5845 +Added line: 6460 +Added line: 5310 +Added line: 3007 +Added line: 5934 +Added line: 4864 +Added line: 8214 +Added line: 2883 +Added line: 2048 [var] 1 4 +Added line: 4864 +Added line: 8769 +Added line: 3027 +Added line: 1700 +Added line: 87 +Added line: 3273 +Added line: 6505 +Added line: 160 +Added line: 4470 +Added line: 5962 +Added line: 4291 +Added line: 7102 +Added line: 8124 +Added line: 113 +Added line: 4135 +Added line: 5296 +Added line: 829 +Added line: 2199 +Added line: 7691 +Added line: 6033 +Added line: 7699 +Added line: 6478 +Added line: 1799 +Added line: 9511 +Added line: 9209 +Added line: 4702 +Added line: 7852 [x] 5 6 +Added line: 6981 +Added line: 3480 +Added line: 3933 +Added line: 338 +Added line: 4420 +Added line: 7960 +Added line: 4047 +Added line: 6470 +Added line: 6797 +Added line: 7961 +Added line: 2969 +Added line: 7762 +Added line: 2451 [=] 7 8 +Added line: 8330 +Added line: 499 +Added line: 9610 +Added line: 9454 +Added line: 2349 +Added line: 7541 +Added line: 5099 [0] 9 10 +Added line: 2833 +Added line: 1806 +Added line: 3772 +Added line: 2569 +Added line: 9058 +Added line: 4673 +Added line: 8432 +Added line: 7433 +Added line: 2203 +Added line: 7905 +Added line: 2491 +Added line: 1557 +Added line: 5041 +Added line: 9004 +Added line: 3431 +Added line: 9535 EOF +Added line: 3586 +Added line: 9885 +Added line: 4406 +Added line: 8397 +Added line: 5208 +Added line: 9215 +Added line: 1044 +Added line: 4512 +Added line: 3094 diff --git a/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/imports.txt b/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/imports.txt index 49ab402048..93d5890f04 100644 --- a/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/imports.txt +++ b/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/imports.txt @@ -1,2 +1,91 @@ +Added line: 9284 +Added line: 4483 +Added line: 5884 +Added line: 7826 +Added line: 8403 +Added line: 6836 +Added line: 5515 +Added line: 6283 +Added line: 7274 +Added line: 1663 +Added line: 777 +Added line: 8610 +Added line: 8437 +Added line: 1717 +Added line: 3437 +Added line: 1716 +Added line: 4467 +Added line: 6289 +Added line: 9397 +Added line: 3561 +Added line: 6822 +Added line: 4533 +Added line: 3833 +Added line: 6699 +Added line: 4891 +Added line: 9002 +Added line: 992 +Added line: 3549 +Added line: 3688 +Added line: 7238 +Added line: 2917 +Added line: 2221 +Added line: 1885 +Added line: 3221 +Added line: 1500 +Added line: 6093 +Added line: 9494 +Added line: 5356 [Image] or [Truncated image[ Bcol Ecol +Added line: 3107 +Added line: 7726 +Added line: 7102 +Added line: 6519 +Added line: 6473 +Added line: 937 +Added line: 2694 +Added line: 8904 +Added line: 3214 +Added line: 6523 +Added line: 6016 +Added line: 1334 +Added line: 8533 +Added line: 3794 +Added line: 7725 +Added line: 1801 +Added line: 7052 +Added line: 2695 +Added line: 8405 +Added line: 5559 +Added line: 89 +Added line: 3158 +Added line: 935 +Added line: 3591 +Added line: 745 +Added line: 4759 +Added line: 7320 +Added line: 1563 +Added line: 4804 EOF +Added line: 7616 +Added line: 7707 +Added line: 3127 +Added line: 9366 +Added line: 9932 +Added line: 7184 +Added line: 7042 +Added line: 9709 +Added line: 9606 +Added line: 3732 +Added line: 8484 +Added line: 9313 +Added line: 5846 +Added line: 16 +Added line: 7018 +Added line: 4893 +Added line: 6590 +Added line: 7221 +Added line: 4917 +Added line: 3843 +Added line: 5986 +Added line: 4033 diff --git a/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/increment.txt b/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/increment.txt index 190142ecc8..ae80aad733 100644 --- a/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/increment.txt +++ b/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/increment.txt @@ -1,25 +1,33 @@ [Image] or [Truncated image[ Bcol Ecol L7 [var] 1 4 +Added line: 6748 [x] 5 6 +Added line: 4532 [=] 7 8 [0] 9 10 L9 [fun] 1 4 [increment1] 5 15 [(] 15 16 +Added line: 7188 [)] 16 17 +Added line: 8688 +Added line: 4108 [{] 18 19 [x] 20 21 +Added line: 4164 [+=] 22 24 +Added line: 7624 [1] 25 26 +Added line: 9783 [}] 27 28 L10 [fun] 1 4 [increment2] 5 15 [(] 15 16 +Added line: 4806 [)] 16 17 - [{] 18 19 [x] 20 21 [+=] 22 24 [1] 25 26 @@ -27,42 +35,52 @@ L10 L11 [fun] 1 4 [increment3] 5 15 +Added line: 9438 [(] 15 16 +Added line: 127 [)] 16 17 [{] 18 19 [x] 20 21 [+=] 22 24 [1] 25 26 - [}] 27 28 L12 [fun] 1 4 [increment4] 5 15 +Added line: 6726 [(] 15 16 +Added line: 6204 [)] 16 17 [{] 18 19 +Added line: 6849 +Added line: 8766 [x] 20 21 +Added line: 1850 [+=] 22 24 [1] 25 26 [}] 27 28 +Added line: 8371 L13 - [fun] 1 4 [increment5] 5 15 - [(] 15 16 +Added line: 8646 [)] 16 17 [{] 18 19 [x] 20 21 [+=] 22 24 +Added line: 5060 [1] 25 26 +Added line: 8096 +Added line: 4533 [}] 27 28 L14 [fun] 1 4 - [increment6] 5 15 [(] 15 16 +Added line: 5515 +Added line: 8224 [)] 16 17 [{] 18 19 +Added line: 7404 [x] 20 21 [+=] 22 24 - [1] 25 26 [}] 27 28 L15 [fun] 1 4 @@ -71,8 +89,14 @@ L15 [)] 16 17 [{] 18 19 [x] 20 21 +Added line: 1531 +Added line: 2862 +Added line: 2041 [+=] 22 24 +Added line: 2429 [1] 25 26 +Added line: 522 +Added line: 2633 [}] 27 28 L16 [fun] 1 4 @@ -80,6 +104,7 @@ L16 [(] 15 16 [)] 16 17 [{] 18 19 +Added line: 7717 [x] 20 21 [+=] 22 24 [1] 25 26 @@ -89,20 +114,26 @@ L17 [increment9] 5 15 [(] 15 16 [)] 16 17 +Added line: 7684 [{] 18 19 [x] 20 21 +Added line: 2071 +Added line: 4400 [+=] 22 24 [1] 25 26 [}] 27 28 +Added line: 3620 L18 [fun] 1 4 [increment10] 5 16 +Added line: 3493 [(] 16 17 [)] 17 18 [{] 19 20 [x] 21 22 [+=] 23 25 [1] 26 27 +Added line: 3856 [}] 28 29 L19 [fun] 1 4 @@ -112,81 +143,126 @@ L19 [{] 19 20 [x] 21 22 [+=] 23 25 +Added line: 3189 +Added line: 4291 +Added line: 42 +Added line: 2656 +Added line: 8789 [1] 26 27 [}] 28 29 L20 +Added line: 7774 +Added line: 1797 [fun] 1 4 [increment12] 5 16 [(] 16 17 +Added line: 7558 +Added line: 6799 +Added line: 1570 [)] 17 18 [{] 19 20 [x] 21 22 +Added line: 7394 +Added line: 574 +Added line: 7058 [+=] 23 25 +Added line: 2849 [1] 26 27 [}] 28 29 L21 [fun] 1 4 +Added line: 7510 [increment13] 5 16 +Added line: 7131 [(] 16 17 [)] 17 18 +Added line: 9454 [{] 19 20 [x] 21 22 [+=] 23 25 [1] 26 27 +Added line: 9698 +Added line: 5115 [}] 28 29 L22 [fun] 1 4 +Added line: 422 +Added line: 115 [increment14] 5 16 [(] 16 17 +Added line: 466 [)] 17 18 [{] 19 20 +Added line: 6547 [x] 21 22 [+=] 23 25 +Added line: 624 [1] 26 27 [}] 28 29 L23 +Added line: 4719 [fun] 1 4 [increment15] 5 16 [(] 16 17 [)] 17 18 +Added line: 4615 [{] 19 20 [x] 21 22 +Added line: 1851 +Added line: 7836 [+=] 23 25 [1] 26 27 +Added line: 4458 [}] 28 29 L24 [fun] 1 4 [increment16] 5 16 +Added line: 262 [(] 16 17 [)] 17 18 [{] 19 20 [x] 21 22 [+=] 23 25 [1] 26 27 +Added line: 3159 +Added line: 5077 +Added line: 829 [}] 28 29 +Added line: 6503 +Added line: 1950 L25 +Added line: 5471 [fun] 1 4 - [increment17] 5 16 [(] 16 17 [)] 17 18 [{] 19 20 [x] 21 22 +Added line: 3771 [+=] 23 25 +Added line: 8475 +Added line: 6021 [1] 26 27 [}] 28 29 L26 [fun] 1 4 [increment18] 5 16 [(] 16 17 +Added line: 5469 [)] 17 18 [{] 19 20 [x] 21 22 +Added line: 378 [+=] 23 25 [1] 26 27 [}] 28 29 L27 +Added line: 5687 +Added line: 4195 [fun] 1 4 +Added line: 7752 +Added line: 6581 [increment19] 5 16 +Added line: 3040 [(] 16 17 [)] 17 18 [{] 19 20 @@ -196,12 +272,25 @@ L27 [}] 28 29 L28 [fun] 1 4 +Added line: 9591 +Added line: 1133 [increment20] 5 16 +Added line: 2391 +Added line: 1907 [(] 16 17 +Added line: 5979 +Added line: 7602 +Added line: 5014 +Added line: 260 +Added line: 6550 +Added line: 7880 +Added line: 2985 [)] 17 18 [{] 19 20 +Added line: 9671 [x] 21 22 [+=] 23 25 +Added line: 6659 [1] 26 27 [}] 28 29 EOF diff --git a/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/tabWidth.txt b/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/tabWidth.txt index 50a5d28d3c..3ab4dc43af 100644 --- a/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/tabWidth.txt +++ b/pmd-kotlin/src/test/resources/net/sourceforge/pmd/lang/kotlin/cpd/testdata/tabWidth.txt @@ -1,23 +1,112 @@ +Added line: 5901 +Added line: 2534 Added line: 672 -Added line: 4372 +Added line: 7142 +Added line: 8116 +Added line: 8544 +Added line: 5305 L5 +Added line: 7533 [var] 1 4 +Added line: 7759 +Added line: 3918 +Added line: 9867 +Added line: 9254 +Added line: 8823 +Added line: 6897 +Added line: 6156 +Added line: 4751 +Added line: 3102 [x] 5 6 -Added line: 4143 +Added line: 2582 +Added line: 5482 +Added line: 5802 +Added line: 4138 +Added line: 8975 +Added line: 7501 +Added line: 9249 [=] 7 8 Added line: 6947 +Added line: 4082 +Added line: 7188 +Added line: 661 +Added line: 2372 +Added line: 7490 +Added line: 734 +Added line: 2562 +Added line: 5289 +Added line: 9184 [fun] 1 4 +Added line: 1462 +Added line: 838 +Added line: 326 +Added line: 364 +Added line: 5336 +Added line: 4928 +Added line: 4479 +Added line: 4819 +Added line: 9191 +Added line: 6651 +Added line: 7242 +Added line: 7949 +Added line: 8430 +Added line: 2887 +Added line: 4616 +Added line: 2276 +Added line: 5121 +Added line: 9130 +Added line: 4650 Added line: 74 +Added line: 921 +Added line: 6530 +Added line: 62 [increment] 5 14 Added line: 8821 - [(] 14 15 +Added line: 4155 +Added line: 1565 [)] 15 16 +Added line: 8125 +Added line: 3418 +Added line: 9720 [{] 17 18 -Added line: 6462 +Added line: 4786 +Added line: 8046 +Added line: 8846 +Added line: 7412 +Added line: 8347 +Added line: 3838 +Added line: 8688 +Added line: 6435 L9 +Added line: 3095 +Added line: 3880 +Added line: 8923 Added line: 9914 +Added line: 2021 +Added line: 8056 +Added line: 7369 [1] 7 8 +Added line: 9643 +Added line: 3092 +Added line: 8822 +Added line: 2178 Added line: 8153 L11 +Added line: 2065 [}] 1 2 +Added line: 6974 +Added line: 7270 +Added line: 3178 +Added line: 989 +Added line: 9604 +Added line: 2044 +Added line: 1214 +Added line: 8524 +Added line: 2363 EOF +Added line: 6758 +Added line: 682 +Added line: 3915 +Added line: 4206 +Added line: 8462 +Added line: 2269 diff --git a/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/comment.txt b/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/comment.txt index d8386956d1..f1c44ff6e7 100644 --- a/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/comment.txt +++ b/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/comment.txt @@ -1,25 +1,114 @@ +Added line: 6516 +Added line: 6973 [Image] or [Truncated image[ Bcol Ecol L3 +Added line: 6954 +Added line: 3741 +Added line: 7046 [print] 1 6 +Added line: 8460 +Added line: 7833 +Added line: 7409 +Added line: 6708 +Added line: 2906 Added line: 9414 +Added line: 2015 +Added line: 7545 +Added line: 5561 +Added line: 4052 +Added line: 4280 +Added line: 3836 +Added line: 5956 +Added line: 770 +Added line: 5236 +Added line: 3306 [(] 6 7 +Added line: 4786 +Added line: 5961 +Added line: 4942 +Added line: 8243 +Added line: 8382 +Added line: 554 [1] 7 8 Added line: 1616 +Added line: 7600 +Added line: 9279 +Added line: 2935 +Added line: 1785 [)] 18 19 -L6 +Added line: 6359 +Added line: 8904 +Added line: 3634 +Added line: 4534 +Added line: 3074 +Added line: 6436 +Added line: 3627 +Added line: 6986 [print] 1 6 +Added line: 9534 +Added line: 1952 +Added line: 1733 +Added line: 605 +Added line: 9775 Added line: 3765 +Added line: 8649 +Added line: 8969 +Added line: 9534 +Added line: 7324 +Added line: 1057 +Added line: 7413 +Added line: 6216 [(] 6 7 - [1] 7 8 +Added line: 4016 +Added line: 6430 +Added line: 3204 [)] 8 9 +Added line: 7124 +Added line: 4178 +Added line: 1004 L9 +Added line: 8284 [(] 6 7 L10 [)] 17 18 L13 +Added line: 2705 +Added line: 581 +Added line: 3123 +Added line: 7755 +Added line: 8207 +Added line: 8730 +Added line: 9193 [print] 1 6 +Added line: 572 +Added line: 3241 +Added line: 5481 [(] 6 7 [1] 7 8 +Added line: 8843 +Added line: 8387 +Added line: 1301 +Added line: 2648 Added line: 6323 - [)] 8 9 +Added line: 363 +Added line: 6891 +Added line: 9729 +Added line: 1315 +Added line: 9921 +Added line: 1082 +Added line: 7112 +Added line: 1285 +Added line: 8039 +Added line: 1054 +Added line: 5013 +Added line: 1629 +Added line: 1081 +Added line: 4775 +Added line: 4096 +Added line: 1115 +Added line: 3134 +Added line: 3963 EOF +Added line: 3394 +Added line: 3978 +Added line: 274 diff --git a/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/factorial.txt b/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/factorial.txt index b037f76728..003efbdf24 100644 --- a/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/factorial.txt +++ b/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/factorial.txt @@ -1,55 +1,144 @@ +Added line: 2570 +Added line: 70 +Added line: 7739 [Image] or [Truncated image[ Bcol Ecol L2 [function] 5 13 [fact] 14 18 +Added line: 9111 +Added line: 3976 +Added line: 5945 +Added line: 6069 +Added line: 1162 [(] 19 20 +Added line: 8767 [n] 20 21 - [)] 21 22 +Added line: 2085 L3 [if] 7 9 +Added line: 4209 +Added line: 882 +Added line: 4116 [n] 10 11 +Added line: 620 +Added line: 291 [==] 12 14 +Added line: 4067 +Added line: 3977 [0] 15 16 [then] 17 21 +Added line: 5506 +Added line: 1369 +Added line: 5421 L4 [return] 9 15 [1] 16 17 L5 +Added line: 2596 +Added line: 8172 +Added line: 3241 +Added line: 7783 +Added line: 2315 +Added line: 9096 +Added line: 7483 [else] 7 11 +Added line: 1686 L6 [return] 9 15 [n] 16 17 +Added line: 3593 +Added line: 6465 [*] 18 19 +Added line: 5609 +Added line: 6157 +Added line: 5534 +Added line: 4547 +Added line: 8919 +Added line: 267 +Added line: 9909 +Added line: 7248 +Added line: 4699 +Added line: 8952 +Added line: 6917 +Added line: 2220 [fact] 20 24 [(] 24 25 +Added line: 3734 [n] 25 26 +Added line: 6920 +Added line: 1436 [-] 26 27 +Added line: 8920 +Added line: 2373 [1] 27 28 +Added line: 2465 [)] 28 29 L7 +Added line: 1068 [end] 7 10 -L8 +Added line: 395 +Added line: 9026 [end] 5 8 +Added line: 9383 +Added line: 3494 +Added line: 5709 +Added line: 2920 +Added line: 1795 +Added line: 193 L10 [print] 5 10 +Added line: 6054 +Added line: 9880 [(] 10 11 +Added line: 5033 +Added line: 6954 ["enter a number:"] 11 28 [)] 28 29 +Added line: 1173 L11 [a] 5 6 +Added line: 5538 [=] 7 8 [io] 9 11 +Added line: 4071 +Added line: 3494 +Added line: 3028 +Added line: 439 +Added line: 6320 [.] 11 12 +Added line: 653 +Added line: 8277 [read] 12 16 +Added line: 9021 +Added line: 3673 +Added line: 8319 +Added line: 5698 +Added line: 852 [(] 16 17 ["*number"] 17 26 - [)] 26 27 L12 +Added line: 470 +Added line: 8475 +Added line: 770 +Added line: 3205 [print] 5 10 +Added line: 1349 +Added line: 9030 +Added line: 8409 +Added line: 7338 +Added line: 660 [(] 10 11 +Added line: 6795 +Added line: 6563 [fact] 11 15 +Added line: 7772 [(] 15 16 [a] 16 17 +Added line: 3168 +Added line: 1961 [)] 17 18 +Added line: 8305 +Added line: 8378 [)] 18 19 EOF +Added line: 9485 diff --git a/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/helloworld.txt b/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/helloworld.txt index 0920c0314c..beefcd37fa 100644 --- a/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/helloworld.txt +++ b/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/helloworld.txt @@ -1,9 +1,98 @@ +Added line: 9592 +Added line: 5561 +Added line: 522 +Added line: 1796 +Added line: 2852 +Added line: 8603 +Added line: 2683 +Added line: 9446 +Added line: 7457 +Added line: 3789 +Added line: 9323 +Added line: 4644 +Added line: 2179 +Added line: 9523 +Added line: 5422 +Added line: 7467 +Added line: 2061 +Added line: 9746 +Added line: 7626 +Added line: 6544 +Added line: 866 +Added line: 9818 +Added line: 4797 +Added line: 2295 +Added line: 9310 [print] 2 7 +Added line: 4128 +Added line: 7925 Added line: 7124 +Added line: 6194 +Added line: 7344 +Added line: 8538 +Added line: 5001 +Added line: 3971 +Added line: 3367 +Added line: 4714 +Added line: 1262 +Added line: 3812 +Added line: 3330 +Added line: 7494 +Added line: 8325 +Added line: 554 +Added line: 8568 +Added line: 2263 +Added line: 2059 +Added line: 1714 +Added line: 1925 +Added line: 3176 +Added line: 201 +Added line: 6055 +Added line: 8271 +Added line: 6583 +Added line: 4515 +Added line: 3458 +Added line: 1313 +Added line: 9625 Added line: 7078 Added line: 5414 +Added line: 5815 +Added line: 3104 +Added line: 7732 +Added line: 811 +Added line: 7568 +Added line: 2804 +Added line: 4489 +Added line: 7295 Added line: 7525 +Added line: 35 +Added line: 1624 ["Hello World"] 8 21 +Added line: 1971 +Added line: 7250 +Added line: 6480 Added line: 7441 +Added line: 7824 +Added line: 7346 [)] 21 22 +Added line: 3198 +Added line: 9818 +Added line: 5117 +Added line: 7568 +Added line: 4006 EOF +Added line: 5488 +Added line: 5166 +Added line: 7240 +Added line: 1346 +Added line: 2639 +Added line: 2878 +Added line: 4630 +Added line: 6297 +Added line: 2779 +Added line: 3978 +Added line: 8485 +Added line: 6018 +Added line: 5414 +Added line: 9837 +Added line: 7760 diff --git a/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/luauTypes.txt b/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/luauTypes.txt index f4ed986e14..bb2a71b83c 100644 --- a/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/luauTypes.txt +++ b/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/luauTypes.txt @@ -9,21 +9,33 @@ Added line: 3420 [any] 16 19 [>] 19 20 [=] 21 22 - [{] 23 24 +Added line: 1115 +Added line: 796 [T] 25 26 [}] 27 28 L3 +Added line: 8277 [local] 1 6 [x] 7 8 [=] 9 10 [31337] 11 16 -L4 +Added line: 4172 +Added line: 1400 +Added line: 515 +Added line: 9864 +Added line: 9823 +Added line: 1878 +Added line: 2854 +Added line: 1033 +Added line: 546 +Added line: 3124 [local] 1 6 [_negativeLiteral] 7 23 [=] 24 25 [-] 26 27 [3] 27 28 L5 +Added line: 9208 [local] 1 6 [_negativeVariable] 7 24 [=] 25 26 @@ -32,7 +44,9 @@ L5 L6 [local] 1 6 [_notLiteral] 7 18 +Added line: 1575 [=] 19 20 +Added line: 5056 [not] 21 24 [true] 25 29 L7 @@ -42,45 +56,59 @@ L7 [not] 22 25 [x] 26 27 L8 +Added line: 2256 +Added line: 2240 [local] 1 6 [_length] 7 14 [=] 15 16 [#] 17 18 [{] 18 19 +Added line: 2902 [x] 19 20 +Added line: 803 [}] 20 21 L9 [export] 1 7 [type] 8 12 [Function] 13 21 - [<] 21 22 [T] 22 23 [...] 23 26 - [=] 27 28 [...] 29 32 [any] 32 35 +Added line: 6102 [>] 35 36 [=] 37 38 +Added line: 517 +Added line: 2222 +Added line: 5289 [(] 39 40 [...] 40 43 [any] 43 46 [)] 46 47 +Added line: 3172 +Added line: 4431 [->] 48 50 [T] 51 52 +Added line: 2522 [...] 52 55 L10 [local] 1 6 [_PlatformService] 7 23 [=] 24 25 [nil] 26 29 +Added line: 8597 L11 [local] 1 6 [game] 7 11 +Added line: 210 [=] 12 13 +Added line: 9153 Added line: 7677 [.] 41 42 +Added line: 674 [default] 42 49 [::] 50 52 +Added line: 9127 [any] 53 56 L12 [pcall] 1 6 @@ -90,16 +118,19 @@ L12 [)] 16 17 [_PlatformService] 18 34 [=] 35 36 - [game] 37 41 [:] 41 42 +Added line: 8992 +Added line: 8732 [GetService] 42 52 [(] 52 53 ['PlatformService'] 53 70 [)] 70 71 [end] 72 75 [)] 75 76 +Added line: 7130 L14 [return] 1 7 +Added line: 5323 [function] 8 16 [<] 17 18 [T] 18 19 @@ -107,8 +138,12 @@ L14 [(] 20 21 [req] 21 24 [,] 24 25 +Added line: 714 +Added line: 4669 [...] 26 29 [:] 29 30 +Added line: 7713 +Added line: 557 [boolean] 31 38 [)] 38 39 [:] 39 40 @@ -123,19 +158,28 @@ L14 [T] 60 61 [}] 61 62 [,] 62 63 +Added line: 605 +Added line: 1305 [string] 64 70 +Added line: 8031 [,] 70 71 [Function] 72 80 [<] 80 81 [...] 81 84 +Added line: 1354 [any] 84 87 +Added line: 5224 [>] 87 88 [)] 88 89 +Added line: 7977 L15 [local] 3 8 +Added line: 1633 [body] 9 13 [=] 14 15 [string] 16 22 +Added line: 2186 +Added line: 8433 [.] 22 23 [format] 23 29 [(] 29 30 @@ -148,6 +192,7 @@ L15 [req] 53 56 [.] 56 57 [path] 57 61 +Added line: 7171 [)] 61 62 L16 [local] 3 8 @@ -155,17 +200,22 @@ L16 [=] 13 14 [{] 15 16 L17 +Added line: 5925 [code] 5 9 +Added line: 8615 [=] 10 11 [200] 12 15 L18 [{] 5 6 ["Content-Type"] 7 21 +Added line: 2804 [,] 21 22 ["text/plain"] 23 35 [}] 36 37 [,] 37 38 L19 +Added line: 3681 +Added line: 9515 [{] 5 6 L20 ["Content-Length"] 7 23 @@ -178,10 +228,15 @@ L22 [\[] 7 8 ["Auth.Confirm"] 8 22 [\]] 22 23 +Added line: 8407 [=] 24 25 [\[\[至:%s。\]\]] 26 35 +Added line: 1128 [,] 35 36 +Added line: 9076 +Added line: 9359 L24 +Added line: 3334 [}] 5 6 [::] 7 9 [Array] 10 15 @@ -189,12 +244,19 @@ L24 [any] 16 19 [>] 19 20 [,] 20 21 +Added line: 3902 L25 +Added line: 3057 [}] 3 4 +Added line: 1267 [::] 5 7 +Added line: 4719 [{] 8 9 +Added line: 7492 [\[] 10 11 [any] 11 14 +Added line: 4358 +Added line: 2499 [\]] 14 15 [:] 15 16 [number] 17 23 @@ -206,47 +268,59 @@ L25 [boolean] 41 48 [>] 48 49 [}] 50 51 -Added line: 5215 L26 [if] 3 5 [(] 6 7 [req] 7 10 +Added line: 5768 +Added line: 8213 [::] 11 13 [any] 14 17 [)] 17 18 [.] 18 19 +Added line: 6826 [keepAlive] 19 28 [then] 29 33 L27 [local] 5 10 [socketType] 11 21 +Added line: 1949 [:] 21 22 ["Connection"] 23 35 [|] 36 37 ["Pingback"] 38 48 [|] 49 50 +Added line: 4137 +Added line: 8176 +Added line: 2032 +Added line: 2665 [""] 51 53 [=] 54 55 [""] 56 58 - [::] 59 61 [""] 62 64 L28 - [socketType] 5 15 +Added line: 8303 [=] 16 17 +Added line: 7443 ["Connection"] 18 30 [::] 31 33 - ["Connection"] 34 46 +Added line: 2483 L29 [res] 5 8 [\[] 8 9 +Added line: 6091 +Added line: 4449 Added line: 7627 [#] 9 10 +Added line: 3244 [res] 10 13 [+] 14 15 [1] 16 17 [\]] 17 18 [=] 19 20 [{] 21 22 +Added line: 6459 +Added line: 4019 [socketType] 23 33 [::] 34 36 [string] 37 43 @@ -256,7 +330,11 @@ Added line: 7627 L30 [res] 5 8 [\[] 8 9 +Added line: 6347 [#] 9 10 +Added line: 5147 +Added line: 7257 +Added line: 4596 [res] 10 13 [-] 14 15 [2] 16 17 @@ -266,10 +344,12 @@ Added line: 6842 [{] 21 22 [...] 23 26 [}] 27 28 +Added line: 8398 L31 [end] 3 6 L33 [return] 3 9 +Added line: 5234 [(] 10 11 [res] 11 14 [::] 15 17 @@ -279,6 +359,7 @@ L33 [T] 28 29 [}] 30 31 [,] 31 32 +Added line: 1208 [(] 33 34 [if] 34 36 [req] 37 40 @@ -286,19 +367,27 @@ L33 [body] 46 50 [else] 51 55 [""] 56 58 +Added line: 6882 +Added line: 8963 [)] 58 59 [::] 60 62 [string] 63 69 [,] 69 70 +Added line: 4036 +Added line: 2531 [function] 71 79 [(] 79 80 [...] 80 83 [)] 83 84 +Added line: 491 [:] 84 85 [...] 86 89 +Added line: 9256 +Added line: 222 [any] 89 92 [return] 93 99 [end] 104 107 L34 +Added line: 183 [end] 1 4 EOF diff --git a/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/tabWidth.txt b/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/tabWidth.txt index 22b01d214e..fea8d1e2bc 100644 --- a/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/tabWidth.txt +++ b/pmd-lua/src/test/resources/net/sourceforge/pmd/lang/lua/cpd/testdata/tabWidth.txt @@ -1,7 +1,96 @@ +Added line: 6170 +Added line: 9099 +Added line: 8119 +Added line: 5693 +Added line: 4035 [Image] or [Truncated image[ Bcol Ecol +Added line: 5495 +Added line: 2239 +Added line: 6582 +Added line: 6219 +Added line: 1689 L1 +Added line: 2562 +Added line: 3480 +Added line: 295 +Added line: 896 +Added line: 816 [print] 2 7 +Added line: 1842 +Added line: 471 +Added line: 2600 +Added line: 2271 +Added line: 2680 +Added line: 5823 +Added line: 2280 +Added line: 1658 +Added line: 5960 +Added line: 5391 +Added line: 9642 +Added line: 9027 [(] 7 8 - ["Hello World"] 8 21 +Added line: 6529 +Added line: 5416 +Added line: 7573 +Added line: 229 +Added line: 998 +Added line: 8815 +Added line: 9999 +Added line: 8164 +Added line: 4279 +Added line: 1923 +Added line: 8467 +Added line: 76 +Added line: 8546 +Added line: 3808 +Added line: 3019 +Added line: 8387 [)] 21 22 +Added line: 3733 +Added line: 2154 +Added line: 2465 +Added line: 9490 +Added line: 8426 +Added line: 4432 +Added line: 6961 +Added line: 2669 +Added line: 3952 +Added line: 8288 +Added line: 3488 +Added line: 4995 +Added line: 1733 +Added line: 7668 +Added line: 2893 +Added line: 5369 +Added line: 5460 +Added line: 1729 +Added line: 6055 +Added line: 6935 +Added line: 6701 +Added line: 3308 +Added line: 149 +Added line: 6498 +Added line: 1951 +Added line: 4234 +Added line: 3022 +Added line: 5871 +Added line: 1975 +Added line: 2427 +Added line: 868 +Added line: 4206 +Added line: 6421 +Added line: 2685 +Added line: 1789 +Added line: 9969 EOF +Added line: 3008 +Added line: 7599 +Added line: 7571 +Added line: 1299 +Added line: 1209 +Added line: 4186 +Added line: 5979 +Added line: 6686 +Added line: 1426 +Added line: 4653 +Added line: 5418 diff --git a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/comments.txt b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/comments.txt index 03a019a514..402213dfa5 100644 --- a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/comments.txt +++ b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/comments.txt @@ -1,37 +1,126 @@ +Added line: 2756 +Added line: 807 +Added line: 8539 +Added line: 9113 +Added line: 6905 +Added line: 731 [Image] or [Truncated image[ Bcol Ecol +Added line: 3373 +Added line: 1702 L1 +Added line: 8860 +Added line: 3364 +Added line: 2091 Added line: 4858 - [classdef] 1 9 [LC] 10 12 +Added line: 7474 +Added line: 1015 +Added line: 7972 L2 +Added line: 736 [methods] 5 12 -L3 +Added line: 8998 [function] 9 17 +Added line: 1775 +Added line: 4359 [\[] 18 19 [obj] 19 22 +Added line: 671 +Added line: 9873 +Added line: 4786 +Added line: 2144 +Added line: 5865 +Added line: 2646 +Added line: 7891 [,] 22 23 [c] 24 25 +Added line: 6555 +Added line: 5019 +Added line: 3937 +Added line: 8764 +Added line: 1641 +Added line: 4781 +Added line: 3386 Added line: 9967 - [,] 25 26 +Added line: 4123 +Added line: 7536 +Added line: 9479 +Added line: 4291 +Added line: 6719 +Added line: 904 +Added line: 103 +Added line: 8385 +Added line: 1420 [t] 26 27 +Added line: 182 +Added line: 2440 [s] 29 30 [\]] 31 32 +Added line: 9535 [=] 33 34 +Added line: 9739 +Added line: 3326 +Added line: 9280 [Classification] 35 49 Added line: 5300 +Added line: 5866 +Added line: 6202 +Added line: 3645 +Added line: 2113 [(] 49 50 +Added line: 2484 +Added line: 6420 +Added line: 8995 +Added line: 2762 +Added line: 1319 +Added line: 7178 [obj] 51 54 +Added line: 9219 +Added line: 2428 [,] 54 55 +Added line: 6882 +Added line: 4732 [m] 55 56 +Added line: 8710 [,] 56 57 +Added line: 822 +Added line: 7584 +Added line: 9724 [t] 57 58 - [,] 58 59 +Added line: 969 +Added line: 7271 +Added line: 9627 +Added line: 2251 +Added line: 1786 +Added line: 6007 [cm] 60 62 +Added line: 2805 +Added line: 594 +Added line: 5802 [)] 63 64 L4 [end] 9 12 +Added line: 5846 L5 +Added line: 6386 +Added line: 2172 +Added line: 3626 +Added line: 7959 +Added line: 820 L6 +Added line: 7859 +Added line: 4274 +Added line: 3534 +Added line: 5746 +Added line: 4735 +Added line: 8095 +Added line: 4265 +Added line: 7475 Added line: 4587 Added line: 3169 +Added line: 4036 [end] 1 4 +Added line: 8444 +Added line: 6830 +Added line: 4876 +Added line: 4950 diff --git a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/doubleQuotedStrings.txt b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/doubleQuotedStrings.txt index 2d6e7e1bd1..d8026ce9a4 100644 --- a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/doubleQuotedStrings.txt +++ b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/doubleQuotedStrings.txt @@ -1,8 +1,97 @@ +Added line: 5493 +Added line: 1971 +Added line: 9366 +Added line: 5318 +Added line: 4299 +Added line: 7383 +Added line: 4739 +Added line: 709 +Added line: 9378 +Added line: 5844 [Image] or [Truncated image[ Bcol Ecol -L1 +Added line: 8855 +Added line: 1426 +Added line: 4158 +Added line: 3054 +Added line: 9264 [error] 1 6 +Added line: 6972 +Added line: 2331 +Added line: 3855 +Added line: 3747 +Added line: 2211 +Added line: 2714 +Added line: 4632 [(] 6 7 +Added line: 3059 +Added line: 4416 +Added line: 8734 +Added line: 9263 +Added line: 7347 +Added line: 7873 +Added line: 5527 +Added line: 7918 +Added line: 6904 ["This is a double-quoted string"] 7 39 +Added line: 449 +Added line: 9691 +Added line: 3574 +Added line: 9300 +Added line: 2862 +Added line: 3059 +Added line: 754 +Added line: 1683 +Added line: 8148 +Added line: 7460 +Added line: 5801 +Added line: 8038 +Added line: 5505 +Added line: 5413 +Added line: 8710 +Added line: 5908 +Added line: 5758 +Added line: 5943 +Added line: 6404 [)] 39 40 +Added line: 4527 [;] 40 41 +Added line: 6099 +Added line: 9772 +Added line: 5484 +Added line: 8826 +Added line: 6366 +Added line: 4718 +Added line: 4151 +Added line: 7093 +Added line: 6111 +Added line: 9060 +Added line: 8002 +Added line: 8892 +Added line: 4144 EOF +Added line: 9276 +Added line: 1627 +Added line: 3669 +Added line: 3746 +Added line: 5281 +Added line: 6285 +Added line: 1198 +Added line: 8479 +Added line: 520 +Added line: 7049 +Added line: 216 +Added line: 136 +Added line: 642 +Added line: 5635 +Added line: 8307 +Added line: 1078 +Added line: 7347 +Added line: 8421 +Added line: 3138 +Added line: 3788 +Added line: 3578 +Added line: 4526 +Added line: 1344 +Added line: 7180 +Added line: 2107 +Added line: 7348 diff --git a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/multilineComments.txt b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/multilineComments.txt index 3513e6dc37..cf1d20df7e 100644 --- a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/multilineComments.txt +++ b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/multilineComments.txt @@ -1,16 +1,105 @@ - [Image] or [Truncated image[ Bcol Ecol +Added line: 4742 +Added line: 6361 +Added line: 3340 +Added line: 3672 +Added line: 2839 +Added line: 1008 +Added line: 1950 +Added line: 4120 +Added line: 564 +Added line: 2500 +Added line: 4223 +Added line: 8597 +Added line: 5721 +Added line: 3072 +Added line: 7810 +Added line: 4790 +Added line: 8524 +Added line: 5082 +Added line: 3580 +Added line: 2110 +Added line: 9365 +Added line: 8542 L8 +Added line: 1699 +Added line: 9374 [disp] 1 5 +Added line: 5048 +Added line: 3750 +Added line: 7106 +Added line: 5570 +Added line: 1334 +Added line: 6745 +Added line: 7249 +Added line: 2341 +Added line: 552 +Added line: 9404 [(] 5 6 +Added line: 1392 +Added line: 6981 +Added line: 8872 +Added line: 7657 +Added line: 5876 +Added line: 9318 +Added line: 7273 +Added line: 7898 ['Hello World!'] 6 20 [)] 20 21 +Added line: 5432 +Added line: 4856 +Added line: 9646 [;] 21 22 -L12 +Added line: 1325 +Added line: 795 +Added line: 1446 +Added line: 9012 +Added line: 7628 +Added line: 2568 +Added line: 2324 +Added line: 3447 +Added line: 3378 +Added line: 3393 +Added line: 8569 [msgbox] 1 7 +Added line: 5675 +Added line: 374 +Added line: 7793 +Added line: 1501 +Added line: 4411 +Added line: 5481 +Added line: 3454 +Added line: 5643 +Added line: 2289 +Added line: 219 +Added line: 8164 [(] 7 8 +Added line: 9318 +Added line: 5952 +Added line: 1937 +Added line: 7811 +Added line: 2323 +Added line: 3997 +Added line: 8887 +Added line: 9360 +Added line: 1028 ['Hello World!'] 8 22 +Added line: 7365 +Added line: 536 +Added line: 3156 +Added line: 9575 [,] 22 23 ['Hello World!'] 23 37 +Added line: 4651 [)] 37 38 +Added line: 9942 [;] 38 39 +Added line: 8812 +Added line: 5267 +Added line: 4375 +Added line: 245 +Added line: 4345 +Added line: 9631 +Added line: 5208 +Added line: 4818 +Added line: 3412 EOF diff --git a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/questionMark.txt b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/questionMark.txt index 73262e0dc9..42d9442e9a 100644 --- a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/questionMark.txt +++ b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/questionMark.txt @@ -1,13 +1,102 @@ +Added line: 9985 [Image] or [Truncated image[ Bcol Ecol +Added line: 5606 +Added line: 9327 +Added line: 1392 L1 [classdef] 1 9 +Added line: 5059 +Added line: 8206 +Added line: 8062 [Class1] 10 16 +Added line: 9845 +Added line: 4615 +Added line: 244 +Added line: 2331 L2 +Added line: 1852 +Added line: 6871 +Added line: 4292 +Added line: 6738 [properties] 1 11 +Added line: 9128 +Added line: 6722 +Added line: 411 +Added line: 6423 +Added line: 6667 +Added line: 7791 +Added line: 9443 +Added line: 1724 +Added line: 4531 +Added line: 5244 +Added line: 7296 [(] 12 13 +Added line: 8071 [SetAccess] 13 22 - [=] 23 24 +Added line: 3197 +Added line: 2652 +Added line: 4536 +Added line: 2406 +Added line: 7751 +Added line: 4419 +Added line: 6799 +Added line: 5341 +Added line: 1290 +Added line: 9112 +Added line: 5720 +Added line: 3947 +Added line: 778 +Added line: 8082 +Added line: 8308 +Added line: 8358 +Added line: 1401 +Added line: 4487 +Added line: 8351 +Added line: 1602 +Added line: 6288 +Added line: 6635 +Added line: 7847 +Added line: 8556 +Added line: 5590 +Added line: 343 +Added line: 2966 +Added line: 8308 +Added line: 5778 +Added line: 3576 +Added line: 4306 +Added line: 3964 +Added line: 9133 +Added line: 6112 +Added line: 112 [?] 25 26 +Added line: 6272 +Added line: 4553 +Added line: 5199 +Added line: 4584 +Added line: 6279 +Added line: 9056 +Added line: 8265 +Added line: 4274 [Class2] 26 32 +Added line: 5366 +Added line: 1424 +Added line: 6517 +Added line: 6547 +Added line: 7344 +Added line: 3280 +Added line: 8191 +Added line: 7484 +Added line: 845 [)] 32 33 +Added line: 9363 +Added line: 8446 +Added line: 9006 +Added line: 1825 EOF +Added line: 7249 +Added line: 7262 +Added line: 4606 +Added line: 9501 +Added line: 9160 +Added line: 8799 +Added line: 872 diff --git a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/sample-matlab.txt b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/sample-matlab.txt index 2ef7fbb01d..a65e33c5aa 100644 --- a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/sample-matlab.txt +++ b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/sample-matlab.txt @@ -56,6 +56,7 @@ L173 [||] 32 34 [isempty] 35 42 [(] 42 43 +Added line: 9946 [varargin] 43 51 [{] 51 52 [1] 52 53 @@ -76,9 +77,11 @@ L177 [1] 34 35 [}] 35 36 [)] 36 37 +Added line: 939 [&&] 38 40 [.] 41 42 [.] 42 43 +Added line: 5834 [.] 43 44 L178 [all] 21 24 @@ -166,13 +169,16 @@ L191 [f] 17 18 [.] 18 19 [domain] 19 25 +Added line: 2521 [=] 26 27 +Added line: 1620 [unique] 28 34 [(] 34 35 [\[] 35 36 [dom] 36 39 [{] 39 40 [:] 40 41 +Added line: 8579 [}] 41 42 [\]] 42 43 [)] 43 44 @@ -207,7 +213,9 @@ Added line: 6130 [dom] 18 21 [,] 21 22 [data] 23 27 +Added line: 9915 [,] 27 28 +Added line: 8751 [pref] 29 33 [\]] 33 34 [=] 35 36 @@ -232,6 +240,7 @@ L200 L202 [throwAsCaller] 17 30 [(] 30 31 +Added line: 5183 [MException] 31 41 [(] 41 42 [''] 42 44 @@ -309,6 +318,7 @@ L216 [)] 48 49 L219 [f] 17 18 +Added line: 5104 [=] 19 20 [op] 21 23 [;] 23 24 @@ -320,6 +330,7 @@ L225 [.] 19 20 [funs] 20 24 [,] 24 25 +Added line: 8961 [f] 26 27 [.] 27 28 [domain] 28 34 @@ -332,6 +343,7 @@ L225 [op] 58 60 [,] 60 61 [dom] 62 65 +Added line: 4981 [,] 65 66 [data] 67 71 [,] 71 72 @@ -379,6 +391,7 @@ L232 [)] 57 58 [;] 58 59 L233 +Added line: 8393 [f] 17 18 [=] 19 20 [merge] 21 26 @@ -415,6 +428,7 @@ L239 ['chebtech'] 39 49 [)] 50 51 [)] 52 53 +Added line: 1444 L240 [c] 21 22 [=] 23 24 @@ -438,6 +452,7 @@ L242 [)] 50 51 [;] 51 52 L243 +Added line: 5751 [end] 17 20 L244 [f] 17 18 @@ -479,6 +494,7 @@ L254 [=] 39 40 [false] 41 46 [)] 47 48 +Added line: 3104 L257 [f] 9 10 [=] 11 12 @@ -524,6 +540,7 @@ L266 [y0] 36 38 [,] 38 39 [varargin] 40 48 +Added line: 1911 [)] 48 49 [;] 49 50 L269 @@ -584,6 +601,7 @@ L281 [pref] 31 35 [)] 35 36 L284 +Added line: 2653 [f] 9 10 [=] 11 12 [conj] 13 17 @@ -614,6 +632,7 @@ L293 [)] 31 32 [;] 32 33 L296 +Added line: 6394 [y] 9 10 [=] 11 12 [feval] 13 18 @@ -647,16 +666,17 @@ L305 [(] 18 19 [f] 19 20 [,] 20 21 - [prop] 22 26 [,] 26 27 [simpLevel] 28 37 [)] 37 38 [;] 38 39 L308 +Added line: 9113 [out] 9 12 [=] 13 14 [hscale] 15 21 [(] 21 22 +Added line: 321 [f] 22 23 [)] 23 24 [;] 24 25 @@ -685,6 +705,7 @@ L317 [)] 27 28 L320 [out] 9 12 +Added line: 9914 [=] 13 14 [isfinite] 15 23 [(] 23 24 @@ -735,6 +756,7 @@ L339 [f] 30 31 [)] 31 32 L342 +Added line: 2617 [out] 9 12 [=] 13 14 [iszero] 15 21 @@ -775,9 +797,8 @@ L354 [h] 9 10 [=] 11 12 [loglog] 13 19 - [(] 19 20 +Added line: 3749 [f] 20 21 - [,] 21 22 [varargin] 23 31 [)] 31 32 [;] 32 33 @@ -792,6 +813,7 @@ L357 [)] 23 24 L360 [f] 9 10 +Added line: 9794 [=] 11 12 [mtimes] 13 19 [(] 19 20 @@ -830,6 +852,7 @@ L366 L369 [varargout] 9 18 [=] 19 20 +Added line: 7417 [plot] 21 25 [(] 25 26 [f] 26 27 @@ -887,6 +910,7 @@ L384 [f] 19 20 [,] 20 21 [varargin] 22 30 +Added line: 6318 [)] 30 31 [;] 31 32 L387 @@ -895,9 +919,11 @@ L387 [round] 13 18 [(] 18 19 [f] 19 20 +Added line: 9518 [)] 20 21 L390 [h] 9 10 +Added line: 7534 [=] 11 12 [semilogx] 13 21 [(] 21 22 @@ -939,7 +965,6 @@ L402 [\[] 9 10 [s1] 10 12 [,] 12 13 - [s2] 14 16 [\]] 16 17 [=] 18 19 [size] 20 24 @@ -958,11 +983,13 @@ L405 [,] 19 20 [pref] 21 25 [)] 25 26 +Added line: 7434 L408 [varargout] 9 18 [=] 19 20 [subsref] 21 28 [(] 28 29 +Added line: 1673 [f] 29 30 [,] 30 31 [index] 32 37 @@ -1048,6 +1075,7 @@ L438 [f] 9 10 [=] 11 12 [addBreaksAtRoots] 13 29 +Added line: 7855 [(] 29 30 [f] 30 31 [,] 31 32 @@ -1261,10 +1289,12 @@ L502 [Access] 15 21 [=] 22 23 [private] 24 31 +Added line: 3388 [,] 31 32 [Static] 33 39 [=] 40 41 [false] 42 47 +Added line: 310 [)] 48 49 L504 [f] 9 10 @@ -1321,6 +1351,7 @@ L523 [u] 9 10 [=] 11 12 [idst] 13 17 +Added line: 7829 [(] 17 18 [y] 18 19 [,] 19 20 @@ -1377,6 +1408,7 @@ L535 [;] 34 35 L538 [\[] 9 10 +Added line: 7843 [t] 10 11 [,] 11 12 [y] 13 14 @@ -1406,8 +1438,10 @@ L544 [(] 19 20 [x] 20 21 [,] 21 22 +Added line: 5476 [y] 23 24 [,] 24 25 +Added line: 1965 [d] 26 27 [)] 27 28 [;] 28 29 @@ -1511,6 +1545,7 @@ L579 [\[] 9 10 [lineStyle] 10 19 [,] 19 20 +Added line: 8629 [pointStyle] 21 31 [,] 31 32 [jumpStyle] 33 42 @@ -1561,7 +1596,6 @@ L594 [op] 9 11 [=] 12 13 [sop] 14 17 - [;] 17 18 L595 [else] 5 9 L596 @@ -1611,6 +1645,7 @@ L601 [,] 38 39 [op] 40 42 [\]] 42 43 +Added line: 4007 [)] 43 44 [;] 44 45 L602 @@ -1644,6 +1679,7 @@ L612 [,] 20 21 ['--'] 22 26 [,] 26 27 +Added line: 6511 [2] 28 29 [)] 29 30 [)] 31 32 @@ -1660,11 +1696,13 @@ L614 L615 [chebfun] 13 20 [.] 20 21 +Added line: 8494 [update] 21 27 [(] 27 28 [)] 28 29 [;] 29 30 L616 +Added line: 3277 [elseif] 9 15 [(] 16 17 [strcmpi] 18 25 @@ -1697,6 +1735,7 @@ L619 [=] 24 25 [chebfunroot] 26 37 [(] 37 38 +Added line: 8633 [)] 38 39 [;] 39 40 L620 @@ -1708,6 +1747,7 @@ L620 [(] 33 34 [installDir] 34 44 [,] 44 45 +Added line: 4618 ['Contents.m'] 46 58 [)] 58 59 [,] 59 60 @@ -1762,6 +1802,7 @@ L626 L627 ['Unknown command %s.'] 17 38 [,] 38 39 +Added line: 8975 [op] 40 42 [)] 42 43 [;] 43 44 @@ -1776,6 +1817,7 @@ L630 [dom] 9 12 [=] 13 14 [\[] 15 16 +Added line: 5690 [\]] 16 17 [;] 17 18 L631 @@ -1932,6 +1974,7 @@ L657 [}] 28 29 [,] 29 30 ['domain'] 31 39 +Added line: 2890 [)] 39 40 [)] 41 42 L658 @@ -1971,6 +2014,7 @@ L665 [)] 27 28 [;] 28 29 L668 +Added line: 6294 [prefWasPassed] 5 18 [=] 19 20 [false] 21 26 @@ -2026,6 +2070,7 @@ L676 [~] 18 19 [prefWasPassed] 19 32 [)] 33 34 +Added line: 2409 L677 [pref] 17 21 [=] 22 23 @@ -2056,6 +2101,7 @@ L680 L681 [error] 17 22 [(] 22 23 +Added line: 6320 ['CHEBFUN:CHEBFUN:parseInputs:twoPr[ 23 61 [,] 61 62 [.] 63 64 @@ -2071,6 +2117,7 @@ L684 [elseif] 9 15 [(] 16 17 [strcmpi] 18 25 +Added line: 6920 [(] 25 26 [args] 26 30 [{] 30 31 @@ -2092,6 +2139,7 @@ L687 [(] 17 18 [1] 18 19 [)] 19 20 +Added line: 8297 [=] 21 22 [\[] 23 24 [\]] 24 25 @@ -2099,6 +2147,7 @@ L687 L688 [elseif] 9 15 [(] 16 17 +Added line: 18 [strcmpi] 18 25 [(] 25 26 [args] 26 30 @@ -2106,6 +2155,7 @@ L688 [1] 31 32 [}] 32 33 [,] 33 34 +Added line: 9316 ['vectorize'] 35 46 [||] 48 50 [.] 51 52 @@ -2131,7 +2181,6 @@ L692 [args] 13 17 [(] 17 18 [1] 18 19 - [)] 19 20 [=] 21 22 [\[] 23 24 [\]] 24 25 @@ -2193,6 +2242,7 @@ L699 [}] 26 27 [}] 27 28 [;] 28 29 +Added line: 9440 L700 [args] 13 17 [(] 17 18 @@ -2283,6 +2333,7 @@ L709 [keywordPrefs] 13 25 [.] 25 26 [splitting] 26 35 +Added line: 2395 [=] 36 37 [true] 38 42 [;] 42 43 @@ -2367,6 +2418,7 @@ L716 [)] 59 60 [;] 60 61 L717 +Added line: 9753 [args] 13 17 [(] 17 18 [1] 18 19 @@ -2385,6 +2437,7 @@ L718 [args] 26 30 [{] 30 31 [1] 31 32 +Added line: 3339 [}] 32 33 [,] 33 34 ['minsamples'] 35 47 @@ -2517,6 +2570,7 @@ L741 [;] 44 45 L742 [data] 21 25 +Added line: 7431 [.] 25 26 [singType] 26 34 [=] 35 36 @@ -2671,6 +2725,7 @@ L761 L763 [data] 13 17 [.] 17 18 +Added line: 5395 [exponents] 18 27 [=] 28 29 [args] 30 34 @@ -2716,7 +2771,6 @@ L767 [2] 34 35 [}] 35 36 [)] 36 37 - [&&] 38 40 [(] 41 42 [args] 42 46 [{] 46 47 @@ -2808,6 +2862,7 @@ L771 [,] 65 66 [1] 67 68 [)] 68 69 +Added line: 2624 [)] 69 70 [)] 71 72 L772 @@ -2842,6 +2897,7 @@ L777 [2] 20 21 [)] 21 22 [=] 23 24 +Added line: 5895 [\[] 25 26 [\]] 26 27 [;] 27 28 @@ -2947,6 +3003,7 @@ L789 [:] 19 20 [2] 20 21 [)] 21 22 +Added line: 8420 [=] 23 24 [\[] 25 26 [\]] 26 27 @@ -2964,6 +3021,8 @@ L790 [}] 36 37 [,] 37 38 [{] 39 40 +Added line: 9236 +Added line: 6062 ['splitLength'] 40 53 [,] 53 54 ['splitdegree'] 55 68 @@ -2975,6 +3034,7 @@ L792 [keywordPrefs] 13 25 [.] 25 26 [splitPrefs] 26 36 +Added line: 7346 [.] 36 37 [splitLength] 37 48 [=] 49 50 @@ -3034,6 +3094,7 @@ L798 [elseif] 9 15 [(] 16 17 [ischar] 18 24 +Added line: 5919 [(] 24 25 [args] 25 29 [{] 29 30 @@ -3106,6 +3167,8 @@ L807 [isnumeric] 18 27 [(] 27 28 [args] 28 32 +Added line: 5392 +Added line: 6339 [{] 32 33 [1] 33 34 [}] 34 35 @@ -3212,7 +3275,6 @@ L830 [.] 23 24 [domain] 24 30 [(] 30 31 - [1] 31 32 [)] 32 33 [op] 34 36 [.] 36 37 @@ -3284,6 +3346,7 @@ L843 [.] 52 53 [.] 53 54 L844 +Added line: 8572 ['''periodic'' or ''trig'' option i[ 17 88 [)] 88 89 [;] 89 90 @@ -3294,7 +3357,9 @@ L846 L849 [if] 5 7 [(] 8 9 +Added line: 410 [iscell] 10 16 +Added line: 3089 [(] 16 17 [op] 17 19 [)] 19 20 @@ -3305,6 +3370,7 @@ L850 [=] 15 16 [1] 17 18 [:] 18 19 +Added line: 951 [numel] 19 24 [(] 24 25 [op] 25 27 @@ -3349,6 +3415,7 @@ L859 [if] 9 11 [(] 12 13 [ischar] 14 20 +Added line: 5471 [(] 20 21 [op] 21 23 [)] 23 24 @@ -3376,6 +3443,7 @@ L862 [)] 56 57 [)] 58 59 L863 +Added line: 1082 [op] 13 15 [=] 16 17 [vectorCheck] 18 29 @@ -3449,6 +3517,7 @@ L869 [.] 60 61 [.] 61 62 [.] 62 63 +Added line: 7079 L870 [~] 18 19 [isnan] 19 24 @@ -3481,6 +3550,7 @@ L871 [.] 62 63 [fixedLength] 63 74 [)] 74 75 +Added line: 9094 [.'] 75 77 [;] 77 78 L872 @@ -3526,6 +3596,7 @@ L879 [singType] 47 55 [)] 55 56 [)] 57 58 +Added line: 6142 L880 [pref] 9 13 [.] 13 14 @@ -3578,6 +3649,7 @@ L886 [1] 17 18 [:] 18 19 [2] 19 20 +Added line: 4169 [*] 20 21 [numIntervals] 21 33 L887 @@ -3595,6 +3667,7 @@ L888 L889 [elseif] 5 11 [(] 12 13 +Added line: 402 [~] 14 15 [isempty] 15 22 [(] 22 23 @@ -3632,6 +3705,7 @@ L894 ['The number of the exponents is in[ 13 60 [)] 60 61 [;] 61 62 +Added line: 6352 L895 [end] 5 8 L897 @@ -3661,6 +3735,7 @@ L899 [)] 27 28 [;] 28 29 L900 +Added line: 1659 [if] 9 11 [(] 12 13 [nExps] 14 19 @@ -3704,6 +3779,7 @@ L907 [*] 39 40 [(] 40 41 [numIntervals] 41 53 +Added line: 5934 [-] 53 54 [1] 54 55 [)] 55 56 @@ -3714,6 +3790,7 @@ L907 [)] 64 65 [\]] 65 66 [;] 66 67 +Added line: 2962 L908 [elseif] 9 15 [(] 16 17 @@ -3822,6 +3899,7 @@ L935 [)] 8 9 [=] 10 11 [1.01] 12 16 +Added line: 1690 [*] 16 17 [y] 17 18 [(] 18 19 @@ -3847,6 +3925,7 @@ L938 [end] 1 4 L940 [if] 1 3 +Added line: 945 [(] 4 5 [y] 6 7 [(] 7 8 @@ -3887,6 +3966,7 @@ L944 [end] 1 4 L946 [y] 1 2 +Added line: 4412 [=] 3 4 [y] 5 6 [(] 6 7 @@ -3907,6 +3987,7 @@ L949 [,] 16 17 [y] 18 19 [(] 19 20 +Added line: 6049 [1] 20 21 [)] 21 22 [)] 22 23 @@ -3939,6 +4020,7 @@ L958 [y] 15 16 [)] 16 17 [;] 17 18 +Added line: 3400 L961 [if] 5 7 [(] 8 9 @@ -4006,6 +4088,7 @@ L971 [(] 24 25 ['CHEBFUN:CHEBFUN:vectorCheck:trans[ 25 64 [,] 64 65 +Added line: 7459 [.] 65 66 [.] 66 67 [.] 67 68 @@ -4027,12 +4110,13 @@ L975 L977 [elseif] 5 11 [(] 12 13 +Added line: 1257 [all] 14 17 [(] 17 18 [sv] 19 21 [==] 22 24 - [1] 25 26 [)] 27 28 +Added line: 2099 [)] 29 30 L979 [op] 9 11 @@ -4075,21 +4159,25 @@ L983 [any] 14 17 [(] 17 18 [sv] 18 20 +Added line: 9570 [)] 20 21 [==] 22 24 [1] 25 26 [)] 27 28 L985 +Added line: 2709 [v] 13 14 [=] 15 16 [op] 17 19 [(] 19 20 [y] 20 21 [(] 21 22 +Added line: 2954 [1] 22 23 [)] 23 24 [)] 24 25 [;] 25 26 +Added line: 293 L986 [if] 13 15 [(] 16 17 @@ -4172,6 +4260,7 @@ L999 [==] 21 23 [1] 24 25 [)] 25 26 +Added line: 5006 [)] 27 28 L1001 [op] 9 11 @@ -4220,6 +4309,7 @@ L1014 [,] 28 29 [dom] 30 33 [,] 33 34 +Added line: 3802 [1] 35 36 [)] 36 37 [;] 37 38 @@ -4290,7 +4380,6 @@ L1037 [any] 10 13 [(] 13 14 [size] 14 18 - [(] 18 19 [opy] 19 22 [)] 22 23 [>] 24 25 diff --git a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/specialComments.txt b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/specialComments.txt index a28bcc357f..4799e72fc8 100644 --- a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/specialComments.txt +++ b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/specialComments.txt @@ -1,4 +1,93 @@ +Added line: 430 +Added line: 7683 +Added line: 3922 +Added line: 3551 +Added line: 7069 [Image] or [Truncated image[ Bcol Ecol +Added line: 6603 +Added line: 6808 +Added line: 5248 +Added line: 9206 +Added line: 6860 +Added line: 8308 +Added line: 2537 +Added line: 825 +Added line: 3595 +Added line: 9645 +Added line: 7364 +Added line: 3495 +Added line: 3354 +Added line: 4237 +Added line: 8249 +Added line: 5027 +Added line: 1008 +Added line: 2371 +Added line: 6728 +Added line: 7917 +Added line: 4298 +Added line: 2941 +Added line: 7604 +Added line: 2578 +Added line: 152 +Added line: 4643 +Added line: 6928 L8 +Added line: 273 +Added line: 4674 +Added line: 5799 +Added line: 9838 +Added line: 1094 +Added line: 5483 [end] 1 4 +Added line: 6497 +Added line: 57 +Added line: 6454 +Added line: 9886 +Added line: 6921 +Added line: 249 +Added line: 6839 +Added line: 6054 +Added line: 1238 +Added line: 5854 +Added line: 348 +Added line: 8121 +Added line: 4251 +Added line: 1739 +Added line: 846 +Added line: 2494 +Added line: 9164 +Added line: 3932 +Added line: 5981 +Added line: 8416 +Added line: 200 +Added line: 2645 +Added line: 876 +Added line: 6668 +Added line: 1607 +Added line: 9090 +Added line: 1527 +Added line: 5957 +Added line: 914 +Added line: 2470 +Added line: 1737 +Added line: 4332 +Added line: 6545 +Added line: 7148 +Added line: 9484 +Added line: 7253 +Added line: 9927 +Added line: 6319 +Added line: 5681 +Added line: 6141 +Added line: 9139 +Added line: 6905 +Added line: 1470 +Added line: 9662 +Added line: 1427 +Added line: 4978 +Added line: 8940 +Added line: 1360 +Added line: 4641 +Added line: 6323 EOF +Added line: 1694 diff --git a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/tabWidth.txt b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/tabWidth.txt index 5915d087b3..999d67de2e 100644 --- a/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/tabWidth.txt +++ b/pmd-matlab/src/test/resources/net/sourceforge/pmd/lang/matlab/cpd/testdata/tabWidth.txt @@ -1,37 +1,126 @@ +Added line: 1913 +Added line: 1641 +Added line: 2704 [Image] or [Truncated image[ Bcol Ecol +Added line: 2971 L1 [classdef] 1 9 +Added line: 6537 [LC] 10 12 +Added line: 4899 +Added line: 6717 +Added line: 2920 +Added line: 3254 +Added line: 5670 +Added line: 3576 +Added line: 2692 [methods] 2 9 +Added line: 2593 +Added line: 8911 +Added line: 1969 +Added line: 938 L3 Added line: 9592 +Added line: 6249 +Added line: 6731 +Added line: 693 [\[] 12 13 +Added line: 9632 +Added line: 7620 +Added line: 7439 +Added line: 7033 [obj] 13 16 +Added line: 3450 +Added line: 1321 +Added line: 6833 +Added line: 2261 +Added line: 3595 +Added line: 1988 +Added line: 5498 [,] 16 17 -Added line: 1029 +Added line: 1388 +Added line: 2218 +Added line: 5070 +Added line: 2872 +Added line: 3359 +Added line: 7704 +Added line: 5409 +Added line: 2504 +Added line: 4407 [c] 18 19 +Added line: 7871 +Added line: 3714 +Added line: 8867 [,] 19 20 [t] 20 21 Added line: 5017 +Added line: 7540 +Added line: 2991 +Added line: 4562 +Added line: 9792 [,] 21 22 +Added line: 2958 [\]] 25 26 [=] 27 28 +Added line: 8342 +Added line: 8708 +Added line: 2897 +Added line: 15 +Added line: 2242 [Classification] 29 43 +Added line: 4058 +Added line: 375 +Added line: 8691 +Added line: 7996 +Added line: 2418 [(] 43 44 +Added line: 2211 +Added line: 8534 +Added line: 5874 +Added line: 8425 +Added line: 3241 [obj] 45 48 - [,] 48 49 +Added line: 2609 +Added line: 9208 [m] 49 50 +Added line: 8479 Added line: 4649 +Added line: 1194 +Added line: 8923 [,] 50 51 +Added line: 972 +Added line: 9578 +Added line: 6892 [t] 51 52 +Added line: 5224 +Added line: 7126 +Added line: 1883 +Added line: 8218 [,] 52 53 [cm] 54 56 [)] 57 58 L4 +Added line: 9247 +Added line: 5461 +Added line: 5630 +Added line: 7846 +Added line: 877 +Added line: 4759 [end] 3 6 Added line: 7850 +Added line: 1112 +Added line: 7594 +Added line: 9433 +Added line: 2222 L5 +Added line: 256 [end] 2 5 +Added line: 362 +Added line: 1824 L6 +Added line: 8292 +Added line: 3088 +Added line: 9669 [end] 1 4 +Added line: 9596 EOF diff --git a/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/big_sample.txt b/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/big_sample.txt index 2d91fee542..4cd9803e15 100644 --- a/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/big_sample.txt +++ b/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/big_sample.txt @@ -1,5 +1,6 @@ [Image] or [Truncated image[ Bcol Ecol L28 +Added line: 1548 [static] 1 7 [dispatch_queue_t] 8 24 [http_request_operation_processing_[ 25 64 @@ -8,12 +9,14 @@ L28 [{] 67 68 L29 [static] 5 11 +Added line: 9704 [dispatch_queue_t] 12 28 [af_http_request_operation_processi[ 29 71 [;] 71 72 L30 [static] 5 11 [dispatch_once_t] 12 27 +Added line: 7657 [onceToken] 28 37 [;] 37 38 L31 @@ -22,6 +25,7 @@ L31 [&] 19 20 [onceToken] 20 29 [,] 29 30 +Added line: 665 [^] 31 32 [{] 32 33 L32 @@ -32,23 +36,29 @@ L32 ["com.alamofire.networking.http-req[ 76 126 [,] 126 127 [DISPATCH_QUEUE_CONCURRENT] 128 153 +Added line: 7056 [)] 153 154 [;] 154 155 L33 [}] 5 6 [)] 6 7 +Added line: 9455 +Added line: 6174 [;] 7 8 L35 [return] 5 11 [af_http_request_operation_processi[ 12 54 [;] 54 55 L36 +Added line: 8481 [}] 1 2 L38 [static] 1 7 [dispatch_group_t] 8 24 +Added line: 4546 [http_request_operation_completion_[ 25 64 [(] 64 65 +Added line: 4551 [)] 65 66 [{] 67 68 L39 @@ -89,6 +99,7 @@ L46 L50 [@interface] 1 11 [AFURLConnectionOperation] 12 36 +Added line: 2894 [(] 37 38 [)] 38 39 L51 @@ -100,7 +111,6 @@ L51 [,] 32 33 [strong] 34 40 [)] 40 41 - [NSURLRequest] 42 54 [*] 55 56 [request] 56 63 [;] 63 64 @@ -122,13 +132,16 @@ L53 L55 [@interface] 1 11 [AFHTTPRequestOperation] 12 34 +Added line: 9786 [(] 35 36 +Added line: 1979 [)] 36 37 L56 [@property] 1 10 [(] 11 12 [readwrite] 12 21 [,] 21 22 +Added line: 3197 [nonatomic] 23 32 [,] 32 33 [strong] 34 40 @@ -144,12 +157,14 @@ L57 [,] 21 22 [nonatomic] 23 32 [,] 32 33 +Added line: 1314 [strong] 34 40 [)] 40 41 [id] 42 44 [responseObject] 45 59 [;] 59 60 L58 +Added line: 6562 [@property] 1 10 [(] 11 12 [readwrite] 12 21 @@ -170,10 +185,11 @@ L59 [nonatomic] 23 32 [,] 32 33 [strong] 34 40 - [)] 40 41 [NSRecursiveLock] 42 57 [*] 58 59 +Added line: 7242 [lock] 59 63 +Added line: 4502 [;] 63 64 L60 [@end] 1 5 @@ -195,11 +211,11 @@ L65 [NSURLRequest] 34 46 [*] 47 48 [)] 48 49 - [urlRequest] 49 59 [{] 60 61 L66 [self] 5 9 [=] 10 11 +Added line: 6888 [\[] 12 13 [super] 13 18 [initWithRequest] 19 34 @@ -238,7 +254,10 @@ L74 [}] 1 2 L76 [-] 1 2 +Added line: 8221 [(] 3 4 +Added line: 5319 +Added line: 7988 [void] 4 8 [)] 8 9 [setResponseSerializer] 9 30 @@ -261,6 +280,7 @@ L77 L79 [\[] 5 6 [self] 6 10 +Added line: 4141 [.] 10 11 [lock] 11 15 [lock] 16 20 @@ -272,8 +292,10 @@ L80 [responseSerializer] 27 45 [;] 45 46 L81 +Added line: 8202 [self] 5 9 [.] 9 10 +Added line: 4145 [responseObject] 10 24 [=] 25 26 [nil] 27 30 @@ -298,13 +320,16 @@ L84 L86 [-] 1 2 [(] 3 4 +Added line: 1427 [id] 4 6 +Added line: 2790 [)] 6 7 [responseObject] 7 21 [{] 22 23 L87 [\[] 5 6 [self] 6 10 +Added line: 332 [.] 10 11 [lock] 11 15 [lock] 16 20 @@ -314,7 +339,9 @@ L88 [if] 5 7 [(] 8 9 [!] 9 10 +Added line: 3486 [_responseObject] 10 25 +Added line: 4452 [&&] 26 28 [\[] 29 30 [self] 30 34 @@ -335,12 +362,15 @@ L89 [nil] 26 29 [;] 29 30 L90 +Added line: 4948 [self] 9 13 +Added line: 5754 [.] 13 14 [responseObject] 14 28 [=] 29 30 [\[] 31 32 [self] 32 36 +Added line: 8527 [.] 36 37 [responseSerializer] 37 55 [responseObjectForResponse] 56 81 @@ -371,10 +401,13 @@ L92 [responseSerializationError] 18 44 [=] 45 46 [error] 47 52 +Added line: 16 [;] 52 53 L93 [}] 9 10 L94 +Added line: 5167 +Added line: 763 [}] 5 6 L95 [\[] 5 6 @@ -382,7 +415,9 @@ L95 [.] 10 11 [lock] 11 15 [unlock] 16 22 +Added line: 6939 [\]] 22 23 +Added line: 5810 [;] 23 24 L97 [return] 5 11 @@ -393,7 +428,6 @@ L98 L100 [-] 1 2 [(] 3 4 - [NSError] 4 11 [*] 12 13 [)] 13 14 [error] 14 19 @@ -431,15 +465,19 @@ L110 [setCompletionBlockWithSuccess] 9 38 [:] 38 39 [success] 103 110 +Added line: 561 L111 [failure] 31 38 [:] 38 39 [failure] 100 107 L112 [{] 1 2 +Added line: 6258 +Added line: 1888 L117 [self] 5 9 [.] 9 10 +Added line: 6071 [completionBlock] 10 25 [=] 26 27 [^] 28 29 @@ -447,17 +485,18 @@ L117 L118 [if] 9 11 [(] 12 13 +Added line: 5896 [self] 13 17 [.] 17 18 [completionGroup] 18 33 [)] 33 34 +Added line: 3434 [{] 35 36 L119 [dispatch_group_enter] 13 33 [(] 33 34 [self] 34 38 [.] 38 39 - [completionGroup] 39 54 [)] 54 55 [;] 55 56 L120 @@ -473,6 +512,7 @@ L122 [{] 68 69 L123 [if] 13 15 +Added line: 7852 [(] 16 17 [self] 17 21 [.] 21 22 @@ -493,6 +533,7 @@ L125 [completionGroup] 47 62 [?] 63 64 [:] 64 65 +Added line: 9131 [http_request_operation_completion_[ 66 105 [(] 105 106 [)] 106 107 @@ -514,6 +555,7 @@ L126 [self] 33 37 [,] 37 38 [self] 39 43 +Added line: 2778 [.] 43 44 [error] 44 49 [)] 49 50 @@ -521,10 +563,10 @@ L126 L127 [}] 21 22 [)] 22 23 - [;] 23 24 L128 [}] 17 18 L129 +Added line: 6062 [}] 13 14 [else] 15 19 [{] 20 21 @@ -542,8 +584,10 @@ L131 [self] 21 25 [.] 25 26 [error] 26 31 +Added line: 4745 [)] 31 32 [{] 33 34 +Added line: 5827 L132 [if] 21 23 [(] 24 25 @@ -553,6 +597,7 @@ L132 L133 [dispatch_group_async] 25 45 [(] 45 46 +Added line: 4011 [self] 46 50 [.] 50 51 [completionGroup] 51 66 @@ -562,10 +607,10 @@ L133 [(] 109 110 [)] 110 111 [,] 111 112 - [self] 113 117 [.] 117 118 [completionQueue] 118 133 [?] 134 135 +Added line: 2810 [:] 135 136 [dispatch_get_main_queue] 137 160 [(] 160 161 @@ -584,6 +629,7 @@ L134 [)] 53 54 [;] 54 55 L135 +Added line: 480 [}] 25 26 [)] 26 27 [;] 27 28 @@ -596,11 +642,13 @@ L137 L138 [if] 21 23 [(] 24 25 +Added line: 5835 [success] 25 32 [)] 32 33 [{] 34 35 L139 [dispatch_group_async] 25 45 +Added line: 5411 [(] 45 46 [self] 46 50 [.] 50 51 @@ -614,6 +662,7 @@ L139 [self] 113 117 [.] 117 118 [completionQueue] 118 133 +Added line: 7134 [?] 134 135 [:] 135 136 [dispatch_get_main_queue] 137 160 @@ -621,6 +670,7 @@ L139 [)] 161 162 [,] 162 163 [^] 164 165 +Added line: 2339 [{] 165 166 L140 [success] 29 36 @@ -628,6 +678,7 @@ L140 [self] 37 41 [,] 41 42 [responseObject] 43 57 +Added line: 7691 [)] 57 58 [;] 58 59 L141 @@ -650,11 +701,14 @@ L146 [{] 39 40 L147 [dispatch_group_leave] 17 37 +Added line: 5544 [(] 37 38 [self] 38 42 [.] 42 43 [completionGroup] 43 58 [)] 58 59 +Added line: 2124 +Added line: 5238 [;] 59 60 L148 [}] 13 14 @@ -666,6 +720,7 @@ L150 [}] 5 6 [;] 6 7 L152 +Added line: 5759 [}] 1 2 L156 [-] 1 2 @@ -679,6 +734,7 @@ L157 [super] 6 11 [pause] 12 17 [\]] 17 18 +Added line: 3362 [;] 18 19 L159 [u_int64_t] 5 14 @@ -709,9 +765,9 @@ L161 [)] 30 31 [\[] 31 32 [self] 32 36 - [.] 36 37 [outputStream] 37 49 [propertyForKey] 50 64 +Added line: 7075 [:] 64 65 [NSStreamFileCurrentOffsetKey] 65 93 [\]] 93 94 @@ -720,6 +776,7 @@ L161 [;] 117 118 L162 [}] 5 6 +Added line: 6403 [else] 7 11 [{] 12 13 L163 @@ -742,6 +799,7 @@ L163 [\]] 107 108 [;] 108 109 L164 +Added line: 3654 [}] 5 6 L166 [NSMutableURLRequest] 5 24 @@ -753,6 +811,7 @@ L166 [.] 51 52 [request] 52 59 [mutableCopy] 60 71 +Added line: 9859 [\]] 71 72 [;] 72 73 L167 @@ -780,12 +839,15 @@ L167 [valueForKey] 107 118 [:] 118 119 [@"ETag"] 119 126 +Added line: 8844 [\]] 126 127 [)] 127 128 [{] 129 130 L168 [\[] 9 10 [mutableURLRequest] 10 27 +Added line: 67 +Added line: 8858 [setValue] 28 36 [:] 36 37 [\[] 37 38 @@ -797,6 +859,7 @@ L168 [\]] 68 69 [valueForKey] 70 81 [:] 81 82 +Added line: 8136 [@"ETag"] 82 89 [\]] 89 90 [forHTTPHeaderField] 91 109 @@ -811,6 +874,7 @@ L170 [mutableURLRequest] 6 23 [setValue] 24 32 [:] 32 33 +Added line: 9542 [\[] 33 34 [NSString] 34 42 [stringWithFormat] 43 59 @@ -820,18 +884,23 @@ L170 [offset] 76 82 [\]] 82 83 [forHTTPHeaderField] 84 102 +Added line: 433 +Added line: 5602 [:] 102 103 [@"Range"] 103 111 [\]] 111 112 [;] 112 113 L171 [self] 5 9 +Added line: 3235 [.] 9 10 [request] 10 17 [=] 18 19 [mutableURLRequest] 20 37 +Added line: 6790 [;] 37 38 L172 +Added line: 7399 [}] 1 2 L176 [+] 1 2 @@ -854,19 +923,24 @@ L180 [initWithCoder] 7 20 [:] 20 21 [(] 21 22 +Added line: 4784 [NSCoder] 22 29 [*] 30 31 [)] 31 32 [decoder] 32 39 [{] 40 41 +Added line: 3989 L181 [self] 5 9 [=] 10 11 +Added line: 3118 [\[] 12 13 +Added line: 7482 [super] 13 18 [initWithCoder] 19 32 [:] 32 33 [decoder] 33 40 +Added line: 5956 [\]] 40 41 [;] 41 42 L182 @@ -875,7 +949,9 @@ L182 [!] 9 10 [self] 10 14 [)] 14 15 +Added line: 3047 [{] 16 17 +Added line: 7996 L183 [return] 9 15 [nil] 16 19 @@ -892,6 +968,7 @@ L186 [decodeObjectOfClass] 40 59 [:] 59 60 [\[] 60 61 +Added line: 6339 [AFHTTPResponseSerializer] 61 85 [class] 86 91 [\]] 91 92 @@ -901,6 +978,7 @@ L186 [(] 120 121 [@selector] 121 130 [(] 130 131 +Added line: 5954 [responseSerializer] 131 149 [)] 149 150 [)] 150 151 @@ -910,6 +988,7 @@ L188 [return] 5 11 [self] 12 16 [;] 16 17 +Added line: 9354 L189 [}] 1 2 L191 @@ -924,17 +1003,22 @@ L191 [*] 34 35 [)] 35 36 [coder] 36 41 +Added line: 6399 [{] 42 43 L192 +Added line: 6423 [\[] 5 6 [super] 6 11 [encodeWithCoder] 12 27 [:] 27 28 [coder] 28 33 [\]] 33 34 +Added line: 976 +Added line: 8007 [;] 34 35 L194 [\[] 5 6 +Added line: 577 [coder] 6 11 [encodeObject] 12 24 [:] 24 25 @@ -959,18 +1043,20 @@ L199 [(] 3 4 [id] 4 6 [)] 6 7 +Added line: 8467 [copyWithZone] 7 19 [:] 19 20 [(] 20 21 [NSZone] 21 27 [*] 28 29 - [)] 29 30 [zone] 30 34 [{] 35 36 L200 [AFHTTPRequestOperation] 5 27 [*] 28 29 +Added line: 3262 [operation] 29 38 +Added line: 7766 [=] 39 40 [\[] 41 42 [super] 42 47 @@ -978,16 +1064,19 @@ L200 [:] 60 61 [zone] 61 65 [\]] 65 66 +Added line: 257 [;] 66 67 L202 [operation] 5 14 [.] 14 15 +Added line: 1622 [responseSerializer] 15 33 [=] 34 35 [\[] 36 37 [self] 37 41 [.] 41 42 [responseSerializer] 42 60 +Added line: 7948 [copyWithZone] 61 73 [:] 73 74 [zone] 74 78 @@ -999,7 +1088,6 @@ L203 [completionQueue] 15 30 [=] 31 32 [self] 33 37 - [.] 37 38 [completionQueue] 38 53 [;] 53 54 L204 @@ -1020,3 +1108,4 @@ L207 L209 [@end] 1 5 EOF +Added line: 4289 diff --git a/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/tabWidth.txt b/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/tabWidth.txt index 8ff6838500..d4c5dba67e 100644 --- a/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/tabWidth.txt +++ b/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/tabWidth.txt @@ -1,23 +1,69 @@ L3 +Added line: 8645 +Added line: 1604 +Added line: 2791 +Added line: 4378 [int] 1 4 +Added line: 3635 +Added line: 1166 +Added line: 7707 +Added line: 1725 [main] 5 9 [(] 10 11 [int] 11 14 +Added line: 3126 +Added line: 4250 +Added line: 1652 +Added line: 417 +Added line: 739 +Added line: 5533 [argc] 15 19 [,] 19 20 +Added line: 6661 +Added line: 6479 +Added line: 139 [const] 21 26 +Added line: 6428 [char] 27 31 [*] 32 33 -Added line: 6487 +Added line: 1029 [argv] 34 38 +Added line: 585 +Added line: 8629 +Added line: 7598 +Added line: 1835 +Added line: 8065 +Added line: 9150 [\[] 38 39 +Added line: 344 +Added line: 389 +Added line: 5215 [\]] 39 40 Added line: 1412 +Added line: 7290 +Added line: 5938 +Added line: 3667 +Added line: 9644 +Added line: 8852 +Added line: 5777 +Added line: 5648 [)] 40 41 +Added line: 6151 +Added line: 1494 +Added line: 6616 L4 +Added line: 3153 [{] 1 2 L5 +Added line: 138 [NSAutoreleasePool] 2 19 +Added line: 7168 +Added line: 3355 +Added line: 392 +Added line: 8608 +Added line: 7144 +Added line: 2346 +Added line: 9096 [*] 20 21 [pool] 21 25 [=] 26 27 @@ -25,27 +71,70 @@ L5 [\[] 29 30 [NSAutoreleasePool] 30 47 Added line: 8505 +Added line: 6711 +Added line: 6071 +Added line: 6983 Added line: 6634 +Added line: 1810 [\]] 53 54 +Added line: 1733 +Added line: 9163 [init] 55 59 +Added line: 3515 [\]] 59 60 +Added line: 9437 +Added line: 2871 [;] 60 61 +Added line: 1612 +Added line: 2075 +Added line: 9000 +Added line: 4419 +Added line: 6351 L6 [NSLog] 2 7 +Added line: 2281 +Added line: 1883 +Added line: 3990 +Added line: 7331 +Added line: 932 +Added line: 8433 +Added line: 9761 +Added line: 2164 +Added line: 4943 [(] 8 9 +Added line: 5872 [@"Hello, World!"] 9 25 [)] 25 26 +Added line: 5457 [;] 26 27 [\[] 2 3 +Added line: 501 [pool] 3 7 - [drain] 8 13 +Added line: 1298 +Added line: 1467 +Added line: 8341 +Added line: 9174 +Added line: 8548 [\]] 13 14 [;] 14 15 +Added line: 7375 +Added line: 1981 +Added line: 819 L8 +Added line: 176 [return] 2 8 +Added line: 8387 [0] 9 10 [;] 10 11 -L9 +Added line: 9453 +Added line: 2590 [}] 1 2 +Added line: 8201 +Added line: 7961 Added line: 7826 EOF +Added line: 4675 +Added line: 6212 +Added line: 6217 +Added line: 4686 +Added line: 7480 diff --git a/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/unicodeCharInIdent.txt b/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/unicodeCharInIdent.txt index 40117a6f76..f7f2534c40 100644 --- a/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/unicodeCharInIdent.txt +++ b/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/unicodeCharInIdent.txt @@ -1,16 +1,105 @@ +Added line: 9853 +Added line: 5648 +Added line: 4225 +Added line: 1030 [Image] or [Truncated image[ Bcol Ecol +Added line: 9502 +Added line: 6235 +Added line: 1312 +Added line: 1143 +Added line: 3850 +Added line: 27 +Added line: 953 +Added line: 5545 +Added line: 2033 L1 +Added line: 7523 +Added line: 1392 +Added line: 7684 [@] 1 2 +Added line: 4554 +Added line: 6082 +Added line: 7892 +Added line: 1875 Added line: 861 [import] 2 8 +Added line: 9533 +Added line: 7449 +Added line: 5165 +Added line: 4953 +Added line: 6560 +Added line: 4274 [UIKit] 9 14 +Added line: 3530 +Added line: 984 +Added line: 3456 +Added line: 9247 +Added line: 6737 +Added line: 8590 +Added line: 9085 +Added line: 3288 +Added line: 6537 +Added line: 746 +Added line: 6284 +Added line: 6929 +Added line: 9891 +Added line: 4272 +Added line: 3349 +Added line: 6189 [;] 14 15 [static] 1 7 +Added line: 7481 +Added line: 950 +Added line: 3629 +Added line: 307 +Added line: 6451 +Added line: 3982 [SecCertificateRef] 8 25 [gNСServerLogonCertificate] 26 51 - [;] 51 52 -Added line: 2225 +Added line: 7206 +Added line: 4549 +Added line: 9474 +Added line: 4937 +Added line: 9294 +Added line: 4815 +Added line: 9583 +Added line: 3405 +Added line: 3462 +Added line: 3141 +Added line: 5714 +Added line: 4478 +Added line: 7848 +Added line: 7552 +Added line: 7787 +Added line: 9790 +Added line: 6878 L6 +Added line: 5186 +Added line: 5339 +Added line: 8376 +Added line: 5988 +Added line: 1168 +Added line: 7163 +Added line: 392 +Added line: 1318 Added line: 4954 +Added line: 6861 +Added line: 676 +Added line: 4720 [@end] 1 5 +Added line: 2576 +Added line: 9913 EOF +Added line: 98 +Added line: 6598 +Added line: 3068 +Added line: 2581 +Added line: 1727 +Added line: 4680 +Added line: 8438 +Added line: 2980 +Added line: 3906 +Added line: 1996 +Added line: 2127 +Added line: 9266 +Added line: 3468 diff --git a/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/unicodeEscapeInString.txt b/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/unicodeEscapeInString.txt index 7a2c375437..6fd82a206d 100644 --- a/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/unicodeEscapeInString.txt +++ b/pmd-objectivec/src/test/resources/net/sourceforge/pmd/lang/objectivec/cpd/testdata/unicodeEscapeInString.txt @@ -1,54 +1,143 @@ +Added line: 5003 +Added line: 485 [Image] or [Truncated image[ Bcol Ecol +Added line: 7378 +Added line: 2002 +Added line: 5880 L1 - [@property] 1 10 +Added line: 6136 +Added line: 7220 +Added line: 3781 +Added line: 2302 +Added line: 7038 +Added line: 7161 [(] 11 12 [nonatomic] 12 21 - [,] 21 22 +Added line: 9552 Added line: 3998 [strong] 23 29 +Added line: 2232 +Added line: 7271 +Added line: 3176 [)] 29 30 - [UIButton] 31 39 +Added line: 5284 +Added line: 740 +Added line: 6636 +Added line: 3369 +Added line: 7206 +Added line: 346 [copyrightsButton] 41 57 +Added line: 7179 +Added line: 6506 +Added line: 8952 +Added line: 881 +Added line: 5772 +Added line: 2440 +Added line: 2565 Added line: 1945 [;] 57 58 +Added line: 2250 Added line: 9923 +Added line: 665 +Added line: 9882 +Added line: 2844 L3 [-] 1 2 +Added line: 1374 [(] 3 4 +Added line: 1583 +Added line: 245 [)] 8 9 +Added line: 3640 +Added line: 4307 [setupCopyrightsButton] 9 30 [{] 31 32 +Added line: 305 +Added line: 587 L4 +Added line: 7937 +Added line: 5584 [self] 5 9 +Added line: 8175 +Added line: 4039 [.] 9 10 +Added line: 6481 +Added line: 9770 +Added line: 6881 +Added line: 7155 +Added line: 362 [copyrightsButton] 10 26 [=] 27 28 +Added line: 1666 +Added line: 4505 [\[] 29 30 +Added line: 142 +Added line: 1835 +Added line: 2139 [\[] 30 31 +Added line: 4948 +Added line: 6647 [UIButton] 31 39 [alloc] 40 45 [\]] 45 46 +Added line: 4338 [initWithFrame] 47 60 - [:] 60 61 +Added line: 3995 +Added line: 7427 +Added line: 8385 +Added line: 6330 [CGRectZero] 61 71 +Added line: 6535 +Added line: 5180 +Added line: 3186 +Added line: 6880 +Added line: 3082 +Added line: 6228 +Added line: 2832 [\]] 71 72 Added line: 1412 +Added line: 3015 [;] 72 73 L5 [\[] 5 6 +Added line: 7726 +Added line: 474 +Added line: 9229 +Added line: 3593 +Added line: 2121 Added line: 7827 +Added line: 66 [self] 6 10 +Added line: 2568 [.] 10 11 +Added line: 9648 [copyrightsButton] 11 27 +Added line: 5725 +Added line: 4638 +Added line: 3586 [setTitle] 28 36 - [:] 36 37 +Added line: 2582 +Added line: 2302 +Added line: 3404 +Added line: 8670 [@"\\u00a9"] 37 46 +Added line: 7421 +Added line: 6413 +Added line: 3222 [forState] 47 55 [UIControlStateNormal] 56 76 +Added line: 2928 [\]] 76 77 +Added line: 1286 [;] 77 78 L6 +Added line: 3012 [}] 1 2 L8 +Added line: 9456 [@end] 1 5 EOF +Added line: 1455 +Added line: 4744 +Added line: 83 +Added line: 1031 diff --git a/pmd-perl/src/test/resources/net/sourceforge/pmd/lang/perl/cpd/testdata/sample.txt b/pmd-perl/src/test/resources/net/sourceforge/pmd/lang/perl/cpd/testdata/sample.txt index 06f5c73a50..1fe44df1e4 100644 --- a/pmd-perl/src/test/resources/net/sourceforge/pmd/lang/perl/cpd/testdata/sample.txt +++ b/pmd-perl/src/test/resources/net/sourceforge/pmd/lang/perl/cpd/testdata/sample.txt @@ -1,48 +1,137 @@ +Added line: 5018 +Added line: 9773 +Added line: 7725 +Added line: 4467 [Image] or [Truncated image[ Bcol Ecol +Added line: 6875 L5 +Added line: 3889 +Added line: 2871 +Added line: 8390 [use] 1 4 +Added line: 1336 [strict] 5 11 +Added line: 6580 [;] 11 12 +Added line: 969 +Added line: 9542 +Added line: 4843 L8 +Added line: 8241 +Added line: 9481 +Added line: 3863 +Added line: 8717 [my] 1 3 +Added line: 6916 [$] 4 5 +Added line: 3526 +Added line: 3751 +Added line: 4784 [what] 5 9 +Added line: 2287 [=] 10 11 +Added line: 1222 +Added line: 5458 ['fred|barney'] 12 25 [;] 25 26 L10 [while] 1 6 [(] 7 8 +Added line: 4885 [<] 8 9 [>] 9 10 +Added line: 1876 +Added line: 2927 [)] 10 11 +Added line: 9414 +Added line: 760 +Added line: 8828 +Added line: 2391 +Added line: 9283 +Added line: 3962 +Added line: 7965 +Added line: 7641 +Added line: 9354 [{] 12 13 +Added line: 8188 +Added line: 8770 +Added line: 3324 L11 [chomp] 5 10 [;] 10 11 +Added line: 6682 +Added line: 8999 L18 +Added line: 2584 +Added line: 4573 +Added line: 9724 [if] 5 7 [(] 8 9 +Added line: 979 [/] 9 10 [YOUR_PATTERN_GOES_HERE] 10 32 [/] 32 33 [)] 33 34 +Added line: 8863 +Added line: 5201 +Added line: 5108 [{] 35 36 +Added line: 532 +Added line: 7965 +Added line: 2225 +Added line: 636 +Added line: 909 L19 +Added line: 7557 [print] 2 7 +Added line: 2656 ['Matched: |$ `\n\t<$&>$|\\n'] 8 11 +Added line: 3342 +Added line: 1311 +Added line: 6298 L20 +Added line: 7498 +Added line: 7931 [;] 11 12 +Added line: 8297 +Added line: 2637 +Added line: 3923 +Added line: 5502 L25 +Added line: 1372 +Added line: 3146 [}] 5 6 [else] 7 11 +Added line: 3058 +Added line: 45 +Added line: 622 +Added line: 7368 +Added line: 4641 [{] 12 13 +Added line: 7057 +Added line: 3206 +Added line: 7357 +Added line: 9886 +Added line: 3954 L26 +Added line: 8412 +Added line: 1367 +Added line: 2678 +Added line: 4422 +Added line: 9409 [print] 2 7 +Added line: 2850 +Added line: 3319 ["No match.\\n"] 8 21 +Added line: 1513 [;] 21 22 L27 +Added line: 6205 [}] 5 6 +Added line: 6501 +Added line: 7224 +Added line: 7694 L29 [}] 1 2 +Added line: 7662 EOF diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/CompoundTriggerWithAdditionalDeclarations4270.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/CompoundTriggerWithAdditionalDeclarations4270.txt index 0e6b2a5f06..cb6b146fb5 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/CompoundTriggerWithAdditionalDeclarations4270.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/CompoundTriggerWithAdditionalDeclarations4270.txt @@ -1,11 +1,16 @@ +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- TriggerUnit[@CanonicalImage = "EXAMPLE_TRIGGER", @Image = "EXAMPLE_TRIGGER", @MethodName = "EXAMPLE_TRIGGER", @Name = "EXAMPLE_TRIGGER", @ObjectName = "EXAMPLE_TRIGGER"] +- ObjectNameDeclaration[@CanonicalImage = "EXAMPLE_TRIGGER", @Image = "EXAMPLE_TRIGGER"] +Added line: 3982 | +- ID[@CanonicalImage = "EXAMPLE_TRIGGER", @Image = "EXAMPLE_TRIGGER"] +Added line: 4503 +- ID[@CanonicalImage = "TEST_TABLE", @Image = "TEST_TABLE"] +Added line: 5046 +- CompoundTriggerBlock[@CanonicalImage = null] +- DeclarativeSection[@CanonicalImage = null] +Added line: 5301 | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 2140 | | +- VariableOrConstantDeclaration[@CanonicalImage = null] | | +- VariableOrConstantDeclarator[@CanonicalImage = "L_NUMBER_ONE NUMBER(2) := ROUND", @Image = "l_number_one NUMBER(2) := ROUND"] | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_NUMBER_ONE", @Image = "l_number_one"] @@ -25,6 +30,7 @@ | | +- Expression[@CanonicalImage = "DBMS_RANDOM.VALUE", @Image = "DBMS_RANDOM.Value"] | | +- PrimaryPrefix[@CanonicalImage = "DBMS_RANDOM.VALUE", @Image = "DBMS_RANDOM.Value", @SelfModifier = false] | | +- FunctionCall[@CanonicalImage = "DBMS_RANDOM.VALUE", @Image = "DBMS_RANDOM.Value"] +Added line: 1961 | | +- FunctionName[@CanonicalImage = "DBMS_RANDOM.VALUE", @Image = "DBMS_RANDOM.Value"] | | | +- ID[@CanonicalImage = "DBMS_RANDOM", @Image = "DBMS_RANDOM"] | | | +- ID[@CanonicalImage = "VALUE", @Image = "Value"] @@ -32,8 +38,11 @@ | | +- ArgumentList[@CanonicalImage = null] | | +- Argument[@CanonicalImage = null] | | | +- Expression[@CanonicalImage = "1", @Image = "1"] +Added line: 2164 | | | +- PrimaryPrefix[@CanonicalImage = "1", @Image = "1", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "1", @Image = "1"] +Added line: 3981 +Added line: 6735 | | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"] | | +- Argument[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "10", @Image = "10"] @@ -45,81 +54,111 @@ | +- VariableOrConstantDeclarator[@CanonicalImage = "L_NUMBER_TWO NUMBER(2) := ROUND", @Image = "l_number_two NUMBER(2) := ROUND"] | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_NUMBER_TWO", @Image = "l_number_two"] | | +- ID[@CanonicalImage = "L_NUMBER_TWO", @Image = "l_number_two"] +Added line: 6720 | +- Datatype[@CanonicalImage = "NUMBER(2)", @Image = "NUMBER(2)", @TypeImage = "NUMBER(2)"] | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER(2)", @Image = "NUMBER(2)"] +Added line: 258 | | +- NumericLiteral[@CanonicalImage = "2", @Image = "2"] | +- VariableOrConstantInitializer[@CanonicalImage = "ROUND", @Image = "ROUND"] | +- Expression[@CanonicalImage = "ROUND", @Image = "ROUND"] | +- PrimaryPrefix[@CanonicalImage = "ROUND", @Image = "ROUND", @SelfModifier = false] +Added line: 1549 | +- FunctionCall[@CanonicalImage = "ROUND", @Image = "ROUND"] | +- FunctionName[@CanonicalImage = "ROUND", @Image = "ROUND"] | | +- ID[@CanonicalImage = "ROUND", @Image = "ROUND"] | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | +- ArgumentList[@CanonicalImage = null] | +- Argument[@CanonicalImage = null] +Added line: 4450 | +- Expression[@CanonicalImage = "DBMS_RANDOM.VALUE", @Image = "DBMS_RANDOM.Value"] | +- PrimaryPrefix[@CanonicalImage = "DBMS_RANDOM.VALUE", @Image = "DBMS_RANDOM.Value", @SelfModifier = false] | +- FunctionCall[@CanonicalImage = "DBMS_RANDOM.VALUE", @Image = "DBMS_RANDOM.Value"] | +- FunctionName[@CanonicalImage = "DBMS_RANDOM.VALUE", @Image = "DBMS_RANDOM.Value"] +Added line: 7936 | | +- ID[@CanonicalImage = "DBMS_RANDOM", @Image = "DBMS_RANDOM"] | | +- ID[@CanonicalImage = "VALUE", @Image = "Value"] +Added line: 5343 +Added line: 8134 | +- Arguments[@ArgumentCount = 2, @CanonicalImage = null] | +- ArgumentList[@CanonicalImage = null] | +- Argument[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "1", @Image = "1"] | | +- PrimaryPrefix[@CanonicalImage = "1", @Image = "1", @SelfModifier = false] - | | +- Literal[@CanonicalImage = "1", @Image = "1"] +Added line: 5521 +Added line: 6788 +Added line: 1219 +Added line: 2361 | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"] | +- Argument[@CanonicalImage = null] | +- Expression[@CanonicalImage = "10", @Image = "10"] +Added line: 9100 | +- PrimaryPrefix[@CanonicalImage = "10", @Image = "10", @SelfModifier = false] +Added line: 7875 | +- Literal[@CanonicalImage = "10", @Image = "10"] | +- NumericLiteral[@CanonicalImage = "10", @Image = "10"] +- TriggerTimingPointSection[@CanonicalImage = "BEFORE ROW", @Image = "BEFORE ROW", @MethodName = "BEFORE ROW", @Name = "BEFORE ROW"] +Added line: 3435 | +- DeclarativeSection[@CanonicalImage = null] | | +- DeclarativeUnit[@CanonicalImage = null] | | +- VariableOrConstantDeclaration[@CanonicalImage = null] | | +- VariableOrConstantDeclarator[@CanonicalImage = "L_TOT_NUMBERS NUMBER(2)", @Image = "l_tot_numbers NUMBER(2)"] | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_TOT_NUMBERS", @Image = "l_tot_numbers"] +Added line: 508 | | | +- ID[@CanonicalImage = "L_TOT_NUMBERS", @Image = "l_tot_numbers"] | | +- Datatype[@CanonicalImage = "NUMBER(2)", @Image = "NUMBER(2)", @TypeImage = "NUMBER(2)"] | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER(2)", @Image = "NUMBER(2)"] | | +- NumericLiteral[@CanonicalImage = "2", @Image = "2"] +Added line: 3805 | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 3987 | | +- Expression[@CanonicalImage = "L_TOT_NUMBERS := L_NUMBER_ONE + L_NUMBER_TWO", @Image = "l_tot_numbers := l_number_one + l_number_two"] | | +- Assignment[@CanonicalImage = "L_TOT_NUMBERS := L_NUMBER_ONE + L_NUMBER_TWO", @Image = "l_tot_numbers := l_number_one + l_number_two"] | | +- PrimaryPrefix[@CanonicalImage = "L_TOT_NUMBERS", @Image = "l_tot_numbers", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "L_TOT_NUMBERS", @Image = "l_tot_numbers"] | | | +- Column[@CanonicalImage = "L_TOT_NUMBERS", @Image = "l_tot_numbers"] +Added line: 9438 | | | +- ID[@CanonicalImage = "L_TOT_NUMBERS", @Image = "l_tot_numbers"] +Added line: 6389 | | +- Expression[@CanonicalImage = "L_NUMBER_ONE + L_NUMBER_TWO", @Image = "l_number_one + l_number_two"] | | +- AdditiveExpression[@CanonicalImage = "L_NUMBER_ONE + L_NUMBER_TWO", @Image = "l_number_one + l_number_two"] | | +- PrimaryPrefix[@CanonicalImage = "L_NUMBER_ONE", @Image = "l_number_one", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "L_NUMBER_ONE", @Image = "l_number_one"] +Added line: 5703 | | | +- Column[@CanonicalImage = "L_NUMBER_ONE", @Image = "l_number_one"] +Added line: 9280 +Added line: 8695 | | | +- ID[@CanonicalImage = "L_NUMBER_ONE", @Image = "l_number_one"] | | +- PrimaryPrefix[@CanonicalImage = "L_NUMBER_TWO", @Image = "l_number_two", @SelfModifier = false] +Added line: 602 | | +- SimpleExpression[@CanonicalImage = "L_NUMBER_TWO", @Image = "l_number_two"] | | +- Column[@CanonicalImage = "L_NUMBER_TWO", @Image = "l_number_two"] | | +- ID[@CanonicalImage = "L_NUMBER_TWO", @Image = "l_number_two"] +Added line: 9601 | +- Statement[@CanonicalImage = null] +Added line: 7947 +Added line: 560 | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 5655 | | +- Expression[@CanonicalImage = ":NEW.COL_ONE := L_NUMBER_ONE", @Image = ":NEW.col_one := l_number_one"] +Added line: 1575 +Added line: 7859 | | +- Assignment[@CanonicalImage = ":NEW.COL_ONE := L_NUMBER_ONE", @Image = ":NEW.col_one := l_number_one"] | | +- PrimaryPrefix[@CanonicalImage = ":NEW.COL_ONE", @Image = ":NEW.col_one", @SelfModifier = false] - | | | +- SimpleExpression[@CanonicalImage = ":NEW.COL_ONE", @Image = ":NEW.col_one"] | | | +- TableName[@CanonicalImage = ":NEW", @Image = ":NEW"] | | | | +- ID[@CanonicalImage = ":NEW", @Image = ":NEW"] +Added line: 6917 | | | +- Column[@CanonicalImage = "COL_ONE", @Image = "col_one"] | | | +- ID[@CanonicalImage = "COL_ONE", @Image = "col_one"] | | +- Expression[@CanonicalImage = "L_NUMBER_ONE", @Image = "l_number_one"] | | +- PrimaryPrefix[@CanonicalImage = "L_NUMBER_ONE", @Image = "l_number_one", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "L_NUMBER_ONE", @Image = "l_number_one"] | | +- Column[@CanonicalImage = "L_NUMBER_ONE", @Image = "l_number_one"] - | | +- ID[@CanonicalImage = "L_NUMBER_ONE", @Image = "l_number_one"] +Added line: 663 | +- Statement[@CanonicalImage = null] +Added line: 310 | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 8726 | | +- Expression[@CanonicalImage = ":NEW.COL_TWO := L_NUMBER_TWO", @Image = ":NEW.col_two := l_number_two"] | | +- Assignment[@CanonicalImage = ":NEW.COL_TWO := L_NUMBER_TWO", @Image = ":NEW.col_two := l_number_two"] | | +- PrimaryPrefix[@CanonicalImage = ":NEW.COL_TWO", @Image = ":NEW.col_two", @SelfModifier = false] @@ -130,14 +169,16 @@ | | | +- ID[@CanonicalImage = "COL_TWO", @Image = "col_two"] | | +- Expression[@CanonicalImage = "L_NUMBER_TWO", @Image = "l_number_two"] | | +- PrimaryPrefix[@CanonicalImage = "L_NUMBER_TWO", @Image = "l_number_two", @SelfModifier = false] +Added line: 7288 +Added line: 8533 | | +- SimpleExpression[@CanonicalImage = "L_NUMBER_TWO", @Image = "l_number_two"] +Added line: 5576 | | +- Column[@CanonicalImage = "L_NUMBER_TWO", @Image = "l_number_two"] - | | +- ID[@CanonicalImage = "L_NUMBER_TWO", @Image = "l_number_two"] +Added line: 7559 | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] | | +- Expression[@CanonicalImage = ":NEW.COL_THREE := L_TOT_NUMBERS", @Image = ":NEW.col_three := l_tot_numbers"] | | +- Assignment[@CanonicalImage = ":NEW.COL_THREE := L_TOT_NUMBERS", @Image = ":NEW.col_three := l_tot_numbers"] - | | +- PrimaryPrefix[@CanonicalImage = ":NEW.COL_THREE", @Image = ":NEW.col_three", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = ":NEW.COL_THREE", @Image = ":NEW.col_three"] | | | +- TableName[@CanonicalImage = ":NEW", @Image = ":NEW"] | | | | +- ID[@CanonicalImage = ":NEW", @Image = ":NEW"] @@ -145,99 +186,147 @@ | | | +- ID[@CanonicalImage = "COL_THREE", @Image = "col_three"] | | +- Expression[@CanonicalImage = "L_TOT_NUMBERS", @Image = "l_tot_numbers"] | | +- PrimaryPrefix[@CanonicalImage = "L_TOT_NUMBERS", @Image = "l_tot_numbers", @SelfModifier = false] +Added line: 7452 | | +- SimpleExpression[@CanonicalImage = "L_TOT_NUMBERS", @Image = "l_tot_numbers"] - | | +- Column[@CanonicalImage = "L_TOT_NUMBERS", @Image = "l_tot_numbers"] | | +- ID[@CanonicalImage = "L_TOT_NUMBERS", @Image = "l_tot_numbers"] +Added line: 3036 | +- ExceptionHandler[@CanonicalImage = null] | +- QualifiedName[@CanonicalImage = "OTHERS", @Image = "OTHERS"] | | +- UnqualifiedID[@CanonicalImage = "OTHERS", @Image = "OTHERS"] | +- Statement[@CanonicalImage = null] +Added line: 2005 | +- UnlabelledStatement[@CanonicalImage = null] | +- Expression[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] | +- PrimaryPrefix[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR", @SelfModifier = false] - | +- FunctionCall[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] | +- FunctionName[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] +Added line: 123 | | +- ID[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] +Added line: 8447 +Added line: 1832 | +- Arguments[@ArgumentCount = 2, @CanonicalImage = null] | +- ArgumentList[@CanonicalImage = null] | +- Argument[@CanonicalImage = null] +Added line: 7323 | | +- Expression[@CanonicalImage = "-20001", @Image = " -20001"] | | +- PrimaryPrefix[@CanonicalImage = "20001", @Image = "20001", @SelfModifier = false] | | +- Literal[@CanonicalImage = "20001", @Image = "20001"] | | +- NumericLiteral[@CanonicalImage = "20001", @Image = "20001"] | +- Argument[@CanonicalImage = null] +Added line: 2117 +Added line: 1438 | +- Expression[@CanonicalImage = "\'ERROR AT EXAMPLE_TRIGGER - BEFORE EACH ROW\' || CHR || SQLERRM", @Image = "\'ERROR AT EXAMPLE_TRIGGER - BEFORE EACH ROW\' || CHR || SQLERRM"] | +- AdditiveExpression[@CanonicalImage = "\'ERROR AT EXAMPLE_TRIGGER - BEFORE EACH ROW\' || CHR || SQLERRM", @Image = "\'ERROR AT EXAMPLE_TRIGGER - BEFORE EACH ROW\' || CHR || SQLERRM"] | +- PrimaryPrefix[@CanonicalImage = "\'ERROR AT EXAMPLE_TRIGGER - BEFORE EACH ROW\'", @Image = "\'ERROR AT EXAMPLE_TRIGGER - BEFORE EACH ROW\'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'ERROR AT EXAMPLE_TRIGGER - BEFORE EACH ROW\'", @Image = "\'ERROR AT EXAMPLE_TRIGGER - BEFORE EACH ROW\'"] | | +- StringLiteral[@CanonicalImage = "\'ERROR AT EXAMPLE_TRIGGER - BEFORE EACH ROW\'", @Image = "\'ERROR AT EXAMPLE_TRIGGER - BEFORE EACH ROW\'", @String = "ERROR AT EXAMPLE_TRIGGER - BEFORE EACH ROW"] | +- PrimaryPrefix[@CanonicalImage = "CHR", @Image = "CHR", @SelfModifier = false] +Added line: 643 | | +- FunctionCall[@CanonicalImage = "CHR", @Image = "CHR"] | | +- FunctionName[@CanonicalImage = "CHR", @Image = "CHR"] +Added line: 7271 | | | +- ID[@CanonicalImage = "CHR", @Image = "CHR"] +Added line: 2173 | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | +- ArgumentList[@CanonicalImage = null] +Added line: 4417 | | +- Argument[@CanonicalImage = null] +Added line: 9133 +Added line: 8582 | | +- Expression[@CanonicalImage = "10", @Image = "10"] | | +- PrimaryPrefix[@CanonicalImage = "10", @Image = "10", @SelfModifier = false] +Added line: 7989 | | +- Literal[@CanonicalImage = "10", @Image = "10"] | | +- NumericLiteral[@CanonicalImage = "10", @Image = "10"] +Added line: 9793 | +- PrimaryPrefix[@CanonicalImage = "SQLERRM", @Image = "SQLERRM", @SelfModifier = false] +Added line: 8262 | +- SimpleExpression[@CanonicalImage = "SQLERRM", @Image = "SQLERRM"] +Added line: 6632 +Added line: 8553 | +- Column[@CanonicalImage = "SQLERRM", @Image = "SQLERRM"] - | +- ID[@CanonicalImage = "SQLERRM", @Image = "SQLERRM"] +- TriggerTimingPointSection[@CanonicalImage = "AFTER STATEMENT", @Image = "AFTER STATEMENT", @MethodName = "AFTER STATEMENT", @Name = "AFTER STATEMENT"] | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | +- PrimaryPrefix[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line", @SelfModifier = false] +Added line: 9279 | | +- FunctionCall[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | +- FunctionName[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | | +- ID[@CanonicalImage = "DBMS_OUTPUT", @Image = "DBMS_OUTPUT"] | | | +- ID[@CanonicalImage = "PUT_LINE", @Image = "Put_Line"] +Added line: 7960 | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | +- ArgumentList[@CanonicalImage = null] | | +- Argument[@CanonicalImage = null] +Added line: 6833 | | +- Expression[@CanonicalImage = "\'THIS IS JUST AN EXAMPLE!\'", @Image = "\'This is just an example!\'"] +Added line: 6042 +Added line: 1462 | | +- PrimaryPrefix[@CanonicalImage = "\'THIS IS JUST AN EXAMPLE!\'", @Image = "\'This is just an example!\'", @SelfModifier = false] +Added line: 436 | | +- Literal[@CanonicalImage = "\'THIS IS JUST AN EXAMPLE!\'", @Image = "\'This is just an example!\'"] +Added line: 3694 | | +- StringLiteral[@CanonicalImage = "\'THIS IS JUST AN EXAMPLE!\'", @Image = "\'This is just an example!\'", @String = "This is just an example!"] +Added line: 7835 | +- ExceptionHandler[@CanonicalImage = null] | +- QualifiedName[@CanonicalImage = "OTHERS", @Image = "OTHERS"] | | +- UnqualifiedID[@CanonicalImage = "OTHERS", @Image = "OTHERS"] | +- Statement[@CanonicalImage = null] +Added line: 6353 | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 3659 +Added line: 9596 +Added line: 9884 | +- Expression[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] +Added line: 259 | +- PrimaryPrefix[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR", @SelfModifier = false] +Added line: 6031 | +- FunctionCall[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] | +- FunctionName[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] +Added line: 820 | | +- ID[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] | +- Arguments[@ArgumentCount = 2, @CanonicalImage = null] +Added line: 6252 +Added line: 9835 +Added line: 5525 | +- ArgumentList[@CanonicalImage = null] | +- Argument[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "-20002", @Image = " -20002"] | | +- PrimaryPrefix[@CanonicalImage = "20002", @Image = "20002", @SelfModifier = false] +Added line: 7256 +Added line: 4181 | | +- Literal[@CanonicalImage = "20002", @Image = "20002"] +Added line: 7516 | | +- NumericLiteral[@CanonicalImage = "20002", @Image = "20002"] +Added line: 7638 +Added line: 1385 +Added line: 692 | +- Argument[@CanonicalImage = null] +Added line: 6543 | +- Expression[@CanonicalImage = "\'ERROR AT EXAMPLE_TRIGGER - AFTER STATEMENT\' || CHR || SQLERRM", @Image = "\'ERROR AT EXAMPLE_TRIGGER - AFTER STATEMENT\' || CHR || SQLERRM"] | +- AdditiveExpression[@CanonicalImage = "\'ERROR AT EXAMPLE_TRIGGER - AFTER STATEMENT\' || CHR || SQLERRM", @Image = "\'ERROR AT EXAMPLE_TRIGGER - AFTER STATEMENT\' || CHR || SQLERRM"] | +- PrimaryPrefix[@CanonicalImage = "\'ERROR AT EXAMPLE_TRIGGER - AFTER STATEMENT\'", @Image = "\'ERROR AT EXAMPLE_TRIGGER - AFTER STATEMENT\'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'ERROR AT EXAMPLE_TRIGGER - AFTER STATEMENT\'", @Image = "\'ERROR AT EXAMPLE_TRIGGER - AFTER STATEMENT\'"] - | | +- StringLiteral[@CanonicalImage = "\'ERROR AT EXAMPLE_TRIGGER - AFTER STATEMENT\'", @Image = "\'ERROR AT EXAMPLE_TRIGGER - AFTER STATEMENT\'", @String = "ERROR AT EXAMPLE_TRIGGER - AFTER STATEMENT"] | +- PrimaryPrefix[@CanonicalImage = "CHR", @Image = "CHR", @SelfModifier = false] | | +- FunctionCall[@CanonicalImage = "CHR", @Image = "CHR"] | | +- FunctionName[@CanonicalImage = "CHR", @Image = "CHR"] | | | +- ID[@CanonicalImage = "CHR", @Image = "CHR"] +Added line: 1579 | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] +Added line: 851 | | +- ArgumentList[@CanonicalImage = null] +Added line: 2194 +Added line: 3641 | | +- Argument[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "10", @Image = "10"] | | +- PrimaryPrefix[@CanonicalImage = "10", @Image = "10", @SelfModifier = false] | | +- Literal[@CanonicalImage = "10", @Image = "10"] | | +- NumericLiteral[@CanonicalImage = "10", @Image = "10"] +Added line: 609 +Added line: 824 | +- PrimaryPrefix[@CanonicalImage = "SQLERRM", @Image = "SQLERRM", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "SQLERRM", @Image = "SQLERRM"] | +- Column[@CanonicalImage = "SQLERRM", @Image = "SQLERRM"] | +- ID[@CanonicalImage = "SQLERRM", @Image = "SQLERRM"] +Added line: 7121 +- ID[@CanonicalImage = "EXAMPLE_TRIGGER", @Image = "EXAMPLE_TRIGGER"] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ErrorLoggingClause2779.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ErrorLoggingClause2779.txt index 634b71a7d4..b16a8a7a83 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ErrorLoggingClause2779.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ErrorLoggingClause2779.txt @@ -1,6 +1,7 @@ +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- Global[@CanonicalImage = null] +- ProgramUnit[@CanonicalImage = null, @MethodName = "test", @Name = "test", @ObjectName = null] +Added line: 8154 +- MethodDeclarator[@CanonicalImage = "TEST", @Image = "test", @ParameterCount = 1] | +- ObjectNameDeclaration[@CanonicalImage = "TEST", @Image = "test"] | +- ID[@CanonicalImage = "TEST", @Image = "test"] @@ -9,11 +10,11 @@ | +- InsertStatement[@CanonicalImage = null] | +- SingleTableInsert[@CanonicalImage = null] | +- InsertIntoClause[@CanonicalImage = null] +Added line: 4003 | | +- DMLTableExpressionClause[@CanonicalImage = null] | | +- TableName[@CanonicalImage = "RAISES", @Image = "raises"] | | +- ID[@CanonicalImage = "RAISES", @Image = "raises"] | +- QueryBlock[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] - | | +- SelectList[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "EMPLOYEE_ID", @Image = "employee_id"] | | | | +- PrimaryPrefix[@CanonicalImage = "EMPLOYEE_ID", @Image = "employee_id", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "EMPLOYEE_ID", @Image = "employee_id"] @@ -27,6 +28,7 @@ | | | | +- ID[@CanonicalImage = "SALARY", @Image = "salary"] | | | +- PrimaryPrefix[@CanonicalImage = "1.1", @Image = "1.1", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "1.1", @Image = "1.1"] +Added line: 5919 | | | +- NumericLiteral[@CanonicalImage = "1.1", @Image = "1.1"] | | +- FromClause[@CanonicalImage = null] | | | +- TableReference[@CanonicalImage = null] @@ -36,13 +38,18 @@ | | +- Condition[@CanonicalImage = null] | | +- CompoundCondition[@CanonicalImage = null, @Type = null] | | +- ComparisonCondition[@CanonicalImage = null, @Operator = ">"] +Added line: 9174 | | +- SqlExpression[@CanonicalImage = "COMMISSION_PCT", @Image = "commission_pct"] +Added line: 108 +Added line: 3143 | | | +- PrimaryPrefix[@CanonicalImage = "COMMISSION_PCT", @Image = "commission_pct", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "COMMISSION_PCT", @Image = "commission_pct"] | | | +- Column[@CanonicalImage = "COMMISSION_PCT", @Image = "commission_pct"] | | | +- ID[@CanonicalImage = "COMMISSION_PCT", @Image = "commission_pct"] +Added line: 3561 | | +- SqlExpression[@CanonicalImage = ".2", @Image = ".2"] | | +- PrimaryPrefix[@CanonicalImage = ".2", @Image = ".2", @SelfModifier = false] +Added line: 8184 | | +- Literal[@CanonicalImage = ".2", @Image = ".2"] | | +- NumericLiteral[@CanonicalImage = ".2", @Image = ".2"] | +- ErrorLoggingClause[@CanonicalImage = null] @@ -61,6 +68,7 @@ | | +- ID[@CanonicalImage = "PEOPLE_DEMO1", @Image = "people_demo1"] | +- TableAlias[@CanonicalImage = "P", @Image = "p"] | | +- ID[@CanonicalImage = "P", @Image = "p"] +Added line: 2742 | +- UpdateSetClause[@CanonicalImage = null] | | +- TableAlias[@CanonicalImage = "P", @Image = "p"] | | | +- ID[@CanonicalImage = "P", @Image = "p"] @@ -68,6 +76,7 @@ | | +- SelectList[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "VALUE", @Image = "VALUE"] | | | +- PrimaryPrefix[@CanonicalImage = "VALUE", @Image = "VALUE", @SelfModifier = false] +Added line: 8641 | | | +- FunctionCall[@CanonicalImage = "VALUE", @Image = "VALUE"] | | | +- FunctionName[@CanonicalImage = "VALUE", @Image = "VALUE"] | | | | +- ID[@CanonicalImage = "VALUE", @Image = "VALUE"] @@ -79,6 +88,7 @@ | | | +- SimpleExpression[@CanonicalImage = "Q", @Image = "q"] | | | +- Column[@CanonicalImage = "Q", @Image = "q"] | | | +- ID[@CanonicalImage = "Q", @Image = "q"] +Added line: 5910 | | +- FromClause[@CanonicalImage = null] | | | +- TableReference[@CanonicalImage = null] | | | +- TableName[@CanonicalImage = "PEOPLE_DEMO2", @Image = "people_demo2"] @@ -88,6 +98,7 @@ | | +- WhereClause[@CanonicalImage = null] | | +- Condition[@CanonicalImage = null] | | +- CompoundCondition[@CanonicalImage = null, @Type = null] +Added line: 6778 | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] | | +- SqlExpression[@CanonicalImage = "P.DEPARTMENT_ID", @Image = "p.department_id"] | | | +- PrimaryPrefix[@CanonicalImage = "P.DEPARTMENT_ID", @Image = "p.department_id", @SelfModifier = false] @@ -101,30 +112,39 @@ | | +- SimpleExpression[@CanonicalImage = "Q.DEPARTMENT_ID", @Image = "q.department_id"] | | +- TableName[@CanonicalImage = "Q", @Image = "q"] | | | +- ID[@CanonicalImage = "Q", @Image = "q"] +Added line: 17 | | +- Column[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | +- ID[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | +- WhereClause[@CanonicalImage = null] +Added line: 4233 | | +- Condition[@CanonicalImage = null] | | +- CompoundCondition[@CanonicalImage = null, @Type = null] | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] | | +- SqlExpression[@CanonicalImage = "P.DEPARTMENT_ID", @Image = "p.department_id"] | | | +- PrimaryPrefix[@CanonicalImage = "P.DEPARTMENT_ID", @Image = "p.department_id", @SelfModifier = false] +Added line: 1984 | | | +- SimpleExpression[@CanonicalImage = "P.DEPARTMENT_ID", @Image = "p.department_id"] | | | +- TableName[@CanonicalImage = "P", @Image = "p"] +Added line: 4896 | | | | +- ID[@CanonicalImage = "P", @Image = "p"] +Added line: 9395 | | | +- Column[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | +- ID[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | +- SqlExpression[@CanonicalImage = "10", @Image = "10"] | | +- PrimaryPrefix[@CanonicalImage = "10", @Image = "10", @SelfModifier = false] | | +- Literal[@CanonicalImage = "10", @Image = "10"] | | +- NumericLiteral[@CanonicalImage = "10", @Image = "10"] +Added line: 1745 | +- ErrorLoggingClause[@CanonicalImage = null] +Added line: 359 | +- TableName[@CanonicalImage = "ERRLOG", @Image = "errlog"] | | +- ID[@CanonicalImage = "ERRLOG", @Image = "errlog"] | +- SqlExpression[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] | | +- PrimaryPrefix[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] | | +- StringLiteral[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'", @String = "my_bad"] +Added line: 8360 +Added line: 5318 | +- NumericLiteral[@CanonicalImage = "10", @Image = "10"] +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] @@ -133,6 +153,8 @@ | | +- TableName[@CanonicalImage = "TEST_TABLE", @Image = "test_table"] | | | +- ID[@CanonicalImage = "TEST_TABLE", @Image = "test_table"] | | +- TableAlias[@CanonicalImage = "TALIAS", @Image = "talias"] +Added line: 1156 +Added line: 6396 | | +- ID[@CanonicalImage = "TALIAS", @Image = "talias"] | +- ErrorLoggingClause[@CanonicalImage = null] | +- TableName[@CanonicalImage = "ERR$_TEST_TABLE", @Image = "err$_test_table"] @@ -153,16 +175,21 @@ | +- ConditionalInsertClause[@CanonicalImage = null] | | +- Condition[@CanonicalImage = null] | | | +- CompoundCondition[@CanonicalImage = null, @Type = null] +Added line: 993 | | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "<="] | | | +- SqlExpression[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | | +- PrimaryPrefix[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total", @SelfModifier = false] +Added line: 2944 | | | | +- SimpleExpression[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | | +- Column[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | | +- ID[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] +Added line: 4931 | | | +- SqlExpression[@CanonicalImage = "100000", @Image = "100000"] | | | +- PrimaryPrefix[@CanonicalImage = "100000", @Image = "100000", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "100000", @Image = "100000"] +Added line: 8563 | | | +- NumericLiteral[@CanonicalImage = "100000", @Image = "100000"] +Added line: 592 | | +- InsertIntoClause[@CanonicalImage = null] | | | +- DMLTableExpressionClause[@CanonicalImage = null] | | | +- TableName[@CanonicalImage = "SMALL_ORDERS", @Image = "small_orders"] @@ -172,48 +199,58 @@ | | | | +- ID[@CanonicalImage = "ERRLOG", @Image = "errlog"] | | | +- SqlExpression[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] | | | | +- PrimaryPrefix[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'", @SelfModifier = false] +Added line: 5367 | | | | +- Literal[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] - | | | | +- StringLiteral[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'", @String = "my_bad"] | | | +- NumericLiteral[@CanonicalImage = "10", @Image = "10"] | | +- Condition[@CanonicalImage = null] | | | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"] - | | | +- ComparisonCondition[@CanonicalImage = null, @Operator = ">"] | | | | +- SqlExpression[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | | | +- PrimaryPrefix[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total", @SelfModifier = false] | | | | | +- SimpleExpression[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | | | +- Column[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | | | +- ID[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] +Added line: 5512 | | | | +- SqlExpression[@CanonicalImage = "1000000", @Image = "1000000"] | | | | +- PrimaryPrefix[@CanonicalImage = "1000000", @Image = "1000000", @SelfModifier = false] | | | | +- Literal[@CanonicalImage = "1000000", @Image = "1000000"] | | | | +- NumericLiteral[@CanonicalImage = "1000000", @Image = "1000000"] | | | +- Condition[@CanonicalImage = null] +Added line: 8994 | | | +- CompoundCondition[@CanonicalImage = null, @Type = null] +Added line: 5310 | | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "<="] +Added line: 376 | | | +- SqlExpression[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | | +- PrimaryPrefix[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | | +- Column[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | | +- ID[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | +- SqlExpression[@CanonicalImage = "200000", @Image = "200000"] +Added line: 7875 | | | +- PrimaryPrefix[@CanonicalImage = "200000", @Image = "200000", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "200000", @Image = "200000"] | | | +- NumericLiteral[@CanonicalImage = "200000", @Image = "200000"] | | +- InsertIntoClause[@CanonicalImage = null] +Added line: 2292 | | | +- DMLTableExpressionClause[@CanonicalImage = null] +Added line: 6931 +Added line: 5674 | | | +- TableName[@CanonicalImage = "MEDIUM_ORDERS", @Image = "medium_orders"] | | | +- ID[@CanonicalImage = "MEDIUM_ORDERS", @Image = "medium_orders"] +Added line: 7664 | | +- ErrorLoggingClause[@CanonicalImage = null] | | | +- TableName[@CanonicalImage = "ERRLOG", @Image = "errlog"] | | | | +- ID[@CanonicalImage = "ERRLOG", @Image = "errlog"] | | | +- SqlExpression[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] | | | | +- PrimaryPrefix[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'", @SelfModifier = false] | | | | +- Literal[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] +Added line: 5982 | | | | +- StringLiteral[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'", @String = "my_bad"] | | | +- NumericLiteral[@CanonicalImage = "10", @Image = "10"] | | +- Condition[@CanonicalImage = null] | | | +- CompoundCondition[@CanonicalImage = null, @Type = null] | | | +- ComparisonCondition[@CanonicalImage = null, @Operator = ">"] +Added line: 766 | | | +- SqlExpression[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | | +- PrimaryPrefix[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] @@ -225,6 +262,7 @@ | | | +- NumericLiteral[@CanonicalImage = "200000", @Image = "200000"] | | +- InsertIntoClause[@CanonicalImage = null] | | | +- DMLTableExpressionClause[@CanonicalImage = null] +Added line: 9706 | | | +- TableName[@CanonicalImage = "LARGE_ORDERS", @Image = "large_orders"] | | | +- ID[@CanonicalImage = "LARGE_ORDERS", @Image = "large_orders"] | | +- InsertIntoClause[@CanonicalImage = null] @@ -233,7 +271,7 @@ | | | +- ID[@CanonicalImage = "OTHER_ORDERS", @Image = "other_orders"] | | +- ErrorLoggingClause[@CanonicalImage = null] | | +- TableName[@CanonicalImage = "ERRLOG", @Image = "errlog"] - | | | +- ID[@CanonicalImage = "ERRLOG", @Image = "errlog"] +Added line: 2563 | | +- SqlExpression[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] | | | +- PrimaryPrefix[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] @@ -245,29 +283,35 @@ | | | +- PrimaryPrefix[@CanonicalImage = "ORDER_ID", @Image = "order_id", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "ORDER_ID", @Image = "order_id"] | | | +- Column[@CanonicalImage = "ORDER_ID", @Image = "order_id"] +Added line: 9569 | | | +- ID[@CanonicalImage = "ORDER_ID", @Image = "order_id"] | | +- SqlExpression[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | +- PrimaryPrefix[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | +- Column[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] | | | +- ID[@CanonicalImage = "ORDER_TOTAL", @Image = "order_total"] +Added line: 2685 | | +- SqlExpression[@CanonicalImage = "SALES_REP_ID", @Image = "sales_rep_id"] | | | +- PrimaryPrefix[@CanonicalImage = "SALES_REP_ID", @Image = "sales_rep_id", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "SALES_REP_ID", @Image = "sales_rep_id"] | | | +- Column[@CanonicalImage = "SALES_REP_ID", @Image = "sales_rep_id"] +Added line: 2749 | | | +- ID[@CanonicalImage = "SALES_REP_ID", @Image = "sales_rep_id"] | | +- SqlExpression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | | +- PrimaryPrefix[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id", @SelfModifier = false] +Added line: 359 | | +- SimpleExpression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] - | | +- Column[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | | +- ID[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | +- FromClause[@CanonicalImage = null] | +- TableReference[@CanonicalImage = null] | +- TableName[@CanonicalImage = "ORDERS", @Image = "orders"] | +- ID[@CanonicalImage = "ORDERS", @Image = "orders"] +Added line: 2211 +Added line: 100 +- Statement[@CanonicalImage = null] +- UnlabelledStatement[@CanonicalImage = null] +- InsertStatement[@CanonicalImage = null] +Added line: 8262 +- MultiTableInsert[@CanonicalImage = null] +- InsertIntoClause[@CanonicalImage = null] | +- DMLTableExpressionClause[@CanonicalImage = null] @@ -278,6 +322,7 @@ | +- Column[@CanonicalImage = "CUST_ID", @Image = "cust_id"] | | +- ID[@CanonicalImage = "CUST_ID", @Image = "cust_id"] | +- Column[@CanonicalImage = "TIME_ID", @Image = "time_id"] +Added line: 764 | | +- ID[@CanonicalImage = "TIME_ID", @Image = "time_id"] | +- Column[@CanonicalImage = "AMOUNT", @Image = "amount"] | +- ID[@CanonicalImage = "AMOUNT", @Image = "amount"] @@ -292,6 +337,8 @@ | | +- SimpleExpression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | | +- Column[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | | +- ID[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] +Added line: 6700 +Added line: 1265 | +- Expression[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] | | +- PrimaryPrefix[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] @@ -299,6 +346,7 @@ | | +- ID[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] | +- Expression[@CanonicalImage = "SALES_SUN", @Image = "sales_sun"] | +- PrimaryPrefix[@CanonicalImage = "SALES_SUN", @Image = "sales_sun", @SelfModifier = false] +Added line: 1969 | +- SimpleExpression[@CanonicalImage = "SALES_SUN", @Image = "sales_sun"] | +- Column[@CanonicalImage = "SALES_SUN", @Image = "sales_sun"] | +- ID[@CanonicalImage = "SALES_SUN", @Image = "sales_sun"] @@ -307,6 +355,8 @@ | | +- ID[@CanonicalImage = "ERRLOG", @Image = "errlog"] | +- SqlExpression[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] | | +- PrimaryPrefix[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'", @SelfModifier = false] +Added line: 3310 +Added line: 5788 | | +- Literal[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] | | +- StringLiteral[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'", @String = "my_bad"] | +- NumericLiteral[@CanonicalImage = "10", @Image = "10"] @@ -316,16 +366,21 @@ | | +- ID[@CanonicalImage = "SALES", @Image = "sales"] | +- Column[@CanonicalImage = "PROD_ID", @Image = "prod_id"] | | +- ID[@CanonicalImage = "PROD_ID", @Image = "prod_id"] +Added line: 3300 | +- Column[@CanonicalImage = "CUST_ID", @Image = "cust_id"] | | +- ID[@CanonicalImage = "CUST_ID", @Image = "cust_id"] +Added line: 918 | +- Column[@CanonicalImage = "TIME_ID", @Image = "time_id"] | | +- ID[@CanonicalImage = "TIME_ID", @Image = "time_id"] | +- Column[@CanonicalImage = "AMOUNT", @Image = "amount"] +Added line: 3063 | +- ID[@CanonicalImage = "AMOUNT", @Image = "amount"] +- ValuesClause[@CanonicalImage = null] | +- Expression[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] +Added line: 3885 | | +- PrimaryPrefix[@CanonicalImage = "PRODUCT_ID", @Image = "product_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] +Added line: 315 | | +- Column[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] | | +- ID[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] | +- Expression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] @@ -338,6 +393,8 @@ | | +- PrimaryPrefix[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] | | | +- Column[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] +Added line: 2227 +Added line: 7857 | | | +- ID[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] | | +- PrimaryPrefix[@CanonicalImage = "1", @Image = "1", @SelfModifier = false] | | +- Literal[@CanonicalImage = "1", @Image = "1"] @@ -353,12 +410,14 @@ | +- SqlExpression[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] | | +- PrimaryPrefix[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'"] +Added line: 613 | | +- StringLiteral[@CanonicalImage = "\'MY_BAD\'", @Image = "\'my_bad\'", @String = "my_bad"] | +- NumericLiteral[@CanonicalImage = "10", @Image = "10"] +- InsertIntoClause[@CanonicalImage = null] | +- DMLTableExpressionClause[@CanonicalImage = null] | | +- TableName[@CanonicalImage = "SALES", @Image = "sales"] | | +- ID[@CanonicalImage = "SALES", @Image = "sales"] +Added line: 1652 | +- Column[@CanonicalImage = "PROD_ID", @Image = "prod_id"] | | +- ID[@CanonicalImage = "PROD_ID", @Image = "prod_id"] | +- Column[@CanonicalImage = "CUST_ID", @Image = "cust_id"] @@ -371,8 +430,14 @@ | +- Expression[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] | | +- PrimaryPrefix[@CanonicalImage = "PRODUCT_ID", @Image = "product_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] +Added line: 8837 +Added line: 4645 +Added line: 8360 +Added line: 3685 +Added line: 548 | | +- Column[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] | | +- ID[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] +Added line: 3423 | +- Expression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | | +- PrimaryPrefix[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] @@ -400,15 +465,20 @@ | | +- ID[@CanonicalImage = "PROD_ID", @Image = "prod_id"] | +- Column[@CanonicalImage = "CUST_ID", @Image = "cust_id"] | | +- ID[@CanonicalImage = "CUST_ID", @Image = "cust_id"] +Added line: 4 +Added line: 3866 | +- Column[@CanonicalImage = "TIME_ID", @Image = "time_id"] | | +- ID[@CanonicalImage = "TIME_ID", @Image = "time_id"] +Added line: 4307 | +- Column[@CanonicalImage = "AMOUNT", @Image = "amount"] | +- ID[@CanonicalImage = "AMOUNT", @Image = "amount"] +- ValuesClause[@CanonicalImage = null] | +- Expression[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] +Added line: 8018 | | +- PrimaryPrefix[@CanonicalImage = "PRODUCT_ID", @Image = "product_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] | | +- Column[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] +Added line: 5817 | | +- ID[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] | +- Expression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | | +- PrimaryPrefix[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id", @SelfModifier = false] @@ -420,15 +490,19 @@ | | +- PrimaryPrefix[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] | | | +- Column[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] +Added line: 6723 | | | +- ID[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] | | +- PrimaryPrefix[@CanonicalImage = "3", @Image = "3", @SelfModifier = false] | | +- Literal[@CanonicalImage = "3", @Image = "3"] +Added line: 9403 | | +- NumericLiteral[@CanonicalImage = "3", @Image = "3"] | +- Expression[@CanonicalImage = "SALES_WED", @Image = "sales_wed"] | +- PrimaryPrefix[@CanonicalImage = "SALES_WED", @Image = "sales_wed", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "SALES_WED", @Image = "sales_wed"] +Added line: 42 | +- Column[@CanonicalImage = "SALES_WED", @Image = "sales_wed"] | +- ID[@CanonicalImage = "SALES_WED", @Image = "sales_wed"] +Added line: 1119 +- InsertIntoClause[@CanonicalImage = null] | +- DMLTableExpressionClause[@CanonicalImage = null] | | +- TableName[@CanonicalImage = "SALES", @Image = "sales"] @@ -443,6 +517,7 @@ | +- ID[@CanonicalImage = "AMOUNT", @Image = "amount"] +- ValuesClause[@CanonicalImage = null] | +- Expression[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] +Added line: 8572 | | +- PrimaryPrefix[@CanonicalImage = "PRODUCT_ID", @Image = "product_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] | | +- Column[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] @@ -455,13 +530,16 @@ | +- Expression[@CanonicalImage = "WEEKLY_START_DATE + 4", @Image = "weekly_start_date + 4"] | | +- AdditiveExpression[@CanonicalImage = "WEEKLY_START_DATE + 4", @Image = "weekly_start_date + 4"] | | +- PrimaryPrefix[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date", @SelfModifier = false] +Added line: 1189 | | | +- SimpleExpression[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] | | | +- Column[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] | | | +- ID[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] +Added line: 1892 | | +- PrimaryPrefix[@CanonicalImage = "4", @Image = "4", @SelfModifier = false] | | +- Literal[@CanonicalImage = "4", @Image = "4"] | | +- NumericLiteral[@CanonicalImage = "4", @Image = "4"] | +- Expression[@CanonicalImage = "SALES_THU", @Image = "sales_thu"] +Added line: 1256 | +- PrimaryPrefix[@CanonicalImage = "SALES_THU", @Image = "sales_thu", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "SALES_THU", @Image = "sales_thu"] | +- Column[@CanonicalImage = "SALES_THU", @Image = "sales_thu"] @@ -476,6 +554,8 @@ | | +- ID[@CanonicalImage = "CUST_ID", @Image = "cust_id"] | +- Column[@CanonicalImage = "TIME_ID", @Image = "time_id"] | | +- ID[@CanonicalImage = "TIME_ID", @Image = "time_id"] +Added line: 232 +Added line: 1657 | +- Column[@CanonicalImage = "AMOUNT", @Image = "amount"] | +- ID[@CanonicalImage = "AMOUNT", @Image = "amount"] +- ValuesClause[@CanonicalImage = null] @@ -487,6 +567,7 @@ | +- Expression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | | +- PrimaryPrefix[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] +Added line: 2064 | | +- Column[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | | +- ID[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | +- Expression[@CanonicalImage = "WEEKLY_START_DATE + 5", @Image = "weekly_start_date + 5"] @@ -496,21 +577,24 @@ | | | +- Column[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] | | | +- ID[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] | | +- PrimaryPrefix[@CanonicalImage = "5", @Image = "5", @SelfModifier = false] +Added line: 1963 | | +- Literal[@CanonicalImage = "5", @Image = "5"] | | +- NumericLiteral[@CanonicalImage = "5", @Image = "5"] | +- Expression[@CanonicalImage = "SALES_FRI", @Image = "sales_fri"] +Added line: 6818 | +- PrimaryPrefix[@CanonicalImage = "SALES_FRI", @Image = "sales_fri", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "SALES_FRI", @Image = "sales_fri"] | +- Column[@CanonicalImage = "SALES_FRI", @Image = "sales_fri"] | +- ID[@CanonicalImage = "SALES_FRI", @Image = "sales_fri"] +Added line: 615 +- InsertIntoClause[@CanonicalImage = null] | +- DMLTableExpressionClause[@CanonicalImage = null] | | +- TableName[@CanonicalImage = "SALES", @Image = "sales"] | | +- ID[@CanonicalImage = "SALES", @Image = "sales"] | +- Column[@CanonicalImage = "PROD_ID", @Image = "prod_id"] +Added line: 279 | | +- ID[@CanonicalImage = "PROD_ID", @Image = "prod_id"] | +- Column[@CanonicalImage = "CUST_ID", @Image = "cust_id"] - | | +- ID[@CanonicalImage = "CUST_ID", @Image = "cust_id"] | +- Column[@CanonicalImage = "TIME_ID", @Image = "time_id"] | | +- ID[@CanonicalImage = "TIME_ID", @Image = "time_id"] | +- Column[@CanonicalImage = "AMOUNT", @Image = "amount"] @@ -519,8 +603,6 @@ | +- Expression[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] | | +- PrimaryPrefix[@CanonicalImage = "PRODUCT_ID", @Image = "product_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] - | | +- Column[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] - | | +- ID[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] | +- Expression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | | +- PrimaryPrefix[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] @@ -538,6 +620,7 @@ | +- Expression[@CanonicalImage = "SALES_SAT", @Image = "sales_sat"] | +- PrimaryPrefix[@CanonicalImage = "SALES_SAT", @Image = "sales_sat", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "SALES_SAT", @Image = "sales_sat"] +Added line: 9307 | +- Column[@CanonicalImage = "SALES_SAT", @Image = "sales_sat"] | +- ID[@CanonicalImage = "SALES_SAT", @Image = "sales_sat"] +- QueryBlock[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] @@ -548,9 +631,9 @@ | | +- Column[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] | | +- ID[@CanonicalImage = "PRODUCT_ID", @Image = "product_id"] | +- SqlExpression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] - | | +- PrimaryPrefix[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | | +- Column[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] +Added line: 7250 | | +- ID[@CanonicalImage = "CUSTOMER_ID", @Image = "customer_id"] | +- SqlExpression[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date"] | | +- PrimaryPrefix[@CanonicalImage = "WEEKLY_START_DATE", @Image = "weekly_start_date", @SelfModifier = false] @@ -560,18 +643,22 @@ | +- SqlExpression[@CanonicalImage = "SALES_SUN", @Image = "sales_sun"] | | +- PrimaryPrefix[@CanonicalImage = "SALES_SUN", @Image = "sales_sun", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "SALES_SUN", @Image = "sales_sun"] +Added line: 727 | | +- Column[@CanonicalImage = "SALES_SUN", @Image = "sales_sun"] | | +- ID[@CanonicalImage = "SALES_SUN", @Image = "sales_sun"] | +- SqlExpression[@CanonicalImage = "SALES_MON", @Image = "sales_mon"] | | +- PrimaryPrefix[@CanonicalImage = "SALES_MON", @Image = "sales_mon", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "SALES_MON", @Image = "sales_mon"] | | +- Column[@CanonicalImage = "SALES_MON", @Image = "sales_mon"] +Added line: 6814 | | +- ID[@CanonicalImage = "SALES_MON", @Image = "sales_mon"] | +- SqlExpression[@CanonicalImage = "SALES_TUE", @Image = "sales_tue"] | | +- PrimaryPrefix[@CanonicalImage = "SALES_TUE", @Image = "sales_tue", @SelfModifier = false] +Added line: 7389 | | +- SimpleExpression[@CanonicalImage = "SALES_TUE", @Image = "sales_tue"] | | +- Column[@CanonicalImage = "SALES_TUE", @Image = "sales_tue"] | | +- ID[@CanonicalImage = "SALES_TUE", @Image = "sales_tue"] +Added line: 9679 | +- SqlExpression[@CanonicalImage = "SALES_WED", @Image = "sales_wed"] | | +- PrimaryPrefix[@CanonicalImage = "SALES_WED", @Image = "sales_wed", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "SALES_WED", @Image = "sales_wed"] @@ -587,6 +674,7 @@ | | +- SimpleExpression[@CanonicalImage = "SALES_FRI", @Image = "sales_fri"] | | +- Column[@CanonicalImage = "SALES_FRI", @Image = "sales_fri"] | | +- ID[@CanonicalImage = "SALES_FRI", @Image = "sales_fri"] +Added line: 9709 | +- SqlExpression[@CanonicalImage = "SALES_SAT", @Image = "sales_sat"] | +- PrimaryPrefix[@CanonicalImage = "SALES_SAT", @Image = "sales_sat", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "SALES_SAT", @Image = "sales_sat"] @@ -594,5 +682,6 @@ | +- ID[@CanonicalImage = "SALES_SAT", @Image = "sales_sat"] +- FromClause[@CanonicalImage = null] +- TableReference[@CanonicalImage = null] +Added line: 7614 +- TableName[@CanonicalImage = "SALES_INPUT_TABLE", @Image = "sales_input_table"] +- ID[@CanonicalImage = "SALES_INPUT_TABLE", @Image = "sales_input_table"] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExceptionHandlerTomKytesDespair.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExceptionHandlerTomKytesDespair.txt index 66ce023715..49754f49aa 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExceptionHandlerTomKytesDespair.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExceptionHandlerTomKytesDespair.txt @@ -2,55 +2,81 @@ Added line: 5194 +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- ObjectNameDeclaration[@CanonicalImage = "UPDATE_PLANNED_HRS", @Image = "update_planned_hrs"] | +- ID[@CanonicalImage = "UPDATE_PLANNED_HRS", @Image = "update_planned_hrs"] +Added line: 9913 +- DeclarativeSection[@CanonicalImage = null] - | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 8888 | | +- ProgramUnit[@CanonicalImage = null, @MethodName = "set_new_planned", @Name = "set_new_planned", @ObjectName = null] | | +- MethodDeclarator[@CanonicalImage = "SET_NEW_PLANNED", @Image = "set_new_planned", @ParameterCount = 1] | | | +- ObjectNameDeclaration[@CanonicalImage = "SET_NEW_PLANNED", @Image = "set_new_planned"] | | | | +- ID[@CanonicalImage = "SET_NEW_PLANNED", @Image = "set_new_planned"] +Added line: 501 +Added line: 436 | | | +- FormalParameters[@CanonicalImage = "(P_EMP_ID,P_PROJECT_ID,P_HOURS)", @Image = "(p_emp_id,p_project_id,p_hours)"] +Added line: 6195 | | | +- FormalParameter[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id", @In = true, @NoCopy = false, @Out = false] | | | | +- ID[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id"] | | | | +- Datatype[@CanonicalImage = "NUMBER", @Image = "NUMBER", @TypeImage = "NUMBER"] +Added line: 7942 +Added line: 1566 +Added line: 8490 | | | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER", @Image = "NUMBER"] +Added line: 8812 | | | +- FormalParameter[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id", @In = true, @NoCopy = false, @Out = false] +Added line: 7424 +Added line: 1789 | | | | +- ID[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id"] | | | | +- Datatype[@CanonicalImage = "NUMBER", @Image = "NUMBER", @TypeImage = "NUMBER"] | | | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER", @Image = "NUMBER"] +Added line: 2254 | | | +- FormalParameter[@CanonicalImage = "P_HOURS", @Image = "p_hours", @In = true, @NoCopy = false, @Out = false] | | | +- ID[@CanonicalImage = "P_HOURS", @Image = "p_hours"] | | | +- Datatype[@CanonicalImage = "NUMBER", @Image = "NUMBER", @TypeImage = "NUMBER"] | | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER", @Image = "NUMBER"] | | +- Statement[@CanonicalImage = null] | | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 6048 | | | +- UpdateStatement[@CanonicalImage = null] +Added line: 9471 +Added line: 5110 | | | +- DMLTableExpressionClause[@CanonicalImage = null] | | | | +- TableName[@CanonicalImage = "EMPLOYEE_ON_ACTIVITY", @Image = "employee_on_activity"] | | | | +- ID[@CanonicalImage = "EMPLOYEE_ON_ACTIVITY", @Image = "employee_on_activity"] | | | +- TableAlias[@CanonicalImage = "EA", @Image = "ea"] | | | | +- ID[@CanonicalImage = "EA", @Image = "ea"] | | | +- UpdateSetClause[@CanonicalImage = null] +Added line: 2094 +Added line: 644 | | | | +- TableName[@CanonicalImage = "EA", @Image = "ea"] | | | | | +- ID[@CanonicalImage = "EA", @Image = "ea"] | | | | +- Column[@CanonicalImage = "EA_PLANNED_HOURS", @Image = "ea_planned_hours"] | | | | | +- ID[@CanonicalImage = "EA_PLANNED_HOURS", @Image = "ea_planned_hours"] - | | | | +- Expression[@CanonicalImage = "P_HOURS", @Image = "p_hours"] | | | | +- PrimaryPrefix[@CanonicalImage = "P_HOURS", @Image = "p_hours", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "P_HOURS", @Image = "p_hours"] +Added line: 737 Added line: 9687 | | | | +- Column[@CanonicalImage = "P_HOURS", @Image = "p_hours"] | | | | +- ID[@CanonicalImage = "P_HOURS", @Image = "p_hours"] - | | | +- WhereClause[@CanonicalImage = null] +Added line: 1712 +Added line: 1261 +Added line: 625 | | | +- Condition[@CanonicalImage = null] | | | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"] | | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] +Added line: 9136 | | | | +- SqlExpression[@CanonicalImage = "EA.EA_EMP_ID", @Image = "ea.ea_emp_id"] | | | | | +- PrimaryPrefix[@CanonicalImage = "EA.EA_EMP_ID", @Image = "ea.ea_emp_id", @SelfModifier = false] +Added line: 8107 +Added line: 2896 | | | | | +- SimpleExpression[@CanonicalImage = "EA.EA_EMP_ID", @Image = "ea.ea_emp_id"] | | | | | +- TableName[@CanonicalImage = "EA", @Image = "ea"] | | | | | | +- ID[@CanonicalImage = "EA", @Image = "ea"] | | | | | +- Column[@CanonicalImage = "EA_EMP_ID", @Image = "ea_emp_id"] +Added line: 9535 +Added line: 9616 | | | | | +- ID[@CanonicalImage = "EA_EMP_ID", @Image = "ea_emp_id"] +Added line: 1780 +Added line: 5252 +Added line: 3547 | | | | +- SqlExpression[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id"] | | | | +- PrimaryPrefix[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id"] @@ -60,104 +86,157 @@ Added line: 9687 | | | +- CompoundCondition[@CanonicalImage = null, @Type = null] | | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] | | | +- SqlExpression[@CanonicalImage = "EA.EA_PROJ_ID", @Image = "ea.ea_proj_id"] +Added line: 3765 | | | | +- PrimaryPrefix[@CanonicalImage = "EA.EA_PROJ_ID", @Image = "ea.ea_proj_id", @SelfModifier = false] +Added line: 7164 +Added line: 5213 | | | | +- SimpleExpression[@CanonicalImage = "EA.EA_PROJ_ID", @Image = "ea.ea_proj_id"] | | | | +- TableName[@CanonicalImage = "EA", @Image = "ea"] | | | | | +- ID[@CanonicalImage = "EA", @Image = "ea"] | | | | +- Column[@CanonicalImage = "EA_PROJ_ID", @Image = "ea_proj_id"] | | | | +- ID[@CanonicalImage = "EA_PROJ_ID", @Image = "ea_proj_id"] | | | +- SqlExpression[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id"] +Added line: 6885 +Added line: 7228 | | | +- PrimaryPrefix[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id", @SelfModifier = false] +Added line: 3173 | | | +- SimpleExpression[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id"] +Added line: 2278 | | | +- Column[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id"] | | | +- ID[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id"] +Added line: 2927 | | +- ExceptionHandler[@CanonicalImage = null] - | | | +- QualifiedName[@CanonicalImage = "NO_DATA_FOUND", @Image = "NO_DATA_FOUND"] +Added line: 8850 | | | | +- UnqualifiedID[@CanonicalImage = "NO_DATA_FOUND", @Image = "NO_DATA_FOUND"] Added line: 427 +Added line: 1174 +Added line: 9388 +Added line: 6930 | | | +- Statement[@CanonicalImage = null] +Added line: 4375 +Added line: 5361 | | | +- UnlabelledStatement[@CanonicalImage = null] | | | +- Expression[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] | | | +- PrimaryPrefix[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR", @SelfModifier = false] | | | +- FunctionCall[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] +Added line: 4851 +Added line: 1556 | | | +- FunctionName[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] | | | | +- ID[@CanonicalImage = "RAISE_APPLICATION_ERROR", @Image = "RAISE_APPLICATION_ERROR"] +Added line: 3876 | | | +- Arguments[@ArgumentCount = 2, @CanonicalImage = null] +Added line: 2553 | | | +- ArgumentList[@CanonicalImage = null] | | | +- Argument[@CanonicalImage = null] +Added line: 8507 | | | | +- Expression[@CanonicalImage = "-20100", @Image = " -20100"] | | | | +- PrimaryPrefix[@CanonicalImage = "20100", @Image = "20100", @SelfModifier = false] +Added line: 5651 +Added line: 4310 +Added line: 2527 | | | | +- Literal[@CanonicalImage = "20100", @Image = "20100"] | | | | +- NumericLiteral[@CanonicalImage = "20100", @Image = "20100"] +Added line: 7114 | | | +- Argument[@CanonicalImage = null] | | | +- Expression[@CanonicalImage = "\'NO SUCH EMPLOYEE OR PROJECT\'", @Image = "\'No such employee or project\'"] | | | +- PrimaryPrefix[@CanonicalImage = "\'NO SUCH EMPLOYEE OR PROJECT\'", @Image = "\'No such employee or project\'", @SelfModifier = false] - | | | +- Literal[@CanonicalImage = "\'NO SUCH EMPLOYEE OR PROJECT\'", @Image = "\'No such employee or project\'"] - | | | +- StringLiteral[@CanonicalImage = "\'NO SUCH EMPLOYEE OR PROJECT\'", @Image = "\'No such employee or project\'", @String = "No such employee or project"] | | +- ID[@CanonicalImage = "SET_NEW_PLANNED", @Image = "set_new_planned"] +Added line: 1885 Added line: 2948 +Added line: 9683 | +- DeclarativeUnit[@CanonicalImage = null] | +- MethodDeclarator[@CanonicalImage = "EXISTING_PLANNED", @Image = "existing_planned", @ParameterCount = 1] | | +- ObjectNameDeclaration[@CanonicalImage = "EXISTING_PLANNED", @Image = "existing_planned"] +Added line: 1263 | | | +- ID[@CanonicalImage = "EXISTING_PLANNED", @Image = "existing_planned"] | | +- FormalParameters[@CanonicalImage = "(P_EMP_ID,P_PROJECT_ID)", @Image = "(p_emp_id,p_project_id)"] - | | | +- FormalParameter[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id", @In = true, @NoCopy = false, @Out = false] | | | | +- ID[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id"] | | | | +- Datatype[@CanonicalImage = "NUMBER", @Image = "NUMBER", @TypeImage = "NUMBER"] | | | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER", @Image = "NUMBER"] | | | +- FormalParameter[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id", @In = true, @NoCopy = false, @Out = false] | | | +- ID[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id"] +Added line: 8680 +Added line: 289 | | | +- Datatype[@CanonicalImage = "NUMBER", @Image = "NUMBER", @TypeImage = "NUMBER"] | | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER", @Image = "NUMBER"] | | +- Datatype[@CanonicalImage = "NUMBER", @Image = "NUMBER", @TypeImage = "NUMBER"] | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER", @Image = "NUMBER"] | +- DeclarativeSection[@CanonicalImage = null] | | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 9455 +Added line: 4616 +Added line: 8627 | | +- VariableOrConstantDeclaration[@CanonicalImage = null] | | +- VariableOrConstantDeclarator[@CanonicalImage = "EXISTING_HOURS NUMBER(4)", @Image = "existing_hours NUMBER(4)"] Added line: 6379 | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "EXISTING_HOURS", @Image = "existing_hours"] | | | +- ID[@CanonicalImage = "EXISTING_HOURS", @Image = "existing_hours"] +Added line: 1514 | | +- Datatype[@CanonicalImage = "NUMBER(4)", @Image = "NUMBER(4)", @TypeImage = "NUMBER(4)"] +Added line: 4260 | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER(4)", @Image = "NUMBER(4)"] +Added line: 2924 | | +- NumericLiteral[@CanonicalImage = "4", @Image = "4"] | +- Statement[@CanonicalImage = null] +Added line: 571 | | +- UnlabelledStatement[@CanonicalImage = null] | | +- SelectIntoStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] +Added line: 3282 | | +- SelectList[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "EA.EA_PLANNED_HOURS", @Image = "ea.ea_planned_hours"] +Added line: 9825 | | | +- PrimaryPrefix[@CanonicalImage = "EA.EA_PLANNED_HOURS", @Image = "ea.ea_planned_hours", @SelfModifier = false] +Added line: 4918 +Added line: 2676 | | | +- SimpleExpression[@CanonicalImage = "EA.EA_PLANNED_HOURS", @Image = "ea.ea_planned_hours"] +Added line: 132 | | | +- TableName[@CanonicalImage = "EA", @Image = "ea"] +Added line: 9999 +Added line: 8108 +Added line: 2586 | | | | +- ID[@CanonicalImage = "EA", @Image = "ea"] | | | +- Column[@CanonicalImage = "EA_PLANNED_HOURS", @Image = "ea_planned_hours"] | | | +- ID[@CanonicalImage = "EA_PLANNED_HOURS", @Image = "ea_planned_hours"] +Added line: 187 +Added line: 8207 | | +- IntoClause[@CanonicalImage = null] | | | +- VariableName[@CanonicalImage = "EXISTING_HOURS", @Image = "existing_hours"] - | | | +- ID[@CanonicalImage = "EXISTING_HOURS", @Image = "existing_hours"] | | +- FromClause[@CanonicalImage = null] | | | +- TableReference[@CanonicalImage = null] +Added line: 5961 +Added line: 947 | | | +- TableName[@CanonicalImage = "EMPLOYEE_ON_ACTIVITY", @Image = "employee_on_activity"] | | | | +- ID[@CanonicalImage = "EMPLOYEE_ON_ACTIVITY", @Image = "employee_on_activity"] | | | +- TableAlias[@CanonicalImage = "EA", @Image = "ea"] Added line: 3022 | | +- WhereClause[@CanonicalImage = null] +Added line: 5848 | | +- Condition[@CanonicalImage = null] +Added line: 8346 +Added line: 324 +Added line: 3474 | | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"] | | | | +- PrimaryPrefix[@CanonicalImage = "EA.EA_EMP_ID", @Image = "ea.ea_emp_id", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "EA.EA_EMP_ID", @Image = "ea.ea_emp_id"] +Added line: 949 | | | | +- TableName[@CanonicalImage = "EA", @Image = "ea"] | | | | | +- ID[@CanonicalImage = "EA", @Image = "ea"] | | | | +- Column[@CanonicalImage = "EA_EMP_ID", @Image = "ea_emp_id"] | | | | +- ID[@CanonicalImage = "EA_EMP_ID", @Image = "ea_emp_id"] +Added line: 895 +Added line: 4651 +Added line: 1039 | | | +- SqlExpression[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id"] | | | +- PrimaryPrefix[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id", @SelfModifier = false] Added line: 6306 | | | +- SimpleExpression[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id"] | | | +- Column[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id"] | | | +- ID[@CanonicalImage = "P_EMP_ID", @Image = "p_emp_id"] +Added line: 5708 +Added line: 3782 | | +- Condition[@CanonicalImage = null] | | +- CompoundCondition[@CanonicalImage = null, @Type = null] +Added line: 6973 | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] | | +- SqlExpression[@CanonicalImage = "EA.EA_PROJ_ID", @Image = "ea.ea_proj_id"] | | | +- PrimaryPrefix[@CanonicalImage = "EA.EA_PROJ_ID", @Image = "ea.ea_proj_id", @SelfModifier = false] @@ -167,30 +246,40 @@ Added line: 6306 | | | +- Column[@CanonicalImage = "EA_PROJ_ID", @Image = "ea_proj_id"] | | | +- ID[@CanonicalImage = "EA_PROJ_ID", @Image = "ea_proj_id"] | | +- SqlExpression[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id"] +Added line: 3149 +Added line: 1567 | | +- PrimaryPrefix[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id"] +Added line: 5138 | | +- Column[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id"] +Added line: 8297 | | +- ID[@CanonicalImage = "P_PROJECT_ID", @Image = "p_project_id"] | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] | | +- ReturnStatement[@CanonicalImage = null] +Added line: 2327 | | +- Expression[@CanonicalImage = "(EXISTING_HOURS)", @Image = "(existing_hours)"] | | +- PrimaryPrefix[@CanonicalImage = "(EXISTING_HOURS)", @Image = "(existing_hours)", @SelfModifier = false] - | | +- Expression[@CanonicalImage = "EXISTING_HOURS", @Image = "existing_hours"] | | +- PrimaryPrefix[@CanonicalImage = "EXISTING_HOURS", @Image = "existing_hours", @SelfModifier = false] +Added line: 941 +Added line: 6900 | | +- SimpleExpression[@CanonicalImage = "EXISTING_HOURS", @Image = "existing_hours"] | | +- Column[@CanonicalImage = "EXISTING_HOURS", @Image = "existing_hours"] | | +- ID[@CanonicalImage = "EXISTING_HOURS", @Image = "existing_hours"] | +- ExceptionHandler[@CanonicalImage = null] +Added line: 6177 Added line: 8087 | | +- QualifiedName[@CanonicalImage = "OTHERS", @Image = "OTHERS"] | | | +- UnqualifiedID[@CanonicalImage = "OTHERS", @Image = "OTHERS"] | | +- Statement[@CanonicalImage = null] +Added line: 142 +Added line: 9812 | | +- UnlabelledStatement[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "NULL", @Image = "NULL"] Added line: 4807 | | +- PrimaryPrefix[@CanonicalImage = "NULL", @Image = "NULL", @SelfModifier = false] | | +- Literal[@CanonicalImage = "NULL", @Image = "NULL"] +Added line: 5544 | | +- NullLiteral[@CanonicalImage = "NULL", @Image = "NULL"] | +- ID[@CanonicalImage = "EXISTING_PLANNED", @Image = "existing_planned"] +- ID[@CanonicalImage = "UPDATE_PLANNED_HRS", @Image = "update_planned_hrs"] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect1.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect1.txt index 1a37b67ae3..720b727019 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect1.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect1.txt @@ -1,55 +1,144 @@ +Added line: 831 +Added line: 699 +Added line: 7863 +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +Added line: 9155 +Added line: 8574 +Added line: 1381 +Added line: 5764 +Added line: 3370 +Added line: 3990 +Added line: 4626 +Added line: 3883 +Added line: 8623 +Added line: 436 +Added line: 5568 +Added line: 3504 +- Global[@CanonicalImage = null] +Added line: 5641 +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] +Added line: 6992 +Added line: 4644 +Added line: 5529 +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] | +- ObjectNameDeclaration[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] - | +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +Added line: 9476 +Added line: 8191 +Added line: 4016 +Added line: 1079 +Added line: 6550 +- DeclarativeSection[@CanonicalImage = null] +Added line: 9325 | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 9901 | | +- SubTypeDefinition[@CanonicalImage = "T_DATA", @Image = "t_data"] +Added line: 8143 +Added line: 4189 | | +- QualifiedID[@CanonicalImage = "T_DATA", @Image = "t_data"] +Added line: 751 | | +- Datatype[@CanonicalImage = "DUAL%ROWTYPE", @Image = "dual%ROWTYPE", @TypeImage = "dual%ROWTYPE"] | | | +- QualifiedName[@CanonicalImage = "DUAL", @Image = "dual"] | | | +- UnqualifiedID[@CanonicalImage = "DUAL", @Image = "dual"] +Added line: 3796 +Added line: 9900 +Added line: 1653 +Added line: 9235 +Added line: 2526 | | +- Datatype[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER", @TypeImage = "BINARY_INTEGER"] | | +- ScalarDataTypeName[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER"] | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 6172 | | +- VariableOrConstantDeclaration[@CanonicalImage = null] +Added line: 9843 +Added line: 1525 | | +- VariableOrConstantDeclarator[@CanonicalImage = "L_DATA T_DATA", @Image = "l_data t_data"] +Added line: 9228 +Added line: 9634 | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_DATA", @Image = "l_data"] | | | +- ID[@CanonicalImage = "L_DATA", @Image = "l_data"] | | +- Datatype[@CanonicalImage = "T_DATA", @Image = "t_data", @TypeImage = "t_data"] +Added line: 2899 | | +- QualifiedName[@CanonicalImage = "T_DATA", @Image = "t_data"] +Added line: 6025 +Added line: 190 +Added line: 3984 | | +- UnqualifiedID[@CanonicalImage = "T_DATA", @Image = "t_data"] +Added line: 4413 +Added line: 670 +Added line: 8086 | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 1215 +Added line: 3950 | +- VariableOrConstantDeclaration[@CanonicalImage = null] +Added line: 5676 | +- VariableOrConstantDeclarator[@CanonicalImage = "L_SQL VARCHAR2(500)", @Image = "l_sql VARCHAR2(500)"] +Added line: 7556 | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_SQL", @Image = "l_sql"] | | +- ID[@CanonicalImage = "L_SQL", @Image = "l_sql"] +Added line: 7448 +Added line: 6769 +Added line: 2621 +Added line: 2163 | +- Datatype[@CanonicalImage = "VARCHAR2(500)", @Image = "VARCHAR2(500)", @TypeImage = "VARCHAR2(500)"] | +- ScalarDataTypeName[@CanonicalImage = "VARCHAR2(500)", @Image = "VARCHAR2(500)"] +Added line: 2146 +Added line: 7235 +Added line: 3690 +Added line: 5853 +Added line: 5218 +Added line: 9233 +Added line: 1535 | +- NumericLiteral[@CanonicalImage = "500", @Image = "500"] +Added line: 6482 +- Statement[@CanonicalImage = null] +Added line: 2584 | +- UnlabelledStatement[@CanonicalImage = null] | +- Expression[@CanonicalImage = "L_SQL := \'SELECT * FROM DUAL\'", @Image = "l_sql := \'SELECT * FROM DUAL\'"] +Added line: 794 +Added line: 3846 | +- Assignment[@CanonicalImage = "L_SQL := \'SELECT * FROM DUAL\'", @Image = "l_sql := \'SELECT * FROM DUAL\'"] | +- PrimaryPrefix[@CanonicalImage = "L_SQL", @Image = "l_sql", @SelfModifier = false] +Added line: 6798 | | +- SimpleExpression[@CanonicalImage = "L_SQL", @Image = "l_sql"] +Added line: 2588 +Added line: 7088 | | +- Column[@CanonicalImage = "L_SQL", @Image = "l_sql"] +Added line: 3178 +Added line: 6506 | | +- ID[@CanonicalImage = "L_SQL", @Image = "l_sql"] +Added line: 3720 | +- Expression[@CanonicalImage = "\'SELECT * FROM DUAL\'", @Image = "\'SELECT * FROM DUAL\'"] +Added line: 4091 | +- PrimaryPrefix[@CanonicalImage = "\'SELECT * FROM DUAL\'", @Image = "\'SELECT * FROM DUAL\'", @SelfModifier = false] +Added line: 6866 +Added line: 3251 +Added line: 4720 | +- Literal[@CanonicalImage = "\'SELECT * FROM DUAL\'", @Image = "\'SELECT * FROM DUAL\'"] +Added line: 9878 +Added line: 925 +Added line: 7439 +Added line: 5413 +Added line: 7982 | +- StringLiteral[@CanonicalImage = "\'SELECT * FROM DUAL\'", @Image = "\'SELECT * FROM DUAL\'", @String = "SELECT * FROM DUAL"] +Added line: 1316 +Added line: 9256 +Added line: 1687 +- Statement[@CanonicalImage = null] +Added line: 9170 | +- UnlabelledStatement[@CanonicalImage = null] - | +- EmbeddedSqlStatement[@CanonicalImage = null] +Added line: 5605 | +- StringExpression[@CanonicalImage = "L_SQL", @Image = "l_sql"] - | | +- PrimaryPrefix[@CanonicalImage = "L_SQL", @Image = "l_sql", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "L_SQL", @Image = "l_sql"] +Added line: 6428 +Added line: 7165 | | +- Column[@CanonicalImage = "L_SQL", @Image = "l_sql"] +Added line: 6119 | | +- ID[@CanonicalImage = "L_SQL", @Image = "l_sql"] | +- BulkCollectIntoClause[@CanonicalImage = null] +Added line: 2094 +Added line: 3906 +Added line: 2891 | +- CollectionName[@CanonicalImage = "L_DATA", @Image = "l_data"] +Added line: 232 | +- ID[@CanonicalImage = "L_DATA", @Image = "l_data"] +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect2.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect2.txt index 6864c8b811..e2282c85af 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect2.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect2.txt @@ -1,23 +1,41 @@ +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- Global[@CanonicalImage = null] +Added line: 8872 +Added line: 4761 +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] +Added line: 7672 +Added line: 9909 +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] | +- ObjectNameDeclaration[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +Added line: 8202 | +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +- DeclarativeSection[@CanonicalImage = null] | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 3939 | | +- SubTypeDefinition[@CanonicalImage = "T_DATA_KEY", @Image = "t_data_key"] | | +- QualifiedID[@CanonicalImage = "T_DATA_KEY", @Image = "t_data_key"] +Added line: 3442 +Added line: 6956 +Added line: 2023 | | +- Datatype[@CanonicalImage = "NUMBER", @Image = "NUMBER", @TypeImage = "NUMBER"] +Added line: 1642 | | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER", @Image = "NUMBER"] +Added line: 7573 +Added line: 1729 +Added line: 854 +Added line: 5997 | | +- Datatype[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER", @TypeImage = "BINARY_INTEGER"] +Added line: 6606 | | +- ScalarDataTypeName[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER"] | +- DeclarativeUnit[@CanonicalImage = null] | | +- SubTypeDefinition[@CanonicalImage = "T_DATA_DESCRIPTION", @Image = "t_data_description"] +Added line: 1494 +Added line: 5725 | | +- QualifiedID[@CanonicalImage = "T_DATA_DESCRIPTION", @Image = "t_data_description"] | | +- Datatype[@CanonicalImage = "VARCHAR2(100)", @Image = "VARCHAR2(100)", @TypeImage = "VARCHAR2(100)"] | | | +- ScalarDataTypeName[@CanonicalImage = "VARCHAR2(100)", @Image = "VARCHAR2(100)"] | | | +- NumericLiteral[@CanonicalImage = "100", @Image = "100"] +Added line: 8849 | | +- Datatype[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER", @TypeImage = "BINARY_INTEGER"] | | +- ScalarDataTypeName[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER"] | +- DeclarativeUnit[@CanonicalImage = null] @@ -28,6 +46,8 @@ | | +- Datatype[@CanonicalImage = "T_DATA_KEY", @Image = "t_data_key", @TypeImage = "t_data_key"] | | +- QualifiedName[@CanonicalImage = "T_DATA_KEY", @Image = "t_data_key"] | | +- UnqualifiedID[@CanonicalImage = "T_DATA_KEY", @Image = "t_data_key"] +Added line: 9723 +Added line: 9010 | +- DeclarativeUnit[@CanonicalImage = null] | | +- VariableOrConstantDeclaration[@CanonicalImage = null] | | +- VariableOrConstantDeclarator[@CanonicalImage = "L_DATA_DESCRIPTION T_DATA_DESCRIPTION", @Image = "l_data_description t_data_description"] @@ -36,22 +56,36 @@ | | +- Datatype[@CanonicalImage = "T_DATA_DESCRIPTION", @Image = "t_data_description", @TypeImage = "t_data_description"] | | +- QualifiedName[@CanonicalImage = "T_DATA_DESCRIPTION", @Image = "t_data_description"] | | +- UnqualifiedID[@CanonicalImage = "T_DATA_DESCRIPTION", @Image = "t_data_description"] +Added line: 3578 +Added line: 6312 | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 6529 +Added line: 7193 +Added line: 7967 | | +- VariableOrConstantDeclaration[@CanonicalImage = null] | | +- VariableOrConstantDeclarator[@CanonicalImage = "L_SQL VARCHAR2(500)", @Image = "l_sql VARCHAR2(500)"] +Added line: 8663 +Added line: 2223 | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_SQL", @Image = "l_sql"] | | | +- ID[@CanonicalImage = "L_SQL", @Image = "l_sql"] +Added line: 350 | | +- Datatype[@CanonicalImage = "VARCHAR2(500)", @Image = "VARCHAR2(500)", @TypeImage = "VARCHAR2(500)"] +Added line: 1697 | | +- ScalarDataTypeName[@CanonicalImage = "VARCHAR2(500)", @Image = "VARCHAR2(500)"] +Added line: 3912 +Added line: 268 | | +- NumericLiteral[@CanonicalImage = "500", @Image = "500"] +Added line: 5233 | +- DeclarativeUnit[@CanonicalImage = null] | | +- VariableOrConstantDeclaration[@CanonicalImage = null] | | +- VariableOrConstantDeclarator[@CanonicalImage = "P_ROWNUM1 NUMBER(20)", @Image = "p_rownum1 NUMBER(20)"] +Added line: 9348 | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "P_ROWNUM1", @Image = "p_rownum1"] | | | +- ID[@CanonicalImage = "P_ROWNUM1", @Image = "p_rownum1"] - | | +- Datatype[@CanonicalImage = "NUMBER(20)", @Image = "NUMBER(20)", @TypeImage = "NUMBER(20)"] | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER(20)", @Image = "NUMBER(20)"] | | +- NumericLiteral[@CanonicalImage = "20", @Image = "20"] +Added line: 6864 +Added line: 213 | +- DeclarativeUnit[@CanonicalImage = null] | +- VariableOrConstantDeclaration[@CanonicalImage = null] | +- VariableOrConstantDeclarator[@CanonicalImage = "P_ROWNUM2 NUMBER(20)", @Image = "p_rownum2 NUMBER(20)"] @@ -62,25 +96,37 @@ | +- NumericLiteral[@CanonicalImage = "20", @Image = "20"] +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 9204 | +- Expression[@CanonicalImage = "P_ROWNUM1 := 10", @Image = "p_rownum1 := 10"] +Added line: 4221 +Added line: 8426 +Added line: 1618 +Added line: 4734 | +- Assignment[@CanonicalImage = "P_ROWNUM1 := 10", @Image = "p_rownum1 := 10"] | +- PrimaryPrefix[@CanonicalImage = "P_ROWNUM1", @Image = "p_rownum1", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "P_ROWNUM1", @Image = "p_rownum1"] - | | +- Column[@CanonicalImage = "P_ROWNUM1", @Image = "p_rownum1"] | | +- ID[@CanonicalImage = "P_ROWNUM1", @Image = "p_rownum1"] +Added line: 9525 +Added line: 3333 | +- Expression[@CanonicalImage = "10", @Image = "10"] | +- PrimaryPrefix[@CanonicalImage = "10", @Image = "10", @SelfModifier = false] | +- Literal[@CanonicalImage = "10", @Image = "10"] - | +- NumericLiteral[@CanonicalImage = "10", @Image = "10"] +Added line: 1770 +- Statement[@CanonicalImage = null] +Added line: 8037 | +- UnlabelledStatement[@CanonicalImage = null] - | +- Expression[@CanonicalImage = "P_ROWNUM2 := 30", @Image = "p_rownum2 := 30"] +Added line: 8222 | +- Assignment[@CanonicalImage = "P_ROWNUM2 := 30", @Image = "p_rownum2 := 30"] | +- PrimaryPrefix[@CanonicalImage = "P_ROWNUM2", @Image = "p_rownum2", @SelfModifier = false] +Added line: 9029 +Added line: 5514 +Added line: 2668 +Added line: 6212 | | +- SimpleExpression[@CanonicalImage = "P_ROWNUM2", @Image = "p_rownum2"] +Added line: 6672 | | +- Column[@CanonicalImage = "P_ROWNUM2", @Image = "p_rownum2"] - | | +- ID[@CanonicalImage = "P_ROWNUM2", @Image = "p_rownum2"] | +- Expression[@CanonicalImage = "30", @Image = "30"] +Added line: 3235 | +- PrimaryPrefix[@CanonicalImage = "30", @Image = "30", @SelfModifier = false] | +- Literal[@CanonicalImage = "30", @Image = "30"] | +- NumericLiteral[@CanonicalImage = "30", @Image = "30"] @@ -92,31 +138,42 @@ | | +- SimpleExpression[@CanonicalImage = "L_SQL", @Image = "l_sql"] | | +- Column[@CanonicalImage = "L_SQL", @Image = "l_sql"] | | +- ID[@CanonicalImage = "L_SQL", @Image = "l_sql"] +Added line: 1683 +Added line: 9583 | +- Expression[@CanonicalImage = "\'SELECT 1, \' || CHR || \'FIRST KEY\' || CHR || \' FROM DUAL \' || \' WHERE ROWNUM <= :P_ROWNUM1 \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'SECOND KEY \' || CHR || \' FROM DUAL\' || \' WHERE ROWNUM <= :P_ROWNUM2 \'", @Image = "\'SELECT 1, \' || CHR || \'First key\' || CHR || \' FROM DUAL \' || \' WHERE ROWNUM <= :p_rownum1 \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'Second key \' || CHR || \' FROM DUAL\' || \' WHERE ROWNUM <= :p_rownum2 \'"] | +- AdditiveExpression[@CanonicalImage = "\'SELECT 1, \' || CHR || \'FIRST KEY\' || CHR || \' FROM DUAL \' || \' WHERE ROWNUM <= :P_ROWNUM1 \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'SECOND KEY \' || CHR || \' FROM DUAL\' || \' WHERE ROWNUM <= :P_ROWNUM2 \'", @Image = "\'SELECT 1, \' || CHR || \'First key\' || CHR || \' FROM DUAL \' || \' WHERE ROWNUM <= :p_rownum1 \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'Second key \' || CHR || \' FROM DUAL\' || \' WHERE ROWNUM <= :p_rownum2 \'"] | +- PrimaryPrefix[@CanonicalImage = "\'SELECT 1, \'", @Image = "\'SELECT 1, \'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'SELECT 1, \'", @Image = "\'SELECT 1, \'"] | | +- StringLiteral[@CanonicalImage = "\'SELECT 1, \'", @Image = "\'SELECT 1, \'", @String = "SELECT 1, "] | +- PrimaryPrefix[@CanonicalImage = "CHR", @Image = "CHR", @SelfModifier = false] - | | +- FunctionCall[@CanonicalImage = "CHR", @Image = "CHR"] +Added line: 2815 +Added line: 2666 | | +- FunctionName[@CanonicalImage = "CHR", @Image = "CHR"] | | | +- ID[@CanonicalImage = "CHR", @Image = "CHR"] | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | +- ArgumentList[@CanonicalImage = null] +Added line: 7374 | | +- Argument[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "39", @Image = "39"] | | +- PrimaryPrefix[@CanonicalImage = "39", @Image = "39", @SelfModifier = false] | | +- Literal[@CanonicalImage = "39", @Image = "39"] +Added line: 4929 +Added line: 8197 | | +- NumericLiteral[@CanonicalImage = "39", @Image = "39"] | +- PrimaryPrefix[@CanonicalImage = "\'FIRST KEY\'", @Image = "\'First key\'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'FIRST KEY\'", @Image = "\'First key\'"] +Added line: 1192 | | +- StringLiteral[@CanonicalImage = "\'FIRST KEY\'", @Image = "\'First key\'", @String = "First key"] | +- PrimaryPrefix[@CanonicalImage = "CHR", @Image = "CHR", @SelfModifier = false] +Added line: 1254 | | +- FunctionCall[@CanonicalImage = "CHR", @Image = "CHR"] | | +- FunctionName[@CanonicalImage = "CHR", @Image = "CHR"] | | | +- ID[@CanonicalImage = "CHR", @Image = "CHR"] | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | +- ArgumentList[@CanonicalImage = null] +Added line: 2126 +Added line: 1304 +Added line: 2633 | | +- Argument[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "39", @Image = "39"] | | +- PrimaryPrefix[@CanonicalImage = "39", @Image = "39", @SelfModifier = false] @@ -125,11 +182,18 @@ | +- PrimaryPrefix[@CanonicalImage = "\' FROM DUAL \'", @Image = "\' FROM DUAL \'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\' FROM DUAL \'", @Image = "\' FROM DUAL \'"] | | +- StringLiteral[@CanonicalImage = "\' FROM DUAL \'", @Image = "\' FROM DUAL \'", @String = " FROM DUAL "] +Added line: 6354 +Added line: 3804 +Added line: 6679 | +- PrimaryPrefix[@CanonicalImage = "\' WHERE ROWNUM <= :P_ROWNUM1 \'", @Image = "\' WHERE ROWNUM <= :p_rownum1 \'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\' WHERE ROWNUM <= :P_ROWNUM1 \'", @Image = "\' WHERE ROWNUM <= :p_rownum1 \'"] | | +- StringLiteral[@CanonicalImage = "\' WHERE ROWNUM <= :P_ROWNUM1 \'", @Image = "\' WHERE ROWNUM <= :p_rownum1 \'", @String = " WHERE ROWNUM <= :p_rownum1 "] | +- PrimaryPrefix[@CanonicalImage = "\'UNION ALL \'", @Image = "\'UNION ALL \'", @SelfModifier = false] +Added line: 3849 | | +- Literal[@CanonicalImage = "\'UNION ALL \'", @Image = "\'UNION ALL \'"] +Added line: 3442 +Added line: 7813 +Added line: 8338 | | +- StringLiteral[@CanonicalImage = "\'UNION ALL \'", @Image = "\'UNION ALL \'", @String = "UNION ALL "] | +- PrimaryPrefix[@CanonicalImage = "\'SELECT 2, \'", @Image = "\'SELECT 2, \'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'SELECT 2, \'", @Image = "\'SELECT 2, \'"] @@ -138,21 +202,31 @@ | | +- FunctionCall[@CanonicalImage = "CHR", @Image = "CHR"] | | +- FunctionName[@CanonicalImage = "CHR", @Image = "CHR"] | | | +- ID[@CanonicalImage = "CHR", @Image = "CHR"] +Added line: 5046 +Added line: 1809 | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | +- ArgumentList[@CanonicalImage = null] +Added line: 3494 | | +- Argument[@CanonicalImage = null] +Added line: 321 | | +- Expression[@CanonicalImage = "39", @Image = "39"] | | +- PrimaryPrefix[@CanonicalImage = "39", @Image = "39", @SelfModifier = false] | | +- Literal[@CanonicalImage = "39", @Image = "39"] +Added line: 1762 | | +- NumericLiteral[@CanonicalImage = "39", @Image = "39"] +Added line: 6427 | +- PrimaryPrefix[@CanonicalImage = "\'SECOND KEY \'", @Image = "\'Second key \'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'SECOND KEY \'", @Image = "\'Second key \'"] - | | +- StringLiteral[@CanonicalImage = "\'SECOND KEY \'", @Image = "\'Second key \'", @String = "Second key "] +Added line: 9019 +Added line: 8340 | +- PrimaryPrefix[@CanonicalImage = "CHR", @Image = "CHR", @SelfModifier = false] | | +- FunctionCall[@CanonicalImage = "CHR", @Image = "CHR"] +Added line: 3343 | | +- FunctionName[@CanonicalImage = "CHR", @Image = "CHR"] | | | +- ID[@CanonicalImage = "CHR", @Image = "CHR"] | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] +Added line: 4691 +Added line: 7644 | | +- ArgumentList[@CanonicalImage = null] | | +- Argument[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "39", @Image = "39"] @@ -160,16 +234,21 @@ | | +- Literal[@CanonicalImage = "39", @Image = "39"] | | +- NumericLiteral[@CanonicalImage = "39", @Image = "39"] | +- PrimaryPrefix[@CanonicalImage = "\' FROM DUAL\'", @Image = "\' FROM DUAL\'", @SelfModifier = false] +Added line: 9578 | | +- Literal[@CanonicalImage = "\' FROM DUAL\'", @Image = "\' FROM DUAL\'"] +Added line: 8363 | | +- StringLiteral[@CanonicalImage = "\' FROM DUAL\'", @Image = "\' FROM DUAL\'", @String = " FROM DUAL"] | +- PrimaryPrefix[@CanonicalImage = "\' WHERE ROWNUM <= :P_ROWNUM2 \'", @Image = "\' WHERE ROWNUM <= :p_rownum2 \'", @SelfModifier = false] | +- Literal[@CanonicalImage = "\' WHERE ROWNUM <= :P_ROWNUM2 \'", @Image = "\' WHERE ROWNUM <= :p_rownum2 \'"] +Added line: 2074 | +- StringLiteral[@CanonicalImage = "\' WHERE ROWNUM <= :P_ROWNUM2 \'", @Image = "\' WHERE ROWNUM <= :p_rownum2 \'", @String = " WHERE ROWNUM <= :p_rownum2 "] +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 6211 | +- EmbeddedSqlStatement[@CanonicalImage = null] | +- StringExpression[@CanonicalImage = "L_SQL", @Image = "l_sql"] | | +- PrimaryPrefix[@CanonicalImage = "L_SQL", @Image = "l_sql", @SelfModifier = false] +Added line: 8057 | | +- SimpleExpression[@CanonicalImage = "L_SQL", @Image = "l_sql"] | | +- Column[@CanonicalImage = "L_SQL", @Image = "l_sql"] | | +- ID[@CanonicalImage = "L_SQL", @Image = "l_sql"] @@ -177,15 +256,25 @@ | | +- CollectionName[@CanonicalImage = "L_DATA_KEY", @Image = "l_data_key"] | | | +- ID[@CanonicalImage = "L_DATA_KEY", @Image = "l_data_key"] | | +- CollectionName[@CanonicalImage = "L_DATA_DESCRIPTION", @Image = "l_data_description"] +Added line: 8075 | | +- ID[@CanonicalImage = "L_DATA_DESCRIPTION", @Image = "l_data_description"] +Added line: 7807 +Added line: 5506 | +- Expression[@CanonicalImage = "P_ROWNUM1", @Image = "p_rownum1"] +Added line: 6005 | | +- PrimaryPrefix[@CanonicalImage = "P_ROWNUM1", @Image = "p_rownum1", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "P_ROWNUM1", @Image = "p_rownum1"] | | +- Column[@CanonicalImage = "P_ROWNUM1", @Image = "p_rownum1"] | | +- ID[@CanonicalImage = "P_ROWNUM1", @Image = "p_rownum1"] +Added line: 5553 | +- Expression[@CanonicalImage = "P_ROWNUM2", @Image = "p_rownum2"] +Added line: 3913 +Added line: 4110 +Added line: 4967 | +- PrimaryPrefix[@CanonicalImage = "P_ROWNUM2", @Image = "p_rownum2", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "P_ROWNUM2", @Image = "p_rownum2"] +Added line: 802 | +- Column[@CanonicalImage = "P_ROWNUM2", @Image = "p_rownum2"] +Added line: 2258 | +- ID[@CanonicalImage = "P_ROWNUM2", @Image = "p_rownum2"] +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect3.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect3.txt index 89036db139..806df4736b 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect3.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ExecuteImmediateBulkCollect3.txt @@ -1,137 +1,226 @@ +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +Added line: 492 +- Global[@CanonicalImage = null] +Added line: 1153 +Added line: 4387 +Added line: 2013 +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] Added line: 4397 +Added line: 5697 +Added line: 1388 +Added line: 9628 +Added line: 323 +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] | +- ObjectNameDeclaration[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] | +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +Added line: 5055 +- DeclarativeSection[@CanonicalImage = null] | +- DeclarativeUnit[@CanonicalImage = null] | | +- SubTypeDefinition[@CanonicalImage = "T_DATA_KEY", @Image = "t_data_key"] | | +- QualifiedID[@CanonicalImage = "T_DATA_KEY", @Image = "t_data_key"] | | +- Datatype[@CanonicalImage = "NUMBER", @Image = "NUMBER", @TypeImage = "NUMBER"] +Added line: 4826 | | | +- ScalarDataTypeName[@CanonicalImage = "NUMBER", @Image = "NUMBER"] | | +- Datatype[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER", @TypeImage = "BINARY_INTEGER"] +Added line: 7950 | | +- ScalarDataTypeName[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER"] | +- DeclarativeUnit[@CanonicalImage = null] | | +- SubTypeDefinition[@CanonicalImage = "T_DATA_DESCRIPTION", @Image = "t_data_description"] | | +- QualifiedID[@CanonicalImage = "T_DATA_DESCRIPTION", @Image = "t_data_description"] | | +- Datatype[@CanonicalImage = "VARCHAR2(100)", @Image = "VARCHAR2(100)", @TypeImage = "VARCHAR2(100)"] +Added line: 3585 +Added line: 855 +Added line: 7802 | | | +- ScalarDataTypeName[@CanonicalImage = "VARCHAR2(100)", @Image = "VARCHAR2(100)"] +Added line: 4131 +Added line: 1938 +Added line: 274 +Added line: 2406 | | | +- NumericLiteral[@CanonicalImage = "100", @Image = "100"] +Added line: 4443 +Added line: 7703 | | +- Datatype[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER", @TypeImage = "BINARY_INTEGER"] | | +- ScalarDataTypeName[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER"] +Added line: 310 +Added line: 6209 | +- DeclarativeUnit[@CanonicalImage = null] | | +- VariableOrConstantDeclaration[@CanonicalImage = null] +Added line: 805 +Added line: 136 +Added line: 886 | | +- VariableOrConstantDeclarator[@CanonicalImage = "L_DATA_KEY T_DATA_KEY", @Image = "l_data_key t_data_key"] | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_DATA_KEY", @Image = "l_data_key"] +Added line: 6970 | | | +- ID[@CanonicalImage = "L_DATA_KEY", @Image = "l_data_key"] +Added line: 9440 | | +- Datatype[@CanonicalImage = "T_DATA_KEY", @Image = "t_data_key", @TypeImage = "t_data_key"] +Added line: 5 | | +- QualifiedName[@CanonicalImage = "T_DATA_KEY", @Image = "t_data_key"] | | +- UnqualifiedID[@CanonicalImage = "T_DATA_KEY", @Image = "t_data_key"] +Added line: 6274 +Added line: 8354 +Added line: 3442 | +- DeclarativeUnit[@CanonicalImage = null] | | +- VariableOrConstantDeclaration[@CanonicalImage = null] | | +- VariableOrConstantDeclarator[@CanonicalImage = "L_DATA_DESCRIPTION T_DATA_DESCRIPTION", @Image = "l_data_description t_data_description"] +Added line: 6688 | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_DATA_DESCRIPTION", @Image = "l_data_description"] | | | +- ID[@CanonicalImage = "L_DATA_DESCRIPTION", @Image = "l_data_description"] +Added line: 7835 | | +- Datatype[@CanonicalImage = "T_DATA_DESCRIPTION", @Image = "t_data_description", @TypeImage = "t_data_description"] | | +- QualifiedName[@CanonicalImage = "T_DATA_DESCRIPTION", @Image = "t_data_description"] | | +- UnqualifiedID[@CanonicalImage = "T_DATA_DESCRIPTION", @Image = "t_data_description"] +Added line: 3034 | +- DeclarativeUnit[@CanonicalImage = null] | +- VariableOrConstantDeclaration[@CanonicalImage = null] +Added line: 5911 +Added line: 3165 +Added line: 6309 +Added line: 3332 +Added line: 1790 | +- VariableOrConstantDeclarator[@CanonicalImage = "L_SQL VARCHAR2(500)", @Image = "l_sql VARCHAR2(500)"] | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_SQL", @Image = "l_sql"] | | +- ID[@CanonicalImage = "L_SQL", @Image = "l_sql"] | +- Datatype[@CanonicalImage = "VARCHAR2(500)", @Image = "VARCHAR2(500)", @TypeImage = "VARCHAR2(500)"] +Added line: 1682 | +- ScalarDataTypeName[@CanonicalImage = "VARCHAR2(500)", @Image = "VARCHAR2(500)"] +Added line: 2627 +Added line: 7915 | +- NumericLiteral[@CanonicalImage = "500", @Image = "500"] +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] | +- Expression[@CanonicalImage = "L_SQL := \'SELECT 1, \' || CHR || \'FIRST KEY\' || CHR || \' FROM DUAL \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'SECOND KEY \' || CHR || \' FROM DUAL\'", @Image = "l_sql := \'SELECT 1, \' || CHR || \'First key\' || CHR || \' FROM DUAL \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'Second key \' || CHR || \' FROM DUAL\'"] +Added line: 7198 +Added line: 8573 | +- Assignment[@CanonicalImage = "L_SQL := \'SELECT 1, \' || CHR || \'FIRST KEY\' || CHR || \' FROM DUAL \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'SECOND KEY \' || CHR || \' FROM DUAL\'", @Image = "l_sql := \'SELECT 1, \' || CHR || \'First key\' || CHR || \' FROM DUAL \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'Second key \' || CHR || \' FROM DUAL\'"] | +- PrimaryPrefix[@CanonicalImage = "L_SQL", @Image = "l_sql", @SelfModifier = false] - | | +- SimpleExpression[@CanonicalImage = "L_SQL", @Image = "l_sql"] +Added line: 7623 +Added line: 3956 +Added line: 3932 | | +- Column[@CanonicalImage = "L_SQL", @Image = "l_sql"] | | +- ID[@CanonicalImage = "L_SQL", @Image = "l_sql"] +Added line: 4232 | +- Expression[@CanonicalImage = "\'SELECT 1, \' || CHR || \'FIRST KEY\' || CHR || \' FROM DUAL \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'SECOND KEY \' || CHR || \' FROM DUAL\'", @Image = "\'SELECT 1, \' || CHR || \'First key\' || CHR || \' FROM DUAL \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'Second key \' || CHR || \' FROM DUAL\'"] | +- AdditiveExpression[@CanonicalImage = "\'SELECT 1, \' || CHR || \'FIRST KEY\' || CHR || \' FROM DUAL \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'SECOND KEY \' || CHR || \' FROM DUAL\'", @Image = "\'SELECT 1, \' || CHR || \'First key\' || CHR || \' FROM DUAL \' || \'UNION ALL \' || \'SELECT 2, \' || CHR || \'Second key \' || CHR || \' FROM DUAL\'"] | +- PrimaryPrefix[@CanonicalImage = "\'SELECT 1, \'", @Image = "\'SELECT 1, \'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'SELECT 1, \'", @Image = "\'SELECT 1, \'"] | | +- StringLiteral[@CanonicalImage = "\'SELECT 1, \'", @Image = "\'SELECT 1, \'", @String = "SELECT 1, "] +Added line: 6294 Added line: 990 | +- PrimaryPrefix[@CanonicalImage = "CHR", @Image = "CHR", @SelfModifier = false] | | +- FunctionCall[@CanonicalImage = "CHR", @Image = "CHR"] | | +- FunctionName[@CanonicalImage = "CHR", @Image = "CHR"] +Added line: 9392 +Added line: 7725 | | | +- ID[@CanonicalImage = "CHR", @Image = "CHR"] | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | +- ArgumentList[@CanonicalImage = null] | | +- Argument[@CanonicalImage = null] +Added line: 2914 | | +- Expression[@CanonicalImage = "39", @Image = "39"] | | +- PrimaryPrefix[@CanonicalImage = "39", @Image = "39", @SelfModifier = false] | | +- Literal[@CanonicalImage = "39", @Image = "39"] +Added line: 1455 | | +- NumericLiteral[@CanonicalImage = "39", @Image = "39"] | +- PrimaryPrefix[@CanonicalImage = "\'FIRST KEY\'", @Image = "\'First key\'", @SelfModifier = false] +Added line: 7668 | | +- Literal[@CanonicalImage = "\'FIRST KEY\'", @Image = "\'First key\'"] | | +- StringLiteral[@CanonicalImage = "\'FIRST KEY\'", @Image = "\'First key\'", @String = "First key"] +Added line: 4058 | +- PrimaryPrefix[@CanonicalImage = "CHR", @Image = "CHR", @SelfModifier = false] | | +- FunctionCall[@CanonicalImage = "CHR", @Image = "CHR"] +Added line: 6232 +Added line: 2163 Added line: 1120 +Added line: 7246 +Added line: 2590 +Added line: 2412 +Added line: 9220 | | +- FunctionName[@CanonicalImage = "CHR", @Image = "CHR"] | | | +- ID[@CanonicalImage = "CHR", @Image = "CHR"] | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] +Added line: 6535 +Added line: 4541 +Added line: 5874 | | +- ArgumentList[@CanonicalImage = null] | | +- Argument[@CanonicalImage = null] - | | +- Expression[@CanonicalImage = "39", @Image = "39"] +Added line: 4876 | | +- Literal[@CanonicalImage = "39", @Image = "39"] +Added line: 6060 | | +- NumericLiteral[@CanonicalImage = "39", @Image = "39"] - | +- PrimaryPrefix[@CanonicalImage = "\' FROM DUAL \'", @Image = "\' FROM DUAL \'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\' FROM DUAL \'", @Image = "\' FROM DUAL \'"] | | +- StringLiteral[@CanonicalImage = "\' FROM DUAL \'", @Image = "\' FROM DUAL \'", @String = " FROM DUAL "] +Added line: 7525 | +- PrimaryPrefix[@CanonicalImage = "\'UNION ALL \'", @Image = "\'UNION ALL \'", @SelfModifier = false] +Added line: 155 | | +- Literal[@CanonicalImage = "\'UNION ALL \'", @Image = "\'UNION ALL \'"] - | | +- StringLiteral[@CanonicalImage = "\'UNION ALL \'", @Image = "\'UNION ALL \'", @String = "UNION ALL "] +Added line: 9608 | +- PrimaryPrefix[@CanonicalImage = "\'SELECT 2, \'", @Image = "\'SELECT 2, \'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'SELECT 2, \'", @Image = "\'SELECT 2, \'"] | | +- StringLiteral[@CanonicalImage = "\'SELECT 2, \'", @Image = "\'SELECT 2, \'", @String = "SELECT 2, "] +Added line: 6353 +Added line: 6595 +Added line: 1961 | +- PrimaryPrefix[@CanonicalImage = "CHR", @Image = "CHR", @SelfModifier = false] | | +- FunctionCall[@CanonicalImage = "CHR", @Image = "CHR"] - | | +- FunctionName[@CanonicalImage = "CHR", @Image = "CHR"] +Added line: 2698 +Added line: 2082 | | | +- ID[@CanonicalImage = "CHR", @Image = "CHR"] | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] - | | +- Argument[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "39", @Image = "39"] | | +- PrimaryPrefix[@CanonicalImage = "39", @Image = "39", @SelfModifier = false] +Added line: 4072 | | +- Literal[@CanonicalImage = "39", @Image = "39"] +Added line: 98 +Added line: 709 | | +- NumericLiteral[@CanonicalImage = "39", @Image = "39"] | +- PrimaryPrefix[@CanonicalImage = "\'SECOND KEY \'", @Image = "\'Second key \'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'SECOND KEY \'", @Image = "\'Second key \'"] | | +- StringLiteral[@CanonicalImage = "\'SECOND KEY \'", @Image = "\'Second key \'", @String = "Second key "] +Added line: 9281 | +- PrimaryPrefix[@CanonicalImage = "CHR", @Image = "CHR", @SelfModifier = false] | | +- FunctionCall[@CanonicalImage = "CHR", @Image = "CHR"] | | +- FunctionName[@CanonicalImage = "CHR", @Image = "CHR"] +Added line: 4880 +Added line: 6288 | | | +- ID[@CanonicalImage = "CHR", @Image = "CHR"] - | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] +Added line: 3226 Added line: 921 | | +- ArgumentList[@CanonicalImage = null] +Added line: 7780 | | +- Argument[@CanonicalImage = null] +Added line: 2986 | | +- Expression[@CanonicalImage = "39", @Image = "39"] | | +- PrimaryPrefix[@CanonicalImage = "39", @Image = "39", @SelfModifier = false] +Added line: 9459 | | +- Literal[@CanonicalImage = "39", @Image = "39"] +Added line: 2286 | | +- NumericLiteral[@CanonicalImage = "39", @Image = "39"] | +- PrimaryPrefix[@CanonicalImage = "\' FROM DUAL\'", @Image = "\' FROM DUAL\'", @SelfModifier = false] +Added line: 9636 +Added line: 6776 | +- Literal[@CanonicalImage = "\' FROM DUAL\'", @Image = "\' FROM DUAL\'"] | +- StringLiteral[@CanonicalImage = "\' FROM DUAL\'", @Image = "\' FROM DUAL\'", @String = " FROM DUAL"] +Added line: 1497 +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 206 +Added line: 1494 | +- EmbeddedSqlStatement[@CanonicalImage = null] +Added line: 5902 | +- StringExpression[@CanonicalImage = "L_SQL", @Image = "l_sql"] | | +- PrimaryPrefix[@CanonicalImage = "L_SQL", @Image = "l_sql", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "L_SQL", @Image = "l_sql"] +Added line: 6377 +Added line: 6235 +Added line: 9948 | | +- Column[@CanonicalImage = "L_SQL", @Image = "l_sql"] | +- BulkCollectIntoClause[@CanonicalImage = null] | +- CollectionName[@CanonicalImage = "L_DATA_KEY", @Image = "l_data_key"] | | +- ID[@CanonicalImage = "L_DATA_KEY", @Image = "l_data_key"] | +- CollectionName[@CanonicalImage = "L_DATA_DESCRIPTION", @Image = "l_data_description"] +Added line: 4665 | +- ID[@CanonicalImage = "L_DATA_DESCRIPTION", @Image = "l_data_description"] +Added line: 8083 +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] Added line: 3878 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/Issue5133SubTypeDefinition.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/Issue5133SubTypeDefinition.txt index 3d49da1d80..79db666eae 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/Issue5133SubTypeDefinition.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/Issue5133SubTypeDefinition.txt @@ -1,25 +1,114 @@ +Added line: 8478 +Added line: 7719 +Added line: 1131 +Added line: 4763 +Added line: 648 +Added line: 3518 +Added line: 7715 +Added line: 1735 +Added line: 5961 +Added line: 9024 +Added line: 7551 +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] - +- PackageSpecification[@CanonicalImage = "X", @Image = "x", @ObjectName = "x"] +Added line: 2404 +Added line: 8606 +Added line: 7384 +Added line: 3057 +Added line: 812 +Added line: 6314 | +- ObjectNameDeclaration[@CanonicalImage = "X", @Image = "x"] +Added line: 7886 +Added line: 4171 +Added line: 3727 +Added line: 5007 | | +- ID[@CanonicalImage = "X", @Image = "x"] - | +- DeclarativeSection[@CanonicalImage = null] +Added line: 1844 +Added line: 3161 +Added line: 2464 +Added line: 6806 +Added line: 4088 +Added line: 9989 +Added line: 3376 +Added line: 1741 +Added line: 1830 +Added line: 254 +Added line: 945 +Added line: 1058 +Added line: 6389 Added line: 1227 +Added line: 8383 +Added line: 2088 +Added line: 2869 | | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 6242 | | +- SubTypeDefinition[@CanonicalImage = "LAST_RUN_DURATION", @Image = "last_run_duration"] +Added line: 3241 | | +- QualifiedID[@CanonicalImage = "LAST_RUN_DURATION", @Image = "last_run_duration"] +Added line: 5684 Added line: 1345 +Added line: 4728 +Added line: 9173 +Added line: 5935 +Added line: 3367 +Added line: 7948 +Added line: 1060 +Added line: 813 +Added line: 4825 | | +- Datatype[@CanonicalImage = "INTERVAL DAY(9) TO SECOND(6)", @Image = "INTERVAL DAY(9) TO SECOND(6)", @TypeImage = "INTERVAL DAY(9) TO SECOND(6)"] +Added line: 5740 +Added line: 8286 +Added line: 4050 +Added line: 1882 +Added line: 2516 +Added line: 3406 +Added line: 5208 +Added line: 6084 | | +- NumericLiteral[@CanonicalImage = "6", @Image = "6"] | +- ID[@CanonicalImage = "X", @Image = "x"] +- ObjectNameDeclaration[@CanonicalImage = "PHONE_LIST_TYP_DEMO", @Image = "phone_list_typ_demo"] -Added line: 1382 +Added line: 6571 +Added line: 3671 | +- ID[@CanonicalImage = "PHONE_LIST_TYP_DEMO", @Image = "phone_list_typ_demo"] +Added line: 7605 +Added line: 7350 +Added line: 4241 +Added line: 1473 +Added line: 2110 +- CollectionTypeName[@CanonicalImage = "VARRAY(5)", @Image = "VARRAY(5)"] +Added line: 7757 +Added line: 1491 +Added line: 3545 | +- NumericLiteral[@CanonicalImage = "5", @Image = "5"] Added line: 5946 +- Datatype[@CanonicalImage = "VARCHAR2(25)", @Image = "VARCHAR2(25)", @TypeImage = "VARCHAR2(25)"] Added line: 8761 +Added line: 3044 +Added line: 1508 +Added line: 2382 +Added line: 3614 Added line: 4317 +Added line: 8097 +Added line: 2957 Added line: 666 +Added line: 7698 +Added line: 9105 +Added line: 5739 +Added line: 8498 +- ScalarDataTypeName[@CanonicalImage = "VARCHAR2(25)", @Image = "VARCHAR2(25)"] +Added line: 5 +Added line: 5984 +- NumericLiteral[@CanonicalImage = "25", @Image = "25"] +Added line: 6339 +Added line: 7192 +Added line: 474 +Added line: 6164 +Added line: 5939 +Added line: 672 +Added line: 5262 +Added line: 6175 +Added line: 7845 +Added line: 2453 +Added line: 8251 +Added line: 99 +Added line: 9255 +Added line: 4511 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/MergeStatementIssue1934.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/MergeStatementIssue1934.txt index bd36975ba8..749feb0673 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/MergeStatementIssue1934.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/MergeStatementIssue1934.txt @@ -1,9 +1,11 @@ +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +Added line: 870 +- Global[@CanonicalImage = null] +- Block[@CanonicalImage = null] +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] | +- MergeStatement[@CanonicalImage = null] +Added line: 451 | +- TableName[@CanonicalImage = "JHS_TRANSLATIONS", @Image = "jhs_translations"] | | +- ID[@CanonicalImage = "JHS_TRANSLATIONS", @Image = "jhs_translations"] | +- TableAlias[@CanonicalImage = "B", @Image = "b"] @@ -11,16 +13,20 @@ | +- QueryBlock[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | | +- SelectList[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] - | | | | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false] +Added line: 8834 +Added line: 5143 | | | | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] | | | | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"] | | | +- ColumnAlias[@CanonicalImage = "KEY1", @Image = "key1"] | | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"] | | | +- SqlExpression[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] | | | | +- PrimaryPrefix[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @SelfModifier = false] +Added line: 7036 | | | | +- Literal[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] | | | | +- StringLiteral[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @String = "Edycja promocji nr"] +Added line: 7566 | | | +- ColumnAlias[@CanonicalImage = "TEXT", @Image = "text"] +Added line: 6422 | | | | +- ID[@CanonicalImage = "TEXT", @Image = "text"] | | | +- SqlExpression[@CanonicalImage = "123123", @Image = "123123"] | | | | +- PrimaryPrefix[@CanonicalImage = "123123", @Image = "123123", @SelfModifier = false] @@ -31,28 +37,36 @@ | | +- FromClause[@CanonicalImage = null] | | +- TableReference[@CanonicalImage = null] | | +- TableName[@CanonicalImage = "DUAL", @Image = "dual"] +Added line: 2030 | | +- ID[@CanonicalImage = "DUAL", @Image = "dual"] | +- TableAlias[@CanonicalImage = "E", @Image = "e"] | | +- ID[@CanonicalImage = "E", @Image = "e"] | +- Condition[@CanonicalImage = null] +Added line: 1263 | | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"] | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] | | | +- SqlExpression[@CanonicalImage = "B.KEY1", @Image = "b.key1"] | | | | +- PrimaryPrefix[@CanonicalImage = "B.KEY1", @Image = "b.key1", @SelfModifier = false] +Added line: 2998 | | | | +- SimpleExpression[@CanonicalImage = "B.KEY1", @Image = "b.key1"] | | | | +- TableName[@CanonicalImage = "B", @Image = "b"] | | | | | +- ID[@CanonicalImage = "B", @Image = "b"] +Added line: 9701 | | | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"] | | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"] | | | +- SqlExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"] +Added line: 318 +Added line: 8807 | | | +- PrimaryPrefix[@CanonicalImage = "E.KEY1", @Image = "e.key1", @SelfModifier = false] - | | | +- SimpleExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"] | | | +- TableName[@CanonicalImage = "E", @Image = "e"] | | | | +- ID[@CanonicalImage = "E", @Image = "e"] | | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"] +Added line: 4070 | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"] +Added line: 8754 | | +- Condition[@CanonicalImage = null] | | +- CompoundCondition[@CanonicalImage = null, @Type = null] +Added line: 6033 | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] | | +- SqlExpression[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id"] | | | +- PrimaryPrefix[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id", @SelfModifier = false] @@ -62,10 +76,14 @@ | | | +- Column[@CanonicalImage = "LCE_ID", @Image = "lce_id"] | | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"] | | +- SqlExpression[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id"] +Added line: 3003 +Added line: 6707 | | +- PrimaryPrefix[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id"] | | +- TableName[@CanonicalImage = "E", @Image = "e"] +Added line: 2475 | | | +- ID[@CanonicalImage = "E", @Image = "e"] +Added line: 1096 | | +- Column[@CanonicalImage = "LCE_ID", @Image = "lce_id"] | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"] | +- MergeUpdateClause[@CanonicalImage = null] @@ -82,6 +100,7 @@ | | +- ID[@CanonicalImage = "TEXT", @Image = "text"] | +- MergeInsertClause[@CanonicalImage = null] | +- Column[@CanonicalImage = "ID", @Image = "ID"] +Added line: 9862 | | +- ID[@CanonicalImage = "ID", @Image = "ID"] | +- Column[@CanonicalImage = "KEY1", @Image = "KEY1"] | | +- ID[@CanonicalImage = "KEY1", @Image = "KEY1"] @@ -92,16 +111,21 @@ | +- ValuesClause[@CanonicalImage = null] | +- Expression[@CanonicalImage = "", @Image = ""] | | +- PrimaryPrefix[@CanonicalImage = "", @Image = "", @SelfModifier = false] +Added line: 331 | | +- SimpleExpression[@CanonicalImage = "", @Image = ""] | | +- ID[@CanonicalImage = "JHS_SEQ", @Image = "JHS_SEQ"] | +- Expression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] +Added line: 2412 | | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] +Added line: 8272 | | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"] | +- Expression[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] +Added line: 5285 | | +- PrimaryPrefix[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] | | +- StringLiteral[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @String = "Edycja promocji nr"] +Added line: 7556 | +- Expression[@CanonicalImage = "123123", @Image = "123123"] | +- PrimaryPrefix[@CanonicalImage = "123123", @Image = "123123", @SelfModifier = false] | +- Literal[@CanonicalImage = "123123", @Image = "123123"] @@ -110,10 +134,13 @@ | +- UnlabelledStatement[@CanonicalImage = null] | +- MergeStatement[@CanonicalImage = null] | +- TableName[@CanonicalImage = "B", @Image = "b"] +Added line: 3568 | | +- ID[@CanonicalImage = "B", @Image = "b"] | +- QueryBlock[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | | +- SelectList[@CanonicalImage = null] +Added line: 7952 | | | +- SqlExpression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] +Added line: 7931 | | | | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false] | | | | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] | | | | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"] @@ -133,6 +160,7 @@ | | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"] | | +- FromClause[@CanonicalImage = null] | | +- TableReference[@CanonicalImage = null] +Added line: 6425 | | +- TableName[@CanonicalImage = "DUAL", @Image = "dual"] | | +- ID[@CanonicalImage = "DUAL", @Image = "dual"] | +- TableAlias[@CanonicalImage = "E", @Image = "e"] @@ -141,6 +169,7 @@ | | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"] | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] | | | +- SqlExpression[@CanonicalImage = "B.KEY1", @Image = "b.key1"] +Added line: 2812 | | | | +- PrimaryPrefix[@CanonicalImage = "B.KEY1", @Image = "b.key1", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "B.KEY1", @Image = "b.key1"] | | | | +- TableName[@CanonicalImage = "B", @Image = "b"] @@ -148,21 +177,27 @@ | | | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"] | | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"] | | | +- SqlExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"] +Added line: 6021 +Added line: 6589 | | | +- PrimaryPrefix[@CanonicalImage = "E.KEY1", @Image = "e.key1", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"] | | | +- TableName[@CanonicalImage = "E", @Image = "e"] | | | | +- ID[@CanonicalImage = "E", @Image = "e"] +Added line: 9011 | | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"] | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"] | | +- Condition[@CanonicalImage = null] +Added line: 5649 | | +- CompoundCondition[@CanonicalImage = null, @Type = null] | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] +Added line: 7505 | | +- SqlExpression[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id"] | | | +- PrimaryPrefix[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id"] | | | +- TableName[@CanonicalImage = "B", @Image = "b"] | | | | +- ID[@CanonicalImage = "B", @Image = "b"] | | | +- Column[@CanonicalImage = "LCE_ID", @Image = "lce_id"] +Added line: 4218 | | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"] | | +- SqlExpression[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id"] | | +- PrimaryPrefix[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id", @SelfModifier = false] @@ -173,8 +208,8 @@ | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"] | +- MergeUpdateClause[@CanonicalImage = null] | | +- TableName[@CanonicalImage = "B", @Image = "b"] - | | | +- ID[@CanonicalImage = "B", @Image = "b"] | | +- Column[@CanonicalImage = "TEXT", @Image = "text"] +Added line: 2045 | | | +- ID[@CanonicalImage = "TEXT", @Image = "text"] | | +- Expression[@CanonicalImage = "E.TEXT", @Image = "e.text"] | | +- PrimaryPrefix[@CanonicalImage = "E.TEXT", @Image = "e.text", @SelfModifier = false] @@ -186,33 +221,43 @@ | +- MergeInsertClause[@CanonicalImage = null] | +- Column[@CanonicalImage = "ID", @Image = "ID"] | | +- ID[@CanonicalImage = "ID", @Image = "ID"] +Added line: 1459 | +- Column[@CanonicalImage = "KEY1", @Image = "KEY1"] | | +- ID[@CanonicalImage = "KEY1", @Image = "KEY1"] | +- Column[@CanonicalImage = "TEXT", @Image = "TEXT"] | | +- ID[@CanonicalImage = "TEXT", @Image = "TEXT"] | +- Column[@CanonicalImage = "LCE_ID", @Image = "LCE_ID"] | | +- ID[@CanonicalImage = "LCE_ID", @Image = "LCE_ID"] +Added line: 8607 | +- ValuesClause[@CanonicalImage = null] | +- Expression[@CanonicalImage = "", @Image = ""] - | | +- PrimaryPrefix[@CanonicalImage = "", @Image = "", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "", @Image = ""] | | +- ID[@CanonicalImage = "JHS_SEQ", @Image = "JHS_SEQ"] | +- Expression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] | | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false] +Added line: 6142 +Added line: 6114 | | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] +Added line: 3829 | | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"] | +- Expression[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] | | +- PrimaryPrefix[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @SelfModifier = false] +Added line: 2493 +Added line: 2226 | | +- Literal[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] +Added line: 7042 | | +- StringLiteral[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @String = "Edycja promocji nr"] +Added line: 4967 | +- Expression[@CanonicalImage = "123123", @Image = "123123"] | +- PrimaryPrefix[@CanonicalImage = "123123", @Image = "123123", @SelfModifier = false] +Added line: 2834 | +- Literal[@CanonicalImage = "123123", @Image = "123123"] +Added line: 7796 | +- NumericLiteral[@CanonicalImage = "123123", @Image = "123123"] - +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] | +- MergeStatement[@CanonicalImage = null] | +- TableName[@CanonicalImage = "B", @Image = "b"] +Added line: 7950 | | +- ID[@CanonicalImage = "B", @Image = "b"] | +- TableName[@CanonicalImage = "E", @Image = "e"] | | +- ID[@CanonicalImage = "E", @Image = "e"] @@ -227,12 +272,17 @@ | | | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"] | | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"] | | | +- SqlExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"] +Added line: 3628 | | | +- PrimaryPrefix[@CanonicalImage = "E.KEY1", @Image = "e.key1", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"] +Added line: 5738 | | | +- TableName[@CanonicalImage = "E", @Image = "e"] | | | | +- ID[@CanonicalImage = "E", @Image = "e"] | | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"] +Added line: 4097 +Added line: 1025 | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"] +Added line: 2121 | | +- Condition[@CanonicalImage = null] | | +- CompoundCondition[@CanonicalImage = null, @Type = null] | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] @@ -240,9 +290,11 @@ | | | +- PrimaryPrefix[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id"] | | | +- TableName[@CanonicalImage = "B", @Image = "b"] +Added line: 1320 | | | | +- ID[@CanonicalImage = "B", @Image = "b"] | | | +- Column[@CanonicalImage = "LCE_ID", @Image = "lce_id"] | | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"] +Added line: 3507 | | +- SqlExpression[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id"] | | +- PrimaryPrefix[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id"] @@ -254,7 +306,9 @@ | | +- TableName[@CanonicalImage = "B", @Image = "b"] | | | +- ID[@CanonicalImage = "B", @Image = "b"] | | +- Column[@CanonicalImage = "TEXT", @Image = "text"] +Added line: 8327 | | | +- ID[@CanonicalImage = "TEXT", @Image = "text"] +Added line: 1418 | | +- Expression[@CanonicalImage = "E.TEXT", @Image = "e.text"] | | +- PrimaryPrefix[@CanonicalImage = "E.TEXT", @Image = "e.text", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "E.TEXT", @Image = "e.text"] @@ -265,7 +319,9 @@ | +- MergeInsertClause[@CanonicalImage = null] | +- Column[@CanonicalImage = "ID", @Image = "ID"] | | +- ID[@CanonicalImage = "ID", @Image = "ID"] +Added line: 2434 | +- Column[@CanonicalImage = "KEY1", @Image = "KEY1"] +Added line: 6973 | | +- ID[@CanonicalImage = "KEY1", @Image = "KEY1"] | +- Column[@CanonicalImage = "TEXT", @Image = "TEXT"] | | +- ID[@CanonicalImage = "TEXT", @Image = "TEXT"] @@ -273,18 +329,23 @@ | | +- ID[@CanonicalImage = "LCE_ID", @Image = "LCE_ID"] | +- ValuesClause[@CanonicalImage = null] | +- Expression[@CanonicalImage = "", @Image = ""] +Added line: 2298 | | +- PrimaryPrefix[@CanonicalImage = "", @Image = "", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "", @Image = ""] | | +- ID[@CanonicalImage = "JHS_SEQ", @Image = "JHS_SEQ"] | +- Expression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] | | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] +Added line: 3027 | | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"] +Added line: 9154 | +- Expression[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] +Added line: 7104 | | +- PrimaryPrefix[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] | | +- StringLiteral[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @String = "Edycja promocji nr"] | +- Expression[@CanonicalImage = "123123", @Image = "123123"] +Added line: 5538 | +- PrimaryPrefix[@CanonicalImage = "123123", @Image = "123123", @SelfModifier = false] | +- Literal[@CanonicalImage = "123123", @Image = "123123"] | +- NumericLiteral[@CanonicalImage = "123123", @Image = "123123"] @@ -293,15 +354,18 @@ | +- MergeStatement[@CanonicalImage = null] | +- TableName[@CanonicalImage = "B", @Image = "b"] | | +- ID[@CanonicalImage = "B", @Image = "b"] +Added line: 1158 | +- TableName[@CanonicalImage = "E", @Image = "e"] | | +- ID[@CanonicalImage = "E", @Image = "e"] | +- Condition[@CanonicalImage = null] | | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"] | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] +Added line: 1915 | | | +- SqlExpression[@CanonicalImage = "B.KEY1", @Image = "b.key1"] | | | | +- PrimaryPrefix[@CanonicalImage = "B.KEY1", @Image = "b.key1", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "B.KEY1", @Image = "b.key1"] | | | | +- TableName[@CanonicalImage = "B", @Image = "b"] +Added line: 4917 | | | | | +- ID[@CanonicalImage = "B", @Image = "b"] | | | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"] | | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"] @@ -313,13 +377,20 @@ | | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"] | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"] | | +- Condition[@CanonicalImage = null] +Added line: 4267 +Added line: 9079 +Added line: 7426 | | +- CompoundCondition[@CanonicalImage = null, @Type = null] +Added line: 9770 | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] +Added line: 8511 | | +- SqlExpression[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id"] | | | +- PrimaryPrefix[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id", @SelfModifier = false] +Added line: 3825 | | | +- SimpleExpression[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id"] | | | +- TableName[@CanonicalImage = "B", @Image = "b"] | | | | +- ID[@CanonicalImage = "B", @Image = "b"] +Added line: 2889 | | | +- Column[@CanonicalImage = "LCE_ID", @Image = "lce_id"] | | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"] | | +- SqlExpression[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id"] @@ -346,16 +417,19 @@ | | +- Expression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] | | | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] - | | | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"] - | | +- Expression[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] | | | +- PrimaryPrefix[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] +Added line: 3928 +Added line: 111 | | | +- StringLiteral[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @String = "Edycja promocji nr"] | | +- Expression[@CanonicalImage = "123123", @Image = "123123"] | | +- PrimaryPrefix[@CanonicalImage = "123123", @Image = "123123", @SelfModifier = false] | | +- Literal[@CanonicalImage = "123123", @Image = "123123"] +Added line: 1061 | | +- NumericLiteral[@CanonicalImage = "123123", @Image = "123123"] | +- MergeUpdateClause[@CanonicalImage = null] +Added line: 2147 +Added line: 2357 | +- TableName[@CanonicalImage = "B", @Image = "b"] | | +- ID[@CanonicalImage = "B", @Image = "b"] | +- Column[@CanonicalImage = "TEXT", @Image = "text"] @@ -363,12 +437,14 @@ | +- Expression[@CanonicalImage = "E.TEXT", @Image = "e.text"] | +- PrimaryPrefix[@CanonicalImage = "E.TEXT", @Image = "e.text", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "E.TEXT", @Image = "e.text"] +Added line: 8890 | +- TableName[@CanonicalImage = "E", @Image = "e"] | | +- ID[@CanonicalImage = "E", @Image = "e"] | +- Column[@CanonicalImage = "TEXT", @Image = "text"] | +- ID[@CanonicalImage = "TEXT", @Image = "text"] +- Statement[@CanonicalImage = null] +- UnlabelledStatement[@CanonicalImage = null] +Added line: 5029 +- MergeStatement[@CanonicalImage = null] +- TableName[@CanonicalImage = "B", @Image = "b"] | +- ID[@CanonicalImage = "B", @Image = "b"] @@ -382,8 +458,11 @@ | | | +- SimpleExpression[@CanonicalImage = "B.KEY1", @Image = "b.key1"] | | | +- TableName[@CanonicalImage = "B", @Image = "b"] | | | | +- ID[@CanonicalImage = "B", @Image = "b"] +Added line: 8199 | | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"] +Added line: 408 | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"] +Added line: 1752 | | +- SqlExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"] | | +- PrimaryPrefix[@CanonicalImage = "E.KEY1", @Image = "e.key1", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"] @@ -392,6 +471,7 @@ | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"] | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"] | +- Condition[@CanonicalImage = null] +Added line: 9345 | +- CompoundCondition[@CanonicalImage = null, @Type = null] | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] | +- SqlExpression[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id"] @@ -400,6 +480,7 @@ | | +- TableName[@CanonicalImage = "B", @Image = "b"] | | | +- ID[@CanonicalImage = "B", @Image = "b"] | | +- Column[@CanonicalImage = "LCE_ID", @Image = "lce_id"] +Added line: 4825 | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"] | +- SqlExpression[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id"] | +- PrimaryPrefix[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id", @SelfModifier = false] @@ -411,6 +492,7 @@ +- MergeUpdateClause[@CanonicalImage = null] | +- TableName[@CanonicalImage = "B", @Image = "b"] | | +- ID[@CanonicalImage = "B", @Image = "b"] +Added line: 8674 | +- Column[@CanonicalImage = "TEXT", @Image = "text"] | | +- ID[@CanonicalImage = "TEXT", @Image = "text"] | +- Expression[@CanonicalImage = "E.TEXT", @Image = "e.text"] @@ -424,15 +506,20 @@ +- SchemaName[@CanonicalImage = "B", @Image = "b"] | +- ID[@CanonicalImage = "B", @Image = "b"] +- Column[@CanonicalImage = "ID", @Image = "ID"] +Added line: 8407 | +- ID[@CanonicalImage = "ID", @Image = "ID"] +Added line: 7295 +- SchemaName[@CanonicalImage = "B", @Image = "b"] | +- ID[@CanonicalImage = "B", @Image = "b"] +Added line: 7622 +- Column[@CanonicalImage = "KEY1", @Image = "KEY1"] | +- ID[@CanonicalImage = "KEY1", @Image = "KEY1"] +Added line: 8037 +- SchemaName[@CanonicalImage = "B", @Image = "b"] | +- ID[@CanonicalImage = "B", @Image = "b"] +- Column[@CanonicalImage = "TEXT", @Image = "TEXT"] | +- ID[@CanonicalImage = "TEXT", @Image = "TEXT"] +Added line: 620 +- SchemaName[@CanonicalImage = "B", @Image = "b"] | +- ID[@CanonicalImage = "B", @Image = "b"] +- Column[@CanonicalImage = "LCE_ID", @Image = "LCE_ID"] @@ -440,17 +527,19 @@ +- ValuesClause[@CanonicalImage = null] +- Expression[@CanonicalImage = "", @Image = ""] | +- PrimaryPrefix[@CanonicalImage = "", @Image = "", @SelfModifier = false] - | +- SimpleExpression[@CanonicalImage = "", @Image = ""] | +- ID[@CanonicalImage = "JHS_SEQ", @Image = "JHS_SEQ"] +- Expression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false] +Added line: 3851 +Added line: 8308 | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"] | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"] +- Expression[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] - | +- PrimaryPrefix[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @SelfModifier = false] +Added line: 7161 | +- Literal[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"] | +- StringLiteral[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @String = "Edycja promocji nr"] +- Expression[@CanonicalImage = "123123", @Image = "123123"] +- PrimaryPrefix[@CanonicalImage = "123123", @Image = "123123", @SelfModifier = false] +- Literal[@CanonicalImage = "123123", @Image = "123123"] +Added line: 6640 +- NumericLiteral[@CanonicalImage = "123123", @Image = "123123"] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/OpenForStatement.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/OpenForStatement.txt index 2c73ca4685..692519d74b 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/OpenForStatement.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/OpenForStatement.txt @@ -2,13 +2,17 @@ +- Global[@CanonicalImage = null] | +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] | +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] +Added line: 6560 | | +- ObjectNameDeclaration[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] | | +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +Added line: 7417 | +- DeclarativeSection[@CanonicalImage = null] | | +- DeclarativeUnit[@CanonicalImage = null] | | | +- SubTypeDefinition[@CanonicalImage = "T_REF_CURSOR", @Image = "t_ref_cursor"] | | | +- QualifiedID[@CanonicalImage = "T_REF_CURSOR", @Image = "t_ref_cursor"] +Added line: 4338 | | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 3829 | | +- VariableOrConstantDeclaration[@CanonicalImage = null] | | +- VariableOrConstantDeclarator[@CanonicalImage = "L_REF_CURSOR T_REF_CURSOR", @Image = "l_ref_cursor t_ref_cursor"] | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_REF_CURSOR", @Image = "l_ref_cursor"] @@ -17,81 +21,108 @@ | | +- UnqualifiedID[@CanonicalImage = "T_REF_CURSOR", @Image = "t_ref_cursor"] | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 3363 +Added line: 5784 | | +- OpenStatement[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "L_REF_CURSOR", @Image = "l_ref_cursor"] | | | +- PrimaryPrefix[@CanonicalImage = "L_REF_CURSOR", @Image = "l_ref_cursor", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "L_REF_CURSOR", @Image = "l_ref_cursor"] +Added line: 3807 | | | +- Column[@CanonicalImage = "L_REF_CURSOR", @Image = "l_ref_cursor"] | | | +- ID[@CanonicalImage = "L_REF_CURSOR", @Image = "l_ref_cursor"] +Added line: 3106 | | +- SelectStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] +Added line: 3310 | | +- SelectList[@CanonicalImage = null] | | +- FromClause[@CanonicalImage = null] | | +- TableReference[@CanonicalImage = null] +Added line: 6817 | | +- TableName[@CanonicalImage = "DUAL", @Image = "DUAL"] Added line: 8875 +Added line: 5788 +Added line: 7574 +Added line: 8725 | | +- ID[@CanonicalImage = "DUAL", @Image = "DUAL"] | +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +Added line: 4632 +- Global[@CanonicalImage = null] +Added line: 8147 +- Block[@CanonicalImage = null] +- DeclarativeSection[@CanonicalImage = null] | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 5628 | | +- VariableOrConstantDeclaration[@CanonicalImage = null] | | +- VariableOrConstantDeclarator[@CanonicalImage = "CV SYS_REFCURSOR", @Image = "cv SYS_REFCURSOR"] | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "CV", @Image = "cv"] +Added line: 9939 +Added line: 1842 Added line: 8226 | | | +- ID[@CanonicalImage = "CV", @Image = "cv"] | | +- Datatype[@CanonicalImage = "SYS_REFCURSOR", @Image = "SYS_REFCURSOR", @TypeImage = "SYS_REFCURSOR"] | | +- ScalarDataTypeName[@CanonicalImage = "SYS_REFCURSOR", @Image = "SYS_REFCURSOR"] +Added line: 4002 | +- DeclarativeUnit[@CanonicalImage = null] | | +- VariableOrConstantDeclaration[@CanonicalImage = null] +Added line: 5028 | | +- VariableOrConstantDeclarator[@CanonicalImage = "V_LASTNAME EMPLOYEES.LAST_NAME%TYPE", @Image = "v_lastname employees.last_name%TYPE"] | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "V_LASTNAME", @Image = "v_lastname"] +Added line: 5496 | | | +- ID[@CanonicalImage = "V_LASTNAME", @Image = "v_lastname"] | | +- Datatype[@CanonicalImage = "EMPLOYEES.LAST_NAME%TYPE", @Image = "employees.last_name%TYPE", @TypeImage = "employees.last_name%TYPE"] +Added line: 8064 | | +- QualifiedName[@CanonicalImage = "EMPLOYEES.LAST_NAME", @Image = "employees.last_name"] | | +- UnqualifiedID[@CanonicalImage = "EMPLOYEES", @Image = "employees"] +Added line: 1048 | | +- QualifiedID[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 2900 | | +- VariableOrConstantDeclaration[@CanonicalImage = null] | | +- VariableOrConstantDeclarator[@CanonicalImage = "V_JOBID EMPLOYEES.JOB_ID%TYPE", @Image = "v_jobid employees.job_id%TYPE"] | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "V_JOBID", @Image = "v_jobid"] | | | +- ID[@CanonicalImage = "V_JOBID", @Image = "v_jobid"] | | +- Datatype[@CanonicalImage = "EMPLOYEES.JOB_ID%TYPE", @Image = "employees.job_id%TYPE", @TypeImage = "employees.job_id%TYPE"] | | +- QualifiedName[@CanonicalImage = "EMPLOYEES.JOB_ID", @Image = "employees.job_id"] - | | +- UnqualifiedID[@CanonicalImage = "EMPLOYEES", @Image = "employees"] +Added line: 217 +Added line: 741 | | +- QualifiedID[@CanonicalImage = "JOB_ID", @Image = "job_id"] | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 5966 | | +- VariableOrConstantDeclaration[@CanonicalImage = null] | | +- VariableOrConstantDeclarator[@CanonicalImage = "QUERY_2 VARCHAR2(200) := \'SELECT * FROM EMPLOYEES\n WHERE REGEXP_LIKE (JOB_ID, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY JOB_ID\'", @Image = "query_2 VARCHAR2(200) := \'SELECT * FROM employees\n WHERE REGEXP_LIKE (job_id, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY job_id\'"] | | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "QUERY_2", @Image = "query_2"] | | | +- ID[@CanonicalImage = "QUERY_2", @Image = "query_2"] +Added line: 7820 | | +- Datatype[@CanonicalImage = "VARCHAR2(200)", @Image = "VARCHAR2(200)", @TypeImage = "VARCHAR2(200)"] | | | +- ScalarDataTypeName[@CanonicalImage = "VARCHAR2(200)", @Image = "VARCHAR2(200)"] | | | +- NumericLiteral[@CanonicalImage = "200", @Image = "200"] | | +- VariableOrConstantInitializer[@CanonicalImage = "\'SELECT * FROM EMPLOYEES\n WHERE REGEXP_LIKE (JOB_ID, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY JOB_ID\'", @Image = "\'SELECT * FROM employees\n WHERE REGEXP_LIKE (job_id, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY job_id\'"] | | +- Expression[@CanonicalImage = "\'SELECT * FROM EMPLOYEES\n WHERE REGEXP_LIKE (JOB_ID, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY JOB_ID\'", @Image = "\'SELECT * FROM employees\n WHERE REGEXP_LIKE (job_id, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY job_id\'"] | | +- PrimaryPrefix[@CanonicalImage = "\'SELECT * FROM EMPLOYEES\n WHERE REGEXP_LIKE (JOB_ID, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY JOB_ID\'", @Image = "\'SELECT * FROM employees\n WHERE REGEXP_LIKE (job_id, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY job_id\'", @SelfModifier = false] - | | +- Literal[@CanonicalImage = "\'SELECT * FROM EMPLOYEES\n WHERE REGEXP_LIKE (JOB_ID, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY JOB_ID\'", @Image = "\'SELECT * FROM employees\n WHERE REGEXP_LIKE (job_id, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY job_id\'"] +Added line: 643 | | +- StringLiteral[@CanonicalImage = "\'SELECT * FROM EMPLOYEES\n WHERE REGEXP_LIKE (JOB_ID, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY JOB_ID\'", @Image = "\'SELECT * FROM employees\n WHERE REGEXP_LIKE (job_id, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY job_id\'", @String = "SELECT * FROM employees\n WHERE REGEXP_LIKE (job_id, \'\'[ACADFIMKSA]_M[ANGR]\'\')\n ORDER BY job_id"] | +- DeclarativeUnit[@CanonicalImage = null] | +- VariableOrConstantDeclaration[@CanonicalImage = null] | +- VariableOrConstantDeclarator[@CanonicalImage = "V_EMPLOYEES EMPLOYEES%ROWTYPE", @Image = "v_employees employees%ROWTYPE"] | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "V_EMPLOYEES", @Image = "v_employees"] | | +- ID[@CanonicalImage = "V_EMPLOYEES", @Image = "v_employees"] +Added line: 5029 | +- QualifiedName[@CanonicalImage = "EMPLOYEES", @Image = "employees"] | +- UnqualifiedID[@CanonicalImage = "EMPLOYEES", @Image = "employees"] +- Statement[@CanonicalImage = null] +Added line: 4544 | +- UnlabelledStatement[@CanonicalImage = null] | +- OpenStatement[@CanonicalImage = null] - | +- Expression[@CanonicalImage = "CV", @Image = "cv"] | | +- PrimaryPrefix[@CanonicalImage = "CV", @Image = "cv", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "CV", @Image = "cv"] | | +- Column[@CanonicalImage = "CV", @Image = "cv"] | | +- ID[@CanonicalImage = "CV", @Image = "cv"] +Added line: 3969 | +- SelectStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | +- SelectList[@CanonicalImage = null] | | +- SqlExpression[@CanonicalImage = "LAST_NAME", @Image = "last_name"] +Added line: 7948 | | | +- PrimaryPrefix[@CanonicalImage = "LAST_NAME", @Image = "last_name", @SelfModifier = false] +Added line: 5270 | | | +- SimpleExpression[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | +- Column[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | +- ID[@CanonicalImage = "LAST_NAME", @Image = "last_name"] @@ -103,61 +134,85 @@ Added line: 8226 | +- FromClause[@CanonicalImage = null] | | +- TableReference[@CanonicalImage = null] | | +- TableName[@CanonicalImage = "EMPLOYEES", @Image = "employees"] +Added line: 7248 | | +- ID[@CanonicalImage = "EMPLOYEES", @Image = "employees"] | +- WhereClause[@CanonicalImage = null] | | +- Condition[@CanonicalImage = null] | | +- CompoundCondition[@CanonicalImage = null, @Type = null] | | +- RegexpLikeCondition[@CanonicalImage = null, @MatchParam = null] | | +- SqlExpression[@CanonicalImage = "JOB_ID", @Image = "job_id"] +Added line: 6349 | | | +- PrimaryPrefix[@CanonicalImage = "JOB_ID", @Image = "job_id", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "JOB_ID", @Image = "job_id"] | | | +- Column[@CanonicalImage = "JOB_ID", @Image = "job_id"] | | | +- ID[@CanonicalImage = "JOB_ID", @Image = "job_id"] | | +- SqlExpression[@CanonicalImage = "\'S[HT]_CLERK\'", @Image = "\'S[HT]_CLERK\'"] +Added line: 1411 | | +- PrimaryPrefix[@CanonicalImage = "\'S[HT]_CLERK\'", @Image = "\'S[HT]_CLERK\'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\'S[HT]_CLERK\'", @Image = "\'S[HT]_CLERK\'"] | | +- StringLiteral[@CanonicalImage = "\'S[HT]_CLERK\'", @Image = "\'S[HT]_CLERK\'", @String = "S[HT]_CLERK"] | +- OrderByClause[@CanonicalImage = null] +Added line: 726 +Added line: 9508 | +- SqlExpression[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | +- PrimaryPrefix[@CanonicalImage = "LAST_NAME", @Image = "last_name", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "LAST_NAME", @Image = "last_name"] +Added line: 3673 | +- Column[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | +- ID[@CanonicalImage = "LAST_NAME", @Image = "last_name"] +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] | +- LoopStatement[@CanonicalImage = null] +Added line: 8330 +Added line: 2265 +Added line: 1176 | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] | | +- FetchStatement[@BulkCollect = false, @CanonicalImage = null, @Limit = false] | | +- QualifiedName[@CanonicalImage = "CV", @Image = "cv"] +Added line: 1822 +Added line: 804 | | | +- UnqualifiedID[@CanonicalImage = "CV", @Image = "cv"] +Added line: 9050 | | +- Expression[@CanonicalImage = "V_LASTNAME", @Image = "v_lastname"] | | | +- PrimaryPrefix[@CanonicalImage = "V_LASTNAME", @Image = "v_lastname", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "V_LASTNAME", @Image = "v_lastname"] -Added line: 982 +Added line: 2879 +Added line: 5457 | | | +- Column[@CanonicalImage = "V_LASTNAME", @Image = "v_lastname"] | | | +- ID[@CanonicalImage = "V_LASTNAME", @Image = "v_lastname"] | | +- Expression[@CanonicalImage = "V_JOBID", @Image = "v_jobid"] | | +- PrimaryPrefix[@CanonicalImage = "V_JOBID", @Image = "v_jobid", @SelfModifier = false] +Added line: 4463 | | +- SimpleExpression[@CanonicalImage = "V_JOBID", @Image = "v_jobid"] | | +- Column[@CanonicalImage = "V_JOBID", @Image = "v_jobid"] +Added line: 3359 | | +- ID[@CanonicalImage = "V_JOBID", @Image = "v_jobid"] | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 3834 +Added line: 7826 | | +- ExitStatement[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "CV%NOTFOUND", @Image = "cv%NOTFOUND"] | | +- PrimaryPrefix[@CanonicalImage = "CV%NOTFOUND", @Image = "cv%NOTFOUND", @SelfModifier = false] +Added line: 2149 | | +- SimpleExpression[@CanonicalImage = "CV%NOTFOUND", @Image = "cv%NOTFOUND"] +Added line: 8391 +Added line: 7401 | | +- Column[@CanonicalImage = "CV", @Image = "cv"] | | +- ID[@CanonicalImage = "CV", @Image = "cv"] | +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 9078 +Added line: 4569 | +- Expression[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.PUT_LINE"] | +- PrimaryPrefix[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.PUT_LINE", @SelfModifier = false] Added line: 3551 +Added line: 6412 | +- FunctionCall[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.PUT_LINE"] | +- FunctionName[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.PUT_LINE"] | | +- ID[@CanonicalImage = "DBMS_OUTPUT", @Image = "DBMS_OUTPUT"] +Added line: 7256 Added line: 2648 | | +- ID[@CanonicalImage = "PUT_LINE", @Image = "PUT_LINE"] | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] @@ -167,16 +222,22 @@ Added line: 2648 | +- AdditiveExpression[@CanonicalImage = "RPAD || V_JOBID", @Image = "RPAD || v_jobid"] | +- PrimaryPrefix[@CanonicalImage = "RPAD", @Image = "RPAD", @SelfModifier = false] | | +- FunctionCall[@CanonicalImage = "RPAD", @Image = "RPAD"] +Added line: 215 | | +- FunctionName[@CanonicalImage = "RPAD", @Image = "RPAD"] | | | +- ID[@CanonicalImage = "RPAD", @Image = "RPAD"] | | +- Arguments[@ArgumentCount = 3, @CanonicalImage = null] +Added line: 7507 +Added line: 4395 | | +- ArgumentList[@CanonicalImage = null] +Added line: 1544 | | +- Argument[@CanonicalImage = null] | | | +- Expression[@CanonicalImage = "V_LASTNAME", @Image = "v_lastname"] | | | +- PrimaryPrefix[@CanonicalImage = "V_LASTNAME", @Image = "v_lastname", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "V_LASTNAME", @Image = "v_lastname"] | | | +- Column[@CanonicalImage = "V_LASTNAME", @Image = "v_lastname"] +Added line: 6541 | | | +- ID[@CanonicalImage = "V_LASTNAME", @Image = "v_lastname"] +Added line: 4405 | | +- Argument[@CanonicalImage = null] | | | +- Expression[@CanonicalImage = "25", @Image = "25"] | | | +- Literal[@CanonicalImage = "25", @Image = "25"] @@ -184,33 +245,45 @@ Added line: 2648 | | +- Argument[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "\' \'", @Image = "\' \'"] | | +- PrimaryPrefix[@CanonicalImage = "\' \'", @Image = "\' \'", @SelfModifier = false] +Added line: 2400 +Added line: 7300 | | +- Literal[@CanonicalImage = "\' \'", @Image = "\' \'"] | +- PrimaryPrefix[@CanonicalImage = "V_JOBID", @Image = "v_jobid", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "V_JOBID", @Image = "v_jobid"] Added line: 4756 | +- Column[@CanonicalImage = "V_JOBID", @Image = "v_jobid"] +Added line: 4832 | +- ID[@CanonicalImage = "V_JOBID", @Image = "v_jobid"] +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] | +- Expression[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.PUT_LINE"] | +- PrimaryPrefix[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.PUT_LINE", @SelfModifier = false] +Added line: 9056 | +- FunctionCall[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.PUT_LINE"] +Added line: 9536 | +- FunctionName[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.PUT_LINE"] | | +- ID[@CanonicalImage = "DBMS_OUTPUT", @Image = "DBMS_OUTPUT"] +Added line: 8703 | | +- ID[@CanonicalImage = "PUT_LINE", @Image = "PUT_LINE"] | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | +- ArgumentList[@CanonicalImage = null] | +- Argument[@CanonicalImage = null] | +- Expression[@CanonicalImage = "\'-------------------------------------\'", @Image = "\'-------------------------------------\'"] | +- PrimaryPrefix[@CanonicalImage = "\'-------------------------------------\'", @Image = "\'-------------------------------------\'", @SelfModifier = false] - | +- Literal[@CanonicalImage = "\'-------------------------------------\'", @Image = "\'-------------------------------------\'"] +Added line: 1307 | +- StringLiteral[@CanonicalImage = "\'-------------------------------------\'", @Image = "\'-------------------------------------\'", @String = "-------------------------------------"] +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] | +- OpenStatement[@CanonicalImage = null] | +- Expression[@CanonicalImage = "CV", @Image = "cv"] +Added line: 5004 +Added line: 9201 +Added line: 609 | | +- PrimaryPrefix[@CanonicalImage = "CV", @Image = "cv", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "CV", @Image = "cv"] +Added line: 3498 +Added line: 8358 +Added line: 7897 | | +- Column[@CanonicalImage = "CV", @Image = "cv"] | | +- ID[@CanonicalImage = "CV", @Image = "cv"] | +- Expression[@CanonicalImage = "QUERY_2", @Image = "query_2"] @@ -219,8 +292,11 @@ Added line: 4756 | +- Column[@CanonicalImage = "QUERY_2", @Image = "query_2"] | +- ID[@CanonicalImage = "QUERY_2", @Image = "query_2"] +- Statement[@CanonicalImage = null] +Added line: 6815 | +- UnlabelledStatement[@CanonicalImage = null] | +- LoopStatement[@CanonicalImage = null] +Added line: 9054 +Added line: 3104 | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] | | +- FetchStatement[@BulkCollect = false, @CanonicalImage = null, @Limit = false] @@ -228,15 +304,20 @@ Added line: 4756 | | | +- UnqualifiedID[@CanonicalImage = "CV", @Image = "cv"] | | +- Expression[@CanonicalImage = "V_EMPLOYEES", @Image = "v_employees"] | | +- PrimaryPrefix[@CanonicalImage = "V_EMPLOYEES", @Image = "v_employees", @SelfModifier = false] +Added line: 4483 +Added line: 5820 +Added line: 1472 | | +- SimpleExpression[@CanonicalImage = "V_EMPLOYEES", @Image = "v_employees"] | | +- Column[@CanonicalImage = "V_EMPLOYEES", @Image = "v_employees"] | | +- ID[@CanonicalImage = "V_EMPLOYEES", @Image = "v_employees"] | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "CV%NOTFOUND", @Image = "cv%NOTFOUND"] +Added line: 8880 | | +- PrimaryPrefix[@CanonicalImage = "CV%NOTFOUND", @Image = "cv%NOTFOUND", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "CV%NOTFOUND", @Image = "cv%NOTFOUND"] | | +- ID[@CanonicalImage = "CV", @Image = "cv"] +Added line: 3638 Added line: 9901 | +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] @@ -248,6 +329,7 @@ Added line: 9901 | | +- ID[@CanonicalImage = "PUT_LINE", @Image = "PUT_LINE"] | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | +- ArgumentList[@CanonicalImage = null] +Added line: 2902 | +- Argument[@CanonicalImage = null] | +- Expression[@CanonicalImage = "RPAD || V_EMPLOYEES.JOB_ID", @Image = "RPAD || v_employees.job_id"] Added line: 2974 @@ -256,26 +338,31 @@ Added line: 2974 | | +- FunctionName[@CanonicalImage = "RPAD", @Image = "RPAD"] | | | +- ID[@CanonicalImage = "RPAD", @Image = "RPAD"] | | +- Arguments[@ArgumentCount = 3, @CanonicalImage = null] +Added line: 4503 | | +- ArgumentList[@CanonicalImage = null] | | +- Argument[@CanonicalImage = null] | | | +- Expression[@CanonicalImage = "V_EMPLOYEES.LAST_NAME", @Image = "v_employees.last_name"] | | | +- PrimaryPrefix[@CanonicalImage = "V_EMPLOYEES.LAST_NAME", @Image = "v_employees.last_name", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "V_EMPLOYEES.LAST_NAME", @Image = "v_employees.last_name"] +Added line: 8142 | | | +- TableName[@CanonicalImage = "V_EMPLOYEES", @Image = "v_employees"] - | | | | +- ID[@CanonicalImage = "V_EMPLOYEES", @Image = "v_employees"] | | | +- Column[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | +- ID[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | +- Argument[@CanonicalImage = null] - | | | +- Expression[@CanonicalImage = "25", @Image = "25"] +Added line: 9732 | | | +- PrimaryPrefix[@CanonicalImage = "25", @Image = "25", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "25", @Image = "25"] Added line: 300 +Added line: 6576 | | | +- NumericLiteral[@CanonicalImage = "25", @Image = "25"] +Added line: 1256 | | +- Argument[@CanonicalImage = null] Added line: 7106 | | +- Expression[@CanonicalImage = "\' \'", @Image = "\' \'"] +Added line: 8658 | | +- PrimaryPrefix[@CanonicalImage = "\' \'", @Image = "\' \'", @SelfModifier = false] | | +- Literal[@CanonicalImage = "\' \'", @Image = "\' \'"] +Added line: 6615 | +- PrimaryPrefix[@CanonicalImage = "V_EMPLOYEES.JOB_ID", @Image = "v_employees.job_id", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "V_EMPLOYEES.JOB_ID", @Image = "v_employees.job_id"] | +- TableName[@CanonicalImage = "V_EMPLOYEES", @Image = "v_employees"] @@ -285,5 +372,7 @@ Added line: 7106 +- Statement[@CanonicalImage = null] +- UnlabelledStatement[@CanonicalImage = null] +- CloseStatement[@CanonicalImage = "CV", @Image = "cv"] +Added line: 1001 +- QualifiedName[@CanonicalImage = "CV", @Image = "cv"] +- UnqualifiedID[@CanonicalImage = "CV", @Image = "cv"] +Added line: 1225 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup0.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup0.txt index 2eca5d68c1..0c699012bd 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup0.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup0.txt @@ -2,44 +2,62 @@ +- Global[@CanonicalImage = null] +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] +Added line: 1576 +Added line: 8268 | +- ObjectNameDeclaration[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +Added line: 7887 +Added line: 4907 +Added line: 4436 | +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +- DeclarativeSection[@CanonicalImage = null] | +- DeclarativeUnit[@CanonicalImage = null] | +- CursorSpecification[@CanonicalImage = null] | +- CursorUnit[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] +Added line: 2202 | +- ID[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] +Added line: 4727 +Added line: 3176 | +- SelectStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | +- SelectList[@CanonicalImage = null] | | +- SqlExpression[@CanonicalImage = "A.OWNER", @Image = "a.owner"] | | | +- SimpleExpression[@CanonicalImage = "A.OWNER", @Image = "a.owner"] +Added line: 3342 | | | +- TableName[@CanonicalImage = "A", @Image = "a"] | | | | +- ID[@CanonicalImage = "A", @Image = "a"] - | | | +- ID[@CanonicalImage = "OWNER", @Image = "owner"] | | +- SqlExpression[@CanonicalImage = "U.OBJECT_NAME", @Image = "u.object_name"] | | | +- PrimaryPrefix[@CanonicalImage = "U.OBJECT_NAME", @Image = "u.object_name", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "U.OBJECT_NAME", @Image = "u.object_name"] | | | +- TableName[@CanonicalImage = "U", @Image = "u"] | | | | +- ID[@CanonicalImage = "U", @Image = "u"] | | | +- Column[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] +Added line: 4589 +Added line: 2511 | | | +- ID[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | | +- SqlExpression[@CanonicalImage = "P.AGGREGATE", @Image = "p.aggregate"] +Added line: 6147 +Added line: 9121 | | +- PrimaryPrefix[@CanonicalImage = "P.AGGREGATE", @Image = "p.aggregate", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "P.AGGREGATE", @Image = "p.aggregate"] | | +- TableName[@CanonicalImage = "P", @Image = "p"] | | | +- ID[@CanonicalImage = "P", @Image = "p"] +Added line: 777 +Added line: 2540 | | +- Column[@CanonicalImage = "AGGREGATE", @Image = "aggregate"] | | +- ID[@CanonicalImage = "AGGREGATE", @Image = "aggregate"] | +- FromClause[@CanonicalImage = null] | | +- JoinClause[@CanonicalImage = null] | | +- TableReference[@CanonicalImage = null] | | | +- TableName[@CanonicalImage = "USER_OBJECTS", @Image = "USER_OBJECTS"] +Added line: 1122 | | | | +- ID[@CanonicalImage = "USER_OBJECTS", @Image = "USER_OBJECTS"] | | | +- TableAlias[@CanonicalImage = "U", @Image = "u"] | | | | +- ID[@CanonicalImage = "U", @Image = "u"] | | | +- TableAlias[@CanonicalImage = "INNER", @Image = "INNER"] +Added line: 2866 | | | +- ID[@CanonicalImage = "INNER", @Image = "INNER"] +Added line: 3386 | | +- InnerCrossJoinClause[@CanonicalImage = null, @Cross = false, @Natural = false] +Added line: 3675 | | | +- TableReference[@CanonicalImage = null] | | | | +- TableName[@CanonicalImage = "ALL_OBJECTS", @Image = "ALL_OBJECTS"] | | | | | +- ID[@CanonicalImage = "ALL_OBJECTS", @Image = "ALL_OBJECTS"] @@ -48,131 +66,183 @@ | | | +- ConditionalAndExpression[@CanonicalImage = "U.OBJECT_NAME = A.OBJECT_NAME AND U.OBJECT_TYPE = A.OBJECT_TYPE AND U.OBJECT_ID = A.OBJECT_ID", @Image = "u.object_name = a.object_name AND u.object_type = a.object_type AND u.object_id = a.object_id"] | | | +- EqualityExpression[@CanonicalImage = "U.OBJECT_NAME = A.OBJECT_NAME", @Image = "u.object_name = a.object_name"] | | | | +- PrimaryPrefix[@CanonicalImage = "U.OBJECT_NAME", @Image = "u.object_name", @SelfModifier = false] +Added line: 2805 | | | | | +- SimpleExpression[@CanonicalImage = "U.OBJECT_NAME", @Image = "u.object_name"] | | | | | +- TableName[@CanonicalImage = "U", @Image = "u"] | | | | | | +- ID[@CanonicalImage = "U", @Image = "u"] +Added line: 3393 +Added line: 201 | | | | | +- Column[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | | | | | +- ID[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] +Added line: 2617 | | | | +- PrimaryPrefix[@CanonicalImage = "A.OBJECT_NAME", @Image = "a.object_name", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "A.OBJECT_NAME", @Image = "a.object_name"] | | | | +- TableName[@CanonicalImage = "A", @Image = "a"] | | | | | +- ID[@CanonicalImage = "A", @Image = "a"] | | | | +- Column[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] +Added line: 796 +Added line: 7273 | | | | +- ID[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] +Added line: 8467 +Added line: 2571 +Added line: 6005 | | | +- EqualityExpression[@CanonicalImage = "U.OBJECT_TYPE = A.OBJECT_TYPE", @Image = "u.object_type = a.object_type"] | | | | +- PrimaryPrefix[@CanonicalImage = "U.OBJECT_TYPE", @Image = "u.object_type", @SelfModifier = false] Added line: 5404 +Added line: 1633 | | | | | +- SimpleExpression[@CanonicalImage = "U.OBJECT_TYPE", @Image = "u.object_type"] | | | | | +- TableName[@CanonicalImage = "U", @Image = "u"] +Added line: 7215 | | | | | | +- ID[@CanonicalImage = "U", @Image = "u"] +Added line: 5307 +Added line: 1123 | | | | | +- Column[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] | | | | | +- ID[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] | | | | +- PrimaryPrefix[@CanonicalImage = "A.OBJECT_TYPE", @Image = "a.object_type", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "A.OBJECT_TYPE", @Image = "a.object_type"] | | | | +- TableName[@CanonicalImage = "A", @Image = "a"] | | | | | +- ID[@CanonicalImage = "A", @Image = "a"] +Added line: 9167 | | | | +- Column[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] | | | | +- ID[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] | | | +- EqualityExpression[@CanonicalImage = "U.OBJECT_ID = A.OBJECT_ID", @Image = "u.object_id = a.object_id"] +Added line: 3203 +Added line: 589 +Added line: 9216 | | | +- PrimaryPrefix[@CanonicalImage = "U.OBJECT_ID", @Image = "u.object_id", @SelfModifier = false] +Added line: 738 | | | | +- SimpleExpression[@CanonicalImage = "U.OBJECT_ID", @Image = "u.object_id"] +Added line: 8326 +Added line: 6980 | | | | +- TableName[@CanonicalImage = "U", @Image = "u"] | | | | | +- ID[@CanonicalImage = "U", @Image = "u"] | | | | +- Column[@CanonicalImage = "OBJECT_ID", @Image = "object_id"] +Added line: 4606 | | | | +- ID[@CanonicalImage = "OBJECT_ID", @Image = "object_id"] +Added line: 5439 | | | +- PrimaryPrefix[@CanonicalImage = "A.OBJECT_ID", @Image = "a.object_id", @SelfModifier = false] +Added line: 8027 +Added line: 5881 | | | +- SimpleExpression[@CanonicalImage = "A.OBJECT_ID", @Image = "a.object_id"] | | | +- TableName[@CanonicalImage = "A", @Image = "a"] | | | | +- ID[@CanonicalImage = "A", @Image = "a"] +Added line: 8031 | | | +- Column[@CanonicalImage = "OBJECT_ID", @Image = "object_id"] | | | +- ID[@CanonicalImage = "OBJECT_ID", @Image = "object_id"] +Added line: 8683 | | +- InnerCrossJoinClause[@CanonicalImage = null, @Cross = false, @Natural = false] - | | +- TableReference[@CanonicalImage = null] +Added line: 8014 +Added line: 3006 | | | +- TableName[@CanonicalImage = "ALL_PROCEDURES", @Image = "ALL_PROCEDURES"] | | | | +- ID[@CanonicalImage = "ALL_PROCEDURES", @Image = "ALL_PROCEDURES"] | | | +- TableAlias[@CanonicalImage = "P", @Image = "p"] +Added line: 650 +Added line: 3429 | | | +- ID[@CanonicalImage = "P", @Image = "p"] | | +- ConditionalAndExpression[@CanonicalImage = "P.OWNER = A.OWNER AND P.OBJECT_NAME = A.OBJECT_NAME AND P.OBJECT_TYPE = A.OBJECT_TYPE", @Image = "p.owner = a.owner AND p.object_name = a.object_name AND p.object_type = a.object_type"] | | +- EqualityExpression[@CanonicalImage = "P.OWNER = A.OWNER", @Image = "p.owner = a.owner"] +Added line: 9305 +Added line: 3713 | | | +- PrimaryPrefix[@CanonicalImage = "P.OWNER", @Image = "p.owner", @SelfModifier = false] +Added line: 9163 +Added line: 8109 | | | | +- SimpleExpression[@CanonicalImage = "P.OWNER", @Image = "p.owner"] - | | | | +- TableName[@CanonicalImage = "P", @Image = "p"] +Added line: 8898 +Added line: 9252 | | | | | +- ID[@CanonicalImage = "P", @Image = "p"] | | | | +- Column[@CanonicalImage = "OWNER", @Image = "owner"] +Added line: 3962 | | | | +- ID[@CanonicalImage = "OWNER", @Image = "owner"] | | | +- PrimaryPrefix[@CanonicalImage = "A.OWNER", @Image = "a.owner", @SelfModifier = false] +Added line: 9121 | | | +- SimpleExpression[@CanonicalImage = "A.OWNER", @Image = "a.owner"] +Added line: 6678 +Added line: 7018 | | | +- TableName[@CanonicalImage = "A", @Image = "a"] | | | | +- ID[@CanonicalImage = "A", @Image = "a"] | | | +- Column[@CanonicalImage = "OWNER", @Image = "owner"] | | | +- ID[@CanonicalImage = "OWNER", @Image = "owner"] | | +- EqualityExpression[@CanonicalImage = "P.OBJECT_NAME = A.OBJECT_NAME", @Image = "p.object_name = a.object_name"] | | | +- PrimaryPrefix[@CanonicalImage = "P.OBJECT_NAME", @Image = "p.object_name", @SelfModifier = false] - | | | | +- SimpleExpression[@CanonicalImage = "P.OBJECT_NAME", @Image = "p.object_name"] | | | | +- TableName[@CanonicalImage = "P", @Image = "p"] | | | | | +- ID[@CanonicalImage = "P", @Image = "p"] Added line: 4488 +Added line: 48 Added line: 782 +Added line: 9260 +Added line: 5673 | | | | +- Column[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | | | | +- ID[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | | | +- PrimaryPrefix[@CanonicalImage = "A.OBJECT_NAME", @Image = "a.object_name", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "A.OBJECT_NAME", @Image = "a.object_name"] | | | +- TableName[@CanonicalImage = "A", @Image = "a"] - | | | | +- ID[@CanonicalImage = "A", @Image = "a"] | | | +- Column[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | | | +- ID[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | | +- EqualityExpression[@CanonicalImage = "P.OBJECT_TYPE = A.OBJECT_TYPE", @Image = "p.object_type = a.object_type"] +Added line: 4584 | | +- PrimaryPrefix[@CanonicalImage = "P.OBJECT_TYPE", @Image = "p.object_type", @SelfModifier = false] +Added line: 5497 | | | +- SimpleExpression[@CanonicalImage = "P.OBJECT_TYPE", @Image = "p.object_type"] | | | +- TableName[@CanonicalImage = "P", @Image = "p"] | | | | +- ID[@CanonicalImage = "P", @Image = "p"] +Added line: 6827 | | | +- Column[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] +Added line: 8718 | | | +- ID[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] | | +- PrimaryPrefix[@CanonicalImage = "A.OBJECT_TYPE", @Image = "a.object_type", @SelfModifier = false] +Added line: 3849 | | +- SimpleExpression[@CanonicalImage = "A.OBJECT_TYPE", @Image = "a.object_type"] | | +- TableName[@CanonicalImage = "A", @Image = "a"] - | | | +- ID[@CanonicalImage = "A", @Image = "a"] +Added line: 8595 | | +- Column[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] | | +- ID[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] | +- WhereClause[@CanonicalImage = null] +Added line: 5820 | +- Condition[@CanonicalImage = null] | +- CompoundCondition[@CanonicalImage = null, @Type = null] | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] +Added line: 5585 | +- SqlExpression[@CanonicalImage = "A.OWNER", @Image = "a.owner"] | | +- PrimaryPrefix[@CanonicalImage = "A.OWNER", @Image = "a.owner", @SelfModifier = false] +Added line: 330 | | +- SimpleExpression[@CanonicalImage = "A.OWNER", @Image = "a.owner"] - | | +- TableName[@CanonicalImage = "A", @Image = "a"] | | | +- ID[@CanonicalImage = "A", @Image = "a"] | | +- Column[@CanonicalImage = "OWNER", @Image = "owner"] | | +- ID[@CanonicalImage = "OWNER", @Image = "owner"] | +- SqlExpression[@CanonicalImage = "USER", @Image = "USER"] +Added line: 6830 | +- PrimaryPrefix[@CanonicalImage = "USER", @Image = "USER", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "USER", @Image = "USER"] | +- Column[@CanonicalImage = "USER", @Image = "USER"] | +- ID[@CanonicalImage = "USER", @Image = "USER"] +- Statement[@CanonicalImage = null] +Added line: 8747 | +- UnlabelledStatement[@CanonicalImage = null] | +- ForStatement[@CanonicalImage = null] | +- ForIndex[@CanonicalImage = "L_OBJECT", @Image = "l_object"] | | +- ID[@CanonicalImage = "L_OBJECT", @Image = "l_object"] +Added line: 471 | +- Expression[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] | | +- PrimaryPrefix[@CanonicalImage = "C_EXAMPLE", @Image = "c_example", @SelfModifier = false] - | | +- SimpleExpression[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] | | +- Column[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] | | +- ID[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | +- PrimaryPrefix[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line", @SelfModifier = false] +Added line: 1305 | | +- FunctionCall[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] +Added line: 4754 | | +- FunctionName[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | | +- ID[@CanonicalImage = "DBMS_OUTPUT", @Image = "DBMS_OUTPUT"] +Added line: 8999 | | | +- ID[@CanonicalImage = "PUT_LINE", @Image = "Put_Line"] | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | +- ArgumentList[@CanonicalImage = null] | | +- Argument[@CanonicalImage = null] | | +- Expression[@CanonicalImage = "L_OBJECT.OWNER", @Image = "l_object.owner"] | | +- PrimaryPrefix[@CanonicalImage = "L_OBJECT.OWNER", @Image = "l_object.owner", @SelfModifier = false] +Added line: 7007 | | +- SimpleExpression[@CanonicalImage = "L_OBJECT.OWNER", @Image = "l_object.owner"] | | +- TableName[@CanonicalImage = "L_OBJECT", @Image = "l_object"] Added line: 5103 @@ -186,9 +256,14 @@ Added line: 5103 | | +- FunctionCall[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | +- FunctionName[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | | +- ID[@CanonicalImage = "DBMS_OUTPUT", @Image = "DBMS_OUTPUT"] +Added line: 7912 | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | +- ArgumentList[@CanonicalImage = null] +Added line: 5110 | | +- Argument[@CanonicalImage = null] +Added line: 4394 +Added line: 7498 +Added line: 6841 | | +- Expression[@CanonicalImage = "L_OBJECT.OBJECT_NAME", @Image = "l_object.object_name"] | | +- PrimaryPrefix[@CanonicalImage = "L_OBJECT.OBJECT_NAME", @Image = "l_object.object_name", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "L_OBJECT.OBJECT_NAME", @Image = "l_object.object_name"] @@ -200,19 +275,33 @@ Added line: 5103 | +- UnlabelledStatement[@CanonicalImage = null] | +- Expression[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | +- PrimaryPrefix[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line", @SelfModifier = false] +Added line: 9918 | +- FunctionCall[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | +- FunctionName[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] +Added line: 139 +Added line: 7812 | | +- ID[@CanonicalImage = "DBMS_OUTPUT", @Image = "DBMS_OUTPUT"] +Added line: 7898 | | +- ID[@CanonicalImage = "PUT_LINE", @Image = "Put_Line"] | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] +Added line: 423 | +- ArgumentList[@CanonicalImage = null] | +- Argument[@CanonicalImage = null] +Added line: 1500 +Added line: 6617 | +- Expression[@CanonicalImage = "L_OBJECT.AGGREGATE", @Image = "l_object.aggregate"] +Added line: 9261 | +- PrimaryPrefix[@CanonicalImage = "L_OBJECT.AGGREGATE", @Image = "l_object.aggregate", @SelfModifier = false] - | +- SimpleExpression[@CanonicalImage = "L_OBJECT.AGGREGATE", @Image = "l_object.aggregate"] +Added line: 9100 +Added line: 4154 +Added line: 762 | +- TableName[@CanonicalImage = "L_OBJECT", @Image = "l_object"] +Added line: 1696 | | +- ID[@CanonicalImage = "L_OBJECT", @Image = "l_object"] Added line: 8225 | +- Column[@CanonicalImage = "AGGREGATE", @Image = "aggregate"] +Added line: 6640 | +- ID[@CanonicalImage = "AGGREGATE", @Image = "aggregate"] +Added line: 4072 +Added line: 700 +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup1.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup1.txt index db09f410fc..f270178df5 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup1.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup1.txt @@ -3,74 +3,108 @@ +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] | +- ObjectNameDeclaration[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +Added line: 3253 | +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +- DeclarativeSection[@CanonicalImage = null] - | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 8697 +Added line: 2543 +Added line: 3250 | +- CursorSpecification[@CanonicalImage = null] | +- CursorUnit[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] | +- ID[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] | +- SelectStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | +- SelectList[@CanonicalImage = null] +Added line: 993 | | +- SqlExpression[@CanonicalImage = "A.OWNER", @Image = "a.owner"] +Added line: 7735 | | | +- PrimaryPrefix[@CanonicalImage = "A.OWNER", @Image = "a.owner", @SelfModifier = false] +Added line: 4685 | | | +- SimpleExpression[@CanonicalImage = "A.OWNER", @Image = "a.owner"] | | | +- TableName[@CanonicalImage = "A", @Image = "a"] | | | | +- ID[@CanonicalImage = "A", @Image = "a"] +Added line: 8580 | | | +- Column[@CanonicalImage = "OWNER", @Image = "owner"] | | | +- ID[@CanonicalImage = "OWNER", @Image = "owner"] | | +- SqlExpression[@CanonicalImage = "U.OBJECT_NAME", @Image = "u.object_name"] +Added line: 3292 | | | +- PrimaryPrefix[@CanonicalImage = "U.OBJECT_NAME", @Image = "u.object_name", @SelfModifier = false] +Added line: 2293 | | | +- SimpleExpression[@CanonicalImage = "U.OBJECT_NAME", @Image = "u.object_name"] | | | +- TableName[@CanonicalImage = "U", @Image = "u"] | | | | +- ID[@CanonicalImage = "U", @Image = "u"] | | | +- Column[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | | | +- ID[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] +Added line: 5256 +Added line: 5894 +Added line: 8715 | | +- SqlExpression[@CanonicalImage = "P.AGGREGATE", @Image = "p.aggregate"] +Added line: 6490 | | +- PrimaryPrefix[@CanonicalImage = "P.AGGREGATE", @Image = "p.aggregate", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "P.AGGREGATE", @Image = "p.aggregate"] | | +- TableName[@CanonicalImage = "P", @Image = "p"] | | | +- ID[@CanonicalImage = "P", @Image = "p"] - | | +- Column[@CanonicalImage = "AGGREGATE", @Image = "aggregate"] +Added line: 7266 | | +- ID[@CanonicalImage = "AGGREGATE", @Image = "aggregate"] | +- FromClause[@CanonicalImage = null] +Added line: 6811 | | +- TableReference[@CanonicalImage = null] | | +- JoinClause[@CanonicalImage = null] | | +- TableReference[@CanonicalImage = null] +Added line: 2992 | | | +- JoinClause[@CanonicalImage = null] | | | +- TableReference[@CanonicalImage = null] | | | | +- TableName[@CanonicalImage = "USER_OBJECTS", @Image = "USER_OBJECTS"] +Added line: 1828 | | | | | +- ID[@CanonicalImage = "USER_OBJECTS", @Image = "USER_OBJECTS"] | | | | +- TableAlias[@CanonicalImage = "U", @Image = "u"] +Added line: 4783 | | | | +- ID[@CanonicalImage = "U", @Image = "u"] | | | +- InnerCrossJoinClause[@CanonicalImage = null, @Cross = false, @Natural = false] | | | +- TableReference[@CanonicalImage = null] | | | | +- TableName[@CanonicalImage = "ALL_OBJECTS", @Image = "ALL_OBJECTS"] | | | | | +- ID[@CanonicalImage = "ALL_OBJECTS", @Image = "ALL_OBJECTS"] +Added line: 2739 +Added line: 9093 +Added line: 1530 | | | | +- TableAlias[@CanonicalImage = "A", @Image = "a"] +Added line: 5223 | | | | +- ID[@CanonicalImage = "A", @Image = "a"] | | | +- ConditionalAndExpression[@CanonicalImage = "U.OBJECT_NAME = A.OBJECT_NAME AND U.OBJECT_TYPE = A.OBJECT_TYPE AND U.OBJECT_ID = A.OBJECT_ID", @Image = "u.object_name = a.object_name AND u.object_type = a.object_type AND u.object_id = a.object_id"] +Added line: 3319 +Added line: 2464 | | | +- EqualityExpression[@CanonicalImage = "U.OBJECT_NAME = A.OBJECT_NAME", @Image = "u.object_name = a.object_name"] | | | | +- PrimaryPrefix[@CanonicalImage = "U.OBJECT_NAME", @Image = "u.object_name", @SelfModifier = false] | | | | | +- SimpleExpression[@CanonicalImage = "U.OBJECT_NAME", @Image = "u.object_name"] | | | | | +- TableName[@CanonicalImage = "U", @Image = "u"] | | | | | | +- ID[@CanonicalImage = "U", @Image = "u"] | | | | | +- Column[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] +Added line: 2618 | | | | | +- ID[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | | | | +- PrimaryPrefix[@CanonicalImage = "A.OBJECT_NAME", @Image = "a.object_name", @SelfModifier = false] - | | | | +- SimpleExpression[@CanonicalImage = "A.OBJECT_NAME", @Image = "a.object_name"] +Added line: 3292 | | | | +- TableName[@CanonicalImage = "A", @Image = "a"] | | | | | +- ID[@CanonicalImage = "A", @Image = "a"] | | | | +- Column[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | | | | +- ID[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] +Added line: 3962 | | | +- EqualityExpression[@CanonicalImage = "U.OBJECT_TYPE = A.OBJECT_TYPE", @Image = "u.object_type = a.object_type"] | | | | +- PrimaryPrefix[@CanonicalImage = "U.OBJECT_TYPE", @Image = "u.object_type", @SelfModifier = false] | | | | | +- SimpleExpression[@CanonicalImage = "U.OBJECT_TYPE", @Image = "u.object_type"] +Added line: 2093 +Added line: 9578 +Added line: 4875 +Added line: 7768 | | | | | +- TableName[@CanonicalImage = "U", @Image = "u"] +Added line: 9247 | | | | | | +- ID[@CanonicalImage = "U", @Image = "u"] | | | | | +- Column[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] +Added line: 1536 | | | | | +- ID[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] | | | | +- PrimaryPrefix[@CanonicalImage = "A.OBJECT_TYPE", @Image = "a.object_type", @SelfModifier = false] +Added line: 1842 | | | | +- SimpleExpression[@CanonicalImage = "A.OBJECT_TYPE", @Image = "a.object_type"] +Added line: 1142 +Added line: 8201 | | | | +- TableName[@CanonicalImage = "A", @Image = "a"] | | | | | +- ID[@CanonicalImage = "A", @Image = "a"] | | | | +- Column[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] @@ -83,19 +117,27 @@ | | | | +- Column[@CanonicalImage = "OBJECT_ID", @Image = "object_id"] | | | | +- ID[@CanonicalImage = "OBJECT_ID", @Image = "object_id"] | | | +- PrimaryPrefix[@CanonicalImage = "A.OBJECT_ID", @Image = "a.object_id", @SelfModifier = false] +Added line: 5031 | | | +- SimpleExpression[@CanonicalImage = "A.OBJECT_ID", @Image = "a.object_id"] | | | +- TableName[@CanonicalImage = "A", @Image = "a"] | | | | +- ID[@CanonicalImage = "A", @Image = "a"] +Added line: 3467 | | | +- Column[@CanonicalImage = "OBJECT_ID", @Image = "object_id"] +Added line: 5930 | | | +- ID[@CanonicalImage = "OBJECT_ID", @Image = "object_id"] +Added line: 1284 | | +- InnerCrossJoinClause[@CanonicalImage = null, @Cross = false, @Natural = false] | | +- TableReference[@CanonicalImage = null] | | | +- TableName[@CanonicalImage = "ALL_PROCEDURES", @Image = "ALL_PROCEDURES"] | | | | +- ID[@CanonicalImage = "ALL_PROCEDURES", @Image = "ALL_PROCEDURES"] +Added line: 9729 +Added line: 8435 | | | +- TableAlias[@CanonicalImage = "P", @Image = "p"] | | | +- ID[@CanonicalImage = "P", @Image = "p"] | | +- ConditionalAndExpression[@CanonicalImage = "P.OWNER = A.OWNER AND P.OBJECT_NAME = A.OBJECT_NAME AND P.OBJECT_TYPE = A.OBJECT_TYPE", @Image = "p.owner = a.owner AND p.object_name = a.object_name AND p.object_type = a.object_type"] - | | +- EqualityExpression[@CanonicalImage = "P.OWNER = A.OWNER", @Image = "p.owner = a.owner"] +Added line: 3691 +Added line: 2253 +Added line: 5630 | | | +- PrimaryPrefix[@CanonicalImage = "P.OWNER", @Image = "p.owner", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "P.OWNER", @Image = "p.owner"] | | | | +- TableName[@CanonicalImage = "P", @Image = "p"] @@ -105,11 +147,16 @@ | | | +- PrimaryPrefix[@CanonicalImage = "A.OWNER", @Image = "a.owner", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "A.OWNER", @Image = "a.owner"] | | | +- TableName[@CanonicalImage = "A", @Image = "a"] +Added line: 2699 | | | | +- ID[@CanonicalImage = "A", @Image = "a"] +Added line: 6157 | | | +- Column[@CanonicalImage = "OWNER", @Image = "owner"] | | | +- ID[@CanonicalImage = "OWNER", @Image = "owner"] | | +- EqualityExpression[@CanonicalImage = "P.OBJECT_NAME = A.OBJECT_NAME", @Image = "p.object_name = a.object_name"] | | | +- PrimaryPrefix[@CanonicalImage = "P.OBJECT_NAME", @Image = "p.object_name", @SelfModifier = false] +Added line: 8674 +Added line: 7381 +Added line: 7938 | | | | +- SimpleExpression[@CanonicalImage = "P.OBJECT_NAME", @Image = "p.object_name"] | | | | +- TableName[@CanonicalImage = "P", @Image = "p"] | | | | | +- ID[@CanonicalImage = "P", @Image = "p"] @@ -121,10 +168,15 @@ | | | | +- ID[@CanonicalImage = "A", @Image = "a"] | | | +- Column[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | | | +- ID[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] +Added line: 640 | | +- EqualityExpression[@CanonicalImage = "P.OBJECT_TYPE = A.OBJECT_TYPE", @Image = "p.object_type = a.object_type"] | | +- PrimaryPrefix[@CanonicalImage = "P.OBJECT_TYPE", @Image = "p.object_type", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "P.OBJECT_TYPE", @Image = "p.object_type"] +Added line: 3345 | | | +- TableName[@CanonicalImage = "P", @Image = "p"] +Added line: 4607 +Added line: 5959 +Added line: 7348 | | | | +- ID[@CanonicalImage = "P", @Image = "p"] | | | +- Column[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] | | | +- ID[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] @@ -134,18 +186,27 @@ | | | +- ID[@CanonicalImage = "A", @Image = "a"] | | +- Column[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] | | +- ID[@CanonicalImage = "OBJECT_TYPE", @Image = "object_type"] +Added line: 7986 | +- WhereClause[@CanonicalImage = null] +Added line: 1829 | +- Condition[@CanonicalImage = null] | +- CompoundCondition[@CanonicalImage = null, @Type = null] +Added line: 9321 +Added line: 6368 | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] | +- SqlExpression[@CanonicalImage = "A.OWNER", @Image = "a.owner"] +Added line: 5494 | | +- PrimaryPrefix[@CanonicalImage = "A.OWNER", @Image = "a.owner", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "A.OWNER", @Image = "a.owner"] +Added line: 3427 | | +- TableName[@CanonicalImage = "A", @Image = "a"] +Added line: 118 | | | +- ID[@CanonicalImage = "A", @Image = "a"] | | +- Column[@CanonicalImage = "OWNER", @Image = "owner"] +Added line: 6108 | | +- ID[@CanonicalImage = "OWNER", @Image = "owner"] | +- SqlExpression[@CanonicalImage = "USER", @Image = "USER"] +Added line: 5341 | +- PrimaryPrefix[@CanonicalImage = "USER", @Image = "USER", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "USER", @Image = "USER"] | +- Column[@CanonicalImage = "USER", @Image = "USER"] @@ -153,35 +214,49 @@ +- Statement[@CanonicalImage = null] | +- UnlabelledStatement[@CanonicalImage = null] | +- ForStatement[@CanonicalImage = null] +Added line: 4161 | +- ForIndex[@CanonicalImage = "L_OBJECT", @Image = "l_object"] | | +- ID[@CanonicalImage = "L_OBJECT", @Image = "l_object"] - | +- Expression[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] | | +- PrimaryPrefix[@CanonicalImage = "C_EXAMPLE", @Image = "c_example", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] | | +- Column[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] +Added line: 7675 +Added line: 3638 +Added line: 3130 +Added line: 9224 | | +- ID[@CanonicalImage = "C_EXAMPLE", @Image = "c_example"] | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 3652 | | +- Expression[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | +- PrimaryPrefix[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line", @SelfModifier = false] +Added line: 694 +Added line: 97 | | +- FunctionCall[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | +- FunctionName[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | | +- ID[@CanonicalImage = "DBMS_OUTPUT", @Image = "DBMS_OUTPUT"] | | | +- ID[@CanonicalImage = "PUT_LINE", @Image = "Put_Line"] | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | +- ArgumentList[@CanonicalImage = null] +Added line: 6922 | | +- Argument[@CanonicalImage = null] +Added line: 9196 | | +- Expression[@CanonicalImage = "L_OBJECT.OWNER", @Image = "l_object.owner"] | | +- PrimaryPrefix[@CanonicalImage = "L_OBJECT.OWNER", @Image = "l_object.owner", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "L_OBJECT.OWNER", @Image = "l_object.owner"] | | +- TableName[@CanonicalImage = "L_OBJECT", @Image = "l_object"] +Added line: 1922 +Added line: 6858 | | | +- ID[@CanonicalImage = "L_OBJECT", @Image = "l_object"] | | +- Column[@CanonicalImage = "OWNER", @Image = "owner"] | | +- ID[@CanonicalImage = "OWNER", @Image = "owner"] | +- Statement[@CanonicalImage = null] - | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 5795 +Added line: 413 +Added line: 3400 | | +- Expression[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | +- PrimaryPrefix[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line", @SelfModifier = false] +Added line: 3247 | | +- FunctionCall[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | +- FunctionName[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | | +- ID[@CanonicalImage = "DBMS_OUTPUT", @Image = "DBMS_OUTPUT"] @@ -192,26 +267,40 @@ | | +- Expression[@CanonicalImage = "L_OBJECT.OBJECT_NAME", @Image = "l_object.object_name"] | | +- PrimaryPrefix[@CanonicalImage = "L_OBJECT.OBJECT_NAME", @Image = "l_object.object_name", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "L_OBJECT.OBJECT_NAME", @Image = "l_object.object_name"] +Added line: 402 | | +- TableName[@CanonicalImage = "L_OBJECT", @Image = "l_object"] | | | +- ID[@CanonicalImage = "L_OBJECT", @Image = "l_object"] | | +- Column[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | | +- ID[@CanonicalImage = "OBJECT_NAME", @Image = "object_name"] | +- Statement[@CanonicalImage = null] +Added line: 3931 | +- UnlabelledStatement[@CanonicalImage = null] | +- Expression[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | +- PrimaryPrefix[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line", @SelfModifier = false] | +- FunctionCall[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] +Added line: 5947 | +- FunctionName[@CanonicalImage = "DBMS_OUTPUT.PUT_LINE", @Image = "DBMS_OUTPUT.Put_Line"] | | +- ID[@CanonicalImage = "DBMS_OUTPUT", @Image = "DBMS_OUTPUT"] | | +- ID[@CanonicalImage = "PUT_LINE", @Image = "Put_Line"] +Added line: 5040 | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] +Added line: 6459 | +- ArgumentList[@CanonicalImage = null] | +- Argument[@CanonicalImage = null] | +- Expression[@CanonicalImage = "L_OBJECT.AGGREGATE", @Image = "l_object.aggregate"] +Added line: 3132 +Added line: 5921 | +- PrimaryPrefix[@CanonicalImage = "L_OBJECT.AGGREGATE", @Image = "l_object.aggregate", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "L_OBJECT.AGGREGATE", @Image = "l_object.aggregate"] +Added line: 2976 +Added line: 3551 +Added line: 2148 +Added line: 5867 | +- TableName[@CanonicalImage = "L_OBJECT", @Image = "l_object"] | | +- ID[@CanonicalImage = "L_OBJECT", @Image = "l_object"] +Added line: 9889 | +- Column[@CanonicalImage = "AGGREGATE", @Image = "aggregate"] | +- ID[@CanonicalImage = "AGGREGATE", @Image = "aggregate"] +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +Added line: 9861 +Added line: 4110 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup2.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup2.txt index baa9dac6aa..02d1a3fcf6 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup2.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParenthesisGroup2.txt @@ -1,54 +1,95 @@ +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- Global[@CanonicalImage = null] +- MethodDeclarator[@CanonicalImage = "TEST_PROCEDURE", @Image = "TEST_PROCEDURE", @ParameterCount = 1] +Added line: 2619 +Added line: 3293 Added line: 9697 | +- ObjectNameDeclaration[@CanonicalImage = "TEST_PROCEDURE", @Image = "TEST_PROCEDURE"] Added line: 7601 | +- ID[@CanonicalImage = "TEST_PROCEDURE", @Image = "TEST_PROCEDURE"] +- DeclarativeSection[@CanonicalImage = null] +Added line: 5503 +Added line: 2380 +Added line: 9544 | +- DeclarativeUnit[@CanonicalImage = null] | +- CursorSpecification[@CanonicalImage = null] | +- CursorUnit[@CanonicalImage = "C_TEST", @Image = "c_test"] +Added line: 6756 +Added line: 1083 | +- ID[@CanonicalImage = "C_TEST", @Image = "c_test"] +Added line: 8026 +Added line: 9809 | +- SelectStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] +Added line: 2886 +Added line: 3369 | +- SelectList[@CanonicalImage = null] +Added line: 3840 | | +- SqlExpression[@CanonicalImage = "SI.SID", @Image = "si.sid"] | | | +- PrimaryPrefix[@CanonicalImage = "SI.SID", @Image = "si.sid", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "SI.SID", @Image = "si.sid"] | | | +- TableName[@CanonicalImage = "SI", @Image = "si"] | | | | +- ID[@CanonicalImage = "SI", @Image = "si"] | | | +- Column[@CanonicalImage = "SID", @Image = "sid"] +Added line: 3138 +Added line: 7111 | | | +- ID[@CanonicalImage = "SID", @Image = "sid"] | | +- SqlExpression[@CanonicalImage = "SN.NAME", @Image = "sn.name"] +Added line: 662 +Added line: 9013 | | | +- PrimaryPrefix[@CanonicalImage = "SN.NAME", @Image = "sn.name", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "SN.NAME", @Image = "sn.name"] +Added line: 2945 | | | +- TableName[@CanonicalImage = "SN", @Image = "sn"] +Added line: 7634 +Added line: 6496 | | | | +- ID[@CanonicalImage = "SN", @Image = "sn"] +Added line: 3308 | | | +- Column[@CanonicalImage = "NAME", @Image = "name"] | | | +- ID[@CanonicalImage = "NAME", @Image = "name"] | | +- SqlExpression[@CanonicalImage = "SA.AGE", @Image = "sa.age"] | | | +- PrimaryPrefix[@CanonicalImage = "SA.AGE", @Image = "sa.age", @SelfModifier = false] +Added line: 4062 | | | +- SimpleExpression[@CanonicalImage = "SA.AGE", @Image = "sa.age"] | | | +- TableName[@CanonicalImage = "SA", @Image = "sa"] | | | | +- ID[@CanonicalImage = "SA", @Image = "sa"] +Added line: 6388 +Added line: 9547 | | | +- ID[@CanonicalImage = "AGE", @Image = "age"] Added line: 3735 | | +- SqlExpression[@CanonicalImage = "SS.SCORE", @Image = "ss.score"] | | | +- PrimaryPrefix[@CanonicalImage = "SS.SCORE", @Image = "ss.score", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "SS.SCORE", @Image = "ss.score"] +Added line: 7841 +Added line: 9480 +Added line: 7879 +Added line: 1513 +Added line: 4058 | | | +- TableName[@CanonicalImage = "SS", @Image = "ss"] +Added line: 413 +Added line: 5559 +Added line: 8274 | | | | +- ID[@CanonicalImage = "SS", @Image = "ss"] | | | +- Column[@CanonicalImage = "SCORE", @Image = "score"] +Added line: 3753 | | | +- ID[@CanonicalImage = "SCORE", @Image = "score"] | | +- SqlExpression[@CanonicalImage = "SP.PARENT", @Image = "sp.parent"] | | +- PrimaryPrefix[@CanonicalImage = "SP.PARENT", @Image = "sp.parent", @SelfModifier = false] +Added line: 1593 | | +- SimpleExpression[@CanonicalImage = "SP.PARENT", @Image = "sp.parent"] +Added line: 1519 | | +- TableName[@CanonicalImage = "SP", @Image = "sp"] +Added line: 631 | | | +- ID[@CanonicalImage = "SP", @Image = "sp"] +Added line: 4886 +Added line: 1363 | | +- Column[@CanonicalImage = "PARENT", @Image = "parent"] +Added line: 1808 | | +- ID[@CanonicalImage = "PARENT", @Image = "parent"] +Added line: 2657 +Added line: 5428 | +- FromClause[@CanonicalImage = null] | | +- TableReference[@CanonicalImage = null] +Added line: 4784 | | +- JoinClause[@CanonicalImage = null] | | +- TableReference[@CanonicalImage = null] | | | +- JoinClause[@CanonicalImage = null] @@ -57,81 +98,129 @@ Added line: 3735 | | | | +- TableReference[@CanonicalImage = null] | | | | | +- TableName[@CanonicalImage = "STUDENT_INFO", @Image = "STUDENT_INFO"] | | | | | | +- ID[@CanonicalImage = "STUDENT_INFO", @Image = "STUDENT_INFO"] +Added line: 3589 | | | | | +- TableAlias[@CanonicalImage = "SI", @Image = "si"] +Added line: 1370 | | | | | +- ID[@CanonicalImage = "SI", @Image = "si"] +Added line: 9364 | | | | +- InnerCrossJoinClause[@CanonicalImage = null, @Cross = false, @Natural = false] | | | | +- TableReference[@CanonicalImage = null] | | | | | +- TableName[@CanonicalImage = "STUDENT_AGE", @Image = "STUDENT_AGE"] +Added line: 428 | | | | | | +- ID[@CanonicalImage = "STUDENT_AGE", @Image = "STUDENT_AGE"] | | | | | +- TableAlias[@CanonicalImage = "SA", @Image = "sa"] +Added line: 5926 +Added line: 7279 +Added line: 1673 +Added line: 9934 | | | | | +- ID[@CanonicalImage = "SA", @Image = "sa"] Added line: 172 | | | | +- EqualityExpression[@CanonicalImage = "SI.SID = SA.SID", @Image = "si.sid = sa.sid"] | | | | +- PrimaryPrefix[@CanonicalImage = "SI.SID", @Image = "si.sid", @SelfModifier = false] | | | | | +- SimpleExpression[@CanonicalImage = "SI.SID", @Image = "si.sid"] +Added line: 8155 | | | | | +- TableName[@CanonicalImage = "SI", @Image = "si"] | | | | | | +- ID[@CanonicalImage = "SI", @Image = "si"] +Added line: 1885 | | | | | +- Column[@CanonicalImage = "SID", @Image = "sid"] | | | | | +- ID[@CanonicalImage = "SID", @Image = "sid"] | | | | +- PrimaryPrefix[@CanonicalImage = "SA.SID", @Image = "sa.sid", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "SA.SID", @Image = "sa.sid"] +Added line: 9793 +Added line: 6561 | | | | +- TableName[@CanonicalImage = "SA", @Image = "sa"] - | | | | | +- ID[@CanonicalImage = "SA", @Image = "sa"] +Added line: 6376 Added line: 9079 | | | | +- Column[@CanonicalImage = "SID", @Image = "sid"] - | | | | +- ID[@CanonicalImage = "SID", @Image = "sid"] +Added line: 642 | | | +- InnerCrossJoinClause[@CanonicalImage = null, @Cross = false, @Natural = false] | | | +- TableReference[@CanonicalImage = null] | | | | +- TableName[@CanonicalImage = "STUDENT_SCORE", @Image = "STUDENT_SCORE"] | | | | | +- ID[@CanonicalImage = "STUDENT_SCORE", @Image = "STUDENT_SCORE"] | | | | +- TableAlias[@CanonicalImage = "SS", @Image = "ss"] | | | | +- ID[@CanonicalImage = "SS", @Image = "ss"] +Added line: 7468 | | | +- PrimaryPrefix[@CanonicalImage = "SI.SID", @Image = "si.sid", @SelfModifier = false] +Added line: 957 +Added line: 2089 | | | | +- SimpleExpression[@CanonicalImage = "SI.SID", @Image = "si.sid"] +Added line: 6744 +Added line: 3757 | | | | +- TableName[@CanonicalImage = "SI", @Image = "si"] +Added line: 4242 +Added line: 6160 | | | | | +- ID[@CanonicalImage = "SI", @Image = "si"] Added line: 7703 | | | | +- ID[@CanonicalImage = "SID", @Image = "sid"] +Added line: 2402 +Added line: 6956 +Added line: 8944 | | | +- PrimaryPrefix[@CanonicalImage = "SP.SID", @Image = "sp.sid", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "SP.SID", @Image = "sp.sid"] | | | +- TableName[@CanonicalImage = "SP", @Image = "sp"] +Added line: 4443 | | | | +- ID[@CanonicalImage = "SP", @Image = "sp"] | | | +- Column[@CanonicalImage = "SID", @Image = "sid"] | | | +- ID[@CanonicalImage = "SID", @Image = "sid"] | | +- InnerCrossJoinClause[@CanonicalImage = null, @Cross = false, @Natural = false] | | +- TableReference[@CanonicalImage = null] - | | | +- TableName[@CanonicalImage = "STUDENT_PARENT", @Image = "STUDENT_PARENT"] +Added line: 9770 | | | | +- ID[@CanonicalImage = "STUDENT_PARENT", @Image = "STUDENT_PARENT"] | | | +- TableAlias[@CanonicalImage = "SP", @Image = "sp"] | | +- EqualityExpression[@CanonicalImage = "SI.SID = SP.SID", @Image = "si.sid = sp.sid"] | | +- PrimaryPrefix[@CanonicalImage = "SI.SID", @Image = "si.sid", @SelfModifier = false] +Added line: 8985 +Added line: 6265 +Added line: 4768 | | | +- SimpleExpression[@CanonicalImage = "SI.SID", @Image = "si.sid"] +Added line: 1588 +Added line: 4629 | | | +- TableName[@CanonicalImage = "SI", @Image = "si"] | | | +- Column[@CanonicalImage = "SID", @Image = "sid"] | | | +- ID[@CanonicalImage = "SID", @Image = "sid"] +Added line: 6847 | | +- PrimaryPrefix[@CanonicalImage = "SP.SID", @Image = "sp.sid", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "SP.SID", @Image = "sp.sid"] | | +- TableName[@CanonicalImage = "SP", @Image = "sp"] | | | +- ID[@CanonicalImage = "SP", @Image = "sp"] +Added line: 5966 +Added line: 2995 | | +- Column[@CanonicalImage = "SID", @Image = "sid"] | | +- ID[@CanonicalImage = "SID", @Image = "sid"] +Added line: 1340 +Added line: 3416 +Added line: 7611 | +- WhereClause[@CanonicalImage = null] | +- Condition[@CanonicalImage = null] | +- CompoundCondition[@CanonicalImage = null, @Type = null] | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] +Added line: 1567 | +- SqlExpression[@CanonicalImage = "SI.SID", @Image = "si.sid"] | | +- PrimaryPrefix[@CanonicalImage = "SI.SID", @Image = "si.sid", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "SI.SID", @Image = "si.sid"] | | +- TableName[@CanonicalImage = "SI", @Image = "si"] +Added line: 7438 +Added line: 6478 +Added line: 5010 | | | +- ID[@CanonicalImage = "SI", @Image = "si"] +Added line: 6336 | | +- Column[@CanonicalImage = "SID", @Image = "sid"] +Added line: 4913 | | +- ID[@CanonicalImage = "SID", @Image = "sid"] +Added line: 8219 | +- SqlExpression[@CanonicalImage = "\'114514\'", @Image = "\'114514\'"] -Added line: 4391 | +- PrimaryPrefix[@CanonicalImage = "\'114514\'", @Image = "\'114514\'", @SelfModifier = false] Added line: 4222 +Added line: 1926 | +- Literal[@CanonicalImage = "\'114514\'", @Image = "\'114514\'"] Added line: 8700 +Added line: 6724 +Added line: 7056 +Added line: 47 +Added line: 4589 +Added line: 1128 +Added line: 1934 +Added line: 1414 Added line: 829 | +- StringLiteral[@CanonicalImage = "\'114514\'", @Image = "\'114514\'", @String = "114514"] +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParsingExclusion.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParsingExclusion.txt index 64114b14d8..b223c73e60 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParsingExclusion.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/ParsingExclusion.txt @@ -1,57 +1,146 @@ +Added line: 9860 +Added line: 3070 +Added line: 357 +Added line: 9003 +Added line: 7496 +Added line: 5120 +Added line: 9931 +Added line: 3932 +- Input[@CanonicalImage = null, @ExcludedLinesCount = 6, @ExcludedRangesCount = 2] | +- Block[@CanonicalImage = null] +Added line: 6937 | +- Statement[@CanonicalImage = null] +Added line: 1279 | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 2761 +Added line: 5191 +Added line: 3998 | | +- Expression[@CanonicalImage = "DO_SOMETHING", @Image = "do_something"] Added line: 8471 +Added line: 904 +Added line: 8678 +Added line: 1464 Added line: 2226 +Added line: 1844 | | +- PrimaryPrefix[@CanonicalImage = "DO_SOMETHING", @Image = "do_something", @SelfModifier = false] | | +- FunctionCall[@CanonicalImage = "DO_SOMETHING", @Image = "do_something"] +Added line: 5955 | | +- FunctionName[@CanonicalImage = "DO_SOMETHING", @Image = "do_something"] | | | +- ID[@CanonicalImage = "DO_SOMETHING", @Image = "do_something"] +Added line: 6360 +Added line: 3497 +Added line: 7496 | | +- Arguments[@ArgumentCount = 0, @CanonicalImage = null] +Added line: 7938 Added line: 4925 +Added line: 4513 +Added line: 3248 +Added line: 9193 +Added line: 4336 +Added line: 3800 +Added line: 2248 +Added line: 2900 Added line: 6395 +Added line: 3079 +Added line: 909 +Added line: 2239 +Added line: 5548 +Added line: 1784 +Added line: 698 +Added line: 3363 | +- Statement[@CanonicalImage = null] +Added line: 4581 | +- UnlabelledStatement[@CanonicalImage = null] | +- Expression[@CanonicalImage = "DO_SOMETHING_ELSE", @Image = "do_something_else"] +Added line: 2173 +Added line: 7557 +Added line: 7746 +Added line: 2758 +Added line: 2366 | +- PrimaryPrefix[@CanonicalImage = "DO_SOMETHING_ELSE", @Image = "do_something_else", @SelfModifier = false] +Added line: 3115 +Added line: 6941 | +- FunctionCall[@CanonicalImage = "DO_SOMETHING_ELSE", @Image = "do_something_else"] | +- FunctionName[@CanonicalImage = "DO_SOMETHING_ELSE", @Image = "do_something_else"] Added line: 3750 +Added line: 4326 | | +- ID[@CanonicalImage = "DO_SOMETHING_ELSE", @Image = "do_something_else"] | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | +- ArgumentList[@CanonicalImage = null] +Added line: 6892 | +- Argument[@CanonicalImage = null] | +- SimpleExpression[@CanonicalImage = "X", @Image = "x"] +Added line: 2475 | +- Column[@CanonicalImage = "X", @Image = "x"] +Added line: 7652 | +- ID[@CanonicalImage = "X", @Image = "x"] - +- SelectStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | +- PrimaryPrefix[@CanonicalImage = "DUMMY", @Image = "dummy", @SelfModifier = false] | +- SimpleExpression[@CanonicalImage = "DUMMY", @Image = "dummy"] +Added line: 8410 +Added line: 8160 +Added line: 6024 +Added line: 6192 | +- Column[@CanonicalImage = "DUMMY", @Image = "dummy"] +Added line: 1993 | +- ID[@CanonicalImage = "DUMMY", @Image = "dummy"] - | +- TableReference[@CanonicalImage = null] +Added line: 708 +Added line: 7847 +Added line: 9360 +Added line: 3012 +Added line: 5589 +Added line: 5661 +Added line: 5926 +Added line: 7962 +Added line: 6085 +Added line: 7561 | +- TableName[@CanonicalImage = "DUAL", @Image = "dual"] +Added line: 6349 +Added line: 4244 +Added line: 3492 | | +- ID[@CanonicalImage = "DUAL", @Image = "dual"] | +- TableAlias[@CanonicalImage = "A", @Image = "a"] +Added line: 3844 Added line: 5372 +Added line: 197 | +- ID[@CanonicalImage = "A", @Image = "a"] Added line: 9901 +Added line: 1785 +- WhereClause[@CanonicalImage = null] +Added line: 6230 +Added line: 6363 +Added line: 7504 +- Condition[@CanonicalImage = null] Added line: 8446 +Added line: 244 +- CompoundCondition[@CanonicalImage = null, @Type = null] +Added line: 3847 Added line: 1088 +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] - +- SqlExpression[@CanonicalImage = "1", @Image = "1"] +Added line: 8914 Added line: 9014 | +- PrimaryPrefix[@CanonicalImage = "1", @Image = "1", @SelfModifier = false] +Added line: 7830 +Added line: 4602 | +- Literal[@CanonicalImage = "1", @Image = "1"] +Added line: 3562 Added line: 8835 | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"] Added line: 7093 +Added line: 1712 Added line: 5879 +Added line: 8323 +Added line: 5215 +Added line: 6896 +Added line: 3358 +- SqlExpression[@CanonicalImage = "1", @Image = "1"] +- PrimaryPrefix[@CanonicalImage = "1", @Image = "1", @SelfModifier = false] +Added line: 4158 +- Literal[@CanonicalImage = "1", @Image = "1"] +Added line: 2644 +Added line: 5814 +Added line: 8261 +Added line: 3303 +Added line: 2228 +Added line: 6271 +Added line: 2836 +Added line: 5368 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SelectExpressions.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SelectExpressions.txt index 3c03af0d6f..9905110334 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SelectExpressions.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SelectExpressions.txt @@ -2,6 +2,9 @@ +- Global[@CanonicalImage = null] | +- Block[@CanonicalImage = null] | +- Statement[@CanonicalImage = null] +Added line: 7262 +Added line: 5771 +Added line: 9030 | | +- UnlabelledStatement[@CanonicalImage = null] | | +- SelectIntoStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | | +- SelectList[@CanonicalImage = null] @@ -24,10 +27,13 @@ | | | +- NumericLiteral[@CanonicalImage = "2", @Image = "2"] | | +- IntoClause[@CanonicalImage = null] | | | +- VariableName[@CanonicalImage = "FOO", @Image = "foo"] +Added line: 4397 | | | +- ID[@CanonicalImage = "FOO", @Image = "foo"] | | +- FromClause[@CanonicalImage = null] | | +- TableReference[@CanonicalImage = null] +Added line: 165 | | +- TableName[@CanonicalImage = "BAR", @Image = "bar"] +Added line: 7896 | | +- ID[@CanonicalImage = "BAR", @Image = "bar"] | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] @@ -35,10 +41,12 @@ | | +- SelectList[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "AVG * 12", @Image = "AVG * 12"] | | | | +- MultiplicativeExpression[@CanonicalImage = "AVG * 12", @Image = "AVG * 12"] +Added line: 7570 | | | | +- PrimaryPrefix[@CanonicalImage = "AVG", @Image = "AVG", @SelfModifier = false] | | | | | +- FunctionCall[@CanonicalImage = "AVG", @Image = "AVG"] | | | | | +- FunctionName[@CanonicalImage = "AVG", @Image = "AVG"] | | | | | | +- ID[@CanonicalImage = "AVG", @Image = "AVG"] +Added line: 6855 | | | | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | | | | +- ArgumentList[@CanonicalImage = null] | | | | | +- Argument[@CanonicalImage = null] @@ -47,6 +55,7 @@ | | | | | +- SimpleExpression[@CanonicalImage = "SALARY", @Image = "salary"] | | | | | +- Column[@CanonicalImage = "SALARY", @Image = "salary"] | | | | | +- ID[@CanonicalImage = "SALARY", @Image = "salary"] +Added line: 4805 | | | | +- PrimaryPrefix[@CanonicalImage = "12", @Image = "12", @SelfModifier = false] | | | | +- Literal[@CanonicalImage = "12", @Image = "12"] | | | | +- NumericLiteral[@CanonicalImage = "12", @Image = "12"] @@ -60,6 +69,7 @@ | | +- TableName[@CanonicalImage = "SOME_TABLE", @Image = "some_table"] | | +- ID[@CanonicalImage = "SOME_TABLE", @Image = "some_table"] | +- Statement[@CanonicalImage = null] +Added line: 8251 | | +- UnlabelledStatement[@CanonicalImage = null] | | +- SelectIntoStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | | +- SelectList[@CanonicalImage = null] @@ -77,6 +87,7 @@ | | | | | +- FunctionName[@CanonicalImage = "SUM", @Image = "sum"] | | | | | | +- ID[@CanonicalImage = "SUM", @Image = "sum"] | | | | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] +Added line: 9803 | | | | | +- ArgumentList[@CanonicalImage = null] | | | | | +- Argument[@CanonicalImage = null] | | | | | +- Expression[@CanonicalImage = "AMOUNT_SOLD", @Image = "amount_sold"] @@ -88,6 +99,7 @@ | | | | +- Expression[@CanonicalImage = "\'9,999,999,999\'", @Image = "\'9,999,999,999\'"] | | | | +- PrimaryPrefix[@CanonicalImage = "\'9,999,999,999\'", @Image = "\'9,999,999,999\'", @SelfModifier = false] | | | | +- Literal[@CanonicalImage = "\'9,999,999,999\'", @Image = "\'9,999,999,999\'"] +Added line: 3365 | | | | +- StringLiteral[@CanonicalImage = "\'9,999,999,999\'", @Image = "\'9,999,999,999\'", @String = "9,999,999,999"] | | | +- ColumnAlias[@CanonicalImage = "SALES$", @Image = "SALES$"] | | | +- ID[@CanonicalImage = "SALES$", @Image = "SALES$"] @@ -102,7 +114,6 @@ | | +- UnlabelledStatement[@CanonicalImage = null] | | +- SelectIntoStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | | +- SelectList[@CanonicalImage = null] - | | | +- SqlExpression[@CanonicalImage = "MANAGER_ID", @Image = "manager_id"] | | | | +- PrimaryPrefix[@CanonicalImage = "MANAGER_ID", @Image = "manager_id", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "MANAGER_ID", @Image = "manager_id"] | | | | +- Column[@CanonicalImage = "MANAGER_ID", @Image = "manager_id"] @@ -123,6 +134,7 @@ | | | | +- Column[@CanonicalImage = "SALARY", @Image = "salary"] | | | | +- ID[@CanonicalImage = "SALARY", @Image = "salary"] | | | +- SqlExpression[@CanonicalImage = "AVG", @Image = "AVG"] +Added line: 614 | | | | +- PrimaryPrefix[@CanonicalImage = "AVG", @Image = "AVG", @SelfModifier = false] | | | | +- FunctionCall[@CanonicalImage = "AVG", @Image = "AVG"] | | | | | +- FunctionName[@CanonicalImage = "AVG", @Image = "AVG"] @@ -143,6 +155,7 @@ | | | | | +- Column[@CanonicalImage = "MANAGER_ID", @Image = "manager_id"] | | | | | +- ID[@CanonicalImage = "MANAGER_ID", @Image = "manager_id"] | | | | +- OrderByClause[@CanonicalImage = null] +Added line: 8045 | | | | | +- SqlExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | | +- PrimaryPrefix[@CanonicalImage = "HIRE_DATE", @Image = "hire_date", @SelfModifier = false] | | | | | +- SimpleExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] @@ -163,7 +176,6 @@ | | | +- VariableName[@CanonicalImage = "SOME_RECORD", @Image = "some_record"] | | | +- ID[@CanonicalImage = "SOME_RECORD", @Image = "some_record"] | | +- FromClause[@CanonicalImage = null] - | | | +- TableReference[@CanonicalImage = null] | | | +- TableName[@CanonicalImage = "EMPLOYEES", @Image = "employees"] | | | +- ID[@CanonicalImage = "EMPLOYEES", @Image = "employees"] | | +- OrderByClause[@CanonicalImage = null] @@ -189,6 +201,8 @@ | | | +- SqlExpression[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] | | | | +- PrimaryPrefix[@CanonicalImage = "LISTAGG", @Image = "LISTAGG", @SelfModifier = false] | | | | +- FunctionCall[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] +Added line: 1477 +Added line: 3402 | | | | | +- FunctionName[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] | | | | | | +- ID[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] | | | | | +- Arguments[@ArgumentCount = 2, @CanonicalImage = null] @@ -196,7 +210,6 @@ | | | | | +- Argument[@CanonicalImage = null] | | | | | | +- Expression[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | | | | +- PrimaryPrefix[@CanonicalImage = "LAST_NAME", @Image = "last_name", @SelfModifier = false] - | | | | | | +- SimpleExpression[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | | | | +- Column[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | | | | +- ID[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | | | +- Argument[@CanonicalImage = null] @@ -211,6 +224,7 @@ | | | | | +- SimpleExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | | +- Column[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | | +- ID[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] +Added line: 6757 | | | | +- SqlExpression[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | | +- PrimaryPrefix[@CanonicalImage = "LAST_NAME", @Image = "last_name", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "LAST_NAME", @Image = "last_name"] @@ -218,8 +232,8 @@ | | | | +- ID[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | +- ColumnAlias[@CanonicalImage = "\"Emp_list\"", @Image = "\"Emp_list\""] | | | | +- ID[@CanonicalImage = "\"Emp_list\"", @Image = "\"Emp_list\""] - | | | +- SqlExpression[@CanonicalImage = "MIN", @Image = "MIN"] | | | | +- PrimaryPrefix[@CanonicalImage = "MIN", @Image = "MIN", @SelfModifier = false] +Added line: 9861 | | | | +- FunctionCall[@CanonicalImage = "MIN", @Image = "MIN"] | | | | +- FunctionName[@CanonicalImage = "MIN", @Image = "MIN"] | | | | | +- ID[@CanonicalImage = "MIN", @Image = "MIN"] @@ -227,10 +241,12 @@ | | | | +- ArgumentList[@CanonicalImage = null] | | | | +- Argument[@CanonicalImage = null] | | | | +- Expression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] +Added line: 2132 | | | | +- PrimaryPrefix[@CanonicalImage = "HIRE_DATE", @Image = "hire_date", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | +- Column[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | +- ID[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] +Added line: 1233 | | | +- ColumnAlias[@CanonicalImage = "\"Earliest\"", @Image = "\"Earliest\""] | | | +- ID[@CanonicalImage = "\"Earliest\"", @Image = "\"Earliest\""] | | +- IntoClause[@CanonicalImage = null] @@ -242,10 +258,12 @@ | | | +- ID[@CanonicalImage = "EMPLOYEES", @Image = "employees"] | | +- WhereClause[@CanonicalImage = null] | | +- Condition[@CanonicalImage = null] +Added line: 7438 | | +- CompoundCondition[@CanonicalImage = null, @Type = null] | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] | | +- SqlExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | +- PrimaryPrefix[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id", @SelfModifier = false] +Added line: 476 | | | +- SimpleExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | +- Column[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | +- ID[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] @@ -255,11 +273,13 @@ | | +- NumericLiteral[@CanonicalImage = "30", @Image = "30"] | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 2554 | | +- SelectIntoStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | | +- SelectList[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | | +- PrimaryPrefix[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] +Added line: 1792 | | | | +- Column[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | | +- ID[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | +- ColumnAlias[@CanonicalImage = "\"Dept.\"", @Image = "\"Dept.\""] @@ -269,6 +289,7 @@ | | | | +- FunctionCall[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] | | | | | +- FunctionName[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] | | | | | | +- ID[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] +Added line: 8966 | | | | | +- Arguments[@ArgumentCount = 2, @CanonicalImage = null] | | | | | +- ArgumentList[@CanonicalImage = null] | | | | | +- Argument[@CanonicalImage = null] @@ -280,8 +301,10 @@ | | | | | +- Argument[@CanonicalImage = null] | | | | | +- Expression[@CanonicalImage = "\'; \'", @Image = "\'; \'"] | | | | | +- PrimaryPrefix[@CanonicalImage = "\'; \'", @Image = "\'; \'", @SelfModifier = false] +Added line: 255 | | | | | +- Literal[@CanonicalImage = "\'; \'", @Image = "\'; \'"] | | | | | +- StringLiteral[@CanonicalImage = "\'; \'", @Image = "\'; \'", @String = "; "] +Added line: 4878 | | | | +- WithinClause[@CanonicalImage = null] | | | | +- OrderByClause[@CanonicalImage = null] | | | | +- SqlExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] @@ -297,6 +320,7 @@ | | +- FromClause[@CanonicalImage = null] | | | +- TableReference[@CanonicalImage = null] | | | +- TableName[@CanonicalImage = "EMPLOYEES", @Image = "employees"] +Added line: 3697 | | | +- ID[@CanonicalImage = "EMPLOYEES", @Image = "employees"] | | +- GroupByClause[@CanonicalImage = null] | | | +- Expression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] @@ -306,13 +330,13 @@ | | | +- ID[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | +- OrderByClause[@CanonicalImage = null] | | +- SqlExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] +Added line: 3974 | | +- PrimaryPrefix[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | +- Column[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | +- ID[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] - | | +- SelectIntoStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | | +- SelectList[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | | +- PrimaryPrefix[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id", @SelfModifier = false] @@ -324,18 +348,22 @@ | | | +- SqlExpression[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] | | | | +- PrimaryPrefix[@CanonicalImage = "LISTAGG", @Image = "LISTAGG", @SelfModifier = false] | | | | +- FunctionCall[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] +Added line: 3501 | | | | | +- FunctionName[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] | | | | | | +- ID[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] | | | | | +- Arguments[@ArgumentCount = 2, @CanonicalImage = null] +Added line: 6544 | | | | | +- ArgumentList[@CanonicalImage = null] | | | | | | +- Argument[@CanonicalImage = null] | | | | | | | +- Expression[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | | | | | +- PrimaryPrefix[@CanonicalImage = "LAST_NAME", @Image = "last_name", @SelfModifier = false] | | | | | | | +- SimpleExpression[@CanonicalImage = "LAST_NAME", @Image = "last_name"] +Added line: 7845 | | | | | | | +- Column[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | | | | | +- ID[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | | | | +- Argument[@CanonicalImage = null] | | | | | | +- Expression[@CanonicalImage = "\'; \'", @Image = "\'; \'"] +Added line: 6950 | | | | | | +- PrimaryPrefix[@CanonicalImage = "\'; \'", @Image = "\'; \'", @SelfModifier = false] | | | | | | +- Literal[@CanonicalImage = "\'; \'", @Image = "\'; \'"] | | | | | | +- StringLiteral[@CanonicalImage = "\'; \'", @Image = "\'; \'", @String = "; "] @@ -346,16 +374,19 @@ | | | | +- SqlExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | +- PrimaryPrefix[@CanonicalImage = "HIRE_DATE", @Image = "hire_date", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] +Added line: 8452 | | | | +- Column[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | +- ID[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | +- ColumnAlias[@CanonicalImage = "\"Employees\"", @Image = "\"Employees\""] | | | +- ID[@CanonicalImage = "\"Employees\"", @Image = "\"Employees\""] | | +- IntoClause[@CanonicalImage = null] | | | +- VariableName[@CanonicalImage = "SOME_RECORD", @Image = "some_record"] +Added line: 2678 | | | +- ID[@CanonicalImage = "SOME_RECORD", @Image = "some_record"] | | +- FromClause[@CanonicalImage = null] | | | +- TableReference[@CanonicalImage = null] | | | +- TableName[@CanonicalImage = "EMPLOYEES", @Image = "employees"] +Added line: 7423 | | | +- ID[@CanonicalImage = "EMPLOYEES", @Image = "employees"] | | +- GroupByClause[@CanonicalImage = null] | | | +- Expression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] @@ -365,12 +396,15 @@ | | | +- ID[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | +- OrderByClause[@CanonicalImage = null] | | +- SqlExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] +Added line: 9722 | | +- PrimaryPrefix[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | +- Column[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | +- ID[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] +Added line: 4849 | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 5584 | | +- SelectIntoStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | | +- SelectList[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] @@ -378,12 +412,16 @@ | | | | +- SimpleExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | | +- Column[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | | +- ID[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] +Added line: 2941 | | | +- ColumnAlias[@CanonicalImage = "\"Dept\"", @Image = "\"Dept\""] +Added line: 3045 | | | | +- ID[@CanonicalImage = "\"Dept\"", @Image = "\"Dept\""] | | | +- SqlExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | +- PrimaryPrefix[@CanonicalImage = "HIRE_DATE", @Image = "hire_date", @SelfModifier = false] +Added line: 9980 | | | | +- SimpleExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | +- Column[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] +Added line: 8476 | | | | +- ID[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | +- ColumnAlias[@CanonicalImage = "\"Date\"", @Image = "\"Date\""] | | | | +- ID[@CanonicalImage = "\"Date\"", @Image = "\"Date\""] @@ -393,11 +431,15 @@ | | | | +- Column[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | | +- ID[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | +- ColumnAlias[@CanonicalImage = "\"Name\"", @Image = "\"Name\""] +Added line: 7658 | | | | +- ID[@CanonicalImage = "\"Name\"", @Image = "\"Name\""] | | | +- SqlExpression[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] | | | | +- PrimaryPrefix[@CanonicalImage = "LISTAGG", @Image = "LISTAGG", @SelfModifier = false] +Added line: 4691 +Added line: 2499 | | | | +- FunctionCall[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] | | | | | +- FunctionName[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] +Added line: 2114 | | | | | | +- ID[@CanonicalImage = "LISTAGG", @Image = "LISTAGG"] | | | | | +- Arguments[@ArgumentCount = 2, @CanonicalImage = null] | | | | | +- ArgumentList[@CanonicalImage = null] @@ -409,12 +451,14 @@ | | | | | | +- ID[@CanonicalImage = "LAST_NAME", @Image = "last_name"] | | | | | +- Argument[@CanonicalImage = null] | | | | | +- Expression[@CanonicalImage = "\'; \'", @Image = "\'; \'"] +Added line: 8764 | | | | | +- PrimaryPrefix[@CanonicalImage = "\'; \'", @Image = "\'; \'", @SelfModifier = false] | | | | | +- Literal[@CanonicalImage = "\'; \'", @Image = "\'; \'"] | | | | | +- StringLiteral[@CanonicalImage = "\'; \'", @Image = "\'; \'", @String = "; "] | | | | +- WithinClause[@CanonicalImage = null] | | | | +- OrderByClause[@CanonicalImage = null] | | | | | +- SqlExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] +Added line: 6520 | | | | | | +- PrimaryPrefix[@CanonicalImage = "HIRE_DATE", @Image = "hire_date", @SelfModifier = false] | | | | | | +- SimpleExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | | | +- Column[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] @@ -430,6 +474,7 @@ | | | | +- SimpleExpression[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | | +- Column[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] | | | | +- ID[@CanonicalImage = "DEPARTMENT_ID", @Image = "department_id"] +Added line: 4840 | | | +- ColumnAlias[@CanonicalImage = "\"Emp_list\"", @Image = "\"Emp_list\""] | | | +- ID[@CanonicalImage = "\"Emp_list\"", @Image = "\"Emp_list\""] | | +- IntoClause[@CanonicalImage = null] @@ -445,6 +490,7 @@ | | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "<"] | | | | +- SqlExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | | +- PrimaryPrefix[@CanonicalImage = "HIRE_DATE", @Image = "hire_date", @SelfModifier = false] +Added line: 336 | | | | | +- SimpleExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | | +- Column[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | | +- ID[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] @@ -469,6 +515,7 @@ | | | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"] | | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "<"] | | | | +- SqlExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] +Added line: 7650 | | | | | +- PrimaryPrefix[@CanonicalImage = "HIRE_DATE", @Image = "hire_date", @SelfModifier = false] | | | | | +- SimpleExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | | +- Column[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] @@ -482,9 +529,11 @@ | | | | +- PrimaryPrefix[@CanonicalImage = "INTERVAL \'50\'", @Image = "INTERVAL \'50\'", @SelfModifier = false] | | | | +- Literal[@CanonicalImage = "INTERVAL \'50\'", @Image = "INTERVAL \'50\'"] | | | | +- DateTimeLiteral[@CanonicalImage = "INTERVAL \'50\'", @Image = "INTERVAL \'50\'"] +Added line: 6301 | | | | +- StringLiteral[@CanonicalImage = "\'50\'", @Image = "\'50\'", @String = "50"] | | | +- Condition[@CanonicalImage = null] | | | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"] +Added line: 2954 | | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "<"] | | | | +- SqlExpression[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | | +- PrimaryPrefix[@CanonicalImage = "HIRE_DATE", @Image = "hire_date", @SelfModifier = false] @@ -495,6 +544,7 @@ | | | | +- AdditiveExpression[@CanonicalImage = "SYSDATE - INTERVAL \'5\'", @Image = "sysdate - INTERVAL \'5\'"] | | | | +- PrimaryPrefix[@CanonicalImage = "SYSDATE", @Image = "sysdate", @SelfModifier = false] | | | | | +- SimpleExpression[@CanonicalImage = "SYSDATE", @Image = "sysdate"] +Added line: 5347 | | | | | +- Column[@CanonicalImage = "SYSDATE", @Image = "sysdate"] | | | | | +- ID[@CanonicalImage = "SYSDATE", @Image = "sysdate"] | | | | +- PrimaryPrefix[@CanonicalImage = "INTERVAL \'5\'", @Image = "INTERVAL \'5\'", @SelfModifier = false] @@ -509,6 +559,7 @@ | | | | +- Column[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | | +- ID[@CanonicalImage = "HIRE_DATE", @Image = "hire_date"] | | | +- SqlExpression[@CanonicalImage = "SYSDATE - INTERVAL \'3\'", @Image = "sysdate - INTERVAL \'3\'"] +Added line: 8852 | | | +- AdditiveExpression[@CanonicalImage = "SYSDATE - INTERVAL \'3\'", @Image = "sysdate - INTERVAL \'3\'"] | | | +- PrimaryPrefix[@CanonicalImage = "SYSDATE", @Image = "sysdate", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "SYSDATE", @Image = "sysdate"] @@ -516,8 +567,8 @@ | | | | +- ID[@CanonicalImage = "SYSDATE", @Image = "sysdate"] | | | +- PrimaryPrefix[@CanonicalImage = "INTERVAL \'3\'", @Image = "INTERVAL \'3\'", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "INTERVAL \'3\'", @Image = "INTERVAL \'3\'"] +Added line: 213 | | | +- DateTimeLiteral[@CanonicalImage = "INTERVAL \'3\'", @Image = "INTERVAL \'3\'"] - | | +- OrderByClause[@CanonicalImage = null] | | +- SqlExpression[@CanonicalImage = "\"Dept\"", @Image = "\"Dept\""] | | | +- PrimaryPrefix[@CanonicalImage = "\"Dept\"", @Image = "\"Dept\"", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "\"Dept\"", @Image = "\"Dept\""] @@ -539,15 +590,21 @@ | | +- SelectList[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "LISTAGG", @Image = "listagg"] | | | +- PrimaryPrefix[@CanonicalImage = "LISTAGG", @Image = "listagg", @SelfModifier = false] +Added line: 3748 | | | +- FunctionCall[@CanonicalImage = "LISTAGG", @Image = "listagg"] +Added line: 4552 | | | | +- FunctionName[@CanonicalImage = "LISTAGG", @Image = "listagg"] +Added line: 4634 +Added line: 3843 | | | | | +- ID[@CanonicalImage = "LISTAGG", @Image = "listagg"] | | | | +- Arguments[@ArgumentCount = 2, @CanonicalImage = null] | | | | +- ArgumentList[@CanonicalImage = null] | | | | +- Argument[@CanonicalImage = null] | | | | | +- Expression[@CanonicalImage = "E.EMAIL", @Image = "e.email"] | | | | | +- PrimaryPrefix[@CanonicalImage = "E.EMAIL", @Image = "e.email", @SelfModifier = false] +Added line: 6041 | | | | | +- SimpleExpression[@CanonicalImage = "E.EMAIL", @Image = "e.email"] +Added line: 8363 | | | | | +- TableName[@CanonicalImage = "E", @Image = "e"] | | | | | | +- ID[@CanonicalImage = "E", @Image = "e"] | | | | | +- Column[@CanonicalImage = "EMAIL", @Image = "email"] @@ -559,6 +616,7 @@ | | | +- WithinClause[@CanonicalImage = null] | | | +- OrderByClause[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "E.EMAIL", @Image = "e.email"] +Added line: 5132 | | | +- PrimaryPrefix[@CanonicalImage = "E.EMAIL", @Image = "e.email", @SelfModifier = false] | | | +- SimpleExpression[@CanonicalImage = "E.EMAIL", @Image = "e.email"] | | | +- TableName[@CanonicalImage = "E", @Image = "e"] @@ -580,6 +638,7 @@ | | +- SelectList[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "LISTAGG", @Image = "listagg"] | | | +- PrimaryPrefix[@CanonicalImage = "LISTAGG", @Image = "listagg", @SelfModifier = false] +Added line: 9903 | | | +- FunctionCall[@CanonicalImage = "LISTAGG", @Image = "listagg"] | | | | +- FunctionName[@CanonicalImage = "LISTAGG", @Image = "listagg"] | | | | | +- ID[@CanonicalImage = "LISTAGG", @Image = "listagg"] @@ -597,12 +656,15 @@ | | | | +- Literal[@CanonicalImage = "\'; \'", @Image = "\'; \'"] | | | | +- StringLiteral[@CanonicalImage = "\'; \'", @Image = "\'; \'", @String = "; "] | | | +- WithinClause[@CanonicalImage = null] +Added line: 8243 +Added line: 9063 | | | +- OrderByClause[@CanonicalImage = null] | | | +- SqlExpression[@CanonicalImage = "1", @Image = "1"] | | | +- PrimaryPrefix[@CanonicalImage = "1", @Image = "1", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "1", @Image = "1"] | | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"] | | +- IntoClause[@CanonicalImage = null] +Added line: 8033 | | | +- VariableName[@CanonicalImage = "MY_RECORD", @Image = "my_record"] | | | +- ID[@CanonicalImage = "MY_RECORD", @Image = "my_record"] | | +- FromClause[@CanonicalImage = null] @@ -612,6 +674,7 @@ | | +- WhereClause[@CanonicalImage = null] | | +- Condition[@CanonicalImage = null] | | +- CompoundCondition[@CanonicalImage = null, @Type = null] +Added line: 9306 | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="] | | +- SqlExpression[@CanonicalImage = "CMP_ID", @Image = "cmp_id"] | | | +- PrimaryPrefix[@CanonicalImage = "CMP_ID", @Image = "cmp_id", @SelfModifier = false] @@ -621,6 +684,7 @@ | | +- SqlExpression[@CanonicalImage = "CMP_ID_IN", @Image = "cmp_id_in"] | | +- PrimaryPrefix[@CanonicalImage = "CMP_ID_IN", @Image = "cmp_id_in", @SelfModifier = false] | | +- SimpleExpression[@CanonicalImage = "CMP_ID_IN", @Image = "cmp_id_in"] +Added line: 8703 | | +- Column[@CanonicalImage = "CMP_ID_IN", @Image = "cmp_id_in"] | | +- ID[@CanonicalImage = "CMP_ID_IN", @Image = "cmp_id_in"] | +- Statement[@CanonicalImage = null] @@ -643,6 +707,7 @@ | | | | +- Argument[@CanonicalImage = null] | | | | +- Expression[@CanonicalImage = "\'; \'", @Image = "\'; \'"] | | | | +- PrimaryPrefix[@CanonicalImage = "\'; \'", @Image = "\'; \'", @SelfModifier = false] +Added line: 3605 | | | | +- Literal[@CanonicalImage = "\'; \'", @Image = "\'; \'"] | | | | +- StringLiteral[@CanonicalImage = "\'; \'", @Image = "\'; \'", @String = "; "] | | | +- WithinClause[@CanonicalImage = null] @@ -654,6 +719,8 @@ | | +- IntoClause[@CanonicalImage = null] | | | +- VariableName[@CanonicalImage = "MY_RECORD", @Image = "my_record"] | | | +- ID[@CanonicalImage = "MY_RECORD", @Image = "my_record"] +Added line: 9337 +Added line: 4863 | | +- FromClause[@CanonicalImage = null] | | | +- TableReference[@CanonicalImage = null] | | | +- TableName[@CanonicalImage = "COMPANY_ASAP_FUNC_LOCS", @Image = "company_asap_func_locs"] @@ -687,9 +754,12 @@ | | | +- SqlExpression[@CanonicalImage = "NULL", @Image = "null"] | | | +- PrimaryPrefix[@CanonicalImage = "NULL", @Image = "null", @SelfModifier = false] | | | +- CaseExpression[@CanonicalImage = null] +Added line: 8617 +Added line: 166 | | | +- Condition[@CanonicalImage = null] | | | | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"] | | | | +- ComparisonCondition[@CanonicalImage = null, @Operator = "!="] +Added line: 4811 | | | | | +- SqlExpression[@CanonicalImage = "PRIV", @Image = "priv"] | | | | | | +- PrimaryPrefix[@CanonicalImage = "PRIV", @Image = "priv", @SelfModifier = false] | | | | | | +- SimpleExpression[@CanonicalImage = "PRIV", @Image = "priv"] @@ -703,6 +773,7 @@ | | | | +- ComparisonCondition[@CanonicalImage = null, @Operator = ">="] | | | | +- SqlExpression[@CanonicalImage = "MY_PACKAGE.MY_FUNCTION", @Image = "my_package.my_function"] | | | | | +- PrimaryPrefix[@CanonicalImage = "MY_PACKAGE.MY_FUNCTION", @Image = "my_package.my_function", @SelfModifier = false] +Added line: 2743 | | | | | +- FunctionCall[@CanonicalImage = "MY_PACKAGE.MY_FUNCTION", @Image = "my_package.my_function"] | | | | | +- FunctionName[@CanonicalImage = "MY_PACKAGE.MY_FUNCTION", @Image = "my_package.my_function"] | | | | | | +- ID[@CanonicalImage = "MY_PACKAGE", @Image = "my_package"] @@ -724,6 +795,7 @@ | | | | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | | | | +- ArgumentList[@CanonicalImage = null] | | | | | +- Argument[@CanonicalImage = null] +Added line: 3776 | | | | | +- Expression[@CanonicalImage = "TO_CHAR", @Image = "TO_CHAR"] | | | | | +- PrimaryPrefix[@CanonicalImage = "TO_CHAR", @Image = "TO_CHAR", @SelfModifier = false] | | | | | +- FunctionCall[@CanonicalImage = "TO_CHAR", @Image = "TO_CHAR"] @@ -752,6 +824,7 @@ | | | +- Expression[@CanonicalImage = "\'N\'", @Image = "\'N\'"] | | | +- PrimaryPrefix[@CanonicalImage = "\'N\'", @Image = "\'N\'", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "\'N\'", @Image = "\'N\'"] +Added line: 2611 | | +- IntoClause[@CanonicalImage = null] | | | +- VariableName[@CanonicalImage = "MY_RESULT", @Image = "my_result"] | | | +- ID[@CanonicalImage = "MY_RESULT", @Image = "my_result"] @@ -760,6 +833,8 @@ | | +- TableName[@CanonicalImage = "DUAL", @Image = "DUAL"] | | +- ID[@CanonicalImage = "DUAL", @Image = "DUAL"] | +- Statement[@CanonicalImage = null] +Added line: 2017 +Added line: 861 | | +- UnlabelledStatement[@CanonicalImage = null] | | +- SelectStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | | +- SelectList[@CanonicalImage = null] @@ -770,6 +845,9 @@ | | | | | +- CompoundCondition[@CanonicalImage = null, @Type = null] | | | | | +- ExistsCondition[@CanonicalImage = null] | | | | | +- QueryBlock[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] +Added line: 5112 +Added line: 9887 +Added line: 6265 | | | | | +- SelectList[@CanonicalImage = null] | | | | | +- FromClause[@CanonicalImage = null] | | | | | | +- TableReference[@CanonicalImage = null] @@ -794,6 +872,7 @@ | | | | +- Expression[@CanonicalImage = "0", @Image = "0"] | | | | +- PrimaryPrefix[@CanonicalImage = "0", @Image = "0", @SelfModifier = false] | | | | +- Literal[@CanonicalImage = "0", @Image = "0"] +Added line: 6430 | | | | +- NumericLiteral[@CanonicalImage = "0", @Image = "0"] | | | +- ColumnAlias[@CanonicalImage = "ISEXISTS", @Image = "isExists"] | | | +- ID[@CanonicalImage = "ISEXISTS", @Image = "isExists"] @@ -829,15 +908,18 @@ | | | | +- Literal[@CanonicalImage = "0", @Image = "0"] | | | | +- NumericLiteral[@CanonicalImage = "0", @Image = "0"] | | | +- ColumnAlias[@CanonicalImage = "ISEXISTS", @Image = "isExists"] +Added line: 3818 | | | +- ID[@CanonicalImage = "ISEXISTS", @Image = "isExists"] | | +- IntoClause[@CanonicalImage = null] | | | +- VariableName[@CanonicalImage = "VAL", @Image = "VAL"] | | | +- ID[@CanonicalImage = "VAL", @Image = "VAL"] +Added line: 8324 | | +- FromClause[@CanonicalImage = null] | | +- TableReference[@CanonicalImage = null] | | +- TableName[@CanonicalImage = "DUAL", @Image = "dual"] | | +- ID[@CanonicalImage = "DUAL", @Image = "dual"] | +- Statement[@CanonicalImage = null] +Added line: 7161 | +- UnlabelledStatement[@CanonicalImage = null] | +- SelectIntoStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | +- SelectList[@CanonicalImage = null] @@ -851,10 +933,10 @@ | | | | +- FunctionCall[@CanonicalImage = "F1", @Image = "f1"] | | | | +- FunctionName[@CanonicalImage = "F1", @Image = "f1"] | | | | | +- ID[@CanonicalImage = "F1", @Image = "f1"] - | | | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | | | +- ArgumentList[@CanonicalImage = null] | | | | +- Argument[@CanonicalImage = null] | | | | +- Expression[@CanonicalImage = "X", @Image = "x"] +Added line: 399 | | | | +- PrimaryPrefix[@CanonicalImage = "X", @Image = "x", @SelfModifier = false] | | | | +- SimpleExpression[@CanonicalImage = "X", @Image = "x"] | | | | +- Column[@CanonicalImage = "X", @Image = "x"] @@ -865,6 +947,7 @@ | | | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"] | | | +- Expression[@CanonicalImage = "0", @Image = "0"] | | | +- PrimaryPrefix[@CanonicalImage = "0", @Image = "0", @SelfModifier = false] +Added line: 6647 | | | +- Literal[@CanonicalImage = "0", @Image = "0"] | | | +- NumericLiteral[@CanonicalImage = "0", @Image = "0"] | | +- ColumnAlias[@CanonicalImage = "ISEXISTS", @Image = "isExists"] @@ -874,25 +957,30 @@ | | +- ID[@CanonicalImage = "VAL", @Image = "VAL"] | +- FromClause[@CanonicalImage = null] | +- TableReference[@CanonicalImage = null] +Added line: 1768 | +- TableName[@CanonicalImage = "DUAL", @Image = "dual"] | +- ID[@CanonicalImage = "DUAL", @Image = "dual"] +- SelectStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] +Added line: 557 +Added line: 359 +- SelectList[@CanonicalImage = null] | +- SqlExpression[@CanonicalImage = "TO_NUMBER$", @Image = "TO_NUMBER$"] - | | +- PrimaryPrefix[@CanonicalImage = "TO_NUMBER$", @Image = "TO_NUMBER$", @SelfModifier = false] | | +- FunctionCall[@CanonicalImage = "TO_NUMBER$", @Image = "TO_NUMBER$"] | | +- FunctionName[@CanonicalImage = "TO_NUMBER$", @Image = "TO_NUMBER$"] | | | +- ID[@CanonicalImage = "TO_NUMBER$", @Image = "TO_NUMBER$"] | | +- Arguments[@ArgumentCount = 1, @CanonicalImage = null] | | +- ArgumentList[@CanonicalImage = null] | | +- Argument[@CanonicalImage = null] +Added line: 3290 | | +- Expression[@CanonicalImage = "\'XYZ\'", @Image = "\'xyz\'"] +Added line: 5406 | | | +- PrimaryPrefix[@CanonicalImage = "\'XYZ\'", @Image = "\'xyz\'", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "\'XYZ\'", @Image = "\'xyz\'"] | | | +- StringLiteral[@CanonicalImage = "\'XYZ\'", @Image = "\'xyz\'", @String = "xyz"] | | +- Expression[@CanonicalImage = "0", @Image = "0"] | | +- PrimaryPrefix[@CanonicalImage = "0", @Image = "0", @SelfModifier = false] | | +- Literal[@CanonicalImage = "0", @Image = "0"] +Added line: 7621 | | +- NumericLiteral[@CanonicalImage = "0", @Image = "0"] | +- ColumnAlias[@CanonicalImage = "BOGUS", @Image = "BOGUS"] | +- ID[@CanonicalImage = "BOGUS", @Image = "BOGUS"] @@ -903,3 +991,4 @@ +- TableReference[@CanonicalImage = null] +- TableName[@CanonicalImage = "SOME_TABLE", @Image = "some_table"] +- ID[@CanonicalImage = "SOME_TABLE", @Image = "some_table"] +Added line: 1574 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SelectIntoArray.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SelectIntoArray.txt index 78b8418f5b..49d1c6e0bd 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SelectIntoArray.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SelectIntoArray.txt @@ -1,45 +1,93 @@ +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +Added line: 230 +- Global[@CanonicalImage = null] +- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null] - +- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1] +Added line: 9524 +Added line: 6654 | +- ObjectNameDeclaration[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] - | +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] - +- DeclarativeSection[@CanonicalImage = null] +Added line: 1287 +Added line: 9256 +Added line: 6620 | +- DeclarativeUnit[@CanonicalImage = null] | | +- SubTypeDefinition[@CanonicalImage = "EXAMPLE_DATA_RT", @Image = "example_data_rt"] +Added line: 527 | | +- QualifiedID[@CanonicalImage = "EXAMPLE_DATA_RT", @Image = "example_data_rt"] +Added line: 3974 +Added line: 9182 +Added line: 9595 | | +- FieldDeclaration[@CanonicalImage = "FIELD_ONE", @Image = "field_one"] +Added line: 9555 +Added line: 5422 +Added line: 8947 | | | +- ID[@CanonicalImage = "FIELD_ONE", @Image = "field_one"] +Added line: 7134 | | | +- Datatype[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER", @TypeImage = "PLS_INTEGER"] - | | | +- ScalarDataTypeName[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER"] | | +- FieldDeclaration[@CanonicalImage = "FIELD_TWO", @Image = "field_two"] +Added line: 3263 +Added line: 7642 +Added line: 5723 | | | +- ID[@CanonicalImage = "FIELD_TWO", @Image = "field_two"] +Added line: 6872 +Added line: 6317 +Added line: 22 +Added line: 631 | | | +- Datatype[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER", @TypeImage = "PLS_INTEGER"] +Added line: 4211 +Added line: 2156 +Added line: 2766 | | | +- ScalarDataTypeName[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER"] | | +- FieldDeclaration[@CanonicalImage = "FIELD_THREE", @Image = "field_three"] +Added line: 2491 +Added line: 1784 +Added line: 966 +Added line: 3995 +Added line: 1358 +Added line: 7387 +Added line: 8546 +Added line: 8695 | | +- ID[@CanonicalImage = "FIELD_THREE", @Image = "field_three"] | | +- Datatype[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER", @TypeImage = "PLS_INTEGER"] | | +- ScalarDataTypeName[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER"] +Added line: 4853 +Added line: 3371 +Added line: 7124 +Added line: 1499 | +- DeclarativeUnit[@CanonicalImage = null] | | +- SubTypeDefinition[@CanonicalImage = "EXAMPLE_DATA_AAT", @Image = "example_data_aat"] +Added line: 8935 +Added line: 3006 | | +- QualifiedID[@CanonicalImage = "EXAMPLE_DATA_AAT", @Image = "example_data_aat"] +Added line: 4285 | | +- Datatype[@CanonicalImage = "EXAMPLE_DATA_RT", @Image = "example_data_rt", @TypeImage = "example_data_rt"] | | | +- QualifiedName[@CanonicalImage = "EXAMPLE_DATA_RT", @Image = "example_data_rt"] | | | +- UnqualifiedID[@CanonicalImage = "EXAMPLE_DATA_RT", @Image = "example_data_rt"] +Added line: 5628 +Added line: 1375 | | +- Datatype[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER", @TypeImage = "BINARY_INTEGER"] +Added line: 6810 | | +- ScalarDataTypeName[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER"] +Added line: 1395 +Added line: 7676 +Added line: 4459 +Added line: 2258 +Added line: 7265 +Added line: 7411 | +- DeclarativeUnit[@CanonicalImage = null] | +- VariableOrConstantDeclaration[@CanonicalImage = null] | +- VariableOrConstantDeclarator[@CanonicalImage = "L_EXAMPLE_DATA EXAMPLE_DATA_AAT", @Image = "l_example_data example_data_aat"] | +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_EXAMPLE_DATA", @Image = "l_example_data"] | | +- ID[@CanonicalImage = "L_EXAMPLE_DATA", @Image = "l_example_data"] | +- Datatype[@CanonicalImage = "EXAMPLE_DATA_AAT", @Image = "example_data_aat", @TypeImage = "example_data_aat"] +Added line: 3868 | +- QualifiedName[@CanonicalImage = "EXAMPLE_DATA_AAT", @Image = "example_data_aat"] | +- UnqualifiedID[@CanonicalImage = "EXAMPLE_DATA_AAT", @Image = "example_data_aat"] +- Statement[@CanonicalImage = null] +Added line: 3208 | +- UnlabelledStatement[@CanonicalImage = null] | +- SelectIntoStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | +- SelectList[@CanonicalImage = null] +Added line: 3190 +Added line: 7353 | | +- SqlExpression[@CanonicalImage = "1", @Image = "1"] | | | +- PrimaryPrefix[@CanonicalImage = "1", @Image = "1", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "1", @Image = "1"] @@ -47,35 +95,76 @@ | | +- ColumnAlias[@CanonicalImage = "FIELD_VALUE_ONE", @Image = "field_value_one"] | | | +- ID[@CanonicalImage = "FIELD_VALUE_ONE", @Image = "field_value_one"] | | +- SqlExpression[@CanonicalImage = "2", @Image = "2"] +Added line: 6698 | | | +- PrimaryPrefix[@CanonicalImage = "2", @Image = "2", @SelfModifier = false] - | | | +- Literal[@CanonicalImage = "2", @Image = "2"] | | | +- NumericLiteral[@CanonicalImage = "2", @Image = "2"] | | +- ColumnAlias[@CanonicalImage = "FIELD_VALUE_TWO", @Image = "field_value_two"] +Added line: 4546 +Added line: 8301 | | | +- ID[@CanonicalImage = "FIELD_VALUE_TWO", @Image = "field_value_two"] | | +- SqlExpression[@CanonicalImage = "3", @Image = "3"] +Added line: 7505 +Added line: 5861 | | | +- PrimaryPrefix[@CanonicalImage = "3", @Image = "3", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "3", @Image = "3"] - | | | +- NumericLiteral[@CanonicalImage = "3", @Image = "3"] +Added line: 3308 | | +- ColumnAlias[@CanonicalImage = "FIELD_VALUE_THREE", @Image = "field_value_three"] +Added line: 66 +Added line: 2940 +Added line: 9216 +Added line: 8234 +Added line: 1945 | | +- ID[@CanonicalImage = "FIELD_VALUE_THREE", @Image = "field_value_three"] +Added line: 7922 +Added line: 5747 +Added line: 1807 +Added line: 433 | +- IntoClause[@CanonicalImage = null] | | +- VariableName[@CanonicalImage = "L_EXAMPLE_DATA(1).FIELD_ONE", @Image = "l_example_data(1).field_one"] +Added line: 8009 | | | +- ID[@CanonicalImage = "L_EXAMPLE_DATA", @Image = "l_example_data"] | | | +- Literal[@CanonicalImage = "1", @Image = "1"] +Added line: 3824 | | | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"] +Added line: 1975 +Added line: 8494 | | | +- ID[@CanonicalImage = "FIELD_ONE", @Image = "field_one"] +Added line: 3832 | | +- VariableName[@CanonicalImage = "L_EXAMPLE_DATA(1).FIELD_TWO", @Image = "l_example_data(1).field_two"] | | | +- ID[@CanonicalImage = "L_EXAMPLE_DATA", @Image = "l_example_data"] | | | +- Literal[@CanonicalImage = "1", @Image = "1"] +Added line: 1105 +Added line: 3937 | | | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"] +Added line: 3849 +Added line: 8367 +Added line: 9132 +Added line: 2599 +Added line: 8567 +Added line: 2905 +Added line: 8511 | | | +- ID[@CanonicalImage = "FIELD_TWO", @Image = "field_two"] +Added line: 4348 +Added line: 6688 | | +- VariableName[@CanonicalImage = "L_EXAMPLE_DATA(1).FIELD_THREE", @Image = "l_example_data(1).field_three"] | | +- ID[@CanonicalImage = "L_EXAMPLE_DATA", @Image = "l_example_data"] +Added line: 7034 +Added line: 6538 +Added line: 3598 +Added line: 4103 | | +- Literal[@CanonicalImage = "1", @Image = "1"] +Added line: 7295 +Added line: 4526 +Added line: 3090 | | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"] +Added line: 1063 | | +- ID[@CanonicalImage = "FIELD_THREE", @Image = "field_three"] | +- FromClause[@CanonicalImage = null] | +- TableReference[@CanonicalImage = null] +Added line: 9001 | +- TableName[@CanonicalImage = "DUAL", @Image = "DUAL"] | +- ID[@CanonicalImage = "DUAL", @Image = "DUAL"] +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"] +Added line: 9160 +Added line: 5760 +Added line: 9342 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SqlMacroClause.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SqlMacroClause.txt index 9b9c36c5ee..6507bf8811 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SqlMacroClause.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SqlMacroClause.txt @@ -1,74 +1,143 @@ +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- PackageBody[@CanonicalImage = "TEST", @Image = "test", @ObjectName = "test"] +Added line: 381 +- ObjectNameDeclaration[@CanonicalImage = "TEST", @Image = "test"] +Added line: 306 +Added line: 7757 +Added line: 4738 +Added line: 2611 +Added line: 2957 +Added line: 5293 | +- ID[@CanonicalImage = "TEST", @Image = "test"] +- DeclarativeSection[@CanonicalImage = null] | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 124 +Added line: 2623 +Added line: 1566 +Added line: 5864 +Added line: 1263 | | +- ProgramUnit[@CanonicalImage = null, @MethodName = "test1", @Name = "test1", @ObjectName = null] +Added line: 5205 +Added line: 5165 +Added line: 6204 +Added line: 1951 +Added line: 2018 +Added line: 2341 +Added line: 3334 +Added line: 7040 +Added line: 4088 +Added line: 8438 | | +- MethodDeclarator[@CanonicalImage = "TEST1", @Image = "test1", @ParameterCount = 1] | | | +- ObjectNameDeclaration[@CanonicalImage = "TEST1", @Image = "test1"] | | | | +- ID[@CanonicalImage = "TEST1", @Image = "test1"] | | | +- FormalParameters[@CanonicalImage = "()", @Image = "()"] | | | +- Datatype[@CanonicalImage = "CLOB", @Image = "CLOB", @TypeImage = "CLOB"] +Added line: 3341 +Added line: 2074 +Added line: 4565 +Added line: 2718 | | | | +- ScalarDataTypeName[@CanonicalImage = "CLOB", @Image = "CLOB"] +Added line: 1598 | | | +- SqlMacroClause[@CanonicalImage = null, @Type = "TABLE"] +Added line: 611 +Added line: 4502 +Added line: 2869 | | +- Statement[@CanonicalImage = null] | | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 3571 | | | +- ReturnStatement[@CanonicalImage = null] - | | | +- Expression[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'"] +Added line: 6011 | | | +- PrimaryPrefix[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'", @SelfModifier = false] +Added line: 251 +Added line: 9733 +Added line: 2765 +Added line: 8105 | | | +- Literal[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'"] | | | +- StringLiteral[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'", @String = "q[select * from dual]"] | | +- ID[@CanonicalImage = "TEST1", @Image = "test1"] +Added line: 4772 +Added line: 698 | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 6350 | | +- ProgramUnit[@CanonicalImage = null, @MethodName = "test2", @Name = "test2", @ObjectName = null] +Added line: 3922 | | +- MethodDeclarator[@CanonicalImage = "TEST2", @Image = "test2", @ParameterCount = 1] - | | | | +- ID[@CanonicalImage = "TEST2", @Image = "test2"] | | | +- FormalParameters[@CanonicalImage = "()", @Image = "()"] - | | | +- SqlMacroClause[@CanonicalImage = null, @Type = "SCALAR"] +Added line: 1058 | | +- Statement[@CanonicalImage = null] | | | +- UnlabelledStatement[@CanonicalImage = null] | | | +- ReturnStatement[@CanonicalImage = null] | | | +- Expression[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'"] +Added line: 4292 +Added line: 7665 +Added line: 9133 +Added line: 469 | | | +- PrimaryPrefix[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'"] +Added line: 4398 | | | +- StringLiteral[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'", @String = "q[select * from dual]"] +Added line: 8999 | | +- ID[@CanonicalImage = "TEST2", @Image = "test2"] +Added line: 6257 +Added line: 1772 | +- DeclarativeUnit[@CanonicalImage = null] +Added line: 3838 | | +- ProgramUnit[@CanonicalImage = null, @MethodName = "test3", @Name = "test3", @ObjectName = null] +Added line: 1885 | | +- MethodDeclarator[@CanonicalImage = "TEST3", @Image = "test3", @ParameterCount = 1] +Added line: 9122 +Added line: 7113 Added line: 2361 | | | +- ObjectNameDeclaration[@CanonicalImage = "TEST3", @Image = "test3"] | | | | +- ID[@CanonicalImage = "TEST3", @Image = "test3"] | | | +- FormalParameters[@CanonicalImage = "()", @Image = "()"] | | | +- Datatype[@CanonicalImage = "CLOB", @Image = "CLOB", @TypeImage = "CLOB"] | | | | +- ScalarDataTypeName[@CanonicalImage = "CLOB", @Image = "CLOB"] +Added line: 8512 | | | +- SqlMacroClause[@CanonicalImage = null, @Type = "SCALAR"] | | +- Statement[@CanonicalImage = null] +Added line: 5344 +Added line: 954 +Added line: 606 | | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 8223 | | | +- ReturnStatement[@CanonicalImage = null] +Added line: 74 +Added line: 6174 | | | +- Expression[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'"] +Added line: 4518 +Added line: 257 +Added line: 2577 | | | +- PrimaryPrefix[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'"] | | | +- StringLiteral[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'", @String = "q[select * from dual]"] | | +- ID[@CanonicalImage = "TEST3", @Image = "test3"] | +- DeclarativeUnit[@CanonicalImage = null] - | | +- ProgramUnit[@CanonicalImage = null, @MethodName = "test4", @Name = "test4", @ObjectName = null] | | +- MethodDeclarator[@CanonicalImage = "TEST4", @Image = "test4", @ParameterCount = 1] +Added line: 1721 | | | +- ObjectNameDeclaration[@CanonicalImage = "TEST4", @Image = "test4"] +Added line: 1081 +Added line: 147 | | | | +- ID[@CanonicalImage = "TEST4", @Image = "test4"] | | | +- FormalParameters[@CanonicalImage = "()", @Image = "()"] +Added line: 7427 +Added line: 4923 | | | +- Datatype[@CanonicalImage = "CLOB", @Image = "CLOB", @TypeImage = "CLOB"] | | | | +- ScalarDataTypeName[@CanonicalImage = "CLOB", @Image = "CLOB"] | | | +- SqlMacroClause[@CanonicalImage = null, @Type = "TABLE"] Added line: 3793 | | +- Statement[@CanonicalImage = null] Added line: 2999 +Added line: 9604 | | | +- UnlabelledStatement[@CanonicalImage = null] | | | +- ReturnStatement[@CanonicalImage = null] +Added line: 9376 | | | +- Expression[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'"] | | | +- PrimaryPrefix[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'", @SelfModifier = false] +Added line: 4343 | | | +- Literal[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'"] +Added line: 787 +Added line: 972 | | | +- StringLiteral[@CanonicalImage = "\'Q[SELECT * FROM DUAL]\'", @Image = "\'q[select * from dual]\'", @String = "q[select * from dual]"] | | +- ID[@CanonicalImage = "TEST4", @Image = "test4"] | +- DeclarativeUnit[@CanonicalImage = null] @@ -76,36 +145,56 @@ Added line: 2999 | +- MethodDeclarator[@CanonicalImage = "TEST5", @Image = "test5", @ParameterCount = 1] | | +- ObjectNameDeclaration[@CanonicalImage = "TEST5", @Image = "test5"] Added line: 8779 +Added line: 7276 +Added line: 9796 | | | +- ID[@CanonicalImage = "TEST5", @Image = "test5"] | | +- FormalParameters[@CanonicalImage = "()", @Image = "()"] | | +- Datatype[@CanonicalImage = "INT", @Image = "INT", @TypeImage = "INT"] | | +- ScalarDataTypeName[@CanonicalImage = "INT", @Image = "INT"] | +- DeclarativeSection[@CanonicalImage = null] +Added line: 1735 | | +- DeclarativeUnit[@CanonicalImage = null] | | +- CursorSpecification[@CanonicalImage = null] | | +- CursorUnit[@CanonicalImage = "C", @Image = "c"] +Added line: 9725 | | +- ID[@CanonicalImage = "C", @Image = "c"] | | +- SelectStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] | | +- SelectList[@CanonicalImage = null] +Added line: 2530 | | | +- SqlExpression[@CanonicalImage = "1", @Image = "1"] | | | +- PrimaryPrefix[@CanonicalImage = "1", @Image = "1", @SelfModifier = false] | | | +- Literal[@CanonicalImage = "1", @Image = "1"] | | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"] +Added line: 422 +Added line: 9574 | | +- FromClause[@CanonicalImage = null] +Added line: 7339 Added line: 2708 | | +- TableReference[@CanonicalImage = null] - | | +- SchemaName[@CanonicalImage = "TEST", @Image = "test"] +Added line: 7588 | | | +- ID[@CanonicalImage = "TEST", @Image = "test"] +Added line: 1987 +Added line: 9955 +Added line: 2774 +Added line: 946 | | +- FunctionCall[@CanonicalImage = "TEST1", @Image = "test1"] | | +- FunctionName[@CanonicalImage = "TEST1", @Image = "test1"] +Added line: 2307 | | | +- ID[@CanonicalImage = "TEST1", @Image = "test1"] | | +- Arguments[@ArgumentCount = 0, @CanonicalImage = null] +Added line: 8298 | +- Statement[@CanonicalImage = null] | | +- UnlabelledStatement[@CanonicalImage = null] +Added line: 4114 | | +- ReturnStatement[@CanonicalImage = null] +Added line: 7276 | | +- Expression[@CanonicalImage = "1", @Image = "1"] | | +- PrimaryPrefix[@CanonicalImage = "1", @Image = "1", @SelfModifier = false] | | +- Literal[@CanonicalImage = "1", @Image = "1"] | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"] | +- ID[@CanonicalImage = "TEST5", @Image = "test5"] +Added line: 3379 +- ID[@CanonicalImage = "TEST", @Image = "test"] +Added line: 9069 +Added line: 8285 +Added line: 1392 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SqlPlusLexicalVariablesIssue195.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SqlPlusLexicalVariablesIssue195.txt index 344ad8c958..6b7dbf1c33 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SqlPlusLexicalVariablesIssue195.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/ast/SqlPlusLexicalVariablesIssue195.txt @@ -1,5 +1,94 @@ +Added line: 1224 +Added line: 7925 +Added line: 9393 +Added line: 5469 +Added line: 5786 +Added line: 2799 +Added line: 6507 +Added line: 1270 +Added line: 8492 +Added line: 325 +Added line: 8252 +Added line: 1205 +Added line: 891 +Added line: 8735 +Added line: 4679 +Added line: 6217 +Added line: 1220 +Added line: 6315 +Added line: 254 +Added line: 4159 +Added line: 6336 +Added line: 3482 Added line: 6218 +Added line: 1289 +Added line: 41 +Added line: 4316 +Added line: 8397 +Added line: 2590 +Added line: 5590 +Added line: 9075 +Added line: 961 +Added line: 1882 +Added line: 1342 +Added line: 7674 +Added line: 8479 +Added line: 3642 +Added line: 6561 +Added line: 338 +Added line: 8993 +Added line: 7256 +Added line: 1120 +Added line: 3752 +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] Added line: 4680 +Added line: 7640 Added line: 146 -Added line: 1542 +Added line: 7828 +Added line: 996 +Added line: 6515 +Added line: 6109 +Added line: 8575 +Added line: 8077 +Added line: 7173 +Added line: 659 +Added line: 4055 +Added line: 7474 +Added line: 7399 +Added line: 6023 +Added line: 3383 +Added line: 852 +Added line: 4824 +Added line: 8365 +Added line: 4100 +Added line: 2079 +Added line: 2416 +Added line: 5501 +Added line: 4664 +Added line: 1129 +Added line: 5707 +Added line: 111 +Added line: 2221 +Added line: 429 +Added line: 2057 +Added line: 1577 +Added line: 9173 +Added line: 685 +Added line: 2542 +Added line: 9723 +Added line: 4659 +Added line: 4544 +Added line: 8942 +Added line: 2351 +Added line: 9753 +Added line: 4114 +Added line: 9186 +Added line: 4026 +Added line: 9471 +Added line: 5256 +Added line: 6981 +Added line: 9171 +Added line: 274 +Added line: 6997 +Added line: 9840 +Added line: 2151 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/identifiers.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/identifiers.txt index c2409695f5..9946a7558e 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/identifiers.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/identifiers.txt @@ -1,62 +1,151 @@ [Image] or [Truncated image[ Bcol Ecol L1 +Added line: 3130 [DECLARE] 1 8 +Added line: 1785 +Added line: 3128 +Added line: 5882 +Added line: 9295 L2 [QTY_ON_HAND] 2 13 +Added line: 4588 +Added line: 8099 +Added line: 7648 +Added line: 7714 +Added line: 9579 [NUMBER] 14 20 [(] 20 21 +Added line: 3205 +Added line: 4025 +Added line: 9627 [5] 21 22 +Added line: 9216 [)] 22 23 - [;] 23 24 +Added line: 5930 +Added line: 7435 +Added line: 9113 +Added line: 7783 +Added line: 685 +Added line: 2501 +Added line: 3581 +Added line: 9876 +Added line: 6596 +Added line: 8288 L3 [BEGIN] 1 6 L4 [SELECT] 2 8 +Added line: 5514 [QUANTITY] 9 17 +Added line: 7206 +Added line: 1124 +Added line: 3896 +Added line: 9794 +Added line: 8348 +Added line: 9411 +Added line: 7002 [INTO] 18 22 +Added line: 2898 [QTY_ON_HAND] 23 34 +Added line: 671 +Added line: 5136 [FROM] 35 39 [INVENTORY] 40 49 +Added line: 5593 +Added line: 6309 L5 +Added line: 6119 +Added line: 5907 [WHERE] 3 8 [PRODUCT] 9 16 [=] 17 18 +Added line: 6262 ['TENNIS RACKET'] 19 34 +Added line: 672 +Added line: 6491 +Added line: 9587 L6 [AND] 5 8 [PRODUCT] 9 18 +Added line: 4025 +Added line: 1547 +Added line: 9495 +Added line: 9646 +Added line: 6811 [=] 19 20 +Added line: 5318 ['tennis racket'] 21 36 L7 +Added line: 6854 [AND] 11 14 [PRODUCT] 15 22 - [=] 23 24 ['tennis racket'] 25 40 L8 +Added line: 2737 [AND] 11 14 +Added line: 6812 +Added line: 1043 ["Product info"] 15 29 [=] 30 31 - ['tennis '] 32 41 +Added line: 5617 +Added line: 6632 L9 [AND] 11 14 +Added line: 8610 +Added line: 8519 [AN_ID] 15 22 +Added line: 9842 +Added line: 4799 [=] 23 24 +Added line: 2688 +Added line: 6025 +Added line: 4102 +Added line: 2225 +Added line: 7494 ['foo'] 25 30 -L10 +Added line: 5410 +Added line: 1376 +Added line: 4060 +Added line: 4818 +Added line: 1797 +Added line: 1422 [AND] 11 14 +Added line: 373 +Added line: 2673 [" not an id"] 15 27 [=] 28 29 +Added line: 3007 +Added line: 3926 ['foo'] 30 35 +Added line: 4374 +Added line: 5304 +Added line: 8769 L11 [FOR] 3 6 [UPDATE] 7 13 [OF] 14 16 +Added line: 2352 +Added line: 2417 +Added line: 9097 [QUANTITY] 17 25 +Added line: 8373 [;] 25 26 L12 +Added line: 4095 [COMMIT] 2 8 [;] 8 9 +Added line: 8160 L13 +Added line: 1003 +Added line: 1280 +Added line: 9175 +Added line: 4123 +Added line: 3282 +Added line: 366 [END] 1 4 [;] 4 5 +Added line: 1904 +Added line: 1036 +Added line: 2218 +Added line: 801 EOF diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/sample-plsql.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/sample-plsql.txt index a6c152c40c..34953c6954 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/sample-plsql.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/sample-plsql.txt @@ -2,8 +2,10 @@ L1 [CREATE] 1 7 [OR] 8 10 +Added line: 7912 [REPLACE] 11 18 L2 +Added line: 2070 [PACKAGE] 1 8 [TEST_SCHEMA] 9 22 [.] 22 23 @@ -14,6 +16,7 @@ L19 [PI] 1 3 [CONSTANT] 5 13 [NUMBER] 14 20 +Added line: 428 [:] 21 22 [=] 22 23 [3.1415] 24 30 @@ -26,16 +29,17 @@ L20 [=] 22 23 [3.2E9] 24 29 [;] 29 30 +Added line: 6994 L21 [D] 1 2 [CONSTANT] 5 13 - [NUMBER] 14 20 [:] 21 22 [=] 22 23 [3.2E9] 24 29 [;] 29 30 L22 [YEAR_CREATED] 1 13 +Added line: 5123 [CONSTANT] 14 22 [NUMBER] 23 29 [:] 30 31 @@ -64,6 +68,7 @@ L24 L29 [TYPE] 1 5 [ASSC_ARRAY] 6 16 +Added line: 4263 [IS] 17 19 [TABLE] 20 25 [OF] 26 28 @@ -71,9 +76,11 @@ L29 [INDEX] 37 42 [BY] 43 45 [VARCHAR2] 46 54 +Added line: 7863 [(] 54 55 [30] 55 57 [)] 57 58 +Added line: 3813 [;] 58 59 L34 [TYPE] 1 5 @@ -166,6 +173,7 @@ L47 [APP_USER] 3 11 [VARCHAR2] 30 38 [(] 38 39 +Added line: 6437 [20] 39 41 [)] 41 42 [,] 42 43 @@ -182,6 +190,7 @@ L49 [(] 38 39 [20] 39 41 [)] 41 42 +Added line: 2634 L50 [)] 1 2 [;] 2 3 @@ -216,6 +225,7 @@ L63 L66 [CURRENT_PI] 1 11 [NUMBER] 12 18 +Added line: 634 [:] 19 20 [=] 20 21 [3.1415] 22 28 @@ -228,6 +238,7 @@ L67 [2002] 24 28 [;] 28 29 L68 +Added line: 5804 [CURRENT_AUTHOR] 1 15 [VARCHAR2] 16 24 [(] 24 25 @@ -244,11 +255,13 @@ L69 [=] 21 22 ['24-feb-02'] 23 34 [;] 34 35 +Added line: 49 L72 [CURSOR] 1 7 [CUR1] 8 12 [(] 12 13 [A] 13 14 +Added line: 1881 [VARCHAR2] 15 23 [,] 23 24 [B] 25 26 @@ -281,11 +294,13 @@ L73 [,] 41 42 [D] 43 44 [BOOLEAN] 45 52 +Added line: 5899 [)] 52 53 [IS] 54 56 Added line: 4805 [SELECT] 57 63 [*] 64 65 +Added line: 7177 [FROM] 66 70 [CUSTOMER] 71 79 [WHERE] 80 85 @@ -304,6 +319,7 @@ L87 L88 [R_BANK_REC] 3 13 [OUT] 21 24 +Added line: 4166 [BANK_TYPE] 25 34 [,] 34 35 L89 @@ -312,15 +328,18 @@ L89 [VARCHAR2] 25 33 [)] 33 34 L90 +Added line: 7434 [RETURN] 1 7 [NUMBER] 8 14 [;] 14 15 +Added line: 4757 L93 [PROCEDURE] 1 10 [WITHOUT_PARAMETERS] 11 29 [;] 29 30 L96 [FUNCTION] 1 9 +Added line: 4789 [GET_WITHOUT_PARAMETERS] 10 32 [;] 32 33 L112 @@ -345,7 +364,9 @@ L123 [(] 22 23 L124 [P_BIC] 3 8 +Added line: 1268 [VARCHAR2] 21 29 +Added line: 8465 [,] 29 30 L125 [R_BANK_REC] 3 13 @@ -388,8 +409,10 @@ L146 [,] 29 30 L147 [R_BANK_TAB] 3 13 +Added line: 2952 [IN] 21 23 [OUT] 24 27 +Added line: 668 [BANK_TABLE] 28 38 [,] 38 39 L148 @@ -406,6 +429,7 @@ L150 [RETURN] 1 7 [VARCHAR2] 8 16 [;] 16 17 +Added line: 4262 L162 [PROCEDURE] 1 10 [SEARCH] 11 17 @@ -422,6 +446,7 @@ L165 [P_NAME] 3 9 [VARCHAR2] 21 29 [,] 29 30 +Added line: 4344 L166 [P_ADDRESS] 3 12 [VARCHAR2] 21 29 @@ -447,6 +472,7 @@ L170 [VARCHAR2] 25 33 [)] 33 34 [;] 34 35 +Added line: 2967 L176 [PROCEDURE] 1 10 [GET] 11 14 @@ -456,6 +482,7 @@ L177 [VARCHAR2] 21 29 [,] 29 30 L178 +Added line: 5163 [P_BIC] 3 8 [VARCHAR2] 21 29 [,] 29 30 @@ -483,6 +510,7 @@ L190 [GET_BY_CRITERIA] 11 26 [(] 27 28 L191 +Added line: 204 [P_CRITERIA] 3 13 [BANK_TYPE] 21 30 [,] 30 31 @@ -507,6 +535,7 @@ L197 [PROCEDURE] 1 10 [INS] 11 14 [(] 15 16 +Added line: 8573 L198 [P_DATA] 3 9 [IN] 21 23 @@ -520,7 +549,6 @@ L201 L202 [P_DATA] 3 9 [IN] 21 23 - [)] 34 35 [;] 35 36 L205 [PROCEDURE] 1 10 @@ -529,6 +557,7 @@ L205 L206 [P_DATA] 3 9 [IN] 21 23 +Added line: 4896 [BANK_TYPE] 24 33 [)] 33 34 [;] 34 35 @@ -547,6 +576,7 @@ L217 [DEL] 11 14 [(] 15 16 L218 +Added line: 2956 [P_DATA] 3 9 [IN] 21 23 [BANK_TYPE] 24 33 @@ -558,6 +588,7 @@ L221 [(] 21 22 L222 [P_DATA] 3 9 +Added line: 1844 [IN] 21 23 [BANK_TABLE] 24 34 [)] 34 35 @@ -573,12 +604,14 @@ L226 [)] 33 34 [;] 34 35 L229 +Added line: 2124 [PROCEDURE] 1 10 [LCK_TABLE] 11 20 [(] 21 22 L230 [P_DATA] 3 9 [IN] 21 23 +Added line: 4573 [BANK_TABLE] 24 34 [)] 34 35 [;] 35 36 @@ -599,6 +632,7 @@ L235 [NUMBER] 25 31 [,] 31 32 L236 +Added line: 29 [R_MESSAGE] 3 12 [OUT] 21 24 [VARCHAR2] 25 33 @@ -615,6 +649,7 @@ L243 [REPLACE] 11 18 L244 [PACKAGE] 1 8 +Added line: 8956 [ADVICE_DATA] 9 20 L245 [IS] 1 3 @@ -623,6 +658,7 @@ L257 [ADVICE_TYPE_RECORD] 9 27 [IS] 28 30 [ADVICE_TYPE] 31 42 +Added line: 3560 [%] 42 43 [ROWTYPE] 43 50 [;] 50 51 @@ -671,9 +707,11 @@ L264 [TABLE] 22 27 [OF] 28 30 [ADVICE_RECORD] 31 44 +Added line: 8787 [INDEX] 45 50 [BY] 51 53 [BINARY_INTEGER] 54 68 +Added line: 3874 [;] 68 69 L266 [SUBTYPE] 1 8 @@ -684,6 +722,7 @@ L266 [ROWTYPE] 39 46 [;] 46 47 L267 +Added line: 2140 [TYPE] 1 5 [SW_ADVICE_TABLE] 6 21 [IS] 22 24 @@ -692,6 +731,7 @@ L267 [SW_ADVICE_RECORD] 34 50 [INDEX] 51 56 [BY] 57 59 +Added line: 4990 [BINARY_INTEGER] 60 74 Added line: 8970 [;] 74 75 @@ -713,9 +753,11 @@ L270 [INDEX] 43 48 [BY] 49 51 [BINARY_INTEGER] 52 66 +Added line: 8121 [;] 66 67 L273 [FUNCTION] 1 9 +Added line: 934 [GET_ADVICE_TYPES] 10 26 [(] 27 28 L274 @@ -756,6 +798,7 @@ L294 L295 [DEF_PARTY] 3 12 [OUT] 21 24 +Added line: 4959 [VARCHAR2] 25 33 [,] 33 34 L296 @@ -766,7 +809,6 @@ L296 L297 [R_RESULT] 3 11 [OUT] 21 24 - [NUMBER] 25 31 [,] 31 32 L298 [R_MESSAGE] 3 12 @@ -783,6 +825,7 @@ L303 [VARCHAR2] 21 29 [)] 29 30 L304 +Added line: 7674 [RETURN] 1 7 [VARCHAR2] 8 16 [;] 16 17 @@ -795,6 +838,7 @@ L315 [VARCHAR2] 21 29 [,] 29 30 L316 +Added line: 811 [P_MEDIUM] 3 11 [VARCHAR2] 21 29 [,] 29 30 @@ -854,8 +898,10 @@ L329 [IN] 21 23 [OUT] 24 27 [VARCHAR2] 28 36 +Added line: 1031 [)] 36 37 [;] 37 38 +Added line: 5298 L332 [PROCEDURE] 1 10 [LIST_ADVICES] 11 23 @@ -865,17 +911,20 @@ L333 [VARCHAR2] 21 29 [,] 29 30 L334 +Added line: 4265 [P_STEP_SEQ] 3 13 [NUMBER] 21 27 [,] 27 28 L335 [P_IN_OUT] 3 11 [VARCHAR2] 21 29 +Added line: 3588 [,] 29 30 L336 [R_RESULT] 3 11 [IN] 21 23 [OUT] 24 27 +Added line: 8750 [NUMBER] 28 34 [,] 34 35 L337 @@ -952,6 +1001,7 @@ L356 [R_MESSAGE] 3 12 [OUT] 23 26 [VARCHAR2] 27 35 +Added line: 9885 [)] 35 36 [;] 36 37 L359 @@ -961,6 +1011,7 @@ L359 L360 [P_ID] 3 7 [VARCHAR2] 21 29 +Added line: 3383 [,] 29 30 L361 [R_LIST] 3 9 @@ -970,6 +1021,7 @@ L361 [,] 43 44 L362 [R_RESULT] 3 11 +Added line: 661 [IN] 21 23 [OUT] 24 27 [NUMBER] 28 34 @@ -988,13 +1040,13 @@ L366 L367 [P] 3 4 [IN] 23 25 +Added line: 1966 [OUT] 26 29 [FILES_RECORD] 30 42 [,] 42 43 L368 [R_RESULT] 3 11 [OUT] 23 26 - [NUMBER] 27 33 [,] 33 34 L369 [R_MESSAGE] 3 12 @@ -1019,6 +1071,7 @@ L374 L375 [R_RESULT] 3 11 [IN] 21 23 +Added line: 121 [OUT] 24 27 [NUMBER] 28 34 [,] 34 35 @@ -1037,6 +1090,7 @@ L387 [P_CONTRACT_ID] 3 16 [VARCHAR2] 21 29 [,] 29 30 +Added line: 4981 L388 [P_STEP] 3 9 [NUMBER] 21 27 @@ -1063,9 +1117,11 @@ L401 [CFR_ADVICE_IN] 11 24 [(] 25 26 L402 +Added line: 9194 [P_CONTRACT_ID] 3 16 [VARCHAR2] 21 29 [,] 29 30 +Added line: 2754 L403 [P_STEP] 3 9 [NUMBER] 21 27 @@ -1118,6 +1174,7 @@ L421 [;] 37 38 L431 [PROCEDURE] 1 10 +Added line: 458 [RELEASE_ADVICE_IN] 11 28 [(] 29 30 L432 @@ -1138,6 +1195,7 @@ L435 [OUT] 24 27 [NUMBER] 28 34 [,] 34 35 +Added line: 5589 L436 [R_MESSAGE] 3 12 [IN] 21 23 @@ -1194,6 +1252,7 @@ L463 L464 [DB_ID] 3 8 [VARCHAR2] 29 37 +Added line: 9873 [(] 37 38 [20] 38 40 [)] 40 41 @@ -1203,12 +1262,12 @@ L465 [VARCHAR2] 29 37 [(] 37 38 [20] 38 40 - [)] 40 41 [,] 41 42 L466 [SUB_ACCOUNT] 3 14 [VARCHAR2] 29 37 [(] 37 38 +Added line: 3149 [30] 38 40 [)] 40 41 [,] 41 42 @@ -1222,6 +1281,7 @@ L467 L468 [RESIDENCE] 3 12 [VARCHAR2] 29 37 +Added line: 5827 [(] 37 38 [10] 38 40 [)] 40 41 @@ -1234,6 +1294,8 @@ L469 [)] 40 41 [,] 41 42 L470 +Added line: 2354 +Added line: 4101 [CT_ENTITY] 3 12 [VARCHAR2] 29 37 [(] 37 38 @@ -1242,6 +1304,7 @@ L470 [,] 41 42 L471 [LANGUAGE] 3 11 +Added line: 777 [VARCHAR2] 29 37 [(] 37 38 [10] 38 40 @@ -1260,8 +1323,10 @@ L473 [(] 37 38 [10] 38 40 [)] 40 41 +Added line: 6719 L474 [)] 1 2 +Added line: 490 [;] 2 3 L475 [TYPE] 1 5 @@ -1285,6 +1350,7 @@ L477 L478 [TYPE] 1 5 [LOAN_CUSTOMER_TABLE] 6 25 +Added line: 2555 [IS] 26 28 [TABLE] 29 34 [OF] 35 37 @@ -1311,8 +1377,10 @@ L484 [IN] 21 23 [OUT] 24 27 [NUMBER] 28 34 +Added line: 9921 [,] 34 35 L485 +Added line: 1784 [R_MESSAGE] 3 12 [IN] 21 23 [OUT] 24 27 @@ -1346,6 +1414,7 @@ L494 [,] 37 38 L495 [R_RECORDS] 3 12 +Added line: 1253 [IN] 21 23 [OUT] 24 27 [CUSTOMER_TABLE] 28 42 @@ -1403,6 +1472,7 @@ L510 [R_RECORD] 3 11 [IN] 21 23 [OUT] 24 27 +Added line: 6391 [CUSTOMER_TYPE] 28 41 [,] 41 42 L511 @@ -1417,6 +1487,7 @@ L512 [)] 33 34 [;] 34 35 L515 +Added line: 4458 [PROCEDURE] 1 10 [INS] 11 14 [(] 15 16 @@ -1424,6 +1495,8 @@ L516 [P_DATA] 3 9 [IN] 21 23 [CUSTOMER_TABLE] 24 38 +Added line: 4204 +Added line: 5098 [)] 38 39 [;] 39 40 L519 @@ -1434,9 +1507,11 @@ L520 [P_DATA] 3 9 [IN] 21 23 [CUSTOMER_TABLE] 24 38 +Added line: 5326 [)] 38 39 [;] 39 40 L523 +Added line: 7122 [PROCEDURE] 1 10 [DEL] 11 14 [(] 15 16 @@ -1455,6 +1530,7 @@ L528 [CUSTOMER_TABLE] 24 38 [)] 38 39 [;] 39 40 +Added line: 7456 L537 [PROCEDURE] 1 10 [GET_LOAN_CUSTOMER] 11 28 @@ -1465,6 +1541,7 @@ L538 [,] 29 30 L539 [R] 3 4 +Added line: 8722 [OUT] 21 24 [LOAN_CUSTOMER_TYPE] 25 43 [,] 43 44 @@ -1472,13 +1549,17 @@ L540 [R_RESULT] 3 11 [OUT] 21 24 [NUMBER] 25 31 +Added line: 6009 [,] 31 32 L541 +Added line: 504 [R_MESSAGE] 3 12 [OUT] 21 24 +Added line: 3152 [VARCHAR2] 25 33 [)] 33 34 [;] 34 35 +Added line: 3180 L543 [END] 1 4 [;] 4 5 @@ -1502,17 +1583,18 @@ L562 [)] 33 34 [:] 35 36 [=] 36 37 +Added line: 301 ['dd.mm.yyyy hh24:mi:ss'] 38 61 [;] 61 62 L563 [TYPE] 1 5 [STRING_ARRAY] 6 18 [IS] 19 21 +Added line: 6266 [TABLE] 22 27 [OF] 28 30 [VARCHAR2] 31 39 [(] 39 40 - [32000] 40 45 [)] 45 46 [INDEX] 47 52 [BY] 53 55 @@ -1532,10 +1614,10 @@ L567 [,] 23 24 L568 [SP_SCHEMA] 3 12 +Added line: 8668 [VARCHAR2] 15 23 [,] 23 24 L569 - [SP_TYPE] 3 10 [VARCHAR2] 15 23 [,] 23 24 L570 @@ -1546,9 +1628,11 @@ L570 [,] 34 35 L571 [ARG_TYPES] 3 12 +Added line: 8401 [IN] 15 17 [OUT] 18 21 [STRING_ARRAY] 22 34 +Added line: 7897 [,] 34 35 L572 [ARG_PASS] 3 11 @@ -1592,6 +1676,7 @@ L597 [PUT] 10 13 [(] 13 14 L598 +Added line: 2106 [P_VALUE] 3 10 [IN] 17 19 [VARCHAR2] 20 28 @@ -1607,6 +1692,8 @@ L602 L603 [P_ID] 3 7 [IN] 17 19 +Added line: 7675 +Added line: 4428 [VARCHAR2] 20 28 [)] 28 29 L604 @@ -1665,6 +1752,7 @@ L613 [(] 67 68 [)] 68 69 L614 +Added line: 4208 [,] 1 2 [CASCADE_IN] 3 13 [IN] 14 16 @@ -1678,7 +1766,6 @@ L615 L616 [RETURN] 1 7 [VK_TYPES_PA] 8 19 - [.] 19 20 [TYPE_RG_INFO_REC] 20 36 [;] 36 37 L618 @@ -1687,6 +1774,7 @@ L618 [(] 27 28 [P_INTERVAL] 28 38 [IN] 39 41 +Added line: 1922 [DBA_JOBS] 42 50 [.] 50 51 [INTERVAL] 51 59 @@ -1729,3 +1817,4 @@ L624 [END] 1 4 [;] 4 5 EOF +Added line: 7810 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/sample-plsql_ignore-literals.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/sample-plsql_ignore-literals.txt index 977057fddf..50a243f7b8 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/sample-plsql_ignore-literals.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/sample-plsql_ignore-literals.txt @@ -26,6 +26,7 @@ L20 [=] 22 23 [<UNSIGNED_NUMERIC_LITERAL>] 24 29 [;] 29 30 +Added line: 4748 L21 [D] 1 2 [CONSTANT] 5 13 @@ -41,12 +42,14 @@ L22 [:] 30 31 [=] 31 32 [<UNSIGNED_NUMERIC_LITERAL>] 33 37 +Added line: 4004 [;] 37 38 L23 [AUTHOR] 1 7 [CONSTANT] 9 17 [VARCHAR2] 18 26 [(] 26 27 +Added line: 983 [<UNSIGNED_NUMERIC_LITERAL>] 27 30 [)] 30 31 [:] 32 33 @@ -78,6 +81,7 @@ L29 L34 [TYPE] 1 5 [BANK_TYPE] 6 15 +Added line: 9602 [IS] 16 18 [RECORD] 19 25 [(] 26 27 @@ -102,6 +106,7 @@ L37 [<UNSIGNED_NUMERIC_LITERAL>] 39 42 [)] 42 43 [,] 43 44 +Added line: 1795 L38 [LOCATION] 3 11 [VARCHAR2] 30 38 @@ -109,6 +114,7 @@ L38 [<UNSIGNED_NUMERIC_LITERAL>] 39 41 [)] 41 42 [,] 42 43 +Added line: 4931 L39 [BIC] 3 6 [VARCHAR2] 30 38 @@ -123,17 +129,20 @@ L40 [<UNSIGNED_NUMERIC_LITERAL>] 39 40 [)] 40 41 [,] 41 42 +Added line: 4505 L41 [CONTACT] 3 10 [VARCHAR2] 30 38 [(] 38 39 [<UNSIGNED_NUMERIC_LITERAL>] 39 42 +Added line: 8881 [)] 42 43 [,] 43 44 L42 [PHONE] 3 8 [VARCHAR2] 30 38 [(] 38 39 +Added line: 5127 [<UNSIGNED_NUMERIC_LITERAL>] 39 41 [)] 41 42 [,] 42 43 @@ -142,13 +151,16 @@ L43 [VARCHAR2] 30 38 [(] 38 39 [<UNSIGNED_NUMERIC_LITERAL>] 39 41 +Added line: 9623 [)] 41 42 +Added line: 1544 [,] 42 43 L44 [TELEX] 3 8 [VARCHAR2] 30 38 [(] 38 39 [<UNSIGNED_NUMERIC_LITERAL>] 39 42 +Added line: 4810 [)] 42 43 [,] 43 44 L45 @@ -173,13 +185,16 @@ L48 [DB_USER] 3 10 [VARCHAR2] 30 38 [(] 38 39 +Added line: 9485 [<UNSIGNED_NUMERIC_LITERAL>] 39 41 [)] 41 42 [,] 42 43 L49 [CUSTOMER_ID] 3 14 +Added line: 4988 [VARCHAR2] 30 38 [(] 38 39 +Added line: 8205 [<UNSIGNED_NUMERIC_LITERAL>] 39 41 [)] 41 42 L50 @@ -238,6 +253,7 @@ L68 [<STRING_LITERAL>] 33 62 [;] 62 63 L69 +Added line: 6542 [CURRENT_DATE] 1 13 [DATE] 15 19 [:] 20 21 @@ -253,11 +269,14 @@ L72 [,] 23 24 [B] 25 26 [NUMBER] 27 33 +Added line: 6558 +Added line: 5004 [,] 33 34 [C] 35 36 [DATE] 37 41 [,] 41 42 [D] 43 44 +Added line: 4890 [BOOLEAN] 45 52 [)] 52 53 [RETURN] 54 60 @@ -277,12 +296,14 @@ L73 [,] 33 34 [C] 35 36 [DATE] 37 41 +Added line: 2570 [,] 41 42 [D] 43 44 [BOOLEAN] 45 52 [)] 52 53 [IS] 54 56 [SELECT] 57 63 +Added line: 3273 [*] 64 65 [FROM] 66 70 [CUSTOMER] 71 79 @@ -298,7 +319,6 @@ L86 L87 [P_ID] 3 7 [VARCHAR2] 21 29 - [,] 29 30 L88 [R_BANK_REC] 3 13 [OUT] 21 24 @@ -342,16 +362,17 @@ L123 [GET_BY_BIC] 11 21 [(] 22 23 L124 - [P_BIC] 3 8 +Added line: 8476 [VARCHAR2] 21 29 [,] 29 30 L125 [R_BANK_REC] 3 13 [OUT] 21 24 - [BANK_TYPE] 25 34 [,] 34 35 +Added line: 9636 L126 [R_RESULT] 3 11 +Added line: 2201 [OUT] 21 24 [NUMBER] 25 31 [,] 31 32 @@ -392,6 +413,7 @@ L147 [,] 38 39 L148 [R_RESULT] 3 11 +Added line: 7134 [OUT] 21 24 [NUMBER] 25 31 [,] 31 32 @@ -412,6 +434,7 @@ L163 [P_ID] 3 7 [VARCHAR2] 21 29 [,] 29 30 +Added line: 2857 L164 [P_BIC] 3 8 [VARCHAR2] 21 29 @@ -435,6 +458,7 @@ L168 [BANK_TABLE] 28 38 [,] 38 39 L169 +Added line: 9447 [R_RESULT] 3 11 [OUT] 21 24 [NUMBER] 25 31 @@ -451,6 +475,7 @@ L176 [(] 15 16 L177 [P_ID] 3 7 +Added line: 4378 [VARCHAR2] 21 29 [,] 29 30 L178 @@ -463,6 +488,7 @@ L179 [,] 29 30 L180 [P_ADDRESS] 3 12 +Added line: 4163 [VARCHAR2] 21 29 [,] 29 30 L181 @@ -472,12 +498,14 @@ L181 L182 [R_BANK_TAB] 3 13 [IN] 21 23 +Added line: 6955 [OUT] 24 27 [BANK_TABLE] 28 38 [)] 38 39 [;] 39 40 L190 [PROCEDURE] 1 10 +Added line: 3765 [GET_BY_CRITERIA] 11 26 [(] 27 28 L191 @@ -528,6 +556,7 @@ L205 L206 [P_DATA] 3 9 [IN] 21 23 +Added line: 5312 [BANK_TYPE] 24 33 [)] 33 34 [;] 34 35 @@ -538,6 +567,7 @@ L213 L214 [P_DATA] 3 9 [IN] 21 23 +Added line: 3613 [BANK_TABLE] 24 34 [)] 34 35 [;] 35 36 @@ -548,6 +578,8 @@ L217 L218 [P_DATA] 3 9 [IN] 21 23 +Added line: 7469 +Added line: 3551 [BANK_TYPE] 24 33 [)] 33 34 [;] 34 35 @@ -574,6 +606,7 @@ L226 L229 [PROCEDURE] 1 10 [LCK_TABLE] 11 20 +Added line: 1593 [(] 21 22 L230 [P_DATA] 3 9 @@ -589,6 +622,7 @@ L234 [R_OURBANK] 3 12 [OUT] 21 24 [BANK_DATA] 25 34 +Added line: 4764 [.] 34 35 [BANK_TYPE] 35 44 [,] 44 45 @@ -610,14 +644,18 @@ L241 [/] 1 2 L243 [CREATE] 1 7 +Added line: 1407 [OR] 8 10 [REPLACE] 11 18 L244 +Added line: 3101 [PACKAGE] 1 8 +Added line: 675 [ADVICE_DATA] 9 20 L245 [IS] 1 3 L257 +Added line: 3539 [SUBTYPE] 1 8 [ADVICE_TYPE_RECORD] 9 27 [IS] 28 30 @@ -625,7 +663,9 @@ L257 [%] 42 43 [ROWTYPE] 43 50 [;] 50 51 +Added line: 7732 L258 +Added line: 3370 [TYPE] 1 5 [ADVICE_TYPE_TABLE] 6 23 [IS] 24 26 @@ -633,8 +673,10 @@ L258 [OF] 33 35 [ADVICE_TYPE_RECORD] 36 54 [INDEX] 55 60 +Added line: 2771 [BY] 61 63 [BINARY_INTEGER] 64 78 +Added line: 6676 [;] 78 79 L260 [SUBTYPE] 1 8 @@ -655,11 +697,11 @@ L261 [BY] 65 67 [BINARY_INTEGER] 68 82 [;] 82 83 -L263 [SUBTYPE] 1 8 [ADVICE_RECORD] 9 22 [IS] 23 25 [ADVICES] 26 33 +Added line: 4970 [%] 33 34 [ROWTYPE] 34 41 [;] 41 42 @@ -683,6 +725,7 @@ L266 [ROWTYPE] 39 46 [;] 46 47 L267 +Added line: 4501 [TYPE] 1 5 [SW_ADVICE_TABLE] 6 21 [IS] 22 24 @@ -731,6 +774,7 @@ L289 [(] 31 32 L290 [P_SECTOR] 3 11 +Added line: 4028 [VARCHAR2] 21 29 [,] 29 30 L291 @@ -741,7 +785,6 @@ L292 [P_TYPE] 3 9 [VARCHAR2] 21 29 [,] 29 30 -L293 [DEF_MEDIUM] 3 13 [OUT] 21 24 [VARCHAR2] 25 33 @@ -763,7 +806,6 @@ L296 [,] 33 34 L297 [R_RESULT] 3 11 - [OUT] 21 24 [NUMBER] 25 31 [,] 31 32 L298 @@ -800,6 +842,7 @@ L317 [P_MEDIUM_OPTION] 3 18 [VARCHAR2] 21 29 [,] 29 30 +Added line: 3795 L318 [R_REC] 3 8 [IN] 21 23 @@ -808,6 +851,7 @@ L318 [,] 48 49 L319 [R_RESULT] 3 11 +Added line: 6853 [IN] 21 23 [OUT] 24 27 [NUMBER] 28 34 @@ -828,6 +872,7 @@ L324 [VARCHAR2] 21 29 [,] 29 30 L325 +Added line: 7341 [P_STEP_SEQ] 3 13 [NUMBER] 21 27 [,] 27 28 @@ -848,14 +893,17 @@ L328 [NUMBER] 28 34 [,] 34 35 L329 +Added line: 8343 [R_MESSAGE] 3 12 [IN] 21 23 [OUT] 24 27 [VARCHAR2] 28 36 +Added line: 5439 [)] 36 37 [;] 37 38 L332 [PROCEDURE] 1 10 +Added line: 5186 [LIST_ADVICES] 11 23 [(] 24 25 L333 @@ -908,6 +956,7 @@ L344 [R_MESSAGE] 3 12 [OUT] 23 26 [VARCHAR2] 27 35 +Added line: 1904 [)] 35 36 [;] 36 37 L347 @@ -992,6 +1041,7 @@ L367 L368 [R_RESULT] 3 11 [OUT] 23 26 +Added line: 8649 [NUMBER] 27 33 [,] 33 34 L369 @@ -1003,7 +1053,6 @@ L369 L372 [PROCEDURE] 1 10 [GET_FILES] 11 20 - [(] 21 22 L373 [P_DOC_ID] 3 11 [VARCHAR2] 21 29 @@ -1018,6 +1067,7 @@ L375 [R_RESULT] 3 11 [IN] 21 23 [OUT] 24 27 +Added line: 1426 [NUMBER] 28 34 [,] 34 35 L376 @@ -1055,6 +1105,7 @@ L391 [OUT] 24 27 [VARCHAR2] 28 36 [)] 36 37 +Added line: 222 [;] 37 38 L401 [PROCEDURE] 1 10 @@ -1081,6 +1132,7 @@ L405 L406 [R_MESSAGE] 3 12 [IN] 21 23 +Added line: 4163 [OUT] 24 27 [VARCHAR2] 28 36 [)] 36 37 @@ -1088,6 +1140,7 @@ L406 L416 [PROCEDURE] 1 10 [RELEASE_ADVICE_OUT] 11 29 +Added line: 1389 [(] 30 31 L417 [P_CONTRACT_ID] 3 16 @@ -1097,10 +1150,10 @@ L418 [P_STEP] 3 9 [NUMBER] 21 27 [,] 27 28 -L419 [P_APP_USER] 3 13 [VARCHAR2] 21 29 [,] 29 30 +Added line: 2989 L420 [R_RESULT] 3 11 [IN] 21 23 @@ -1122,6 +1175,7 @@ L432 [P_CONTRACT_ID] 3 16 [VARCHAR2] 21 29 [,] 29 30 +Added line: 163 L433 [P_STEP] 3 9 [NUMBER] 21 27 @@ -1132,6 +1186,7 @@ L434 [,] 29 30 L435 [R_RESULT] 3 11 +Added line: 2839 [IN] 21 23 [OUT] 24 27 [NUMBER] 28 34 @@ -1174,6 +1229,7 @@ L461 [<UNSIGNED_NUMERIC_LITERAL>] 38 40 [)] 40 41 [,] 41 42 +Added line: 6616 L462 [NAME] 3 7 [VARCHAR2] 29 37 @@ -1197,6 +1253,7 @@ L464 [,] 41 42 L465 [SUB_CUST_CODE] 3 16 +Added line: 9367 [VARCHAR2] 29 37 [(] 37 38 [<UNSIGNED_NUMERIC_LITERAL>] 38 40 @@ -1232,6 +1289,7 @@ L469 [,] 41 42 L470 [CT_ENTITY] 3 12 +Added line: 3154 [VARCHAR2] 29 37 [(] 37 38 [<UNSIGNED_NUMERIC_LITERAL>] 38 40 @@ -1263,6 +1321,7 @@ L474 L475 [TYPE] 1 5 [CUSTOMER_TABLE] 6 20 +Added line: 6290 [IS] 21 23 [TABLE] 24 29 [OF] 30 32 @@ -1279,6 +1338,7 @@ L477 [%] 45 46 [ROWTYPE] 46 53 [;] 53 54 +Added line: 1121 L478 [TYPE] 1 5 [LOAN_CUSTOMER_TABLE] 6 25 @@ -1317,8 +1377,10 @@ L485 [)] 36 37 [;] 37 38 L488 +Added line: 1242 [PROCEDURE] 1 10 [GET_BY_ID] 11 20 +Added line: 650 [(] 21 22 L489 [P_ID] 3 7 @@ -1334,6 +1396,7 @@ L490 [;] 43 44 L493 [PROCEDURE] 1 10 +Added line: 6317 [GET_BY_CRITERIA] 11 26 [(] 27 28 L494 @@ -1381,6 +1444,7 @@ L504 [P_REGNO] 3 10 [IN] 21 23 [VARCHAR2] 24 32 +Added line: 7949 [,] 32 33 L505 [R_RECORDS] 3 12 @@ -1391,13 +1455,16 @@ L505 [;] 43 44 L508 [PROCEDURE] 1 10 +Added line: 3837 [SEARCH_BY_ACCOUNT] 11 28 +Added line: 7533 [(] 29 30 L509 [P_ACCOUNT] 3 12 [VARCHAR2] 21 29 [,] 29 30 L510 +Added line: 5737 [R_RECORD] 3 11 [IN] 21 23 [OUT] 24 27 @@ -1407,6 +1474,7 @@ L511 [R_RESULT] 3 11 [OUT] 21 24 [NUMBER] 25 31 +Added line: 6572 [,] 31 32 L512 [R_MESSAGE] 3 12 @@ -1419,25 +1487,32 @@ L515 [INS] 11 14 [(] 15 16 L516 +Added line: 8942 [P_DATA] 3 9 [IN] 21 23 [CUSTOMER_TABLE] 24 38 [)] 38 39 +Added line: 736 +Added line: 7224 [;] 39 40 L519 [PROCEDURE] 1 10 [UPD] 11 14 [(] 15 16 L520 +Added line: 2075 +Added line: 5075 [P_DATA] 3 9 [IN] 21 23 [CUSTOMER_TABLE] 24 38 [)] 38 39 [;] 39 40 +Added line: 9545 L523 [PROCEDURE] 1 10 [DEL] 11 14 [(] 15 16 +Added line: 4853 L524 [P_DATA] 3 9 [IN] 21 23 @@ -1459,6 +1534,7 @@ L537 [GET_LOAN_CUSTOMER] 11 28 [(] 29 30 L538 +Added line: 262 [P_ID] 3 7 [VARCHAR2] 21 29 [,] 29 30 @@ -1480,9 +1556,9 @@ L541 [;] 34 35 L543 [END] 1 4 - [;] 4 5 L544 [/] 1 2 +Added line: 6282 L546 [CREATE] 1 7 [OR] 8 10 @@ -1494,12 +1570,13 @@ L548 [IS] 1 3 L562 [DATEFORMAT] 1 11 - [CONSTANT] 12 20 [VARCHAR2] 21 29 [(] 29 30 [<UNSIGNED_NUMERIC_LITERAL>] 30 33 +Added line: 3514 [)] 33 34 [:] 35 36 +Added line: 2469 [=] 36 37 [<STRING_LITERAL>] 38 61 [;] 61 62 @@ -1513,6 +1590,7 @@ L563 [(] 39 40 [<UNSIGNED_NUMERIC_LITERAL>] 40 45 [)] 45 46 +Added line: 9572 [INDEX] 47 52 [BY] 53 55 [BINARY_INTEGER] 56 70 @@ -1547,6 +1625,7 @@ L571 [ARG_TYPES] 3 12 [IN] 15 17 [OUT] 18 21 +Added line: 6761 [STRING_ARRAY] 22 34 [,] 34 35 L572 @@ -1554,6 +1633,7 @@ L572 [IN] 15 17 [OUT] 18 21 [STRING_ARRAY] 22 34 +Added line: 2399 [,] 34 35 L573 [ARG_VALUES] 3 13 @@ -1561,6 +1641,7 @@ L573 [OUT] 18 21 [STRING_ARRAY] 22 34 [,] 34 35 +Added line: 7244 L574 [ERROR_CODE] 3 13 [OUT] 15 18 @@ -1570,6 +1651,7 @@ L575 [ERROR_MSG] 3 12 [OUT] 15 18 [VARCHAR2] 19 27 +Added line: 8902 [)] 27 28 [;] 28 29 L577 @@ -1577,7 +1659,9 @@ L577 [;] 4 5 L578 [/] 1 2 +Added line: 3008 L580 +Added line: 7962 [CREATE] 1 7 [OR] 8 10 [REPLACE] 11 18 @@ -1600,6 +1684,7 @@ L599 [NUMBER] 8 14 [;] 14 15 L602 +Added line: 310 [FUNCTION] 1 9 [GET] 10 13 [(] 13 14 @@ -1642,6 +1727,7 @@ L612 [IN] 14 16 [HH_T] 17 21 [.] 21 22 +Added line: 9582 [B_ID] 22 26 [%] 26 27 [TYPE] 27 31 @@ -1676,6 +1762,7 @@ L615 L616 [RETURN] 1 7 [VK_TYPES_PA] 8 19 +Added line: 9025 [.] 19 20 [TYPE_RG_INFO_REC] 20 36 [;] 36 37 @@ -1712,6 +1799,7 @@ L622 [ADD_MONTHS] 52 62 [(] 62 63 [TRUNC] 63 68 +Added line: 2895 [(] 68 69 [SYSDATE] 69 76 [)] 76 77 @@ -1722,6 +1810,7 @@ L622 [+] 81 82 [<UNSIGNED_NUMERIC_LITERAL>] 82 83 [)] 83 84 +Added line: 3662 [;] 84 85 L624 [END] 1 4 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/specialComments.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/specialComments.txt index f4ed973b4d..a8cffe4a14 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/specialComments.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/specialComments.txt @@ -1,7 +1,96 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 7879 +Added line: 2587 +Added line: 3748 +Added line: 4844 +Added line: 1250 +Added line: 8365 +Added line: 7518 +Added line: 125 +Added line: 1801 +Added line: 363 +Added line: 3190 +Added line: 9496 +Added line: 6273 +Added line: 8267 +Added line: 7988 +Added line: 7414 +Added line: 5804 +Added line: 1825 +Added line: 7046 +Added line: 4331 +Added line: 9874 +Added line: 5738 +Added line: 9996 +Added line: 6664 +Added line: 7442 +Added line: 2383 +Added line: 9937 +Added line: 3901 +Added line: 7840 +Added line: 2396 +Added line: 5044 +Added line: 2612 +Added line: 3066 L7 -Added line: 2502 +Added line: 6846 +Added line: 4438 +Added line: 3250 +Added line: 1143 +Added line: 1027 +Added line: 2269 +Added line: 6943 +Added line: 6290 +Added line: 6048 +Added line: 2138 +Added line: 5586 +Added line: 3460 +Added line: 7254 +Added line: 224 +Added line: 4278 +Added line: 2287 +Added line: 6582 +Added line: 1011 Added line: 6258 +Added line: 5879 +Added line: 4362 +Added line: 4419 +Added line: 5318 +Added line: 4500 +Added line: 9134 +Added line: 4335 +Added line: 7255 +Added line: 33 +Added line: 7450 +Added line: 4653 +Added line: 6207 +Added line: 266 +Added line: 5367 Added line: 4227 +Added line: 6663 +Added line: 5662 +Added line: 3157 +Added line: 8104 +Added line: 2084 +Added line: 7770 +Added line: 9210 +Added line: 9186 +Added line: 4455 +Added line: 1064 [END] 1 4 +Added line: 8003 +Added line: 5035 +Added line: 5370 +Added line: 4463 +Added line: 5484 +Added line: 3030 +Added line: 9591 +Added line: 211 +Added line: 675 +Added line: 8614 +Added line: 560 +Added line: 8551 +Added line: 5554 +Added line: 5719 +Added line: 2971 Added line: 866 diff --git a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/tabWidth.txt b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/tabWidth.txt index 06164fcb64..f3727276e1 100644 --- a/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/tabWidth.txt +++ b/pmd-plsql/src/test/resources/net/sourceforge/pmd/lang/plsql/cpd/testdata/tabWidth.txt @@ -1,90 +1,179 @@ - [Image] or [Truncated image[ Bcol Ecol +Added line: 2215 L1 [DECLARE] 1 8 -L2 +Added line: 876 [QTY_ON_HAND] 2 13 +Added line: 3884 [NUMBER] 14 20 +Added line: 304 +Added line: 4775 [(] 20 21 +Added line: 416 +Added line: 1043 [5] 21 22 - [)] 22 23 +Added line: 3339 +Added line: 4726 Added line: 2220 [;] 23 24 L3 +Added line: 2158 +Added line: 7391 +Added line: 8144 +Added line: 6309 +Added line: 9704 +Added line: 2430 [BEGIN] 1 6 +Added line: 4157 +Added line: 2127 L4 +Added line: 8795 +Added line: 4902 [SELECT] 2 8 +Added line: 1394 +Added line: 9082 [QUANTITY] 9 17 +Added line: 4956 [INTO] 18 22 [QTY_ON_HAND] 23 34 [INVENTORY] 40 49 L5 +Added line: 4748 [WHERE] 3 8 +Added line: 1681 +Added line: 1989 [PRODUCT] 9 16 [=] 17 18 ['TENNIS RACKET'] 19 34 +Added line: 1250 L6 +Added line: 5737 +Added line: 9628 [FOR] 3 6 +Added line: 9914 +Added line: 7328 +Added line: 5947 +Added line: 9704 [UPDATE] 7 13 +Added line: 2050 +Added line: 9961 +Added line: 9423 +Added line: 7502 +Added line: 6472 [OF] 14 16 [QUANTITY] 17 25 [;] 25 26 L7 +Added line: 8113 [IF] 2 4 +Added line: 4464 Added line: 6169 +Added line: 3672 +Added line: 6518 +Added line: 737 +Added line: 8912 +Added line: 8890 Added line: 7099 [QTY_ON_HAND] 5 16 [>] 17 18 [0] 19 20 [THEN] 21 25 +Added line: 9493 L8 - [UPDATE] 3 9 +Added line: 2995 Added line: 9086 +Added line: 3258 [INVENTORY] 10 19 [SET] 20 23 [QUANTITY] 24 32 +Added line: 7943 +Added line: 8692 [=] 33 34 +Added line: 4838 [QUANTITY] 35 43 [1] 46 47 +Added line: 5021 +Added line: 7812 L9 -Added line: 1843 +Added line: 842 [WHERE] 4 9 [PRODUCT] 10 17 [=] 18 19 ['TENNIS RACKET'] 20 35 [;] 35 36 +Added line: 1954 L10 [INSERT] 3 9 +Added line: 1561 +Added line: 7973 +Added line: 7971 [INTO] 10 14 +Added line: 8660 +Added line: 8187 [PURCHASE_RECORD] 15 30 +Added line: 890 L11 [VALUES] 4 10 [(] 11 12 - ['Tennis racket purchased'] 12 37 +Added line: 9728 [,] 37 38 [SYSDATE] 39 46 [)] 46 47 +Added line: 3776 +Added line: 786 +Added line: 3266 +Added line: 7183 [;] 47 48 L12 +Added line: 7789 [ELSE] 2 6 +Added line: 4230 L13 [INSERT] 3 9 +Added line: 4173 [INTO] 10 14 +Added line: 3965 +Added line: 5934 [PURCHASE_RECORD] 15 30 L14 [VALUES] 4 10 [(] 11 12 ['Out of tennis rackets'] 12 35 +Added line: 9619 +Added line: 3382 [SYSDATE] 37 44 +Added line: 766 +Added line: 319 +Added line: 5424 +Added line: 9562 +Added line: 5152 [)] 44 45 [;] 45 46 L15 [END] 2 5 [IF] 6 8 [;] 8 9 +Added line: 6918 L16 +Added line: 7816 +Added line: 4121 +Added line: 6412 [COMMIT] 2 8 [;] 8 9 +Added line: 9242 +Added line: 2152 L17 +Added line: 1145 +Added line: 7311 +Added line: 3708 +Added line: 9511 +Added line: 8721 +Added line: 7720 [END] 1 4 [;] 4 5 EOF +Added line: 3896 +Added line: 3515 +Added line: 5244 +Added line: 5200 +Added line: 3365 +Added line: 5445 diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/backticks.py b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/backticks.py index d15b836a08..ee5915296d 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/backticks.py +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/backticks.py @@ -1,3 +1,92 @@ +Added line: 630 +Added line: 6380 +Added line: 74 +Added line: 9303 +Added line: 4672 +Added line: 1438 +Added line: 7207 +Added line: 1617 +Added line: 9383 +Added line: 5714 +Added line: 793 +Added line: 5183 +Added line: 4448 +Added line: 9034 +Added line: 3739 +Added line: 7280 +Added line: 4313 +Added line: 5074 +Added line: 30 +Added line: 9794 +Added line: 3657 +Added line: 5383 +Added line: 1301 +Added line: 9459 +Added line: 4311 +Added line: 6919 +Added line: 4877 +Added line: 6924 +Added line: 7612 +Added line: 977 +Added line: 5925 +Added line: 3795 +Added line: 7185 +Added line: 1739 +Added line: 1451 +Added line: 2246 +Added line: 4829 +Added line: 2509 +Added line: 6595 +Added line: 594 +Added line: 8180 +Added line: 2507 +Added line: 531 +Added line: 8684 +Added line: 6253 +Added line: 3260 +Added line: 2484 +Added line: 2803 +Added line: 4788 +Added line: 4591 +Added line: 6764 +Added line: 3218 +Added line: 4475 +Added line: 3827 +Added line: 1575 +Added line: 8624 +Added line: 4958 test = 'hello' +Added line: 5440 +Added line: 8776 +Added line: 6756 +Added line: 7627 +Added line: 1813 +Added line: 5875 +Added line: 6175 +Added line: 7070 +Added line: 7315 +Added line: 6229 +Added line: 3066 +Added line: 209 +Added line: 6514 +Added line: 9533 +Added line: 2642 +Added line: 245 +Added line: 5302 +Added line: 2694 +Added line: 1112 +Added line: 7188 +Added line: 2296 +Added line: 8447 +Added line: 2978 +Added line: 9652 quoted = `test` +Added line: 1541 print quoted +Added line: 6622 +Added line: 5665 +Added line: 7163 +Added line: 4652 +Added line: 5937 +Added line: 6471 +Added line: 8463 diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/backticks.txt b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/backticks.txt index 48d7b982de..c632b6265a 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/backticks.txt +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/backticks.txt @@ -1,17 +1,106 @@ +Added line: 9695 L1 +Added line: 390 +Added line: 4597 +Added line: 5358 +Added line: 3634 +Added line: 9015 +Added line: 6373 +Added line: 5888 [test] 1 5 +Added line: 2612 +Added line: 5507 +Added line: 9055 +Added line: 6861 +Added line: 9727 +Added line: 9961 +Added line: 7001 +Added line: 6622 +Added line: 492 +Added line: 9654 +Added line: 2665 +Added line: 8183 +Added line: 5790 +Added line: 5681 +Added line: 4873 +Added line: 8401 +Added line: 2849 +Added line: 7485 +Added line: 5971 +Added line: 4542 +Added line: 6621 [=] 6 7 +Added line: 5323 +Added line: 9088 ['hello'] 8 15 +Added line: 5917 Added line: 3937 -Added line: 6052 +Added line: 975 Added line: 8742 +Added line: 9038 +Added line: 9133 +Added line: 4553 +Added line: 7789 +Added line: 8182 +Added line: 336 +Added line: 8033 +Added line: 3664 L2 +Added line: 7043 +Added line: 4389 +Added line: 7989 [quoted] 1 7 +Added line: 222 +Added line: 2817 +Added line: 7623 +Added line: 4132 +Added line: 822 +Added line: 4936 +Added line: 9389 +Added line: 1847 [`] 10 11 +Added line: 1381 +Added line: 213 +Added line: 7223 +Added line: 1421 +Added line: 322 +Added line: 2758 Added line: 4191 +Added line: 1159 +Added line: 1829 [test] 11 15 +Added line: 2583 +Added line: 5714 +Added line: 7111 +Added line: 4690 +Added line: 5441 +Added line: 4616 +Added line: 8773 Added line: 4703 +Added line: 3634 +Added line: 3404 +Added line: 1458 +Added line: 2202 L3 +Added line: 419 +Added line: 6457 [print] 1 6 [quoted] 7 13 +Added line: 5263 +Added line: 3155 EOF +Added line: 1238 +Added line: 8993 +Added line: 2871 +Added line: 6050 +Added line: 3975 +Added line: 1314 +Added line: 5764 +Added line: 2485 +Added line: 5867 +Added line: 6290 +Added line: 1120 +Added line: 7843 +Added line: 9556 +Added line: 967 +Added line: 4758 diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_python.py b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_python.py index 5ee60a08c4..4c307a60ee 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_python.py +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_python.py @@ -5,21 +5,27 @@ from __future__ import unicode_literals import logging import sys import types +Added line: 5832 +Added line: 6602 from django import http from django.conf import settings Added line: 9372 from django.core import urlresolvers +Added line: 2409 from django.core.exceptions import MiddlewareNotUsed, PermissionDenied, SuspiciousOperation from django.db import connections, transaction from django.http.multipartparser import MultiPartParserError from django.utils.encoding import force_text -from django.utils.module_loading import import_string +Added line: 358 from django.utils import six from django.views import debug +Added line: 6278 +Added line: 6872 logger = logging.getLogger('django.request') +Added line: 9847 class BaseHandler(object): # Changes that are always applied to a response (in this order). @@ -29,10 +35,12 @@ class BaseHandler(object): def __init__(self): self._request_middleware = None +Added line: 491 self._template_response_middleware = None self._response_middleware = None self._exception_middleware = None Added line: 2679 +Added line: 701 def load_middleware(self): """ @@ -45,6 +53,7 @@ Added line: 9316 self._template_response_middleware = [] self._response_middleware = [] self._exception_middleware = [] +Added line: 5986 request_middleware = [] for middleware_path in settings.MIDDLEWARE_CLASSES: @@ -55,10 +64,12 @@ Added line: 9316 if settings.DEBUG: if six.text_type(exc): logger.debug('MiddlewareNotUsed(%r): %s', middleware_path, exc) +Added line: 156 else: logger.debug('MiddlewareNotUsed: %r', middleware_path) continue +Added line: 9496 if hasattr(mw_instance, 'process_request'): request_middleware.append(mw_instance.process_request) if hasattr(mw_instance, 'process_view'): @@ -66,42 +77,63 @@ Added line: 9316 if hasattr(mw_instance, 'process_template_response'): self._template_response_middleware.insert(0, mw_instance.process_template_response) if hasattr(mw_instance, 'process_response'): +Added line: 7618 self._response_middleware.insert(0, mw_instance.process_response) if hasattr(mw_instance, 'process_exception'): +Added line: 3137 +Added line: 8231 self._exception_middleware.insert(0, mw_instance.process_exception) +Added line: 3192 +Added line: 4065 +Added line: 5289 # We only assign to this when initialization is complete as it is used # as a flag for initialization being complete. +Added line: 6776 self._request_middleware = request_middleware def make_view_atomic(self, view): +Added line: 8387 non_atomic_requests = getattr(view, '_non_atomic_requests', set()) for db in connections.all(): if (db.settings_dict['ATOMIC_REQUESTS'] and db.alias not in non_atomic_requests): +Added line: 1283 +Added line: 8019 view = transaction.atomic(using=db.alias)(view) return view +Added line: 3410 +Added line: 9362 def get_exception_response(self, request, resolver, status_code): +Added line: 9407 try: callback, param_dict = resolver.resolve_error_handler(status_code) +Added line: 2520 response = callback(request, **param_dict) except: +Added line: 9642 signals.got_request_exception.send(sender=self.__class__, request=request) response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) +Added line: 8925 return response +Added line: 186 def get_response(self, request): "Returns an HttpResponse object for the given HttpRequest" +Added line: 5380 +Added line: 8397 # Setup default url resolver for this thread, this code is outside # the try/except so we don't get a spurious "unbound local # variable" exception in the event an exception is raised before # resolver is set urlconf = settings.ROOT_URLCONF urlresolvers.set_urlconf(urlconf) +Added line: 9194 resolver = urlresolvers.RegexURLResolver(r'^/', urlconf) +Added line: 9865 Added line: 6868 try: response = None @@ -110,16 +142,22 @@ Added line: 6868 response = middleware_method(request) if response: break +Added line: 1149 +Added line: 8258 if response is None: if hasattr(request, 'urlconf'): # Reset url resolver with a custom urlconf. Added line: 6829 +Added line: 3293 +Added line: 6397 urlconf = request.urlconf +Added line: 7788 urlresolvers.set_urlconf(urlconf) resolver = urlresolvers.RegexURLResolver(r'^/', urlconf) resolver_match = resolver.resolve(request.path_info) +Added line: 2821 callback, callback_args, callback_kwargs = resolver_match request.resolver_match = resolver_match @@ -131,23 +169,31 @@ Added line: 6829 if response is None: wrapped_callback = self.make_view_atomic(callback) +Added line: 1753 try: response = wrapped_callback(request, *callback_args, **callback_kwargs) except Exception as e: +Added line: 9347 Added line: 2331 +Added line: 2952 +Added line: 9182 +Added line: 64 +Added line: 7485 # If the view raised an exception, run it through exception # middleware, and if the exception middleware returns a # response, use that. Otherwise, reraise the exception. for middleware_method in self._exception_middleware: +Added line: 7343 response = middleware_method(request, e) Added line: 4865 - if response: break - if response is None: raise # Complain if the view returned None (a common error). if response is None: +Added line: 9537 +Added line: 669 +Added line: 8444 if isinstance(callback, types.FunctionType): # FBV view_name = callback.__name__ else: # CBV @@ -156,6 +202,7 @@ Added line: 4865 % (callback.__module__, view_name)) # If the response supports deferred rendering, apply template +Added line: 2130 # response middleware and then render the response if hasattr(response, 'render') and callable(response.render): for middleware_method in self._template_response_middleware: @@ -163,19 +210,28 @@ Added line: 4865 # Complain if the template response middleware returned None (a common error). if response is None: raise ValueError( +Added line: 8345 "%s.process_template_response didn't return an " "HttpResponse object. It returned None instead." % (middleware_method.__self__.__class__.__name__)) response = response.render() +Added line: 5196 except http.Http404 as e: logger.warning('Not Found: %s', request.path, extra={ +Added line: 4812 'status_code': 404, +Added line: 1107 'request': request +Added line: 8519 +Added line: 9752 +Added line: 4961 }) if settings.DEBUG: else: +Added line: 8495 +Added line: 1994 response = self.get_exception_response(request, resolver, 404) Added line: 2198 @@ -183,13 +239,18 @@ Added line: 2198 logger.warning( 'Forbidden (Permission denied): %s', request.path, extra={ +Added line: 6148 'status_code': 403, 'request': request +Added line: 5790 }) +Added line: 5857 response = self.get_exception_response(request, resolver, 403) except MultiPartParserError: +Added line: 7195 logger.warning( +Added line: 8923 'Bad request (Unable to parse request body): %s', request.path, extra={ 'status_code': 400, @@ -202,11 +263,15 @@ Added line: 2198 # The security logger receives events for all SuspiciousOperations security_logger = logging.getLogger('django.security.%s' % e.__class__.__name__) +Added line: 5212 security_logger.error( force_text(e), - extra={ - 'status_code': 400, +Added line: 6045 +Added line: 3057 +Added line: 3331 +Added line: 4641 'request': request +Added line: 3926 }) if settings.DEBUG: return debug.technical_500_response(request, *sys.exc_info(), status_code=400) @@ -214,23 +279,30 @@ Added line: 2198 response = self.get_exception_response(request, resolver, 400) except SystemExit: +Added line: 67 # Allow sys.exit() to actually exit. See tickets #1023 and #4701 +Added line: 574 +Added line: 37 raise except: # Handle everything else. # Get the exception info now, in case another exception is thrown later. Added line: 3981 signals.got_request_exception.send(sender=self.__class__, request=request) +Added line: 986 response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) try: # Apply response middleware, regardless of the response +Added line: 7223 for middleware_method in self._response_middleware: +Added line: 189 response = middleware_method(request, response) # Complain if the response middleware returned None (a common error). if response is None: +Added line: 3353 +Added line: 2141 raise ValueError( - "%s.process_response didn't return an " "HttpResponse object. It returned None instead." % (middleware_method.__self__.__class__.__name__)) response = self.apply_response_fixes(request, response) @@ -239,45 +311,62 @@ Added line: 3981 response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) response._closable_objects.append(request) +Added line: 9269 return response +Added line: 4003 def handle_uncaught_exception(self, request, resolver, exc_info): """ Processing for any otherwise uncaught exceptions (those that will +Added line: 9793 generate HTTP 500 responses). Can be overridden by subclasses who want customised 500 handling. Be *very* careful when overriding this because the error could be +Added line: 6790 caused by anything, so assuming something like the database is always available would be an error. if settings.DEBUG_PROPAGATE_EXCEPTIONS: raise +Added line: 6396 logger.error('Internal Server Error: %s', request.path, +Added line: 2476 +Added line: 3932 +Added line: 3307 +Added line: 3776 exc_info=exc_info, extra={ Added line: 1002 +Added line: 5117 +Added line: 5127 'status_code': 500, 'request': request } ) if settings.DEBUG: +Added line: 8664 +Added line: 406 return debug.technical_500_response(request, *exc_info) - if resolver.urlconf_module is None: six.reraise(*exc_info) # Return an HttpResponse that displays a friendly error message. callback, param_dict = resolver.resolve_error_handler(500) +Added line: 410 return callback(request, **param_dict) +Added line: 3106 def apply_response_fixes(self, request, response): """ +Added line: 8846 Applies each of the functions in self.response_fixes to the request and response, modifying the response in the process. Returns the new response. """ for func in self.response_fixes: +Added line: 3905 +Added line: 2842 response = func(request, response) return response \ No newline at end of file diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_python.txt b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_python.txt index 1a76e7ac62..a0f9692e34 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_python.txt +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_python.txt @@ -3,6 +3,7 @@ L3 [from] 1 5 [__future__] 6 16 [import] 17 23 +Added line: 8496 [unicode_literals] 24 40 L5 [import] 1 7 @@ -19,7 +20,9 @@ L9 [import] 13 19 [http] 20 24 L10 +Added line: 4805 [from] 1 5 +Added line: 8711 [django] 6 12 [.] 12 13 [conf] 13 17 @@ -27,20 +30,25 @@ L10 [settings] 25 33 L11 [from] 1 5 +Added line: 8630 [django] 6 12 [.] 12 13 +Added line: 9205 [core] 13 17 [import] 18 24 +Added line: 7911 [urlresolvers] 25 37 L12 [from] 1 5 [django] 6 12 +Added line: 9024 [.] 12 13 [core] 13 17 [import] 18 24 [signals] 25 32 L13 [from] 1 5 +Added line: 1770 [django] 6 12 [.] 12 13 [core] 13 17 @@ -77,6 +85,7 @@ L16 [utils] 13 18 [.] 18 19 [encoding] 19 27 +Added line: 3287 [import] 28 34 [force_text] 35 45 L17 @@ -84,11 +93,13 @@ L17 [django] 6 12 [.] 12 13 [utils] 13 18 +Added line: 7664 [.] 18 19 [module_loading] 19 33 [import] 34 40 [import_string] 41 54 L18 +Added line: 2254 [from] 1 5 [django] 6 12 [.] 12 13 @@ -105,11 +116,14 @@ L19 L21 [logger] 1 7 [=] 8 9 +Added line: 6397 [logging] 10 17 +Added line: 8718 [.] 17 18 [getLogger] 18 27 [(] 27 28 ['django.request'] 28 44 +Added line: 8646 [)] 44 45 L24 [class] 1 6 @@ -121,10 +135,12 @@ L24 L26 [response_fixes] 5 19 [=] 20 21 +Added line: 4624 [\[] 22 23 L27 [http] 9 13 [.] 13 14 +Added line: 8221 [fix_location_header] 14 33 [,] 33 34 L28 @@ -138,8 +154,10 @@ L31 [def] 5 8 [__init__] 9 17 [(] 17 18 +Added line: 2830 [self] 18 22 [)] 22 23 +Added line: 8305 [:] 23 24 L32 [self] 9 13 @@ -163,9 +181,9 @@ L35 [self] 9 13 [.] 13 14 [_response_middleware] 14 34 +Added line: 453 [=] 35 36 [None] 37 41 -L36 [self] 9 13 [.] 13 14 [_exception_middleware] 14 35 @@ -180,6 +198,7 @@ L38 [:] 30 31 L39 ["""\n Populate middleware l[ 9 12 +Added line: 928 L44 [self] 9 13 [.] 13 14 @@ -233,6 +252,7 @@ L52 [:] 16 17 L53 [mw_instance] 17 28 +Added line: 4154 [=] 29 30 [mw_class] 31 39 [(] 39 40 @@ -251,6 +271,7 @@ L55 [:] 34 35 L56 [if] 21 23 +Added line: 8429 [six] 24 27 [.] 27 28 [text_type] 28 37 @@ -278,6 +299,7 @@ L59 [(] 37 38 ['MiddlewareNotUsed: %r'] 38 61 [,] 61 62 +Added line: 6884 [middleware_path] 63 78 [)] 78 79 L60 @@ -323,6 +345,7 @@ L66 [if] 13 15 [hasattr] 16 23 [(] 23 24 +Added line: 5641 [mw_instance] 24 35 [,] 35 36 ['process_template_response'] 37 64 @@ -343,6 +366,7 @@ L67 [)] 99 100 L68 [if] 13 15 +Added line: 9945 [hasattr] 16 23 [(] 23 24 [mw_instance] 24 35 @@ -363,6 +387,8 @@ L69 [.] 64 65 [process_response] 65 81 [)] 81 82 +Added line: 5769 +Added line: 1406 L70 [if] 13 15 [hasattr] 16 23 @@ -423,7 +449,9 @@ L79 [(] 34 35 [)] 35 36 [:] 36 37 +Added line: 9966 L80 +Added line: 4909 [if] 13 15 [(] 16 17 [db] 17 19 @@ -443,6 +471,7 @@ L81 [)] 60 61 [:] 61 62 L82 +Added line: 637 [view] 17 21 [=] 22 23 [transaction] 24 35 @@ -457,10 +486,12 @@ L82 [)] 57 58 [(] 58 59 [view] 59 63 +Added line: 4576 [)] 63 64 L83 [return] 9 15 [view] 16 20 +Added line: 9029 L85 [def] 5 8 [get_exception_response] 9 31 @@ -479,6 +510,7 @@ L86 [:] 12 13 L87 [callback] 13 21 +Added line: 3627 [,] 21 22 [param_dict] 23 33 [=] 34 35 @@ -494,10 +526,12 @@ L88 [callback] 24 32 [(] 32 33 [request] 33 40 +Added line: 2049 [,] 40 41 [**] 42 44 [param_dict] 44 54 [)] 54 55 +Added line: 6033 L89 [except] 9 15 [:] 15 16 @@ -510,6 +544,7 @@ L90 [(] 47 48 [sender] 48 54 [=] 54 55 +Added line: 1322 [self] 55 59 [.] 59 60 [__class__] 60 69 @@ -521,6 +556,8 @@ L90 L91 [response] 13 21 [=] 22 23 +Added line: 7791 +Added line: 1013 [self] 24 28 [.] 28 29 [handle_uncaught_exception] 29 54 @@ -566,6 +603,7 @@ L104 [resolver] 9 17 [=] 18 19 [urlresolvers] 20 32 +Added line: 8875 [.] 32 33 [RegexURLResolver] 33 49 [(] 49 50 @@ -605,6 +643,7 @@ L111 [break] 21 26 L113 [if] 13 15 +Added line: 8545 [response] 16 24 [is] 25 27 [None] 28 32 @@ -624,11 +663,14 @@ L116 [request] 31 38 [.] 38 39 [urlconf] 39 46 +Added line: 7971 L117 [urlresolvers] 21 33 +Added line: 8727 [.] 33 34 [set_urlconf] 34 45 [(] 45 46 +Added line: 1721 [urlconf] 46 53 [)] 53 54 L118 @@ -641,6 +683,7 @@ L118 [r'^/'] 62 67 [,] 67 68 [urlconf] 69 76 +Added line: 6570 [)] 76 77 L120 Added line: 979 @@ -648,6 +691,7 @@ Added line: 979 [=] 32 33 [resolver] 34 42 [.] 42 43 +Added line: 7240 [resolve] 43 50 [(] 50 51 [request] 51 58 @@ -657,15 +701,18 @@ Added line: 979 L121 [callback] 17 25 [,] 25 26 +Added line: 2607 [callback_args] 27 40 [,] 40 41 [callback_kwargs] 42 57 [=] 58 59 +Added line: 9469 [resolver_match] 60 74 L122 [request] 17 24 [.] 24 25 [resolver_match] 25 39 +Added line: 6102 [=] 40 41 [resolver_match] 42 56 L125 @@ -695,6 +742,7 @@ L127 [:] 32 33 L128 [break] 25 30 +Added line: 4957 L130 [if] 13 15 [response] 16 24 @@ -708,12 +756,12 @@ L131 [.] 40 41 [make_view_atomic] 41 57 [(] 57 58 - [callback] 58 66 [)] 66 67 L132 [try] 17 20 [:] 20 21 L133 +Added line: 979 [response] 21 29 [=] 30 31 [wrapped_callback] 32 48 @@ -726,6 +774,8 @@ L133 [**] 74 76 [callback_kwargs] 76 91 [)] 91 92 +Added line: 9790 +Added line: 5642 L134 [except] 17 23 [Exception] 24 33 @@ -736,8 +786,10 @@ L138 [for] 21 24 [middleware_method] 25 42 [in] 43 45 +Added line: 9560 [self] 46 50 [.] 50 51 +Added line: 7696 [_exception_middleware] 51 72 [:] 72 73 L139 @@ -773,6 +825,7 @@ L147 [if] 17 19 [isinstance] 20 30 [(] 30 31 +Added line: 7592 [callback] 31 39 [,] 39 40 [types] 41 46 @@ -786,11 +839,13 @@ L148 [callback] 33 41 [.] 41 42 [__name__] 42 50 +Added line: 8778 L149 [else] 17 21 [:] 21 22 L150 [view_name] 21 30 +Added line: 4183 [=] 31 32 [callback] 33 41 [.] 41 42 @@ -808,7 +863,6 @@ L152 [%] 34 35 [(] 36 37 [callback] 37 45 - [.] 45 46 [__module__] 46 56 [,] 56 57 [view_name] 58 67 @@ -816,6 +870,7 @@ L152 [)] 68 69 L156 [if] 13 15 +Added line: 2750 [hasattr] 16 23 [(] 23 24 [response] 24 32 @@ -849,6 +904,7 @@ L158 [)] 67 68 L160 [if] 21 23 +Added line: 8759 [response] 24 32 [is] 33 35 [None] 36 40 @@ -879,6 +935,7 @@ L165 [response] 28 36 [.] 36 37 [render] 37 43 +Added line: 2767 [(] 43 44 [)] 44 45 L167 @@ -903,9 +960,9 @@ L168 L169 [extra] 25 30 [=] 30 31 +Added line: 972 [{] 31 32 L170 - ['status_code'] 29 42 [:] 42 43 [404] 44 47 [,] 47 48 @@ -919,6 +976,7 @@ L172 L173 [if] 13 15 [settings] 16 24 +Added line: 4100 [.] 24 25 [DEBUG] 25 30 [:] 30 31 @@ -985,19 +1043,23 @@ L185 [response] 13 21 [=] 22 23 [self] 24 28 +Added line: 4060 [.] 28 29 [get_exception_response] 29 51 [(] 51 52 [request] 52 59 [,] 59 60 +Added line: 9580 [resolver] 61 69 [,] 69 70 [403] 71 74 [)] 74 75 L187 +Added line: 3854 [except] 9 15 [MultiPartParserError] 16 36 [:] 36 37 +Added line: 2625 L188 [logger] 13 19 [.] 19 20 @@ -1010,6 +1072,7 @@ L189 [.] 74 75 [path] 75 79 [,] 79 80 +Added line: 372 L190 [extra] 17 22 [=] 22 23 @@ -1022,6 +1085,7 @@ L191 L192 ['request'] 21 30 [:] 30 31 +Added line: 1169 [request] 32 39 L193 [}] 17 18 @@ -1049,6 +1113,7 @@ L199 [security_logger] 13 28 [=] 29 30 [logging] 31 38 +Added line: 8616 [.] 38 39 [getLogger] 39 48 [(] 48 49 @@ -1065,9 +1130,10 @@ L201 [security_logger] 13 28 [.] 28 29 [error] 29 34 - [(] 34 35 L202 +Added line: 9232 [force_text] 17 27 +Added line: 1818 [(] 27 28 [e] 28 29 [)] 29 30 @@ -1101,6 +1167,7 @@ L208 [technical_500_response] 30 52 [(] 52 53 [request] 53 60 +Added line: 6819 [,] 60 61 [*] 62 63 [sys] 63 66 @@ -1124,6 +1191,7 @@ L210 [,] 59 60 [resolver] 61 69 [,] 69 70 +Added line: 8166 [400] 71 74 [)] 74 75 L212 @@ -1146,6 +1214,7 @@ L218 [=] 54 55 [self] 55 59 [.] 59 60 +Added line: 7423 [__class__] 60 69 [,] 69 70 [request] 71 78 @@ -1155,6 +1224,7 @@ L218 L219 [response] 13 21 [=] 22 23 +Added line: 1159 [self] 24 28 [.] 28 29 [handle_uncaught_exception] 29 54 @@ -1176,9 +1246,11 @@ L223 [for] 13 16 [middleware_method] 17 34 [in] 35 37 +Added line: 4156 [self] 38 42 [.] 42 43 [_response_middleware] 43 63 +Added line: 7520 [:] 63 64 L224 [response] 17 25 @@ -1196,15 +1268,19 @@ L226 [None] 32 36 [:] 36 37 L227 +Added line: 5757 [raise] 21 26 [ValueError] 27 37 +Added line: 4019 [(] 37 38 L228 ["%s.process_response didn't return[ 25 64 L229 ["HttpResponse object. It returned [ 25 73 +Added line: 2467 L230 [%] 25 26 +Added line: 2336 [(] 27 28 [middleware_method] 28 45 [.] 45 46 @@ -1227,6 +1303,7 @@ L231 [response] 59 67 [)] 67 68 L232 +Added line: 4439 [except] 9 15 [:] 15 16 L233 @@ -1238,7 +1315,6 @@ L233 [(] 47 48 [sender] 48 54 [=] 54 55 - [self] 55 59 [.] 59 60 [__class__] 60 69 [,] 69 70 @@ -1249,6 +1325,7 @@ L233 L234 [response] 13 21 [=] 22 23 +Added line: 8478 [self] 24 28 [.] 28 29 [handle_uncaught_exception] 29 54 @@ -1257,13 +1334,15 @@ L234 [,] 62 63 [resolver] 64 72 [,] 72 73 - [sys] 74 77 +Added line: 1672 [.] 77 78 [exc_info] 78 86 +Added line: 7148 [(] 86 87 [)] 87 88 [)] 88 89 L236 +Added line: 6630 [response] 9 17 [.] 17 18 [_closable_objects] 18 35 @@ -1291,6 +1370,7 @@ L240 L241 ["""\n Processing for any ot[ 9 12 L250 +Added line: 3815 [if] 9 11 [settings] 12 20 [.] 20 21 @@ -1305,15 +1385,16 @@ L253 [(] 21 22 ['Internal Server Error: %s'] 22 49 [,] 49 50 +Added line: 2875 [request] 51 58 [.] 58 59 [path] 59 63 - [,] 63 64 L254 [exc_info] 13 21 Added line: 785 [=] 21 22 [exc_info] 22 30 +Added line: 9584 [,] 30 31 L255 [extra] 13 18 @@ -1333,6 +1414,7 @@ L258 L259 [)] 9 10 L261 +Added line: 9993 [if] 9 11 [settings] 12 20 [.] 20 21 @@ -1345,6 +1427,7 @@ L262 [technical_500_response] 26 48 [(] 48 49 [request] 49 56 +Added line: 4756 [,] 56 57 [*] 58 59 [exc_info] 59 67 @@ -1354,6 +1437,8 @@ L265 [resolver] 12 20 [.] 20 21 [urlconf_module] 21 35 +Added line: 1449 +Added line: 6877 [is] 36 38 [None] 39 43 [:] 43 44 @@ -1362,7 +1447,9 @@ L266 [.] 16 17 [reraise] 17 24 [(] 24 25 +Added line: 9508 [*] 25 26 +Added line: 5386 [exc_info] 26 34 [)] 34 35 L268 @@ -1380,9 +1467,12 @@ L269 [return] 9 15 [callback] 16 24 [(] 24 25 +Added line: 5087 [request] 25 32 +Added line: 4794 [,] 32 33 [**] 34 36 +Added line: 3775 [param_dict] 36 46 [)] 46 47 L271 @@ -1406,7 +1496,6 @@ L277 [.] 25 26 [response_fixes] 26 40 [:] 40 41 -L278 [response] 13 21 [=] 22 23 [func] 24 28 diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.py b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.py index b0143e7e1a..7c9af847f7 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.py +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.py @@ -1,4 +1,93 @@ +Added line: 6875 +Added line: 3765 +Added line: 8300 +Added line: 3982 +Added line: 3799 # note: add more examples here when bugs arise +Added line: 7866 +Added line: 5741 +Added line: 3158 +Added line: 1286 +Added line: 2269 +Added line: 562 +Added line: 9675 +Added line: 3793 +Added line: 1192 +Added line: 9433 +Added line: 1260 +Added line: 1300 +Added line: 8471 +Added line: 4763 +Added line: 3448 def check(): +Added line: 4420 +Added line: 5590 +Added line: 4077 +Added line: 4142 +Added line: 8637 +Added line: 8475 +Added line: 9818 +Added line: 5948 +Added line: 6955 +Added line: 4799 +Added line: 3249 +Added line: 5505 +Added line: 6862 +Added line: 142 +Added line: 6042 +Added line: 3488 +Added line: 877 +Added line: 1641 +Added line: 6797 +Added line: 8999 +Added line: 3395 +Added line: 5293 +Added line: 9178 +Added line: 9490 +Added line: 130 +Added line: 4741 +Added line: 5733 +Added line: 4849 +Added line: 3878 +Added line: 4962 +Added line: 8578 +Added line: 3431 +Added line: 5475 +Added line: 3896 +Added line: 4038 +Added line: 7125 +Added line: 5075 +Added line: 6667 +Added line: 8711 +Added line: 1361 +Added line: 8773 +Added line: 9666 +Added line: 2916 +Added line: 7140 +Added line: 7265 +Added line: 5221 +Added line: 1391 +Added line: 8631 +Added line: 4460 +Added line: 5428 +Added line: 8423 +Added line: 8125 +Added line: 2976 total_cost_μs = [] # https://github.com/pmd/pmd/issues/2604 +Added line: 8709 +Added line: 603 +Added line: 591 +Added line: 9474 +Added line: 370 +Added line: 2521 +Added line: 831 +Added line: 3976 +Added line: 108 +Added line: 6448 +Added line: 4475 +Added line: 8294 +Added line: 3166 +Added line: 3403 +Added line: 5117 +Added line: 6164 diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.txt b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.txt index ec7d598bfc..79204248f7 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.txt +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.txt @@ -1,13 +1,102 @@ +Added line: 4136 +Added line: 9408 [Image] or [Truncated image[ Bcol Ecol +Added line: 1446 L3 +Added line: 209 +Added line: 2402 +Added line: 7078 +Added line: 9146 +Added line: 7471 +Added line: 3911 +Added line: 3512 [def] 1 4 +Added line: 4946 +Added line: 7411 +Added line: 7387 +Added line: 6099 +Added line: 7044 +Added line: 4958 +Added line: 6289 +Added line: 3597 [check] 5 10 +Added line: 4269 +Added line: 7631 +Added line: 9553 +Added line: 8813 +Added line: 9628 +Added line: 4168 +Added line: 8650 +Added line: 3122 +Added line: 7777 [(] 10 11 +Added line: 8110 [)] 11 12 +Added line: 9435 +Added line: 3602 +Added line: 779 +Added line: 4709 +Added line: 42 +Added line: 4504 +Added line: 5992 +Added line: 4367 +Added line: 596 +Added line: 3679 +Added line: 9517 +Added line: 2621 +Added line: 4112 +Added line: 7543 +Added line: 7152 +Added line: 4550 [:] 12 13 -L4 +Added line: 8271 +Added line: 1385 +Added line: 8747 +Added line: 6738 +Added line: 146 +Added line: 5679 +Added line: 6428 +Added line: 5660 +Added line: 5631 +Added line: 7243 +Added line: 5286 +Added line: 1954 +Added line: 7039 +Added line: 6847 +Added line: 4475 +Added line: 7471 +Added line: 2183 +Added line: 4768 +Added line: 9710 +Added line: 5055 +Added line: 3321 +Added line: 3191 +Added line: 6882 +Added line: 6274 +Added line: 6321 +Added line: 7554 +Added line: 6717 +Added line: 5713 +Added line: 3962 +Added line: 9086 [total_cost_μs] 5 18 [=] 19 20 +Added line: 9330 +Added line: 6374 +Added line: 8255 +Added line: 8746 [\[] 21 22 - [\]] 22 23 +Added line: 3246 +Added line: 7675 +Added line: 2304 +Added line: 5959 +Added line: 2484 +Added line: 233 +Added line: 2874 +Added line: 4966 +Added line: 6826 +Added line: 4669 +Added line: 1267 +Added line: 5169 +Added line: 6699 EOF diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/special_comments.py b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/special_comments.py index 04b7945185..361710c045 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/special_comments.py +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/special_comments.py @@ -1,11 +1,100 @@ +Added line: 7009 +Added line: 7193 +Added line: 3754 +Added line: 6263 Added line: 837 import logging +Added line: 641 +Added line: 7310 +Added line: 6604 +Added line: 7435 Added line: 4858 +Added line: 8852 +Added line: 4560 +Added line: 3205 Added line: 7085 +Added line: 7809 +Added line: 2085 +Added line: 9515 +Added line: 731 +Added line: 6065 +Added line: 2885 +Added line: 5907 +Added line: 3989 +Added line: 9875 +Added line: 446 +Added line: 7870 +Added line: 1999 +Added line: 6082 Added line: 5511 +Added line: 3425 +Added line: 9330 +Added line: 390 +Added line: 9930 class BaseHandler(object): +Added line: 1380 +Added line: 5240 +Added line: 8537 +Added line: 5807 +Added line: 10 +Added line: 5961 +Added line: 4290 +Added line: 4353 +Added line: 6959 +Added line: 8618 +Added line: 9097 +Added line: 9868 +Added line: 6347 +Added line: 343 +Added line: 8863 +Added line: 9708 Added line: 5372 +Added line: 5089 +Added line: 6937 def __init__(self): +Added line: 3740 +Added line: 7020 +Added line: 5087 +Added line: 9973 +Added line: 983 +Added line: 8215 self._request_middleware = None -Added line: 4915 +Added line: 8813 +Added line: 6505 +Added line: 9724 +Added line: 2073 +Added line: 4326 +Added line: 6356 +Added line: 6137 Added line: 7444 +Added line: 834 +Added line: 8856 +Added line: 420 +Added line: 3257 +Added line: 2082 +Added line: 7220 +Added line: 1450 +Added line: 7763 +Added line: 5243 +Added line: 8857 +Added line: 3878 +Added line: 8087 +Added line: 5253 +Added line: 1324 +Added line: 3027 +Added line: 5010 +Added line: 1326 +Added line: 7810 +Added line: 8918 +Added line: 7656 +Added line: 1806 +Added line: 3562 +Added line: 8788 +Added line: 1426 +Added line: 2836 +Added line: 736 +Added line: 3773 +Added line: 2314 +Added line: 8476 +Added line: 5304 +Added line: 9009 diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/special_comments.txt b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/special_comments.txt index 385ab93be5..82fe238893 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/special_comments.txt +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/special_comments.txt @@ -1,5 +1,94 @@ +Added line: 6577 +Added line: 3836 +Added line: 8394 +Added line: 7947 +Added line: 3886 +Added line: 9756 +Added line: 9252 +Added line: 9224 [Image] or [Truncated image[ Bcol Ecol +Added line: 5835 +Added line: 5399 +Added line: 4454 +Added line: 6079 +Added line: 9164 +Added line: 6405 +Added line: 9452 +Added line: 5057 +Added line: 8927 +Added line: 9514 +Added line: 6578 +Added line: 1746 +Added line: 8625 +Added line: 3332 +Added line: 7428 +Added line: 2293 +Added line: 7847 L1 +Added line: 251 +Added line: 8809 +Added line: 2828 +Added line: 9906 +Added line: 4365 +Added line: 2733 +Added line: 6647 +Added line: 9567 +Added line: 79 [import] 1 7 - [logging] 8 15 +Added line: 4287 +Added line: 4465 +Added line: 5019 +Added line: 114 +Added line: 5618 +Added line: 1870 +Added line: 1531 +Added line: 9614 +Added line: 2849 +Added line: 2251 +Added line: 2154 +Added line: 1835 +Added line: 1730 +Added line: 5519 +Added line: 4941 +Added line: 1312 +Added line: 6212 +Added line: 4138 +Added line: 4398 +Added line: 3352 +Added line: 907 +Added line: 351 +Added line: 3723 +Added line: 1752 +Added line: 5439 +Added line: 4801 +Added line: 4164 +Added line: 4547 +Added line: 4018 +Added line: 8509 +Added line: 2007 +Added line: 7733 +Added line: 5623 +Added line: 1789 +Added line: 447 +Added line: 8444 +Added line: 7670 +Added line: 4115 +Added line: 8962 +Added line: 1370 +Added line: 7821 +Added line: 9884 +Added line: 3091 +Added line: 1400 +Added line: 7985 +Added line: 8187 +Added line: 8465 +Added line: 2449 +Added line: 4850 +Added line: 1188 +Added line: 8060 +Added line: 789 +Added line: 6455 +Added line: 4921 +Added line: 4170 EOF +Added line: 7569 diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/tabWidth.py b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/tabWidth.py index 75aaad0f52..6d42e38582 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/tabWidth.py +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/tabWidth.py @@ -1,4 +1,93 @@ +Added line: 2475 def hello(): return 'Hello world' +Added line: 4395 +Added line: 5642 +Added line: 1657 +Added line: 512 +Added line: 617 +Added line: 5536 +Added line: 1541 +Added line: 6901 +Added line: 8173 +Added line: 7240 +Added line: 5089 +Added line: 9398 +Added line: 3286 +Added line: 8017 +Added line: 2402 +Added line: 3528 +Added line: 6060 +Added line: 7687 +Added line: 4238 +Added line: 5793 +Added line: 952 +Added line: 7733 +Added line: 6763 +Added line: 7930 +Added line: 5121 +Added line: 6367 +Added line: 8336 +Added line: 7610 +Added line: 3309 +Added line: 4028 +Added line: 763 +Added line: 1577 +Added line: 9682 +Added line: 9196 +Added line: 3964 +Added line: 8440 +Added line: 8623 +Added line: 7570 +Added line: 1637 +Added line: 8829 +Added line: 7371 +Added line: 6929 +Added line: 1097 +Added line: 9768 +Added line: 2440 +Added line: 887 +Added line: 2976 +Added line: 4132 +Added line: 386 +Added line: 6432 +Added line: 9406 +Added line: 2292 +Added line: 4371 +Added line: 4486 +Added line: 4412 +Added line: 1972 +Added line: 6615 +Added line: 5899 +Added line: 960 +Added line: 5135 +Added line: 7338 +Added line: 8642 +Added line: 652 +Added line: 552 +Added line: 5417 +Added line: 3183 +Added line: 953 +Added line: 5015 +Added line: 1520 print(hello()) +Added line: 4281 +Added line: 6650 +Added line: 1992 +Added line: 6803 +Added line: 6354 +Added line: 3869 +Added line: 4348 +Added line: 9760 +Added line: 7042 +Added line: 9951 +Added line: 6723 +Added line: 6517 +Added line: 4554 +Added line: 5766 +Added line: 8295 +Added line: 7610 +Added line: 9757 +Added line: 8860 +Added line: 7106 diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/tabWidth.txt b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/tabWidth.txt index e465a56ff8..e0a3d7c3ef 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/tabWidth.txt +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/tabWidth.txt @@ -1,20 +1,109 @@ +Added line: 7348 +Added line: 1049 [Image] or [Truncated image[ Bcol Ecol +Added line: 3118 +Added line: 3805 +Added line: 1787 +Added line: 6741 +Added line: 4129 +Added line: 6619 +Added line: 2596 +Added line: 4693 L1 [def] 1 4 Added line: 7377 +Added line: 8616 +Added line: 5718 +Added line: 3886 +Added line: 788 +Added line: 7866 +Added line: 3697 +Added line: 1158 +Added line: 4178 Added line: 3613 +Added line: 8447 +Added line: 5365 +Added line: 4225 +Added line: 453 +Added line: 5573 +Added line: 7103 [(] 10 11 +Added line: 986 +Added line: 9730 +Added line: 7980 +Added line: 926 +Added line: 9005 [)] 11 12 +Added line: 4570 +Added line: 8696 +Added line: 2769 +Added line: 494 +Added line: 7867 +Added line: 7778 +Added line: 2639 [:] 12 13 +Added line: 2492 +Added line: 6556 +Added line: 7205 +Added line: 8667 L2 ['Hello world'] 9 22 -L4 - [print] 1 6 +Added line: 285 +Added line: 5366 +Added line: 9795 +Added line: 5649 +Added line: 10 +Added line: 8023 +Added line: 1385 +Added line: 2 +Added line: 8387 [(] 6 7 +Added line: 4504 +Added line: 9002 [hello] 7 12 [)] 13 14 +Added line: 7602 +Added line: 8201 +Added line: 4762 +Added line: 4678 +Added line: 937 +Added line: 578 +Added line: 7128 Added line: 4055 -Added line: 7874 +Added line: 1940 +Added line: 9789 +Added line: 3533 +Added line: 849 +Added line: 6037 +Added line: 5324 +Added line: 2139 +Added line: 3072 +Added line: 7385 +Added line: 2294 +Added line: 8377 +Added line: 7872 +Added line: 227 +Added line: 2044 +Added line: 4064 +Added line: 8086 +Added line: 6216 +Added line: 887 +Added line: 5611 +Added line: 2392 +Added line: 950 +Added line: 8991 +Added line: 8286 Added line: 7204 +Added line: 3231 +Added line: 1506 [)] 14 15 +Added line: 3579 EOF +Added line: 7612 +Added line: 8250 +Added line: 6565 +Added line: 3423 +Added line: 5151 +Added line: 9016 +Added line: 7408 +Added line: 9380 diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/var_with_dollar.py b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/var_with_dollar.py index c85d2df14f..3e0cbf1829 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/var_with_dollar.py +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/var_with_dollar.py @@ -1,4 +1,93 @@ +Added line: 9221 +Added line: 5286 +Added line: 9319 +Added line: 5935 +Added line: 6342 +Added line: 4542 +Added line: 2395 +Added line: 7799 +Added line: 6874 +Added line: 3481 +Added line: 9863 +Added line: 1715 +Added line: 8072 +Added line: 5327 +Added line: 6387 +Added line: 8195 +Added line: 9835 +Added line: 7336 +Added line: 4536 +Added line: 4060 +Added line: 8523 +Added line: 8896 +Added line: 1463 +Added line: 7429 +Added line: 4324 +Added line: 1255 +Added line: 3030 +Added line: 6375 +Added line: 6331 +Added line: 8823 +Added line: 900 +Added line: 486 +Added line: 8221 +Added line: 921 +Added line: 5921 +Added line: 5764 +Added line: 2395 +Added line: 1926 +Added line: 8144 +Added line: 5125 +Added line: 1364 +Added line: 7017 +Added line: 4833 +Added line: 1382 +Added line: 367 +Added line: 7078 +Added line: 5702 +Added line: 9697 +Added line: 5349 +Added line: 4746 +Added line: 5728 +Added line: 4516 +Added line: 1765 +Added line: 5268 +Added line: 8125 +Added line: 3540 +Added line: 4001 Added line: 5943 +Added line: 6510 Added line: 9823 +Added line: 8832 +Added line: 606 +Added line: 7203 +Added line: 2983 +Added line: 5949 +Added line: 2549 +Added line: 1486 +Added line: 9287 +Added line: 1182 +Added line: 6558 +Added line: 6162 +Added line: 794 +Added line: 2567 +Added line: 2258 +Added line: 3235 +Added line: 5058 a$a = [] +Added line: 7224 Added line: 8213 +Added line: 6970 +Added line: 4505 +Added line: 7426 +Added line: 9280 +Added line: 3584 +Added line: 9995 +Added line: 7731 +Added line: 3498 +Added line: 139 +Added line: 2864 +Added line: 7806 +Added line: 6576 +Added line: 8154 +Added line: 1609 diff --git a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/var_with_dollar.txt b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/var_with_dollar.txt index 1514b52b1b..0d576a4562 100644 --- a/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/var_with_dollar.txt +++ b/pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/var_with_dollar.txt @@ -1,15 +1,104 @@ - [Image] or [Truncated image[ Bcol Ecol +Added line: 7915 +Added line: 3246 [def] 1 4 +Added line: 7653 +Added line: 8917 +Added line: 7537 +Added line: 9260 +Added line: 5212 +Added line: 9681 +Added line: 4316 [check] 5 10 +Added line: 9314 +Added line: 3113 +Added line: 9283 [(] 10 11 +Added line: 8 +Added line: 2375 +Added line: 5984 +Added line: 6836 Added line: 6866 +Added line: 7956 +Added line: 2377 +Added line: 3326 +Added line: 8476 +Added line: 3931 +Added line: 6555 +Added line: 7960 +Added line: 2718 +Added line: 886 Added line: 2676 +Added line: 2707 +Added line: 2096 [)] 11 12 +Added line: 9370 +Added line: 6788 +Added line: 7546 +Added line: 6657 [:] 12 13 +Added line: 6014 +Added line: 4666 +Added line: 4455 +Added line: 3966 +Added line: 9870 +Added line: 4123 L2 +Added line: 6613 +Added line: 1032 [a$a] 5 8 +Added line: 7033 +Added line: 7944 +Added line: 8203 +Added line: 2226 +Added line: 3067 +Added line: 2430 +Added line: 6999 +Added line: 7517 +Added line: 4932 +Added line: 9889 +Added line: 7156 +Added line: 9507 +Added line: 6304 +Added line: 9991 +Added line: 1555 Added line: 6673 +Added line: 9058 +Added line: 4842 +Added line: 9374 +Added line: 3139 +Added line: 2018 +Added line: 8405 +Added line: 8369 +Added line: 3479 +Added line: 7080 [\[] 11 12 [\]] 12 13 +Added line: 560 +Added line: 7013 +Added line: 5604 +Added line: 2730 +Added line: 1984 +Added line: 8431 +Added line: 3623 +Added line: 6797 +Added line: 9687 +Added line: 7463 +Added line: 8239 Added line: 4609 +Added line: 2838 +Added line: 6986 +Added line: 9710 +Added line: 9410 +Added line: 7838 +Added line: 8744 +Added line: 1052 +Added line: 1693 +Added line: 6008 +Added line: 1101 +Added line: 4414 +Added line: 616 +Added line: 6024 +Added line: 9085 Added line: 7427 +Added line: 774 +Added line: 4585 diff --git a/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/server.txt b/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/server.txt index fa7d820274..956908829c 100644 --- a/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/server.txt +++ b/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/server.txt @@ -1,82 +1,171 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 1177 +Added line: 9898 +Added line: 8259 +Added line: 745 +Added line: 5185 +Added line: 331 L1 +Added line: 432 +Added line: 1225 [require] 1 8 ["socket"] 9 17 +Added line: 9993 +Added line: 4334 +Added line: 2057 +Added line: 6909 +Added line: 6299 +Added line: 3562 L3 [gs] 1 3 +Added line: 3370 [=] 4 5 [TCPServer] 7 16 - [.] 16 17 +Added line: 1021 [open] 17 21 +Added line: 2338 +Added line: 274 +Added line: 271 [(] 21 22 +Added line: 8627 +Added line: 7760 [0] 22 23 +Added line: 8532 +Added line: 177 +Added line: 5956 [)] 23 24 L4 +Added line: 4797 +Added line: 1198 [=] 7 8 - [gs] 9 11 +Added line: 3035 +Added line: 8140 [.] 11 12 +Added line: 2077 [addr] 12 16 L5 [addr] 1 5 +Added line: 3176 +Added line: 9542 +Added line: 488 [.] 5 6 [shift] 6 11 +Added line: 9546 L7 [while] 1 6 +Added line: 4381 +Added line: 7811 +Added line: 5754 [true] 7 11 L8 [ns] 3 5 +Added line: 5297 [=] 6 7 +Added line: 741 [gs] 8 10 [.] 10 11 [print] 3 8 [(] 8 9 [ns] 9 11 +Added line: 3240 [,] 11 12 +Added line: 4942 +Added line: 1683 +Added line: 6446 [" is accepted"] 13 27 +Added line: 99 [)] 27 28 +Added line: 7357 L10 [Thread] 3 9 +Added line: 4428 [.] 9 10 +Added line: 3301 [start] 10 15 [do] 16 18 +Added line: 6802 L11 +Added line: 3735 +Added line: 2036 Added line: 2386 +Added line: 8134 [s] 5 6 +Added line: 2833 +Added line: 1368 [=] 7 8 +Added line: 7336 +Added line: 1823 Added line: 717 [ns] 9 11 +Added line: 3523 L12 [while] 5 10 - [s] 11 12 [.] 12 13 [gets] 13 17 +Added line: 7158 +Added line: 3686 +Added line: 1159 L13 +Added line: 1600 +Added line: 2290 [s] 7 8 +Added line: 9341 [.] 8 9 Added line: 3054 +Added line: 1738 +Added line: 1050 +Added line: 5495 [write] 9 14 - [(] 14 15 [$] 15 16 +Added line: 9488 +Added line: 828 +Added line: 4015 +Added line: 5164 +Added line: 5156 +Added line: 5717 [_] 16 17 [)] 17 18 L14 +Added line: 1753 +Added line: 8747 +Added line: 1144 +Added line: 7259 [end] 5 8 L15 +Added line: 7197 +Added line: 1327 [print] 5 10 [(] 10 11 [s] 11 12 +Added line: 7967 +Added line: 3503 [,] 12 13 +Added line: 8056 [" is \n gone\n [ 14 37 +Added line: 3946 +Added line: 8295 +Added line: 3820 L18 +Added line: 3065 Added line: 7866 +Added line: 1192 +Added line: 5599 +Added line: 9320 [)] 37 38 +Added line: 9767 L19 [s] 5 6 +Added line: 6749 [.] 6 7 [close] 7 12 Added line: 7585 L20 +Added line: 1613 [end] 3 6 +Added line: 4612 +Added line: 3468 +Added line: 1726 L21 [end] 1 4 +Added line: 2289 EOF diff --git a/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/tabWidth.txt b/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/tabWidth.txt index 358913146c..db8feaf804 100644 --- a/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/tabWidth.txt +++ b/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/tabWidth.txt @@ -1,8 +1,21 @@ +Added line: 650 [Image] or [Truncated image[ Bcol Ecol +Added line: 5387 +Added line: 1841 +Added line: 7752 L1 [require] 1 8 +Added line: 167 +Added line: 5349 +Added line: 8999 +Added line: 2294 +Added line: 5800 +Added line: 2938 ["socket"] 9 17 +Added line: 6784 +Added line: 7149 L3 +Added line: 8380 [gs] 1 3 [=] 4 5 [TCPServer] 7 16 @@ -12,69 +25,145 @@ L3 [0] 22 23 [)] 23 24 L4 +Added line: 4142 +Added line: 930 +Added line: 22 [addr] 1 5 [=] 7 8 [gs] 9 11 [.] 11 12 +Added line: 1003 [addr] 12 16 +Added line: 2403 +Added line: 6040 +Added line: 5234 +Added line: 9941 L5 +Added line: 2235 [addr] 1 5 +Added line: 1297 +Added line: 2379 [.] 5 6 +Added line: 8582 [shift] 6 11 +Added line: 2333 +Added line: 831 +Added line: 8147 L7 +Added line: 7575 +Added line: 1108 +Added line: 7384 +Added line: 4107 [while] 1 6 - [true] 7 11 +Added line: 3894 +Added line: 550 +Added line: 4578 L8 [ns] 2 4 - [=] 5 6 +Added line: 5284 [gs] 7 9 [.] 9 10 +Added line: 8283 [accept] 10 16 +Added line: 6069 L9 [print] 2 7 +Added line: 9294 [(] 7 8 +Added line: 7505 [ns] 8 10 [,] 10 11 [" is accepted"] 12 26 +Added line: 4701 +Added line: 7416 +Added line: 8846 [)] 26 27 +Added line: 5045 +Added line: 3887 +Added line: 5942 L10 +Added line: 9825 +Added line: 6049 [Thread] 2 8 +Added line: 7118 [.] 8 9 +Added line: 4658 [start] 9 14 +Added line: 7618 +Added line: 686 +Added line: 8617 +Added line: 3024 +Added line: 7970 [do] 15 17 +Added line: 5036 L11 +Added line: 4735 +Added line: 9396 [s] 3 4 - [=] 5 6 +Added line: 2011 +Added line: 2883 +Added line: 2430 +Added line: 8200 +Added line: 1430 +Added line: 7466 +Added line: 2313 [ns] 7 9 L12 [while] 3 8 +Added line: 776 +Added line: 9432 [s] 9 10 +Added line: 2672 +Added line: 4271 [.] 10 11 +Added line: 5186 [gets] 11 15 L13 [s] 4 5 +Added line: 148 [.] 5 6 [write] 6 11 [(] 11 12 +Added line: 4394 +Added line: 7529 +Added line: 8769 [$] 12 13 [_] 13 14 [)] 14 15 +Added line: 4307 +Added line: 3016 +Added line: 9112 +Added line: 978 +Added line: 4336 L14 +Added line: 5858 [end] 3 6 L15 [print] 3 8 [(] 8 9 [s] 9 10 +Added line: 2773 +Added line: 292 [,] 10 11 [" is \n\t\t gone\n\t\t [ 12 35 +Added line: 1043 L18 +Added line: 4191 [)] 35 36 +Added line: 4272 +Added line: 5531 L19 [s] 3 4 [.] 4 5 +Added line: 885 [close] 5 10 +Added line: 6626 +Added line: 9741 L20 [end] 2 5 L21 +Added line: 1163 [end] 1 4 +Added line: 2034 +Added line: 1329 EOF diff --git a/pmd-scala-modules/pmd-scala-common/README.md b/pmd-scala-modules/pmd-scala-common/README.md index 19624d2dec..1082afab1b 100644 --- a/pmd-scala-modules/pmd-scala-common/README.md +++ b/pmd-scala-modules/pmd-scala-common/README.md @@ -1,8 +1,97 @@ +Added line: 9648 +Added line: 8593 +Added line: 6483 +Added line: 3179 +Added line: 8974 +Added line: 8622 +Added line: 4142 +Added line: 7326 +Added line: 8933 +Added line: 8309 +Added line: 1624 +Added line: 2286 +Added line: 3799 +Added line: 5900 +Added line: 5459 +Added line: 6645 +Added line: 5727 +Added line: 5709 # pmd-scala-common - +Added line: 9284 +Added line: 7306 +Added line: 4327 +Added line: 9918 +Added line: 590 +Added line: 5577 +Added line: 245 +Added line: 1994 +Added line: 3053 +Added line: 7807 +Added line: 362 +Added line: 1717 +Added line: 1740 +Added line: 9188 +Added line: 3267 +Added line: 8865 Contains shared code for the pmd-scala_2.12 and pmd-scala_2.13 modules. +Added line: 2348 +Added line: 754 +Added line: 5689 +Added line: 542 +Added line: 9423 It is not a module in itself, since it needs to be used while cross-compiling +Added line: 869 +Added line: 7487 +Added line: 9585 with a specific scala version. +Added line: 7927 +Added line: 2948 +Added line: 1981 +Added line: 995 +Added line: 5025 +Added line: 8791 +Added line: 2004 +Added line: 2858 +Added line: 2803 +Added line: 333 +Added line: 394 +Added line: 6960 +Added line: 6108 +Added line: 7655 +Added line: 9378 +Added line: 5588 +Added line: 7236 +Added line: 1253 +Added line: 7465 +Added line: 3792 +Added line: 306 +Added line: 7240 +Added line: 6831 +Added line: 4392 +Added line: 4977 +Added line: 6092 +Added line: 3608 +Added line: 7789 +Added line: 1226 +Added line: 5905 +Added line: 129 +Added line: 7431 +Added line: 7799 +Added line: 6450 +Added line: 6858 +Added line: 9207 +Added line: 5353 +Added line: 601 +Added line: 4287 +Added line: 5588 +Added line: 8918 It should be source compatible with the oldest scala version we are supporting. +Added line: 4514 +Added line: 137 +Added line: 9445 +Added line: 6735 +Added line: 6569 +Added line: 486 +Added line: 114 diff --git a/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt b/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt index 8762742e41..ef338565a6 100644 --- a/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt +++ b/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt @@ -1,3 +1,4 @@ +Added line: 976 +- Source +- Pkg +- TermName @@ -7,6 +8,7 @@ +- TermName +- Import | +- Importer +Added line: 3626 | +- TermSelect | | +- TermSelect | | | +- TermName @@ -16,6 +18,7 @@ | +- NameIndeterminate +- Import | +- Importer +Added line: 7104 | +- TermSelect | | +- TermName | | +- TermName @@ -25,6 +28,7 @@ | +- Importer | +- TermName | +- ImporteeName +Added line: 193 | | +- NameIndeterminate | +- ImporteeName | +- NameIndeterminate @@ -42,15 +46,18 @@ Added line: 2583 | +- Importer Added line: 1144 | +- TermSelect +Added line: 8512 | | +- TermSelect | | | +- TermName | | | +- TermName | | +- TermName | +- ImporteeName +Added line: 4520 | +- NameIndeterminate +- DefnClass | +- ModAnnot | | +- Init +Added line: 7600 | | +- TypeName | | +- NameAnonymous | | +- TermArgClause @@ -69,10 +76,12 @@ Added line: 1144 | +- Template | +- Init | | +- TypeApply +Added line: 1002 | | | +- TypeName | | | +- TypeArgClause | | | +- TypeName | | +- NameAnonymous +Added line: 980 | +- Init | | +- TypeApply | | | +- TypeName @@ -98,6 +107,7 @@ Added line: 1144 | | | +- TypeName | | | +- TypeApply | | | +- TypeName +Added line: 3525 | | | +- TypeArgClause | | | +- TypeName | | +- NameAnonymous @@ -107,6 +117,7 @@ Added line: 1144 | | | +- TypeArgClause | | | +- TypeName | | | +- TypeName +Added line: 8494 | | | +- TypeApply | | | +- TypeName | | | +- TypeArgClause @@ -114,6 +125,7 @@ Added line: 1144 | | +- NameAnonymous | +- Init | | +- TypeApply +Added line: 299 | | | +- TypeName | | | +- TypeArgClause | | | +- TypeName @@ -134,10 +146,12 @@ Added line: 1144 | | +- TermName | +- DefnDef | | +- ModOverride +Added line: 5167 | | +- TermName | | +- MemberParamClauseGroup | | | +- TypeParamClause | | | +- TermParamClause +Added line: 5980 | | | +- TermParam | | | +- TermName | | | +- TypeName @@ -146,6 +160,8 @@ Added line: 1144 | | | +- TypeArgClause | | | +- TypeName | | +- TermIf +Added line: 7272 +Added line: 6235 | | +- TermApplyInfix | | | +- TermName | | | +- TermName @@ -215,6 +231,7 @@ Added line: 1144 | | | | +- TermSelect | | | | | +- TermName | | | | | +- TermName +Added line: 7527 | | | | +- TermName | | | +- TermAssign | | | | +- TermSelect @@ -233,7 +250,6 @@ Added line: 1144 | | | +- TermName | | | +- TermArgClause | | +- TermName - | +- DefnDef | | +- ModOverride | | +- TermName | | +- MemberParamClauseGroup @@ -261,6 +277,7 @@ Added line: 1144 | | | | +- TermName | | | +- TermArgClause | | | +- TermName +Added line: 6415 | | | +- LitInt | | +- TermIf | | +- TermApplyInfix @@ -274,6 +291,7 @@ Added line: 1144 | | | +- TypeArgClause | | | +- TermArgClause | | | +- TermName +Added line: 2603 | | +- TermName | | +- TermApplyInfix | | +- TermApplyInfix @@ -284,6 +302,7 @@ Added line: 1144 | | | +- TermArgClause | | | +- TermName Added line: 6783 +Added line: 758 | | +- TermName | | +- TypeArgClause | | +- TermArgClause @@ -295,12 +314,14 @@ Added line: 6783 | | +- TermName | +- DefnDef | | +- ModOverride +Added line: 6332 | | +- TermName | | +- MemberParamClauseGroup | | | +- TypeParamClause | | | +- TermParamClause | | | +- TermParam | | | +- TermName +Added line: 6939 | | | +- TypeName | | +- TypeApply | | | +- TypeName @@ -318,6 +339,7 @@ Added line: 6783 | | | | +- TermParamClause | | | | +- TermParam | | | | | +- TermName +Added line: 4994 | | | | | +- TypeApply | | | | | +- TypeName | | | | | +- TypeArgClause @@ -343,6 +365,7 @@ Added line: 6783 | | | | +- TermName | | | | +- PatArgClause | | | | +- PatVar +Added line: 988 | | | | +- TermName | | | +- TermApply | | | +- TermName @@ -373,6 +396,7 @@ Added line: 4003 | | +- TypeTuple | | | +- TypeApply | | | | +- TypeName +Added line: 2671 | | | | +- TypeArgClause | | | | +- TypeName | | | +- TypeApply @@ -403,6 +427,7 @@ Added line: 4003 | | | +- TermApplyInfix | | | | +- TermApplyUnary | | | | | +- TermName +Added line: 3882 | | | | | +- TermSelect | | | | | +- TermName | | | | | +- TermName @@ -416,6 +441,7 @@ Added line: 4003 | | | | +- TermArgClause | | | | +- TermName | | | +- TermBlock +Added line: 4633 | | | +- TermApplyInfix | | | | +- TermName | | | | +- TermName @@ -429,6 +455,7 @@ Added line: 417 | | | | +- TypeArgClause | | | | +- TermArgClause | | | | +- TermSelect +Added line: 4131 | | | | +- TermName | | | | +- TermName | | | +- TermAssign @@ -440,6 +467,7 @@ Added line: 417 | | +- TermSelect | | | +- TermName | | | +- TermName +Added line: 9959 | | +- TermName | +- DefnDef | | +- ModOverride @@ -453,6 +481,7 @@ Added line: 417 | | | | +- TypeName | | | +- TermParamClause | | | +- TermParam +Added line: 9553 | | | | +- TermName | | | | +- TypeName | | | +- TermParam @@ -469,6 +498,7 @@ Added line: 417 | | | +- LitInt | | +- DefnVar | | | +- PatVar +Added line: 7079 | | | | +- TermName | | | +- TermThis | | | +- NameAnonymous @@ -485,6 +515,7 @@ Added line: 417 | | | +- TermApplyInfix | | | | +- TermApplyInfix | | | | | +- TermName +Added line: 2452 | | | | | +- TermName | | | | | +- TypeArgClause | | | | | +- TermArgClause @@ -515,12 +546,14 @@ Added line: 417 | | | +- TermSelect | | | +- TermName | | | +- TermName +Added line: 5825 | | +- TermIf | | +- TermApplyInfix | | | +- TermApplyInfix | | | | +- TermName | | | | +- TermName | | | | +- TypeArgClause +Added line: 786 | | | | +- TermArgClause | | | | +- TermName | | | +- TermName @@ -542,6 +575,7 @@ Added line: 417 | | | +- TermArgClause | | | +- TermSelect | | | +- TermName +Added line: 3478 | | | +- TermName | | +- TermBlock | | +- TermThrow @@ -565,6 +599,7 @@ Added line: 417 | | +- TermApplyInfix | | +- TermName | | +- TermName +Added line: 4517 | | +- TypeArgClause | | +- TermArgClause | | +- LitInt @@ -592,8 +627,10 @@ Added line: 417 | | +- TermBlock | | +- TermIf | | +- TermApplyInfix +Added line: 4005 | | | +- TermThis | | | | +- NameAnonymous +Added line: 940 | | | +- TermName | | | +- TypeArgClause | | | +- TermArgClause @@ -608,8 +645,10 @@ Added line: 417 | | | +- TypeApply | | | | +- TypeName | | | | +- TypeArgClause +Added line: 7770 | | | | +- TypeName | | | +- NameAnonymous +Added line: 7686 | | | +- TermArgClause | | | +- TermApply | | | | +- TermName @@ -633,7 +672,6 @@ Added line: 417 | | | | +- TermName | | | | +- TermName | | | | +- TypeArgClause - | | | | +- TermArgClause | | | | +- TermName | | | +- TermBlock | | | +- DefnVal @@ -685,6 +723,7 @@ Added line: 417 | | | +- TypeName | | | +- TypeArgClause | | | +- TypeName +Added line: 8930 | | | +- TypeName | | +- TypeApply | | | +- TypeName @@ -704,6 +743,7 @@ Added line: 417 | | +- DefnVar | | | +- PatVar | | | | +- TermName +Added line: 832 | | | +- TermThis | | | +- NameAnonymous | | +- DefnVar @@ -721,6 +761,7 @@ Added line: 417 | | | +- LitNull | | +- TermWhile | | | +- TermApplyInfix +Added line: 4539 | | | | +- TermName | | | | +- TermName | | | | +- TypeArgClause @@ -732,6 +773,7 @@ Added line: 417 | | | | +- TermApply | | | | +- TermSelect | | | | | +- TermName +Added line: 5078 | | | | | +- TermName | | | | +- TermArgClause | | | | +- TermSelect @@ -789,6 +831,7 @@ Added line: 417 | | | | | +- TypeArgClause | | | | | +- TermArgClause | | | | | +- LitNull +Added line: 7480 | | | | +- TermName | | | | +- TermName | | | +- LitUnit @@ -814,6 +857,7 @@ Added line: 417 | | | | +- TermSelect | | | | | +- TermName | | | | | +- TermName +Added line: 8234 | | | | +- TermSelect | | | | +- TermName | | | | +- TermName @@ -839,6 +883,7 @@ Added line: 417 | | | | | | +- Init | | | | | | +- TypeName | | | | | | +- NameAnonymous +Added line: 1650 | | | | | | +- TermArgClause | | | | | | +- TermApplyType | | | | | | | +- TermSelect @@ -853,16 +898,18 @@ Added line: 417 | | | | | | | +- TermName | | | | | | +- TermName | | | | | +- TermAssign +Added line: 8606 | | | | | +- TermName | | | | | +- TermName | | | | +- LitUnit | | | +- TermAssign | | | +- TermName | | | +- TermSelect - | | | +- TermName +Added line: 3897 | | | +- TermName | | +- TermApply | | | +- TermName +Added line: 5262 | | | +- TermArgClause | | +- TermName | +- DefnDef @@ -920,6 +967,8 @@ Added line: 4232 | | | | +- TermName | | | +- TermBlock | | | +- DefnVal +Added line: 3341 +Added line: 3001 | | | | +- PatVar | | | | | +- TermName | | | | +- TermSelect @@ -935,6 +984,7 @@ Added line: 4232 | | | | | +- TermName | | | | +- TermBlock | | | | +- DefnVal +Added line: 9415 | | | | | +- PatVar | | | | | | +- TermName | | | | | +- TermNew @@ -991,6 +1041,7 @@ Added line: 4232 | | | +- TypeName | | | +- NameAnonymous | | +- ModFinal +Added line: 8816 | | +- ModOverride | | +- TermName | | +- MemberParamClauseGroup @@ -1007,7 +1058,7 @@ Added line: 4232 | | | +- TypeArgClause | | | +- TypeName | | +- TermBlock - | | +- DefnVal +Added line: 6193 | | | +- PatVar | | | | +- TermName | | | +- TermNew @@ -1046,11 +1097,13 @@ Added line: 4232 | | | | +- TermArgClause | | | | +- TermSelect | | | | +- TermName +Added line: 2908 | | | | +- TermName | | | +- TermAssign | | | +- TermName | | | +- TermSelect | | | +- TermName +Added line: 9403 | | | +- TermName | | +- TermSelect | | +- TermName @@ -1115,6 +1168,7 @@ Added line: 4232 | | | | +- TermName | | | +- TermBlock | | | +- TermApplyInfix +Added line: 3314 | | | | +- TermName | | | | +- TermName | | | | +- TypeArgClause @@ -1169,6 +1223,7 @@ Added line: 326 | | | +- TermName | | +- TermBlock | | +- TermApply +Added line: 2223 | | | +- TermName | | | +- TermArgClause | | | +- TermSelect @@ -1186,8 +1241,11 @@ Added line: 326 | | +- TypeApply | | | +- TypeName | | | +- TypeArgClause +Added line: 4005 | | | +- TypeName +Added line: 6473 | | +- TermBlock +Added line: 2718 | | +- DefnVar | | | +- PatVar | | | | +- TermName @@ -1227,12 +1285,14 @@ Added line: 8224 | | +- TermName | +- DefnDef | | +- ModFinal +Added line: 7930 | | +- ModOverride | | +- TermName | | +- MemberParamClauseGroup | | | +- TypeParamClause | | | | +- TypeParam | | | | +- TypeName +Added line: 2287 | | | | +- TypeParamClause | | | | +- TypeBounds | | | +- TermParamClause @@ -1242,7 +1302,9 @@ Added line: 8224 | | | +- TermParamClause | | | +- TermParam | | | +- TermName +Added line: 130 | | | +- TypeFunction +Added line: 6913 | | | +- TypeFuncParamClause | | | | +- TypeName | | | | +- TypeName @@ -1263,11 +1325,13 @@ Added line: 8224 | | +- TermWhile | | | +- TermApplyUnary | | | | +- TermName +Added line: 2338 | | | | +- TermSelect | | | | +- TermName | | | | +- TermName | | | +- TermBlock | | | +- TermAssign +Added line: 5397 | | | | +- TermName | | | | +- TermApply | | | | +- TermName @@ -1294,6 +1358,7 @@ Added line: 8224 | | | +- TermThis | | | +- NameAnonymous | | +- DefnVar +Added line: 9982 | | | +- PatVar | | | | +- TermName | | | +- LitInt @@ -1325,6 +1390,7 @@ Added line: 8224 | | | +- TermParamClause | | | +- TermParam | | | +- TermName +Added line: 8233 | | | +- TypeName | | +- TypeName | | +- TermBlock @@ -1344,6 +1410,7 @@ Added line: 8224 | | | | +- TermName | | | | +- TypeApply | | | | +- TypeName +Added line: 5623 | | | | +- TypeArgClause | | | | +- TypeName | | | +- TypeName @@ -1358,6 +1425,7 @@ Added line: 8224 | | | +- TermIf | | | | +- TermSelect | | | | | +- TermName +Added line: 9057 | | | | | +- TermName | | | | +- LitInt Added line: 3294 @@ -1389,6 +1457,7 @@ Added line: 2512 | | | +- LitInt | | +- LitInt | | +- TermApply +Added line: 5984 | | +- TermName | | +- TermArgClause | | +- LitInt @@ -1396,14 +1465,16 @@ Added line: 2512 | +- DefnDef | | +- ModOverride | | +- ModFinal +Added line: 6082 | | +- TermName | | +- MemberParamClauseGroup | | | +- TypeParamClause | | | +- TermParamClause | | | +- TermParam +Added line: 9393 | | | +- TermName +Added line: 2498 | | | +- TypeFunction - | | | +- TypeFuncParamClause | | | | +- TypeName | | | +- TypeName | | +- TypeName @@ -1427,6 +1498,7 @@ Added line: 2512 | | | +- TermIf | | | | +- TermApplyUnary | | | | | +- TermName +Added line: 3234 | | | | | +- TermApply | | | | | +- TermName | | | | | +- TermArgClause @@ -1437,8 +1509,10 @@ Added line: 2512 | | | | | +- LitBoolean | | | | +- LitUnit | | | +- TermAssign +Added line: 8985 | | | +- TermName | | | +- TermSelect +Added line: 4607 | | | +- TermName | | | +- TermName | | +- LitBoolean @@ -1464,6 +1538,7 @@ Added line: 2512 | | | | +- TypeName | | | | +- TypeArgClause | | | | +- TypeName +Added line: 8313 | | | +- TermThis | | | +- NameAnonymous | | +- TermWhile @@ -1483,22 +1558,24 @@ Added line: 2512 | | | | +- TermReturn | | | | | +- LitBoolean | | | | +- LitUnit +Added line: 7092 | | | +- TermAssign | | | +- TermName | | | +- TermSelect | | | +- TermName | | | +- TermName | | +- LitBoolean +Added line: 7240 | +- DefnDef | | +- ModOverride | | +- ModFinal | | +- TermName +Added line: 3722 | | +- MemberParamClauseGroup | | | +- TypeParamClause | | | | +- TypeParam | | | | +- TypeName | | | | +- TypeParamClause - | | | | +- TypeBounds | | | | +- TypeName | | | +- TermParamClause | | | +- TermParam @@ -1509,6 +1586,7 @@ Added line: 2512 | | +- DefnVar | | | +- PatVar | | | | +- TermName +Added line: 6380 | | | +- TypeApply | | | | +- TypeName | | | | +- TypeArgClause @@ -1589,6 +1667,7 @@ Added line: 2512 | | | | +- TermName | | | +- LitUnit | | +- TermAssign +Added line: 2819 | | +- TermName | | +- TermSelect | | +- TermName @@ -1613,6 +1692,7 @@ Added line: 2512 | | | +- TypeName | | +- TermParam | | +- ModPrivate +Added line: 5459 | | | +- NameIndeterminate | | +- ModVarParam | | +- TermName @@ -1654,7 +1734,9 @@ Added line: 2512 | +- TypeApply | | +- TypeName | | +- TypeArgClause +Added line: 7070 | | +- TypeName +Added line: 5699 | +- TermName +- DefnObject | +- ModCase @@ -1691,6 +1773,7 @@ Added line: 2512 | | +- TypeName | | +- TermThrow | | +- TermNew +Added line: 3563 | | +- Init | | +- TypeName | | +- NameAnonymous @@ -1703,6 +1786,7 @@ Added line: 2512 | | +- TermThrow | | +- TermNew | | +- Init +Added line: 6646 | | +- TypeName | | +- NameAnonymous | | +- TermArgClause @@ -1712,7 +1796,6 @@ Added line: 2512 | | +- TermName | | +- TypeName | | +- TermThrow - | | +- TermNew | | +- Init | | +- TypeName | | +- NameAnonymous @@ -1724,6 +1807,7 @@ Added line: 2512 | | +- TypeName | | +- LitInt | +- DefnDef +Added line: 9992 | | +- ModOverride | | +- TermName | | +- TypeApply @@ -1750,12 +1834,12 @@ Added line: 2512 | | | +- TermParam | | | | +- ModImplicit | | | | +- TermName - | | | | +- TypeFunction | | | | +- TypeFuncParamClause | | | | | +- TypeName | | | | +- TypeTuple | | | | +- TypeName | | | | +- TypeName +Added line: 2072 | | | +- ModImplicit | | +- TypeTuple | | | +- TypeApply @@ -1765,6 +1849,7 @@ Added line: 2512 | | | +- TypeApply | | | +- TypeName | | | +- TypeArgClause +Added line: 7648 | | | +- TypeName | | +- TermName | +- DefnVal @@ -1775,6 +1860,7 @@ Added line: 2512 | +- ModPrivate | | +- TermThis | | +- NameAnonymous +Added line: 4642 | +- PatVar | | +- TermName | +- TermTuple @@ -1809,6 +1895,7 @@ Added line: 2512 | +- TermName | +- MemberParamClauseGroup | | +- TypeParamClause +Added line: 8847 | | | +- TypeParam | | | +- TypeName | | | +- TypeParamClause @@ -1892,14 +1979,15 @@ Added line: 2512 | +- Init | +- TypeName | +- NameAnonymous +Added line: 315 | +- TermArgClause +- DefnDef | +- TermName - | +- MemberParamClauseGroup | | +- TypeParamClause | | +- TypeParam | | +- TypeName | | +- TypeParamClause +Added line: 4440 | | +- TypeBounds | +- TypeApply | | +- TypeName @@ -1927,6 +2015,7 @@ Added line: 2512 +- Self | +- NameAnonymous +- DefnDef +Added line: 1574 +- TermName +- MemberParamClauseGroup | +- TypeParamClause diff --git a/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt b/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt index 96a2f900d5..1ccfa0177c 100644 --- a/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt +++ b/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt @@ -3,15 +3,25 @@ +- TermSelect | +- TermName | +- TermName +Added line: 8689 +- TermName +- Template +Added line: 7920 +- Self +Added line: 5492 +Added line: 3272 | +- NameAnonymous +Added line: 5660 +- DefnType +Added line: 3039 | +- TypeName +Added line: 406 | +- TypeParamClause - | +- TypeSelect +Added line: 3575 +Added line: 4808 | | +- TermSelect +Added line: 4064 +Added line: 8930 | | | +- TermName | | | +- TermName | | +- TypeName @@ -19,76 +29,149 @@ +- DefnVal | +- PatVar | | +- TermName +Added line: 6024 | +- TermSelect | +- TermSelect | | +- TermName | | +- TermName | +- TermName +Added line: 9592 +- DefnType | +- TypeName +Added line: 2874 | +- TypeParamClause +Added line: 7497 +Added line: 2678 | +- TypeSelect +Added line: 4588 +Added line: 9971 | | +- TermSelect +Added line: 8681 +Added line: 2204 +Added line: 9979 | | | +- TermName - | | | +- TermName +Added line: 8309 +Added line: 4534 +Added line: 5030 | | +- TypeName +Added line: 6865 +Added line: 6716 +Added line: 3197 +Added line: 6623 | +- TypeBounds +- DefnVal +Added line: 7798 | +- PatVar +Added line: 1138 | | +- TermName +Added line: 5025 | +- TermSelect +Added line: 5723 +Added line: 5775 | +- TermSelect +Added line: 1498 +Added line: 7792 | | +- TermName | | +- TermName +Added line: 1812 | +- TermName +Added line: 7359 +- DefnType +Added line: 2853 | +- ModAnnot Added line: 8000 +Added line: 8407 Added line: 4496 +Added line: 1200 Added line: 1043 | | +- Init +Added line: 2986 | | +- TypeName | | +- NameAnonymous +Added line: 6539 +Added line: 5027 +Added line: 1762 | | +- TermArgClause - | | +- LitString +Added line: 5806 +Added line: 7705 | | +- LitString | +- TypeName +Added line: 4262 +Added line: 1581 | +- TypeParamClause | | +- TypeParam +Added line: 6590 | | +- ModCovariant | | +- TypeName | | +- TypeParamClause +Added line: 455 +Added line: 52 +Added line: 8745 +Added line: 2780 | | +- TypeBounds +Added line: 3449 +Added line: 6222 +Added line: 1874 | +- TypeApply | | +- TypeName +Added line: 1942 +Added line: 6512 +Added line: 5467 +Added line: 432 | | +- TypeArgClause | | +- TypeName - | +- TypeBounds +Added line: 3636 +Added line: 2850 +Added line: 2331 +- DefnVal | +- ModAnnot +Added line: 702 +Added line: 6481 | | +- Init +Added line: 9715 +Added line: 9263 +Added line: 5962 +Added line: 8525 | | +- TypeName | | +- NameAnonymous +Added line: 7627 | | +- TermArgClause | | +- LitString | | +- LitString | +- PatVar | | +- TermName +Added line: 2835 | +- TermName +Added line: 8366 +Added line: 1908 +- DefnType +Added line: 123 +Added line: 171 +Added line: 9762 +- ModAnnot | +- Init | +- TypeName | +- NameAnonymous - | +- TermArgClause | +- LitString | +- LitString +Added line: 4792 +Added line: 8269 +Added line: 7893 +Added line: 6134 +Added line: 6435 +- TypeParamClause | +- TypeParam | | +- TypeName +Added line: 2878 | | +- TypeParamClause +Added line: 7314 +Added line: 7505 | | +- TypeBounds +Added line: 5439 +Added line: 1596 +Added line: 7446 | +- TypeParam +Added line: 1895 | +- ModCovariant | +- TypeName Added line: 7539 @@ -100,9 +183,15 @@ Added line: 7539 | | | | +- TermName | | | | +- TermName | | | +- TermName +Added line: 6996 | | +- TypeName | +- TypeArgClause +Added line: 8586 | +- TypeName | +- TypeName +Added line: 1759 Added line: 2887 +Added line: 3120 +- TypeBounds +Added line: 6012 +Added line: 1461 diff --git a/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/sample-LiftActor.txt b/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/sample-LiftActor.txt index 6c4b243eb2..8b04f362d1 100644 --- a/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/sample-LiftActor.txt +++ b/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/sample-LiftActor.txt @@ -4,6 +4,7 @@ L19 [net] 9 12 [.] 12 13 [liftweb] 13 20 +Added line: 9894 L20 [package] 1 8 [actor] 9 14 @@ -43,6 +44,7 @@ L32 [LAScheduler] 7 18 [{] 19 20 L38 +Added line: 6113 [def] 3 6 [execute] 7 14 [(] 14 15 @@ -57,6 +59,7 @@ L38 [Unit] 31 35 L39 [}] 1 2 +Added line: 6725 L41 [object] 1 7 [LAScheduler] 8 19 @@ -127,12 +130,12 @@ L61 L62 [import] 7 13 [java] 14 18 +Added line: 3326 [.] 18 19 [util] 19 23 [.] 23 24 [concurrent] 24 34 [.] 34 35 - [_] 35 36 L64 [private] 7 14 [val] 15 18 @@ -155,6 +158,7 @@ L68 [.] 40 41 [SECONDS] 41 48 [,] 48 49 +Added line: 9806 L69 [blockingQueueSize] 32 49 [match] 50 55 @@ -167,6 +171,7 @@ L70 [)] 45 46 [=>] 47 49 L71 +Added line: 1890 [new] 36 39 [ArrayBlockingQueue] 40 58 [(] 58 59 @@ -200,11 +205,13 @@ L76 [.] 9 10 [execute] 10 17 [(] 17 18 +Added line: 7223 [new] 18 21 [Runnable] 22 30 [{] 30 31 [def] 31 34 [run] 35 38 +Added line: 8898 [(] 38 39 [)] 39 40 [{] 41 42 @@ -222,6 +229,7 @@ L79 L80 [case] 11 15 [e] 16 17 +Added line: 176 [:] 17 18 [Exception] 19 28 [=>] 29 31 @@ -235,6 +243,7 @@ L80 [)] 70 71 L81 [}] 9 10 +Added line: 7323 L82 [}] 7 8 [}] 8 9 @@ -253,6 +262,7 @@ L85 [.] 11 12 [shutdown] 12 20 [(] 20 21 +Added line: 5639 [)] 21 22 L86 [}] 7 8 @@ -299,6 +309,7 @@ L101 [createExecutor] 16 30 [(] 30 31 [)] 31 32 +Added line: 6160 L102 [}] 7 8 L103 @@ -352,6 +363,7 @@ L118 [SpecializedLiftActor] 7 27 [\[] 27 28 [T] 28 29 +Added line: 8111 [\]] 29 30 [extends] 31 38 [SimpleActor] 39 50 @@ -359,6 +371,7 @@ L118 [T] 51 52 [\]] 52 53 [{] 55 56 +Added line: 1920 L119 [@] 3 4 [volatile] 4 12 @@ -381,6 +394,7 @@ L120 [MailboxItem] 34 45 [=] 46 47 [new] 48 51 +Added line: 9562 [SpecialMailbox] 52 66 L121 [@] 3 4 @@ -398,6 +412,7 @@ L121 [\]] 46 47 [=] 48 49 [Nil] 50 53 +Added line: 7702 L122 [@] 3 4 [volatile] 4 12 @@ -408,6 +423,7 @@ L122 [var] 27 30 [priorityMsgList] 31 46 [:] 46 47 +Added line: 2484 [List] 48 52 [\[] 52 53 [T] 53 54 @@ -428,6 +444,7 @@ L123 L125 [private] 3 10 [class] 11 16 +Added line: 1846 [MailboxItem] 17 28 [(] 28 29 [val] 29 32 @@ -474,6 +491,7 @@ L137 [=] 17 18 [prev] 19 23 L138 +Added line: 8018 [}] 5 6 L140 [def] 5 8 @@ -499,6 +517,7 @@ L142 [prev] 15 19 [=] 20 21 [this] 22 26 +Added line: 5171 L143 [newItem] 7 14 [.] 14 15 @@ -515,6 +534,7 @@ L145 [newItem] 7 14 L146 [}] 5 6 +Added line: 7056 L148 [def] 5 8 [insertBefore] 9 21 @@ -546,6 +566,7 @@ L151 [.] 14 15 [next] 15 19 [=] 20 21 +Added line: 2982 [this] 22 26 L152 [prev] 7 11 @@ -570,6 +591,7 @@ L157 [\[] 69 70 [T] 70 71 [\]] 71 72 +Added line: 4614 [)] 72 73 [{] 74 75 L159 @@ -599,6 +621,7 @@ L163 [)] 76 77 [:] 77 78 [Box] 79 82 +Added line: 7636 [\[] 82 83 [MailboxItem] 83 94 [\]] 94 95 @@ -646,6 +669,7 @@ L175 [send] 7 11 [(] 11 12 [msg] 12 15 +Added line: 514 [:] 15 16 [T] 17 18 [)] 18 19 @@ -693,6 +717,7 @@ L185 [{] 24 25 L186 [if] 9 11 +Added line: 638 [(] 12 13 [LAScheduler] 13 24 [.] 24 25 @@ -731,11 +756,13 @@ L192 [(] 13 14 [)] 14 15 [=>] 16 18 +Added line: 6802 [LAScheduler] 19 30 [.] 30 31 [execute] 31 38 [(] 38 39 [(] 39 40 +Added line: 6924 [)] 40 41 [=>] 42 44 [processMailbox] 45 59 @@ -751,7 +778,6 @@ L194 [)] 12 13 [=>] 14 16 [{] 17 18 - [}] 18 19 L195 [}] 9 10 L196 @@ -776,12 +802,13 @@ L207 [def] 13 16 [insertMsgAtHeadOfQueue_!] 17 41 [(] 41 42 - [msg] 42 45 [:] 45 46 [T] 47 48 [)] 48 49 +Added line: 872 [:] 49 50 [Unit] 51 55 +Added line: 8143 [=] 56 57 [{] 58 59 L208 @@ -811,6 +838,7 @@ L210 [)] 22 23 [{] 24 25 L211 +Added line: 7466 [if] 9 11 [(] 12 13 [LAScheduler] 13 24 @@ -841,11 +869,12 @@ L215 [==] 24 26 [0] 27 28 [)] 28 29 - [{] 30 31 +Added line: 6990 L216 [startCnt] 13 21 [+=] 22 24 [1] 25 26 +Added line: 8090 L217 [(] 13 14 [)] 14 15 @@ -856,8 +885,8 @@ L217 [(] 38 39 [(] 39 40 [)] 40 41 - [=>] 42 44 [processMailbox] 45 59 +Added line: 2889 [(] 59 60 [false] 60 65 [)] 65 66 @@ -930,6 +959,7 @@ L242 [\[] 23 24 [R] 24 25 [\]] 25 26 +Added line: 6508 [(] 26 27 [f] 27 28 [:] 28 29 @@ -955,6 +985,7 @@ L244 [(] 33 34 [xs] 34 36 [)] 36 37 +Added line: 1879 [(] 37 38 [f] 38 39 [)] 39 40 @@ -998,12 +1029,12 @@ L251 [(] 10 11 [startCnt] 11 19 [>] 20 21 +Added line: 1400 [0] 22 23 [)] 23 24 [startCnt] 25 33 [=] 34 35 [0] 36 37 -L252 [}] 5 6 L254 [val] 5 8 @@ -1065,6 +1096,7 @@ L262 [!] 11 12 [msgList] 12 19 [.] 19 20 +Added line: 7653 [isEmpty] 20 27 [)] 27 28 [{] 29 30 @@ -1096,9 +1128,11 @@ L263 L264 [msgList] 7 14 [=] 15 16 +Added line: 7119 [Nil] 17 20 L265 [}] 7 8 +Added line: 4707 L266 [}] 5 6 L268 @@ -1183,6 +1217,7 @@ L282 [)] 33 34 L283 [try] 23 26 +Added line: 3011 [{] 27 28 L284 [execTranslate] 25 38 @@ -1239,13 +1274,14 @@ L290 L291 [keepOnDoingHighPriory] 27 48 [=] 49 50 +Added line: 1138 [false] 51 56 -L292 [}] 25 26 L293 [else] 25 29 [{] 30 31 L294 +Added line: 9688 [putListIntoMB] 27 40 [(] 40 41 [)] 41 42 @@ -1254,6 +1290,7 @@ L295 L296 [}] 23 24 L297 +Added line: 6870 [}] 19 20 L298 [}] 15 16 @@ -1273,6 +1310,7 @@ L301 [messageHandler] 22 36 L303 [findMailboxItem] 9 24 +Added line: 8676 [(] 24 25 [baseMailbox] 25 36 [.] 36 37 @@ -1290,6 +1328,7 @@ L303 [mb] 79 81 [.] 81 82 [item] 82 86 +Added line: 1895 [)] 86 87 [)] 87 88 [match] 89 94 @@ -1297,6 +1336,7 @@ L303 L304 [case] 11 15 [Full] 16 20 +Added line: 650 [(] 20 21 [mb] 21 23 [)] 23 24 @@ -1305,6 +1345,8 @@ L305 [mb] 13 15 [.] 15 16 [remove] 16 22 +Added line: 7710 +Added line: 8384 [(] 22 23 [)] 23 24 L306 @@ -1320,6 +1362,7 @@ L307 [.] 35 36 [item] 36 40 [)] 40 41 +Added line: 6335 L308 [}] 13 14 [catch] 15 20 @@ -1339,6 +1382,7 @@ L309 [e] 55 56 [)] 56 57 [)] 57 58 +Added line: 2290 [eh] 59 61 [(] 61 62 [e] 62 63 @@ -1365,6 +1409,7 @@ L313 L314 [processing] 17 27 [=] 28 29 +Added line: 2134 [false] 30 35 L315 [clearProcessing] 17 32 @@ -1414,6 +1459,8 @@ L327 [(] 13 14 [exception] 14 23 [)] 23 24 +Added line: 3656 +Added line: 1298 L329 [throw] 9 14 [exception] 15 24 @@ -1525,6 +1572,7 @@ L347 [PartialFunction] 35 50 [\[] 50 51 [Throwable] 51 60 +Added line: 3330 [,] 60 61 [Unit] 62 66 [\]] 66 67 @@ -1578,6 +1626,7 @@ L369 [!] 16 17 [(] 17 18 [msg] 18 21 +Added line: 2996 [:] 21 22 [T] 23 24 [)] 24 25 @@ -1586,6 +1635,7 @@ L369 [=] 32 33 [{] 34 35 L370 +Added line: 4927 [messagesReceived] 5 21 [.] 21 22 [synchronized] 22 34 @@ -1629,6 +1679,7 @@ L384 [Boolean] 37 44 [=] 45 46 [messagesReceived] 47 63 +Added line: 8324 [.] 63 64 [contains] 64 72 [(] 72 73 @@ -1641,6 +1692,7 @@ L389 [List] 17 21 [\[] 21 22 [T] 22 23 +Added line: 6667 [\]] 23 24 [=] 25 26 [messagesReceived] 27 43 @@ -1675,6 +1727,7 @@ L400 [Any] 43 46 [,] 46 47 [future] 48 54 +Added line: 3927 [:] 54 55 [LAFuture] 56 64 [\[] 64 65 @@ -1707,6 +1760,7 @@ L404 L405 [@] 3 4 [volatile] 4 12 +Added line: 941 L406 [private] 3 10 [\[] 10 11 @@ -1717,6 +1771,7 @@ L406 [:] 35 36 [LAFuture] 37 45 [\[] 45 46 +Added line: 957 [Any] 46 49 [\]] 49 50 [=] 51 52 @@ -1750,6 +1805,7 @@ L411 [)] 31 32 [{] 33 34 L412 +Added line: 6180 [forwardTo] 7 16 [match] 17 22 [{] 23 24 @@ -1777,6 +1833,7 @@ L415 [other] 17 22 [!?] 23 25 [msg] 26 29 +Added line: 1947 [)] 29 30 L416 [}] 7 8 @@ -1821,6 +1878,7 @@ L431 [=] 35 36 [{] 37 38 L432 +Added line: 6485 [val] 5 8 [future] 9 15 [=] 16 17 @@ -1835,7 +1893,6 @@ L433 [MsgWithResp] 12 23 [(] 23 24 [msg] 24 27 - [,] 27 28 [future] 29 35 [)] 35 36 L434 @@ -1844,6 +1901,7 @@ L435 [}] 3 4 L442 [def] 3 6 +Added line: 7453 [sendAndGetReply] 7 22 [(] 22 23 [msg] 23 26 @@ -1852,6 +1910,7 @@ L442 [)] 31 32 [:] 32 33 [Any] 34 37 +Added line: 4628 [=] 38 39 [this] 40 44 [!?] 45 47 @@ -1936,6 +1995,7 @@ L468 L469 [this] 5 9 [!!] 10 12 +Added line: 4677 [(] 13 14 [message] 14 21 [,] 21 22 @@ -1956,6 +2016,7 @@ L477 [:] 34 35 [Box] 36 39 [\[] 39 40 +Added line: 3673 [Any] 40 43 [\]] 43 44 [=] 45 46 @@ -2009,6 +2070,7 @@ L488 [new] 18 21 [LAFuture] 22 30 [\[] 30 31 +Added line: 4259 [Any] 31 34 [\]] 34 35 L489 @@ -2041,10 +2103,10 @@ L493 [=>] 47 49 [Boolean] 50 57 [)] 57 58 - [(] 58 59 [v] 59 60 [:] 60 61 [Any] 62 65 +Added line: 1039 [)] 65 66 [=] 67 68 [v] 69 70 @@ -2137,8 +2199,10 @@ L507 [}] 3 4 L513 [protected] 3 12 +Added line: 5331 [def] 13 16 [reply] 17 22 +Added line: 4805 [(] 22 23 [v] 23 24 [:] 24 25 @@ -2202,17 +2266,18 @@ L534 [\]] 35 36 [,] 36 37 [DispatchVendor] 38 52 +Added line: 247 [\]] 52 53 [=] 54 55 [Map] 56 59 [(] 59 60 [)] 60 61 -L536 [def] 3 6 [calculateHandler] 7 23 [(] 23 24 [what] 24 28 [:] 28 29 +Added line: 9460 [LiftActorJ] 30 40 [)] 40 41 [:] 41 42 @@ -2228,6 +2293,7 @@ L537 [{] 18 19 L538 [val] 7 10 +Added line: 2120 [clz] 11 14 [=] 15 16 [what] 17 21 @@ -2274,6 +2340,7 @@ L543 [clz] 22 25 [->] 26 28 [pf] 29 31 +Added line: 622 L544 [pf] 11 13 [.] 13 14 @@ -2287,6 +2354,7 @@ L546 [}] 7 8 L547 [}] 5 6 +Added line: 8609 L549 [private] 3 10 [def] 11 14 @@ -2302,6 +2370,7 @@ L549 [:] 44 45 [List] 46 50 [\[] 50 51 +Added line: 6190 [Class] 51 56 [\[] 56 57 [_] 57 58 @@ -2371,6 +2440,7 @@ L556 [null] 58 62 [)] 62 63 L557 +Added line: 4562 [}] 3 4 L559 [private] 3 10 @@ -2402,6 +2472,7 @@ L561 [(] 12 13 [_] 13 14 [.] 14 15 +Added line: 699 [getDeclaredMethods] 15 33 [.] 33 34 [toList] 34 40 @@ -2425,6 +2496,7 @@ L563 [Method] 31 37 [\]] 37 38 [=] 39 40 +Added line: 3908 L564 [Map] 7 10 [(] 10 11 @@ -2445,12 +2517,14 @@ L566 [m] 9 10 [.] 10 11 [getParameterTypes] 11 28 +Added line: 1536 [(] 28 29 [)] 29 30 [.] 30 31 [apply] 31 36 [(] 36 37 [0] 37 38 +Added line: 338 [)] 38 39 [->] 40 42 [m] 43 44 @@ -2470,6 +2544,7 @@ L569 L570 [}] 1 2 L572 +Added line: 6675 [private] 1 8 [final] 9 14 [class] 15 20 @@ -2509,6 +2584,7 @@ L573 L574 [Map] 5 8 [(] 8 9 +Added line: 1899 [map] 9 12 [.] 12 13 [map] 13 16 @@ -2520,6 +2596,7 @@ L574 [v] 25 26 [)] 26 27 [=>] 28 30 +Added line: 8068 [(] 31 32 [k] 32 33 [,] 33 34 @@ -2552,6 +2629,7 @@ L576 [\]] 57 58 [=] 59 60 L577 +Added line: 1227 [new] 5 8 [PartialFunction] 9 24 [\[] 24 25 @@ -2559,6 +2637,7 @@ L577 [,] 28 29 [Unit] 30 34 [\]] 34 35 +Added line: 4242 [{] 36 37 L578 [var] 7 10 @@ -2567,6 +2646,7 @@ L578 [Map] 19 22 [\[] 22 23 [Class] 23 28 +Added line: 6882 [\[] 28 29 [_] 29 30 [\]] 30 31 @@ -2638,18 +2718,22 @@ L584 [\[] 33 34 [Object] 34 40 [\]] 40 41 +Added line: 854 [.] 41 42 [getClass] 42 50 L585 [theMap] 9 15 [.] 15 16 [get] 16 19 +Added line: 9860 +Added line: 3218 [(] 19 20 [clz] 20 23 [)] 23 24 [match] 25 30 [{] 31 32 L586 +Added line: 5253 [case] 11 15 [Some] 16 20 [(] 20 21 @@ -2679,6 +2763,7 @@ L589 [clz] 23 26 [->] 27 29 [answer] 30 36 +Added line: 8706 L590 [answer] 13 19 [.] 19 20 @@ -2718,6 +2803,7 @@ L597 [\[] 39 40 [Object] 40 46 [\]] 46 47 +Added line: 8099 L598 [val] 9 12 [meth] 13 17 @@ -2744,9 +2830,11 @@ L599 L600 [case] 11 15 [null] 16 20 +Added line: 2690 [=>] 21 23 L601 [case] 11 15 +Added line: 8624 [x] 16 17 [=>] 18 20 [actor] 21 26 @@ -2797,6 +2885,7 @@ L616 [(] 74 75 [this] 75 79 [)] 79 80 +Added line: 1049 L618 [protected] 3 12 [def] 13 16 diff --git a/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/special_comments.txt b/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/special_comments.txt index 174012eb14..7da2b2d6ac 100644 --- a/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/special_comments.txt +++ b/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/special_comments.txt @@ -1,40 +1,129 @@ [Image] or [Truncated image[ Bcol Ecol L7 - [case] 1 5 +Added line: 6688 +Added line: 5130 +Added line: 877 +Added line: 9569 +Added line: 2445 +Added line: 9609 +Added line: 4339 +Added line: 1480 [class] 6 11 [Foo] 12 15 [(] 15 16 [)] 16 17 +Added line: 40 +Added line: 9273 [{] 18 19 +Added line: 3195 L14 +Added line: 4514 +Added line: 2889 +Added line: 9186 [private] 3 10 [def] 11 14 [bar] 15 18 +Added line: 1734 [(] 18 19 +Added line: 901 [i] 19 20 +Added line: 4801 +Added line: 4334 +Added line: 1477 [:] 20 21 +Added line: 281 +Added line: 8864 [Int] 22 25 +Added line: 6033 [)] 25 26 +Added line: 1380 [:] 27 28 +Added line: 6144 [Int] 29 32 - [=] 33 34 +Added line: 5499 +Added line: 8406 +Added line: 9007 [{] 35 36 +Added line: 5429 L15 +Added line: 879 +Added line: 6776 +Added line: 6695 +Added line: 6545 [val] 5 8 +Added line: 6700 +Added line: 3689 +Added line: 3491 +Added line: 1410 [CPD] 9 12 [=] 13 14 [40] 15 17 +Added line: 413 +Added line: 7576 +Added line: 2512 +Added line: 6673 L16 +Added line: 1361 +Added line: 564 +Added line: 2307 +Added line: 3186 +Added line: 2969 +Added line: 2885 +Added line: 9582 +Added line: 4868 +Added line: 8008 [val] 5 8 +Added line: 3126 +Added line: 4190 +Added line: 8202 +Added line: 2908 +Added line: 3238 +Added line: 5392 +Added line: 8390 +Added line: 4609 +Added line: 4169 [OFF] 9 12 [=] 13 14 +Added line: 7121 +Added line: 7030 [60] 15 17 L17 +Added line: 6612 +Added line: 1095 +Added line: 4633 [CPD] 5 8 +Added line: 3730 [-] 8 9 [OFF] 9 12 +Added line: 4541 +Added line: 7195 +Added line: 7577 L18 +Added line: 5308 [}] 3 4 +Added line: 8891 +Added line: 8703 +Added line: 1763 +Added line: 1382 L24 +Added line: 9265 +Added line: 6497 +Added line: 9299 +Added line: 3750 +Added line: 3871 +Added line: 2238 +Added line: 356 +Added line: 5256 +Added line: 9262 +Added line: 9803 +Added line: 6675 +Added line: 7376 +Added line: 9428 +Added line: 1258 +Added line: 6591 [}] 1 2 +Added line: 890 +Added line: 2534 +Added line: 7454 EOF +Added line: 7761 diff --git a/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/tabWidth.txt b/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/tabWidth.txt index 516a795bc0..7da45157d3 100644 --- a/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/tabWidth.txt +++ b/pmd-scala-modules/pmd-scala-common/src/test/resources/net/sourceforge/pmd/lang/scala/cpd/testdata/tabWidth.txt @@ -1,32 +1,121 @@ +Added line: 4654 [Image] or [Truncated image[ Bcol Ecol +Added line: 8807 +Added line: 9295 L1 +Added line: 7267 +Added line: 767 +Added line: 6333 [object] 1 7 +Added line: 3301 +Added line: 5337 [Main] 8 12 +Added line: 2112 +Added line: 3804 Added line: 4290 +Added line: 7752 [{] 13 14 +Added line: 6155 +Added line: 6084 +Added line: 1607 +Added line: 8989 +Added line: 6785 +Added line: 897 +Added line: 8841 +Added line: 5845 L2 [def] 2 5 +Added line: 6732 +Added line: 4620 Added line: 324 +Added line: 9874 +Added line: 5443 +Added line: 3770 +Added line: 8536 +Added line: 1536 +Added line: 3897 +Added line: 1358 +Added line: 2297 +Added line: 9721 +Added line: 7521 +Added line: 8402 [main] 6 10 +Added line: 1444 +Added line: 2375 +Added line: 4186 +Added line: 3592 +Added line: 3754 +Added line: 7827 [(] 10 11 +Added line: 353 +Added line: 8612 +Added line: 7682 +Added line: 7689 [args] 11 15 [:] 15 16 +Added line: 9313 +Added line: 1180 +Added line: 7517 +Added line: 194 +Added line: 5020 Added line: 4908 +Added line: 2773 Added line: 854 +Added line: 4312 [Array] 17 22 [\[] 22 23 - [String] 23 29 +Added line: 988 +Added line: 2295 +Added line: 8344 [\]] 29 30 [)] 30 31 +Added line: 2215 +Added line: 816 [:] 31 32 [Unit] 33 37 +Added line: 325 +Added line: 2096 +Added line: 854 [{] 40 41 -L3 - [println] 3 10 +Added line: 48 +Added line: 3807 +Added line: 9781 +Added line: 1527 +Added line: 2214 +Added line: 4711 +Added line: 3632 +Added line: 6592 +Added line: 9616 +Added line: 1420 [(] 10 11 +Added line: 8163 +Added line: 3312 ["Hello, World!"] 11 26 +Added line: 2125 +Added line: 3839 +Added line: 380 +Added line: 5110 +Added line: 1140 [)] 26 27 +Added line: 9483 +Added line: 345 +Added line: 1558 L4 +Added line: 5097 +Added line: 7973 [}] 2 3 +Added line: 8563 +Added line: 6894 +Added line: 2473 L5 +Added line: 8130 +Added line: 4272 +Added line: 477 [}] 1 2 +Added line: 3206 +Added line: 4008 +Added line: 1736 +Added line: 5279 +Added line: 560 +Added line: 4509 +Added line: 6754 diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/BTree.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/BTree.txt index 4914c8c7e6..5091e304e3 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/BTree.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/BTree.txt @@ -1,4 +1,5 @@ +- TopLevel +Added line: 1394 +- Statements | +- Statement | | +- Declaration @@ -68,6 +69,7 @@ | | | | | | +- T-internal | | | | | +- T-typealias | | | | | +- TypealiasName +Added line: 1907 | | | | | +- Identifier | | | | | +- T-Identifier | | | | +- TypealiasAssignment @@ -181,6 +183,7 @@ | | | | | | +- T-public | | | | | +- T-init | | | | +- ParameterClause +Added line: 5220 | | | | | +- T-lparen | | | | | +- ParameterList | | | | | | +- Parameter @@ -195,6 +198,7 @@ | | | | | | | +- Identifier | | | | | | | +- T-Identifier | | | | | | +- DefaultArgumentClause +Added line: 7537 | | | | | | +- T-eq | | | | | | +- Expression | | | | | | +- PrefixExpression @@ -400,15 +404,18 @@ | | | +- ExtensionMember | | | +- Declaration | | | +- FunctionDeclaration +Added line: 402 | | | +- FunctionHead | | | | +- DeclarationModifiers | | | | | +- DeclarationModifier | | | | | | +- AccessLevelModifier | | | | | | +- T-internal +Added line: 509 | | | | | +- DeclarationModifier | | | | | +- MutationModifier | | | | | +- T-mutating | | | | +- T-func +Added line: 625 | | | +- FunctionName | | | | +- Identifier | | | | +- T-Identifier @@ -417,6 +424,7 @@ | | | | +- T-lparen | | | | +- T-rparen | | | +- FunctionBody +Added line: 8136 | | | +- CodeBlock | | | +- T-lbrace | | | +- Statements @@ -550,11 +558,13 @@ | | | | +- Statements | | | | | +- Statement | | | | | | +- ControlTransferStatement +Added line: 8890 | | | | | | +- ReturnStatement | | | | | | +- T-return | | | | | | +- Expression | | | | | | +- PrefixExpression | | | | | | +- PostfixExpression +Added line: 8285 | | | | | | +- PostfixExpression | | | | | | | +- PostfixExpression | | | | | | | | +- PrimaryExpression @@ -729,6 +739,7 @@ | | | | | | | +- T-Identifier | | | | | | +- T-rparen | | | | | +- Statement +Added line: 8542 | | | | | +- ControlTransferStatement | | | | | +- ReturnStatement | | | | | +- T-return @@ -874,6 +885,7 @@ | | | | | | | +- Identifier | | | | | | | +- T-Identifier | | | | | | +- T-rparen +Added line: 8474 | | | | | +- T-rparen | | | | +- T-rbrace | | | +- ExtensionMember @@ -904,6 +916,7 @@ | | | | | | | | +- SType | | | | | | | | +- TypeIdentifier | | | | | | | | +- TypeName +Added line: 5546 | | | | | | | | +- Identifier | | | | | | | | +- T-Identifier | | | | | | | +- T-comma @@ -952,6 +965,7 @@ | | | | | | +- PrimaryExpression | | | | | | +- Identifier | | | | | | +- T-Identifier +Added line: 6276 | | | | | +- FunctionCallArgumentClause | | | | | +- T-lparen | | | | | +- FunctionCallArgumentList @@ -1053,6 +1067,7 @@ | | | | | | +- T-rparen | | | | | +- T-rethrows | | | | +- FunctionBody +Added line: 418 | | | | +- CodeBlock | | | | +- T-lbrace | | | | +- Statements @@ -1078,6 +1093,7 @@ | | | | | | +- PrefixExpression | | | | | | +- PostfixExpression | | | | | | +- PrimaryExpression +Added line: 9435 | | | | | | +- Identifier | | | | | | +- T-Identifier | | | | | +- T-rparen @@ -1161,6 +1177,7 @@ | | | | | +- T-Identifier | | | | +- FunctionCallArgumentClause | | | | +- T-lparen +Added line: 7342 | | | | +- FunctionCallArgumentList | | | | | +- FunctionCallArgument | | | | | +- Expression @@ -1276,6 +1293,7 @@ | | | | | +- TypeIdentifier | | | | | +- TypeName | | | | | +- Identifier +Added line: 5720 | | | | | +- T-Identifier | | | | +- CodeBlock | | | | +- T-lbrace @@ -1331,6 +1349,7 @@ | | | | +- VariableName | | | | | +- Identifier | | | | | +- T-Identifier +Added line: 6065 | | | | +- TypeAnnotation | | | | | +- T-colon | | | | | +- SType @@ -1493,6 +1512,7 @@ | | | | | | +- Expression | | | | | | +- PrefixExpression | | | | | | +- PostfixExpression +Added line: 112 | | | | | | +- PostfixExpression | | | | | | | +- PostfixExpression | | | | | | | | +- PrimaryExpression @@ -1541,6 +1561,7 @@ | | | | | +- T-gt | | | | +- T-rparen | | | +- SubscriptResult +Added line: 3555 | | | | +- T-rarrow | | | | +- SType | | | | +- TypeIdentifier @@ -1549,6 +1570,7 @@ | | | | | +- T-Identifier | | | | +- GenericArgumentClause | | | | +- T-lt +Added line: 1993 | | | | +- GenericArgumentList | | | | | +- GenericArgument | | | | | | +- SType @@ -1645,6 +1667,7 @@ | | | | +- PostfixExpression | | | | +- PrimaryExpression | | | | +- Keyword +Added line: 6886 | | | | +- T-case | | | +- Statement | | | | +- Expression @@ -1687,7 +1710,6 @@ | | +- ExtensionDeclaration | | +- AccessLevelModifier | | | +- T-public - | | +- T-extension | | +- TypeIdentifier | | | +- TypeName | | | +- Identifier @@ -1923,6 +1945,7 @@ | | | | | | | +- PostfixExpression | | | | | | | +- PostfixExpression | | | | | | | | +- PrimaryExpression +Added line: 5411 | | | | | | | | +- Identifier | | | | | | | | +- T-Identifier | | | | | | | +- T-dot @@ -2073,6 +2096,7 @@ | | | | | | | | +- PostfixExpression | | | | | | | | | +- PostfixExpression | | | | | | | | | | +- PrimaryExpression +Added line: 5324 | | | | | | | | | | +- Identifier | | | | | | | | | | +- T-Identifier | | | | | | | | | +- T-dot @@ -2155,6 +2179,7 @@ | | | | | | +- T-public | | | | | +- T-func | | | | +- FunctionName +Added line: 3002 | | | | | +- Identifier | | | | | +- T-Identifier | | | | +- FunctionSignature @@ -2177,6 +2202,7 @@ | | | | | | | +- ExternalParameterName | | | | | | | | +- Identifier | | | | | | | | +- T-Identifier +Added line: 6965 | | | | | | | +- LocalParameterName | | | | | | | | +- Identifier | | | | | | | | +- T-Identifier @@ -2192,9 +2218,11 @@ | | | | | | | +- Expression | | | | | | | +- PrefixExpression | | | | | | | +- PostfixExpression +Added line: 2454 | | | | | | | +- PrimaryExpression | | | | | | | +- Keyword | | | | | | | +- T-Any +Added line: 2738 | | | | | | +- T-rparen | | | | | +- FunctionResult | | | | | +- T-rarrow @@ -2254,6 +2282,7 @@ | | | | | | | | +- PostfixExpression | | | | | | | | +- PrimaryExpression | | | | | | | | +- Identifier +Added line: 6655 | | | | | | | | +- T-Identifier | | | | | | | +- Statement | | | | | | | | +- LoopStatement @@ -2345,6 +2374,7 @@ | | | | | | | | | | +- CodeBlock | | | | | | | | | | +- T-lbrace | | | | | | | | | | +- Statements +Added line: 588 | | | | | | | | | | | +- Statement | | | | | | | | | | | +- ControlTransferStatement | | | | | | | | | | | +- ReturnStatement @@ -2365,6 +2395,7 @@ | | | | | | | | | | | | +- TupleElementList | | | | | | | | | | | | | +- TupleElement | | | | | | | | | | | | | +- Expression +Added line: 2253 | | | | | | | | | | | | | +- PrefixExpression | | | | | | | | | | | | | +- PostfixExpression | | | | | | | | | | | | | +- PrimaryExpression @@ -2385,6 +2416,7 @@ | | | | | | | | | | | +- PostfixExpression | | | | | | | | | | | +- PostfixExpression | | | | | | | | | | | | +- PrimaryExpression +Added line: 1059 | | | | | | | | | | | | +- Identifier | | | | | | | | | | | | +- T-Identifier | | | | | | | | | | | +- T-dot @@ -2419,6 +2451,7 @@ | | | | | | | | | | | +- PrimaryExpression | | | | | | | | | | | +- Identifier | | | | | | | | | | | +- T-Identifier +Added line: 3658 | | | | | | | | | | +- T-dot | | | | | | | | | | +- Identifier | | | | | | | | | | +- T-Identifier @@ -2430,6 +2463,7 @@ | | | | | | | | | | +- PostfixExpression | | | | | | | | | | +- PostfixExpression | | | | | | | | | | | +- PrimaryExpression +Added line: 8554 | | | | | | | | | | | +- Identifier | | | | | | | | | | | +- T-Identifier | | | | | | | | | | +- T-dot @@ -2524,6 +2558,7 @@ | | | | | | | | | | +- IdentifierPattern | | | | | | | | | | +- Identifier | | | | | | | | | | +- T-Identifier +Added line: 7091 | | | | | | | | | +- Initializer | | | | | | | | | +- T-eq | | | | | | | | | +- Expression @@ -2596,7 +2631,6 @@ | | | | | | | | | | | | +- Identifier | | | | | | | | | | | | +- T-Identifier | | | | | | | | | | | +- PostfixOperator - | | | | | | | | | | | +- Operator | | | | | | | | | | | +- OperatorHead | | | | | | | | | | | +- T-eq | | | | | | | | | | +- Statement @@ -2686,6 +2720,7 @@ | | | | | | | | | +- T-dot | | | | | | | | | +- Identifier | | | | | | | | | +- T-Identifier +Added line: 5022 | | | | | | | | +- T-rbracket | | | | | | | +- T-rbrace | | | | | | +- Statement @@ -2751,6 +2786,7 @@ | | | | | | | +- DefaultArgumentClause | | | | | | | +- T-eq | | | | | | | +- Expression +Added line: 8787 | | | | | | | +- PrefixExpression | | | | | | | +- PostfixExpression | | | | | | | +- PrimaryExpression @@ -2772,6 +2808,7 @@ | | | | +- Statements | | | | | +- Statement | | | | | | +- Declaration +Added line: 812 | | | | | | +- ConstantDeclaration | | | | | | +- T-let | | | | | | +- PatternInitializerList @@ -2802,6 +2839,7 @@ | | | | | | | | +- PostfixExpression | | | | | | | | +- PrimaryExpression | | | | | | | | +- Identifier +Added line: 7666 | | | | | | | | +- T-Identifier | | | | | | | +- T-comma | | | | | | | +- FunctionCallArgument @@ -2822,7 +2860,6 @@ | | | | | | | | +- T-Identifier | | | | | | | +- T-colon | | | | | | | +- Expression - | | | | | | | +- PrefixExpression | | | | | | | +- PostfixExpression | | | | | | | +- PrimaryExpression | | | | | | | +- Identifier @@ -2907,6 +2944,7 @@ | | | | | | | +- ReturnStatement | | | | | | | +- T-return | | | | | | | +- Expression +Added line: 2047 | | | | | | | +- PrefixExpression | | | | | | | +- PostfixExpression | | | | | | | +- PrimaryExpression @@ -2963,6 +3001,7 @@ | | | | | | | | | +- Identifier | | | | | | | | | +- T-Identifier | | | | | | | | +- TypeAnnotation +Added line: 4 | | | | | | | | +- T-colon | | | | | | | | +- SType | | | | | | | | +- TypeIdentifier @@ -2999,6 +3038,7 @@ | | | | | +- SType | | | | | | +- TypeIdentifier | | | | | | +- TypeName +Added line: 5999 | | | | | | +- Identifier | | | | | | +- T-Identifier | | | | | +- T-question @@ -3049,7 +3089,6 @@ | | | | | | +- T-DecimalLiteral | | | | | +- Statement | | | | | | +- Declaration - | | | | | | +- VariableDeclaration | | | | | | +- VariableDeclarationHead | | | | | | | +- T-var | | | | | | +- PatternInitializerList @@ -3110,6 +3149,7 @@ | | | | | | | | | +- T-Identifier | | | | | | | | +- Initializer | | | | | | | | +- T-eq +Added line: 1001 | | | | | | | | +- Expression | | | | | | | | +- PrefixExpression | | | | | | | | +- PostfixExpression @@ -3122,6 +3162,7 @@ | | | | | | | | | +- Identifier | | | | | | | | | +- T-Identifier | | | | | | | | +- FunctionCallArgumentClause +Added line: 991 | | | | | | | | +- T-lparen | | | | | | | | +- FunctionCallArgumentList | | | | | | | | | +- FunctionCallArgument @@ -3359,11 +3400,13 @@ | | | | | | | | | | | +- PrimaryExpression | | | | | | | | | | | +- LiteralExpression | | | | | | | | | | | +- Literal +Added line: 8031 | | | | | | | | | | | +- NumericLiteral | | | | | | | | | | | +- IntegerLiteral | | | | | | | | | | | +- T-DecimalLiteral | | | | | | | | | | +- T-rparen | | | | | | | | | +- T-rbrace +Added line: 3371 | | | | | | | | +- ElseClause | | | | | | | | +- T-else | | | | | | | | +- CodeBlock @@ -3406,6 +3449,7 @@ | | | | | | | | | | | | +- PostfixExpression | | | | | | | | | | | | +- PostfixExpression | | | | | | | | | | | | | +- PrimaryExpression +Added line: 540 | | | | | | | | | | | | | +- Identifier | | | | | | | | | | | | | +- T-Identifier | | | | | | | | | | | | +- T-dot @@ -3452,6 +3496,7 @@ | | | | | | +- Declaration | | | | | | +- ConstantDeclaration | | | | | | +- T-let +Added line: 1675 | | | | | | +- PatternInitializerList | | | | | | +- PatternInitializer | | | | | | +- Pattern @@ -3540,6 +3585,7 @@ | | | | | | | +- Expression | | | | | | | +- PrefixExpression | | | | | | | +- PostfixExpression +Added line: 2255 | | | | | | | +- PrimaryExpression | | | | | | | +- Identifier | | | | | | | +- T-Identifier @@ -3656,7 +3702,9 @@ | | | | | +- AttributeName | | | | | +- Identifier | | | | | +- T-Identifier +Added line: 7023 | | | | +- DeclarationModifiers +Added line: 4593 | | | | | +- DeclarationModifier | | | | | +- AccessLevelModifier | | | | | +- T-public @@ -3745,6 +3793,7 @@ | | +- T-rbrace | +- Statement | | +- Expression +Added line: 4823 | | +- PrefixExpression | | +- PostfixExpression | | +- PrimaryExpression @@ -3772,6 +3821,7 @@ | | | | +- PrimaryExpression | | | | +- Keyword | | | | +- T-internal +Added line: 9674 | | | +- Statement | | | | +- Expression | | | | +- PrefixExpression @@ -3780,6 +3830,7 @@ | | | | +- Identifier | | | | +- ContextSensitiveKeyword | | | | +- T-mutating +Added line: 3815 | | | +- Statement | | | | +- Declaration | | | | +- FunctionDeclaration @@ -3830,6 +3881,7 @@ | | | | +- LabelName | | | | | +- Identifier | | | | | +- T-Identifier +Added line: 7364 | | | | +- T-colon | | | +- Statement | | | | +- Expression @@ -3849,6 +3901,7 @@ | | | | +- PrimaryExpression | | | | +- Identifier | | | | +- T-Identifier +Added line: 9196 | | | +- Statement | | | +- Expression | | | +- PrefixExpression @@ -4039,6 +4092,7 @@ +- Error +- Error +- Error +Added line: 7445 +- Error +- Error +- Error @@ -4166,6 +4220,7 @@ +- Error +- Error +- Error +Added line: 6372 +- Error +- Error +- Error @@ -4223,6 +4278,7 @@ +- Error +- Error +- Error +Added line: 4241 +- Error +- Error +- Error @@ -4246,6 +4302,7 @@ +- Error +- Error +- Error +Added line: 9961 +- Error +- Error +- Error @@ -4273,6 +4330,7 @@ +- Error +- Error +- Error +Added line: 7838 +- Error +- Error +- Error @@ -4406,6 +4464,7 @@ +- Error +- Error +- Error +Added line: 6085 +- Error +- Error +- Error @@ -4424,6 +4483,7 @@ +- Error +- Error +- Error +Added line: 9470 +- Error +- Error +- Error @@ -4458,6 +4518,7 @@ +- Error +- Error +- Error +Added line: 5999 +- Error +- Error +- Error @@ -4491,9 +4552,11 @@ +- Error +- Error +- Error +Added line: 193 +- Error +- Error +- Error +Added line: 9487 +- Error +- Error +- Error @@ -4622,6 +4685,7 @@ +- Error +- Error +- Error +Added line: 9216 +- Error +- Error +- Error @@ -4647,6 +4711,7 @@ +- Error +- Error +- Error +Added line: 4722 +- Error +- Error +- Error @@ -4722,6 +4787,7 @@ +- Error +- Error +- Error +Added line: 3579 +- Error +- Error +- Error @@ -4835,6 +4901,7 @@ +- Error +- Error +- Error +Added line: 3505 +- Error +- Error +- Error @@ -5004,6 +5071,7 @@ +- Error +- Error +- Error +Added line: 3669 +- Error +- Error +- Error @@ -5045,6 +5113,7 @@ +- Error +- Error +- Error +Added line: 7797 +- Error +- Error +- Error @@ -5145,6 +5214,7 @@ +- Error +- Error +- Error +Added line: 5139 +- Error +- Error +- Error @@ -5333,6 +5403,7 @@ +- Error +- Error +- Error +Added line: 8400 +- Error +- Error +- Error @@ -5343,6 +5414,8 @@ +- Error +- Error +- Error +Added line: 1120 +Added line: 6827 +- Error +- Error +- Error @@ -5364,6 +5437,7 @@ +- Error +- Error +- Error +Added line: 2991 +- Error +- Error +- Error @@ -5395,6 +5469,7 @@ +- Error +- Error +- Error +Added line: 6058 +- Error +- Error +- Error @@ -5414,6 +5489,7 @@ +- Error +- Error +- Error +Added line: 7841 +- Error +- Error +- Error @@ -5557,6 +5633,7 @@ +- Error +- Error +- Error +Added line: 2823 +- Error +- Error +- Error @@ -5584,6 +5661,7 @@ +- Error +- Error +- Error +Added line: 8338 +- Error +- Error +- Error @@ -5619,6 +5697,7 @@ +- Error +- Error +- Error +Added line: 8754 +- Error +- Error +- Error @@ -5628,6 +5707,7 @@ +- Error +- Error +- Error +Added line: 9900 +- Error +- Error +- Error @@ -5732,6 +5812,7 @@ +- Error +- Error +- Error +Added line: 8251 +- Error +- Error +- Error @@ -5743,6 +5824,7 @@ +- Error +- Error +- Error +Added line: 2094 +- Error +- Error +- Error @@ -5840,6 +5922,7 @@ +- Error +- Error +- Error +Added line: 8742 +- Error +- Error +- Error @@ -5999,6 +6082,7 @@ +- Error +- Error +- Error +Added line: 3197 +- Error +- Error +- Error @@ -6040,6 +6124,7 @@ +- Error +- Error +- Error +Added line: 3977 +- Error +- Error +- Error @@ -6159,6 +6244,7 @@ +- Error +- Error +- Error +Added line: 5245 +- Error +- Error +- Error @@ -6194,6 +6280,7 @@ +- Error +- Error +- Error +Added line: 3674 +- Error +- Error +- Error @@ -6343,6 +6430,7 @@ +- Error +- Error +- Error +Added line: 6476 +- Error +- Error +- Error @@ -6354,6 +6442,7 @@ +- Error +- Error +- Error +Added line: 3330 +- Error +- Error +- Error @@ -6395,6 +6484,7 @@ +- Error +- Error +- Error +Added line: 4340 +- Error +- Error +- Error @@ -6748,6 +6838,7 @@ +- Error +- Error +- Error +Added line: 5689 +- Error +- Error +- Error @@ -6826,12 +6917,14 @@ +- Error +- Error +- Error +Added line: 5045 +- Error +- Error +- Error +- Error +- Error +- Error +Added line: 999 +- Error +- Error +- Error @@ -6969,6 +7062,7 @@ +- Error +- Error +- Error +Added line: 4748 +- Error +- Error +- Error @@ -7019,12 +7113,7 @@ +- Error +- Error +- Error - +- Error - +- Error - +- Error - +- Error - +- Error - +- Error +Added line: 6807 +- Error +- Error +- Error diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/MacroExpansionExpressions.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/MacroExpansionExpressions.txt index 5b152f0ba1..699231b554 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/MacroExpansionExpressions.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/MacroExpansionExpressions.txt @@ -2,29 +2,47 @@ +- Statements | +- Statement | | +- Declaration +Added line: 6527 | | +- ConstantDeclaration | | +- T-let | | +- PatternInitializerList +Added line: 8551 | | +- PatternInitializer - | | +- Pattern +Added line: 1329 | | | +- WildcardPattern - | | | | +- T-underscore +Added line: 6953 +Added line: 420 | | | +- TypeAnnotation +Added line: 542 | | | +- T-colon | | | +- SType | | | +- TupleType +Added line: 4437 | | | +- T-lparen | | | +- TupleTypeElementList | | | | +- TupleTypeElement +Added line: 411 +Added line: 694 | | | | | +- SType +Added line: 5556 +Added line: 9122 | | | | | +- TypeIdentifier +Added line: 2360 +Added line: 7035 | | | | | +- TypeName | | | | | +- Identifier | | | | +- T-comma +Added line: 5944 +Added line: 746 +Added line: 4489 | | | | +- TupleTypeElement | | | | +- SType | | | | +- TypeIdentifier +Added line: 2854 +Added line: 7670 | | | | +- TypeName +Added line: 7310 +Added line: 1205 | | | | +- Identifier | | | | +- T-Identifier | | | +- T-rparen @@ -33,31 +51,51 @@ | | +- Expression | | +- PrefixExpression | | +- PrimaryExpression +Added line: 4637 | | +- MacroExpansionExpression | | +- T-hash | | +- Identifier +Added line: 5506 | | | +- T-Identifier | | +- FunctionCallArgumentClause | | +- T-lparen +Added line: 6001 +Added line: 8371 | | +- FunctionCallArgumentList +Added line: 8989 | | | +- FunctionCallArgument | | | +- Expression +Added line: 2416 +Added line: 4117 | | | +- PrefixExpression | | | | +- PostfixExpression | | | | +- PrimaryExpression +Added line: 6619 +Added line: 1799 | | | | +- Identifier | | | | +- T-Identifier +Added line: 5394 | | | +- BinaryExpression +Added line: 2959 | | | | +- BinaryOperator | | | | | +- Operator +Added line: 5567 +Added line: 2385 | | | | | +- OperatorHead | | | | | +- T-OperatorHead | | | | +- PrefixExpression +Added line: 7560 +Added line: 8094 | | | | +- PostfixExpression +Added line: 8031 +Added line: 670 +Added line: 8746 | | | | +- PrimaryExpression +Added line: 8162 | | | | +- Identifier - | | | | +- T-Identifier +Added line: 7923 | | | +- BinaryExpression +Added line: 9803 | | | +- BinaryOperator | | | | +- Operator | | | | +- OperatorHead @@ -66,55 +104,78 @@ | | | +- PostfixExpression | | | +- PrimaryExpression | | | +- Identifier +Added line: 9324 | | | +- T-Identifier | | +- T-rparen | +- Statement +Added line: 5201 | | +- Declaration | | +- ConstantDeclaration +Added line: 7652 | | +- T-let | | +- PatternInitializerList | | +- PatternInitializer | | +- Pattern | | | +- WildcardPattern | | | | +- T-underscore - | | | +- TypeAnnotation | | | +- T-colon | | | +- SType | | | +- TupleType | | | +- T-lparen +Added line: 6932 | | | +- TupleTypeElementList | | | | +- TupleTypeElement +Added line: 9361 +Added line: 2314 | | | | | +- SType +Added line: 3161 +Added line: 81 | | | | | +- TypeIdentifier +Added line: 5726 +Added line: 404 Added line: 7127 | | | | | +- TypeName | | | | | +- Identifier +Added line: 2910 | | | | | +- T-Identifier | | | | +- T-comma +Added line: 2227 | | | | +- TupleTypeElement | | | | +- SType | | | | +- TypeIdentifier | | | | +- TypeName +Added line: 9443 +Added line: 6130 | | | | +- Identifier | | | | +- T-Identifier +Added line: 9215 | | | +- T-rparen | | +- Initializer | | +- T-eq | | +- Expression +Added line: 4289 | | +- PrefixExpression +Added line: 9334 | | +- PostfixExpression +Added line: 3546 | | +- PrimaryExpression | | +- MacroExpansionExpression +Added line: 2922 | | +- T-hash | | +- Identifier +Added line: 3656 +Added line: 1389 | | | +- T-Identifier | | +- FunctionCallArgumentClause +Added line: 9089 | | +- T-lparen | | +- FunctionCallArgumentList - | | | +- FunctionCallArgument +Added line: 9764 | | | +- Expression | | | +- PrefixExpression | | | +- PostfixExpression +Added line: 3447 +Added line: 9143 | | | +- PrimaryExpression | | | +- MacroExpansionExpression | | | +- T-hash @@ -122,10 +183,16 @@ Added line: 7127 | | | | +- T-Identifier | | | +- FunctionCallArgumentClause | | | +- T-lparen +Added line: 858 +Added line: 920 +Added line: 2399 | | | +- FunctionCallArgumentList +Added line: 8271 | | | | +- FunctionCallArgument | | | | +- Expression Added line: 9586 +Added line: 4886 +Added line: 6825 | | | | +- PrefixExpression Added line: 4596 Added line: 7477 @@ -136,33 +203,43 @@ Added line: 7477 | | | | | +- NumericLiteral | | | | | +- IntegerLiteral | | | | | +- T-DecimalLiteral +Added line: 5815 | | | | +- BinaryExpression | | | | +- BinaryOperator | | | | | +- Operator | | | | | +- OperatorHead +Added line: 3522 | | | | | +- T-OperatorHead | | | | +- PrefixExpression +Added line: 4789 | | | | +- PostfixExpression | | | | +- PrimaryExpression +Added line: 2201 | | | | +- LiteralExpression | | | | +- Literal | | | | +- NumericLiteral | | | | +- IntegerLiteral +Added line: 5145 | | | | +- T-DecimalLiteral | | | +- T-rparen | | +- T-rparen +Added line: 2280 +Added line: 3355 | +- Statement | | +- Declaration | | +- ConstantDeclaration +Added line: 214 | | +- T-let | | +- PatternInitializerList | | +- PatternInitializer +Added line: 7855 | | +- Pattern | | | +- WildcardPattern | | | | +- T-underscore | | | +- TypeAnnotation | | | +- T-colon | | | +- SType +Added line: 2511 Added line: 5854 | | | +- TypeIdentifier | | | +- TypeName @@ -170,6 +247,8 @@ Added line: 5854 | | | +- T-Identifier | | +- Initializer | | +- T-eq +Added line: 9032 +Added line: 9635 | | +- Expression | | +- PrefixExpression | | +- PostfixExpression @@ -179,31 +258,41 @@ Added line: 5854 | +- Statement | | +- Expression | | +- PrefixExpression +Added line: 8971 +Added line: 3366 | | +- PostfixExpression | | +- PrimaryExpression | | +- Identifier | | +- T-Identifier | +- Statement +Added line: 1123 | +- Declaration | +- ConstantDeclaration | +- T-let +Added line: 1085 | +- PatternInitializerList | +- PatternInitializer +Added line: 2951 | +- Pattern | | +- WildcardPattern | | | +- T-underscore | | +- TypeAnnotation | | +- T-colon +Added line: 945 | | +- SType | | +- TypeIdentifier | | +- Identifier +Added line: 9378 | | +- T-Identifier +Added line: 1313 | +- Initializer +Added line: 8287 | +- T-eq | +- Expression | +- PrefixExpression | +- PostfixExpression | +- PrimaryExpression +Added line: 137 | +- Keyword - | +- T-directive-line +- EOF +Added line: 1012 diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/Simple.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/Simple.txt index 86885289da..f9445e578c 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/Simple.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/Simple.txt @@ -1,38 +1,52 @@ +- TopLevel +- Statements +Added line: 4362 +Added line: 4658 +Added line: 1747 | +- Statement | +- Declaration | +- StructDeclaration +Added line: 3615 | +- AccessLevelModifier +Added line: 6789 | | +- T-public | +- T-struct | +- StructName | | +- Identifier +Added line: 2413 | | +- T-Identifier | +- GenericParameterClause | | +- T-lt | | +- GenericParameterList +Added line: 6655 | | | +- GenericParameter | | | | +- TypeName +Added line: 2380 | | | | | +- Identifier | | | | | +- T-Identifier +Added line: 3516 | | | | +- T-colon | | | | +- TypeIdentifier | | | | +- TypeName | | | | +- Identifier +Added line: 2881 | | | | +- T-Identifier | | | +- T-comma | | | +- GenericParameter | | | +- TypeName | | | +- Identifier | | | +- T-Identifier +Added line: 4312 | | +- T-gt | +- StructBody | +- T-lbrace | +- StructMembers | | +- StructMember +Added line: 7893 | | | +- Declaration +Added line: 5355 | | | +- TypealiasDeclaration +Added line: 861 | | | +- TypealiasHead | | | | +- AccessLevelModifier | | | | | +- T-public @@ -43,18 +57,28 @@ | | | +- TypealiasAssignment | | | +- T-eq | | | +- SType +Added line: 9245 +Added line: 4010 | | | +- TupleType +Added line: 2044 | | | +- T-lparen | | | +- TupleTypeElementList | | | | +- TupleTypeElement | | | | | +- SType +Added line: 6113 +Added line: 5826 | | | | | +- TypeIdentifier | | | | | +- TypeName | | | | | +- Identifier +Added line: 5372 +Added line: 6421 | | | | | +- T-Identifier - | | | | +- T-comma | | | | +- TupleTypeElement +Added line: 346 | | | | +- SType +Added line: 9327 +Added line: 497 +Added line: 5743 | | | | +- TypeIdentifier | | | | +- TypeName | | | | +- Identifier @@ -66,6 +90,8 @@ | | | +- TypealiasHead | | | | +- AccessLevelModifier | | | | | +- T-internal +Added line: 3096 +Added line: 486 | | | | +- T-typealias | | | | +- TypealiasName | | | | +- Identifier @@ -84,44 +110,64 @@ | | | | | +- SType | | | | | +- TypeIdentifier | | | | | +- TypeName +Added line: 5097 | | | | | +- Identifier +Added line: 9166 +Added line: 791 | | | | | +- T-Identifier | | | | +- T-comma | | | | +- GenericArgument | | | | +- SType | | | | +- TypeIdentifier | | | | +- TypeName +Added line: 7918 | | | | +- Identifier | | | | +- T-Identifier +Added line: 1381 | | | +- T-gt | | +- StructMember +Added line: 321 | | | +- Declaration | | | +- VariableDeclaration | | | +- VariableDeclarationHead | | | | +- DeclarationModifiers | | | | | +- DeclarationModifier +Added line: 5119 +Added line: 1561 | | | | | +- AccessLevelModifier | | | | | +- T-internal | | | | +- T-var +Added line: 880 | | | +- PatternInitializerList +Added line: 2936 | | | +- PatternInitializer | | | +- Pattern | | | +- IdentifierPattern | | | | +- Identifier | | | | +- T-Identifier +Added line: 3114 +Added line: 6728 | | | +- TypeAnnotation | | | +- T-colon +Added line: 8172 | | | +- SType +Added line: 7068 | | | +- TypeIdentifier | | | +- TypeName +Added line: 8683 | | | +- Identifier | | | +- T-Identifier +Added line: 3038 | | +- StructMember +Added line: 1079 +Added line: 3492 | | | +- Declaration | | | +- InitializerDeclaration | | | +- InitializerHead | | | | +- DeclarationModifiers +Added line: 5232 | | | | | +- DeclarationModifier +Added line: 6398 | | | | | +- AccessLevelModifier | | | | | +- T-internal | | | | +- T-init @@ -136,14 +182,13 @@ | | | | | | +- Identifier | | | | | | +- T-Identifier | | | | | +- TypeAnnotation +Added line: 5335 | | | | | +- T-colon | | | | | +- SType | | | | | +- TypeIdentifier | | | | | +- TypeName - | | | | | +- Identifier - | | | | | +- T-Identifier - | | | | +- T-rparen | | | +- InitializerBody +Added line: 7813 | | | +- CodeBlock | | | +- T-lbrace | | | +- Statements @@ -152,10 +197,12 @@ | | | | | +- PrefixExpression | | | | | +- PostfixExpression | | | | | +- PostfixExpression +Added line: 1752 | | | | | | +- PostfixExpression | | | | | | | +- PrimaryExpression | | | | | | | +- Keyword | | | | | | | +- T-self +Added line: 9082 | | | | | | +- T-dot | | | | | | +- Identifier | | | | | | +- T-Identifier @@ -163,25 +210,37 @@ | | | | | +- Operator | | | | | +- OperatorHead | | | | | +- T-eq +Added line: 8494 +Added line: 7445 | | | | +- Statement | | | | +- Expression +Added line: 99 +Added line: 5146 | | | | +- PrefixExpression | | | | +- PostfixExpression +Added line: 9481 | | | | +- PrimaryExpression | | | | +- Identifier | | | | +- T-Identifier +Added line: 1264 | | | +- T-rbrace +Added line: 2330 +Added line: 2111 | | +- StructMember | | | +- Declaration | | | +- InitializerDeclaration +Added line: 8994 +Added line: 4841 | | | +- InitializerHead | | | | +- DeclarationModifiers | | | | | +- DeclarationModifier | | | | | +- AccessLevelModifier | | | | | +- T-public | | | | +- T-init +Added line: 3559 | | | +- ParameterClause | | | | +- T-lparen +Added line: 9773 | | | | +- ParameterList | | | | | +- Parameter | | | | | +- LocalParameterName @@ -189,37 +248,42 @@ | | | | | | +- T-Identifier | | | | | +- TypeAnnotation | | | | | | +- T-colon - | | | | | | +- SType | | | | | | +- TypeIdentifier | | | | | | +- TypeName +Added line: 2640 | | | | | | +- Identifier | | | | | | +- T-Identifier | | | | | +- DefaultArgumentClause | | | | | +- T-eq +Added line: 6743 | | | | | +- Expression | | | | | +- PrefixExpression - | | | | | +- PostfixExpression +Added line: 8136 | | | | | +- PostfixExpression | | | | | | +- PrimaryExpression | | | | | | +- Identifier | | | | | | +- T-Identifier | | | | | +- T-dot +Added line: 3450 | | | | | +- Identifier +Added line: 1770 | | | | | +- T-Identifier | | | | +- T-rparen | | | +- InitializerBody | | | +- CodeBlock | | | +- T-lbrace | | | +- Statements - | | | | +- Statement | | | | | +- Expression | | | | | +- PrefixExpression +Added line: 4810 | | | | | +- PostfixExpression | | | | | +- PostfixExpression | | | | | | +- PostfixExpression | | | | | | | +- PrimaryExpression | | | | | | | +- Keyword | | | | | | | +- T-self +Added line: 4712 +Added line: 9192 | | | | | | +- T-dot | | | | | | +- Identifier | | | | | | +- T-Identifier @@ -231,14 +295,22 @@ | | | | +- Expression | | | | +- PrefixExpression | | | | +- PostfixExpression +Added line: 6194 +Added line: 9062 | | | | +- PostfixExpression +Added line: 6325 | | | | | +- PrimaryExpression | | | | | +- Identifier | | | | | +- T-Identifier +Added line: 9966 +Added line: 3216 | | | | +- FunctionCallArgumentClause +Added line: 7333 | | | | +- T-lparen | | | | +- FunctionCallArgumentList +Added line: 2557 | | | | | +- FunctionCallArgument +Added line: 9296 | | | | | +- FunctionCallIdentifier | | | | | | +- Identifier | | | | | | +- T-Identifier @@ -250,7 +322,9 @@ | | | | | +- Identifier | | | | | +- T-Identifier | | | | +- T-rparen +Added line: 4249 | | | +- T-rbrace +Added line: 976 | | +- StructMember | | | +- Declaration | | | +- VariableDeclaration @@ -269,26 +343,35 @@ | | | | +- TypeIdentifier | | | | +- TypeName | | | | +- Identifier +Added line: 5080 | | | | +- T-Identifier | | | +- CodeBlock | | | +- T-lbrace +Added line: 9850 +Added line: 9264 | | | +- Statements | | | | +- Statement | | | | +- ControlTransferStatement | | | | +- ReturnStatement | | | | +- T-return +Added line: 1220 | | | | +- Expression | | | | +- PrefixExpression +Added line: 3097 | | | | +- PostfixExpression | | | | +- PostfixExpression | | | | | +- PrimaryExpression +Added line: 6738 | | | | | +- Identifier | | | | | +- T-Identifier | | | | +- T-dot | | | | +- Identifier +Added line: 2833 | | | | +- T-Identifier | | | +- T-rbrace | | +- StructMember +Added line: 901 +Added line: 7792 | | +- Declaration | | +- VariableDeclaration | | +- VariableDeclarationHead @@ -296,8 +379,10 @@ | | | | +- DeclarationModifier | | | | +- AccessLevelModifier | | | | +- T-public - | | | +- T-var +Added line: 6293 +Added line: 9637 | | +- VariableName +Added line: 1114 | | | +- Identifier | | | +- T-Identifier | | +- TypeAnnotation @@ -307,23 +392,27 @@ | | | +- TypeName | | | +- Identifier | | | +- T-Identifier +Added line: 6650 | | +- CodeBlock | | +- T-lbrace +Added line: 3137 | | +- Statements | | | +- Statement | | | +- ControlTransferStatement | | | +- ReturnStatement | | | +- T-return +Added line: 3958 | | | +- Expression | | | +- PrefixExpression | | | +- PostfixExpression - | | | +- PostfixExpression | | | | +- PrimaryExpression +Added line: 2340 | | | | +- Identifier | | | | +- T-Identifier | | | +- T-dot | | | +- Identifier | | | +- T-Identifier +Added line: 1662 | | +- T-rbrace | +- T-rbrace +- EOF diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/Swift5.9.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/Swift5.9.txt index d0f7ec80fe..0ed8352c1b 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/Swift5.9.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/ast/testdata/Swift5.9.txt @@ -1,26 +1,33 @@ +- TopLevel +Added line: 5032 +- Statements | +- Statement | | +- Declaration | | +- ImportDeclaration | | +- T-import +Added line: 9016 +Added line: 3620 | | +- ImportPath | | +- ImportPathIdentifier | | +- Identifier | | +- T-Identifier | +- Statement | | +- Declaration +Added line: 8116 | | +- StructDeclaration | | +- T-struct +Added line: 6827 | | +- StructName | | | +- Identifier | | | +- T-Identifier | | +- TypeInheritanceClause +Added line: 3985 +Added line: 3291 | | | +- T-colon | | | +- TypeInheritanceList | | | +- TypeIdentifier | | | +- TypeName - | | | +- Identifier +Added line: 6765 | | | +- T-Identifier | | +- StructBody | | +- T-lbrace @@ -28,15 +35,19 @@ | | | +- StructMember | | | +- Declaration | | | +- VariableDeclaration +Added line: 121 | | | +- VariableDeclarationHead +Added line: 5890 | | | | +- T-var | | | +- VariableName | | | | +- Identifier | | | | +- T-Identifier | | | +- TypeAnnotation +Added line: 4712 | | | | +- T-colon | | | | +- SType Added line: 8397 +Added line: 1570 | | | | +- T-some | | | | +- SType | | | | +- TypeIdentifier @@ -47,8 +58,10 @@ Added line: 8397 | | | +- Statements | | | | +- Statement | | | | +- Expression +Added line: 4398 | | | | +- PrefixExpression Added line: 5071 +Added line: 2170 | | | | +- PostfixExpression | | | | +- PostfixExpression | | | | | +- PrimaryExpression @@ -64,14 +77,15 @@ Added line: 5071 | | +- PrefixExpression | | +- PostfixExpression | | +- PostfixExpression - | | | +- PrimaryExpression - | | | +- MacroExpansionExpression | | | +- T-hash | | | +- Identifier | | | +- T-Identifier +Added line: 7890 | | +- ClosureExpression | | +- T-lbrace | | +- Statements +Added line: 7941 +Added line: 2401 | | | +- Statement | | | +- Expression | | | +- PrefixExpression @@ -81,33 +95,45 @@ Added line: 5071 | | | | +- Identifier | | | | +- T-Identifier | | | +- FunctionCallArgumentClause - | | | +- T-lparen | | | +- T-rparen | | +- T-rbrace | +- Statement +Added line: 1089 | | +- Declaration +Added line: 6332 | | +- ConstantDeclaration | | +- T-let | | +- PatternInitializerList | | +- PatternInitializer | | +- Pattern +Added line: 6788 +Added line: 855 | | | +- WildcardPattern +Added line: 9202 | | | | +- T-underscore - | | | +- TypeAnnotation +Added line: 3605 | | | +- T-colon | | | +- SType | | | +- TypeIdentifier | | | +- TypeName +Added line: 1132 | | | +- Identifier | | | +- T-Identifier +Added line: 3274 +Added line: 6253 +Added line: 4006 | | +- Initializer Added line: 3867 | | +- T-eq | | +- Expression | | +- PrefixExpression +Added line: 2385 +Added line: 4320 | | +- PostfixExpression | | +- PrimaryExpression | | +- MacroExpansionExpression +Added line: 7302 +Added line: 5398 | | +- T-hash | | +- Identifier | | | +- T-Identifier @@ -116,6 +142,7 @@ Added line: 3867 | | +- FunctionCallArgumentList | | | +- FunctionCallArgument | | | | +- FunctionCallIdentifier +Added line: 1914 | | | | | +- Identifier | | | | | +- T-Identifier | | | | +- T-colon @@ -123,6 +150,7 @@ Added line: 3867 | | | | +- PrefixExpression Added line: 3856 | | | | +- PostfixExpression +Added line: 5212 | | | | +- PrimaryExpression | | | | +- LiteralExpression | | | | +- Literal @@ -130,11 +158,13 @@ Added line: 3856 | | | +- T-comma | | | +- FunctionCallArgument | | | | +- FunctionCallIdentifier - | | | | | +- Identifier | | | | | +- T-Identifier +Added line: 4223 +Added line: 5582 | | | | +- T-colon | | | | +- Expression | | | | +- PrefixExpression +Added line: 2172 | | | | +- PostfixExpression | | | | +- PrimaryExpression | | | | +- LiteralExpression @@ -144,8 +174,10 @@ Added line: 3856 | | | | +- T-DecimalLiteral | | | +- T-comma | | | +- FunctionCallArgument +Added line: 8979 | | | +- FunctionCallIdentifier | | | | +- Identifier +Added line: 3937 | | | | +- T-Identifier | | | +- T-colon | | | +- Expression @@ -154,8 +186,8 @@ Added line: 3856 | | | +- PrimaryExpression | | | +- ImplicitMemberExpression | | | +- T-dot +Added line: 1114 | | | +- Identifier - | | | +- T-Identifier | | +- T-rparen | +- Statement | | +- Expression @@ -165,15 +197,22 @@ Added line: 3856 | | +- Keyword | | +- T-func | +- Statement +Added line: 4188 | | +- Expression +Added line: 7299 +Added line: 684 | | +- PrefixExpression | | +- PostfixExpression +Added line: 3162 | | +- PostfixExpression | | | +- PrimaryExpression +Added line: 6693 +Added line: 283 | | | +- Identifier | | | +- T-Identifier | | +- PostfixOperator | | +- Operator +Added line: 5972 | | +- OperatorHead | | +- T-lt | +- Statement @@ -189,7 +228,9 @@ Added line: 3856 | | +- PostfixExpression | | +- PrimaryExpression | | +- Identifier +Added line: 5106 | | +- T-Identifier +Added line: 2024 | +- Statement | | +- Expression | | +- PrefixExpression @@ -211,30 +252,46 @@ Added line: 3856 | | +- Error | +- Statement | | +- Expression +Added line: 6351 | | +- PrefixExpression | | +- PostfixExpression | | +- PrimaryExpression | | +- Keyword | | +- T-underscore +Added line: 4827 | +- Statement | +- LabeledStatement | +- StatementLabel | | +- LabelName | | | +- Identifier +Added line: 6747 | | | +- ContextSensitiveKeyword | | | +- T-optional | | +- T-colon | +- LoopStatement +Added line: 7300 +Added line: 5154 +Added line: 6245 | +- RepeatWhileStatement +Added line: 1571 | +- T-repeat | +- CodeBlock | | +- Error - | | +- Statements +Added line: 5523 +Added line: 7888 +Added line: 1609 +Added line: 336 | | | +- Statement +Added line: 24 | | | | +- Expression | | | | +- PrefixExpression +Added line: 4011 | | | | +- PostfixExpression | | | | +- PrimaryExpression +Added line: 3454 +Added line: 3463 +Added line: 3690 +Added line: 2385 | | | +- Statement | | | | +- Expression | | | | +- PrefixExpression @@ -243,12 +300,16 @@ Added line: 3856 | | | | +- Error Added line: 9334 | | | +- Statement +Added line: 3021 +Added line: 3295 | | | | +- Expression | | | | +- PrefixExpression | | | | +- PostfixExpression | | | | +- PrimaryExpression | | | | +- Identifier | | | | +- T-Identifier +Added line: 3610 +Added line: 3986 | | | +- Statement | | | +- Expression | | | +- PrefixExpression @@ -264,7 +325,9 @@ Added line: 9334 | +- Operator | +- OperatorHead | +- T-question +Added line: 5844 +- Error +Added line: 7769 +- Error +- Error +- Error @@ -272,10 +335,14 @@ Added line: 9334 +- Error +- Error +- Error +Added line: 1601 +- Error +- Error +- Error +Added line: 2097 +- Error +Added line: 6940 +Added line: 3704 +- Error +- Error +- Error @@ -299,6 +366,7 @@ Added line: 9334 +- Error +- Error +- Error +Added line: 7539 +- Error +- Error +- Error @@ -309,11 +377,17 @@ Added line: 9334 +- Error +- Error +- Error +Added line: 1173 +Added line: 8057 +- Error +- Error +Added line: 6935 +Added line: 4456 +Added line: 6392 +- Error +- Error +- Error +Added line: 2903 +- Error +- Error +- Error @@ -324,7 +398,9 @@ Added line: 9334 +- Error +- Error +- Error +Added line: 1823 +- Error +Added line: 7765 +- Error +- Error +- Error @@ -334,11 +410,17 @@ Added line: 9334 +- Error +- Error +- Error +Added line: 5337 +Added line: 7471 +Added line: 5225 +- Error +- Error +Added line: 658 +Added line: 1536 +- Error +- Error +- Error +Added line: 3703 +- Error +- Error +- Error @@ -349,6 +431,7 @@ Added line: 9334 +- Error +- Error +- Error +Added line: 260 +- Error +- Error +- Error @@ -361,13 +444,17 @@ Added line: 9334 +- Error +- Error +- Error +Added line: 647 +Added line: 6204 +- Error +- Error +- Error +- Error +- Error +- Error +Added line: 9342 +- Error +Added line: 1531 +- Error +- Error +- Error @@ -376,6 +463,8 @@ Added line: 9334 +- Error +- Error +- Error +Added line: 7476 +Added line: 5219 +- Error +- Error +- Error @@ -383,6 +472,6 @@ Added line: 9334 +- Error +- Error +- Error - +- Error +Added line: 2646 +- Error +- Error diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Issue628.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Issue628.txt index a72ac8a4ac..e21308571d 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Issue628.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Issue628.txt @@ -1,8 +1,97 @@ +Added line: 8615 +Added line: 5791 +Added line: 7412 [Image] or [Truncated image[ Bcol Ecol L4 +Added line: 9997 +Added line: 9918 +Added line: 872 +Added line: 8966 +Added line: 5914 +Added line: 9162 +Added line: 1166 [var] 1 4 +Added line: 2366 [str] 5 8 +Added line: 10000 +Added line: 4876 +Added line: 7473 +Added line: 6744 +Added line: 4142 +Added line: 6660 +Added line: 4849 +Added line: 627 +Added line: 3702 +Added line: 7319 +Added line: 2033 +Added line: 2164 +Added line: 8920 +Added line: 1623 +Added line: 9037 +Added line: 2569 +Added line: 7333 +Added line: 2557 +Added line: 7132 +Added line: 8796 +Added line: 6236 +Added line: 884 +Added line: 6776 +Added line: 1033 +Added line: 9962 +Added line: 211 +Added line: 857 [=] 9 10 +Added line: 6352 +Added line: 8856 +Added line: 7885 +Added line: 5967 +Added line: 9219 +Added line: 378 +Added line: 3384 +Added line: 7973 +Added line: 5459 +Added line: 4226 +Added line: 8769 +Added line: 1829 +Added line: 9984 +Added line: 6073 +Added line: 6539 +Added line: 6370 +Added line: 9705 +Added line: 8389 +Added line: 2434 ["Hello Hello Hello Hello Hello Hel[ 11 4405 +Added line: 295 +Added line: 2906 +Added line: 8586 +Added line: 5466 +Added line: 4544 +Added line: 507 +Added line: 768 +Added line: 6137 +Added line: 7037 +Added line: 7783 +Added line: 5410 +Added line: 7350 +Added line: 1524 +Added line: 6160 +Added line: 2045 +Added line: 1013 +Added line: 7532 [;] 4405 4406 +Added line: 3626 +Added line: 5934 +Added line: 90 +Added line: 3465 +Added line: 599 +Added line: 9828 +Added line: 7034 +Added line: 3260 +Added line: 3062 +Added line: 6689 +Added line: 1907 EOF +Added line: 1200 +Added line: 190 +Added line: 8352 +Added line: 6465 diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift4.2.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift4.2.txt index 2a9da5027f..91b3a06c0d 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift4.2.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift4.2.txt @@ -1,110 +1,199 @@ +Added line: 8507 [Image] or [Truncated image[ Bcol Ecol L4 +Added line: 2127 [let] 1 4 +Added line: 1903 +Added line: 3578 [diceRoll] 5 13 [Int] 16 19 +Added line: 2014 [.] 19 20 [random] 20 26 [(] 26 27 - [in] 27 29 [:] 29 30 [1] 31 32 [...] 33 36 [6] 37 38 +Added line: 4991 +Added line: 3540 [)] 38 39 L5 [let] 1 4 +Added line: 7210 [randomUnit] 5 15 [=] 16 17 Added line: 876 [.] 24 25 - [random] 25 31 +Added line: 2872 +Added line: 6091 +Added line: 1849 [(] 31 32 [in] 32 34 [:] 34 35 [0] 36 37 +Added line: 18 Added line: 5342 +Added line: 2859 [..] 38 40 +Added line: 1821 +Added line: 7202 +Added line: 8497 +Added line: 959 [<] 40 41 [1] 42 43 [)] 43 44 +Added line: 9499 +Added line: 6544 L6 +Added line: 9186 [let] 1 4 +Added line: 4805 +Added line: 7867 [randomBool] 5 15 [=] 16 17 +Added line: 9775 +Added line: 8042 +Added line: 1318 [Bool] 18 22 +Added line: 5984 +Added line: 4054 +Added line: 390 +Added line: 6839 [.] 22 23 [random] 23 29 +Added line: 3718 +Added line: 9919 +Added line: 1860 [(] 29 30 [)] 30 31 L9 [public] 1 7 [class] 8 13 +Added line: 8861 +Added line: 2938 [C] 14 15 [{] 16 17 +Added line: 1654 +Added line: 3341 +Added line: 6740 +Added line: 3562 L10 +Added line: 3214 [public] 3 9 [func] 10 14 - [f] 15 16 +Added line: 86 +Added line: 4618 [(] 16 17 +Added line: 8592 +Added line: 4955 +Added line: 5853 [)] 17 18 [{] 19 20 +Added line: 5794 Added line: 3916 [}] 20 21 +Added line: 9037 L11 [}] 1 2 +Added line: 5456 L13 [public] 1 7 +Added line: 7961 [class] 8 13 [Cbis] 14 18 +Added line: 6311 [{] 19 20 L14 [@] 3 4 [usableFromInline] 4 20 +Added line: 3981 +Added line: 1340 [internal] 21 29 +Added line: 9718 [class] 30 35 +Added line: 1721 +Added line: 6793 +Added line: 6991 +Added line: 7620 [D] 36 37 - [{] 38 39 +Added line: 4072 +Added line: 8109 +Added line: 4850 +Added line: 6344 +Added line: 3711 L15 +Added line: 3801 +Added line: 2833 +Added line: 5900 [@] 5 6 +Added line: 8637 [usableFromInline] 6 22 +Added line: 781 +Added line: 4770 Added line: 9656 +Added line: 5764 +Added line: 4716 [internal] 23 31 [func] 32 36 +Added line: 8484 [f] 37 38 +Added line: 2414 +Added line: 1254 [(] 38 39 +Added line: 4823 [)] 39 40 [{] 41 42 +Added line: 8107 [}] 42 43 L17 - [@] 5 6 - [inlinable] 6 15 +Added line: 7292 +Added line: 2129 +Added line: 3539 [internal] 16 24 [func] 25 29 +Added line: 4901 [g] 30 31 +Added line: 6733 [(] 31 32 [)] 32 33 [{] 34 35 [}] 35 36 L18 +Added line: 8198 [}] 3 4 +Added line: 6603 L19 +Added line: 3811 +Added line: 4596 Added line: 8122 +Added line: 3297 +Added line: 4781 [}] 1 2 +Added line: 8626 +Added line: 4794 +Added line: 339 L22 +Added line: 9419 [(] 9 10 +Added line: 487 ["this is incomplete"] 10 30 [)] 30 31 L24 +Added line: 2380 [#if] 1 4 [MY_BUILD_CONFIG] 5 20 [&&] 21 23 [MY_OTHER_BUILD_CONFIG] 24 45 L25 +Added line: 9139 [#error] 3 9 [(] 9 10 +Added line: 9895 ["MY_BUILD_CONFIG and MY_OTHER_BUIL[ 10 72 +Added line: 2846 [)] 72 73 L26 +Added line: 1115 [#endif] 1 7 EOF diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.0.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.0.txt index d2e8583af3..87c3ea42c0 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.0.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.0.txt @@ -1,3 +1,4 @@ +Added line: 2690 [Image] or [Truncated image[ Bcol Ecol L4 [enum] 1 5 @@ -5,22 +6,27 @@ L4 [<] 12 13 [Success] 13 20 [,] 20 21 +Added line: 4732 [Failure] 22 29 [:] 29 30 [Error] 31 36 [>] 36 37 [{] 38 39 +Added line: 3625 L5 [case] 5 9 [success] 10 17 +Added line: 9573 +Added line: 1630 [(] 17 18 [Success] 18 25 - [)] 25 26 +Added line: 4947 L6 - [case] 5 9 [failure] 10 17 +Added line: 8638 [(] 17 18 [Failure] 18 25 +Added line: 9147 [)] 25 26 L7 [}] 1 2 @@ -30,40 +36,58 @@ L10 [{] 15 16 [}] 16 17 L11 +Added line: 4989 [#if] 1 4 +Added line: 7239 [compiler] 5 13 [(] 13 14 [<] 14 15 [5.0] 15 18 +Added line: 995 [)] 18 19 +Added line: 3483 +Added line: 1135 L12 [extension] 1 10 [MyType] 11 17 [:] 18 19 +Added line: 2599 [_ExpressibleByStringInterpolation] 20 53 [{] 54 55 [}] 56 57 +Added line: 8417 L13 [#else] 1 6 L14 [extension] 1 10 +Added line: 7210 +Added line: 8307 [MyType] 11 17 [:] 18 19 [ExpressibleByStringInterpolation] 20 52 [{] 53 54 [}] 55 56 L15 +Added line: 4165 +Added line: 8788 +Added line: 4892 [#endif] 1 7 +Added line: 1001 L18 [func] 1 5 [foo] 6 9 +Added line: 5645 [(] 9 10 +Added line: 49 +Added line: 7775 [_] 10 11 [fn] 12 14 [:] 14 15 [@] 16 17 [autoclosure] 17 28 - [(] 29 30 +Added line: 2324 +Added line: 3119 +Added line: 8055 [)] 30 31 [->] 32 34 [Int] 35 38 @@ -74,62 +98,92 @@ L19 [func] 1 5 [bar] 6 9 [(] 9 10 +Added line: 8541 +Added line: 6654 [_] 10 11 [fn] 12 14 [:] 14 15 [@] 16 17 [autoclosure] 17 28 - [(] 29 30 +Added line: 1508 +Added line: 6918 [)] 30 31 +Added line: 56 +Added line: 9613 [->] 32 34 [Int] 35 38 +Added line: 7380 [)] 38 39 [{] 40 41 L21 +Added line: 7931 +Added line: 4481 [foo] 3 6 [(] 6 7 [fn] 7 9 [(] 9 10 +Added line: 7957 [)] 10 11 [)] 11 12 L22 +Added line: 288 [}] 1 2 +Added line: 704 L25 [@] 1 2 +Added line: 6353 +Added line: 4663 [dynamicCallable] 2 17 L26 [struct] 1 7 [ToyCallable] 8 19 [{] 20 21 +Added line: 2831 L27 [func] 3 7 [dynamicallyCall] 8 23 +Added line: 8378 +Added line: 4621 [(] 23 24 +Added line: 6464 [withArguments] 24 37 +Added line: 7507 [:] 37 38 +Added line: 2849 [\[] 39 40 [Int] 40 43 [\]] 43 44 [)] 44 45 [{] 46 47 +Added line: 7686 [}] 47 48 +Added line: 9627 L28 [func] 3 7 [dynamicallyCall] 8 23 [(] 23 24 +Added line: 8289 [withKeywordArguments] 24 44 +Added line: 1378 [:] 44 45 [KeyValuePairs] 46 59 [<] 59 60 [String] 60 66 +Added line: 1799 [,] 66 67 [Int] 68 71 [>] 71 72 [)] 72 73 +Added line: 8420 [{] 74 75 [}] 75 76 +Added line: 3961 +Added line: 8349 L29 +Added line: 6771 +Added line: 7012 [}] 1 2 +Added line: 5629 L30 [let] 1 4 [toy] 5 8 @@ -138,6 +192,7 @@ L30 [(] 22 23 [)] 23 24 L31 +Added line: 9113 [toy] 1 4 [(] 4 5 [1] 5 6 @@ -147,45 +202,61 @@ L31 [3] 11 12 [)] 12 13 L32 +Added line: 8034 [toy] 1 4 [(] 4 5 [label] 5 10 +Added line: 1948 [:] 10 11 [1] 12 13 [,] 13 14 [2] 15 16 [)] 16 17 +Added line: 2810 +Added line: 5326 L35 [let] 1 4 +Added line: 5751 [id] 5 7 +Added line: 3860 [=] 8 9 [\\] 10 11 - [Int] 11 14 [.] 14 15 - [self] 15 19 L37 [var] 1 4 +Added line: 2429 +Added line: 4950 +Added line: 5580 [x] 5 6 +Added line: 3550 [=] 7 8 [2] 9 10 L38 [print] 1 6 [(] 6 7 [x] 7 8 +Added line: 1598 [\[] 8 9 [keyPath] 9 16 [:] 16 17 [id] 18 20 [\]] 20 21 [)] 21 22 +Added line: 5890 L39 [x] 1 2 +Added line: 2362 [\[] 2 3 [keyPath] 3 10 +Added line: 1497 [:] 10 11 [id] 12 14 [\]] 14 15 +Added line: 2763 +Added line: 6746 [=] 16 17 +Added line: 3536 +Added line: 5750 [3] 18 19 L40 [print] 1 6 @@ -194,45 +265,63 @@ L40 [\[] 8 9 [keyPath] 9 16 [:] 16 17 +Added line: 6650 [id] 18 20 [\]] 20 21 - [)] 21 22 L43 [let] 1 4 [rawString] 5 14 +Added line: 1579 [=] 15 16 +Added line: 2163 [#"Press "Continue" to close this d[ 17 59 +Added line: 2719 L44 [extension] 1 10 [URL] 11 14 [{] 15 16 L45 +Added line: 6896 [func] 5 9 +Added line: 7051 [html] 10 14 +Added line: 3578 +Added line: 5874 [(] 14 15 +Added line: 8797 +Added line: 3808 [withTitle] 15 24 +Added line: 8634 +Added line: 5978 [title] 25 30 [:] 30 31 [String] 32 38 [)] 38 39 [->] 40 42 +Added line: 1341 [String] 43 49 [{] 50 51 L46 [return] 9 15 [##"<a \\href="\\#(absoluteString)"[ 16 65 +Added line: 4614 L47 [}] 5 6 L48 +Added line: 3206 [}] 1 2 L50 [let] 1 4 [rawMultiString] 5 19 +Added line: 9027 [=] 20 21 [###"a\\###"###] 22 35 L51 [let] 1 4 [rawMultiString2] 5 20 +Added line: 3158 [=] 21 22 [###"""a\\###\n""hey""\n"""###] 23 7 EOF +Added line: 7605 +Added line: 2339 diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.1.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.1.txt index 1906e2331d..bd267ea699 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.1.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.1.txt @@ -1,29 +1,36 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 1768 L6 [import] 1 7 [Combine] 8 15 +Added line: 8692 L7 [class] 1 6 [Weather] 7 14 [{] 15 16 +Added line: 9341 +Added line: 7669 L8 +Added line: 1009 [@] 5 6 [Published] 6 15 +Added line: 7320 [var] 16 19 +Added line: 9406 [temperature] 20 31 [:] 31 32 [Double] 33 39 L9 - [init] 5 9 [(] 9 10 - [temperature] 10 21 +Added line: 9329 [:] 21 22 [Double] 23 29 - [)] 29 30 [{] 31 32 +Added line: 2861 L10 [self] 9 13 [.] 13 14 +Added line: 3620 [temperature] 14 25 [=] 26 27 [temperature] 28 39 @@ -32,15 +39,26 @@ L11 L12 [}] 1 2 L14 +Added line: 4558 [let] 1 4 +Added line: 7341 [weather] 5 12 +Added line: 9511 [=] 13 14 +Added line: 4107 +Added line: 3138 +Added line: 5537 [Weather] 15 22 [(] 22 23 - [temperature] 23 34 [:] 34 35 +Added line: 4435 [20] 36 38 +Added line: 7107 +Added line: 7529 +Added line: 4284 +Added line: 2943 [)] 38 39 +Added line: 8450 L15 [let] 1 4 [cancellable] 5 16 @@ -48,6 +66,7 @@ L15 [weather] 19 26 [.] 26 27 [$] 27 28 +Added line: 5493 [temperature] 28 39 L16 [.] 5 6 @@ -55,47 +74,64 @@ L16 [(] 10 11 [)] 11 12 [{] 13 14 +Added line: 3776 L17 [print] 9 14 [(] 15 16 ["Temperature now: \\($0)"] 16 40 [)] 40 41 L18 +Added line: 6793 +Added line: 6892 +Added line: 6706 [}] 1 2 +Added line: 9167 L19 [weather] 1 8 [.] 8 9 [temperature] 9 20 [=] 21 22 +Added line: 4354 [25] 23 25 L26 [func] 1 5 [makeMeACollection] 6 23 +Added line: 7763 +Added line: 689 [(] 23 24 +Added line: 5578 [)] 24 25 [->] 26 28 [some] 29 33 +Added line: 2804 [Collection] 34 44 [{] 45 46 +Added line: 7097 L27 - [return] 3 9 [\[] 10 11 [1] 11 12 [,] 12 13 +Added line: 4335 [2] 14 15 [,] 15 16 +Added line: 9646 [3] 17 18 [\]] 18 19 +Added line: 8244 +Added line: 4566 L28 +Added line: 3895 [}] 1 2 L31 [@] 1 2 +Added line: 7054 [dynamicMemberLookup] 2 21 L32 [struct] 1 7 [Lens] 8 12 [<] 12 13 [T] 13 14 +Added line: 3548 [>] 14 15 [{] 16 17 L33 @@ -103,50 +139,73 @@ L33 [getter:] 7 14 [(] 15 16 [)] 16 17 +Added line: 4121 [->] 18 20 +Added line: 7613 +Added line: 5461 [T] 21 22 +Added line: 6736 L34 [let] 3 6 +Added line: 7251 +Added line: 2015 +Added line: 6179 [setter:] 7 14 [(] 15 16 +Added line: 1636 [T] 16 17 [)] 17 18 [->] 19 21 [Void] 22 26 +Added line: 2993 L36 [var] 3 6 [value] 7 12 [:] 12 13 [T] 14 15 [{] 16 17 +Added line: 9520 L37 [get] 5 8 +Added line: 8187 +Added line: 874 [{] 9 10 +Added line: 4901 L38 [return] 7 13 +Added line: 2461 +Added line: 961 [getter] 14 20 +Added line: 8562 [(] 20 21 [)] 21 22 L39 +Added line: 5928 [}] 5 6 L40 [set] 5 8 [{] 9 10 L41 [setter] 7 13 +Added line: 6603 [(] 13 14 [newValue] 14 22 +Added line: 1513 [)] 22 23 L42 [}] 5 6 L43 [}] 3 4 +Added line: 8880 L45 [subscript] 3 12 [<] 12 13 [U] 13 14 +Added line: 7628 [>] 14 15 +Added line: 1563 [(] 15 16 +Added line: 8113 [dynamicMember] 16 29 [keyPath] 30 37 [:] 37 38 @@ -155,15 +214,20 @@ L45 [T] 55 56 [,] 56 57 [U] 58 59 +Added line: 4241 +Added line: 2341 [>] 59 60 +Added line: 7449 [)] 60 61 [->] 62 64 [Lens] 65 69 [<] 69 70 [U] 70 71 +Added line: 8741 [>] 71 72 [{] 73 74 L46 +Added line: 5801 [return] 5 11 [Lens] 12 16 [<] 16 17 @@ -174,22 +238,26 @@ L47 [getter:] 9 16 [{] 17 18 [self] 19 23 +Added line: 4112 [.] 23 24 [value] 24 29 [\[] 29 30 [keyPath] 30 37 - [:] 37 38 [keyPath] 39 46 [\]] 46 47 +Added line: 2913 [}] 48 49 +Added line: 6269 [,] 49 50 L48 [setter:] 9 16 [{] 17 18 [self] 19 23 +Added line: 8403 [.] 23 24 [value] 24 29 [\[] 29 30 +Added line: 2978 [keyPath] 30 37 [:] 37 38 [keyPath] 39 46 @@ -200,20 +268,27 @@ L48 [)] 54 55 L49 [}] 3 4 +Added line: 9125 L50 [}] 1 2 +Added line: 1693 L53 [struct] 1 7 [Dog] 8 11 +Added line: 4047 [{] 12 13 L54 [var] 3 6 +Added line: 9685 +Added line: 725 [name] 7 11 [=] 12 13 ["Generic dog name"] 14 32 L55 [var] 3 6 [age] 7 10 +Added line: 4301 +Added line: 7865 [=] 11 12 [0] 13 14 L58 @@ -222,7 +297,6 @@ L58 [name] 8 12 [:] 12 13 [String] 14 20 - [=] 21 22 ["Generic dog name"] 23 41 [,] 41 42 [age] 43 46 @@ -244,15 +318,17 @@ L61 [name] 18 22 [:] 22 23 ["Sparky"] 24 32 - [)] 32 33 L65 +Added line: 5233 [enum] 1 5 [Foo] 6 9 [{] 10 11 [case] 12 16 [zero] 17 21 [,] 21 22 +Added line: 8047 [one] 23 26 +Added line: 9399 [}] 27 28 L67 [let] 1 4 @@ -260,31 +336,44 @@ L67 [:] 8 9 [Foo] 10 13 [?] 13 14 +Added line: 4242 [=] 15 16 [.] 17 18 +Added line: 8540 [zero] 18 22 L69 +Added line: 5200 [switch] 1 7 [foo] 8 11 [{] 12 13 +Added line: 4468 L70 +Added line: 8790 [case] 3 7 [.] 8 9 [zero] 9 13 [:] 13 14 [break] 15 20 L71 +Added line: 4787 [case] 3 7 [.] 8 9 +Added line: 838 [one] 9 12 +Added line: 7892 [:] 12 13 [break] 14 19 +Added line: 8272 +Added line: 4834 L72 +Added line: 2415 [case] 3 7 [.] 8 9 [none] 9 13 [:] 13 14 [break] 15 20 +Added line: 4242 L73 [}] 1 2 +Added line: 2462 EOF diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.2.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.2.txt index 2fbbe70f9b..e62d407444 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.2.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.2.txt @@ -1,87 +1,157 @@ - [Image] or [Truncated image[ Bcol Ecol +Added line: 5660 L4 +Added line: 2572 [struct] 1 7 +Added line: 1069 [Adder] 8 13 [{] 14 15 +Added line: 1351 L5 [var] 3 6 +Added line: 8607 [base] 7 11 +Added line: 7484 [:] 11 12 +Added line: 560 [Int] 13 16 L6 [func] 3 7 [callAsFunction] 8 22 [(] 22 23 +Added line: 283 +Added line: 5676 [_] 23 24 +Added line: 7285 [x] 25 26 [:] 26 27 [Int] 28 31 +Added line: 9791 [)] 31 32 [->] 33 35 +Added line: 8361 [Int] 36 39 +Added line: 760 [{] 40 41 L7 +Added line: 7992 [return] 5 11 +Added line: 8584 +Added line: 6167 [x] 12 13 +Added line: 8121 +Added line: 2033 +Added line: 8984 [+] 14 15 [base] 16 20 +Added line: 4100 L8 +Added line: 907 +Added line: 276 +Added line: 7585 [}] 3 4 +Added line: 7795 L9 +Added line: 879 [}] 1 2 L10 [var] 1 4 - [adder] 5 10 [=] 11 12 [Adder] 13 18 [(] 18 19 [base] 19 23 - [:] 23 24 +Added line: 9366 +Added line: 792 +Added line: 3070 +Added line: 6382 [3] 25 26 +Added line: 8799 +Added line: 8117 +Added line: 3068 [)] 26 27 L11 [adder] 1 6 [(] 6 7 [10] 7 9 +Added line: 3136 [)] 9 10 -L14 +Added line: 2983 [struct] 1 7 [User] 8 12 +Added line: 8270 +Added line: 1330 +Added line: 5122 [{] 13 14 L15 +Added line: 9903 +Added line: 1944 [let] 3 6 [email] 7 12 [:] 12 13 [String] 14 20 +Added line: 1828 L16 [let] 3 6 [isAdmin] 7 14 [:] 14 15 [Bool] 16 20 +Added line: 3152 L17 +Added line: 2660 [}] 1 2 L19 +Added line: 5485 [users] 1 6 [.] 6 7 +Added line: 76 +Added line: 2878 +Added line: 2463 [map] 7 10 +Added line: 7911 [(] 10 11 +Added line: 980 +Added line: 2262 +Added line: 8523 [\\] 11 12 +Added line: 9374 +Added line: 6949 +Added line: 863 +Added line: 2228 [.] 12 13 [email] 13 18 [)] 18 19 +Added line: 2707 +Added line: 2445 +Added line: 1955 L22 +Added line: 8450 +Added line: 8412 +Added line: 2732 [struct] 1 7 - [Subscriptable] 8 21 +Added line: 5107 [{] 22 23 L23 +Added line: 8306 +Added line: 2480 [subscript] 3 12 +Added line: 2103 [(] 12 13 +Added line: 7620 +Added line: 9338 [x] 13 14 +Added line: 1227 [:] 14 15 +Added line: 6514 [Int] 16 19 +Added line: 6219 +Added line: 1490 +Added line: 4248 +Added line: 9848 [,] 19 20 +Added line: 7270 [y] 21 22 +Added line: 2231 [:] 22 23 +Added line: 3881 [Int] 24 27 [=] 28 29 [0] 30 31 @@ -90,22 +160,41 @@ L23 L24 [...] 5 8 L25 +Added line: 9691 +Added line: 8966 [}] 3 4 +Added line: 8984 L26 - [}] 1 2 +Added line: 7129 L28 +Added line: 3629 +Added line: 424 +Added line: 6342 +Added line: 8493 +Added line: 6360 [let] 1 4 [s] 5 6 [=] 7 8 - [Subscriptable] 9 22 [(] 22 23 [)] 23 24 +Added line: 8908 +Added line: 6009 +Added line: 1752 L29 +Added line: 9719 [print] 1 6 [(] 6 7 +Added line: 3177 +Added line: 341 +Added line: 8948 +Added line: 7547 [s] 7 8 [\[] 8 9 [0] 9 10 +Added line: 3859 +Added line: 923 +Added line: 2655 [\]] 10 11 [)] 11 12 EOF +Added line: 6954 diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.3.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.3.txt index a44251b7c7..e521b1bcdb 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.3.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.3.txt @@ -1,59 +1,148 @@ [Image] or [Truncated image[ Bcol Ecol -L4 [struct] 1 7 [Container] 8 17 [{] 18 19 +Added line: 3449 L5 [static] 3 9 +Added line: 5777 +Added line: 6734 [let] 10 13 [defaultKey] 14 24 [=] 25 26 +Added line: 6912 +Added line: 1592 +Added line: 9447 +Added line: 8601 [0] 27 28 +Added line: 1315 +Added line: 6064 +Added line: 6913 +Added line: 2681 +Added line: 649 +Added line: 5418 +Added line: 3284 +Added line: 3934 L7 +Added line: 3305 +Added line: 2700 [var] 3 6 +Added line: 4301 +Added line: 3161 +Added line: 6150 [dictionary] 7 17 [=] 18 19 +Added line: 3684 +Added line: 9005 +Added line: 5813 +Added line: 1534 +Added line: 6029 +Added line: 2204 [\[] 20 21 - [defaultKey] 21 31 +Added line: 1724 +Added line: 439 +Added line: 3206 +Added line: 9588 +Added line: 8229 +Added line: 9939 [:] 31 32 [0] 32 33 [\]] 33 34 L9 +Added line: 9013 [mutating] 3 11 +Added line: 7399 +Added line: 4904 [func] 12 16 [incrementValue] 17 31 +Added line: 8330 +Added line: 8248 +Added line: 5956 +Added line: 9446 [(] 31 32 [at] 32 34 +Added line: 3785 +Added line: 2046 +Added line: 5801 +Added line: 5611 [key] 35 38 [:] 38 39 +Added line: 3511 [Int] 40 43 +Added line: 150 +Added line: 8763 [)] 43 44 - [{] 45 46 +Added line: 1099 +Added line: 8489 +Added line: 1017 +Added line: 6338 +Added line: 3248 L10 +Added line: 2633 [let] 5 8 [defaultValue] 9 21 +Added line: 3514 [=] 22 23 +Added line: 6892 [dictionary] 24 34 +Added line: 6393 [\[] 34 35 +Added line: 8123 +Added line: 6813 +Added line: 9571 [Container] 35 44 [.] 44 45 +Added line: 185 [defaultKey] 45 55 [\]] 55 56 +Added line: 3354 +Added line: 3359 +Added line: 9802 [!] 56 57 +Added line: 513 L11 +Added line: 1794 [dictionary] 5 15 [\[] 15 16 [key] 16 19 - [,] 19 20 +Added line: 4143 [default] 21 28 +Added line: 576 [:] 28 29 +Added line: 3811 +Added line: 8044 +Added line: 8558 +Added line: 3637 [defaultValue] 30 42 - [\]] 42 43 - [+] 44 45 +Added line: 4839 +Added line: 7601 +Added line: 4773 +Added line: 7542 [=] 45 46 +Added line: 6518 +Added line: 5229 +Added line: 6460 +Added line: 5886 +Added line: 5832 +Added line: 7041 [1] 47 48 +Added line: 1288 +Added line: 860 +Added line: 3529 +Added line: 2371 +Added line: 6097 +Added line: 6070 +Added line: 3544 +Added line: 8602 +Added line: 2365 +Added line: 7664 L12 [}] 3 4 L13 +Added line: 4252 [}] 1 2 -EOF +Added line: 6793 +Added line: 8061 +Added line: 4391 +Added line: 2327 +Added line: 6660 diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.5.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.5.txt index cb509f828a..45cc96fb4e 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.5.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.5.txt @@ -10,7 +10,9 @@ L5 [)] 10 11 [{] 12 13 [}] 14 15 +Added line: 3801 L6 +Added line: 3364 [}] 1 2 L8 [func] 1 5 @@ -18,6 +20,7 @@ L8 [(] 7 8 [actor] 8 13 [:] 13 14 +Added line: 2422 [isolated] 15 23 [MyActor] 24 31 [)] 31 32 @@ -25,10 +28,13 @@ L8 L9 [actor] 3 8 [.] 8 9 +Added line: 6033 [f] 9 10 +Added line: 7820 [(] 10 11 [)] 11 12 L10 +Added line: 7808 [}] 1 2 L12 [func] 1 5 @@ -41,9 +47,10 @@ L12 [async] 24 29 [{] 30 31 L13 - [g] 3 4 [(] 4 5 [actor] 5 10 +Added line: 4577 +Added line: 7552 [:] 10 11 [actor] 12 17 [)] 17 18 @@ -57,10 +64,12 @@ L14 [)] 23 24 L15 [}] 1 2 +Added line: 8868 L18 [struct] 1 7 [Box] 8 11 [<] 11 12 +Added line: 8417 [T] 12 13 [>] 13 14 [{] 15 16 @@ -68,12 +77,14 @@ L21 [static] 3 9 [func] 10 14 [makeBox] 15 22 - [(] 22 23 +Added line: 5695 +Added line: 7834 [)] 23 24 [->] 25 27 [Self] 28 32 [<] 32 33 [Int] 33 36 +Added line: 5888 [>] 36 37 [{] 38 39 [...] 39 42 @@ -84,6 +95,7 @@ L25 [struct] 1 7 [TraceID] 8 15 [{] 16 17 +Added line: 1859 L26 [@] 3 4 [TaskLocal] 4 13 @@ -92,6 +104,7 @@ L27 [var] 10 13 [current] 14 21 [:] 21 22 +Added line: 1562 [TraceID] 23 30 [?] 30 31 L28 @@ -99,13 +112,14 @@ L28 L30 [func] 1 5 [printTraceID] 6 18 +Added line: 5689 [(] 18 19 [)] 19 20 [{] 21 22 L31 [if] 3 5 +Added line: 1120 [let] 6 9 - [traceID] 10 17 [=] 18 19 [TraceID] 20 27 [.] 27 28 @@ -114,6 +128,9 @@ L31 L32 [print] 5 10 [(] 10 11 +Added line: 7221 +Added line: 5465 +Added line: 4707 ["\\(traceID)"] 11 23 [)] 23 24 L33 @@ -123,12 +140,15 @@ L34 [print] 5 10 [(] 10 11 ["nil"] 11 16 +Added line: 7033 [)] 16 17 L35 +Added line: 5375 [}] 3 4 L36 Added line: 1518 [}] 1 2 +Added line: 444 L38 [func] 1 5 [run] 6 9 @@ -143,6 +163,7 @@ L39 L40 [TraceID] 3 10 [.] 10 11 +Added line: 4382 [$] 11 12 [current] 12 19 [.] 19 20 @@ -152,6 +173,7 @@ L40 [)] 41 42 [{] 43 44 L41 +Added line: 6537 [printTraceID] 5 17 [(] 17 18 [)] 18 19 @@ -169,13 +191,18 @@ L45 [}] 1 2 L47 Added line: 7099 +Added line: 8247 [func] 1 5 [inner] 6 11 +Added line: 9203 [(] 11 12 +Added line: 6995 +Added line: 7791 [)] 12 13 [{] 14 15 L50 [(] 15 16 +Added line: 8044 [)] 16 17 L51 [}] 1 2 @@ -209,34 +236,44 @@ L62 [func] 16 20 [queryDB] 21 28 [(] 28 29 +Added line: 5136 [query] 29 34 [:] 34 35 +Added line: 226 [Query] 36 41 [)] 41 42 +Added line: 854 [throws] 43 49 [->] 50 52 [QueryResult] 53 64 L64 [func] 1 5 [runQuery] 6 14 +Added line: 7887 [(] 14 15 +Added line: 7475 Added line: 4882 [queryString] 15 26 +Added line: 513 [:] 26 27 [String] 28 34 +Added line: 1385 [)] 34 35 [async] 36 41 [throws] 42 48 +Added line: 9290 [->] 49 51 [QueryResult] 52 63 +Added line: 7498 [{] 64 65 L65 +Added line: 952 [let] 3 6 [query] 7 12 [=] 13 14 [try] 15 18 - [Query] 19 24 [(] 24 25 +Added line: 7041 [parsing] 25 32 [:] 32 33 [queryString] 34 45 @@ -246,13 +283,16 @@ L66 [try] 10 13 [await] 14 19 [queryDB] 20 27 +Added line: 8431 [(] 27 28 [query] 28 33 [:] 33 34 [query] 35 40 [)] 40 41 +Added line: 9227 L67 [}] 1 2 +Added line: 6014 L70 [actor] 1 6 [Account] 7 14 @@ -261,9 +301,11 @@ L70 [{] 25 26 L71 [let] 3 6 +Added line: 51 [idNumber] 7 15 - [:] 15 16 +Added line: 311 [Int] 17 20 +Added line: 3696 L72 [var] 3 6 [balance] 7 14 @@ -281,6 +323,7 @@ L74 [Hasher] 44 50 [{] 52 53 L75 +Added line: 6193 [hasher] 5 11 [.] 11 12 [combine] 12 19 @@ -306,9 +349,12 @@ L81 L82 [}] 1 2 L84 +Added line: 2902 +Added line: 9586 [struct] 1 7 [MyStruct] 8 16 [{] 17 18 +Added line: 8233 L85 [subscript] 3 12 [(] 12 13 @@ -319,7 +365,9 @@ L85 [Type] 24 28 [)] 28 29 [->] 30 32 +Added line: 8973 [Int] 33 36 +Added line: 9450 [{] 37 38 [get] 39 42 [{] 43 44 @@ -329,17 +377,21 @@ L85 L86 [}] 1 2 L88 +Added line: 7344 [func] 1 5 [test] 6 10 [(] 10 11 [obj] 11 14 - [:] 14 15 +Added line: 8568 [MyStruct] 16 24 [)] 24 25 +Added line: 764 [{] 26 27 L89 +Added line: 9203 [let] 3 6 [_] 7 8 +Added line: 6713 [=] 9 10 Added line: 5948 [obj] 11 14 @@ -347,21 +399,28 @@ Added line: 5948 [MyValue] 15 22 [\]] 22 23 L90 +Added line: 487 [}] 1 2 L93 [class] 1 6 [BankAccount] 7 18 +Added line: 8669 [:] 18 19 [FinancialAccount] 20 36 +Added line: 9497 [{] 37 38 +Added line: 5655 L94 +Added line: 9431 [var] 3 6 +Added line: 1067 [manager] 7 14 [:] 14 15 [AccountManager] 16 30 [?] 30 31 L96 [var] 3 6 +Added line: 648 [lastTransaction] 7 22 [:] 22 23 [Transaction] 24 35 @@ -378,12 +437,15 @@ L98 [=] 22 23 [nil] 24 27 [else] 28 32 +Added line: 4365 [{] 33 34 [throw] 35 40 [BankError] 41 50 [.] 50 51 [notInYourFavor] 51 65 +Added line: 7312 [}] 66 67 +Added line: 9376 L99 [return] 7 13 [await] 14 19 @@ -392,6 +454,8 @@ L99 [.] 28 29 [getLastTransaction] 29 47 [(] 47 48 +Added line: 6475 +Added line: 6161 [)] 48 49 L100 [}] 5 6 @@ -400,8 +464,11 @@ L101 L103 [subscript] 3 12 [(] 12 13 +Added line: 6099 [_] 13 14 [day] 15 18 +Added line: 6261 +Added line: 7893 [:] 18 19 [Date] 20 24 [)] 24 25 @@ -409,6 +476,7 @@ L103 [\[] 29 30 [Transaction] 30 41 [\]] 41 42 +Added line: 8430 [{] 43 44 L104 [get] 5 8 @@ -432,6 +500,8 @@ L105 [\]] 61 62 L106 [}] 5 6 +Added line: 5664 +Added line: 1948 L107 [}] 3 4 L108 @@ -447,22 +517,25 @@ L112 [var] 3 6 [lastTransaction] 7 22 [:] 22 23 +Added line: 7317 [T] 24 25 - [{] 26 27 [get] 28 31 [async] 32 37 [throws] 38 44 [}] 45 46 L113 [subscript] 3 12 +Added line: 8714 [(] 12 13 [_] 13 14 [day] 15 18 [:] 18 19 [Date] 20 24 +Added line: 2111 [)] 24 25 [->] 26 28 [\[] 29 30 +Added line: 7374 [T] 30 31 [\]] 31 32 [{] 33 34 @@ -486,6 +559,7 @@ L117 [)] 45 46 [async] 47 52 [->] 53 55 +Added line: 5941 [Bool] 56 60 [{] 61 62 L118 @@ -512,8 +586,10 @@ L124 [day] 24 27 [:] 27 28 [Date] 29 33 +Added line: 9629 [,] 33 34 [from] 35 39 +Added line: 7594 [acct] 40 44 [:] 44 45 [BankAccount] 46 57 @@ -521,14 +597,17 @@ L124 [async] 59 64 [->] 65 67 [Bool] 68 72 +Added line: 4495 [{] 73 74 L125 [return] 3 9 [await] 10 15 [!] 16 17 +Added line: 1747 [acct] 17 21 [\[] 21 22 [day] 22 25 +Added line: 6762 [\]] 25 26 [.] 26 27 [allSatisfy] 27 37 @@ -537,6 +616,7 @@ L125 [.] 42 43 [amount] 43 49 [>=] 50 52 +Added line: 8172 [Amount] 53 59 [.] 59 60 [zero] 60 64 @@ -544,12 +624,14 @@ L125 L127 [}] 1 2 L131 +Added line: 9075 [actor] 1 6 [Counter] 7 14 - [{] 15 16 L132 [var] 3 6 [value] 7 12 +Added line: 9303 +Added line: 9995 [=] 13 14 [0] 15 16 L134 @@ -557,8 +639,11 @@ L134 [increment] 8 17 [(] 17 18 [)] 18 19 +Added line: 4902 [{] 20 21 +Added line: 7491 L135 +Added line: 8883 [value] 5 10 [=] 11 12 [value] 13 18 @@ -570,26 +655,30 @@ L137 [}] 1 2 L139 [func] 1 5 +Added line: 7891 [useCounter] 6 16 [(] 16 17 [counter] 17 24 [:] 24 25 [Counter] 26 33 +Added line: 258 [)] 33 34 [async] 35 40 +Added line: 8335 [{] 41 42 L140 [print] 3 8 [(] 8 9 [await] 9 14 [counter] 15 22 - [.] 22 23 [value] 23 28 +Added line: 5261 [)] 28 29 L141 [await] 3 8 [counter] 9 16 [.] 16 17 +Added line: 158 [increment] 17 26 [(] 26 27 [)] 27 28 diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.6.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.6.txt index 02331d552b..614906c766 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.6.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.6.txt @@ -1,39 +1,128 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 525 +Added line: 7966 L4 +Added line: 7745 [let] 1 4 [dict] 5 9 +Added line: 6325 [:] 9 10 +Added line: 403 +Added line: 9318 [\[] 11 12 +Added line: 4490 +Added line: 4414 +Added line: 9420 +Added line: 2965 [_] 12 13 +Added line: 7279 +Added line: 7504 [:] 13 14 [String] 15 21 +Added line: 5883 [\]] 21 22 +Added line: 2005 +Added line: 2803 +Added line: 3921 +Added line: 4255 [=] 23 24 +Added line: 4999 [\[] 25 26 +Added line: 8616 +Added line: 4679 +Added line: 1695 +Added line: 7258 +Added line: 6102 +Added line: 6639 [0] 26 27 +Added line: 9192 +Added line: 9643 +Added line: 6810 [:] 27 28 +Added line: 1221 +Added line: 3456 +Added line: 5263 +Added line: 7544 +Added line: 5121 +Added line: 7452 +Added line: 8166 +Added line: 28 ["zero"] 29 35 +Added line: 9370 +Added line: 9323 +Added line: 3134 [,] 35 36 +Added line: 2842 +Added line: 4666 +Added line: 9099 [1] 37 38 +Added line: 6310 +Added line: 2290 +Added line: 4796 [:] 38 39 ["one"] 40 45 [,] 45 46 +Added line: 2627 [2] 47 48 [:] 48 49 ["two"] 50 55 [\]] 55 56 +Added line: 8884 +Added line: 1592 +Added line: 2038 L7 +Added line: 3912 +Added line: 2865 [if] 1 3 [#unavailable] 4 16 +Added line: 8946 +Added line: 7125 +Added line: 8852 +Added line: 3444 +Added line: 1216 +Added line: 620 +Added line: 4924 +Added line: 4902 +Added line: 3 +Added line: 2390 [(] 16 17 +Added line: 8530 [iOS] 17 20 +Added line: 753 +Added line: 561 +Added line: 7940 +Added line: 9697 +Added line: 9112 +Added line: 2540 +Added line: 8803 +Added line: 5058 +Added line: 7227 [15.0] 21 25 [)] 25 26 [{] 27 28 +Added line: 2297 +Added line: 316 +Added line: 3294 L9 - [}] 1 2 +Added line: 2010 +Added line: 8622 +Added line: 1218 +Added line: 7884 +Added line: 5064 +Added line: 6016 +Added line: 8679 [else] 3 7 [{] 8 9 +Added line: 8498 +Added line: 7835 L11 [}] 1 2 +Added line: 1201 +Added line: 68 +Added line: 3279 +Added line: 3669 EOF +Added line: 12 +Added line: 6811 +Added line: 8641 +Added line: 2933 diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.9.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.9.txt index ce130a0f84..3da7689ae1 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.9.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/Swift5.9.txt @@ -1,19 +1,28 @@ [Image] or [Truncated image[ Bcol Ecol +Added line: 6303 L1 [import] 1 7 [SwiftUI] 8 15 L3 [struct] 1 7 +Added line: 6655 [ContentView] 8 19 [:] 19 20 [View] 21 25 +Added line: 2772 +Added line: 6138 [{] 26 27 +Added line: 7241 +Added line: 8212 L4 [var] 5 8 [body] 9 13 [:] 13 14 +Added line: 1416 [some] 15 19 +Added line: 24 [View] 20 24 +Added line: 5916 [{] 25 26 L5 [TabBarView] 9 19 @@ -25,12 +34,20 @@ L7 [}] 1 2 L9 [#] 1 2 +Added line: 3665 [Preview] 2 9 +Added line: 9174 [{] 10 11 +Added line: 2774 L10 +Added line: 8496 +Added line: 3378 +Added line: 3199 [ContentView] 5 16 [(] 16 17 +Added line: 8854 [)] 17 18 +Added line: 6758 L11 [}] 1 2 L14 @@ -39,11 +56,14 @@ L14 [:] 6 7 [Font] 8 12 [=] 13 14 +Added line: 5712 [#] 15 16 [fontLiteral] 16 27 +Added line: 684 [(] 27 28 [name] 28 32 [:] 32 33 +Added line: 8684 ["SF Mono"] 34 43 [,] 43 44 [size] 45 49 @@ -51,47 +71,65 @@ L14 [14] 51 53 [,] 53 54 [weight] 55 61 +Added line: 6228 [:] 61 62 - [.] 63 64 [regular] 64 71 - [)] 71 72 L17 [func] 1 5 +Added line: 9255 +Added line: 7822 [all] 6 9 [<] 9 10 [each] 10 14 [Wrapped] 15 22 [>] 22 23 [(] 23 24 +Added line: 2807 +Added line: 1583 +Added line: 3226 [_] 24 25 [optional] 26 34 [:] 34 35 [repeat] 36 42 [(] 43 44 +Added line: 613 [each] 44 48 +Added line: 2554 [Wrapped] 49 56 [)] 56 57 [?] 57 58 +Added line: 6578 [)] 58 59 - [->] 60 62 +Added line: 1112 [(] 63 64 [repeat] 64 70 +Added line: 1671 [each] 71 75 [Wrapped] 76 83 [)] 83 84 [?] 84 85 +Added line: 1706 +Added line: 231 L19 [func] 1 5 +Added line: 486 +Added line: 9027 [useAll] 6 12 [(] 12 13 [)] 13 14 +Added line: 3135 [{] 15 16 L20 [if] 5 7 +Added line: 2929 +Added line: 8770 [let] 8 11 [(] 12 13 [int] 13 16 +Added line: 8023 [,] 16 17 +Added line: 3116 +Added line: 613 [double] 18 24 [,] 24 25 [string] 26 32 @@ -100,80 +138,108 @@ L20 [)] 38 39 [=] 40 41 [all] 42 45 +Added line: 7573 +Added line: 6916 [(] 45 46 +Added line: 5312 [optionalInt] 46 57 [,] 57 58 +Added line: 4830 [optionalDouble] 59 73 [,] 73 74 +Added line: 2976 +Added line: 5128 [optionalString] 75 89 [,] 89 90 [optionalBool] 91 103 [)] 103 104 [{] 105 106 L21 +Added line: 1438 [print] 9 14 +Added line: 4701 +Added line: 9600 [(] 14 15 [int] 15 18 [,] 18 19 [double] 20 26 [,] 26 27 - [string] 28 34 [,] 34 35 [bool] 36 40 [)] 40 41 L22 +Added line: 5607 [}] 5 6 L23 [else] 5 9 [{] 10 11 +Added line: 686 L24 [print] 9 14 [(] 14 15 ["got a nil"] 15 26 [)] 26 27 +Added line: 3040 L25 +Added line: 3445 [}] 5 6 L26 [}] 1 2 L29 [statusBar] 1 10 [.] 10 11 +Added line: 4769 [text] 11 15 [=] 16 17 [if] 18 20 [!] 21 22 - [hasConnection] 22 35 [{] 36 37 ["Disconnected"] 38 52 [}] 53 54 +Added line: 5317 L30 [else] 18 22 [if] 23 25 +Added line: 7631 [let] 26 29 [error] 30 35 [=] 36 37 [lastError] 38 47 [{] 48 49 +Added line: 8352 +Added line: 3493 +Added line: 889 +Added line: 4347 [error] 50 55 +Added line: 8637 [.] 55 56 - [localizedDescription] 56 76 +Added line: 3894 [}] 77 78 L31 [else] 18 22 [{] 23 24 ["Ready"] 25 32 +Added line: 930 [}] 33 34 L34 +Added line: 9334 [@] 1 2 +Added line: 9041 [attached] 2 10 +Added line: 7186 +Added line: 1991 [(] 10 11 [member] 11 17 +Added line: 9367 +Added line: 6210 +Added line: 9074 [)] 17 18 L35 [@] 1 2 [attached] 2 10 [(] 10 11 [conformance] 11 22 +Added line: 9278 [)] 22 23 L36 [public] 1 7 @@ -183,29 +249,48 @@ L36 [RawType] 24 31 [>] 31 32 [(] 32 33 +Added line: 6727 [)] 33 34 +Added line: 3491 [=] 35 36 +Added line: 4547 +Added line: 8574 [#] 37 38 [externalMacro] 38 51 [(] 51 52 [module] 52 58 [:] 58 59 ["SwiftMacros"] 60 73 +Added line: 3471 [,] 73 74 [type] 75 79 [:] 79 80 ["OptionSetMacro"] 81 97 +Added line: 2172 [)] 97 98 L38 +Added line: 7360 [import] 1 7 [SwiftUI] 8 15 -L40 [#] 1 2 +Added line: 7363 [Preview] 2 9 +Added line: 3495 +Added line: 3400 +Added line: 822 +Added line: 3473 +Added line: 2354 [{] 10 11 +Added line: 6054 L41 [Text] 5 9 +Added line: 8758 +Added line: 1480 +Added line: 6456 +Added line: 2580 +Added line: 976 [(] 9 10 +Added line: 832 [)] 10 11 L42 [.] 5 6 @@ -213,5 +298,9 @@ L42 [(] 13 14 [)] 14 15 L43 +Added line: 4894 [}] 1 2 +Added line: 8453 +Added line: 4197 EOF +Added line: 8757 diff --git a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/tabWidth.txt b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/tabWidth.txt index d579a252d0..ad6081707a 100644 --- a/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/tabWidth.txt +++ b/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/cpd/testdata/tabWidth.txt @@ -1,115 +1,204 @@ +Added line: 6102 [Image] or [Truncated image[ Bcol Ecol L4 [struct] 1 7 [Adder] 8 13 Added line: 1294 +Added line: 242 [{] 14 15 +Added line: 2290 [var] 2 5 +Added line: 1927 +Added line: 8445 +Added line: 8306 [base] 6 10 +Added line: 1531 +Added line: 5997 [:] 10 11 [Int] 12 15 +Added line: 8167 L6 +Added line: 8814 +Added line: 3524 Added line: 4100 [func] 2 6 +Added line: 2258 [callAsFunction] 7 21 [(] 21 22 [_] 22 23 +Added line: 8235 [x] 24 25 +Added line: 3491 [:] 25 26 +Added line: 8394 +Added line: 7301 [Int] 27 30 [)] 30 31 Added line: 7601 +Added line: 4361 +Added line: 5318 +Added line: 2310 +Added line: 2235 [->] 32 34 +Added line: 6017 [Int] 35 38 L7 [return] 3 9 +Added line: 2436 [x] 10 11 [+] 12 13 +Added line: 8433 [base] 14 18 L8 +Added line: 9306 +Added line: 325 +Added line: 2849 [}] 2 3 L9 +Added line: 7125 +Added line: 2869 [}] 1 2 L10 +Added line: 661 [var] 1 4 [adder] 5 10 +Added line: 114 [=] 11 12 [Adder] 13 18 +Added line: 242 [(] 18 19 +Added line: 9693 +Added line: 3943 [base] 19 23 [:] 23 24 +Added line: 4779 [3] 25 26 [)] 26 27 L11 [adder] 1 6 - [(] 6 7 Added line: 327 [10] 7 9 +Added line: 7591 +Added line: 2886 +Added line: 7359 [)] 9 10 +Added line: 1484 +Added line: 6317 +Added line: 9600 Added line: 7892 +Added line: 7168 L14 [struct] 1 7 [User] 8 12 +Added line: 8036 [{] 13 14 L15 +Added line: 987 +Added line: 5369 +Added line: 6802 +Added line: 285 +Added line: 4482 +Added line: 1479 Added line: 4953 [let] 2 5 [email] 6 11 +Added line: 1063 [:] 11 12 +Added line: 2474 +Added line: 5045 +Added line: 1190 [String] 13 19 L16 [let] 2 5 +Added line: 8641 +Added line: 1290 +Added line: 8791 Added line: 797 [isAdmin] 6 13 +Added line: 9052 [:] 13 14 +Added line: 1118 +Added line: 8156 [Bool] 15 19 -L17 +Added line: 1568 +Added line: 8101 +Added line: 102 +Added line: 4682 [}] 1 2 L19 +Added line: 5135 [users] 1 6 [.] 6 7 +Added line: 7629 +Added line: 4512 [map] 7 10 +Added line: 1671 +Added line: 3857 Added line: 3270 [(] 10 11 [\\] 11 12 [.] 12 13 [)] 18 19 +Added line: 1751 +Added line: 5489 L22 [struct] 1 7 [Subscriptable] 8 21 [{] 22 23 +Added line: 7121 +Added line: 2006 +Added line: 6775 [subscript] 2 11 [(] 11 12 +Added line: 3580 [x] 12 13 [:] 13 14 [Int] 15 18 +Added line: 3883 +Added line: 7813 +Added line: 8779 [,] 18 19 [:] 21 22 +Added line: 1303 [Int] 23 26 - [=] 27 28 [0] 29 30 [)] 30 31 +Added line: 8752 +Added line: 1203 Added line: 6935 - [{] 32 33 +Added line: 1522 L24 +Added line: 7879 +Added line: 1370 +Added line: 5204 [...] 3 6 +Added line: 487 +Added line: 3460 L25 [}] 2 3 +Added line: 7084 L26 [}] 1 2 -L28 +Added line: 491 +Added line: 9921 [let] 1 4 +Added line: 615 [s] 5 6 +Added line: 2223 [=] 7 8 [Subscriptable] 9 22 +Added line: 7849 [(] 22 23 [)] 23 24 L29 +Added line: 4212 Added line: 4295 [print] 1 6 [(] 6 7 [\[] 8 9 +Added line: 7952 [0] 9 10 - [\]] 10 11 +Added line: 2750 +Added line: 5353 [)] 11 12 EOF diff --git a/pmd-tsql/src/test/resources/net/sourceforge/pmd/lang/tsql/cpd/testdata/MailJobTimeLine.txt b/pmd-tsql/src/test/resources/net/sourceforge/pmd/lang/tsql/cpd/testdata/MailJobTimeLine.txt index e892501384..553d775f04 100644 --- a/pmd-tsql/src/test/resources/net/sourceforge/pmd/lang/tsql/cpd/testdata/MailJobTimeLine.txt +++ b/pmd-tsql/src/test/resources/net/sourceforge/pmd/lang/tsql/cpd/testdata/MailJobTimeLine.txt @@ -8,6 +8,7 @@ L17 [@STARTDATE] 9 19 [DATETIME] 20 28 L18 +Added line: 6480 [DECLARE] 1 8 [@ENDDATE] 9 17 [DATETIME] 18 26 @@ -25,6 +26,7 @@ L20 L21 [DECLARE] 1 8 [@DAYSPAST] 9 18 +Added line: 5149 [INT] 19 22 L22 [DECLARE] 1 8 @@ -80,12 +82,14 @@ L56 [SET] 1 4 [@ENDDATE] 5 13 [=] 14 15 +Added line: 5283 [GETDATE] 16 23 [(] 23 24 [)] 24 25 L64 [DECLARE] 1 8 [@TEXT_SUCCESS] 9 22 +Added line: 6501 [VARCHAR] 23 30 [(] 30 31 [20] 31 33 @@ -123,6 +127,8 @@ L80 [DECLARE] 1 8 [@COLOR_RETRY] 9 21 [VARCHAR] 22 29 +Added line: 9620 +Added line: 7835 [(] 29 30 [10] 30 32 [)] 32 33 @@ -133,6 +139,7 @@ L81 ['#FFDC00'] 20 29 L83 [DECLARE] 1 8 +Added line: 8077 [@COLOR_ABORTED] 9 23 [VARCHAR] 24 31 [(] 31 32 @@ -183,6 +190,7 @@ L102 [IF] 1 3 [OBJECT_ID] 4 13 [(] 13 14 +Added line: 5012 ['tempdb..#JobExecutionTimes'] 14 42 [)] 42 43 [IS] 44 46 @@ -191,6 +199,7 @@ L102 L103 [DROP] 4 8 [TABLE] 9 14 +Added line: 4363 [#JOBEXECUTIONTIMES] 15 33 [;] 33 34 L105 @@ -204,6 +213,7 @@ L105 [NULL] 48 52 L106 [DROP] 4 8 +Added line: 3779 [TABLE] 9 14 [##TIMELINEGRAPH] 15 30 [;] 30 31 @@ -222,6 +232,7 @@ L116 [1] 24 25 [)] 25 26 L117 +Added line: 8952 [NOT] 12 15 [NULL] 16 20 L118 @@ -249,6 +260,7 @@ L132 [SELECT] 11 17 [JOB] 19 22 [.] 22 23 +Added line: 8885 [NAME] 23 27 [AS] 28 30 [JOBNAME] 31 38 @@ -263,6 +275,7 @@ L134 [,] 18 19 [CONVERT] 19 26 [(] 26 27 +Added line: 5809 [DATETIME] 27 35 [,] 35 36 [CONVERT] 37 44 @@ -288,6 +301,7 @@ L135 [(] 32 33 [RIGHT] 33 38 [(] 38 39 +Added line: 4832 ['000000'] 39 47 L136 [+] 39 40 @@ -332,6 +346,7 @@ L138 [S] 27 28 [,] 28 29 L139 +Added line: 5941 [(] 27 28 [(] 28 29 [HIS] 29 32 @@ -379,6 +394,7 @@ L142 [(] 57 58 [8] 58 59 [)] 59 60 +Added line: 6721 [,] 60 61 [HIS] 62 65 [.] 65 66 @@ -387,6 +403,7 @@ L142 [112] 76 79 [)] 79 80 L143 +Added line: 6958 [+] 27 28 [' '] 29 32 [+] 33 34 @@ -450,7 +467,9 @@ L148 [WHEN] 24 28 [HIS] 29 32 [.] 32 33 +Added line: 9714 [RUN_STATUS] 33 43 +Added line: 9484 [=] 44 45 [0] 46 47 [THEN] 48 52 @@ -462,6 +481,7 @@ L149 [RUN_STATUS] 33 43 [=] 44 45 [1] 46 47 +Added line: 8982 [THEN] 48 52 [@COLOR_SUCCESS] 53 67 L150 @@ -496,6 +516,7 @@ L154 [HIS] 29 32 [.] 32 33 [RUN_STATUS] 33 43 +Added line: 3808 [=] 44 45 [0] 46 47 [THEN] 48 52 @@ -503,12 +524,14 @@ L154 [.] 56 57 [MESSAGE] 57 64 L155 +Added line: 2209 [WHEN] 24 28 [HIS] 29 32 [.] 32 33 [RUN_STATUS] 33 43 [=] 44 45 [1] 46 47 +Added line: 6713 [THEN] 48 52 [@TEXT_SUCCESS] 53 66 L156 @@ -528,8 +551,10 @@ L157 [.] 32 33 [RUN_STATUS] 33 43 [=] 44 45 +Added line: 8411 [3] 46 47 [THEN] 48 52 +Added line: 3867 [HIS] 53 56 [.] 56 57 [MESSAGE] 57 64 @@ -539,6 +564,7 @@ L158 [.] 32 33 [MESSAGE] 33 40 L159 +Added line: 2690 [END] 19 22 [AS] 23 25 [JOBMESSAGE] 26 36 @@ -563,6 +589,7 @@ L162 [HIS] 47 50 [ON] 51 53 [HIS] 54 57 +Added line: 9223 [.] 57 58 [JOB_ID] 58 64 [=] 65 66 @@ -578,7 +605,9 @@ L163 [.] 30 31 [SYSCATEGORIES] 31 44 [AS] 45 47 +Added line: 9555 [CAT] 48 51 +Added line: 9822 [ON] 52 54 [CAT] 55 58 [.] 58 59 @@ -642,6 +671,7 @@ L167 [':'] 39 42 [)] 42 43 [,] 43 44 +Added line: 4478 [3] 45 46 [,] 46 47 [0] 48 49 @@ -672,14 +702,15 @@ L171 [.] 28 29 [RUN_DURATION] 29 41 [/] 42 43 - [10000] 44 49 [)] 49 50 [%] 51 52 [100] 53 56 [*] 57 58 [3600] 59 63 +Added line: 6098 [)] 63 64 L172 +Added line: 9724 [+] 19 20 [(] 21 22 [(] 22 23 @@ -780,7 +811,6 @@ L187 [.] 32 33 [RUN_STATUS] 33 43 [=] 44 45 - [3] 46 47 [THEN] 48 52 [@COLOR_ABORTED] 53 67 L188 @@ -834,6 +864,7 @@ L193 [MESSAGE] 57 64 L194 [WHEN] 24 28 +Added line: 8306 [HIS] 29 32 [.] 32 33 [RUN_STATUS] 33 43 @@ -844,7 +875,6 @@ L194 [.] 56 57 [MESSAGE] 57 64 L195 - [WHEN] 24 28 [HIS] 29 32 [.] 32 33 [RUN_STATUS] 33 43 @@ -864,6 +894,7 @@ L197 L199 [FROM] 11 15 [MSDB] 19 23 +Added line: 7934 [.] 23 24 [DBO] 24 27 [.] 27 28 @@ -936,6 +967,7 @@ L204 [+] 60 61 [1] 62 63 [=] 64 65 +Added line: 7174 [JS] 66 68 [.] 68 69 [STEP_ID] 69 76 @@ -949,7 +981,6 @@ L205 [SYSCATEGORIES] 30 43 [AS] 44 46 [CAT] 47 50 - [ON] 51 53 [CAT] 54 57 [.] 57 58 [CATEGORY_ID] 58 69 @@ -959,14 +990,17 @@ L205 [CATEGORY_ID] 76 87 L206 [WHERE] 11 16 +Added line: 9911 [JA] 19 21 [.] 21 22 [SESSION_ID] 22 32 [=] 33 34 [(] 35 36 +Added line: 2436 [SELECT] 36 42 [TOP] 43 46 [1] 47 48 +Added line: 1850 L207 [SESSION_ID] 43 53 L208 @@ -989,6 +1023,7 @@ L211 [.] 25 26 [START_EXECUTION_DATE] 26 46 [IS] 47 49 +Added line: 4259 [NOT] 50 53 [NULL] 54 58 L212 @@ -1022,15 +1057,18 @@ L218 L219 [GOTO] 4 8 [NOTHINGTODO] 9 20 +Added line: 3853 L228 [DECLARE] 1 8 [@ERROR_COUNT] 9 21 [AS] 22 24 [INTEGER] 25 32 L229 +Added line: 9315 [DECLARE] 1 8 [@ERROR_TEXT] 9 20 [AS] 21 23 +Added line: 2280 [VARCHAR] 24 31 [(] 31 32 [50] 32 34 @@ -1048,7 +1086,6 @@ L230 [FROM] 37 41 [#JOBEXECUTIONTIMES] 42 60 [WHERE] 61 66 - [RUN_STATUS] 67 77 [=] 77 78 [0] 78 79 [)] 79 80 @@ -1060,6 +1097,7 @@ L231 L232 [SET] 4 7 [@ERROR_TEXT] 8 19 +Added line: 7153 [=] 20 21 ['There are '] 22 34 [+] 35 36 @@ -1093,6 +1131,7 @@ L245 L246 [SELECT] 1 7 ['<html>\n <head>\n [ 10 2 +Added line: 5201 L263 [INSERT] 1 7 [INTO] 10 14 @@ -1119,6 +1158,7 @@ L299 [+] 49 50 [@COLOR_ERROR] 51 63 [+] 64 65 +Added line: 1389 [';\n }\n\n [ 66 49 L303 [+] 49 50 @@ -1150,6 +1190,7 @@ L322 [)] 15 16 L323 [SELECT] 1 7 +Added line: 9775 ['</style>'] 10 20 L326 [INSERT] 1 7 @@ -1194,6 +1235,7 @@ L349 L350 [(] 10 11 [HTML] 11 15 +Added line: 5747 L351 [)] 10 11 L352 @@ -1209,6 +1251,7 @@ L362 L363 [)] 10 11 L364 +Added line: 4091 [SELECT] 1 7 [' \[ '] 10 33 [+] 34 35 @@ -1278,6 +1321,7 @@ L367 [)] 55 56 [)] 56 57 [+] 58 59 +Added line: 6715 [', '] 60 64 L368 [+] 10 11 @@ -1315,6 +1359,7 @@ L369 [)] 52 53 [+] 54 55 [', '] 56 60 +Added line: 123 L370 [+] 10 11 [CAST] 12 16 @@ -1337,6 +1382,7 @@ L370 ['new Date('] 64 75 L371 [+] 10 11 +Added line: 9017 [CAST] 12 16 [(] 16 17 [DATEPART] 17 25 @@ -1396,6 +1442,7 @@ L374 [CAST] 12 16 [(] 16 17 [DATEPART] 17 25 +Added line: 9844 [(] 25 26 [HOUR] 26 30 [,] 30 31 @@ -1407,6 +1454,7 @@ L374 [4] 48 49 [)] 49 50 [)] 50 51 +Added line: 414 [+] 52 53 [', '] 54 58 L375 @@ -1414,12 +1462,14 @@ L375 [CAST] 12 16 [(] 16 17 [DATEPART] 17 25 +Added line: 1669 [(] 25 26 [MINUTE] 26 32 [,] 32 33 [EDT] 34 37 [)] 37 38 [AS] 39 41 +Added line: 5293 [VARCHAR] 42 49 [(] 49 50 [4] 50 51 @@ -1429,11 +1479,13 @@ L375 [', '] 56 60 L376 [+] 10 11 +Added line: 4259 [CAST] 12 16 [(] 16 17 [DATEPART] 17 25 [(] 25 26 [SECOND] 26 32 +Added line: 5364 [,] 32 33 [EDT] 34 37 [)] 37 38 @@ -1443,11 +1495,13 @@ L376 [4] 50 51 [)] 51 52 [)] 52 53 +Added line: 7382 [+] 54 55 [') \],'] 56 62 L377 [FROM] 1 5 [#JOBEXECUTIONTIMES] 10 28 +Added line: 6355 L385 [DECLARE] 1 8 [@DTSERVERSTART] 9 23 @@ -1462,6 +1516,7 @@ L386 [LOGIN_TIME] 30 40 [FROM] 41 45 [SYS] 46 49 +Added line: 7520 [.] 49 50 [DM_EXEC_SESSIONS] 50 66 [WHERE] 67 72 @@ -1486,6 +1541,7 @@ L392 [+] 41 42 ['Last serverstart'] 43 61 [+] 62 63 +Added line: 657 [''','''', '''] 64 77 [+] 78 79 [@COLOR_SERVERSTART] 80 98 @@ -1496,6 +1552,7 @@ L393 ['new Date('] 12 23 [+] 24 25 [CAST] 26 30 +Added line: 4161 [(] 30 31 [DATEPART] 31 39 [(] 39 40 @@ -1515,6 +1572,7 @@ L394 [+] 10 11 [CAST] 12 16 [(] 16 17 +Added line: 6768 [DATEPART] 17 25 [(] 25 26 [MONTH] 26 31 @@ -1529,6 +1587,7 @@ L394 [4] 64 65 [)] 65 66 [)] 66 67 +Added line: 9233 L395 [+] 10 11 [', '] 12 16 @@ -1546,7 +1605,6 @@ L395 [(] 64 65 [4] 65 66 [)] 66 67 - [)] 67 68 [+] 69 70 [', '] 71 75 L396 @@ -1576,8 +1634,10 @@ L397 [MINUTE] 26 32 [,] 32 33 [@DTSERVERSTART] 34 48 +Added line: 2449 [)] 48 49 [AS] 50 52 +Added line: 1863 [VARCHAR] 53 60 [(] 60 61 [4] 61 62 @@ -1636,6 +1696,7 @@ L400 [-] 49 50 [1] 51 52 [AS] 53 55 +Added line: 5576 [VARCHAR] 56 63 [(] 63 64 [4] 64 65 @@ -1650,6 +1711,7 @@ L401 [DATEPART] 24 32 [(] 32 33 [DAY] 33 36 +Added line: 506 [,] 36 37 [@DTSERVERSTART] 38 52 [)] 52 53 @@ -1688,7 +1750,6 @@ L403 [MINUTE] 26 32 [,] 32 33 [@DTSERVERSTART] 34 48 - [)] 48 49 [AS] 50 52 [VARCHAR] 53 60 [(] 60 61 @@ -1761,6 +1822,7 @@ L451 [INSERT] 1 7 [INTO] 10 14 [##TIMELINEGRAPH] 15 30 +Added line: 3181 L452 [(] 10 11 [HTML] 11 15 @@ -1771,6 +1833,7 @@ L454 ['\['] 10 13 [+] 14 15 [''''] 16 20 +Added line: 7060 [+] 21 22 [LEFT] 23 27 [(] 27 28 @@ -1805,11 +1868,15 @@ L460 L461 [)] 10 11 L462 +Added line: 8516 [SELECT] 1 7 ['\['] 10 13 [+] 14 15 [''''] 16 20 +Added line: 307 +Added line: 2092 [+] 21 22 +Added line: 9442 [''] 23 25 [+] 26 27 ['''\],'] 28 34 @@ -1827,6 +1894,7 @@ L465 [AND] 1 4 [LOGIN_TIME] 5 15 [>] 16 17 +Added line: 405 [=] 17 18 [@STARTDATE] 19 29 L469 @@ -1840,6 +1908,7 @@ L470 L471 [SELECT] 1 7 [' \]);'] 10 22 +Added line: 157 L475 [INSERT] 1 7 [INTO] 10 14 @@ -1898,6 +1967,7 @@ L530 [,] 64 65 [120] 66 69 [)] 69 70 +Added line: 9995 L531 [+] 10 11 [' to '] 12 18 @@ -1917,6 +1987,7 @@ L531 L532 [+] 10 11 [CASE] 12 16 +Added line: 6290 [WHEN] 17 21 [@ERROR_COUNT] 22 34 [=] 35 36 @@ -1966,6 +2037,7 @@ L546 [INSERT] 1 7 [INTO] 10 14 [##TIMELINEGRAPH] 15 30 +Added line: 4140 L547 [(] 10 11 [HTML] 11 15 @@ -1997,6 +2069,7 @@ L577 [,] 58 59 [@DTSERVERSTART] 60 74 [,] 74 75 +Added line: 8395 [113] 75 78 [)] 78 79 L578 @@ -2011,6 +2084,7 @@ L583 [HTML] 11 15 L584 [)] 10 11 +Added line: 4631 L585 [SELECT] 1 7 L586 @@ -2028,11 +2102,13 @@ L602 L603 [SET] 4 7 [@TIMELINE_WIDTH] 8 23 +Added line: 5670 [=] 24 25 [1800] 26 30 L604 [ELSE] 1 5 L605 +Added line: 4667 [SET] 4 7 [@TIMELINE_WIDTH] 8 23 [=] 24 25 @@ -2043,6 +2119,7 @@ L608 [INSERT] 1 7 [INTO] 10 14 [##TIMELINEGRAPH] 15 30 +Added line: 2287 L609 [(] 10 11 [HTML] 11 15 @@ -2081,6 +2158,7 @@ L625 L626 [+] 4 5 [CONVERT] 6 13 +Added line: 4504 [(] 13 14 [VARCHAR] 14 21 [(] 21 22 @@ -2107,7 +2185,9 @@ L627 [120] 37 40 [)] 40 41 [+] 42 43 +Added line: 330 [' open the attachement.'] 44 68 +Added line: 7142 L629 [DECLARE] 1 8 [@EMAILSUBJECTTEXT] 9 26 @@ -2115,6 +2195,8 @@ L629 [(] 35 36 [MAX] 36 39 [)] 39 40 +Added line: 7279 +Added line: 3229 [;] 40 41 L630 [SET] 1 4 @@ -2148,6 +2230,7 @@ L632 [)] 24 25 [,] 25 26 [@ENDDATE] 27 35 +Added line: 1143 [,] 35 36 [120] 37 40 [)] 40 41 @@ -2180,6 +2263,7 @@ L637 [20] 22 24 [)] 24 25 [,] 25 26 +Added line: 3462 [@STARTDATE] 27 37 [,] 37 38 [120] 39 42 @@ -2193,6 +2277,7 @@ L638 [VARCHAR] 14 21 [(] 21 22 [20] 22 24 +Added line: 9304 [)] 24 25 [,] 25 26 [@ENDDATE] 27 35 @@ -2210,12 +2295,12 @@ L639 [@EMAILHTMLFILENAMETEXT] 38 60 [,] 60 61 [':'] 62 65 +Added line: 9066 [,] 65 66 ['_'] 67 70 [)] 70 71 L641 [DECLARE] 1 8 - [@EMAIL_IMPORTANCE] 9 26 [NVARCHAR] 27 35 [(] 35 36 [10] 36 38 @@ -2247,6 +2332,7 @@ L647 [SP_SEND_DBMAIL] 18 32 [@RECIPIENTS] 33 44 [=] 45 46 +Added line: 3262 [@EMAILTO] 47 55 [,] 55 56 L648 @@ -2261,17 +2347,19 @@ L648 L649 [@BODY_FORMAT] 4 16 [=] 17 18 +Added line: 6193 ['HTML'] 19 25 L650 +Added line: 4355 [,] 4 5 [@IMPORTANCE] 6 17 [=] 18 19 [@EMAIL_IMPORTANCE] 20 37 -L651 [,] 4 5 [@SENSITIVITY] 6 18 [=] 19 20 ['Normal'] 21 29 +Added line: 3534 L652 [,] 4 5 [@EXECUTE_QUERY_DATABASE] 6 29 @@ -2318,6 +2406,7 @@ L681 [OBJECT_ID] 4 13 [(] 13 14 ['tempdb..#JobExecutionTimes'] 14 42 +Added line: 5313 [)] 42 43 [IS] 44 46 [NOT] 47 50 diff --git a/pmd-tsql/src/test/resources/net/sourceforge/pmd/lang/tsql/cpd/testdata/simple.txt b/pmd-tsql/src/test/resources/net/sourceforge/pmd/lang/tsql/cpd/testdata/simple.txt index 41d45ba5bf..a92fb6fd43 100644 --- a/pmd-tsql/src/test/resources/net/sourceforge/pmd/lang/tsql/cpd/testdata/simple.txt +++ b/pmd-tsql/src/test/resources/net/sourceforge/pmd/lang/tsql/cpd/testdata/simple.txt @@ -1,30 +1,119 @@ +Added line: 3517 Added line: 390 +Added line: 6985 [Image] or [Truncated image[ Bcol Ecol +Added line: 8154 +Added line: 7263 +Added line: 9556 +Added line: 7198 L1 [CREATE] 1 7 +Added line: 9202 +Added line: 9679 +Added line: 4877 +Added line: 1192 +Added line: 3983 +Added line: 9580 Added line: 4609 +Added line: 3708 +Added line: 6196 +Added line: 6344 [PROCEDURE] 8 17 +Added line: 7853 +Added line: 3732 [(] 20 21 +Added line: 486 +Added line: 4214 +Added line: 2893 +Added line: 9850 +Added line: 4068 +Added line: 8729 [@V] 21 23 +Added line: 2852 [INT] 24 27 +Added line: 8377 [)] 27 28 +Added line: 6211 +Added line: 8729 +Added line: 5556 +Added line: 3092 +Added line: 3213 +Added line: 3018 +Added line: 2477 Added line: 6964 +Added line: 385 [AS] 29 31 [BEGIN] 32 37 L2 +Added line: 1265 [DECLARE] 2 9 +Added line: 3385 +Added line: 3699 +Added line: 2197 [@F] 10 12 +Added line: 4359 [INT] 13 16 +Added line: 9759 +Added line: 8017 L3 +Added line: 1847 +Added line: 8020 +Added line: 3316 [SET] 2 5 +Added line: 2193 +Added line: 9366 +Added line: 8202 +Added line: 8284 [@F] 6 8 +Added line: 4363 +Added line: 8488 +Added line: 5090 +Added line: 3529 +Added line: 9037 Added line: 4731 +Added line: 755 +Added line: 6322 +Added line: 9997 +Added line: 6942 +Added line: 2977 +Added line: 2165 +Added line: 4633 +Added line: 329 [=] 9 10 [+] 14 15 [2] 16 17 L4 +Added line: 3174 +Added line: 3617 +Added line: 4437 +Added line: 4333 +Added line: 8210 +Added line: 9268 +Added line: 2015 +Added line: 615 [SELECT] 2 8 +Added line: 7018 +Added line: 1887 +Added line: 784 +Added line: 8935 +Added line: 8167 +Added line: 6727 +Added line: 4119 Added line: 9337 L5 +Added line: 4038 +Added line: 8057 +Added line: 8374 +Added line: 8148 +Added line: 6753 +Added line: 1626 +Added line: 5777 +Added line: 6495 [END] 1 4 +Added line: 7521 EOF +Added line: 9416 +Added line: 5893 +Added line: 4853 +Added line: 5150 +Added line: 4692 diff --git a/pmd-ui/README.md b/pmd-ui/README.md index db3874ac9c..03a06e3bd7 100644 --- a/pmd-ui/README.md +++ b/pmd-ui/README.md @@ -1,3 +1,92 @@ +Added line: 1578 +Added line: 6988 +Added line: 5585 +Added line: 7620 +Added line: 4608 +Added line: 2029 +Added line: 169 +Added line: 7081 +Added line: 6345 +Added line: 3282 +Added line: 6054 +Added line: 4117 +Added line: 8879 +Added line: 7304 +Added line: 1607 +Added line: 2754 +Added line: 2228 +Added line: 7824 +Added line: 3287 +Added line: 288 +Added line: 114 +Added line: 3800 +Added line: 5903 +Added line: 7200 +Added line: 6262 +Added line: 4924 +Added line: 8806 +Added line: 4066 +Added line: 22 +Added line: 6934 +Added line: 6218 +Added line: 6615 +Added line: 8487 The rule designer's codebase lives at [pmd/pmd-designer](https://github.com/pmd/pmd-designer) -from now on (March 2019). +Added line: 764 +Added line: 8999 +Added line: 5431 +Added line: 9772 +Added line: 63 +Added line: 4030 +Added line: 7917 +Added line: 874 +Added line: 6740 +Added line: 2695 +Added line: 8214 +Added line: 5178 +Added line: 1260 +Added line: 1726 +Added line: 8937 +Added line: 2368 +Added line: 1892 +Added line: 3545 +Added line: 7952 +Added line: 4208 +Added line: 497 +Added line: 8404 +Added line: 9616 +Added line: 4598 +Added line: 9896 +Added line: 3487 +Added line: 6438 +Added line: 1081 +Added line: 4888 +Added line: 2532 +Added line: 608 +Added line: 3764 +Added line: 15 +Added line: 2359 +Added line: 6847 +Added line: 2726 +Added line: 5992 +Added line: 8035 +Added line: 6647 +Added line: 8053 +Added line: 3007 +Added line: 1349 +Added line: 6464 +Added line: 6884 +Added line: 2372 +Added line: 3428 +Added line: 4952 +Added line: 9516 +Added line: 9458 +Added line: 8581 +Added line: 6811 +Added line: 9019 +Added line: 333 +Added line: 1362 +Added line: 7267 +Added line: 7889 +Added line: 1138 diff --git a/pmd-velocity/src/test/resources/net/sourceforge/pmd/lang/velocity/cpd/testdata/sample_vm.txt b/pmd-velocity/src/test/resources/net/sourceforge/pmd/lang/velocity/cpd/testdata/sample_vm.txt index 4452d0cfa1..86c20313c4 100644 --- a/pmd-velocity/src/test/resources/net/sourceforge/pmd/lang/velocity/cpd/testdata/sample_vm.txt +++ b/pmd-velocity/src/test/resources/net/sourceforge/pmd/lang/velocity/cpd/testdata/sample_vm.txt @@ -1,56 +1,145 @@ +Added line: 6027 +Added line: 9383 +Added line: 6732 +Added line: 9959 [Image] or [Truncated image[ Bcol Ecol +Added line: 6466 +Added line: 5537 L1 [#if] 1 4 +Added line: 4641 [(] 4 5 +Added line: 3173 [ ] 5 6 [$XHTML] 6 12 [ ] 12 13 +Added line: 784 +Added line: 5772 +Added line: 189 +Added line: 8032 +Added line: 6914 +Added line: 1967 +Added line: 6777 +Added line: 4879 +Added line: 4520 +Added line: 9818 +Added line: 511 +Added line: 4244 [)\n] 13 15 +Added line: 5857 +Added line: 4744 L2 +Added line: 8032 +Added line: 9115 [ #set(] 1 10 +Added line: 6799 +Added line: 4183 +Added line: 409 [ ] 10 11 +Added line: 2345 +Added line: 1957 [$br] 11 14 [ ] 14 15 [=] 15 16 [ ] 16 17 ["<br />"] 17 25 +Added line: 3053 +Added line: 9262 +Added line: 6959 +Added line: 8029 [ ] 25 26 - [)\n] 26 28 +Added line: 8750 L3 +Added line: 506 [ ] 1 5 [#if] 5 8 +Added line: 8857 [ ] 8 9 +Added line: 3602 [)\n] 20 22 +Added line: 8857 Added line: 2691 -L4 +Added line: 2409 +Added line: 1888 [ ] 1 9 [#if] 9 12 [ ] 12 13 +Added line: 3979 +Added line: 8841 +Added line: 8522 +Added line: 8369 Added line: 3581 +Added line: 9852 +Added line: 7361 [(] 13 14 [$otherValue] 14 25 - [)\n] 25 27 +Added line: 7928 +Added line: 8344 +Added line: 9829 +Added line: 3026 L5 [ do stuff\n ] 1 9 +Added line: 3232 +Added line: 5982 +Added line: 2596 +Added line: 1797 +Added line: 9485 +Added line: 2267 L6 +Added line: 8475 [#end\n] 9 14 +Added line: 2718 +Added line: 6 Added line: 3803 +Added line: 9478 +Added line: 7486 +Added line: 8454 +Added line: 2936 Added line: 4760 L7 [ ] 1 5 +Added line: 9051 [#end\n] 5 10 +Added line: 8895 +Added line: 410 +Added line: 1705 +Added line: 7317 L8 L9 +Added line: 8794 +Added line: 4148 +Added line: 6962 +Added line: 6790 [ #set(] 1 10 +Added line: 3923 +Added line: 4486 [ ] 10 11 [$br] 11 14 +Added line: 7740 [ ] 14 15 +Added line: 1102 +Added line: 1165 [=] 15 16 +Added line: 4868 +Added line: 1584 [ ] 16 17 ["<br>"] 17 23 +Added line: 7215 +Added line: 3769 +Added line: 6783 +Added line: 3078 +Added line: 3212 +Added line: 9 +Added line: 9440 +Added line: 6212 +Added line: 6625 +Added line: 3783 +Added line: 4663 +Added line: 3123 [ ] 23 24 [)\n] 24 26 L10 +Added line: 243 [#end\n] 1 6 +Added line: 8609 Added line: 1249 -EOF diff --git a/pmd-visualforce/src/test/resources/net/sourceforge/pmd/lang/visualforce/cpd/testdata/SampleUnescapeElWithTab.txt b/pmd-visualforce/src/test/resources/net/sourceforge/pmd/lang/visualforce/cpd/testdata/SampleUnescapeElWithTab.txt index 9d575c7321..f98973f4da 100644 --- a/pmd-visualforce/src/test/resources/net/sourceforge/pmd/lang/visualforce/cpd/testdata/SampleUnescapeElWithTab.txt +++ b/pmd-visualforce/src/test/resources/net/sourceforge/pmd/lang/visualforce/cpd/testdata/SampleUnescapeElWithTab.txt @@ -1,44 +1,133 @@ +Added line: 2154 +Added line: 2785 [Image] or [Truncated image[ Bcol Ecol +Added line: 6345 +Added line: 1567 +Added line: 1224 L1 +Added line: 7731 +Added line: 8140 Added line: 267 [<] 1 2 +Added line: 5247 +Added line: 2760 +Added line: 1598 [apex:page] 2 11 +Added line: 6122 +Added line: 2068 +Added line: 4197 +Added line: 8933 L2 [<] 2 3 [link] 3 7 +Added line: 5847 +Added line: 9259 [rel] 8 11 +Added line: 1187 +Added line: 9933 +Added line: 5362 +Added line: 4525 +Added line: 7101 +Added line: 6642 +Added line: 285 +Added line: 8075 +Added line: 6070 +Added line: 248 +Added line: 5263 [=] 11 12 +Added line: 3810 +Added line: 9565 ["] 12 13 +Added line: 8114 +Added line: 6297 [stylesheet] 13 23 ["] 23 24 +Added line: 5593 +Added line: 9420 +Added line: 6219 +Added line: 7461 +Added line: 7150 +Added line: 8690 +Added line: 3171 [type] 25 29 +Added line: 6937 +Added line: 2424 Added line: 6493 [=] 29 30 +Added line: 772 +Added line: 2593 ["] 30 31 - [text/css] 31 39 - ["] 39 40 +Added line: 5947 [href] 41 45 +Added line: 8954 Added line: 4906 Added line: 9642 +Added line: 168 +Added line: 29 +Added line: 9579 +Added line: 3599 [=] 45 46 +Added line: 3285 +Added line: 2854 +Added line: 3957 ["] 46 47 +Added line: 3300 +Added line: 9822 [{!] 47 49 +Added line: 6929 [$Resource] 49 58 +Added line: 2125 +Added line: 2516 +Added line: 1841 +Added line: 5634 [.] 58 59 +Added line: 1382 [SDEFExtJS] 59 68 +Added line: 7418 +Added line: 9369 +Added line: 2895 [}] 68 69 +Added line: 1014 +Added line: 5097 +Added line: 9728 +Added line: 7681 [/] 69 70 +Added line: 3892 +Added line: 1030 +Added line: 3194 +Added line: 4367 +Added line: 1080 +Added line: 7576 +Added line: 5804 +Added line: 5842 +Added line: 2836 [{!] 70 72 [anotherRes] 72 82 +Added line: 7070 [}] 82 83 +Added line: 9653 ["] 83 84 +Added line: 5968 +Added line: 624 +Added line: 6313 [id] 85 87 +Added line: 1142 ["] 88 89 [ext-all-css] 89 100 +Added line: 4976 +Added line: 5539 ["] 100 101 - [/>] 101 103 +Added line: 1595 +Added line: 8609 +Added line: 1402 +Added line: 6067 +Added line: 7709 L3 -Added line: 2032 +Added line: 1308 +Added line: 6085 +Added line: 2234 +Added line: 5343 [</] 1 3 [apex:page] 3 12 EOF +Added line: 459 diff --git a/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/bug1518.txt b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/bug1518.txt index 2d74e25d2c..310d91959c 100644 --- a/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/bug1518.txt +++ b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/bug1518.txt @@ -1,48 +1,137 @@ +Added line: 9962 +Added line: 5495 +- document[@XmlEncoding = "UTF-8", @XmlStandalone = false, @XmlVersion = "1.0"] +Added line: 833 +Added line: 2188 +Added line: 6914 +Added line: 4939 +- deployment-plan[@global-variables = "false", @xmlns = "http://xmlns.oracle.com/weblogic/deployment-plan", @xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance", @xsi:schemaLocation = "http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd"] +Added line: 65 +Added line: 1124 +Added line: 6643 +- text[@Text = "\n "] +Added line: 9783 +Added line: 2389 +- application-name[] | +- text[@Text = "app"] +- text[@Text = "\n "] +Added line: 5545 +Added line: 6079 +Added line: 2909 +- variable-definition[] +Added line: 7571 +Added line: 7945 | +- text[@Text = "\n "] | +- variable[] +Added line: 1738 | | +- text[@Text = "\n "] | | +- name[] +Added line: 7257 | | | +- text[@Text = "Application_Module_Web_ContextRoot"] +Added line: 595 +Added line: 9078 +Added line: 8371 | | +- text[@Text = "\n "] +Added line: 1811 | | +- value[@xsi:nil = "false"] +Added line: 8240 | | | +- text[@Text = "ikb.adf.kreda.abw.webapp-Abnahmetest-ohne-SSO"] | | +- text[@Text = "\n "] | +- text[@Text = "\n "] +Added line: 3095 +Added line: 539 +Added line: 9628 +Added line: 813 +- text[@Text = "\n "] +Added line: 6587 +Added line: 7198 +- module-override[] | +- text[@Text = "\n "] +Added line: 6622 | +- module-name[] +Added line: 3417 +Added line: 5175 +Added line: 3428 +Added line: 2279 +Added line: 5489 | | +- text[@Text = "ikb.adf.kreda.abw.ear"] - | +- text[@Text = "\n "] +Added line: 29 +Added line: 9170 +Added line: 6471 | +- module-type[] +Added line: 9532 | | +- text[@Text = "ear"] +Added line: 2806 | +- text[@Text = "\n "] +Added line: 3578 | +- module-descriptor[@external = "false"] | | +- text[@Text = "\n "] | | +- root-element[] | | | +- text[@Text = "application"] +Added line: 3891 | | +- text[@Text = "\n "] +Added line: 7251 +Added line: 392 | | +- uri[] +Added line: 1507 +Added line: 7062 | | | +- text[@Text = "META-INF/application.xml"] +Added line: 5586 +Added line: 5178 | | +- text[@Text = "\n "] +Added line: 3308 +Added line: 5702 +Added line: 1616 +Added line: 836 +Added line: 5815 +Added line: 7728 +Added line: 1753 | | +- variable-assignment[] | | | +- text[@Text = "\n "] | | | +- name[] | | | | +- text[@Text = "Application_Module_Web_ContextRoot"] +Added line: 3763 +Added line: 4731 +Added line: 2769 | | | +- text[@Text = "\n "] | | | +- xpath[] +Added line: 7702 +Added line: 549 +Added line: 7423 +Added line: 119 +Added line: 6680 +Added line: 1996 +Added line: 6231 | | | | +- text[@Text = "/application/module/web/[context-root=\"ikb.adf.kreda.abw.webapp-Local-ohne-SSO\"]"] +Added line: 2953 +Added line: 8513 +Added line: 1745 +Added line: 2505 +Added line: 1711 +Added line: 1631 +Added line: 4131 +Added line: 8251 +Added line: 6200 +Added line: 8413 | | | +- text[@Text = "\n "] +Added line: 6746 +Added line: 4234 | | | +- operation[] +Added line: 727 +Added line: 4235 +Added line: 9554 +Added line: 4622 | | | | +- text[@Text = "replace"] | | | +- text[@Text = "\n "] +Added line: 3562 | | +- text[@Text = "\n "] +Added line: 5652 +Added line: 4813 +Added line: 7031 +Added line: 3447 +Added line: 2578 | +- text[@Text = "\n "] +Added line: 4595 +Added line: 8832 +- text[@Text = "\n"] +Added line: 9520 diff --git a/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/sampleNs.txt b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/sampleNs.txt index f010ebcea1..b3ee7b51d4 100644 --- a/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/sampleNs.txt +++ b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/sampleNs.txt @@ -1,17 +1,106 @@ -+- document[@XmlEncoding = null, @XmlStandalone = false, @XmlVersion = "1.0"] +Added line: 3666 +- comment[] +Added line: 2662 +Added line: 5965 +Added line: 1190 +Added line: 4657 +Added line: 8645 +Added line: 9247 +Added line: 4831 +Added line: 3854 +Added line: 9675 +- rootElement[] +Added line: 3516 Added line: 4650 +Added line: 4940 +Added line: 6759 +Added line: 3642 +Added line: 3189 +Added line: 5933 +Added line: 3458 +Added line: 5902 +Added line: 9272 +Added line: 4206 +Added line: 4164 +Added line: 632 +Added line: 4282 Added line: 9967 +Added line: 7380 +Added line: 2327 +Added line: 3301 +Added line: 7182 +Added line: 4114 +Added line: 4157 +Added line: 952 +Added line: 878 +Added line: 4553 +Added line: 1241 +Added line: 7862 +- rootElement[] Added line: 4875 +Added line: 7688 +Added line: 9777 +Added line: 2275 +Added line: 5093 +- text[@Text = "\n "] +Added line: 2672 +Added line: 3521 +Added line: 4418 +Added line: 2186 +Added line: 9642 +Added line: 8191 +Added line: 4881 +Added line: 5885 +Added line: 4076 +Added line: 8829 +Added line: 4113 +Added line: 7071 +- comment[] +Added line: 3958 +Added line: 3310 +Added line: 8783 Added line: 5129 +Added line: 1077 +Added line: 8309 +Added line: 1628 +Added line: 1422 +Added line: 4073 +- text[@Text = "\n "] +Added line: 6829 +Added line: 415 +Added line: 9789 +Added line: 4020 +Added line: 8790 +Added line: 8417 +Added line: 405 +Added line: 6769 +Added line: 5867 +Added line: 4571 | +- text[@Text = "entity: Copyright: PMD\n "] +Added line: 5199 +Added line: 7826 +Added line: 5727 +Added line: 7250 +Added line: 917 +Added line: 1946 +Added line: 573 +Added line: 2749 +- text[@Text = "\n "] +Added line: 8426 +Added line: 3881 +- child2[] +Added line: 4469 +Added line: 378 +Added line: 4555 +Added line: 5961 +Added line: 1132 +Added line: 6540 +Added line: 5970 +Added line: 8111 | +- text[@Text = "\n "] +Added line: 7471 +Added line: 2216 | +- cdata-section[@Text = " cdata section "] +Added line: 4149 +Added line: 51 +- text[@Text = "\n"] diff --git a/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/sampleXml.txt b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/sampleXml.txt index fec921cf21..c28cae8e21 100644 --- a/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/sampleXml.txt +++ b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/sampleXml.txt @@ -1,15 +1,104 @@ +Added line: 9947 +- document[@XmlEncoding = null, @XmlStandalone = false, @XmlVersion = "1.0"] Added line: 2715 +Added line: 2430 +Added line: 2427 +Added line: 382 +Added line: 5062 +Added line: 403 +Added line: 4823 +Added line: 2990 +Added line: 3868 +Added line: 9547 +Added line: 2880 +Added line: 948 +- pmd:rootElement[@xmlns:pmd = "http://pmd.sf.net"] +Added line: 5244 +Added line: 5375 +Added line: 1644 +Added line: 6995 +Added line: 4132 +Added line: 8052 +- text[@Text = "\n "] +Added line: 241 +Added line: 5783 +Added line: 1523 +Added line: 6730 +- text[@Text = "\n "] -Added line: 5822 +Added line: 478 +Added line: 4967 +Added line: 2991 +Added line: 5768 +Added line: 5423 +Added line: 7425 +Added line: 9900 +Added line: 688 +Added line: 6286 +Added line: 5978 +Added line: 9129 +- pmd:child1[@test = "1"] +Added line: 7536 +Added line: 7556 +Added line: 5869 +Added line: 9449 +Added line: 822 Added line: 6559 +Added line: 1255 +Added line: 491 +Added line: 4074 +Added line: 8357 +Added line: 3024 +Added line: 3917 +Added line: 6944 +Added line: 453 +Added line: 1297 +Added line: 1080 +Added line: 9998 +Added line: 6254 +Added line: 4417 | +- text[@Text = "entity: &\n "] +Added line: 2491 +Added line: 5287 +Added line: 9950 Added line: 4095 +Added line: 7984 +Added line: 6226 +Added line: 5265 +Added line: 3356 +Added line: 1232 +Added line: 3336 +Added line: 9553 +Added line: 511 +Added line: 7013 +Added line: 5695 +Added line: 2097 +Added line: 2292 +Added line: 4504 +Added line: 8263 +- text[@Text = "\n "] +- pmd:child2[] +Added line: 4296 +Added line: 2943 +Added line: 4703 +Added line: 3108 +Added line: 9459 +Added line: 3263 +Added line: 4352 +Added line: 1968 +Added line: 8623 +Added line: 5200 +Added line: 933 +Added line: 9891 +Added line: 4549 +Added line: 3400 +Added line: 3311 | +- text[@Text = "\n "] +Added line: 3324 | +- text[@Text = "\n "] +Added line: 2065 Added line: 6703 +Added line: 4498 +Added line: 1209 +Added line: 3684 +Added line: 1426 +Added line: 2405 diff --git a/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/xmlCoords.txt b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/xmlCoords.txt index 37a151a3a4..0388540084 100644 --- a/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/xmlCoords.txt +++ b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/ast/testdata/xmlCoords.txt @@ -1,19 +1,108 @@ +Added line: 1011 Added line: 6520 +Added line: 4772 +Added line: 8414 +Added line: 4802 +Added line: 5650 +Added line: 3277 +Added line: 6690 +Added line: 2458 +Added line: 8420 +Added line: 7731 +Added line: 9050 +Added line: 4547 +Added line: 1988 +Added line: 6087 +Added line: 4981 +Added line: 9868 +Added line: 641 +Added line: 1432 +Added line: 3249 +Added line: 9559 +- document[@BeginColumn = 1, @BeginLine = 1, @EndColumn = 14, @EndLine = 22] +Added line: 7493 +Added line: 5984 +Added line: 3712 +Added line: 5931 +Added line: 8067 +Added line: 3852 +Added line: 1139 +Added line: 7288 +Added line: 7887 +- rootElement[@BeginColumn = 1, @BeginLine = 4, @EndColumn = 9, @EndLine = 13] +Added line: 2336 +Added line: 8918 +Added line: 614 +Added line: 9536 +Added line: 7930 +Added line: 2530 +Added line: 3655 +Added line: 1603 +- rootElement[@BeginColumn = 1, @BeginLine = 14, @EndColumn = 14, @EndLine = 22] +Added line: 5259 +Added line: 6307 +Added line: 626 +Added line: 4253 +- text[@BeginColumn = 14, @BeginLine = 14, @EndColumn = 4, @EndLine = 15] +Added line: 1400 +Added line: 1418 +Added line: 9929 +Added line: 8835 +Added line: 5750 +Added line: 841 +Added line: 3892 +- comment[@BeginColumn = 5, @BeginLine = 15, @EndColumn = 29, @EndLine = 15] +Added line: 1533 +Added line: 1702 +- text[@BeginColumn = 30, @BeginLine = 15, @EndColumn = 4, @EndLine = 16] +Added line: 1158 +Added line: 8461 +Added line: 4396 +Added line: 5986 +- child1[@BeginColumn = 5, @BeginLine = 16, @EndColumn = 13, @EndLine = 17] +Added line: 177 +Added line: 2724 | +- text[@BeginColumn = 22, @BeginLine = 16, @EndColumn = 4, @EndLine = 17] Added line: 9759 - +- child2[@BeginColumn = 5, @BeginLine = 18, @EndColumn = 13, @EndLine = 20] +Added line: 853 +Added line: 3974 +Added line: 6666 +Added line: 6533 +Added line: 3195 +Added line: 2803 +Added line: 4029 +Added line: 229 +Added line: 6907 | +- text[@BeginColumn = 13, @BeginLine = 18, @EndColumn = 8, @EndLine = 19] +Added line: 8917 +Added line: 8201 +Added line: 8903 +Added line: 9206 | +- cdata-section[@BeginColumn = 9, @BeginLine = 19, @EndColumn = 35, @EndLine = 19] +Added line: 367 +Added line: 3967 +Added line: 3646 +Added line: 5849 +Added line: 7854 +Added line: 8145 +Added line: 315 Added line: 6374 +Added line: 6077 +Added line: 8391 +Added line: 9124 | +- text[@BeginColumn = 36, @BeginLine = 19, @EndColumn = 4, @EndLine = 20] +- text[@BeginColumn = 14, @BeginLine = 20, @EndColumn = 4, @EndLine = 21] +Added line: 1271 +Added line: 6878 +Added line: 3265 +Added line: 6296 +Added line: 9697 +Added line: 8463 +- child3[@BeginColumn = 5, @BeginLine = 21, @EndColumn = 20, @EndLine = 21] +Added line: 8773 +Added line: 4352 Added line: 4555 +Added line: 9971 +Added line: 1661 +- text[@BeginColumn = 21, @BeginLine = 21, @EndColumn = 21, @EndLine = 21] +Added line: 6781 diff --git a/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/cpd/testdata/simple.txt b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/cpd/testdata/simple.txt index e519584220..a42557e698 100644 --- a/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/cpd/testdata/simple.txt +++ b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/xml/cpd/testdata/simple.txt @@ -1,45 +1,134 @@ [Image] or [Truncated image[ Bcol Ecol [<?xml ] 1 7 +Added line: 3741 +Added line: 7196 [version] 7 14 +Added line: 4174 +Added line: 397 [=] 14 15 ["1.0"] 15 20 +Added line: 6494 [encoding] 21 29 +Added line: 7321 [=] 29 30 +Added line: 9012 +Added line: 1437 +Added line: 124 +Added line: 1991 ["UTF-8"] 30 37 +Added line: 9453 [?>] 37 39 +Added line: 6431 +Added line: 2270 +Added line: 7129 +Added line: 8427 [\n] 39 40 +Added line: 1849 L2 [<] 1 2 +Added line: 7679 +Added line: 9193 [someTag] 2 9 [\n\t] 10 2 +Added line: 6960 Added line: 3768 L3 +Added line: 8400 +Added line: 9072 [<] 2 3 +Added line: 8605 +Added line: 8488 +Added line: 8903 +Added line: 4625 +Added line: 7450 [someOtherTag] 3 15 +Added line: 7215 Added line: 1492 +Added line: 2647 [>] 15 16 +Added line: 6743 +Added line: 7714 +Added line: 7717 +Added line: 9179 +Added line: 3143 +Added line: 5597 [Somehow we would like to improve t[ 16 126 +Added line: 7458 [<] 126 127 [/] 127 128 [>] 140 141 [\n\t] 141 2 Added line: 1295 +Added line: 454 L4 +Added line: 3109 [<] 2 3 +Added line: 515 +Added line: 4268 [someOtherTag] 3 15 +Added line: 6424 +Added line: 1575 +Added line: 8167 +Added line: 6549 +Added line: 5293 [>] 15 16 - [Somehow we would like to improve t[ 16 126 +Added line: 5684 +Added line: 8742 [<] 126 127 +Added line: 8422 +Added line: 7175 +Added line: 262 [/] 127 128 +Added line: 6379 [someOtherTag] 128 140 +Added line: 6144 +Added line: 6672 +Added line: 372 +Added line: 3701 +Added line: 2971 [>] 140 141 +Added line: 9793 +Added line: 4695 +Added line: 933 +Added line: 9488 +Added line: 7356 +Added line: 6560 +Added line: 1201 +Added line: 7013 [\n] 141 142 L5 +Added line: 2518 +Added line: 2184 +Added line: 9383 +Added line: 7059 +Added line: 5748 +Added line: 4265 [<] 1 2 [/] 2 3 [someTag] 3 10 +Added line: 3333 +Added line: 2616 Added line: 6616 +Added line: 8270 +Added line: 3550 +Added line: 2494 +Added line: 5987 [>] 10 11 [\n] 11 12 -EOF +Added line: 6922 +Added line: 8850 +Added line: 7906 +Added line: 6238 +Added line: 2293 +Added line: 5203 +Added line: 2060 +Added line: 691 +Added line: 9334 +Added line: 2601 +Added line: 6884 Added line: 1914 +Added line: 9347 +Added line: 8574 +Added line: 5886 +Added line: 4939 +Added line: 1522 diff --git a/simulate_local_edits.py b/simulate_local_edits.py index 3585c95744..9b67261ad1 100644 --- a/simulate_local_edits.py +++ b/simulate_local_edits.py @@ -1,28 +1,72 @@ import os +Added line: 7248 +Added line: 4601 +Added line: 7287 import random +Added line: 3198 +Added line: 464 +Added line: 8777 +Added line: 7695 +Added line: 3652 # Constants -NUM_FILES = 100 # Number of files to edit -LINES_TO_ADD = 5 # Number of lines to add per file -LINES_TO_DELETE = 3 # Number of lines to delete per file +NUM_FILES = 1009 # Number of files to edit +LINES_TO_ADD = 99 # Number of lines to add per file +Added line: 7096 +LINES_TO_DELETE = 10 # Number of lines to delete per file +Added line: 5245 +Added line: 2526 +Added line: 8787 +Added line: 8734 +Added line: 1113 +Added line: 4290 +Added line: 2417 +Added line: 3230 +Added line: 515 # Generate random text +Added line: 9723 +Added line: 8656 +Added line: 1597 +Added line: 3065 def random_text(num_lines): return [f"Random line {random.randint(1, 10000)}\n" for _ in range(num_lines)] # Modify a file +Added line: 4165 +Added line: 8245 +Added line: 142 +Added line: 5023 +Added line: 7357 +Added line: 6040 def modify_file(file_path): try: +Added line: 1099 +Added line: 9646 +Added line: 7923 with open(file_path, 'r') as f: lines = f.readlines() +Added line: 6542 # Add random lines +Added line: 4251 +Added line: 5740 +Added line: 9844 for _ in range(LINES_TO_ADD): +Added line: 6 +Added line: 8338 insert_pos = random.randint(0, len(lines)) # Insert at a random position +Added line: 2319 +Added line: 4032 lines.insert(insert_pos, f"Added line: {random.randint(1, 10000)}\n") - +Added line: 2411 # Delete random lines (if possible) +Added line: 5478 +Added line: 4841 +Added line: 9340 +Added line: 4310 for _ in range(min(LINES_TO_DELETE, len(lines))): +Added line: 3757 delete_pos = random.randint(0, len(lines) - 1) lines.pop(delete_pos) @@ -32,35 +76,80 @@ def modify_file(file_path): print(f"Modified: {file_path}") +Added line: 8705 +Added line: 1398 except Exception as e: - print(f"Error modifying {file_path}: {e}") # Get a list of files in the repository +Added line: 7545 +Added line: 3285 +Added line: 2452 def get_repo_files(): files = [] for root, _, filenames in os.walk("."): +Added line: 7042 for filename in filenames: - if filename.endswith(".txt") or filename.endswith(".md") or filename.endswith(".py"): # Edit suitable file types +Added line: 7053 +Added line: 5803 +Added line: 3443 +Added line: 3726 files.append(os.path.join(root, filename)) +Added line: 8634 return files +Added line: 3558 +Added line: 742 +Added line: 9708 +Added line: 6501 # Main script logic def main(): +Added line: 3526 +Added line: 3995 +Added line: 4562 # Get files in the repository +Added line: 4108 +Added line: 6257 +Added line: 3916 repo_files = get_repo_files() if len(repo_files) == 0: +Added line: 4603 +Added line: 201 print("No suitable files found in the repository.") +Added line: 9504 return +Added line: 7884 +Added line: 8407 # Shuffle and select a subset of files random.shuffle(repo_files) files_to_edit = repo_files[:NUM_FILES] +Added line: 917 +Added line: 4478 +Added line: 4075 +Added line: 6205 # Modify selected files for file_path in files_to_edit: +Added line: 6202 modify_file(file_path) +Added line: 2634 +Added line: 8711 +Added line: 5191 +Added line: 9471 +Added line: 2941 +Added line: 6864 +Added line: 1581 +Added line: 8327 +Added line: 4067 +Added line: 3166 +Added line: 3212 +Added line: 8222 print("All changes have been made locally. Review the files and commit the changes if needed.") +Added line: 8114 +Added line: 9918 if __name__ == "__main__": +Added line: 7986 +Added line: 5485 main()