<commit_before>/** @jsx React.DOM */

var React = require('react');

var B = React.createClass({
  render: function() {
    return (
      <div style={{background: 'purple', color: 'white'}}>
        <p>I am <code>example/b.jsx</code>, feel free to edit me.</p>
        <img src='http://facebook.github.io/react/img/logo_og.png' width='200' />
        <br />
        <C />
      </div>
    );
  },

  componentWillUnmount: function () {
    window.alert('Unmounting child');
  }
});

var C = React.createClass({
  render: function () {
    return (
      <p>
        This will also work for multiple components in the same file
        if you explicitly opt them in by calling `module.makeHot`.
      </p>
    );
  },

  componentWillUnmount: function () {
    window.alert('Unmounting child');
  }
});


// By default, only module.exports is hot, and changes in C
// will cause unmounting. However, you can opt it in explicitly:

C = module.makeHot(C);

module.exports = B;
<commit_msg>Add a safety check<commit_after>/** @jsx React.DOM */

var React = require('react');

var B = React.createClass({
  render: function() {
    return (
      <div style={{background: 'purple', color: 'white'}}>
        <p>I am <code>example/b.jsx</code>, feel free to edit me.</p>
        <img src='http://facebook.github.io/react/img/logo_og.png' width='200' />
        <br />
        <C />
      </div>
    );
  },

  componentWillUnmount: function () {
    window.alert('Unmounting child');
  }
});

var C = React.createClass({
  render: function () {
    return (
      <p>
        This will also work for multiple components in the same file
        if you explicitly opt them in by calling `module.makeHot`.
      </p>
    );
  },

  componentWillUnmount: function () {
    window.alert('Unmounting child');
  }
});


// By default, only module.exports is hot, and changes in C
// will cause unmounting. However, you can opt it in explicitly:

if (module.makeHot) {
  C = module.makeHot(C);
}

module.exports = B;

{'fraction_non_alphanumeric': 0.1541147132169576, 'fraction_numerical': 0.0029925187032418953, 'mean_word_length': 2.5757575757575757, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '3894241', 'n_tokens_mistral': 654, 'n_tokens_neox': 645, 'n_words': 187}