Program: 194063
Project: 194063
Buggy source:
boolean writeNextEntryToParcel(AssistStructure as,Parcel out,PooledStringWriter pwriter){
  if (mCurViewStackEntry != null) {
    if (mCurViewStackEntry.curChild < mCurViewStackEntry.numChildren) {
      if (DEBUG_PARCEL_TREE)       Log.d(TAG,"String_Node_Str" + mCurViewStackEntry.curChild + "String_Node_Str"+ mCurViewStackEntry.node);
      ViewNode child=mCurViewStackEntry.node.mChildren[mCurViewStackEntry.curChild];
      mCurViewStackEntry.curChild++;
      if (DEBUG_PARCEL)       Log.d(TAG,"String_Node_Str" + out.dataPosition() + "String_Node_Str"+ mNumWrittenWindows+ "String_Node_Str"+ mNumWrittenViews);
      out.writeInt(1);
      int flags=child.writeSelfToParcel(out,pwriter,mTmpMatrix);
      mNumWrittenViews++;
      if ((flags & ViewNode.FLAGS_HAS_CHILDREN) != 0) {
        if (DEBUG_PARCEL_TREE)         Log.d(TAG,"String_Node_Str" + child.mChildren.length + "String_Node_Str"+ child);
        out.writeInt(child.mChildren.length);
        int pos=++mCurViewStackPos;
        pushViewStackEntry(child,pos);
      }
      return true;
    }
    do {
      int pos=--mCurViewStackPos;
      if (DEBUG_PARCEL_TREE)       Log.d(TAG,"String_Node_Str" + mCurViewStackEntry.node + "String_Node_Str"+ pos);
      if (pos < 0) {
        if (DEBUG_PARCEL_TREE)         Log.d(TAG,"String_Node_Str");
        mCurViewStackEntry=null;
        break;
      }
      mCurViewStackEntry=mViewStack.get(pos);
    }
 while (mCurViewStackEntry.curChild >= mCurViewStackEntry.numChildren);
    return true;
  }
  int pos=mCurWindow;
  if (pos < mNumWindows) {
    WindowNode win=as.mWindowNodes.get(pos);
    mCurWindow++;
    if (DEBUG_PARCEL)     Log.d(TAG,"String_Node_Str" + pos + "String_Node_Str"+ out.dataPosition()+ "String_Node_Str"+ mNumWrittenWindows+ "String_Node_Str"+ mNumWrittenViews);
    out.writeInt(1);
    win.writeSelfToParcel(out,pwriter,mTmpMatrix);
    mNumWrittenWindows++;
    ViewNode root=win.mRoot;
    mCurViewStackPos=0;
    if (DEBUG_PARCEL_TREE)     Log.d(TAG,"String_Node_Str" + root);
    pushViewStackEntry(root,0);
    return true;
  }
  return false;
}

Fixed version (ground truth):
boolean writeNextEntryToParcel(AssistStructure as,Parcel out,PooledStringWriter pwriter){
  if (mCurViewStackEntry != null) {
    if (mCurViewStackEntry.curChild < mCurViewStackEntry.numChildren) {
      if (DEBUG_PARCEL_TREE)       Log.d(TAG,"String_Node_Str" + mCurViewStackEntry.curChild + "String_Node_Str"+ mCurViewStackEntry.node);
      ViewNode child=mCurViewStackEntry.node.mChildren[mCurViewStackEntry.curChild];
      mCurViewStackEntry.curChild++;
      writeView(child,out,pwriter,1);
      return true;
    }
    do {
      int pos=--mCurViewStackPos;
      if (DEBUG_PARCEL_TREE)       Log.d(TAG,"String_Node_Str" + mCurViewStackEntry.node + "String_Node_Str"+ pos);
      if (pos < 0) {
        if (DEBUG_PARCEL_TREE)         Log.d(TAG,"String_Node_Str");
        mCurViewStackEntry=null;
        break;
      }
      mCurViewStackEntry=mViewStack.get(pos);
    }
 while (mCurViewStackEntry.curChild >= mCurViewStackEntry.numChildren);
    return true;
  }
  int pos=mCurWindow;
  if (pos < mNumWindows) {
    WindowNode win=as.mWindowNodes.get(pos);
    mCurWindow++;
    if (DEBUG_PARCEL)     Log.d(TAG,"String_Node_Str" + pos + "String_Node_Str"+ out.dataPosition()+ "String_Node_Str"+ mNumWrittenWindows+ "String_Node_Str"+ mNumWrittenViews);
    out.writeInt(VALIDATE_WINDOW_TOKEN);
    win.writeSelfToParcel(out,pwriter,mTmpMatrix);
    mNumWrittenWindows++;
    ViewNode root=win.mRoot;
    mCurViewStackPos=0;
    if (DEBUG_PARCEL_TREE)     Log.d(TAG,"String_Node_Str" + root);
    writeView(root,out,pwriter,0);
    return true;
  }
  return false;
}