cqfn / veniq

Veniq uses Machine Learning to analyze source code, find possible refactorings, and suggest those that seem optimal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Veniq WP. Semi fails when extract_method_statements_semantic

lyriccoder opened this issue · comments

During run of extract_method_statements_semantic the error occurs
InternalElkGraphLexer_mTokens_1338.txt

data/small_dataset/output_files/InternalMetaDataLexer_mTokens_3800.java
Traceback (most recent call last):
  File "D:/git/veniq/veniq/dataset_collection/validation.py", line 97, in <module>
    opport = _print_extraction_opportunities(
  File "D:/git/veniq/veniq/dataset_collection/validation.py", line 18, in _print_extraction_opportunities
    statements_semantic = extract_method_statements_semantic(method_ast)
  File "D:\git\veniq\veniq\baselines\semi\extract_semantic.py", line 12, in extract_method_statements_semantic
    block_statement_graph = build_block_statement_graph(method_ast)
  File "D:\git\veniq\veniq\ast_framework\block_statement_graph\builder.py", line 15, in build_block_statement_graph
    root_index = _build_graph_from_statement(method_ast.get_root(), graph)
  File "D:\git\veniq\veniq\ast_framework\block_statement_graph\builder.py", line 26, in _build_graph_from_statement
    new_block_index = _build_graph_from_block(block, graph)
  File "D:\git\veniq\veniq\ast_framework\block_statement_graph\builder.py", line 40, in _build_graph_from_block
    new_statement_index = _build_graph_from_statement(statement, graph)
  File "D:\git\veniq\veniq\ast_framework\block_statement_graph\builder.py", line 24, in _build_graph_from_statement
    blocks = extract_blocks_from_statement(statement)
  File "D:\git\veniq\veniq\ast_framework\block_statement_graph\_block_extractors.py", line 15, in extract_blocks_from_statement
    return _block_extractors[statement.node_type](statement)
  File "D:\git\veniq\veniq\ast_framework\block_statement_graph\_block_extractors.py", line 92, in _extract_blocks_from_try_statement
    for catch_clause in statement.catches:
TypeError: 'NoneType' object is not iterable