Program: 4620
Project: 4620
Buggy source:
/** 
 * Factory method for instantiating individual responses from an <tt>InputStream</tt> instance.
 * @param is the <tt>InputStream</tt> to read from
 * @throws <tt>IOException</tt> if there are any problems reading fromor writing to the stream
 */
public static Response createFromStream(InputStream is) throws IOException {
  long index=ByteOrder.ubytes2long(ByteOrder.leb2int(is));
  long size=ByteOrder.ubytes2long(ByteOrder.leb2int(is));
  if ((index & 0xFFFFFFFF00000000L) != 0)   throw new IOException("String_Node_Str" + index);
  if ((size & 0xFFFFFFFF00000000L) != 0)   throw new IOException("String_Node_Str" + size);
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  int c;
  while ((c=is.read()) != 0) {
    baos.write(c);
  }
  String name=new String(baos.toByteArray());
  if (name.length() == 0) {
    throw new IOException("String_Node_Str");
  }
  baos.reset();
  while ((c=is.read()) != 0) {
    baos.write(c);
  }
  byte[] rawMeta=baos.toByteArray();
  String betweenNulls=new String(rawMeta);
  if (betweenNulls == null || betweenNulls.equals("String_Node_Str")) {
    if (is.available() < 16) {
      throw new IOException("String_Node_Str");
    }
    return new Response(index,size,name);
  }
 else {
    StringTokenizer stok=new StringTokenizer(betweenNulls,"String_Node_Str");
    Set urns=null;
    String metaString=null;
    while (stok.hasMoreTokens()) {
      String ext=stok.nextToken();
      if (URN.isUrn(ext)) {
        try {
          URN urn=URN.createSHA1Urn(ext);
          if (urns == null)           urns=new HashSet();
          urns.add(urn);
        }
 catch (        IOException e) {
          continue;
        }
      }
 else {
        metaString=createXmlString(name,ext);
      }
    }
    return new Response(index,size,name,metaString,urns,null,rawMeta);
  }
}

Fixed version (ground truth):
/** 
 * Factory method for instantiating individual responses from an <tt>InputStream</tt> instance.
 * @param is the <tt>InputStream</tt> to read from
 * @throws <tt>IOException</tt> if there are any problems reading fromor writing to the stream
 */
public static Response createFromStream(InputStream is) throws IOException {
  long index=ByteOrder.ubytes2long(ByteOrder.leb2int(is));
  long size=ByteOrder.ubytes2long(ByteOrder.leb2int(is));
  if ((index & 0xFFFFFFFF00000000L) != 0)   throw new IOException("String_Node_Str" + index);
  if (size > Integer.MAX_VALUE || size < 0)   throw new IOException("String_Node_Str" + size);
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  int c;
  while ((c=is.read()) != 0) {
    baos.write(c);
  }
  String name=new String(baos.toByteArray());
  if (name.length() == 0) {
    throw new IOException("String_Node_Str");
  }
  baos.reset();
  while ((c=is.read()) != 0) {
    baos.write(c);
  }
  byte[] rawMeta=baos.toByteArray();
  String betweenNulls=new String(rawMeta);
  if (betweenNulls == null || betweenNulls.equals("String_Node_Str")) {
    if (is.available() < 16) {
      throw new IOException("String_Node_Str");
    }
    return new Response(index,size,name);
  }
 else {
    StringTokenizer stok=new StringTokenizer(betweenNulls,"String_Node_Str");
    Set urns=null;
    String metaString=null;
    while (stok.hasMoreTokens()) {
      String ext=stok.nextToken();
      if (URN.isUrn(ext)) {
        try {
          URN urn=URN.createSHA1Urn(ext);
          if (urns == null)           urns=new HashSet();
          urns.add(urn);
        }
 catch (        IOException e) {
          continue;
        }
      }
 else {
        metaString=createXmlString(name,ext);
      }
    }
    return new Response(index,size,name,metaString,urns,null,rawMeta);
  }
}