<commit_before>import React from 'react';

const RasterSource = React.createClass({

  propTypes: {
    map: React.PropTypes.object.isRequired,
    source: React.PropTypes.object.isRequired,
    onLoaded: React.PropTypes.func.isRequired,
  },

  componentWillMount() {
    this.map = this.props.map.mapObject;
    // fetch data if necessary, add layer to map
    this.addSource(this.props.source.tiles);
  },

  addSource(tiles) {
    if (this.map.getSource(this.props.source.id)) {
      this.map.removeSource(this.props.source.id);
    }

    this.map.addSource(this.props.source.id, {
      type: 'raster',
      tiles: [tiles],
    });

    this.props.onLoaded(this.map.getStyle().sources);
  },

  render() {<commit_msg>update RasterSource to include tileSize parameter<commit_after>import React from 'react';

const RasterSource = React.createClass({

  propTypes: {
    map: React.PropTypes.object.isRequired,
    source: React.PropTypes.object.isRequired,
    onLoaded: React.PropTypes.func.isRequired,
  },

  componentWillMount() {
    this.map = this.props.map.mapObject;
    // fetch data if necessary, add layer to map
    this.addSource();
  },

  addSource() {
    if (this.map.getSource(this.props.source.id)) {
      this.map.removeSource(this.props.source.id);
    }

    this.map.addSource(this.props.source.id, {
      type: 'raster',
      tiles: [this.props.source.tiles],
      tileSize: this.props.source.tileSize,
    });

    this.props.onLoaded(this.map.getStyle().sources);
  },

  render() {
{'fraction_non_alphanumeric': 0.14276315789473684, 'fraction_numerical': 0.0, 'mean_word_length': 3.190082644628099, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '213816', 'n_tokens_mistral': 515, 'n_tokens_neox': 504, 'n_words': 81}