Program: 8991
Project: 8991
Buggy source:
/** 
 * Reconstructs a   {@link} Document) based on the persisted {@link DBRow}.
 */
public <T extends Document>T fromRow(@Nonnull Collection<T> collection,@Nonnull RDBRow row) throws DocumentStoreException {
  T doc=collection.newDocument(store);
  doc.put(ID,row.getId());
  doc.put(MODIFIED,row.getModified());
  doc.put(MODCOUNT,row.getModcount());
  if (RDBDocumentStore.USECMODCOUNT) {
    doc.put(CMODCOUNT,row.getCollisionsModcount());
  }
  if (row.hasBinaryProperties()) {
    doc.put(HASBINARY,NodeDocument.HAS_BINARY_VAL);
  }
  if (row.deletedOnce()) {
    doc.put(DELETEDONCE,Boolean.TRUE);
  }
  byte[] bdata=row.getBdata();
  boolean blobInUse=false;
  JsopTokenizer json;
  try {
    if (bdata != null && bdata.length != 0) {
      String s=fromBlobData(bdata);
      json=new JsopTokenizer(s);
      json.read('{');
      readDocumentFromJson(json,doc);
      json.read(JsopReader.END);
      blobInUse=true;
    }
  }
 catch (  Exception ex) {
    throw new DocumentStoreException(ex);
  }
  try {
    json=new JsopTokenizer(row.getData());
    int next=json.read();
    if (next == '{') {
      if (blobInUse) {
        throw new DocumentStoreException("String_Node_Str" + row.getData());
      }
      readDocumentFromJson(json,doc);
    }
 else     if (next == JsopReader.STRING) {
      if (!blobInUse) {
        throw new DocumentStoreException("String_Node_Str" + row.getData());
      }
      if (!json.getToken().equals("String_Node_Str")) {
        throw new DocumentStoreException("String_Node_Str");
      }
    }
 else {
      throw new DocumentStoreException("String_Node_Str" + next + "String_Node_Str"+ row.getData());
    }
    next=json.read();
    if (next == ',') {
      do {
        Object ob=readValueFromJson(json);
        if (!(ob instanceof List)) {
          throw new DocumentStoreException("String_Node_Str" + ob);
        }
        List<List<Object>> update=(List<List<Object>>)ob;
        for (        List<Object> op : update) {
          applyUpdate(doc,update,op);
        }
      }
 while (json.matches(','));
    }
    json.read(JsopReader.END);
    return doc;
  }
 catch (  Exception ex) {
    throw new DocumentStoreException(ex);
  }
}

Fixed version (ground truth):
/** 
 * Reconstructs a   {@link} Document) based on the persisted {@link DBRow}.
 */
public <T extends Document>T fromRow(@Nonnull Collection<T> collection,@Nonnull RDBRow row) throws DocumentStoreException {
  T doc=collection.newDocument(store);
  doc.put(ID,row.getId());
  doc.put(MODIFIED,row.getModified());
  doc.put(MODCOUNT,row.getModcount());
  if (RDBDocumentStore.USECMODCOUNT) {
    doc.put(CMODCOUNT,row.getCollisionsModcount());
  }
  if (row.hasBinaryProperties()) {
    doc.put(HASBINARY,NodeDocument.HAS_BINARY_VAL);
  }
  if (row.deletedOnce()) {
    doc.put(DELETEDONCE,Boolean.TRUE);
  }
  byte[] bdata=row.getBdata();
  boolean blobInUse=false;
  JsopTokenizer json;
  try {
    if (bdata != null && bdata.length != 0) {
      String s=fromBlobData(bdata);
      json=new JsopTokenizer(s);
      json.read('{');
      readDocumentFromJson(json,doc);
      json.read(JsopReader.END);
      blobInUse=true;
    }
  }
 catch (  Exception ex) {
    throw new DocumentStoreException(ex);
  }
  try {
    json=new JsopTokenizer(row.getData());
    int next=json.read();
    if (next == '{') {
      if (blobInUse) {
        throw new DocumentStoreException("String_Node_Str" + row.getData());
      }
      readDocumentFromJson(json,doc);
    }
 else     if (next == JsopReader.STRING) {
      if (!blobInUse) {
        throw new DocumentStoreException("String_Node_Str" + row.getData());
      }
      if (!"String_Node_Str".equals(json.getToken())) {
        throw new DocumentStoreException("String_Node_Str");
      }
    }
 else {
      throw new DocumentStoreException("String_Node_Str" + next + "String_Node_Str"+ row.getData());
    }
    next=json.read();
    if (next == ',') {
      do {
        Object ob=readValueFromJson(json);
        if (!(ob instanceof List)) {
          throw new DocumentStoreException("String_Node_Str" + ob);
        }
        List<List<Object>> update=(List<List<Object>>)ob;
        for (        List<Object> op : update) {
          applyUpdate(doc,update,op);
        }
      }
 while (json.matches(','));
    }
    json.read(JsopReader.END);
    return doc;
  }
 catch (  Exception ex) {
    throw new DocumentStoreException(ex);
  }
}