Program: 5311
Project: 5311
Buggy source:
public void load(Element element) throws NCLParsingException {
  String att_name, att_var, ch_name;
  NodeList nl;
  try {
    att_name=NCLElementAttributes.ID.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setId(att_var);
 else     throw new NCLParsingException("String_Node_Str" + att_name + "String_Node_Str");
    att_name=NCLElementAttributes.PLAYER.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setPlayer(att_var);
    att_name=NCLElementAttributes.EXPLICITDUR.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setExplicitDur(new TimeType(att_var));
    att_name=NCLElementAttributes.FREEZE.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setFreeze(Boolean.parseBoolean(att_var));
    att_name=NCLElementAttributes.MOVEUP.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Integer aux;
      try {
        aux=new Integer(att_var);
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_var + "String_Node_Str");
      }
      T desc=(T)new NCLDescriptor(att_var);
      desc.setFocusIndex(aux);
      setMoveUp(desc);
      NCLReferenceManager.getInstance().waitReference(this);
    }
    att_name=NCLElementAttributes.MOVERIGHT.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Integer aux;
      try {
        aux=new Integer(att_var);
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_var + "String_Node_Str");
      }
      T desc=(T)new NCLDescriptor(att_var);
      desc.setFocusIndex(aux);
      setMoveRight(desc);
      NCLReferenceManager.getInstance().waitReference(this);
    }
    att_name=NCLElementAttributes.MOVELEFT.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Integer aux;
      try {
        aux=new Integer(att_var);
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_var + "String_Node_Str");
      }
      T desc=(T)new NCLDescriptor(att_var);
      desc.setFocusIndex(aux);
      setMoveLeft(desc);
      NCLReferenceManager.getInstance().waitReference(this);
    }
    att_name=NCLElementAttributes.MOVEDOWN.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Integer aux;
      try {
        aux=new Integer(att_var);
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_var + "String_Node_Str");
      }
      T desc=(T)new NCLDescriptor(att_var);
      desc.setFocusIndex(aux);
      setMoveDown(desc);
      NCLReferenceManager.getInstance().waitReference(this);
    }
    att_name=NCLElementAttributes.FOCUSINDEX.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      try {
        setFocusIndex(new Integer(att_var));
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_name + "String_Node_Str"+ att_var+ "String_Node_Str");
      }
    }
    att_name=NCLElementAttributes.FOCUSBORDERCOLOR.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setFocusBorderColor(NCLColor.getEnumType(att_var));
    att_name=NCLElementAttributes.FOCUSBORDERWIDTH.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      try {
        setFocusBorderWidth(new Integer(att_var));
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_name + "String_Node_Str"+ att_var+ "String_Node_Str");
      }
    }
    att_name=NCLElementAttributes.FOCUSBORDERTRANSPARENCY.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setFocusBorderTransparency(new PercentageType(att_var));
    att_name=NCLElementAttributes.FOCUSSRC.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setFocusSrc(new SrcType(att_var));
    att_name=NCLElementAttributes.FOCUSSELSRC.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setFocusSelSrc(new SrcType(att_var));
    att_name=NCLElementAttributes.SELBORDERCOLOR.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setSelBorderColor(NCLColor.getEnumType(att_var));
    att_name=NCLElementAttributes.TRANSIN.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Et tran=(Et)NCLReferenceManager.getInstance().findTransitionReference(impl.getDoc(),att_var);
      setTransIn(tran);
    }
    att_name=NCLElementAttributes.TRANSOUT.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Et tran=(Et)NCLReferenceManager.getInstance().findTransitionReference(impl.getDoc(),att_var);
      setTransOut(tran);
    }
    att_name=NCLElementAttributes.REGION.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Er reg=(Er)NCLReferenceManager.getInstance().findRegionReference(impl.getDoc(),att_var);
      setRegion(reg);
    }
  }
 catch (  XMLException ex) {
    String aux=getId();
    if (aux != null)     aux="String_Node_Str" + aux + "String_Node_Str";
 else     aux="String_Node_Str";
    throw new NCLParsingException("String_Node_Str" + aux + "String_Node_Str"+ ex.getMessage());
  }
  try {
    ch_name=NCLElementAttributes.DESCRIPTORPARAM.toString();
    nl=element.getElementsByTagName(ch_name);
    for (int i=0; i < nl.getLength(); i++) {
      Element el=(Element)nl.item(i);
      Ep inst=createParamByType(el);
      addDescriptorParam(inst);
      inst.load(el);
    }
  }
 catch (  XMLException ex) {
    String aux=getId();
    if (aux != null)     aux="String_Node_Str" + aux + "String_Node_Str";
 else     aux="String_Node_Str";
    throw new NCLParsingException("String_Node_Str" + aux + "String_Node_Str"+ ex.getMessage());
  }
}

Fixed version (ground truth):
public void load(Element element) throws NCLParsingException {
  String att_name, att_var, ch_name;
  NodeList nl;
  try {
    att_name=NCLElementAttributes.ID.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setId(att_var);
 else     throw new NCLParsingException("String_Node_Str" + att_name + "String_Node_Str");
    att_name=NCLElementAttributes.PLAYER.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setPlayer(att_var);
    att_name=NCLElementAttributes.EXPLICITDUR.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setExplicitDur(new TimeType(att_var));
    att_name=NCLElementAttributes.FREEZE.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setFreeze(Boolean.parseBoolean(att_var));
    att_name=NCLElementAttributes.MOVEUP.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Integer aux;
      try {
        aux=new Integer(att_var);
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_var + "String_Node_Str");
      }
      T desc=(T)new NCLDescriptor("String_Node_Str" + att_var);
      desc.setFocusIndex(aux);
      setMoveUp(desc);
      NCLReferenceManager.getInstance().waitReference(this);
    }
    att_name=NCLElementAttributes.MOVERIGHT.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Integer aux;
      try {
        aux=new Integer(att_var);
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_var + "String_Node_Str");
      }
      T desc=(T)new NCLDescriptor("String_Node_Str" + att_var);
      desc.setFocusIndex(aux);
      setMoveRight(desc);
      NCLReferenceManager.getInstance().waitReference(this);
    }
    att_name=NCLElementAttributes.MOVELEFT.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Integer aux;
      try {
        aux=new Integer(att_var);
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_var + "String_Node_Str");
      }
      T desc=(T)new NCLDescriptor("String_Node_Str" + att_var);
      desc.setFocusIndex(aux);
      setMoveLeft(desc);
      NCLReferenceManager.getInstance().waitReference(this);
    }
    att_name=NCLElementAttributes.MOVEDOWN.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Integer aux;
      try {
        aux=new Integer(att_var);
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_var + "String_Node_Str");
      }
      T desc=(T)new NCLDescriptor("String_Node_Str" + att_var);
      desc.setFocusIndex(aux);
      setMoveDown(desc);
      NCLReferenceManager.getInstance().waitReference(this);
    }
    att_name=NCLElementAttributes.FOCUSINDEX.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      try {
        setFocusIndex(new Integer(att_var));
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_name + "String_Node_Str"+ att_var+ "String_Node_Str");
      }
    }
    att_name=NCLElementAttributes.FOCUSBORDERCOLOR.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setFocusBorderColor(NCLColor.getEnumType(att_var));
    att_name=NCLElementAttributes.FOCUSBORDERWIDTH.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      try {
        setFocusBorderWidth(new Integer(att_var));
      }
 catch (      Exception e) {
        throw new NCLParsingException("String_Node_Str" + att_name + "String_Node_Str"+ att_var+ "String_Node_Str");
      }
    }
    att_name=NCLElementAttributes.FOCUSBORDERTRANSPARENCY.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setFocusBorderTransparency(new PercentageType(att_var));
    att_name=NCLElementAttributes.FOCUSSRC.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setFocusSrc(new SrcType(att_var));
    att_name=NCLElementAttributes.FOCUSSELSRC.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setFocusSelSrc(new SrcType(att_var));
    att_name=NCLElementAttributes.SELBORDERCOLOR.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty())     setSelBorderColor(NCLColor.getEnumType(att_var));
    att_name=NCLElementAttributes.TRANSIN.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Et tran=(Et)NCLReferenceManager.getInstance().findTransitionReference(impl.getDoc(),att_var);
      setTransIn(tran);
    }
    att_name=NCLElementAttributes.TRANSOUT.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Et tran=(Et)NCLReferenceManager.getInstance().findTransitionReference(impl.getDoc(),att_var);
      setTransOut(tran);
    }
    att_name=NCLElementAttributes.REGION.toString();
    if (!(att_var=element.getAttribute(att_name)).isEmpty()) {
      Er reg=(Er)NCLReferenceManager.getInstance().findRegionReference(impl.getDoc(),att_var);
      setRegion(reg);
    }
  }
 catch (  XMLException ex) {
    String aux=getId();
    if (aux != null)     aux="String_Node_Str" + aux + "String_Node_Str";
 else     aux="String_Node_Str";
    throw new NCLParsingException("String_Node_Str" + aux + "String_Node_Str"+ ex.getMessage());
  }
  try {
    ch_name=NCLElementAttributes.DESCRIPTORPARAM.toString();
    nl=element.getElementsByTagName(ch_name);
    for (int i=0; i < nl.getLength(); i++) {
      Element el=(Element)nl.item(i);
      Ep inst=createParamByType(el);
      addDescriptorParam(inst);
      inst.load(el);
    }
  }
 catch (  XMLException ex) {
    String aux=getId();
    if (aux != null)     aux="String_Node_Str" + aux + "String_Node_Str";
 else     aux="String_Node_Str";
    throw new NCLParsingException("String_Node_Str" + aux + "String_Node_Str"+ ex.getMessage());
  }
}