Program: 127865
Project: 127865
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);
  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.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);
}

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);
  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.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);
}