<commit_before>app.controller('RidesController', ['$scope', 'RidesService', function($scope, RidesService){

    var ride = {
        "num_passengers": 4,
        "start_latitude": 37.273485,
        "start_longitude": -76.719628,
        "end_latitude": 37 + Math.random(),
        "end_longitude": -76 + Math.random(),
        "phone": 15555555555
    };

    RidesService.createRide(ride)

		updateData = function() {
        console.log('updating')
	      RidesService.getRides().then(function(data){
	          for (var i =0; i < data.rides.length; i++){
	              data.rides[i].pickup_address = data.rides[i].pickup_address || "Start Address Not Found";
	              data.rides[i].dropoff_address = data.rides[i].dropoff_address || "End Address Not Found";
	          };
	          $scope.rides = data.rides;
	    	});
    };

    setInterval('updateData()', 5000);

    $scope.deleteRide = function ( ride ) {
        if (confirm("Are you sure you want to delete this ride?")){
            del_index = $scope.rides.indexOf(ride);
            $scope.rides.splice(del_index,1);
            RidesService.deleteRide(ride.id);
        }
    };

    $scope.finishRide = function ( ride ) {
        if (confirm("Are you sure you want to finish this ride? It will be removed from the queue forever.")){
            del_index = $scope.rides.indexOf(ride);
            $scope.rides.splice(del_index,1);
            RidesService.deleteRide(ride.id);
        }
    };

}]);<commit_msg>first round update added<commit_after>app.controller('RidesController', ['$scope', 'RidesService', function($scope, RidesService){

    var ride = {
        "num_passengers": 4,
        "start_latitude": 37.273485,
        "start_longitude": -76.719628,
        "end_latitude": 37 + Math.random(),
        "end_longitude": -76 + Math.random(),
        "phone": 15555555555
    };

    RidesService.createRide(ride)

		updateData = function() {
	      RidesService.getRides().then(function(data){
	          for (var i =0; i < data.rides.length; i++){
	              data.rides[i].pickup_address = data.rides[i].pickup_address || "Start Address Not Found";
	              data.rides[i].dropoff_address = data.rides[i].dropoff_address || "End Address Not Found";
	          };
	          $scope.rides = data.rides;
	    	});
    };

    updateData();
    setInterval('updateData()', 5000);

    $scope.deleteRide = function ( ride ) {
        if (confirm("Are you sure you want to delete this ride?")){
            del_index = $scope.rides.indexOf(ride);
            $scope.rides.splice(del_index,1);
            RidesService.deleteRide(ride.id);
        }
    };

    $scope.finishRide = function ( ride ) {
        if (confirm("Are you sure you want to finish this ride? It will be removed from the queue forever.")){
            del_index = $scope.rides.indexOf(ride);
            $scope.rides.splice(del_index,1);
            RidesService.deleteRide(ride.id);
        }
    };

}]);
{'fraction_non_alphanumeric': 0.1447324133288455, 'fraction_numerical': 0.026253786603837093, 'mean_word_length': 2.3811149032992036, 'pattern_counts': {'":': 12, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '6715313', 'n_tokens_mistral': 982, 'n_tokens_neox': 925, 'n_words': 185}