<commit_before>import React, { Component } from 'react';

import Reaction from '../models/Reaction';
import GreenMaterialGroup from './GreenMaterialGroup';
import { UrlSilentNavigation } from '../utils/ElementUtils';
import ElementActions from '../actions/ElementActions';

import GreenMetrics from './GreenMetrics';

export default class GreenChemistry extends Component {
  constructor() {
    super();

    this.updateGroupData = this.updateGroupData.bind(this);
  }

  updateGroupData() {
    const { reaction, onReactionChange } = this.props;
    onReactionChange(reaction);
  }

  render() {
    const { reaction, onReactionChange } = this.props;

    return (
      <div className="green-chemistry">
        <GreenMetrics reaction={reaction} />
        <GreenMaterialGroup
          group="starting_materials"
          materials={reaction.starting_materials}
          onChange={this.updateGroupData}
        />
        <GreenMaterialGroup
          group="reactants"
          materials={reaction.reactants}
          onChange={this.updateGroupData}<commit_msg>Don't update schema while updating<commit_after>import React, { Component } from 'react';

import Reaction from '../models/Reaction';
import GreenMaterialGroup from './GreenMaterialGroup';
import { UrlSilentNavigation } from '../utils/ElementUtils';
import ElementActions from '../actions/ElementActions';

import GreenMetrics from './GreenMetrics';

export default class GreenChemistry extends Component {
  constructor() {
    super();

    this.updateGroupData = this.updateGroupData.bind(this);
  }

  updateGroupData() {
    const { reaction, onReactionChange } = this.props;
    onReactionChange(reaction, { schemaChanged: false });
  }

  render() {
    const { reaction, onReactionChange } = this.props;

    return (
      <div className="green-chemistry">
        <GreenMetrics reaction={reaction} />
        <GreenMaterialGroup
          group="starting_materials"
          materials={reaction.starting_materials}
          onChange={this.updateGroupData}
        />
        <GreenMaterialGroup
          group="reactants"
          materials={reaction.reactants}
          onChange={this.updateGroupData}
{'fraction_non_alphanumeric': 0.11019661636945588, 'fraction_numerical': 0.0, 'mean_word_length': 3.3847695390781563, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '5010955', 'n_tokens_mistral': 577, 'n_tokens_neox': 550, 'n_words': 123}