public static void parseAndAddBBEntriesIntoBB(BulletinBoard board,
			String boardStr) throws IllegalArgumentException {
		if (boardStr == null || boardStr.length() <= 2) {
			return;
		}
		int indexStart = 0;
		int indexEnd = 0;
		while ((indexStart = boardStr.indexOf(Article.FORMAT_START, indexEnd)) > -1
				&& (indexEnd = boardStr.indexOf(Article.FORMAT_END, indexEnd)) > -1) {
			if (indexStart > indexEnd) {
				throw new IllegalArgumentException(
						"Error parsing bulletin board. Illegal format.");
			}
			indexEnd += 1;
			String articleStr = boardStr.substring(indexStart, indexEnd);
			if (!articleStr.startsWith(NULL_ARTICLE_START)) {
				Article article = Article.parseArticle(articleStr);
				if (article.isRoot()) {
					board.addArticle(article);
				} else {
					board.addArticleReply(article);
				}
			}
		}
		// do {
		// index = boardStr.indexOf(Article.FORMAT_END);
		// article = Article.parseArticle(boardStr.substring(1, index + 1));
		// if (article.getParentId() == 0) {
		// board.addArticle(article);
		// } else {
		// board.addArticleReply(article);
		// }
		// boardStr = boardStr.substring(index + 1);
		// if (boardStr.startsWith(BulletinBoard.FORMAT_START)) {
		// boardStr = parseBulletinbBoardEntries(boardStr, board);
		// }
		// if (boardStr.startsWith(BulletinBoard.FORMAT_ENDS)) {
		// break;
		// }
		// } while (index != -1);
	}