Program: 138760
Project: 138760
Buggy source:
private void tansferFile(File parentFolder) throws Exception {
  if (!parentFolder.exists()) {
    return;
  }
  List<File> fileList=new ArrayList<File>();
  FilesUtils.getAllFilesFromFolder(parentFolder,fileList,nonPropertyFileFilter);
  for (  File propFile : fileList) {
    URI uri=URI.createFileURI(propFile.getAbsolutePath());
    Resource resource=resourceSet.getResource(uri,true);
    Property property=(Property)EcoreUtil.getObjectByType(resource.getContents(),PropertiesPackage.eINSTANCE.getProperty());
    if (property != null) {
      Item item=property.getItem();
      String connNameBofore=null;
      String connNameAfter=null;
      if (item instanceof ConnectionItem) {
        Connection conn=((ConnectionItem)item).getConnection();
        connNameBofore=conn.eResource().getURI().trimFileExtension().lastSegment();
        String version=property.getVersion();
        if (version == null) {
          version="String_Node_Str";
        }
        String label=conn.getName() + "String_Node_Str" + version;
        connNameAfter=label;
      }
      IPath path=new Path(item.getState().getPath());
      if (ProxyRepositoryFactory.getInstance().getFolderItem(ProjectManager.getInstance().getCurrentProject(),ERepositoryObjectType.getItemType(item),path) == null) {
        ProxyRepositoryFactory.getInstance().createFolder(ERepositoryObjectType.getItemType(item),path.removeLastSegments(1),path.lastSegment());
      }
      if (isWorksapcePath()) {
        ProxyRepositoryFactory.getInstance().create(item,path,true);
        if (item instanceof ConnectionItem) {
          Connection conn=((ConnectionItem)item).getConnection();
          if (conn.eIsProxy()) {
            conn=(Connection)EObjectHelper.resolveObject(conn);
          }
          connNameAfter=conn.eResource().getURI().trimFileExtension().lastSegment();
        }
      }
 else {
        copyFile(parentFolder,propFile,property,path,connNameAfter);
      }
      if (connNameBofore != null && connNameAfter != null) {
        getReplaceStringMap().put(connNameBofore,connNameAfter);
      }
    }
  }
}

Fixed version (ground truth):
private void tansferFile(File parentFolder) throws Exception {
  resourceSet=new ResourceSetImpl();
  if (!parentFolder.exists()) {
    return;
  }
  List<File> fileList=new ArrayList<File>();
  FilesUtils.getAllFilesFromFolder(parentFolder,fileList,nonPropertyFileFilter);
  for (  File propFile : fileList) {
    URI uri=URI.createFileURI(propFile.getAbsolutePath());
    Resource resource=resourceSet.getResource(uri,true);
    Property property=(Property)EcoreUtil.getObjectByType(resource.getContents(),PropertiesPackage.eINSTANCE.getProperty());
    if (property != null) {
      Item item=property.getItem();
      String connNameBofore=null;
      String connNameAfter=null;
      if (item instanceof ConnectionItem) {
        Connection conn=((ConnectionItem)item).getConnection();
        connNameBofore=conn.eResource().getURI().trimFileExtension().lastSegment();
        String version=property.getVersion();
        if (version == null) {
          version="String_Node_Str";
        }
        String label=conn.getName() + "String_Node_Str" + version;
        connNameAfter=label;
      }
      IPath path=new Path(item.getState().getPath());
      if (ProxyRepositoryFactory.getInstance().getFolderItem(ProjectManager.getInstance().getCurrentProject(),ERepositoryObjectType.getItemType(item),path) == null) {
        ProxyRepositoryFactory.getInstance().createFolder(ERepositoryObjectType.getItemType(item),path.removeLastSegments(1),path.lastSegment());
      }
      if (isWorksapcePath()) {
        ProxyRepositoryFactory.getInstance().create(item,path,true);
        if (item instanceof ConnectionItem) {
          Connection conn=((ConnectionItem)item).getConnection();
          if (conn.eIsProxy()) {
            conn=(Connection)EObjectHelper.resolveObject(conn);
          }
          connNameAfter=conn.eResource().getURI().trimFileExtension().lastSegment();
        }
      }
 else {
        copyFile(parentFolder,propFile,property,path,connNameAfter);
      }
      if (connNameBofore != null && connNameAfter != null) {
        getReplaceStringMap().put(connNameBofore,connNameAfter);
      }
    }
  }
}