#fixed code
                              @Test
  public void testConfirmFlag() {
    try {
      final ByteArrayOutputStream os = new ByteArrayOutputStream();
      assertThat(sqlLine.getOpts().getConfirm(), is(false));
      begin(sqlLine, os, false, "-e", "!set confirm true");
      assertThat(sqlLine.getOpts().getConfirm(), is(true));
      begin(sqlLine, os, false, "-e", "!set confirm false");
      assertThat(sqlLine.getOpts().getConfirm(), is(false));
    } catch (Throwable e) {
      // fail
      throw new RuntimeException(e);
    }
  }
#vulnerable code 
                              @Test
  public void testConfirmFlag() {
    try {
      final SqlLine line = new SqlLine();
      final ByteArrayOutputStream os = new ByteArrayOutputStream();
      assertThat(line.getOpts().getConfirm(), is(false));
      begin(line, os, false, "-e", "!set confirm true");
      assertThat(line.getOpts().getConfirm(), is(true));
      begin(line, os, false, "-e", "!set confirm false");
      assertThat(line.getOpts().getConfirm(), is(false));
    } catch (Throwable e) {
      // fail
      throw new RuntimeException(e);
    }
  } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK