Program: 136676
Project: 136676
Buggy source:
/** 
 * DOC bZhou Comment method "update".
 * @param desFile
 * @param isCovered
 * @throws IOException
 * @throws CoreException
 * @throws Exception
 */
private void update(File desFile,boolean isCovered) throws IOException, CoreException {
  String curProjectLabel=ResourceManager.getRootProjectName();
  if (desFile.exists()) {
    boolean needReloadResource=false;
    IFile desIFile=ResourceService.file2IFile(desFile);
    String fileExt=desIFile.getFileExtension();
    if (FactoriesUtil.isEmfFile(fileExt)) {
      needReloadResource=true;
      if (!StringUtils.equals(projectName,curProjectLabel)) {
        String content=FileUtils.readFileToString(desFile,"String_Node_Str");
        content=StringUtils.replace(content,"String_Node_Str" + projectName + "String_Node_Str","String_Node_Str" + curProjectLabel + "String_Node_Str");
        FileUtils.writeStringToFile(desFile,content,"String_Node_Str");
      }
    }
    if (fileExt.equals(FactoriesUtil.PROPERTIES_EXTENSION)) {
      needReloadResource=true;
      Property property=PropertyHelper.getProperty(desIFile,true);
      if (property != null) {
        User user=ReponsitoryContextBridge.getUser();
        if (user != null && property.getAuthor() == null) {
          property.setAuthor(user);
          EMFSharedResources.getInstance().saveResource(property.eResource());
        }
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str" + desIFile + "String_Node_Str"+ property.getLabel());
        }
      }
 else {
        log.error("String_Node_Str" + desIFile.getFullPath().toString());
      }
    }
    if (isCovered && needReloadResource) {
      URI uri=URI.createPlatformResourceURI(desIFile.getFullPath().toString(),false);
      EMFSharedResources.getInstance().reloadResource(uri);
    }
  }
 else {
    log.error(DefaultMessagesImpl.getString("String_Node_Str",desFile.getAbsolutePath()));
  }
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "update".
 * @param desFile
 * @param isCovered
 * @throws IOException
 * @throws CoreException
 * @throws Exception
 */
private void update(File desFile,boolean isCovered) throws IOException, CoreException {
  String curProjectLabel=ResourceManager.getRootProjectName();
  if (desFile.exists()) {
    boolean needReloadResource=false;
    IFile desIFile=ResourceService.file2IFile(desFile);
    String fileExt=desIFile.getFileExtension();
    if (FactoriesUtil.isEmfFile(fileExt)) {
      needReloadResource=true;
      if (!StringUtils.equals(projectName,curProjectLabel)) {
        String content=FileUtils.readFileToString(desFile,"String_Node_Str");
        content=StringUtils.replace(content,"String_Node_Str" + projectName + "String_Node_Str","String_Node_Str" + curProjectLabel + "String_Node_Str");
        FileUtils.writeStringToFile(desFile,content,"String_Node_Str");
      }
    }
    if (fileExt.equals(FactoriesUtil.PROPERTIES_EXTENSION)) {
      needReloadResource=true;
      Property property=PropertyHelper.getProperty(desIFile,true);
      if (property != null) {
        User user=ReponsitoryContextBridge.getUser();
        if (user != null && property.getAuthor().getLogin() == null) {
          property.setAuthor(user);
          EMFSharedResources.getInstance().saveResource(property.eResource());
        }
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str" + desIFile + "String_Node_Str"+ property.getLabel());
        }
      }
 else {
        log.error("String_Node_Str" + desIFile.getFullPath().toString());
      }
    }
    if (isCovered && needReloadResource) {
      URI uri=URI.createPlatformResourceURI(desIFile.getFullPath().toString(),false);
      EMFSharedResources.getInstance().reloadResource(uri);
    }
  }
 else {
    log.error(DefaultMessagesImpl.getString("String_Node_Str",desFile.getAbsolutePath()));
  }
}