Program: 15790
Project: 15790
Buggy source:
/** 
 * Takes as input the DOM node that specifies the test case and instantiates a   {@link TestCase} or {@code null} if the test isfiltered out. If the class is not specified by the DOM node, it defaults to  {@link TemplateTestCase} class. If the class is specified,it must extend  {@link TestCase} and have a constructor with the same parameters as of{@link TemplateTestCase#TemplateTestCase(String,String,boolean)}.
 */
private TestCase createTestCaseFromNode(Element e,Pattern filter) throws Exception {
  String name=StringUtil.emptyToNull(e.getAttribute("String_Node_Str"));
  if (name == null)   throw new Exception("String_Node_Str");
  if (filter != null && !filter.matcher(name).matches())   return null;
  String filename=StringUtil.emptyToNull(e.getAttribute("String_Node_Str"));
  if (filename == null)   filename=name + "String_Node_Str";
  String noOutputStr=StringUtil.emptyToNull(e.getAttribute("String_Node_Str"));
  boolean noOutput=noOutputStr == null ? false : StringUtil.getYesNo(noOutputStr);
  String classname=StringUtil.emptyToNull(e.getAttribute("String_Node_Str"));
  if (classname != null) {
    Class cl=Class.forName(classname);
    Constructor cons=cl.getConstructor(new Class[]{String.class,String.class,Boolean.class});
    return (TestCase)cons.newInstance(new Object[]{name,filename});
  }
 else {
    TemplateTestCase result=new TemplateTestCase(name,filename,noOutput);
    for (Iterator it=configParams.entrySet().iterator(); it.hasNext(); ) {
      Map.Entry entry=(Map.Entry)it.next();
      result.setConfigParam(entry.getKey().toString(),entry.getValue().toString());
    }
    NodeList configs=e.getElementsByTagName("String_Node_Str");
    for (int i=0; i < configs.getLength(); i++) {
      NamedNodeMap atts=configs.item(i).getAttributes();
      for (int j=0; j < atts.getLength(); j++) {
        Attr att=(Attr)atts.item(j);
        result.setConfigParam(att.getName(),att.getValue());
      }
    }
    return result;
  }
}

Fixed version (ground truth):
/** 
 * Takes as input the DOM node that specifies the test case and instantiates a   {@link TestCase} or {@code null} if the test isfiltered out. If the class is not specified by the DOM node, it defaults to  {@link TemplateTestCase} class. If the class is specified,it must extend  {@link TestCase} and have a constructor with the same parameters as of{@link TemplateTestCase#TemplateTestCase(String,String,boolean)}.
 */
private TestCase createTestCaseFromNode(Element e,Pattern filter) throws Exception {
  String name=StringUtil.emptyToNull(e.getAttribute("String_Node_Str"));
  if (name == null)   throw new Exception("String_Node_Str");
  if (filter != null && !filter.matcher(name).matches())   return null;
  String filename=StringUtil.emptyToNull(e.getAttribute("String_Node_Str"));
  if (filename == null)   filename=name + "String_Node_Str";
  String noOutputStr=StringUtil.emptyToNull(e.getAttribute("String_Node_Str"));
  boolean noOutput=noOutputStr == null ? false : StringUtil.getYesNo(noOutputStr);
  String classname=StringUtil.emptyToNull(e.getAttribute("String_Node_Str"));
  if (classname != null) {
    Class cl=Class.forName(classname);
    Constructor cons=cl.getConstructor(new Class[]{String.class,String.class,boolean.class});
    return (TestCase)cons.newInstance(new Object[]{name,filename,Boolean.valueOf(noOutput)});
  }
 else {
    TemplateTestCase result=new TemplateTestCase(name,filename,noOutput);
    for (Iterator it=configParams.entrySet().iterator(); it.hasNext(); ) {
      Map.Entry entry=(Map.Entry)it.next();
      result.setConfigParam(entry.getKey().toString(),entry.getValue().toString());
    }
    NodeList configs=e.getElementsByTagName("String_Node_Str");
    for (int i=0; i < configs.getLength(); i++) {
      NamedNodeMap atts=configs.item(i).getAttributes();
      for (int j=0; j < atts.getLength(); j++) {
        Attr att=(Attr)atts.item(j);
        result.setConfigParam(att.getName(),att.getValue());
      }
    }
    return result;
  }
}