<commit_before>import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import config.ConfigManager;
import dao.WorkflowDao;
import models.db.workflow.Status;
import models.db.workflow.WorkflowRun;
import org.python.util.install.Installation;
import play.Application;
import play.GlobalSettings;
import play.Logger;

import java.io.File;
import java.security.Permission;
import java.util.Date;
import java.util.List;

public class Global extends GlobalSettings {
  private WorkflowDao workflowDao = new WorkflowDao();

  @Override
  public void onStart(Application app) {
    Logger.info("Application has started");

    // Clean up stalled workflows
    List<WorkflowRun> stalled = workflowDao.findWorkflowRunsByStatus(Status.RUNNING);

    for (WorkflowRun run : stalled) {
      run.setEndTime(new Date());
      run.setStatus(Status.ERROR);
      run.save();
    }
  }  <commit_msg>Fixing broken reference to errors status in global class.<commit_after>import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import config.ConfigManager;
import dao.WorkflowDao;
import models.db.workflow.Status;
import models.db.workflow.WorkflowRun;
import org.python.util.install.Installation;
import play.Application;
import play.GlobalSettings;
import play.Logger;

import java.io.File;
import java.security.Permission;
import java.util.Date;
import java.util.List;

public class Global extends GlobalSettings {
  private WorkflowDao workflowDao = new WorkflowDao();

  @Override
  public void onStart(Application app) {
    Logger.info("Application has started");

    // Clean up stalled workflows
    List<WorkflowRun> stalled = workflowDao.findWorkflowRunsByStatus(Status.RUNNING);

    for (WorkflowRun run : stalled) {
      run.setEndTime(new Date());
      run.setStatus(Status.ERRORS);
      run.save();
    }
  }  
{'fraction_non_alphanumeric': 0.0996230479267636, 'fraction_numerical': 0.0, 'mean_word_length': 4.63030303030303, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3986233', 'n_tokens_mistral': 561, 'n_tokens_neox': 550, 'n_words': 130}