{
HashMap<String, Integer> errors = new HashMap<String, Integer>();
errors.put("missing",0);
errors.put("mismatch", 0);
File blockFile = new File("/data/openleg/PALMER.SEN.ALL.MEMO2011.TXT");
BillProcessor bp = new BillProcessor();
Storage storage = Application.getStorage();
List<SOBIBlock> blocks = bp.getBlocks(blockFile);
for (SOBIBlock block : blocks) {
String billNo = block.getPrintNo()+block.getAmendment()+"-"+block.getYear();
Bill jsonBill = storage.getBill(block.getPrintNo()+block.getAmendment(), block.getYear());
Bill lbdcBill = new Bill(billNo, block.getYear());
bp.applyText(new String(block.getData().getBytes(), "utf-8"), lbdcBill, new Date());
String jsonMemo = StringUtils.normalizeSpace(jsonBill.getMemo().replaceAll("-\n+ *", "").replaceAll("\n *", " ").replaceAll(" *([:,]) *", "$1").replaceAll(" *([()!\\\"]) *", " $1 ").replaceAll("([A-Za-z])- ?([A-Za-z])","$1$2").replaceAll("-", "").trim()).toLowerCase();
String lbdcMemo = StringUtils.normalizeSpace(lbdcBill.getMemo().replaceAll("�", "§").replaceAll("-\n+ *", "").replaceAll("\n *", " ").replaceAll(" *([:,]) *", "$1").replaceAll(" *([()!\\\"]) *", " $1 ").replaceAll("([A-Za-z])- ?([A-Za-z])","$1$2").replaceAll("-", "").trim()).toLowerCase();
if(jsonMemo.isEmpty()) {
logger.error(billNo+": MISSING");