Program: 102258
Project: 102258
Buggy source:
/** 
 * Return a   {@link ValidationDescriptor} instance for the specified {@link IExtension} representing an extension to the<code>ModelerCore.EXTENSION_POINT.VALIDATION</code> extension point.
 * @param extension
 */
public static List createValidationDescriptor(final IExtension extension){
  if (extension == null) {
    CoreArgCheck.isNotNull(extension,ModelerCore.Util.getString("String_Node_Str"));
  }
  final String uniqueId=extension.getExtensionPointUniqueIdentifier();
  if (!ModelerCore.EXTENSION_POINT.VALIDATION.UNIQUE_ID.equals(uniqueId)) {
    CoreArgCheck.isTrue(ModelerCore.EXTENSION_POINT.VALIDATION.UNIQUE_ID.equals(uniqueId),ModelerCore.Util.getString("String_Node_Str",ModelerCore.EXTENSION_POINT.VALIDATION.UNIQUE_ID,uniqueId));
  }
  if (ModelerCore.DEBUG_VALIDATION) {
    ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str"));
  }
  if (ModelerCore.DEBUG_VALIDATION) {
    final Object[] params=new Object[]{extension.getSimpleIdentifier()};
    ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str",params));
  }
  final IConfigurationElement[] elems=extension.getConfigurationElements();
  List descriptors=new ArrayList(elems.length);
  for (int j=0; j < elems.length; j++) {
    final IConfigurationElement elem=elems[j];
    final String elemName=elem.getName();
    if (elemName == null) {
      continue;
    }
    if (elemName.equals(ModelerCore.EXTENSION_POINT.VALIDATION.ELEMENTS.PREFERENCE)) {
      final String prefName=elem.getAttribute(ModelerCore.EXTENSION_POINT.VALIDATION.ATTRIBUTES.NAME);
      final String prefLabel=elem.getAttribute(ModelerCore.EXTENSION_POINT.VALIDATION.ATTRIBUTES.LABEL);
      final String prefCategory=elem.getAttribute(ModelerCore.EXTENSION_POINT.VALIDATION.ATTRIBUTES.CATEGORY);
      final String prefToolTip=elem.getAttribute(ModelerCore.EXTENSION_POINT.VALIDATION.ATTRIBUTES.TOOL_TIP);
      final String defaultValue=elem.getAttribute(ModelerCore.EXTENSION_POINT.VALIDATION.ATTRIBUTES.DEFAULT);
      if (prefName == null) {
        continue;
      }
      final ValidationDescriptorImpl descriptor=new ValidationDescriptorImpl();
      descriptor.setExtensionID(extension.getSimpleIdentifier());
      descriptor.setPrefernceName(prefName);
      descriptor.setPrefernceLabel(prefLabel);
      descriptor.setPrefernceCategory(prefCategory);
      descriptor.setPrefernceToolTip(prefToolTip);
      descriptor.setDefaultOption(defaultValue);
      if (ModelerCore.DEBUG_VALIDATION) {
        ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str",new Object[]{prefName}));
        ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str",new Object[]{prefLabel}));
        if (prefCategory != null) {
          ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str",new Object[]{prefCategory}));
        }
        if (prefToolTip != null) {
          ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str",new Object[]{prefToolTip}));
        }
        if (defaultValue != null) {
          ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str") + new Object[]{defaultValue});
        }
      }
      descriptors.add(descriptor);
    }
  }
  return descriptors;
}

Fixed version (ground truth):
/** 
 * Return a   {@link ValidationDescriptor} instance for the specified {@link IExtension} representing an extension to the<code>ModelerCore.EXTENSION_POINT.VALIDATION</code> extension point.
 * @param extension
 */
public static List createValidationDescriptor(final IExtension extension){
  if (extension == null) {
    CoreArgCheck.isNotNull(extension,ModelerCore.Util.getString("String_Node_Str"));
  }
  final String uniqueId=extension.getExtensionPointUniqueIdentifier();
  if (!ModelerCore.EXTENSION_POINT.VALIDATION.UNIQUE_ID.equals(uniqueId)) {
    CoreArgCheck.isTrue(ModelerCore.EXTENSION_POINT.VALIDATION.UNIQUE_ID.equals(uniqueId),ModelerCore.Util.getString("String_Node_Str",ModelerCore.EXTENSION_POINT.VALIDATION.UNIQUE_ID,uniqueId));
  }
  if (ModelerCore.DEBUG_VALIDATION) {
    ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str"));
  }
  if (ModelerCore.DEBUG_VALIDATION) {
    final Object[] params=new Object[]{extension.getSimpleIdentifier()};
    ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str",params));
  }
  final IConfigurationElement[] elems=extension.getConfigurationElements();
  List descriptors=new ArrayList(elems.length);
  for (int j=0; j < elems.length; j++) {
    final IConfigurationElement elem=elems[j];
    final String elemName=elem.getName();
    if (elemName == null) {
      continue;
    }
    if (elemName.equals(ModelerCore.EXTENSION_POINT.VALIDATION.ELEMENTS.PREFERENCE)) {
      final String prefName=elem.getAttribute(ModelerCore.EXTENSION_POINT.VALIDATION.ATTRIBUTES.NAME);
      final String prefLabel=elem.getAttribute(ModelerCore.EXTENSION_POINT.VALIDATION.ATTRIBUTES.LABEL);
      final String prefCategory=elem.getAttribute(ModelerCore.EXTENSION_POINT.VALIDATION.ATTRIBUTES.CATEGORY);
      final String prefToolTip=elem.getAttribute(ModelerCore.EXTENSION_POINT.VALIDATION.ATTRIBUTES.TOOL_TIP);
      final String defaultValue=elem.getAttribute(ModelerCore.EXTENSION_POINT.VALIDATION.ATTRIBUTES.DEFAULT);
      if (prefName == null) {
        continue;
      }
      final ValidationDescriptorImpl descriptor=new ValidationDescriptorImpl();
      descriptor.setExtensionID(extension.getSimpleIdentifier());
      descriptor.setPrefernceName(prefName);
      descriptor.setPrefernceLabel(prefLabel);
      descriptor.setPrefernceCategory(prefCategory);
      descriptor.setPrefernceToolTip(prefToolTip);
      descriptor.setDefaultOption(defaultValue);
      if (ModelerCore.DEBUG_VALIDATION) {
        ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str",new Object[]{prefName}));
        ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str",new Object[]{prefLabel}));
        if (prefCategory != null) {
          ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str",new Object[]{prefCategory}));
        }
        if (prefToolTip != null) {
          ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str",new Object[]{prefToolTip}));
        }
        if (defaultValue != null) {
          ModelerCore.Util.log(IStatus.INFO,ModelerCore.Util.getString("String_Node_Str",new Object[]{defaultValue}));
        }
      }
      descriptors.add(descriptor);
    }
  }
  return descriptors;
}