Program: 64136
Project: 64136
Buggy source:
/** 
 * @since Ant 1.6
 */
JUnitTaskMirror.JUnitResultFormatterMirror createFormatter(ClassLoader loader) throws BuildException {
  if (classname == null) {
    throw new BuildException("String_Node_Str");
  }
  Class f=null;
  try {
    if (loader == null) {
      f=Class.forName(classname);
    }
 else {
      f=Class.forName(classname,true,loader);
    }
  }
 catch (  ClassNotFoundException e) {
    throw new BuildException("String_Node_Str" + loader + "String_Node_Str"+ classname+ "String_Node_Str"+ e,e);
  }
catch (  NoClassDefFoundError e) {
    throw new BuildException("String_Node_Str" + loader + "String_Node_Str"+ classname+ "String_Node_Str"+ e,e);
  }
  Object o=null;
  try {
    o=f.newInstance();
  }
 catch (  InstantiationException e) {
    throw new BuildException(e);
  }
catch (  IllegalAccessException e) {
    throw new BuildException(e);
  }
  if (!(o instanceof JUnitTaskMirror.JUnitResultFormatterMirror)) {
    throw new BuildException(classname + "String_Node_Str");
  }
  JUnitTaskMirror.JUnitResultFormatterMirror r=(JUnitTaskMirror.JUnitResultFormatterMirror)o;
  if (useFile && outFile != null) {
    try {
      out=new BufferedOutputStream(new FileOutputStream(outFile));
    }
 catch (    java.io.IOException e) {
      throw new BuildException("String_Node_Str" + outFile,e);
    }
  }
  r.setOutput(out);
  boolean needToSetProjectReference=true;
  try {
    Field field=r.getClass().getField("String_Node_Str");
    Object value=field.get(r);
    if (value instanceof Project) {
      needToSetProjectReference=false;
    }
  }
 catch (  Exception e) {
  }
  if (needToSetProjectReference) {
    Method setter;
    try {
      setter=r.getClass().getMethod("String_Node_Str",new Class[]{Project.class});
      setter.invoke(r,new Object[]{project});
    }
 catch (    Exception e) {
    }
  }
  return r;
}

Fixed version (ground truth):
/** 
 * @since Ant 1.6
 */
JUnitTaskMirror.JUnitResultFormatterMirror createFormatter(ClassLoader loader) throws BuildException {
  if (classname == null) {
    throw new BuildException("String_Node_Str");
  }
  Class f=null;
  try {
    if (loader == null) {
      f=Class.forName(classname);
    }
 else {
      f=Class.forName(classname,true,loader);
    }
  }
 catch (  ClassNotFoundException e) {
    throw new BuildException("String_Node_Str" + loader + "String_Node_Str"+ classname+ "String_Node_Str"+ e,e);
  }
catch (  NoClassDefFoundError e) {
    throw new BuildException("String_Node_Str" + loader + "String_Node_Str"+ classname+ "String_Node_Str"+ e,e);
  }
  Object o=null;
  try {
    o=f.newInstance();
  }
 catch (  InstantiationException e) {
    throw new BuildException(e);
  }
catch (  IllegalAccessException e) {
    throw new BuildException(e);
  }
  if (!(o instanceof JUnitTaskMirror.JUnitResultFormatterMirror)) {
    throw new BuildException(classname + "String_Node_Str");
  }
  JUnitTaskMirror.JUnitResultFormatterMirror r=(JUnitTaskMirror.JUnitResultFormatterMirror)o;
  if (useFile && outFile != null) {
    try {
      out=new BufferedOutputStream(new FileOutputStream(outFile));
    }
 catch (    java.io.IOException e) {
      throw new BuildException("String_Node_Str" + outFile,e);
    }
  }
  r.setOutput(out);
  boolean needToSetProjectReference=true;
  try {
    Field field=r.getClass().getField("String_Node_Str");
    Object value=field.get(r);
    if (value instanceof Project) {
      needToSetProjectReference=false;
    }
  }
 catch (  NoSuchFieldException e) {
  }
catch (  IllegalAccessException e) {
    throw new BuildException(e);
  }
  if (needToSetProjectReference) {
    Method setter;
    try {
      setter=r.getClass().getMethod("String_Node_Str",new Class[]{Project.class});
      setter.invoke(r,new Object[]{project});
    }
 catch (    NoSuchMethodException e) {
    }
catch (    IllegalAccessException e) {
      throw new BuildException(e);
    }
catch (    InvocationTargetException e) {
      throw new BuildException(e);
    }
  }
  return r;
}