You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--emit neo4j: all JField nodes share id <fqn>#field#null, collapsing every field of a class into one node #156
--emit neo4j assigns every :JField node the id <ownerFqn>#field#null, so all fields of a class collapse into a single :JField node (the unique-constraint MERGE keeps only the last). Field data is almost entirely lost.
Environment
codeanalyzer-java 2.4.0
Impact
Measured on the daytrader8 sample (level 2): all 122 :JField nodes in the database have an id ending in #field#null, and every one has name = null. A class with 17 fields (e.g. XMLObject, RunStatsDataBean) ends up with a single:JField node. Any consumer reading fields from the graph (e.g. the CLDK SDK's read-only Java backend) gets one field per class instead of all of them.
MATCH (f:JField) WHEREf.idENDSWITH'#field#null'RETURNcount(f); // 122 (== total JField count)MATCH (:JType{id:'...XMLObject'})-[:J_HAS_FIELD]->(f:JField) RETURNf.id;
// -> '...XMLObject#field#null' (a single node; ref analysis.json has 17 field_declarations)
Root cause
neo4j/GraphProjector.java, projectField:
Stringid = ownerFqn + "#field#" + f.getName();
A Java field declaration is keyed by its variables list, not a single name — Field.getName() is null here (the model has no scalar field name; the projected node even sets "name", f.getName() ⇒ null). So every field's id is <fqn>#field#null, and the j_field_id uniqueness constraint collapses them on MERGE.
Suggested fix
Key the field id by something unique per declaration — e.g. the first variable name, the joined variables, or a positional index:
Activity
Merge pull request #159 from codellm-devkit/fix/issues-156-157-158