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

import ThreadingRow from './ThreadingRow';
import '../styles/Threading.css';

class Threading extends Component {
  render() {
    return (
      <div className='Threading'>
        <ThreadingRow />
        <ThreadingRow />
        <ThreadingRow />
        <ThreadingRow />
      </div>
    );
  }<commit_msg>Add method rowNumber and indents generator<commit_after>import React, { Component } from 'react';

import ThreadingRow from './ThreadingRow';
import '../styles/Threading.css';

class Threading extends Component {
  rowNumber(n) {
    return (this.props.currentState.weaves.length <= n)
      ? n
      : this.props.currentState.weaves.length
  }

  render() {
    const indents = [];

    for (let i = 0; i < this.rowNumber(4); i++) {
      indents.push(<ThreadingRow key={i}/>);
    }

    return (
      <div className='Threading'>
        {indents}
      </div>
    );
  }
{'fraction_non_alphanumeric': 0.14331210191082802, 'fraction_numerical': 0.0021231422505307855, 'mean_word_length': 2.640926640926641, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 12, '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': '1654965', 'n_tokens_mistral': 284, 'n_tokens_neox': 288, 'n_words': 67}