Program: 125718
Project: 125718
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);
    if (ERepositoryObjectType.PROCESS.equals(itemType) && ERepositoryObjectType.findParentType(itemType) == null) {
      StandardJobImportNode standJobImportNode=this.jobNodesMap.get(itemType.getLabel());
      if (standJobImportNode == null) {
        standJobImportNode=new StandardJobImportNode(itemType);
        this.jobNodesMap.put(itemType.getLabel(),standJobImportNode);
        typeImportNode.addChild(standJobImportNode);
      }
      ImportNode parentImportNode=standJobImportNode;
      String path=item.getState().getPath();
      if (StringUtils.isNotEmpty(path)) {
        parentImportNode=findAndCreateFolderNode(standJobImportNode,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);
        }
      }
    }
 else {
      ImportNode parentImportNode=typeImportNode;
      if (parentImportNode == null) {
        parentImportNode=projectImportNode;
      }
      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;
    }
    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);
      }
    }
  }
}