Program: 20269
Project: 20269
Buggy source:
@SuppressWarnings("String_Node_Str") public Result createSession(HttpClient client,Command command) throws IOException {
  Capabilities desiredCapabilities=(Capabilities)command.getParameters().get("String_Node_Str");
  Capabilities desired=desiredCapabilities == null ? new ImmutableCapabilities() : desiredCapabilities;
  int threshold=(int)Math.min(Runtime.getRuntime().freeMemory() / 10,Integer.MAX_VALUE);
  FileBackedOutputStream os=new FileBackedOutputStream(threshold);
  try {
    CountingOutputStream counter=new CountingOutputStream(os);
    Writer writer=new OutputStreamWriter(counter,UTF_8);
    NewAppiumSessionPayload payload=NewAppiumSessionPayload.create(desired);
    payload.writeTo(writer);
    try (InputStream rawIn=os.asByteSource().openBufferedStream();BufferedInputStream contentStream=new BufferedInputStream(rawIn)){
      Method createSessionMethod=this.getClass().getSuperclass().getDeclaredMethod("String_Node_Str",HttpClient.class,InputStream.class,long.class);
      createSessionMethod.setAccessible(true);
      Optional<Result> result=(Optional<Result>)createSessionMethod.invoke(this,client,contentStream,counter.getCount());
      return result.map(result1 -> {
        Result toReturn=result.get();
        System.out.print(format("String_Node_Str",toReturn.getDialect()));
        return toReturn;
      }
).orElseThrow(() -> new SessionNotCreatedException(format("String_Node_Str",desired)));
    }
 catch (    NoSuchMethodException|IllegalAccessException|InvocationTargetException e) {
      throw new WebDriverException(format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",HttpClient.class.getSimpleName(),InputStream.class.getSimpleName(),long.class.getSimpleName()),e);
    }
  }
  finally {
    os.reset();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Result createSession(HttpClient client,Command command) throws IOException {
  Capabilities desiredCapabilities=(Capabilities)command.getParameters().get("String_Node_Str");
  Capabilities desired=desiredCapabilities == null ? new ImmutableCapabilities() : desiredCapabilities;
  int threshold=(int)Math.min(Runtime.getRuntime().freeMemory() / 10,Integer.MAX_VALUE);
  FileBackedOutputStream os=new FileBackedOutputStream(threshold);
  try {
    CountingOutputStream counter=new CountingOutputStream(os);
    Writer writer=new OutputStreamWriter(counter,UTF_8);
    NewAppiumSessionPayload payload=NewAppiumSessionPayload.create(desired);
    payload.writeTo(writer);
    try (InputStream rawIn=os.asByteSource().openBufferedStream();BufferedInputStream contentStream=new BufferedInputStream(rawIn)){
      Method createSessionMethod=this.getClass().getSuperclass().getDeclaredMethod("String_Node_Str",HttpClient.class,InputStream.class,long.class);
      createSessionMethod.setAccessible(true);
      Optional<Result> result=(Optional<Result>)createSessionMethod.invoke(this,client,contentStream,counter.getCount());
      return result.map(result1 -> {
        Result toReturn=result.get();
        getLogger(ProtocolHandshake.class.getName()).info(format("String_Node_Str",toReturn.getDialect()));
        return toReturn;
      }
).orElseThrow(() -> new SessionNotCreatedException(format("String_Node_Str",desired)));
    }
 catch (    NoSuchMethodException|IllegalAccessException|InvocationTargetException e) {
      throw new WebDriverException(format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",HttpClient.class.getSimpleName(),InputStream.class.getSimpleName(),long.class.getSimpleName()),e);
    }
  }
  finally {
    os.reset();
  }
}