From 035d8fe786318a45895aaba11ca61496b6b408f2 Mon Sep 17 00:00:00 2001 From: Rangeet Pan Date: Thu, 20 Feb 2025 08:07:40 -0500 Subject: [PATCH] removed unused parameter issue #104 --- cldk/analysis/java/codeanalyzer/codeanalyzer.py | 2 +- tests/analysis/java/test_java_sitter.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cldk/analysis/java/codeanalyzer/codeanalyzer.py b/cldk/analysis/java/codeanalyzer/codeanalyzer.py index 54198dd..3e85b4d 100644 --- a/cldk/analysis/java/codeanalyzer/codeanalyzer.py +++ b/cldk/analysis/java/codeanalyzer/codeanalyzer.py @@ -313,7 +313,7 @@ def _generate_call_graph(self, using_symbol_table) -> DiGraph: "type": jge.type, "weight": jge.weight, "calling_lines": ( - tsu.get_calling_lines(jge.source.method.code, jge.target.method.signature, jge.target.method.is_constructor) + tsu.get_calling_lines(jge.source.method.code, jge.target.method.signature) if not jge.source.method.is_implicit or not jge.target.method.is_implicit else [] ), diff --git a/tests/analysis/java/test_java_sitter.py b/tests/analysis/java/test_java_sitter.py index 936e75b..d1b3c4d 100644 --- a/tests/analysis/java/test_java_sitter.py +++ b/tests/analysis/java/test_java_sitter.py @@ -287,14 +287,14 @@ def test_get_calling_lines(): } """ # test where call is found - calling_lines = java_sitter.get_calling_lines(source_method_code, "hasNext", False) + calling_lines = java_sitter.get_calling_lines(source_method_code, "hasNext") assert calling_lines is not None assert isinstance(calling_lines, List) assert len(calling_lines) == 1 assert calling_lines[0] == 7 # test where call is not found - calling_lines = java_sitter.get_calling_lines(source_method_code, "foo", False) + calling_lines = java_sitter.get_calling_lines(source_method_code, "foo") assert calling_lines is not None assert isinstance(calling_lines, List) assert len(calling_lines) == 0