<commit_before>import React from 'react';
import { Doughnut as DoughnutChart } from 'react-chartjs-2';

import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';

import Module from 'Parser/Core/Module';
import Combatants from 'Parser/Core/Modules/Combatants';
import StatisticsListBox from 'Main/StatisticsListBox';

const CHART_SIZE = 75;

class VulnerableApplications extends Module {
  static dependencies = {
    combatants: Combatants,
  };

  windburstCasts = 0;
  markedShotCasts = 0;

  legend(items, total) {
    const numItems = items.length;
    return items.map(({ color, label, tooltip, value, spellId }, index) => {
      label = tooltip ? (
        <dfn data-tip={tooltip}>{label}</dfn>
      ) : label;
      label = spellId ? (
        <SpellLink id={spellId}>{label}</SpellLink>
      ) : label;
      return (
        <div
          className="flex"<commit_msg>adding reference to where code is from<commit_after>import React from 'react';
import { Doughnut as DoughnutChart } from 'react-chartjs-2';

import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';

import Module from 'Parser/Core/Module';
import Combatants from 'Parser/Core/Modules/Combatants';
import StatisticsListBox from 'Main/StatisticsListBox';

const CHART_SIZE = 75;

//code grabbed from Parser/Paladin/Holy/Modules/PaladinCore/CastBehavior.js

class VulnerableApplications extends Module {
  static dependencies = {
    combatants: Combatants,
  };

  windburstCasts = 0;
  markedShotCasts = 0;

  legend(items, total) {
    const numItems = items.length;
    return items.map(({ color, label, tooltip, value, spellId }, index) => {
      label = tooltip ? (
        <dfn data-tip={tooltip}>{label}</dfn>
      ) : label;
      label = spellId ? (
        <SpellLink id={spellId}>{label}</SpellLink>
      ) : label;
      return (
        <div
          className="flex"
{'fraction_non_alphanumeric': 0.11776447105788423, 'fraction_numerical': 0.00499001996007984, 'mean_word_length': 3.577625570776256, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '1375217', 'n_tokens_mistral': 634, 'n_tokens_neox': 621, 'n_words': 159}