<commit_before>import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import models.Course;
import play.Application;
import play.GlobalSettings;
import play.libs.F.Promise;
import play.mvc.Http.RequestHeader;
import play.mvc.SimpleResult;
import views.html.InvalidUrl;
import static play.mvc.Results.notFound;
import static play.mvc.Results.badRequest;

public class Global extends GlobalSettings {

  File courses = new File("public/files/Courses.txt");
  BufferedReader br = null;

  public void onStart(Application app) {

    if (Course.find().all().size() == 0) {
      loadCourses(courses);
    }

  }

  public Promise<SimpleResult> onHandlerNotFound(RequestHeader request) {
    return Promise.<SimpleResult> pure(notFound(InvalidUrl.render("Error 404")));
  }
<commit_msg>added sample lectures to initialization (onStart)<commit_after>import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import models.Course;
import models.LectureDB;
import play.Application;
import play.GlobalSettings;
import play.libs.F.Promise;
import play.mvc.Http.RequestHeader;
import play.mvc.SimpleResult;
import views.formdata.LectureForm;
import views.html.InvalidUrl;
import static play.mvc.Results.notFound;
import static play.mvc.Results.badRequest;

public class Global extends GlobalSettings {

  File courses = new File("public/files/Courses.txt");
  BufferedReader br = null;

  public void onStart(Application app) {

    if (Course.find().all().size() == 0) {
      loadCourses(courses);
    }

    LectureDB.addLecture(new LectureForm("ICS", "311", "Topic 03 A: Asymtotic Notations", "y86z2OrIYQQ", 
        "Introduces asymptotic concepts and big-O notation."));
    
    LectureDB.addLecture(new LectureForm("ICS", "311", "Topic 06 C: Hash Functions", "jW4wCfz3DwE", 
        "Examples of Hash Functions and Universal Hashing"));
    
    LectureDB.addLecture(new LectureForm("KOR", "101", "How to Introduce Yourself in Korean", "x9_BmcUk_Xs",
        "In Korea, manners are important, and this step-by-step video teaches you some of the basics you need to"
        + " be polite while speaking Korean. A native Korean teacher will explain the simple phrases necessary."));
  }

  public Promise<SimpleResult> onHandlerNotFound(RequestHeader request) {
    return Promise.<SimpleResult> pure(notFound(InvalidUrl.render("Error 404")));
  }

{'fraction_non_alphanumeric': 0.11031746031746031, 'fraction_numerical': 0.010714285714285714, 'mean_word_length': 4.782110091743119, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1250965', 'n_tokens_mistral': 806, 'n_tokens_neox': 753, 'n_words': 199}