<commit_before>class Ship {
  constructor(length, classification) {
    this.length = length;
    this.classification = classification;
    if (Ship.all === undefined) {
      Ship.all = [this];
    } else {
      Ship.all.push(this);
    }
  }

  cells() {
    if (this.on_board()) {
      let ship = $('#'+this.classification);
      let row = parseInt(ship[0].style.left)/32 + 13;
      let column = parseInt(ship[0].style.top)/32 + 4;
      let answer = [];

      if (ship.hasClass("vertical")){
        for(let i=0;i<this.length;i++){
          answer.push(column+'-'+row);
          column++;
        }
      } else {
        for(let i=0;i<this.length;i++){
          answer.push(column+'-'+row);
          row++;
        }
      }
      this.positions = answer;
      return answer;
    }
  }

  on_board() {
    let ship = document.getElementById(this.classification);
    return ship.style.left !== "" && ship.style.left !== "0px";
  }
}
<commit_msg>Ship class jQuery consistent<commit_after>class Ship {
  constructor(length, classification) {
    this.length = length;
    this.classification = classification;
    if (Ship.all === undefined) {
      Ship.all = [this];
    } else {
      Ship.all.push(this);
    }
  }

  cells() {
    if (this.on_board()) {
      let ship = $('#'+this.classification);
      let row = parseInt(ship[0].style.left)/32 + 13;
      let column = parseInt(ship[0].style.top)/32 + 4;
      let answer = [];

      if (ship.hasClass("vertical")){
        for(let i=0;i<this.length;i++){
          answer.push(column+'-'+row);
          column++;
        }
      } else {
        for(let i=0;i<this.length;i++){
          answer.push(column+'-'+row);
          row++;
        }
      }
      this.positions = answer;
      return answer;
    }
  }

  on_board() {
    let ship = $('#'+this.classification)[0];
    return ship.style.left !== "" && ship.style.left !== "0px";
  }
}

{'fraction_non_alphanumeric': 0.17916666666666667, 'fraction_numerical': 0.013020833333333334, 'mean_word_length': 2.113452188006483, 'pattern_counts': {'":': 0, '<': 7, '<?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': '101488', 'n_tokens_mistral': 640, 'n_tokens_neox': 626, 'n_words': 111}