Skip to content

Missed source file for nested class #1359

Closed
@amandelpie

Description

@amandelpie

Description

Summarization for nested classes are not generated due to the not found source file in the call
Instrumenter.adapter.computeSourceFileByClass(this.method.classId.jClass, searchDirectory)

File not found, nothing to parse as a result the summaries are not generated.

To Reproduce

  1. Run the snippet of code in IntelliJ Idea
  2. Run plugin via runIde
  3. Disable Fuzzing in the Settings Panel (Fuzzing = 0 %, Symbolic = 100 %)
  4. Use plugin to generate tests
  5. Set breakpoint at the RdInstrumenterKt:33
  6. See, that the source file is not found.

Code for test generation:

public class DeepNested {
    public class Nested1 {
        public class Nested2 {
            public int f(int i) {
                if (i > 0) {
                    return 10;
                }
                return 0;
            }
        }
    }
}

Expected behavior

Source file should not be empty.

Actual behavior

Source file is not found

Visual proofs (screenshots, logs, images)

image

Additional context

Related to the #710

Metadata

Metadata

Assignees

Labels

comp-rdIssue is related RDctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions