René's URL Explorer Experiment


Title: JaCoCo instrumentation of CCJSqlParser is approaching the constant-pool limit · Issue #2866 · JSQLParser/JSqlParser · GitHub

Open Graph Title: JaCoCo instrumentation of CCJSqlParser is approaching the constant-pool limit · Issue #2866 · JSQLParser/JSqlParser

X Title: JaCoCo instrumentation of CCJSqlParser is approaching the constant-pool limit · Issue #2866 · JSQLParser/JSqlParser

Description: Problem On current master (c84ad0ebc), JaCoCo instrumentation of the generated CCJSqlParser.class leaves only 808 entries before the class-file limit of 65,535 constant-pool entries. When the limit is exceeded, JaCoCo fails with ClassToo...

Open Graph Description: Problem On current master (c84ad0ebc), JaCoCo instrumentation of the generated CCJSqlParser.class leaves only 808 entries before the class-file limit of 65,535 constant-pool entries. When the limit...

X Description: Problem On current master (c84ad0ebc), JaCoCo instrumentation of the generated CCJSqlParser.class leaves only 808 entries before the class-file limit of 65,535 constant-pool entries. When the limit...

Opengraph URL: https://github.com/JSQLParser/JSqlParser/issues/2866

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"JaCoCo instrumentation of CCJSqlParser is approaching the constant-pool limit","articleBody":"### Problem\n\nOn current master (`c84ad0ebc`), JaCoCo instrumentation of the generated `CCJSqlParser.class` leaves only **808 entries** before the class-file limit of 65,535 constant-pool entries.\n\nWhen the limit is exceeded, JaCoCo fails with `ClassTooLargeException` and loads the parser without instrumentation. Tests still pass, but JaCoCo counts the parser as uncovered. Then `jacocoTestCoverageVerification` fails, and with it `./gradlew check` and the `gradle_check` CI job:\n\n```\nCaused by: org.jacoco.agent.rt.internal_29a6edd.asm.ClassTooLargeException: Class too large: net/sf/jsqlparser/parser/CCJSqlParser\nRule violated for bundle JSQLParser: instructions covered ratio is 0.21, but expected minimum is 0.50\n```\n\nThis happened on 2026-10-23 while combining grammar changes from #2847–#2849. Moving helpers into nested classes avoided the limit, but the remaining capacity is still small. Current master passes.\n\n### Root cause\n\nThe generated parser contains 5,591 methods, including 3,515 `jj_3*` lookahead routines. JaCoCo adds probes to measure coverage, and [probe IDs of 32,768 or more require an additional constant-pool entry each](https://www.jacoco.org/jacoco/trunk/doc/flow.html).\n\nMeasured on `c84ad0ebc`:\n\n| Metric | Value |\n|---|---:|\n| Constant pool before instrumentation | 46,304 |\n| JaCoCo probes | 51,180 |\n| Constant pool after instrumentation | 64,727 |\n| **Remaining entries** | **808** |\n\nGrammar additions can increase both the generated class size and the probe count.\n- The remaining room went from 8,161 entries on 2026-10-14 to 65 on 2026-10-22.\n- #2829 brought it back to 967, and it is already down to 808.\n- A typical grammar PR uses 10–65 entries.\n\n### Proposed short-term fix\n\nExclude only `CCJSqlParser.class` from:\n\n1. JaCoCo agent instrumentation.\n2. `jacocoTestReport`.\n3. `jacocoTestCoverageVerification`.\n\n```diff\n test {\n     jacoco {\n-        excludes = ['net/sf/jsqlparser/parser/CCJSqlParserTokenManager']\n+        excludes = ['net/sf/jsqlparser/parser/CCJSqlParserTokenManager',\n+                    'net/sf/jsqlparser/parser/CCJSqlParser']\n     }\n }\n\n jacocoTestReport {\n     ...\n+    afterEvaluate {\n+        classDirectories.setFrom(files(classDirectories.files.collect {\n+            fileTree(dir: it, exclude: [\n+                    \"**/parser/CCJSqlParserTokenManager.class\",\n+                    \"**/parser/CCJSqlParser.class\"\n+            ])\n+        }))\n+    }\n }\n\n jacocoTestCoverageVerification {\n     // Jacoco can't handle the TokenManager class\n     afterEvaluate {\n         classDirectories.setFrom(files(classDirectories.files.collect {\n             fileTree(dir: it, exclude: [\n-                    \"**CCJSqlParserTokenManager**\"\n+                    \"**/parser/CCJSqlParserTokenManager.class\",\n+                    \"**/parser/CCJSqlParser.class\"\n             ])\n         }))\n     }\n```\n\nThe exact class exclusion keeps nested parser helpers, such as `CCJSqlParser$ObjectNames`, instrumented.\n\nI also found that the existing `CCJSqlParserTokenManager` exclusion does not work in coverage verification: its `**CCJSqlParserTokenManager**` pattern does not match the class-file path. The report also currently includes the uninstrumented TokenManager. The proposed change fixes both exclusions.\n\n**Verified on current master with all 12,262 tests:**\n\n| Coverage metric | Current | Proposed |\n|---|---:|---:|\n| Instruction coverage | 75.37% | 82.74% |\n| Missed lines | 14,892 | 7,336 |\n| Tests | Pass | Pass |\n\nThese numbers change because two classes leave the calculation, not because coverage improves:\n- The uninstrumented TokenManager (0%, 815 lines) is no longer counted.\n- The parser (82.19%, 6,741 missed lines) is no longer counted.\n\nBoth configurations pass the existing coverage thresholds.\n\n**Trade-off:** We lose direct coverage measurements for the generated parser, including its grammar branches. However, all parser tests still run, and other classes, including nested helpers, remain covered. If the parser is split later (see below), the exclusion can be reverted.\n\n### Longer-term solution: split the generated parser\n\nExcluding the parser from JaCoCo addresses the immediate issue. The parser itself, however, already uses 46,304 constant-pool entries without instrumentation, and javac fails with \"too many constants\" beyond 65,535. For comparison, it used 12,266 in 5.3 and 34,231 in 5.4.\n\nTwo contributors to its size are:\n\n- **Lookahead routines:** 3,515 `jj_3*` methods generated into one class.\n- **Grammar locations:** since 5.4, `jj_consume_token` and `jj_scan_token` calls pass grammar locations such as `\"18424:7\"`, which are used in parse error messages. There are 7,353 distinct location strings, taking about 14,700 constant-pool entries (32% of the pool).\n\nI tested a small proof of concept that moves the `jj_3*` routines into a non-static inner class while preserving their method bodies.\n\n| Metric | Master | PoC |\n|---|---:|---:|\n| Parser constant pool (uninstrumented) | 46,304 | 37,834 |\n| Remaining entries after JaCoCo | 808 | 23,451 |\n| Tests | 12,262 passed | 12,262 passed |\n\nThe new inner class uses 17,060 entries and has 48,454 left after instrumentation. The parser remains instrumented, and preliminary performance measurements showed no clear difference (not a JMH benchmark).\n\nThis would require a change in the JavaCC 8 generator (`manticore-projects/javacc-8-java`) rather than JSQLParser's build configuration. It would substantially increase headroom, but it does not stop growth: applied to the 2026-10-14 parser, the parser class still used 5,637 entries over the following two weeks. Continued grammar growth and the location strings would still need attention.\n\nIf this direction is interesting, I can open a separate issue in `manticore-projects/javacc-8-java` with the PoC and measurements.\n\n### Additional notes\n\n- **Maven:** `mvn verify` does not enforce JaCoCo coverage thresholds, but its agent can encounter the same instrumentation failure. Consistent exclusions would require updating both `prepare-agent` and `report`.\n- **Verification rules:** The existing rule-level `excludes` have no effect, because the rules use the default `BUNDLE` element and the lists are matched against the bundle name. The proposed `classDirectories` exclusions remove only the two parser classes; the rule-level lists are left unchanged.\n- **Measurement:** The remaining capacity was measured using JaCoCo's `Instrumenter`. JaCoCo 0.8.14 and 0.8.15 produced the same result.\n\n\u003cdetails>\n\u003csummary>Measurement code\u003c/summary>\n\n```java\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport org.jacoco.core.instr.Instrumenter;\nimport org.jacoco.core.runtime.OfflineInstrumentationAccessGenerator;\n\npublic class JacocoHeadroom {\n    public static void main(String[] args) throws Exception {\n        byte[] original = Files.readAllBytes(Path.of(args[0]));\n        byte[] instrumented = new Instrumenter(new OfflineInstrumentationAccessGenerator())\n                .instrument(original, \"CCJSqlParser\");\n        int count = ((instrumented[8] & 0xff) \u003c\u003c 8) | (instrumented[9] & 0xff);\n        System.out.println(\"constant_pool_count=\" + count + \" left=\" + (65535 - count));\n    }\n}\n```\n\nThe agent's runtime access code differs slightly from the offline one, so treat the number as approximate.\n\n\u003c/details>\n\nI'm happy to prepare a PR for the short-term fix if this approach is acceptable.\n\nAI assistance: prepared with Claude Code.\n","author":{"url":"https://github.com/minleejae","@type":"Person","name":"minleejae"},"datePublished":"2026-10-28T04:59:09Z","url":"https://github.com/JSQLParser/JSqlParser/issues/2866"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7430e8e4-f95d-a808-1488-e70294b2d8a6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDE20:367E0F:4DD23E:690BB3:6B043DD2
html-safe-nonce83946a7cb437f855bf689d92231717ff0cef7feef6294748045767c1a8dfb4e9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTIwOjM2N0UwRjo0REQyM0U6NjkwQkIzOjZCMDQzREQyIiwidmlzaXRvcl9pZCI6IjE1NTg1OTYyMzQyNTQ3NjE0MjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac214ea45e2223f2dc596b3ee6ad462e41a1800aacdd9a271ccef42b834a803367
hovercard-subject-tagissue:6072913886
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSQLParser/JSqlParser/2866/issue_layout
twitter:imagehttps://opengraph.githubassets.com/de610f71cdf29cba444e6eb3ad661275df6d69fd5b0e1f5c16d0b2c0c64a9504/JSQLParser/JSqlParser/issues/2866
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/de610f71cdf29cba444e6eb3ad661275df6d69fd5b0e1f5c16d0b2c0c64a9504/JSQLParser/JSqlParser/issues/2866
og:image:altProblem On current master (c84ad0ebc), JaCoCo instrumentation of the generated CCJSqlParser.class leaves only 808 entries before the class-file limit of 65,535 constant-pool entries. When the limit...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameminleejae
hostnamegithub.com
expected-hostnamegithub.com
None9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64
turbo-cache-controlno-preview
go-importgithub.com/JSQLParser/JSqlParser git https://github.com/JSQLParser/JSqlParser.git
octolytics-dimension-user_id4643847
octolytics-dimension-user_loginJSQLParser
octolytics-dimension-repository_id1944709
octolytics-dimension-repository_nwoJSQLParser/JSqlParser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1944709
octolytics-dimension-repository_network_root_nwoJSQLParser/JSqlParser
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release06dc448a76fe4751ac1db26524aefa3aa3e889a8
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/JSQLParser/JSqlParser/issues/2866#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSQLParser%2FJSqlParser%2Fissues%2F2866
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSQLParser%2FJSqlParser%2Fissues%2F2866
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JSQLParser%2FJSqlParser
Reloadhttps://github.com/JSQLParser/JSqlParser/issues/2866
Reloadhttps://github.com/JSQLParser/JSqlParser/issues/2866
Reloadhttps://github.com/JSQLParser/JSqlParser/issues/2866
JSQLParserhttps://github.com/JSQLParser
JSqlParserhttps://github.com/JSQLParser/JSqlParser
Codehttps://github.com/JSQLParser/JSqlParser
Issues2 (2)https://github.com/JSQLParser/JSqlParser/issues
Pull requests2 (2)https://github.com/JSQLParser/JSqlParser/pulls
Discussionshttps://github.com/JSQLParser/JSqlParser/discussions
Actionshttps://github.com/JSQLParser/JSqlParser/actions
Projectshttps://github.com/JSQLParser/JSqlParser/projects
Wikihttps://github.com/JSQLParser/JSqlParser/wiki
Security and qualityhttps://github.com/JSQLParser/JSqlParser/security
Insightshttps://github.com/JSQLParser/JSqlParser/insights
https://github.com/JSQLParser/JSqlParser
New issuehttps://github.com/login?return_to=https://github.com/JSQLParser/JSqlParser/issues/2866
New issuehttps://github.com/login?return_to=https://github.com/JSQLParser/JSqlParser/issues/2866
JaCoCo instrumentation of CCJSqlParser is approaching the constant-pool limithttps://github.com/JSQLParser/JSqlParser/issues/2866#top
https://github.com/minleejae
minleejaehttps://github.com/minleejae
on Oct 28, 2026https://github.com/JSQLParser/JSqlParser/issues/2866#issue-6072913886
#2847https://github.com/JSQLParser/JSqlParser/pull/2847
#2849https://github.com/JSQLParser/JSqlParser/pull/2849
probe IDs of 32,768 or more require an additional constant-pool entry eachhttps://www.jacoco.org/jacoco/trunk/doc/flow.html
perf: bound single-token lookahead probes #2829https://github.com/JSQLParser/JSqlParser/pull/2829
https://github.com/manticore-projects
manticore-projectshttps://github.com/manticore-projects
on Oct 28, 2026https://github.com/JSQLParser/JSqlParser/issues/2866#issuecomment-6461964891
https://github.com/manticore-projects
manticore-projectshttps://github.com/manticore-projects
on Oct 28, 2026https://github.com/JSQLParser/JSqlParser/issues/2866#issuecomment-6461990702
https://github.com/minleejae
minleejaehttps://github.com/minleejae
on Oct 28, 2026https://github.com/JSQLParser/JSqlParser/issues/2866#issuecomment-6462834537
@manticore-projectshttps://github.com/manticore-projects
manticore-projectshttps://github.com/manticore-projects
on Oct 29, 2026https://github.com/JSQLParser/JSqlParser/issues/2866#event-34547092774
build: exclude the generated CCJSqlParser from JaCoCo (#2867)https://github.com/JSQLParser/JSqlParser/commit/401a81a24ac823c105a743c8913aab5ffe8d138f
#2867https://github.com/JSQLParser/JSqlParser/pull/2867
401a81ahttps://github.com/JSQLParser/JSqlParser/commit/401a81a24ac823c105a743c8913aab5ffe8d138f
https://github.com/manticore-projects
manticore-projectshttps://github.com/manticore-projects
on Nov 13, 2026https://github.com/JSQLParser/JSqlParser/issues/2866#issuecomment-6841232126
manticore-projectshttps://github.com/manticore-projects
completedhttps://github.com/JSQLParser/JSqlParser/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 13, 2026https://github.com/JSQLParser/JSqlParser/issues/2866#event-35982640532
Sign up for freehttps://github.com/signup?return_to=https://github.com/JSQLParser/JSqlParser/issues/2866
Sign in to commenthttps://github.com/login?return_to=https://github.com/JSQLParser/JSqlParser/issues/2866
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.