Program: 13402
Project: 13402
Buggy source:
public static void addOrUpdatePosts(final ReaderTag tag,ReaderPostList posts){
  if (posts == null || posts.size() == 0) {
    return;
  }
  SQLiteDatabase db=ReaderDatabase.getWritableDb();
  SQLiteStatement stmtPosts=db.compileStatement("String_Node_Str" + COLUMN_NAMES + "String_Node_Str"+ "String_Node_Str");
  db.beginTransaction();
  try {
    String tagName=(tag != null ? tag.getTagSlug() : "String_Node_Str");
    int tagType=(tag != null ? tag.tagType.toInt() : 0);
    boolean hasGapMarker=false;
    for (    ReaderPost post : posts) {
      stmtPosts.bindLong(1,post.postId);
      stmtPosts.bindLong(2,post.blogId);
      stmtPosts.bindLong(3,post.feedId);
      stmtPosts.bindLong(4,post.feedItemId);
      stmtPosts.bindString(5,post.getPseudoId());
      stmtPosts.bindString(6,post.getAuthorName());
      stmtPosts.bindString(7,post.getAuthorFirstName());
      stmtPosts.bindLong(8,post.authorId);
      stmtPosts.bindString(9,post.getTitle());
      stmtPosts.bindString(10,maxText(post));
      stmtPosts.bindString(11,post.getExcerpt());
      stmtPosts.bindString(12,post.getFormat());
      stmtPosts.bindString(13,post.getUrl());
      stmtPosts.bindString(14,post.getShortUrl());
      stmtPosts.bindString(15,post.getBlogName());
      stmtPosts.bindString(16,post.getBlogUrl());
      stmtPosts.bindString(17,post.getBlogImageUrl());
      stmtPosts.bindString(18,post.getFeaturedImage());
      stmtPosts.bindString(19,post.getFeaturedVideo());
      stmtPosts.bindString(20,post.getPostAvatar());
      stmtPosts.bindDouble(21,post.score);
      stmtPosts.bindString(22,post.getDatePublished());
      stmtPosts.bindString(23,post.getDateLiked());
      stmtPosts.bindString(24,post.getDateTagged());
      stmtPosts.bindLong(25,post.numReplies);
      stmtPosts.bindLong(26,post.numLikes);
      stmtPosts.bindLong(27,SqlUtils.boolToSql(post.isLikedByCurrentUser));
      stmtPosts.bindLong(28,SqlUtils.boolToSql(post.isFollowedByCurrentUser));
      stmtPosts.bindLong(29,SqlUtils.boolToSql(post.isCommentsOpen));
      stmtPosts.bindLong(30,SqlUtils.boolToSql(post.isExternal));
      stmtPosts.bindLong(31,SqlUtils.boolToSql(post.isPrivate));
      stmtPosts.bindLong(32,SqlUtils.boolToSql(post.isVideoPress));
      stmtPosts.bindLong(33,SqlUtils.boolToSql(post.isJetpack));
      stmtPosts.bindString(34,post.getPrimaryTag());
      stmtPosts.bindString(35,post.getSecondaryTag());
      stmtPosts.bindString(36,post.getAttachmentsJson());
      stmtPosts.bindString(37,post.getDiscoverJson());
      stmtPosts.bindLong(38,post.xpostPostId);
      stmtPosts.bindLong(39,post.xpostBlogId);
      stmtPosts.bindString(40,post.getRailcarJson());
      stmtPosts.bindString(41,tagName);
      stmtPosts.bindLong(42,tagType);
      stmtPosts.bindLong(43,SqlUtils.boolToSql(hasGapMarker));
      stmtPosts.bindString(44,ReaderCardType.toString(post.getCardType()));
      stmtPosts.bindLong(45,SqlUtils.boolToSql(post.useExcerpt));
      stmtPosts.execute();
    }
    db.setTransactionSuccessful();
  }
  finally {
    db.endTransaction();
    SqlUtils.closeStatement(stmtPosts);
  }
}

Fixed version (ground truth):
public static void addOrUpdatePosts(final ReaderTag tag,ReaderPostList posts){
  if (posts == null || posts.size() == 0) {
    return;
  }
  SQLiteDatabase db=ReaderDatabase.getWritableDb();
  SQLiteStatement stmtPosts=db.compileStatement("String_Node_Str" + COLUMN_NAMES + "String_Node_Str"+ "String_Node_Str");
  db.beginTransaction();
  try {
    String tagName=(tag != null ? tag.getTagSlug() : "String_Node_Str");
    int tagType=(tag != null ? tag.tagType.toInt() : 0);
    ReaderBlogIdPostId postWithGapMarker=getGapMarkerIdsForTag(tag);
    for (    ReaderPost post : posts) {
      boolean hasGapMarker=postWithGapMarker != null && postWithGapMarker.getPostId() == post.postId && postWithGapMarker.getBlogId() == post.blogId;
      stmtPosts.bindLong(1,post.postId);
      stmtPosts.bindLong(2,post.blogId);
      stmtPosts.bindLong(3,post.feedId);
      stmtPosts.bindLong(4,post.feedItemId);
      stmtPosts.bindString(5,post.getPseudoId());
      stmtPosts.bindString(6,post.getAuthorName());
      stmtPosts.bindString(7,post.getAuthorFirstName());
      stmtPosts.bindLong(8,post.authorId);
      stmtPosts.bindString(9,post.getTitle());
      stmtPosts.bindString(10,maxText(post));
      stmtPosts.bindString(11,post.getExcerpt());
      stmtPosts.bindString(12,post.getFormat());
      stmtPosts.bindString(13,post.getUrl());
      stmtPosts.bindString(14,post.getShortUrl());
      stmtPosts.bindString(15,post.getBlogName());
      stmtPosts.bindString(16,post.getBlogUrl());
      stmtPosts.bindString(17,post.getBlogImageUrl());
      stmtPosts.bindString(18,post.getFeaturedImage());
      stmtPosts.bindString(19,post.getFeaturedVideo());
      stmtPosts.bindString(20,post.getPostAvatar());
      stmtPosts.bindDouble(21,post.score);
      stmtPosts.bindString(22,post.getDatePublished());
      stmtPosts.bindString(23,post.getDateLiked());
      stmtPosts.bindString(24,post.getDateTagged());
      stmtPosts.bindLong(25,post.numReplies);
      stmtPosts.bindLong(26,post.numLikes);
      stmtPosts.bindLong(27,SqlUtils.boolToSql(post.isLikedByCurrentUser));
      stmtPosts.bindLong(28,SqlUtils.boolToSql(post.isFollowedByCurrentUser));
      stmtPosts.bindLong(29,SqlUtils.boolToSql(post.isCommentsOpen));
      stmtPosts.bindLong(30,SqlUtils.boolToSql(post.isExternal));
      stmtPosts.bindLong(31,SqlUtils.boolToSql(post.isPrivate));
      stmtPosts.bindLong(32,SqlUtils.boolToSql(post.isVideoPress));
      stmtPosts.bindLong(33,SqlUtils.boolToSql(post.isJetpack));
      stmtPosts.bindString(34,post.getPrimaryTag());
      stmtPosts.bindString(35,post.getSecondaryTag());
      stmtPosts.bindString(36,post.getAttachmentsJson());
      stmtPosts.bindString(37,post.getDiscoverJson());
      stmtPosts.bindLong(38,post.xpostPostId);
      stmtPosts.bindLong(39,post.xpostBlogId);
      stmtPosts.bindString(40,post.getRailcarJson());
      stmtPosts.bindString(41,tagName);
      stmtPosts.bindLong(42,tagType);
      stmtPosts.bindLong(43,SqlUtils.boolToSql(hasGapMarker));
      stmtPosts.bindString(44,ReaderCardType.toString(post.getCardType()));
      stmtPosts.bindLong(45,SqlUtils.boolToSql(post.useExcerpt));
      stmtPosts.execute();
    }
    db.setTransactionSuccessful();
  }
  finally {
    db.endTransaction();
    SqlUtils.closeStatement(stmtPosts);
  }
}