Program: 138652
Project: 138652
Buggy source:
/** 
 * DOC bZhou Comment method "update".
 * @param desFile
 * @throws IOException
 * @throws CoreException
 * @throws Exception
 */
private void update(File desFile) 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);
    URI uri=URI.createPlatformResourceURI(desIFile.getFullPath().toString(),false);
    Resource resource=EMFSharedResources.getInstance().reloadResource(uri);
    String fileExtension=desIFile.getFileExtension();
    if (fileExtension.equals(FactoriesUtil.PROPERTIES_EXTENSION)) {
      Property property=(Property)EcoreUtil.getObjectByType(resource.getContents(),PropertiesPackage.eINSTANCE.getProperty());
      if (property != null) {
        User user=ReponsitoryContextBridge.getUser();
        if (user != null && property.getAuthor() == null) {
          property.setAuthor(user);
        }
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str" + desIFile + "String_Node_Str"+ property.getLabel());
        }
        EMFSharedResources.getInstance().saveResource(property.eResource());
        Item item=property.getItem();
        EResourceConstant typedConstant=EResourceConstant.getTypedConstant(item);
        if (typedConstant == EResourceConstant.DB_CONNECTIONS || typedConstant == EResourceConstant.MDM_CONNECTIONS) {
          Connection connection=((ConnectionItem)property.getItem()).getConnection();
          IRepositoryViewObject object=new RepositoryViewObject(property);
          ProxyRepositoryViewObject.registerReposViewObj(connection,object);
        }
      }
 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());
        }
        Item item=property.getItem();
        EResourceConstant typedConstant=EResourceConstant.getTypedConstant(item);
        if (typedConstant == EResourceConstant.DB_CONNECTIONS || typedConstant == EResourceConstant.MDM_CONNECTIONS) {
          Connection connection=((ConnectionItem)property.getItem()).getConnection();
          IRepositoryViewObject object=new RepositoryViewObject(property);
          ProxyRepositoryViewObject.registerReposViewObj(connection,object);
        }
      }
 else {
        log.error("String_Node_Str" + desIFile.getFullPath().toString());
      }
    }
  }
}