<commit_before>import React from 'react';
import {defined} from '../../../utils';

import StacktraceContent from './stacktraceContent';
import ExceptionMechanism from './exceptionMechanism';

const ExceptionContent = React.createClass({
  propTypes: {
    type: React.PropTypes.oneOf(['original', 'minified']),
    values: React.PropTypes.array.isRequired,
    view: React.PropTypes.string.isRequired,
    platform: React.PropTypes.string,
    newestFirst: React.PropTypes.bool
  },

  render() {
    let stackView = this.props.view;
    let children = this.props.values.map((exc, excIdx) => {
      return (
        <div key={excIdx}>
          <h4>
            <span>{exc.type}</span>
          </h4>
          {exc.value &&
            <pre className="exc-message">{exc.value}</pre>
          }
          {exc.mechanism &&
            <ExceptionMechanism
              data={exc.mechanism}
              platform={this.props.platform}/>
          }
          {defined(exc.stacktrace) &&
            <StacktraceContent
                data={this.props.type === 'original' ? exc.stacktrace : exc.rawStacktrace}
                includeSystemFrames={stackView === 'full'}
                platform={this.props.platform}
                newestFirst={this.props.newestFirst} />
          }
        </div>
      );
    });
    if (this.props.newestFirst) {
      children.reverse();
    }

    // TODO(dcramer): implement exceptions omitted
    return (
      <div>
        {children}
      </div>
    );
  }
});

export default ExceptionContent;<commit_msg>Lessen font-size/spacing on exception header<commit_after>import React from 'react';
import {defined} from '../../../utils';

import StacktraceContent from './stacktraceContent';
import ExceptionMechanism from './exceptionMechanism';

const ExceptionContent = React.createClass({
  propTypes: {
    type: React.PropTypes.oneOf(['original', 'minified']),
    values: React.PropTypes.array.isRequired,
    view: React.PropTypes.string.isRequired,
    platform: React.PropTypes.string,
    newestFirst: React.PropTypes.bool
  },

  render() {
    let stackView = this.props.view;
    let children = this.props.values.map((exc, excIdx) => {
      return (
        <div key={excIdx}>
          <h5 style={{marginBottom: 5}}>
            <span>{exc.type}</span>
          </h5>
          {exc.value &&
            <pre className="exc-message" style={{marginTop: 0}}>{exc.value}</pre>
          }
          {exc.mechanism &&
            <ExceptionMechanism
              data={exc.mechanism}
              platform={this.props.platform}/>
          }
          {defined(exc.stacktrace) &&
            <StacktraceContent
                data={this.props.type === 'original' ? exc.stacktrace : exc.rawStacktrace}
                includeSystemFrames={stackView === 'full'}
                platform={this.props.platform}
                newestFirst={this.props.newestFirst} />
          }
        </div>
      );
    });
    if (this.props.newestFirst) {
      children.reverse();
    }

    // TODO(dcramer): implement exceptions omitted
    return (
      <div>
        {children}
      </div>
    );
  }
});

export default ExceptionContent;
{'fraction_non_alphanumeric': 0.1418706842435656, 'fraction_numerical': 0.0018832391713747645, 'mean_word_length': 2.127576054955839, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 29, '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': '3526159', 'n_tokens_mistral': 919, 'n_tokens_neox': 904, 'n_words': 161}