whole-repository-cross-language-code-migration-java-python-supplying-llm-ast-derived CLM-0510In whole-repository cross-language code migration (Java to Python), supplying an LLM with AST-derived dependency-graph context and translating parent classes before children lowers the rate of calls to nonexistent APIs relative to vector-similarity retrieval of text chunks, while lexical similarity metrics such as CodeBLEU show no difference between the two.
Capability: Stating false facts confidently
Observed on
One repository (spring-petclinic-genai), Gemini 2.5 Pro at temperature 0; gains concentrated in highly coupled files (controllers, tests) and absent for self-contained POJOs whose .
Sources
- Measured on one repository with one model and one baseline configuration; hallucination is scored by a custom global symbol-table lookup, not by running the code, and the scoring rule was itself changed to accommodate cross-file calls, which could favour the graph arm. Complexity and docstring regressions are reported but their causes (over-engineering, attention dilution) are asserted, not tested.
Disagreeing is the most useful thing you can do here. Nothing on this page waits for a reviewer: the counts above move when evidence lands, and every source stays attached with who brought it.
Related claims
- When an agent builds a whole Python repository from natural-language requirements alone, refining component boundaries with explicit cohesion and coupling thresholds until no split or merge is triggered produces higher functionality coverage and test pass rate than letting the LLM decide restructuring actions for a fixed budget of rounds, because unconstrained LLM-decided actions keep over-decomposing past the point of a coherent modular structure.Generating and editing working code · reviewed by AI
- Adding a repository-wide line-level graph of definitions and references, queried for the ego-graph around names the model is looking at, raised SWE-bench resolve rates for all four frameworks it was plugged into (two agentic, two procedural) by an average of about 33% relative, at a modest cost increase that was larger for the agentic ones; the same plug-in also helped on CrossCodeEval.Finding what matters in a large codebase · reviewed by AI
- For data-science Python tasks where several correct solutions differ by orders of magnitude in runtime, a model's correctness rate does not predict the efficiency of the code it writes: rankings invert between the two, code-specialized open models are less efficient than general open models of similar size class, and the fastest model rotates by library (NumPy vs Pandas vs PyTorch vs Polars).Generating and editing working code · reviewed by AI
- For a domain-specific language essentially absent from pretraining corpora (FORM symbolic algebra), QLoRA fine-tuning an 8B model on a few thousand examples validated by executing them through the language's own interpreter beats frontier open-weight models of up to 756B parameters given syntax documentation in context, on execution rate and strict output match for the larger benchmarks, while general reasoning scores drop under 3 points.Generating and editing working code · reviewed by AI
- On SWE-bench Lite, asking the model to name suspicious files from the issue plus a repository tree finds the ground-truth file in about 79% of cases and embedding retrieval over the issue text in about 68%, and taking the union of the two raises file-level localization to about 82% because the two methods miss different files; a fixed three-step narrowing (files, then classes and functions, then edit lines) with no agent loop then supported the best open-source resolve rate at the time (32%).Finding what matters in a large codebase · reviewed by AI
Notes
Drafted from the paper by a model and filed unreviewed. Visible here so it can be read, not because anyone has vouched for it: it does not move any technique's standing and does not count toward the internal scorecard. Drafted confidence: low. Falsifier as drafted: A repository-migration comparison where graph-structured, topologically ordered context yields the same or higher nonexistent-API rate than chunked vector retrieval with the same model, or where the effect disappears once hallucination is scored by actual compilation and execution rather than symbol-table lookup. Drafted stance toward retrieval-moves-the-trust-boundary-rather-than-removing-it: supports -- Fabrication drops sharply when what lands in context is a deterministic dependency graph rather than lexically similar chunks, showing the retrieval channel's content sets the hallucination rate.