Skip to content

feat: add per-variable field initializers from codeanalyzer 2.3.8#157

Merged
sinha108 merged 1 commit into
codellm-devkit:mainfrom
tylerstennett:feat/jfield-variable-initializers
Jun 5, 2026
Merged

feat: add per-variable field initializers from codeanalyzer 2.3.8#157
sinha108 merged 1 commit into
codellm-devkit:mainfrom
tylerstennett:feat/jfield-variable-initializers

Conversation

@tylerstennett

Copy link
Copy Markdown
Contributor

Mirrored the new variable_initializers field from codeanalyzer 2.3.8 on JField and updated the bundled jar.

Motivation and Context

The new codeanalyzer 2.3.8 emits field initializer expressions for allowing the consumption and processing of constants in class fields. These changes update JField to contain the new variable_initializers, instead of silently dropping it during validation.

How Has This Been Tested?

In test_java_analysis, a new test has been introduced that asserts initializers for different types of fields. The full Java-related local suites also pass.

Breaking Changes

There are no breaking changes. The new field is intentionally defaulted to None so existing cached analyses and older jars validate unchanged.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the Codellm-Devkit Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

This is a companion PR to this PR in the codeanalyzer repository.

@sinha108 sinha108 merged commit f477ab7 into codellm-devkit:main Jun 5, 2026
rahlk added a commit that referenced this pull request Jun 23, 2026
… fixes the emitter gaps

- reconstruct: a field with no initializers rehydrates to {} (not None), matching
  the analyzer's analysis.json representation.
- Verified codeanalyzer-java 2.4.1 fixes the three projection gaps (#156/#157/#158):
  rebuilt the 2.4.1 jar and re-ran the daytrader parity — fields no longer collapse
  (642 JField nodes), imports link to :JType (1449), and J_CALLS went 287 -> 1702
  (97% parity; the residual is external-target gating + run-to-run WALA variance
  between the separate --emit json and --emit neo4j invocations). Docstring/CHANGELOG
  updated; the SDK still pins 2.4.0 until 2.4.1 is released.
rahlk added a commit that referenced this pull request Jun 23, 2026
…r at 2.4.1

The Java analyzer jar is no longer a pip dependency — the SDK release workflow
downloads the latest codeanalyzer-java jar (now v2.4.1) into the bundled jar/ dir.
The earlier codeanalyzer-java==2.4.0 entry in [project.dependencies] was broken
(2.4.x is not on PyPI; PyPI tops out at 2.3.7), so remove it and bump the
[tool.backend-versions] marker to 2.4.1. v2.4.1 is now the latest release and
fixes the field/import/call-graph projection gaps (#156/#157/#158), so a graph
emitted by the bundled analyzer is a complete projection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants