Program: 183181
Project: 183181
Buggy source:
/** 
 * Create an intent from a URI.  This URI may encode the action, category, and other intent fields, if it was returned by  {@link #toUri}.  If the Intent was not generate by toUri(), its data will be the entire URI and its action will be ACTION_VIEW. <p>The URI given here must not be relative -- that is, it must include the scheme and full path.
 * @param uri The URI to turn into an Intent.
 * @param flags Additional processing flags.  Either 0 or
 * @return Intent The newly created Intent object.
 * @throws URISyntaxException Throws URISyntaxError if the basic URI syntaxit bad (as parsed by the Uri class) or the Intent data within the URI is invalid.
 * @see #toUri
 */
public static Intent parseUri(String uri,int flags) throws URISyntaxException {
  int i=0;
  try {
    if ((flags & URI_INTENT_SCHEME) != 0) {
      if (!uri.startsWith("String_Node_Str")) {
        Intent intent=new Intent(ACTION_VIEW);
        try {
          intent.setData(Uri.parse(uri));
        }
 catch (        IllegalArgumentException e) {
          throw new URISyntaxException(uri,e.getMessage());
        }
        return intent;
      }
    }
    i=uri.lastIndexOf("String_Node_Str");
    if (i == -1)     return new Intent(ACTION_VIEW,Uri.parse(uri));
    if (!uri.startsWith("String_Node_Str",i))     return getIntentOld(uri);
    Intent intent=new Intent(ACTION_VIEW);
    String data=i >= 0 ? uri.substring(0,i) : null;
    String scheme=null;
    i+="String_Node_Str".length();
    while (!uri.startsWith("String_Node_Str",i)) {
      int eq=uri.indexOf('=',i);
      int semi=uri.indexOf(';',eq);
      String value=Uri.decode(uri.substring(eq + 1,semi));
      if (uri.startsWith("String_Node_Str",i)) {
        intent.mAction=value;
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        intent.addCategory(value);
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        intent.mType=value;
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        intent.mFlags=Integer.decode(value).intValue();
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        intent.mPackage=value;
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        intent.mComponent=ComponentName.unflattenFromString(value);
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        scheme=value;
      }
 else {
        String key=Uri.decode(uri.substring(i + 2,eq));
        if (intent.mExtras == null)         intent.mExtras=new Bundle();
        Bundle b=intent.mExtras;
        if (uri.startsWith("String_Node_Str",i))         b.putString(key,value);
 else         if (uri.startsWith("String_Node_Str",i))         b.putBoolean(key,Boolean.parseBoolean(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putByte(key,Byte.parseByte(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putChar(key,value.charAt(0));
 else         if (uri.startsWith("String_Node_Str",i))         b.putDouble(key,Double.parseDouble(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putFloat(key,Float.parseFloat(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putInt(key,Integer.parseInt(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putLong(key,Long.parseLong(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putShort(key,Short.parseShort(value));
 else         throw new URISyntaxException(uri,"String_Node_Str",i);
      }
      i=semi + 1;
    }
    if (data != null) {
      if (data.startsWith("String_Node_Str")) {
        data=data.substring(7);
        if (scheme != null) {
          data=scheme + ':' + data;
        }
      }
      if (data.length() > 0) {
        try {
          intent.mData=Uri.parse(data);
        }
 catch (        IllegalArgumentException e) {
          throw new URISyntaxException(uri,e.getMessage());
        }
      }
    }
    return intent;
  }
 catch (  IndexOutOfBoundsException e) {
    throw new URISyntaxException(uri,"String_Node_Str",i);
  }
}

Fixed version (ground truth):
/** 
 * Create an intent from a URI.  This URI may encode the action, category, and other intent fields, if it was returned by  {@link #toUri}.  If the Intent was not generate by toUri(), its data will be the entire URI and its action will be ACTION_VIEW. <p>The URI given here must not be relative -- that is, it must include the scheme and full path.
 * @param uri The URI to turn into an Intent.
 * @param flags Additional processing flags.  Either 0 or{@link #URI_INTENT_SCHEME}.
 * @return Intent The newly created Intent object.
 * @throws URISyntaxException Throws URISyntaxError if the basic URI syntaxit bad (as parsed by the Uri class) or the Intent data within the URI is invalid.
 * @see #toUri
 */
public static Intent parseUri(String uri,int flags) throws URISyntaxException {
  int i=0;
  try {
    if ((flags & URI_INTENT_SCHEME) != 0) {
      if (!uri.startsWith("String_Node_Str")) {
        Intent intent=new Intent(ACTION_VIEW);
        try {
          intent.setData(Uri.parse(uri));
        }
 catch (        IllegalArgumentException e) {
          throw new URISyntaxException(uri,e.getMessage());
        }
        return intent;
      }
    }
    i=uri.lastIndexOf("String_Node_Str");
    if (i == -1)     return new Intent(ACTION_VIEW,Uri.parse(uri));
    if (!uri.startsWith("String_Node_Str",i))     return getIntentOld(uri);
    Intent intent=new Intent(ACTION_VIEW);
    String data=i >= 0 ? uri.substring(0,i) : null;
    String scheme=null;
    i+="String_Node_Str".length();
    while (!uri.startsWith("String_Node_Str",i)) {
      int eq=uri.indexOf('=',i);
      int semi=uri.indexOf(';',eq);
      String value=Uri.decode(uri.substring(eq + 1,semi));
      if (uri.startsWith("String_Node_Str",i)) {
        intent.mAction=value;
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        intent.addCategory(value);
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        intent.mType=value;
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        intent.mFlags=Integer.decode(value).intValue();
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        intent.mPackage=value;
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        intent.mComponent=ComponentName.unflattenFromString(value);
      }
 else       if (uri.startsWith("String_Node_Str",i)) {
        scheme=value;
      }
 else {
        String key=Uri.decode(uri.substring(i + 2,eq));
        if (intent.mExtras == null)         intent.mExtras=new Bundle();
        Bundle b=intent.mExtras;
        if (uri.startsWith("String_Node_Str",i))         b.putString(key,value);
 else         if (uri.startsWith("String_Node_Str",i))         b.putBoolean(key,Boolean.parseBoolean(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putByte(key,Byte.parseByte(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putChar(key,value.charAt(0));
 else         if (uri.startsWith("String_Node_Str",i))         b.putDouble(key,Double.parseDouble(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putFloat(key,Float.parseFloat(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putInt(key,Integer.parseInt(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putLong(key,Long.parseLong(value));
 else         if (uri.startsWith("String_Node_Str",i))         b.putShort(key,Short.parseShort(value));
 else         throw new URISyntaxException(uri,"String_Node_Str",i);
      }
      i=semi + 1;
    }
    if (data != null) {
      if (data.startsWith("String_Node_Str")) {
        data=data.substring(7);
        if (scheme != null) {
          data=scheme + ':' + data;
        }
      }
      if (data.length() > 0) {
        try {
          intent.mData=Uri.parse(data);
        }
 catch (        IllegalArgumentException e) {
          throw new URISyntaxException(uri,e.getMessage());
        }
      }
    }
    return intent;
  }
 catch (  IndexOutOfBoundsException e) {
    throw new URISyntaxException(uri,"String_Node_Str",i);
  }
}