#vulnerable code 
                              @Test public void readerNullValue() throws Exception {
    JsonReader reader = newReader("{\"null\":1}");
    reader.beginObject();
    reader.promoteNameToValue();
    assertThat(reader.getPath()).isEqualTo("$.null");
    assertThat(reader.peek()).isEqualTo(JsonReader.Token.STRING);
    try {
      reader.nextNull();
      fail();
    } catch (JsonDataException e) {
      assertThat(e).hasMessage("Expected null but was STRING at path $.null");
    }
    assertThat(reader.nextString()).isEqualTo("null");
    assertThat(reader.getPath()).isEqualTo("$.null");
    assertThat(reader.nextInt()).isEqualTo(1);
    assertThat(reader.getPath()).isEqualTo("$.null");
    reader.endObject();
    assertThat(reader.getPath()).isEqualTo("$");
  } 
                            #location 12 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              @Test public void readerNullValue() throws Exception {
    JsonReader reader = factory.newReader("{\"null\":1}");
    reader.beginObject();
    reader.promoteNameToValue();
    assertThat(reader.getPath()).isEqualTo("$.null");
    assertThat(reader.peek()).isEqualTo(JsonReader.Token.STRING);
    try {
      reader.nextNull();
      fail();
    } catch (JsonDataException e) {
      assertThat(e.getMessage()).isIn(
          "Expected NULL but was null, a java.lang.String, at path $.null",
          "Expected null but was STRING at path $.null");
    }
    assertThat(reader.nextString()).isEqualTo("null");
    assertThat(reader.getPath()).isEqualTo("$.null");
    assertThat(reader.nextInt()).isEqualTo(1);
    assertThat(reader.getPath()).isEqualTo("$.null");
    reader.endObject();
    assertThat(reader.getPath()).isEqualTo("$");
  }