Program: 127968
Project: 127968
Buggy source:
public void initialize(String currentPerspective){
  this.currentPerspective=currentPerspective;
  nodeAndProject=new HashMap<Object,List<Project>>();
  IRepositoryNode curParentNode=null;
  String urlBranch=null;
  if (ProjectManager.getInstance().getCurrentBranchURL(project) != null) {
    urlBranch=showSVNRoot();
  }
  if ("String_Node_Str".equals(urlBranch) || urlBranch == null) {
    curParentNode=this;
  }
 else {
    List<IRepositoryNode> root=getChildren();
    svnRootNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    svnRootNode.setProperties(EProperties.LABEL,ERepositoryObjectType.SVN_ROOT + "String_Node_Str" + urlBranch+ "String_Node_Str");
    svnRootNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.SVN_ROOT);
    if (root.contains(svnRootNode)) {
      return;
    }
    root.add(svnRootNode);
    curParentNode=svnRootNode;
  }
  List<IRepositoryNode> nodes=curParentNode.getChildren();
  recBinNode=new BinRepositoryNode(this);
  nodes.add(recBinNode);
  sqlPatternNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
  sqlPatternNode.setProperties(EProperties.LABEL,ERepositoryObjectType.SQLPATTERNS);
  sqlPatternNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.SQLPATTERNS);
  nodes.add(sqlPatternNode);
  docNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
  docNode.setProperties(EProperties.LABEL,ERepositoryObjectType.DOCUMENTATION);
  docNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.DOCUMENTATION);
  nodes.add(docNode);
  metadataNode=new RepositoryNode(null,this,ENodeType.STABLE_SYSTEM_FOLDER);
  metadataNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA);
  metadataNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA);
  nodes.add(metadataNode);
  metadataConNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
  metadataConNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CONNECTIONS);
  metadataConNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CONNECTIONS);
  metadataNode.getChildren().add(metadataConNode);
  metadataFileNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
  metadataFileNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_DELIMITED);
  metadataFileNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_DELIMITED);
  metadataNode.getChildren().add(metadataFileNode);
  if (PluginChecker.isSAPWizardPluginLoaded() && LanguageManager.getCurrentLanguage() == ECodeLanguage.JAVA) {
    metadataSAPConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataSAPConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_SAPCONNECTIONS);
    metadataSAPConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_SAPCONNECTIONS);
    metadataNode.getChildren().add(metadataSAPConnectionNode);
  }
  if (PluginChecker.isHL7PluginLoaded()) {
    metadataHL7ConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataHL7ConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_HL7);
    metadataHL7ConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_HL7);
    metadataNode.getChildren().add(metadataHL7ConnectionNode);
  }
  if (PluginChecker.isFTPPluginLoaded()) {
    metadataFTPConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataFTPConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_FTP);
    metadataFTPConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_FTP);
    metadataNode.getChildren().add(metadataFTPConnectionNode);
  }
  if (PluginChecker.isEBCDICPluginLoaded()) {
    metadataEbcdicConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataEbcdicConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_EBCDIC);
    metadataEbcdicConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_EBCDIC);
    metadataNode.getChildren().add(metadataEbcdicConnectionNode);
  }
  if (PluginChecker.isSurvivorshipPluginLoaded() || PluginChecker.isRulesPluginLoaded() || PluginChecker.isBRMSPluginLoaded()) {
    StableRepositoryNode baseRulesNode=new StableRepositoryNode(this,Messages.getString("String_Node_Str"),ECoreImage.METADATA_RULES_ICON);
    baseRulesNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_RULES_MANAGEMENT);
    metadataNode.getChildren().add(baseRulesNode);
    if (PluginChecker.isBRMSPluginLoaded()) {
      metadataBRMSConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
      metadataBRMSConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_BRMS);
      metadataBRMSConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_BRMS);
      baseRulesNode.getChildren().add(metadataBRMSConnectionNode);
    }
    if (PluginChecker.isRulesPluginLoaded()) {
      metadataRulesNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
      metadataRulesNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_RULES);
      metadataRulesNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_RULES);
      baseRulesNode.getChildren().add(metadataRulesNode);
    }
  }
  if (PluginChecker.isValidationrulesPluginLoaded()) {
    metadataValidationRulesNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataValidationRulesNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_VALIDATION_RULES);
    metadataValidationRulesNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_VALIDATION_RULES);
    metadataNode.getChildren().add(metadataValidationRulesNode);
  }
  if (PluginChecker.isEDIFACTPluginLoaded()) {
    metadataEDIFactConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataEDIFactConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_EDIFACT);
    metadataEDIFactConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_EDIFACT);
    metadataNode.getChildren().add(metadataEDIFactConnectionNode);
  }
  if (PluginChecker.isRefProjectLoaded() && getParent() != this && project != null && project.getEmfProject().getReferencedProjects().size() > 0) {
    refProject=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    refProject.setProperties(EProperties.LABEL,ERepositoryObjectType.REFERENCED_PROJECTS);
    refProject.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.REFERENCED_PROJECTS);
    nodes.add(refProject);
  }
  deleteHiddenNodes(nodes);
  initExtensionRepositoryNodes(curParentNode);
  try {
    hideHiddenNodesDependsUserRight();
  }
 catch (  JSONException e) {
    ExceptionHandler.process(e);
  }
  collectRepositoryNodes(curParentNode);
}

Fixed version (ground truth):
public void initialize(String currentPerspective){
  this.currentPerspective=currentPerspective;
  nodeAndProject=new HashMap<Object,List<Project>>();
  IRepositoryNode curParentNode=null;
  String urlBranch=null;
  if (ProjectManager.getInstance().getCurrentBranchURL(project) != null) {
    urlBranch=showSVNRoot();
  }
  if ("String_Node_Str".equals(urlBranch) || urlBranch == null) {
    curParentNode=this;
  }
 else {
    List<IRepositoryNode> root=getChildren();
    svnRootNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    svnRootNode.setProperties(EProperties.LABEL,ERepositoryObjectType.SVN_ROOT + "String_Node_Str" + urlBranch+ "String_Node_Str");
    svnRootNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.SVN_ROOT);
    if (root.contains(svnRootNode)) {
      return;
    }
    root.add(svnRootNode);
    curParentNode=svnRootNode;
  }
  List<IRepositoryNode> nodes=curParentNode.getChildren();
  recBinNode=new BinRepositoryNode(this);
  nodes.add(recBinNode);
  sqlPatternNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
  sqlPatternNode.setProperties(EProperties.LABEL,ERepositoryObjectType.SQLPATTERNS);
  sqlPatternNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.SQLPATTERNS);
  nodes.add(sqlPatternNode);
  docNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
  docNode.setProperties(EProperties.LABEL,ERepositoryObjectType.DOCUMENTATION);
  docNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.DOCUMENTATION);
  nodes.add(docNode);
  metadataNode=new RepositoryNode(null,this,ENodeType.STABLE_SYSTEM_FOLDER);
  metadataNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA);
  metadataNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA);
  nodes.add(metadataNode);
  metadataConNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
  metadataConNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_CONNECTIONS);
  metadataConNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_CONNECTIONS);
  metadataNode.getChildren().add(metadataConNode);
  metadataFileNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
  metadataFileNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_DELIMITED);
  metadataFileNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_DELIMITED);
  metadataNode.getChildren().add(metadataFileNode);
  if (PluginChecker.isSAPWizardPluginLoaded() && LanguageManager.getCurrentLanguage() == ECodeLanguage.JAVA) {
    metadataSAPConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataSAPConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_SAPCONNECTIONS);
    metadataSAPConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_SAPCONNECTIONS);
    metadataNode.getChildren().add(metadataSAPConnectionNode);
  }
  if (PluginChecker.isHL7PluginLoaded()) {
    metadataHL7ConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataHL7ConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_HL7);
    metadataHL7ConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_HL7);
    metadataNode.getChildren().add(metadataHL7ConnectionNode);
  }
  if (PluginChecker.isFTPPluginLoaded()) {
    metadataFTPConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataFTPConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_FTP);
    metadataFTPConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_FTP);
    metadataNode.getChildren().add(metadataFTPConnectionNode);
  }
  if (PluginChecker.isEBCDICPluginLoaded()) {
    metadataEbcdicConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataEbcdicConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_EBCDIC);
    metadataEbcdicConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_EBCDIC);
    metadataNode.getChildren().add(metadataEbcdicConnectionNode);
  }
  if (PluginChecker.isSurvivorshipPluginLoaded() || PluginChecker.isRulesPluginLoaded() || PluginChecker.isBRMSPluginLoaded()) {
    StableRepositoryNode baseRulesNode=new StableRepositoryNode(this,Messages.getString("String_Node_Str"),ECoreImage.METADATA_RULES_ICON);
    baseRulesNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_RULES_MANAGEMENT);
    metadataNode.getChildren().add(baseRulesNode);
    if (PluginChecker.isBRMSPluginLoaded()) {
      metadataBRMSConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
      metadataBRMSConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_BRMS);
      metadataBRMSConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_BRMS);
      baseRulesNode.getChildren().add(metadataBRMSConnectionNode);
    }
    if (PluginChecker.isRulesPluginLoaded()) {
      metadataRulesNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
      metadataRulesNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_FILE_RULES);
      metadataRulesNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_FILE_RULES);
      baseRulesNode.getChildren().add(metadataRulesNode);
    }
  }
  if (PluginChecker.isValidationrulesPluginLoaded()) {
    metadataValidationRulesNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataValidationRulesNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_VALIDATION_RULES);
    metadataValidationRulesNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_VALIDATION_RULES);
    metadataNode.getChildren().add(metadataValidationRulesNode);
  }
  if (PluginChecker.isEDIFACTPluginLoaded()) {
    metadataEDIFactConnectionNode=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    metadataEDIFactConnectionNode.setProperties(EProperties.LABEL,ERepositoryObjectType.METADATA_EDIFACT);
    metadataEDIFactConnectionNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_EDIFACT);
    metadataNode.getChildren().add(metadataEDIFactConnectionNode);
  }
  if (PluginChecker.isRefProjectLoaded() && getParent() != this && project != null && project.getEmfProject().getReferencedProjects().size() > 0) {
    refProject=new RepositoryNode(null,this,ENodeType.SYSTEM_FOLDER);
    refProject.setProperties(EProperties.LABEL,ERepositoryObjectType.REFERENCED_PROJECTS);
    refProject.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.REFERENCED_PROJECTS);
    nodes.add(refProject);
  }
  initExtensionRepositoryNodes(curParentNode);
  deleteHiddenNodes(nodes);
  try {
    hideHiddenNodesDependsUserRight();
  }
 catch (  JSONException e) {
    ExceptionHandler.process(e);
  }
  collectRepositoryNodes(curParentNode);
}