<commit_before>/**
 * EditController. Responsible fot the 'editview'.
 */
app.controller('EditController', function($scope, $http, config, $routeParams, PropertyData){

  /** --- local variables --- **/
  $scope.propertyId = $routeParams.propertyId;

  var propertyPromise = function() {
    PropertyData.getProperties()
      .then(function(data) {
        // promise fulfilled
        if (data.result.length > 0) {
          // Find the selected property
          data.result.forEach(function(p){
            if (p.code === $scope.propertyId){
              $scope.selected = p;
            }
          });
        } else {
          console.log("Received no properties.");
        }
      }, function(error) {
        console.error("Error fetching properties", error);
      });
  };
  propertyPromise();

  /** --- public methods --- **/

  /**
   * Updates a property
   *
   * @param Object the property
   */
  $scope.update = function(property) {
    PropertyData.updateProperty($scope.selected.primaryKey, "\""+$scope.selected.name+"\"")
      .then(function(data) {
        // promise fulfilled
        if (data.result.length > 0) {
          //TODO: After succesfull edit a cacherefresh is due
          dataCache.put('properties.ts', 0);
          dataCache.put('properties.list', data.result);
        } else {
          console.log("Received no properties.");
        }
      }, function(error) {
        console.error("Error fetching properties", error);
      });
    };
  };


});
<commit_msg>resolved parse error<commit_after>/**
 * EditController. Responsible fot the 'editview'.
 */
app.controller('EditController', function($scope, $http, config, $routeParams, PropertyData){

  /** --- local variables --- **/
  $scope.propertyId = $routeParams.propertyId;

  var propertyPromise = function() {
    PropertyData.getProperties()
      .then(function(data) {
        // promise fulfilled
        if (data.result.length > 0) {
          // Find the selected property
          data.result.forEach(function(p){
            if (p.code === $scope.propertyId){
              $scope.selected = p;
            }
          });
        } else {
          console.log("Received no properties.");
        }
      }, function(error) {
        console.error("Error fetching properties", error);
      });
  };
  propertyPromise();

  /** --- public methods --- **/

  /**
   * Updates a property
   *
   * @param Object the property
   */
  $scope.update = function(property) {
    PropertyData.updateProperty($scope.selected.primaryKey, "\""+$scope.selected.name+"\"")
      .then(function(data) {
        // promise fulfilled
        if (data.result.length > 0) {
          //TODO: After succesfull edit a cacherefresh is due
          dataCache.put('properties.ts', 0);
          dataCache.put('properties.list', data.result);
        } else {
          console.log("Received no properties.");
        }
      }, function(error) {
        console.error("Error fetching properties", error);
      });
    };


});

{'fraction_non_alphanumeric': 0.15343915343915343, 'fraction_numerical': 0.001984126984126984, 'mean_word_length': 2.131469979296066, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1997143', 'n_tokens_mistral': 850, 'n_tokens_neox': 821, 'n_words': 174}