Program: 24756
Project: 24756
Buggy source:
/** 
 * Although not completely standardized yet, most modern browsers encode Unicode characters above U+007F to UTF8 in the URL. This method looks for probably UTF8 encodings and converts them back to normal Unicode characters.
 * @param value   value to convert
 * @return        equivalent value with UTF8 decoded to Unicode
 */
public static String convertUTF8inURL(String value){
  char[] chars=value.toCharArray();
  boolean foundUTF=false;
  for (int i=0; i < chars.length; i++) {
    char c=chars[i];
    if ((c & 0xFF00) != 0)     return value;
    if (c <= 0x7F)     continue;
    if (c >= 0xC0 && c <= 0xDF && i + 1 < chars.length && chars[i + 1] >= 0x80 && chars[i + 1] <= 0xBF) {
      foundUTF=true;
      i++;
    }
 else     if (c >= 0xE0 && c <= 0xEF && i + 2 < chars.length && chars[i + 1] >= 0x80 && chars[i + 1] <= 0xBF && chars[i + 2] >= 0x80 && chars[i + 2] <= 0xBF) {
      foundUTF=true;
      i+=2;
    }
 else     if (c >= 0xF0 && c <= 0xF7 && i + 3 < chars.length && chars[i + 1] >= 0x80 && chars[i + 1] <= 0xBF && chars[i + 2] >= 0x80 && chars[i + 2] <= 0xBF && chars[i + 3] >= 0x80 && chars[i + 3] <= 0xBF) {
      foundUTF=true;
      i+=3;
    }
 else     if (c >= 0x80 && c <= 0xBF)     return value;
 else     if (c >= 0xF8 && c <= 0xFF)     return value;
  }
  if (!foundUTF)   return value;
  try {
    byte[] bytes=value.getBytes("String_Node_Str");
    return new String(bytes,"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    return value;
  }
}

Fixed version (ground truth):
/** 
 * Although not completely standardized yet, most modern browsers encode Unicode characters above U+007F to UTF8 in the URL. This method looks for probably UTF8 encodings and converts them back to normal Unicode characters. One might ask why this is necessary... doesn't URLDecoder handle it? Well, some servlet containers seem to partially decode URLs; they decode the escapes, but then they don't do the UTF-8 conversion.
 * @param value   value to convert
 * @return        equivalent value with UTF8 decoded to Unicode
 */
public static String convertUTF8inURL(String value){
  char[] chars=value.toCharArray();
  boolean foundUTF=false;
  for (int i=0; i < chars.length; i++) {
    char c=chars[i];
    if ((c & 0xFF00) != 0)     return value;
    if (c <= 0x7F)     continue;
    if (c >= 0xC0 && c <= 0xDF && i + 1 < chars.length && chars[i + 1] >= 0x80 && chars[i + 1] <= 0xBF) {
      foundUTF=true;
      i++;
    }
 else     if (c >= 0xE0 && c <= 0xEF && i + 2 < chars.length && chars[i + 1] >= 0x80 && chars[i + 1] <= 0xBF && chars[i + 2] >= 0x80 && chars[i + 2] <= 0xBF) {
      foundUTF=true;
      i+=2;
    }
 else     if (c >= 0xF0 && c <= 0xF7 && i + 3 < chars.length && chars[i + 1] >= 0x80 && chars[i + 1] <= 0xBF && chars[i + 2] >= 0x80 && chars[i + 2] <= 0xBF && chars[i + 3] >= 0x80 && chars[i + 3] <= 0xBF) {
      foundUTF=true;
      i+=3;
    }
 else     if (c >= 0x80 && c <= 0xBF)     return value;
 else     if (c >= 0xF8 && c <= 0xFF)     return value;
  }
  if (!foundUTF)   return value;
  try {
    byte[] bytes=value.getBytes("String_Node_Str");
    return new String(bytes,"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    return value;
  }
}