Description
Description
The JavaSitter.get_calling_lines method contains an unused variable, is_target_method_a_constructor, which was introduced in a previous PR but is never used in the implementation.
Steps to Reproduce
After doing pip install git+https://github.com/codellm-devkit/python-sdk.git
I was running into the following error
I made changes to pyproject.toml by changing the versions to the ones mentioned in the error, I removed cldk from pyproject.toml :
I also installed `brew install llvm` to resolve another library error.Cldk version:
(summarize-py3.11) ashitasaxena@Ashitas-MacBook-Pro wca-summarization % pip freeze | grep cldk
cldk @ git+https://github.com/codellm-devkit/python-sdk.git@90d4dc0c02059272384ef36c9e4f79236b6a298c
- I removed previous analysis.json and tried this command:
summarize application --project-root /Users/ashitasaxena/Documents/git_repos/modresorts --metadata-folder /Users/ashitasaxena/Documents/git_repos/wca-summarization/example/test_output/ModResort --vela-url "https://wca4j-dmf-73-zircon-vllm-wca-core-training.apps.dmf.dipc.res.ibm.com/v1/completions" --model-name /modeling/models/g20b-73-dmf-zircon-exp/step1250 --use-source-analysis
I see that analysis.json is getting generated. I'm getting the following error:
(summarize-py3.11) ashitasaxena@Ashitas-MacBook-Pro wca-summarization % summarize application --project-root /Users/ashitasaxena/Documents/git_repos/modresorts --metadata-folder /Users/ashitasaxena/Documents/git_repos/wca-summarization/example/test_output/ModResort --vela-url "https://wca4j-dmf-73-zircon-vllm-wca-core-training.apps.dmf.dipc.res.ibm.com/v1/completions" --model-name /modeling/models/g20b-73-dmf-zircon-exp/step1250 --use-source-analysis
analysis_level: symbol table
Generating Summary...All calls finished
All calls finished
All calls finished
All calls finished
Traceback (most recent call last):
File "/Users/ashitasaxena/Documents/git_repos/wca-summarization/summarize/cli.py", line 294, in application
status, output_dict = generate_application_summary(ns, wca_token, use_source_analysis=use_source_analysis,model_id=model_name,
model_url=wca_url, proj_name=proj_name, vela_url=vela_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ashitasaxena/Documents/git_repos/wca-summarization/summarize/application/application_summary.py", line 307, in
generate_application_summary
method_summary_list = gen_app_summary_app_entry_batch_par(app_summ_inp_list, use_source_analysis)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ashitasaxena/Documents/git_repos/wca-summarization/summarize/application/application_summary.py", line 365, in
gen_app_summary_app_entry_batch_par
method_summary_list = pool.map(gen_app_summary_app_entry, app_entry_inp_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/pool.py", line
367, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/pool.py", line
774, in get
raise self._value
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/pool.py", line
125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/pool.py", line 48,
in mapstar
return list(map(*args))
^^^^^^^^^^^^^^^^
File "/Users/ashitasaxena/Documents/git_repos/wca-summarization/summarize/application/application_summary.py", line 425, in
gen_app_summary_app_entry
status, prompt_list, sdg_info_dict = get_prompt_dict_list(inp.app_entry_method_name, inp.class_name, inp.ns, inp.use_source_analysis)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ashitasaxena/Documents/git_repos/wca-summarization/summarize/application/application_summary.py", line 116, in
get_prompt_dict_list
callees = ns.get_callees(candidate_class_name, prompt_dict["method_signature"], use_source_analysis)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ashitasaxena/Documents/git_repos/wca-summarization/.venv/lib/python3.11/site-packages/cldk/analysis/java/java_analysis.py",
line 263, in get_callees
return self.backend.get_all_callees(source_class_name, source_method_declaration, using_symbol_table)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/ashitasaxena/Documents/git_repos/wca-summarization/.venv/lib/python3.11/site-packages/cldk/analysis/java/codeanalyzer/codeanalyzer.py
", line 426, in get_all_callees
call_graph = self.__call_graph_using_symbol_table(qualified_class_name=source_class_name, method_signature=source_method_signature)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/ashitasaxena/Documents/git_repos/wca-summarization/.venv/lib/python3.11/site-packages/cldk/analysis/java/codeanalyzer/codeanalyzer.py
", line 677, in __call_graph_using_symbol_table
edge_list = [
^
File
"/Users/ashitasaxena/Documents/git_repos/wca-summarization/.venv/lib/python3.11/site-packages/cldk/analysis/java/codeanalyzer/codeanalyzer.py
", line 684, in <listcomp>
"calling_lines": tsu.get_calling_lines(jge.source.method.code, jge.target.method.signature),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: JavaSitter.get_calling_lines() missing 1 required positional argument: 'is_target_method_a_constructor'
Suggested Fix
- Remove is_target_method_a_constructor from the method signature.
Additional Context
- Ensure that any associated documentation or function calls and test cases are updated accordingly.