Program: 125673
Project: 125673
Buggy source:
public void addItem(ImportItem itemRecord,List<ImportItem> children){
  if (itemRecord != null) {
    this.allImportItemRecords.add(itemRecord);
    final Project project=itemRecord.getItemProject();
    if (project == null) {
      return;
    }
    final String technicalLabel=project.getTechnicalLabel();
    ProjectImportNode projectImportNode=this.projectNodesMap.get(technicalLabel);
    if (projectImportNode == null) {
      projectImportNode=new ProjectImportNode(project);
      this.projectNodesMap.put(technicalLabel,projectImportNode);
    }
    final Item item=itemRecord.getItem();
    if (item != null && hadoopClusterService != null && hadoopClusterService.isHadoopSubItem(item)) {
      return;
    }
    final ERepositoryObjectType itemType=itemRecord.getRepositoryType();
    ImportNode typeImportNode=findAndCreateParentTypeNode(projectImportNode,itemType);
    ImportNode parentImportNode=typeImportNode;
    if (parentImportNode == null) {
      parentImportNode=projectImportNode;
    }
    if (ERepositoryObjectType.PROCESS.equals(itemType) && ERepositoryObjectType.findParentType(itemType) == null && PluginChecker.isTIS()) {
      StandardJobImportNode standJobImportNode=this.standardNodesMap.get(technicalLabel);
      if (standJobImportNode == null) {
        standJobImportNode=new StandardJobImportNode(itemType);
        this.standardNodesMap.put(technicalLabel,standJobImportNode);
        typeImportNode.addChild(standJobImportNode);
      }
      parentImportNode=standJobImportNode;
    }
    String path=item.getState().getPath();
    if (StringUtils.isNotEmpty(path)) {
      parentImportNode=findAndCreateFolderNode(typeImportNode,new Path(path));
    }
    ItemImportNode itemNode=new ItemImportNode(itemRecord);
    parentImportNode.addChild(itemNode);
    allImportItemNode.add(itemNode);
    if (children != null) {
      for (      ImportItem childRecord : children) {
        ItemImportNode childNode=new ItemImportNode(childRecord);
        itemNode.addChild(childNode);
      }
    }
  }
}

Fixed version (ground truth):
public void addItem(ImportItem itemRecord,List<ImportItem> children){
  if (itemRecord != null) {
    this.allImportItemRecords.add(itemRecord);
    final Project project=itemRecord.getItemProject();
    if (project == null) {
      return;
    }
    final String technicalLabel=project.getTechnicalLabel();
    ProjectImportNode projectImportNode=this.projectNodesMap.get(technicalLabel);
    if (projectImportNode == null) {
      projectImportNode=new ProjectImportNode(project);
      this.projectNodesMap.put(technicalLabel,projectImportNode);
    }
    final Item item=itemRecord.getItem();
    if (item != null && hadoopClusterService != null && hadoopClusterService.isHadoopSubItem(item)) {
      return;
    }
    final ERepositoryObjectType itemType=itemRecord.getRepositoryType();
    ImportNode typeImportNode=findAndCreateParentTypeNode(projectImportNode,itemType);
    ImportNode parentImportNode=typeImportNode;
    if (parentImportNode == null) {
      parentImportNode=projectImportNode;
    }
    if (ERepositoryObjectType.PROCESS.equals(itemType) && ERepositoryObjectType.findParentType(itemType) == null && PluginChecker.isTIS()) {
      StandardJobImportNode standJobImportNode=this.standardNodesMap.get(technicalLabel);
      if (standJobImportNode == null) {
        standJobImportNode=new StandardJobImportNode(itemType);
        this.standardNodesMap.put(technicalLabel,standJobImportNode);
        typeImportNode.addChild(standJobImportNode);
      }
      parentImportNode=standJobImportNode;
      typeImportNode=standJobImportNode;
    }
    String path=item.getState().getPath();
    if (StringUtils.isNotEmpty(path)) {
      parentImportNode=findAndCreateFolderNode(typeImportNode,new Path(path));
    }
    ItemImportNode itemNode=new ItemImportNode(itemRecord);
    parentImportNode.addChild(itemNode);
    allImportItemNode.add(itemNode);
    if (children != null) {
      for (      ImportItem childRecord : children) {
        ItemImportNode childNode=new ItemImportNode(childRecord);
        itemNode.addChild(childNode);
      }
    }
  }
}