Skip to content

Judy - Gson15-f: Mutant killed but still appears as live mutant in GUI  #6

@catarinaopires

Description

@catarinaopires

Mutant in line 543 ('JIR_Ifgt') is killed by test testFlush(), that is when executing defects4j test with the mutation manually inserted in the JsonWriter.java file, the test fails. However, in the GUI, it still appears alive.

Line 543 of JsonWriter.java file

    if (stackSize == 0) {

Line 543 with manually inserted JIR_Ifgt mutation JsonWriter.java file

    if (stackSize > 0) {

StudentTest.java

@Test
    public void testFlush() throws IOException {
        StringWriter stringWriter = new StringWriter();
        JsonWriter writer = new JsonWriter(stringWriter);
        writer.value(1);
        try {
            writer.flush();
        } catch (IllegalStateException e) {
            fail();
        }
    }

JsonWriter.java

/**
   * Ensures all buffered data is written to the underlying {@link Writer}
   * and flushes that writer.
   */
  public void flush() throws IOException {
    if (stackSize == 0) {
      throw new IllegalStateException("JsonWriter is closed.");
    }
    out.flush();
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions