Program: 64185
Project: 64185
Buggy source:
/** 
 * Constructs a file path from a <code>file:</code> URI. <p>Will be an absolute path if the given URI is absolute.</p> <p>Prior to Java 1.4, swallows '%' that are not followed by two characters.</p> See <a href="http://www.w3.org/TR/xml11/#dt-sysid">dt-sysid</a> which makes some mention of how characters not supported by URI Reference syntax should be escaped.
 * @param uri the URI designating a file in the local filesystem.
 * @return the local file system path for the file.
 * @throws IllegalArgumentException if the URI is malformed or not a legal file: URL
 * @since Ant 1.6
 */
public static String fromURI(String uri){
  Class uriClazz=null;
  try {
    uriClazz=Class.forName("String_Node_Str");
  }
 catch (  ClassNotFoundException cnfe) {
  }
  if (uriClazz != null && uri.startsWith("String_Node_Str")) {
    try {
      java.lang.reflect.Method createMethod=uriClazz.getMethod("String_Node_Str",new Class[]{String.class});
      Object uriObj=createMethod.invoke(null,new Object[]{uri});
      java.lang.reflect.Constructor fileConst=File.class.getConstructor(new Class[]{uriClazz});
      File f=(File)fileConst.newInstance(new Object[]{uriObj});
      return f.getAbsolutePath();
    }
 catch (    java.lang.reflect.InvocationTargetException e) {
      Throwable e2=e.getTargetException();
      if (e2 instanceof IllegalArgumentException) {
        throw (IllegalArgumentException)e2;
      }
 else {
        e2.printStackTrace();
      }
    }
catch (    Exception e) {
      e.printStackTrace();
    }
  }
  URL url=null;
  try {
    url=new URL(uri);
  }
 catch (  MalformedURLException emYouEarlEx) {
  }
  if (url == null || !("String_Node_Str".equals(url.getProtocol()))) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  StringBuffer buf=new StringBuffer(url.getHost());
  if (buf.length() > 0) {
    buf.insert(0,File.separatorChar).insert(0,File.separatorChar);
  }
  String file=url.getFile();
  int queryPos=file.indexOf('?');
  buf.append((queryPos < 0) ? file : file.substring(0,queryPos));
  uri=buf.toString().replace('/',File.separatorChar);
  if (File.pathSeparatorChar == ';' && uri.startsWith("String_Node_Str") && uri.length() > 2 && Character.isLetter(uri.charAt(1)) && uri.lastIndexOf(':') > -1) {
    uri=uri.substring(1);
  }
  String path=null;
  try {
    path=decodeUri(uri);
    String cwd=System.getProperty("String_Node_Str");
    int posi=cwd.indexOf("String_Node_Str");
    if ((posi > 0) && path.startsWith(File.separator)) {
      path=cwd.substring(0,posi + 1) + path;
    }
  }
 catch (  UnsupportedEncodingException exc) {
    throw new IllegalStateException("String_Node_Str" + exc.getMessage());
  }
  return path;
}

Fixed version (ground truth):
/** 
 * Constructs a file path from a <code>file:</code> URI. <p>Will be an absolute path if the given URI is absolute.</p> <p>Prior to Java 1.4, swallows '%' that are not followed by two characters.</p> See <a href="http://www.w3.org/TR/xml11/#dt-sysid">dt-sysid</a> which makes some mention of how characters not supported by URI Reference syntax should be escaped.
 * @param uri the URI designating a file in the local filesystem.
 * @return the local file system path for the file.
 * @throws IllegalArgumentException if the URI is malformed or not a legal file: URL
 * @since Ant 1.6
 */
public static String fromURI(String uri){
  Class uriClazz=null;
  try {
    uriClazz=Class.forName("String_Node_Str");
  }
 catch (  ClassNotFoundException cnfe) {
  }
  if (uriClazz != null && uri.startsWith("String_Node_Str")) {
    try {
      java.lang.reflect.Method createMethod=uriClazz.getMethod("String_Node_Str",new Class[]{String.class});
      Object uriObj=createMethod.invoke(null,new Object[]{encodeURI(uri)});
      java.lang.reflect.Constructor fileConst=File.class.getConstructor(new Class[]{uriClazz});
      File f=(File)fileConst.newInstance(new Object[]{uriObj});
      return f.getAbsolutePath();
    }
 catch (    java.lang.reflect.InvocationTargetException e) {
      Throwable e2=e.getTargetException();
      if (e2 instanceof IllegalArgumentException) {
        throw (IllegalArgumentException)e2;
      }
 else {
        e2.printStackTrace();
      }
    }
catch (    Exception e) {
      e.printStackTrace();
    }
  }
  URL url=null;
  try {
    url=new URL(uri);
  }
 catch (  MalformedURLException emYouEarlEx) {
  }
  if (url == null || !("String_Node_Str".equals(url.getProtocol()))) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  StringBuffer buf=new StringBuffer(url.getHost());
  if (buf.length() > 0) {
    buf.insert(0,File.separatorChar).insert(0,File.separatorChar);
  }
  String file=url.getFile();
  int queryPos=file.indexOf('?');
  buf.append((queryPos < 0) ? file : file.substring(0,queryPos));
  uri=buf.toString().replace('/',File.separatorChar);
  if (File.pathSeparatorChar == ';' && uri.startsWith("String_Node_Str") && uri.length() > 2 && Character.isLetter(uri.charAt(1)) && uri.lastIndexOf(':') > -1) {
    uri=uri.substring(1);
  }
  String path=null;
  try {
    path=decodeUri(uri);
    String cwd=System.getProperty("String_Node_Str");
    int posi=cwd.indexOf("String_Node_Str");
    if ((posi > 0) && path.startsWith(File.separator)) {
      path=cwd.substring(0,posi + 1) + path;
    }
  }
 catch (  UnsupportedEncodingException exc) {
    throw new IllegalStateException("String_Node_Str" + exc.getMessage());
  }
  return path;
}