<commit_before>(function (window, $, THREE, JSZip, FormData) {
  'use strict'

  window.myApp.
  factory('laneEditor', function (util, key, history, $http) {
    var $scope,
      selectedPoint = [null, null],
      selectedPointBox = [null, null],
      selectedPositions = {}, // index => position array
      selectedPositionsDir = -1,
      selectedLane = -1,
      selectedPlane,
      action = {
        laneNum: 0,
        type: ''
      },
      autosaveInterval = 30000,
      autosaveTimer = null,
      lastSave = null,
      showButton = {
        append: false,
        fork: false,
        copy: false,
        delete: false,
        join: false,
        laneType: false
      },
      laneTypeColors = {}

    function initLane (laneNum) {
      var positions = $scope.geometries['lane' + laneNum].attributes.position
      history.push('original', laneNum, positions.array, $scope.laneTypes[laneNum])
    }

    function setPointBoxVisibility (box1, box2) {
      if (box1 !== null) {
        selectedPointBox[0].visible = box1
      }
      if (box2 !== null) {
        selectedPointBox[1].visible = box2
      }

      if (selectedPointBox[0].visible === true && selectedPointBox[1].visible === false) {
        showButton.append = showButton.fork = showButton.laneType = true
      } else {
        showButton.append = showButton.fork = showButton.laneType = false
      }

      if (selectedPointBox[0].visible === true && selectedPointBox[1].visible === true) {
        showButton.copy = showButton.delete = showButton.join = true
      } else {
        showButton.copy = showButton.delete = showButton.join = false
      }
      $scope.flush()
    }
<commit_msg>type button fix<commit_after>(function (window, $, THREE, JSZip, FormData) {
  'use strict'

  window.myApp.
  factory('laneEditor', function (util, key, history, $http) {
    var $scope,
      selectedPoint = [null, null],
      selectedPointBox = [null, null],
      selectedPositions = {}, // index => position array
      selectedPositionsDir = -1,
      selectedLane = -1,
      selectedPlane,
      action = {
        laneNum: 0,
        type: ''
      },
      autosaveInterval = 30000,
      autosaveTimer = null,
      lastSave = null,
      showButton = {
        append: false,
        fork: false,
        copy: false,
        delete: false,
        join: false,
        laneType: false
      },
      laneTypeColors = {}

    function initLane (laneNum) {
      var positions = $scope.geometries['lane' + laneNum].attributes.position
      history.push('original', laneNum, positions.array, $scope.laneTypes[laneNum])
    }

    function setPointBoxVisibility (box1, box2) {
      if (box1 !== null) {
        selectedPointBox[0].visible = box1
      }
      if (box2 !== null) {
        selectedPointBox[1].visible = box2
      }

      if (selectedPointBox[0].visible === true){
        showButton.laneType = true
      } else{
        showButton.laneType = false
      }
      if (selectedPointBox[0].visible === true && selectedPointBox[1].visible === false) {
        showButton.append = showButton.fork = true
      } else {
        showButton.append = showButton.fork = false
      }

      if (selectedPointBox[0].visible === true && selectedPointBox[1].visible === true) {
        showButton.copy = showButton.delete = showButton.join = true
      } else {
        showButton.copy = showButton.delete = showButton.join = false
      }
      $scope.flush()
    }

{'fraction_non_alphanumeric': 0.12399077277970011, 'fraction_numerical': 0.01182237600922722, 'mean_word_length': 2.2634054562558794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4490669', 'n_tokens_mistral': 1041, 'n_tokens_neox': 1014, 'n_words': 226}