#vulnerable code 
                              public static ApiClient fromConfig(InputStream stream) throws IOException {
    return fromConfig(new InputStreamReader(stream)); // TODO UTF-8
  } 
                            #location 2 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              public static ApiClient fromConfig(InputStream stream) throws IOException {
    return fromConfig(new InputStreamReader(stream, StandardCharsets.UTF_8.name()));
  }