Program: 138128
Project: 138128
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 (!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 (desFile.exists()) {
    IFile desIFile=ResourceService.file2IFile(desFile);
    if (isCovered && FactoriesUtil.isEmfFile(desIFile.getFileExtension())) {
      URI uri=URI.createPlatformResourceURI(desIFile.getFullPath().toString(),false);
      EMFSharedResources.getInstance().reloadResource(uri);
    }
    String fileExtension=desIFile.getFileExtension();
    if (fileExtension.equals(FactoriesUtil.PROPERTIES_EXTENSION)) {
      Property property=PropertyHelper.getProperty(desIFile);
      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());
      }
    }
  }
}

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()) {
    IFile desIFile=ResourceService.file2IFile(desFile);
    String fileExt=desIFile.getFileExtension();
    if (FactoriesUtil.isEmfFile(fileExt)) {
      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 (isCovered) {
        URI uri=URI.createPlatformResourceURI(desIFile.getFullPath().toString(),false);
        EMFSharedResources.getInstance().reloadResource(uri);
      }
    }
    if (fileExt.equals(FactoriesUtil.PROPERTIES_EXTENSION)) {
      Property property=PropertyHelper.getProperty(desIFile);
      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());
      }
    }
  }
}