<commit_before>import CSSselect from 'css-select';
import ReactDom from 'react-dom/server';
import { calculate as computeSpecificity } from 'specificity';
import css from 'css';
import { parseDOM as makeDom } from 'htmlparser2';
import merge from 'lodash.merge';
import orderBy from 'lodash.orderby';

export default function grumpkin(element, stylesheet) {
  const elementMarkup = ReactDom.renderToString(element);
  const dom = makeDom(elementMarkup)[0];
  const parsedCss = css.parse(stylesheet);

  const CSSrules = parsedCss.stylesheet.rules.map((rule) => {
    const score = parseInt(
      computeSpecificity(rule.selectors[0])[0].specificity.split(',').join(''),
      0
    );
    return {<commit_msg>fix: wrong radix in parseInt<commit_after>import CSSselect from 'css-select';
import ReactDom from 'react-dom/server';
import { calculate as computeSpecificity } from 'specificity';
import css from 'css';
import { parseDOM as makeDom } from 'htmlparser2';
import merge from 'lodash.merge';
import orderBy from 'lodash.orderby';

export default function grumpkin(element, stylesheet) {
  const elementMarkup = ReactDom.renderToString(element);
  const dom = makeDom(elementMarkup)[0];
  const parsedCss = css.parse(stylesheet);

  const CSSrules = parsedCss.stylesheet.rules.map((rule) => {
    const score = parseInt(
      computeSpecificity(rule.selectors[0])[0].specificity.split(',').join(''),
      10
    );
    return {
{'fraction_non_alphanumeric': 0.12325905292479108, 'fraction_numerical': 0.00766016713091922, 'mean_word_length': 5.063291139240507, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3457700', 'n_tokens_mistral': 432, 'n_tokens_neox': 423, 'n_words': 114}