Program: 123566
Project: 123566
Buggy source:
/** 
 * get all projectsettingPage node
 * @return PreferenceManager
 */
private PreferenceManager getNodeManager(){
  PreferenceManager manager=new PreferenceManager();
  IExtensionRegistry registry=Platform.getExtensionRegistry();
  IConfigurationElement[] configurationElements=registry.getConfigurationElementsFor("String_Node_Str");
  for (int i=0; i < configurationElements.length; i++) {
    IConfigurationElement element=configurationElements[i];
    ProjectSettingNode node=new ProjectSettingNode(element);
    try {
      IPreferencePage page=(IPreferencePage)element.createExecutableExtension("String_Node_Str");
      node.setPage(page);
      page.setDescription(element.getAttribute("String_Node_Str"));
      page.setTitle(element.getAttribute("String_Node_Str"));
    }
 catch (    CoreException e) {
      ExceptionHandler.process(e);
    }
    String category=node.getCategory();
    if (category == null) {
      if (node.getPage() instanceof CustomComponentSettingPage) {
        if (PluginChecker.isSVNProviderPluginLoaded() && !ProjectManager.getInstance().getCurrentProject().isLocal()) {
          manager.addToRoot(node);
        }
 else {
          continue;
        }
      }
 else {
        manager.addToRoot(node);
      }
    }
 else {
      IPreferenceNode parent=manager.find(category);
      if (parent != null) {
        parent.add(node);
      }
    }
  }
  IPreferenceNode[] rootSubNodes=manager.getRootSubNodes();
  Arrays.sort(rootSubNodes,new Comparator(){
    public int compare(    Object o1,    Object o2){
      if (o1 instanceof ProjectSettingNode && o2 instanceof ProjectSettingNode) {
        ProjectSettingNode node1=(ProjectSettingNode)o1;
        ProjectSettingNode node2=(ProjectSettingNode)o2;
        if (node1.getOrder() != null && node2.getOrder() != null) {
          return node1.getOrder().compareTo(node2.getOrder());
        }
      }
      return -1;
    }
  }
);
  manager.removeAll();
  for (int i=0; i < rootSubNodes.length; i++) {
    manager.addToRoot(rootSubNodes[i]);
  }
  return manager;
}

Fixed version (ground truth):
/** 
 * get all projectsettingPage node
 * @return PreferenceManager
 */
private PreferenceManager getNodeManager(){
  PreferenceManager manager=new PreferenceManager();
  IExtensionRegistry registry=Platform.getExtensionRegistry();
  IConfigurationElement[] configurationElements=registry.getConfigurationElementsFor("String_Node_Str");
  for (int i=0; i < configurationElements.length; i++) {
    IConfigurationElement element=configurationElements[i];
    ProjectSettingNode node=new ProjectSettingNode(element);
    try {
      IPreferencePage page=(IPreferencePage)element.createExecutableExtension("String_Node_Str");
      node.setPage(page);
      String id=element.getAttribute("String_Node_Str");
      if (id.equals("String_Node_Str")) {
        IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
        boolean allowVerchange=brandingService.getBrandingConfiguration().isAllowChengeVersion();
        if (!allowVerchange) {
          continue;
        }
      }
      page.setDescription(element.getAttribute("String_Node_Str"));
      page.setTitle(element.getAttribute("String_Node_Str"));
    }
 catch (    CoreException e) {
      ExceptionHandler.process(e);
    }
    String category=node.getCategory();
    if (category == null) {
      if (node.getPage() instanceof CustomComponentSettingPage) {
        if (PluginChecker.isSVNProviderPluginLoaded() && !ProjectManager.getInstance().getCurrentProject().isLocal()) {
          manager.addToRoot(node);
        }
 else {
          continue;
        }
      }
 else {
        manager.addToRoot(node);
      }
    }
 else {
      IPreferenceNode parent=manager.find(category);
      if (parent != null) {
        parent.add(node);
      }
    }
  }
  IPreferenceNode[] rootSubNodes=manager.getRootSubNodes();
  Arrays.sort(rootSubNodes,new Comparator(){
    public int compare(    Object o1,    Object o2){
      if (o1 instanceof ProjectSettingNode && o2 instanceof ProjectSettingNode) {
        ProjectSettingNode node1=(ProjectSettingNode)o1;
        ProjectSettingNode node2=(ProjectSettingNode)o2;
        if (node1.getOrder() != null && node2.getOrder() != null) {
          return node1.getOrder().compareTo(node2.getOrder());
        }
      }
      return -1;
    }
  }
);
  manager.removeAll();
  for (int i=0; i < rootSubNodes.length; i++) {
    manager.addToRoot(rootSubNodes[i]);
  }
  return manager;
}