Program: 50960
Project: 50960
Buggy source:
public static void updateProjectInfo(ProjectInfo info,File phrescoFolder) throws PhrescoException {
  BufferedWriter out=null;
  FileWriter fstream=null;
  BufferedReader reader=null;
  try {
    Gson gson=new Gson();
    reader=new BufferedReader(new FileReader(phrescoFolder));
    ProjectInfo projectInfos=gson.fromJson(reader,ProjectInfo.class);
    List<ModuleGroup> ProjectInfomodules=projectInfos.getTechnology().getModules();
    List<ModuleGroup> projectInfojsLibraries=projectInfos.getTechnology().getJsLibraries();
    List<ModuleGroup> selectedInfomodules=info.getTechnology().getModules();
    List<ModuleGroup> selectedInfojsLibraries=info.getTechnology().getJsLibraries();
    if (ProjectInfomodules != null && !ProjectInfomodules.isEmpty()) {
      selectedInfomodules.addAll(ProjectInfomodules);
    }
    if (projectInfojsLibraries != null && !projectInfojsLibraries.isEmpty() && selectedInfojsLibraries != null) {
      selectedInfojsLibraries.addAll(projectInfojsLibraries);
    }
    info.getTechnology().setModules(selectedInfomodules);
    info.getTechnology().setJsLibraries(selectedInfojsLibraries);
    String infoJSON=gson.toJson(info);
    fstream=new FileWriter(phrescoFolder.getPath());
    out=new BufferedWriter(fstream);
    out.write(infoJSON);
  }
 catch (  IOException e) {
    throw new PhrescoException(e);
  }
 finally {
    try {
      if (out != null) {
        out.close();
      }
      if (fstream != null) {
        fstream.close();
      }
    }
 catch (    IOException e) {
      throw new PhrescoException(e);
    }
  }
}

Fixed version (ground truth):
public static void updateProjectInfo(ProjectInfo info,File phrescoFolder) throws PhrescoException {
  BufferedWriter out=null;
  FileWriter fstream=null;
  BufferedReader reader=null;
  try {
    Gson gson=new Gson();
    reader=new BufferedReader(new FileReader(phrescoFolder));
    ProjectInfo projectInfos=gson.fromJson(reader,ProjectInfo.class);
    List<ModuleGroup> ProjectInfomodules=projectInfos.getTechnology().getModules();
    List<ModuleGroup> projectInfojsLibraries=projectInfos.getTechnology().getJsLibraries();
    List<ModuleGroup> selectedInfomodules=info.getTechnology().getModules();
    List<ModuleGroup> selectedInfojsLibraries=info.getTechnology().getJsLibraries();
    if (ProjectInfomodules != null && !ProjectInfomodules.isEmpty() && selectedInfomodules != null) {
      selectedInfomodules.addAll(ProjectInfomodules);
      info.getTechnology().setModules(selectedInfomodules);
    }
 else     if (ProjectInfomodules != null) {
      info.getTechnology().setModules(ProjectInfomodules);
    }
    if (projectInfojsLibraries != null && !projectInfojsLibraries.isEmpty() && selectedInfojsLibraries != null) {
      selectedInfojsLibraries.addAll(projectInfojsLibraries);
      info.getTechnology().setModules(selectedInfojsLibraries);
    }
 else     if (projectInfojsLibraries != null) {
      info.getTechnology().setModules(ProjectInfomodules);
    }
    String infoJSON=gson.toJson(info);
    fstream=new FileWriter(phrescoFolder.getPath());
    out=new BufferedWriter(fstream);
    out.write(infoJSON);
  }
 catch (  IOException e) {
    throw new PhrescoException(e);
  }
 finally {
    Utility.closeStream(reader);
    try {
      if (out != null) {
        out.close();
      }
      if (fstream != null) {
        fstream.close();
      }
    }
 catch (    IOException e) {
      throw new PhrescoException(e);
    }
  }
}