Program: 58241
Project: 58241
Buggy source:
/** 
 * Parse editorconfig files corresponding to the file path given by filename, and return the parsing result.
 * @param filePath The full path to be parsed. The path is usually the path ofthe file which is currently edited by the editor.
 * @return The parsing result stored in a list of{@link EditorConfig.OutPair}.
 * @throws org.editorconfig.core.ParsingException If an {@code .editorconfig}file could not be parsed
 * @throws org.editorconfig.core.VersionException If version greater thanactual is specified in constructor
 * @throws org.editorconfig.core.EditorConfigException If an EditorConfigexception occurs. Usually one of  {@link ParsingException} or{@link VersionException}
 */
public List<OutPair> getProperties(String filePath) throws EditorConfigException {
  checkAssertions();
  Map<String,String> oldOptions=Collections.emptyMap();
  Map<String,String> options=new LinkedHashMap<String,String>();
  try {
    boolean root=false;
    String dir=new File(filePath).getParent();
    while (dir != null && !root) {
      String configPath=dir + "String_Node_Str" + configFilename;
      if (new File(configPath).exists()) {
        FileInputStream stream=new FileInputStream(configPath);
        InputStreamReader reader=new InputStreamReader(stream,"String_Node_Str");
        BufferedReader bufferedReader=new BufferedReader(reader);
        try {
          root=parseFile(bufferedReader,dir + "String_Node_Str",filePath,options);
        }
  finally {
          bufferedReader.close();
          reader.close();
          stream.close();
        }
      }
      options.putAll(oldOptions);
      oldOptions=options;
      options=new LinkedHashMap<String,String>();
      dir=new File(dir).getParent();
    }
  }
 catch (  IOException e) {
    throw new EditorConfigException(null,e);
  }
  preprocessOptions(oldOptions);
  final List<OutPair> result=new ArrayList<OutPair>();
  for (  Map.Entry<String,String> keyValue : oldOptions.entrySet()) {
    result.add(new OutPair(keyValue.getKey(),keyValue.getValue()));
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Parse editorconfig files corresponding to the file path given by filename, and return the parsing result.
 * @param filePath The full path to be parsed. The path is usually the path ofthe file which is currently edited by the editor.
 * @return The parsing result stored in a list of{@link EditorConfig.OutPair}.
 * @throws org.editorconfig.core.ParsingException If an {@code .editorconfig}file could not be parsed
 * @throws org.editorconfig.core.VersionException If version greater thanactual is specified in constructor
 * @throws org.editorconfig.core.EditorConfigException If an EditorConfigexception occurs. Usually one of  {@link ParsingException} or{@link VersionException}
 */
public List<OutPair> getProperties(String filePath) throws EditorConfigException {
  checkAssertions();
  Map<String,String> oldOptions=Collections.emptyMap();
  Map<String,String> options=new LinkedHashMap<String,String>();
  try {
    boolean root=false;
    String dir=new File(filePath).getParent();
    while (dir != null && !root) {
      String configPath=dir + "String_Node_Str" + configFilename;
      for (      File file : new File(dir).listFiles()) {
        if (getFileExtension(file).equals(configFilename)) {
          configPath=file.getAbsolutePath();
        }
      }
      if (new File(configPath).exists()) {
        FileInputStream stream=new FileInputStream(configPath);
        InputStreamReader reader=new InputStreamReader(stream,"String_Node_Str");
        BufferedReader bufferedReader=new BufferedReader(reader);
        try {
          root=parseFile(bufferedReader,dir + "String_Node_Str",filePath,options);
        }
  finally {
          bufferedReader.close();
          reader.close();
          stream.close();
        }
      }
      options.putAll(oldOptions);
      oldOptions=options;
      options=new LinkedHashMap<String,String>();
      dir=new File(dir).getParent();
    }
  }
 catch (  IOException e) {
    throw new EditorConfigException(null,e);
  }
  preprocessOptions(oldOptions);
  final List<OutPair> result=new ArrayList<OutPair>();
  for (  Map.Entry<String,String> keyValue : oldOptions.entrySet()) {
    result.add(new OutPair(keyValue.getKey(),keyValue.getValue()));
  }
  return result;
}