<commit_before>var Section = function(props) {

  // Declare state variables
  var sectionPath, seats, students, numRows, numCols, numSeats, seatingChart, studentRoster, seatingChartEditor, isEditable, seatNumsOnly;
  seats = [];
  students = [];
  isEditable = false;
  seatNumsOnly = props.seatNumsOnly;
  sectionPath = (window.location.pathname).match(/\/sections\/(\d+)/gm)[0];

  // Collect nodes
  var seatingChartContainer, studentRosterContainer, assignmentListContainer, editButton;
  seatingChartContainer = $(".seating-chart");
  studentRosterContainer = $(".student-roster");
  assignmentListContainer = $(".assignment-list").closest(".card-content");
  editButton = $(".seating-chart__edit-button");
  
  // Fetch data
  fetch();

  function fetch() {
    var action, that;
    action = sectionPath + '/seats';
    $.ajax({
      url: action,
      method: 'GET',
      dataType: 'json'
    })
    .done(function(r) {
<<<<<<< Updated upstream
      console.log(r)
=======
      console.log(r);
>>>>>>> Stashed changes
      initSection(r.section);
      initStudents(r.students);
      initSeats(r.seats);
      bindEvents();
      renderSeatingChart(seatNumsOnly, isEditable);
    });
  }

  function initSection(data) {
    numRows = data.number_of_rows;
    numCols = data.number_of_columns;
    numSeats = numRows * numCols;
  }

  function initStudents(data) { 
    for (let i = 0; i < data.length; i++) {
      s = new Student(data[i]);
      students.push(s);
    }
  }

  function initSeats(data) {
    var sNum, s;
    sNum = 0;
    for (let r = 0; r < numRows; r++) {
      for (let c = 0; c < numCols; c++) {
        if (findSeat(data, sNum)) {<commit_msg>Minor edits<commit_after>var Section = function(props) {

  // Declare state variables
  var sectionPath, seats, students, numRows, numCols, numSeats, seatingChart, studentRoster, seatingChartEditor, isEditable, seatNumsOnly;
  seats = [];
  students = [];
  isEditable = false;
  seatNumsOnly = props.seatNumsOnly;
  sectionPath = (window.location.pathname).match(/\/sections\/(\d+)/gm)[0];

  // Collect nodes
  var seatingChartContainer, studentRosterContainer, assignmentListContainer, editButton;
  seatingChartContainer = $(".seating-chart");
  studentRosterContainer = $(".student-roster");
  assignmentListContainer = $(".assignment-list").closest(".card-content");
  editButton = $(".seating-chart__edit-button");
  
  // Fetch data
  fetch();

  function fetch() {
    var action, that;
    action = sectionPath + '/seats';
    $.ajax({
      url: action,
      method: 'GET',
      dataType: 'json'
    })
    .done(function(r) {
<<<<<<< Updated upstream
<<<<<<< Updated upstream
      console.log(r)
=======
      console.log(r);
>>>>>>> Stashed changes
=======
      console.log(r);
>>>>>>> Stashed changes
      initSection(r.section);
      initStudents(r.students);
      initSeats(r.seats);
      bindEvents();
      renderSeatingChart(seatNumsOnly, isEditable);
    });
  }

  function initSection(data) {
    numRows = data.number_of_rows;
    numCols = data.number_of_columns;
    numSeats = numRows * numCols;
  }

  function initStudents(data) { 
    for (let i = 0; i < data.length; i++) {
      s = new Student(data[i]);
      students.push(s);
    }
  }

  function initSeats(data) {
    var sNum, s;
    sNum = 0;
    for (let r = 0; r < numRows; r++) {
      for (let c = 0; c < numCols; c++) {
        if (findSeat(data, sNum)) {
{'fraction_non_alphanumeric': 0.15856851905731742, 'fraction_numerical': 0.002909514111143439, 'mean_word_length': 3.1875761266747866, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 24, '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': '6811249', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1138, 'n_words': 242}