Program: 138396
Project: 138396
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) {
      URI uri=URI.createPlatformResourceURI(desIFile.getFullPath().toString(),false);
      EMFSharedResources.getInstance().reloadResource(uri);
      ResourceFileMap resourceFileMap=ModelElementFileFactory.getResourceFileMap(desIFile);
      if (resourceFileMap != null) {
        resourceFileMap.remove(desIFile);
      }
    }
    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());
        }
        Item item=property.getItem();
        EResourceConstant typedConstant=EResourceConstant.getTypedConstant(item);
        if (typedConstant == EResourceConstant.DB_CONNECTIONS || typedConstant == EResourceConstant.MDM_CONNECTIONS) {
        }
      }
 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 (!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) {
      URI uri=URI.createPlatformResourceURI(desIFile.getFullPath().toString(),false);
      EMFSharedResources.getInstance().reloadResource(uri);
      ResourceFileMap resourceFileMap=ModelElementFileFactory.getResourceFileMap(desIFile);
      if (resourceFileMap != null) {
        resourceFileMap.remove(desIFile);
      }
    }
    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());
      }
    }
  }
}