<commit_before>import React from 'react';
import {Link} from 'react-router';

import CompositeState from '../../../../../src/js/structs/CompositeState';
import PageHeaderBreadcrumbs from '../../../../../src/js/components/NewPageHeaderBreadcrumbs';

const NodeBreadcrumbs = ({nodeID, taskID, taskName}) => {
  const trimmednodeID = decodeURIComponent(nodeID).replace(/^\//, '');
  const encodedNodeID = encodeURIComponent(trimmednodeID);
  const crumbs = [<Link to="nodes" key={-1}>Nodes</Link>];
  let node;

  if (nodeID != null && trimmednodeID.length > 0) {
    node = CompositeState.getNodesList().filter(
        {ids: [nodeID]}
    ).last();
    crumbs.push(
      <Link to={`/nodes/${encodedNodeID}`}>{node.hostname}</Link>
    );
  }

  if (taskID != null && taskName != null) {
    let encodedTaskID = encodeURIComponent(taskID);
    crumbs.push(
      <Link to={`nodes/${encodedNodeID}/tasks/${encodedTaskID}`}>
        {taskName}
      </Link>
    );
  }

  return <PageHeaderBreadcrumbs iconID="servers" breadcrumbs={crumbs} />;

};

module.exports = NodeBreadcrumbs;
<commit_msg>Capitalize Node in variable<commit_after>import React from 'react';
import {Link} from 'react-router';

import CompositeState from '../../../../../src/js/structs/CompositeState';
import PageHeaderBreadcrumbs from '../../../../../src/js/components/NewPageHeaderBreadcrumbs';

const NodeBreadcrumbs = ({nodeID, taskID, taskName}) => {
  const trimmedNodeID = decodeURIComponent(nodeID).replace(/^\//, '');
  const encodedNodeID = encodeURIComponent(trimmedNodeID);
  const crumbs = [<Link to="nodes" key={-1}>Nodes</Link>];
  let node;

  if (nodeID != null && trimmedNodeID.length > 0) {
    node = CompositeState.getNodesList().filter(
        {ids: [nodeID]}
    ).last();
    crumbs.push(
      <Link to={`/nodes/${encodedNodeID}`}>{node.hostname}</Link>
    );
  }

  if (taskID != null && taskName != null) {
    let encodedTaskID = encodeURIComponent(taskID);
    crumbs.push(
      <Link to={`nodes/${encodedNodeID}/tasks/${encodedTaskID}`}>
        {taskName}
      </Link>
    );
  }

  return <PageHeaderBreadcrumbs iconID="servers" breadcrumbs={crumbs} />;

};

module.exports = NodeBreadcrumbs;

{'fraction_non_alphanumeric': 0.18380345768880801, 'fraction_numerical': 0.0018198362147406734, 'mean_word_length': 3.600418410041841, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, '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': '365973', 'n_tokens_mistral': 722, 'n_tokens_neox': 755, 'n_words': 135}