GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — NPE in concrete processing static field · Issue #432 · UnitTestBot/UTBotJava

NPE in concrete processing static field  #432

New issue
Copy link
New issue
Copy link
Closed
#433
Closed
NPE in concrete processing static field #432
#433
Copy link
Assignees
Damtev
Labels
comp-symbolic-engineIssue is related to the symbolic execution engineIssue is related to the symbolic execution enginectg-bugIssue is a bugIssue is a bug

Description

@Damtev
Damtev
opened on Jul 6, 2022
Issue body actions

Description

If the first statement in MUT used a static field that should be processed concretely and which is not an enum, the engine emits UtError because of NullPointerException produced by environment.state.lastEdge == null.

To Reproduce

Try to generate a test for such a method:

public static void concreteStaticFieldAsFirstStatement() {
    System.out.println(0);
}

Expected behavior

One test is generated, which does nothing:

@Test
@DisplayName("concreteStaticFieldAsFirstStatement: -> PrintStreamPrintln")
public void testConcreteStaticFieldAsFirstStatement_PrintStreamPrintln() {
    HelloWorld.concreteStaticFieldAsFirstStatement();
}

**Actual behavior**

One error method is generated:

```java
public void testConcreteStaticFieldAsFirstStatement_errors() {
    // Couldn't generate some tests. List of errors:
    // 
    // 1 occurrences of:
    // <Throwable with empty message>

}

Environment

Commit c09568f
Java, no mocks.

Additional context

Not applicable

Activity

  1. Damtev
    added
    ctg-bugIssue is a bugIssue is a bug
    comp-symbolic-engineIssue is related to the symbolic execution engineIssue is related to the symbolic execution engine
    on Jul 6, 2022
  2. Damtev
    self-assigned this
    on Jul 6, 2022
  3. Damtev
    added this to UTBot Javaon Jul 6, 2022
  4. Damtev
    moved this to Todo in UTBot Javaon Jul 6, 2022
  5. Damtev
    moved this from Todo to In Progress in UTBot Javaon Jul 6, 2022
  6. Damtev
    closed this as completedin #433on Jul 7, 2022
  7. Repository owner moved this from In Progress to Done in UTBot Javaon Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Damtev
    Damtev

Labels

comp-symbolic-engineIssue is related to the symbolic execution engineIssue is related to the symbolic execution enginectg-bugIssue is a bugIssue is a bug

Type

No type

Projects

  • UTBot Java
    Status
    Done
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.