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

Semi doesn't work with constructors #86

Open
lyriccoder opened this issue Oct 27, 2020 · 1 comment · Fixed by #91 · May be fixed by #94
Open

Semi doesn't work with constructors #86

lyriccoder opened this issue Oct 27, 2020 · 1 comment · Fixed by #91 · May be fixed by #94
Assignees
Labels
bug Something isn't working

Comments

@lyriccoder
Copy link
Member

If we pass a constructor to SEMI, it fails with the error:

Traceback (most recent call last):
  File "D:\git\veniq\veniq\dataset_collection\validation.py", line 88, in validate_row
    opport = _print_extraction_opportunities(
  File "D:\git\veniq\veniq\dataset_collection\validation.py", line 24, 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 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 17, in extract_blocks_from_statement
    raise NotImplementedError(f"Node {statement.node_type} is not supported.")
NotImplementedError: Node Constructor declaration is not supported.

for part of the file (Constructor):
VmCustomizer_VmCustomizer_96.txt

 public VmCustomizer(final GlassfishInstance instance) {
        this.instance = instance;
        javaPlatforms = JavaUtils.findSupportedPlatforms(this.instance);
        this.platformButtonText = NbBundle.getMessage(
                VmCustomizer.class,
                "VmCustomizer.platformButton");
        this.platformButtonAction = new PlatformAct
@lyriccoder lyriccoder added the bug Something isn't working label Oct 29, 2020
@aravij aravij linked a pull request Nov 2, 2020 that will close this issue
@aravij aravij closed this as completed in #91 Nov 3, 2020
@aravij
Copy link
Contributor

aravij commented Nov 5, 2020

Bug was fixed for block-statement graph but not for semantic extraction step in SEMI.

@aravij aravij reopened this Nov 5, 2020
@aravij aravij linked a pull request Nov 5, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants