<commit_before>import React from 'react';

import ITEMS from 'common/ITEMS';
import SPELLS from 'common/SPELLS';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import ItemDamageDone from 'Main/ItemDamageDone';

/**
 * Shattered Fragments of Sindragosa:
 * Casting 15 Frostbolts or Flurries calls down a Comet Storm at your target.
 */
class ShatteredFragmentsOfSindragosa extends Analyzer {
  static dependencies = {
		combatants: Combatants,
	};

  damage = 0;
  cometStormCasts = 0;
  legendaryProcs = 0;

  on_initialized() {
    this.active = this.combatants.selected.hasHead(ITEMS.SHATTERED_FRAGMENTS_OF_SINDRAGOSA.id);
  }

  on_byPlayer_cast(event) {
    const spellId = event.ability.guid;
    const hasCometStormTalent = this.combatants.selected.hasTalent(SPELLS.COMET_STORM_TALENT.id);
    if (spellId !== SPELLS.COMET_STORM_TALENT.id || !hasCometStormTalent) {
      return;
    }
    this.cometStormCasts += 1;
  }

  on_toPlayer_removebuff(event) {
    const spellId = event.ability.guid;
    if (spellId !== SPELLS.RAGE_OF_THE_FROST_WYRM.id) {
      return;
    }
    this.legendaryProcs += 1;
  }

  on_byPlayer_damage(event) {
    const spellId = event.ability.guid;
    if (spellId !== SPELLS.COMET_STORM_DAMAGE.id) {
      return;
    }
      this.damage += event.amount + (event.absorbed || 0);
  }

  get legendaryDamage() {
    return (this.damage / (this.comerStormCasts + this.legendaryProcs)) * this.legendaryProcs;
  }

  item() {
    return {<commit_msg>fix sindragosa head bug<commit_after>import React from 'react';

import ITEMS from 'common/ITEMS';
import SPELLS from 'common/SPELLS';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import ItemDamageDone from 'Main/ItemDamageDone';

/**
 * Shattered Fragments of Sindragosa:
 * Casting 15 Frostbolts or Flurries calls down a Comet Storm at your target.
 */
class ShatteredFragmentsOfSindragosa extends Analyzer {
  static dependencies = {
		combatants: Combatants,
	};

  damage = 0;
  cometStormCasts = 0;
  legendaryProcs = 0;

  on_initialized() {
    this.active = this.combatants.selected.hasHead(ITEMS.SHATTERED_FRAGMENTS_OF_SINDRAGOSA.id);
  }

  on_byPlayer_cast(event) {
    const spellId = event.ability.guid;
    const hasCometStormTalent = this.combatants.selected.hasTalent(SPELLS.COMET_STORM_TALENT.id);
    if (spellId !== SPELLS.COMET_STORM_TALENT.id || !hasCometStormTalent) {
      return;
    }
    this.cometStormCasts += 1;
  }

  on_toPlayer_removebuff(event) {
    const spellId = event.ability.guid;
    if (spellId !== SPELLS.RAGE_OF_THE_FROST_WYRM.id) {
      return;
    }
    this.legendaryProcs += 1;
  }

  on_byPlayer_damage(event) {
    const spellId = event.ability.guid;
    if (spellId !== SPELLS.COMET_STORM_DAMAGE.id) {
      return;
    }
      this.damage += event.amount + (event.absorbed || 0);
  }

  get legendaryDamage() {
    return (this.damage / (this.cometStormCasts + this.legendaryProcs)) * this.legendaryProcs;
  }

  item() {
    return {
{'fraction_non_alphanumeric': 0.11038961038961038, 'fraction_numerical': 0.005194805194805195, 'mean_word_length': 3.7693498452012384, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3634388', 'n_tokens_mistral': 1186, 'n_tokens_neox': 1139, 'n_words': 209}