Program: 5299
Project: 5299
Buggy source:
public void load(Element element) throws XMLException {
  String att_name, att_var;
  NodeList nl;
  att_name=NCLElementAttributes.ID.toString();
  if (!(att_var=element.getAttribute(att_name)).isEmpty())   setId(att_var);
  nl=element.getChildNodes();
  for (int i=0; i < nl.getLength(); i++) {
    Node nd=nl.item(i);
    if (nd instanceof Element) {
      Element el=(Element)nl.item(i);
      if (el.getTagName().equals(NCLElementAttributes.PROPERTY.toString()))       addProperty(createProperty(el));
      if (el.getTagName().equals(NCLElementAttributes.META.toString()))       addMeta(createMeta(el));
      if (el.getTagName().equals(NCLElementAttributes.METADATA.toString()))       addMetadata(createMetadata(el));
      if (el.getTagName().equals(NCLElementAttributes.MEDIA.toString()))       addNode(createMedia(el));
      if (el.getTagName().equals(NCLElementAttributes.CONTEXT.toString()))       addNode(createContext(el));
      if (el.getTagName().equals(NCLElementAttributes.SWITCH.toString()))       addNode(createSwitch(el));
    }
  }
  nl=element.getChildNodes();
  for (int i=0; i < nl.getLength(); i++) {
    Node nd=nl.item(i);
    if (nd instanceof Element) {
      Element el=(Element)nl.item(i);
      if (el.getTagName().equals(NCLElementAttributes.PORT.toString()))       addPort(createPort(el));
      if (el.getTagName().equals(NCLElementAttributes.LINK.toString()))       addLink(createLink(el));
    }
  }
}

Fixed version (ground truth):
public void load(Element element) throws XMLException {
  String att_name, att_var;
  NodeList nl;
  att_name=NCLElementAttributes.ID.toString();
  if (!(att_var=element.getAttribute(att_name)).isEmpty())   setId(att_var);
  nl=element.getChildNodes();
  for (int i=0; i < nl.getLength(); i++) {
    Node nd=nl.item(i);
    if (nd instanceof Element) {
      Element el=(Element)nl.item(i);
      if (el.getTagName().equals(NCLElementAttributes.PROPERTY.toString())) {
        Epp inst=createProperty();
        addProperty(inst);
        inst.load(el);
      }
      if (el.getTagName().equals(NCLElementAttributes.META.toString())) {
        Em inst=createMeta();
        addMeta(inst);
        inst.load(el);
      }
      if (el.getTagName().equals(NCLElementAttributes.METADATA.toString())) {
        Emt inst=createMetadata();
        addMetadata(inst);
        inst.load(el);
      }
      if (el.getTagName().equals(NCLElementAttributes.MEDIA.toString())) {
        En inst=createMedia();
        addNode(inst);
        inst.load(el);
      }
      if (el.getTagName().equals(NCLElementAttributes.CONTEXT.toString())) {
        En inst=createContext();
        addNode(inst);
        inst.load(el);
      }
      if (el.getTagName().equals(NCLElementAttributes.SWITCH.toString())) {
        En inst=createSwitch();
        addNode(inst);
        inst.load(el);
      }
    }
  }
  nl=element.getChildNodes();
  for (int i=0; i < nl.getLength(); i++) {
    Node nd=nl.item(i);
    if (nd instanceof Element) {
      Element el=(Element)nl.item(i);
      if (el.getTagName().equals(NCLElementAttributes.PORT.toString())) {
        Ept inst=createPort();
        addPort(inst);
        inst.load(el);
      }
      if (el.getTagName().equals(NCLElementAttributes.LINK.toString())) {
        El inst=createLink();
        addLink(inst);
        inst.load(el);
      }
    }
  }
}