Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoring functions fails for large files (~200ncss) #163

Open
lyriccoder opened this issue Feb 1, 2022 · 0 comments
Open

Scoring functions fails for large files (~200ncss) #163

lyriccoder opened this issue Feb 1, 2022 · 0 comments
Assignees

Comments

@lyriccoder
Copy link
Collaborator

Traceback (most recent call last):
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 596, in _handle_exception
    resp = await self.entrypoint.handle_exception(exception)
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 1255, in handle_exception
    raise exc
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 592, in _handle_exception
    yield
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 1153, in handle_req_to_resp
    resp = await self.handle_req(
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 1179, in handle_req
    return await route.handle_req(
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 868, in handle_req
    result = await call_sync_async(self.func, **values)
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 343, in call_sync_async
    return await call(*args, **kwargs)
  File "veniq-web-service/app/./main.py", line 73, in recommend_emo_method
    ranked_emos = await recommender.get_ranked_emos(
  File "veniq-web-service/app/./recommender.py", line 67, in get_ranked_emos
    predictions = list(get_prediction_coros(
  File "veniq-web-service/app/./recommender.py", line 34, in get_prediction_coros
    slices = {x for x in get_program_slices(
  File "veniq-web-service/app/./recommender.py", line 34, in <setcomp>
    slices = {x for x in get_program_slices(
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/decomposition/block/slicing.py", line 84, in get_block_slices_from_manager
    if not slice_predicate.check_statements(
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/decomposition/slice_predicate.py", line 198, in check_statements
    if self.__general_statements is None or not checker(**kwargs):
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/decomposition/slice_predicate.py", line 227, in __check_cause_code_duplication
    affecting_statements = context.get_affecting_statements(self.__statements)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/manager.py", line 384, in get_affecting_statements
    arg_statements_by_arg_name = self.__get_arg_statements_by_arg_name(statements)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/manager.py", line 494, in __get_arg_statements_by_arg_name
    if statement in self.data_dependence_graph and \
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/manager.py", line 143, in data_dependence_graph
    self.__ddg = self.__build_ddg()
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/manager.py", line 42, in <lambda>
    self.__build_ddg = lambda: convert.cdg.to_ddg(self.control_dependence_graph)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cdg.py", line 42, in to_ddg
    cfg = to_cfg(cdg)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cdg.py", line 29, in to_cfg
    __to_cfg(root, cdg=cdg, cfg=cfg, block=block)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cdg.py", line 98, in __to_cfg
    __to_cfg(child, cdg, cfg, block)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cdg.py", line 98, in __to_cfg
    __to_cfg(child, cdg, cfg, block)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cdg.py", line 98, in __to_cfg
    __to_cfg(child, cdg, cfg, block)
  [Previous line repeated 962 more times]
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cdg.py", line 94, in __to_cfg
    prev_block.append(child)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/basic_block.py", line 35, in append
    self.__statements.append(statement)
RecursionError: maximum recursion depth exceeded while calling a Python object
['private void initComponents() {', '        java.awt.GridBagConstraints gridBagConstraints;', '        jTabbedPane1 = new javax.swing.JTabbedPane();', '        jPanel1 = new javax.swing.JPanel();']
INFO:     127.0.0.1:39266 - "POST / HTTP/1.1" 200 OK
maximum recursion depth exceeded while calling a Python object
Traceback (most recent call last):
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 596, in _handle_exception
    resp = await self.entrypoint.handle_exception(exception)
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 1255, in handle_exception
    raise exc
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 592, in _handle_exception
    yield
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 1153, in handle_req_to_resp
    resp = await self.handle_req(
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 1179, in handle_req
    return await route.handle_req(
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 868, in handle_req
    result = await call_sync_async(self.func, **values)
  File "veniq-web-service/venv/lib/python3.9/site-packages/fastapi_jsonrpc/__init__.py", line 343, in call_sync_async
    return await call(*args, **kwargs)
  File "veniq-web-service/app/./main.py", line 73, in recommend_emo_method
    ranked_emos = await recommender.get_ranked_emos(
  File "veniq-web-service/app/./recommender.py", line 67, in get_ranked_emos
    predictions = list(get_prediction_coros(
  File "veniq-web-service/app/./recommender.py", line 34, in get_prediction_coros
    slices = {x for x in get_program_slices(
  File "veniq-web-service/app/./recommender.py", line 34, in <setcomp>
    slices = {x for x in get_program_slices(
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/decomposition/block/slicing.py", line 84, in get_block_slices_from_manager
    if not slice_predicate.check_statements(
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/decomposition/slice_predicate.py", line 198, in check_statements
    if self.__general_statements is None or not checker(**kwargs):
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/decomposition/slice_predicate.py", line 227, in __check_cause_code_duplication
    affecting_statements = context.get_affecting_statements(self.__statements)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/manager.py", line 384, in get_affecting_statements
    arg_statements_by_arg_name = self.__get_arg_statements_by_arg_name(statements)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/manager.py", line 494, in __get_arg_statements_by_arg_name
    if statement in self.data_dependence_graph and \
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/manager.py", line 143, in data_dependence_graph
    self.__ddg = self.__build_ddg()
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/manager.py", line 42, in <lambda>
    self.__build_ddg = lambda: convert.cdg.to_ddg(self.control_dependence_graph)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cdg.py", line 43, in to_ddg
    return cfg_to_ddg(cfg)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cfg.py", line 42, in to_ddg
    __to_ddg(root, cfg=cfg, ddg=ddg, visited=visited, variables=variables)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cfg.py", line 86, in __to_ddg
    __to_ddg(child, cfg=cfg, ddg=ddg, visited=visited, variables=variables_passed)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cfg.py", line 86, in __to_ddg
    __to_ddg(child, cfg=cfg, ddg=ddg, visited=visited, variables=variables_passed)
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cfg.py", line 86, in __to_ddg
    __to_ddg(child, cfg=cfg, ddg=ddg, visited=visited, variables=variables_passed)
  [Previous line repeated 962 more times]
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cfg.py", line 67, in __to_ddg
    if not __update_variables(visited[root], variables):
  File "veniq-web-service/venv/lib/python3.9/site-packages/program_slicing/graph/convert/cfg.py", line 91, in __update_variables
    for variable, variable_set in new_variables.items():
RecursionError: maximum recursion depth exceeded while calling a Python object
['private void analyzeMethod(ClassContext classContext, Method method) throws CFGBuilderException, DataflowAnalysisException {', '\t\tif (isSynthetic(method) || !prescreen(classContext, method))', '\t\t\treturn;', '\t\tXMethod xmethod = XFactory.createXMethod(classContext.getJavaClass(), method);']

json_dataset.zip

Look at the json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants