<commit_before>var SpanCreator = function() {
  
  var guidGenerator;
  var timeUtil;
  var topContainer;
  var startTimeField;
  var finishTimeField;
  var projectSuggestor;
  var taskList;
  var validator;
  var record;
  var activeSpan;
  var saveAndRepeatButton;
  var cancelButton;
  var stateSetter;
  var spanAssembler;
  var wipSaver;

  var init = function() {
    gatherDependencies();
    buildHtml();
    build();
    addBehavior();
    restoreWip();
  };

  var gatherDependencies = function() {
    guidGenerator = new GuidGenerator();
    timeUtil = new TimeUtil();
  };
  
  var buildHtml = function() {
    topContainer = jQuery('#SpanCreator');
    topContainer.html(SpanCreatorTemplate);
    saveAndRepeatButton = topContainer.find('.duplicate');
    cancelButton = topContainer.find('.cancel');
  };

  var build = function() {

    var analyzer = new SpanCreatorAnalyzer();
    var timeResolver = new SpanCreatorTimeResolver(analyzer);

    startTimeField = new SpanCreatorTimeField(
      topContainer.find('.start .time_field_container'),
      analyzer,
      timeResolver,<commit_msg>Applying fix from 1.3 branch.<commit_after>var SpanCreator = function() {
  
  var guidGenerator;
  var timeUtil;
  var topContainer;
  var startTimeField;
  var finishTimeField;
  var projectSuggestor;
  var taskList;
  var validator;
  var record;
  var activeSpan;
  var saveAndRepeatButton;
  var cancelButton;
  var stateSetter;
  var spanAssembler;
  var wipSaver;

  var init = function() {
    gatherDependencies();
    buildHtml();
    build();
    stateSetter.reset();
    addBehavior();
    restoreWip();
  };

  var gatherDependencies = function() {
    guidGenerator = new GuidGenerator();
    timeUtil = new TimeUtil();
  };
  
  var buildHtml = function() {
    topContainer = jQuery('#SpanCreator');
    topContainer.html(SpanCreatorTemplate);
    saveAndRepeatButton = topContainer.find('.duplicate');
    cancelButton = topContainer.find('.cancel');
  };

  var build = function() {

    var analyzer = new SpanCreatorAnalyzer();
    var timeResolver = new SpanCreatorTimeResolver(analyzer);

    startTimeField = new SpanCreatorTimeField(
      topContainer.find('.start .time_field_container'),
      analyzer,
      timeResolver,
{'fraction_non_alphanumeric': 0.10358565737051793, 'fraction_numerical': 0.0008853474988933156, 'mean_word_length': 3.679089026915114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6951874', 'n_tokens_mistral': 681, 'n_tokens_neox': 666, 'n_words': 160}