Skip to content

NullPointerException: null when invoking CollectionWrappersKt.constructKeysAndValues #107

Closed

Description

@alexeyfridman

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.

Activity

  1. added this to the Release preparation milestone on Sep 7, 2022
  2. added
    spec-release-tailingsFailed to include in the current release, let's include it in the next one
    on Sep 28, 2022
  3. removed this from the Release preparation milestone on Sep 28, 2022
  4. self-assigned this
    on Oct 3, 2022
  5. CaelmBleidd commented on Oct 4, 2022

    @CaelmBleidd
    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.

  6. Repository owner moved this from Todo to Done in UTBot Javaon Oct 5, 2022
  7. added this to the 2022.10.1 Release milestone on Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

comp-symbolic-engineIssue is related to the symbolic execution enginectg-bugIssue is a bugpriority-top-focusTop priority chosen by dev teamspec-release-tailingsFailed to include in the current release, let's include it in the next one

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions