private List<String> ParseMIX(String lines[], int end_idx) {
    StringBuilder record = new StringBuilder(RECORD_INIT_SIZE);
    List<String> records = new ArrayList<String>();
    for (int i = 0; i < end_idx; i++) {
      boolean match_first = first_line_pattern_.matcher(lines[i]).matches();
      boolean match_last = last_line_pattern_.matcher(lines[i]).matches();
      if (LOG.isDebugEnabled()) {
        LOG.debug("Process Line: " + lines[i]);
      }
      if (match_first) {
        if (record.length() > 0) {
          // means the previous line is also the end line of current record
          records.add(record.toString());
          if (LOG.isDebugEnabled()) {
            LOG.debug("MATCH START, Get a new record(which miss its end line):"
                + record.toString());
          }
        }
        // create a new record
        record = new StringBuilder(RECORD_INIT_SIZE);
        if (match_last) {
          // current line is a record(first last both matched);
          // records.add(lines[i] + FlumeConstants.LINE_SEP);
          // we use our Split method, no need to add LINE_SEP
          records.add(lines[i]);
          if (LOG.isDebugEnabled()) {
            LOG.debug("MATCH START-LAST, Get a new record:" + lines[i]);
          }
        } else {
          record.append(lines[i]);
          // record.append(FlumeConstants.LINE_SEP);
        }
      } else if (match_last) {
        record.append(lines[i]);
        // record.append(FlumeConstants.LINE_SEP);
        records.add(record.toString());
        if (LOG.isDebugEnabled()) {
          LOG.debug("MATCH LAST, Get a new record:" + record.toString());
        }

        record = null;
        record = new StringBuilder(RECORD_INIT_SIZE);
      } else {
        record.append(lines[i]);
        // this is a middle line, we recovery it's '\n' character
        // in parserecord, new Split called
        // record.append(FlumeConstants.LINE_SEP);
      }
    }
    
    HandleSpecialSituation(record, records);
    record = null;
    return records;
  }