Program: 94703
Project: 94703
Buggy source:
void addRetrieveExtensions(IConfigurationElement[] configElements){
  String[] existingSchemes=getPlatformSupportedSchemes();
  for (int i=0; i < configElements.length; i++) {
    final String protocol=configElements[i].getAttribute(PROTOCOL_ATTR);
    if (protocol == null || "String_Node_Str".equals(protocol))     return;
    String CONTRIBUTION_WARNING=Messages.Activator_WARNING_RETRIEVE_CONTRIBUTION_PREFIX;
    try {
      final IRetrieveFileTransferFactory clazz=(IRetrieveFileTransferFactory)configElements[i].createExecutableExtension(CLASS_ATTR);
      int priority=getPriority(configElements[i],CONTRIBUTION_WARNING,protocol);
      String contributorName=configElements[i].getDeclaringExtension().getContributor().getName();
      ProtocolFactory newProtocolFactory=new ProtocolFactory(clazz,priority,contributorName);
synchronized (retrieveFileTransferProtocolMap) {
        ProtocolFactory oldProtocolFactory=(ProtocolFactory)retrieveFileTransferProtocolMap.get(protocol);
        if (oldProtocolFactory != null) {
          int result=oldProtocolFactory.compareTo(newProtocolFactory);
          if (result < 0) {
            Activator.getDefault().log(new Status(IStatus.WARNING,PLUGIN_ID,IStatus.WARNING,NLS.bind(Messages.Activator_WARNING_EXISTING_HIGHER_PRIORITY,new Object[]{CONTRIBUTION_WARNING,protocol,contributorName}),null));
            continue;
          }
 else           if (result == 0) {
            Activator.getDefault().log(new Status(IStatus.WARNING,PLUGIN_ID,IStatus.WARNING,NLS.bind(Messages.Activator_WARNING_SAME_PRIORITY,new Object[]{CONTRIBUTION_WARNING,protocol,contributorName,new Integer(priority)}),null));
          }
 else           if (result > 0) {
            Activator.getDefault().log(new Status(IStatus.WARNING,PLUGIN_ID,IStatus.WARNING,NLS.bind(Messages.Activator_WARNING_NEW_HIGHER_PRIORITY,new Object[]{CONTRIBUTION_WARNING,protocol,contributorName,new Integer(priority),new Integer(oldProtocolFactory.priority)}),null));
          }
        }
        if (!isSchemeRegistered(protocol,existingSchemes))         registerScheme(protocol);
        retrieveFileTransferProtocolMap.put(protocol,newProtocolFactory);
      }
    }
 catch (    final CoreException e) {
      Activator.getDefault().log(new Status(IStatus.ERROR,PLUGIN_ID,IStatus.ERROR,NLS.bind(Messages.Activator_EXCEPTION_LOADING_EXTENSION_POINT,RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT),e));
    }
  }
}

Fixed version (ground truth):
void addRetrieveExtensions(IConfigurationElement[] configElements){
  String[] existingSchemes=getPlatformSupportedSchemes();
  for (int i=0; i < configElements.length; i++) {
    final String protocol=configElements[i].getAttribute(PROTOCOL_ATTR);
    if (protocol == null || "String_Node_Str".equals(protocol))     return;
    String CONTRIBUTION_WARNING="String_Node_Str";
    try {
      final IRetrieveFileTransferFactory clazz=(IRetrieveFileTransferFactory)configElements[i].createExecutableExtension(CLASS_ATTR);
      int priority=getPriority(configElements[i],CONTRIBUTION_WARNING,protocol);
      String contributorName=configElements[i].getDeclaringExtension().getContributor().getName();
      ProtocolFactory newProtocolFactory=new ProtocolFactory(clazz,priority,contributorName);
synchronized (retrieveFileTransferProtocolMap) {
        ProtocolFactory oldProtocolFactory=(ProtocolFactory)retrieveFileTransferProtocolMap.get(protocol);
        if (oldProtocolFactory != null) {
          int result=oldProtocolFactory.compareTo(newProtocolFactory);
          if (result < 0) {
            Activator.getDefault().log(new Status(IStatus.WARNING,PLUGIN_ID,IStatus.WARNING,NLS.bind("String_Node_Str",new Object[]{CONTRIBUTION_WARNING,protocol,contributorName}),null));
            continue;
          }
 else           if (result == 0) {
            Activator.getDefault().log(new Status(IStatus.WARNING,PLUGIN_ID,IStatus.WARNING,NLS.bind("String_Node_Str",new Object[]{CONTRIBUTION_WARNING,protocol,contributorName,new Integer(priority)}),null));
          }
 else           if (result > 0) {
            Activator.getDefault().log(new Status(IStatus.WARNING,PLUGIN_ID,IStatus.WARNING,NLS.bind("String_Node_Str",new Object[]{CONTRIBUTION_WARNING,protocol,contributorName,new Integer(priority),new Integer(oldProtocolFactory.priority)}),null));
          }
        }
        if (!isSchemeRegistered(protocol,existingSchemes))         registerScheme(protocol);
        retrieveFileTransferProtocolMap.put(protocol,newProtocolFactory);
      }
    }
 catch (    final CoreException e) {
      Activator.getDefault().log(new Status(IStatus.ERROR,PLUGIN_ID,IStatus.ERROR,NLS.bind("String_Node_Str",RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT),e));
    }
  }
}