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

NullPointerException: null when invoking CollectionWrappersKt.constructKeysAndValues #107

Closed
alexeyfridman opened this issue Jun 1, 2022 · 1 comment · Fixed by #1071
Assignees
Labels
comp-symbolic-engine Issue is related to the symbolic execution engine ctg-bug Issue is a bug priority-top-focus Top priority chosen by dev team spec-release-tailings Failed to include in the current release, let's include it in the next one

Comments

@alexeyfridman
Copy link
Collaborator

alexeyfridman commented Jun 1, 2022

Description

NullPointerException when invoking CollectionWrappersKt.constructKeysAndValues

To Reproduce

Steps to reproduce the behavior:

  1. Run the UTBotTest project in IntelliJ Idea
  2. Use plugin to generate tests for MapOperate method
  3. Open the generated test

Expected behavior

Tests are supposed to be generated.

Actual behavior

NullPointerException

Visual proofs (screenshots, logs, images)

Method under test:

public List<String> mapOperator(Map<String, String> map) {
    List<String> result = new ArrayList<>();
    for (Map.Entry<String, String> entry : map.entrySet()) {
        if (entry.getKey().equals("key")) {
            result.add(entry.getValue());
        }
    }
    if (result.size() > 3) {
        return result;
    } else {
        return new ArrayList<>(map.values());
    }
}

Environment

The default one.

Additional context

There is no additional context.

@alexeyfridman alexeyfridman added ctg-bug Issue is a bug priority-top-focus Top priority chosen by dev team labels Jun 1, 2022
@alexeyfridman alexeyfridman moved this to Todo in UTBot Java Jun 1, 2022
@alisevych alisevych assigned dtim and unassigned denis-fokin Sep 7, 2022
@alisevych alisevych added this to the Release preparation milestone Sep 7, 2022
@denis-fokin denis-fokin added the spec-release-tailings Failed to include in the current release, let's include it in the next one label Sep 28, 2022
@denis-fokin denis-fokin removed this from the Release preparation milestone Sep 28, 2022
@CaelmBleidd CaelmBleidd self-assigned this Oct 3, 2022
@CaelmBleidd CaelmBleidd added the comp-symbolic-engine Issue is related to the symbolic execution engine label Oct 4, 2022
@CaelmBleidd
Copy link
Member

Checked. There is no NPE anymore, but there is a problem with failed tests inside org.utbot.engine.pc.UnsatQuery#with. Because of some reason now org.utbot.engine.Traverser#initStringLiteral changes a state status into UNSAT and we get an error there.

Repository owner moved this from Todo to Done in UTBot Java Oct 5, 2022
@alisevych alisevych added this to the 2022.10.1 Release milestone Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-symbolic-engine Issue is related to the symbolic execution engine ctg-bug Issue is a bug priority-top-focus Top priority chosen by dev team spec-release-tailings Failed to include in the current release, let's include it in the next one
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants