<commit_before>function Skill(id, s, e) {
  var el = e.find(".lvl");
  var t = this;
  var level = 0;
  var pos = -1;
  var advancement = -1;
  var def = s.levels[0].required_level == 1 ? 1 : 0;
  var started = false;
  var nSP = {}; // notifiable sp
  var nSkills = {}; // notifiable skills
  var balanced = -1;
  var opacity = 1;

  this.ultimate = s.levels.length == 2 && s.levels[0].required_level == 40 && s.levels[1].required_level == 60;

  this.setLevel = function(lvl) {
    level = lvl;
  };

  this.getLevel = function() {
    return def && !level ? 1 : level;
  };

  this.reset = function() {
    s.levels[0].totalspcost = undefined;
    s.max_level = undefined;
  };

  this.getTotalSPUsage = function() {
    if (s.levels[0].totalspcost === undefined) {
      s.levels[0].totalspcost = s.levels[0].spcost;
      var total = s.levels[0].spcost;
      for (var i = 1; i < s.levels.length; i++) {
        if (i < this.getMaxLevel()) {
          total = total + s.levels[i].spcost;
        }

        s.levels[i].totalspcost = total;
      }
    }

    if (s.levels[this.getLevel()-1] === undefined) {
        dnss.t5Alert();
    }
    return this.getLevel() ? s.levels[this.getLevel()-1].totalspcost : 0;
  };


  this.getPosition = function() {
    if (pos == -1) {<commit_msg>Bad logic or something; it's appearing even when it shouldn't be.<commit_after>function Skill(id, s, e) {
  var el = e.find(".lvl");
  var t = this;
  var level = 0;
  var pos = -1;
  var advancement = -1;
  var def = s.levels[0].required_level == 1 ? 1 : 0;
  var started = false;
  var nSP = {}; // notifiable sp
  var nSkills = {}; // notifiable skills
  var balanced = -1;
  var opacity = 1;

  this.ultimate = s.levels.length == 2 && s.levels[0].required_level == 40 && s.levels[1].required_level == 60;

  this.setLevel = function(lvl) {
    level = lvl;
  };

  this.getLevel = function() {
    return def && !level ? 1 : level;
  };

  this.reset = function() {
    s.levels[0].totalspcost = undefined;
    s.max_level = undefined;
  };

  this.getTotalSPUsage = function() {
    if (s.levels[0].totalspcost === undefined) {
      s.levels[0].totalspcost = s.levels[0].spcost;
      var total = s.levels[0].spcost;
      for (var i = 1; i < s.levels.length; i++) {
        if (i < this.getMaxLevel()) {
          total = total + s.levels[i].spcost;
        }

        s.levels[i].totalspcost = total;
      }
    }

    try {
        return this.getLevel() ? s.levels[this.getLevel()-1].totalspcost : 0;
    } catch(e) {
        dnss.t5Alert();
    }
  };


  this.getPosition = function() {
    if (pos == -1) {
{'fraction_non_alphanumeric': 0.17164750957854405, 'fraction_numerical': 0.0210727969348659, 'mean_word_length': 2.3777490297542045, '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': '5309284', 'n_tokens_mistral': 1017, 'n_tokens_neox': 949, 'n_words': 217}