Program: 92122
Project: 92122
Buggy source:
/** 
 * Get a profiling launch shortcut that provides the specified type of profiling. This looks through extensions of the extension point <code>org.eclipse.linuxtools.profiling.launch.launchProvider</code> that have a specific type attribute.
 * @param type A profiling type (eg. memory, snapshot, timing, etc.)
 * @return a profiling launch shortcut that implements <code>ProfileLaunchShortcut</code>and provides the necessary profiling type, or <code>null</code> if none could be found.
 * @since 1.1
 */
public ProfileLaunchShortcut getProfilingProvider(String type){
  IExtensionPoint extPoint=Platform.getExtensionRegistry().getExtensionPoint(ProfileLaunchPlugin.PLUGIN_ID,"String_Node_Str");
  IConfigurationElement[] configs=extPoint.getConfigurationElements();
  ArrayList<IConfigurationElement> configList=new ArrayList<IConfigurationElement>();
  for (  IConfigurationElement config : configs) {
    if (config.getName().equals("String_Node_Str")) {
      String currentType=config.getAttribute("String_Node_Str");
      String shortcut=config.getAttribute("String_Node_Str");
      if (currentType != null && shortcut != null && currentType.equals(type)) {
        String priority=config.getAttribute("String_Node_Str");
        if (priority != null) {
          try {
            Integer.parseInt(priority);
            configList.add(config);
          }
 catch (          NumberFormatException e) {
          }
        }
      }
    }
  }
  Collections.sort(configList,new Comparator<IConfigurationElement>(){
    public int compare(    IConfigurationElement c1,    IConfigurationElement c2){
      int p1, p2;
      try {
        p1=Integer.parseInt(c1.getAttribute("String_Node_Str"));
        if (p1 <= 0) {
          return 1;
        }
      }
 catch (      NumberFormatException e) {
        return 1;
      }
      try {
        p2=Integer.parseInt(c2.getAttribute("String_Node_Str"));
        if (p2 <= 0) {
          return -1;
        }
      }
 catch (      NumberFormatException e) {
        return -1;
      }
      return p1 < p2 ? -1 : 1;
    }
  }
);
  for (  IConfigurationElement config : configList) {
    try {
      Object obj=config.createExecutableExtension("String_Node_Str");
      if (obj instanceof ProfileLaunchShortcut) {
        return (ProfileLaunchShortcut)obj;
      }
    }
 catch (    CoreException e) {
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Get a profiling launch shortcut that provides the specified type of profiling. This looks through extensions of the extension point <code>org.eclipse.linuxtools.profiling.launch.launchProvider</code> that have a specific type attribute.
 * @param type A profiling type (eg. memory, snapshot, timing, etc.)
 * @return a profiling launch shortcut that implements <code>ProfileLaunchShortcut</code>and provides the necessary profiling type, or <code>null</code> if none could be found.
 * @since 1.2
 */
public ProfileLaunchShortcut getProfilingProvider(String type){
  ArrayList<IConfigurationElement> configList=getOrderedConfigElements(type);
  for (  IConfigurationElement config : configList) {
    try {
      Object obj=config.createExecutableExtension("String_Node_Str");
      if (obj instanceof ProfileLaunchShortcut) {
        return (ProfileLaunchShortcut)obj;
      }
    }
 catch (    CoreException e) {
    }
  }
  return null;
}