<commit_before>(function(angkot) {

"use strict"

var gm = google.maps;

angkot.route.Editor = function() {
  this._init();
}

var P = angkot.route.Editor.prototype;

P.setMap = function(map) {
  if (this._map) this._destroyEvents();
  this._map = map;
  this._tooltip.setMap(map);
  for (var i=0; i<this._routes.length; i++) {
    this._routes[i].setMap(map);
  }
  if (this._map) this._initEvents();
}

P.getRoutes = function() {
  return this._routes;
}

P.setRouteArrays = function(paths) {
  this._clear();
  if (!paths) return;

  for (var i=0; i<paths.length; i++) {
    var data = paths[i];

    var route = new gm.Polyline({
      clickable: true,
      editable: true,
      draggable: false,
      strokeColor: '#FF0000',
      strokeOpacity: 0.9,
      strokeWeight: 3,
    });

    var path = route.getPath();
    for (var j=0; j<data.length; j++) {
      path.push(data[j]);
    }

    if (this._map) {
      route.setMap(this._map);
    }
    this._routes.push(route);
    this._initRouteEvents(route);
  }
}

P.fitToBounds = function() {
  console.log('fit to bounds');
  var bounds = new gm.LatLngBounds();
  for (var i=0; i<this._routes.length; i++) {
    var path = this._routes[i].getPath();
    for (var j=0, k=path.getLength(); j<k; j++) {
      bounds.extend(path.getAt(j));
    }
  }
  this._map.fitBounds(bounds);
}

P._init = function() {
  this._routes = [];
  this._events = {};
  this._tooltip = new angkot.route.Tooltip();
  this._createNextLine();
}
<commit_msg>Remove debugging<commit_after>(function(angkot) {

"use strict"

var gm = google.maps;

angkot.route.Editor = function() {
  this._init();
}

var P = angkot.route.Editor.prototype;

P.setMap = function(map) {
  if (this._map) this._destroyEvents();
  this._map = map;
  this._tooltip.setMap(map);
  for (var i=0; i<this._routes.length; i++) {
    this._routes[i].setMap(map);
  }
  if (this._map) this._initEvents();
}

P.getRoutes = function() {
  return this._routes;
}

P.setRouteArrays = function(paths) {
  this._clear();
  if (!paths) return;

  for (var i=0; i<paths.length; i++) {
    var data = paths[i];

    var route = new gm.Polyline({
      clickable: true,
      editable: true,
      draggable: false,
      strokeColor: '#FF0000',
      strokeOpacity: 0.9,
      strokeWeight: 3,
    });

    var path = route.getPath();
    for (var j=0; j<data.length; j++) {
      path.push(data[j]);
    }

    if (this._map) {
      route.setMap(this._map);
    }
    this._routes.push(route);
    this._initRouteEvents(route);
  }
}

P.fitToBounds = function() {
  var bounds = new gm.LatLngBounds();
  for (var i=0; i<this._routes.length; i++) {
    var path = this._routes[i].getPath();
    for (var j=0, k=path.getLength(); j<k; j++) {
      bounds.extend(path.getAt(j));
    }
  }
  this._map.fitBounds(bounds);
}

P._init = function() {
  this._routes = [];
  this._events = {};
  this._tooltip = new angkot.route.Tooltip();
  this._createNextLine();
}

{'fraction_non_alphanumeric': 0.1785593506932702, 'fraction_numerical': 0.008116334122421373, 'mean_word_length': 2.975806451612903, 'pattern_counts': {'":': 0, '<': 13, '<?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': '6701895', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1123, 'n_words': 218}