Skip to content

Commit

Permalink
JVM: Fix bug on cross reference code retrieval (#424)
Browse files Browse the repository at this point in the history
This PR fixes a bug in the wrong source code retrieval logic for
function cross reference.

Signed-off-by: Arthur Chan <[email protected]>
  • Loading branch information
arthurscchan committed Jul 3, 2024
1 parent 739d89b commit c99f52b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions llm_toolkit/prompt_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,10 +724,8 @@ def _format_source_reference(self, signature: str) -> Tuple[str, str]:

# Query for source code of target method callsites
xref_source_list = []
for xref in introspector.query_introspector_cross_references(
for xref_source in introspector.query_introspector_cross_references(
self.benchmark.project, signature):
xref_source = introspector.query_introspector_function_source(
self.benchmark.project, xref)
if xref_source:
xref_source_list.append(xref_source)

Expand Down

0 comments on commit c99f52b

Please sign in to comment.