<commit_before>package uk.co.epii.stephenson.parser;

import uk.co.epii.stephenson.cif.BasicSchedule;
import uk.co.epii.stephenson.cif.TransactionType;

import java.util.Date;

/**
 * User: <NAME>
 * Date: 16/08/2014
 * Time: 14:00
 */

public class BasicScheduleParser extends AbstractParser<BasicSchedule> {

  private final Parser<Date> dateParser;
  private final Parser<TransactionType> transactionTypeParser;
  private final Parser<boolean[]> daysParser;

  public BasicScheduleParser(Parser<Date> dateParser, Parser<TransactionType> transactionTypeParser,
                             Parser<boolean[]> daysParser) {
    this.dateParser = dateParser;
    this.transactionTypeParser = transactionTypeParser;
    this.daysParser = daysParser;
  }

  @Override
  public BasicSchedule parse(String string) {
    setRawData(string);
    BasicSheduleImpl basicSchedule = new BasicSheduleImpl();
    basicSchedule.setRecordIdentity(getNext(2));
    basicSchedule.setTransactionType(transactionTypeParser.parse(getNext(1)));
    basicSchedule.setTrainUniqueIdentifier(getNext(6));
    basicSchedule.setDateRunsFrom(dateParser.parse(getNext(6)));
    basicSchedule.setDateRunsTo(dateParser.parse(getNext(6)));
    basicSchedule.setDaysRun(daysParser.parse(getNext(7)));
    basicSchedule.setBankHolidayRunning(getNext(1));
    basicSchedule.setTrainStatus(getNext(1));
    return basicSchedule;
  }
}
<commit_msg>BasicShedule parses correctly now<commit_after>package uk.co.epii.stephenson.parser;

import uk.co.epii.stephenson.cif.BasicSchedule;
import uk.co.epii.stephenson.cif.TransactionType;

import java.util.Date;

/**
 * User: <NAME>
 * Date: 16/08/2014
 * Time: 14:00
 */

public class BasicScheduleParser extends AbstractParser<BasicSchedule> {

  private final Parser<Date> dateParser;
  private final Parser<TransactionType> transactionTypeParser;
  private final Parser<boolean[]> daysParser;

  public BasicScheduleParser(Parser<Date> dateParser, Parser<TransactionType> transactionTypeParser,
                             Parser<boolean[]> daysParser) {
    this.dateParser = dateParser;
    this.transactionTypeParser = transactionTypeParser;
    this.daysParser = daysParser;
  }

  @Override
  public BasicSchedule parse(String string) {
    setRawData(string);
    BasicSheduleImpl basicSchedule = new BasicSheduleImpl();
    basicSchedule.setRecordIdentity(getNext(2));
    basicSchedule.setTransactionType(transactionTypeParser.parse(getNext(1)));
    basicSchedule.setTrainUniqueIdentifier(getNext(6));
    basicSchedule.setDateRunsFrom(dateParser.parse(getNext(6)));
    basicSchedule.setDateRunsTo(dateParser.parse(getNext(6)));
    basicSchedule.setDaysRun(daysParser.parse(getNext(7)));
    basicSchedule.setBankHolidayRunning(getNext(1));
    basicSchedule.setTrainStatus(getNext(1));
    basicSchedule.setTrainCategory(getNext(2));
    basicSchedule.setTrainIdentity(getNext(4));
    basicSchedule.setHeadcode(getNext(4));
    basicSchedule.setCourseIndicator(getNext(1));
    basicSchedule.setTrainServiceCode(getNext(8));
    basicSchedule.setPortionId(getNext(1));
    basicSchedule.setPowerType(getNext(3));
    basicSchedule.setTimingLoad(getNext(4));
    basicSchedule.setSpeed(getNext(3));
    basicSchedule.setOperatingCharacteristics(getNext(6));
    basicSchedule.setTrainClass(getNext(1));
    basicSchedule.setSleepers(getNext(1));
    basicSchedule.setReservations(getNext(1));
    basicSchedule.setConnectionIndicator(getNext(1));
    basicSchedule.setCateringCode(getNext(4));
    basicSchedule.setServiceBranding(getNext(4));
    basicSchedule.setSpare(getNext(1));
    basicSchedule.setSTPIndicator(getNext(1));
    return basicSchedule;
  }
}

{'fraction_non_alphanumeric': 0.11065907241659886, 'fraction_numerical': 0.015730946569026308, 'mean_word_length': 5.539007092198582, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4824293', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1091, 'n_words': 149}