<commit_before>App.ProjectController = App.AuthenticationController.extend({
  needs: ['application'],
  isEditing: false,

  // We use the bufferedName to store the original value of
  // the model's title so that we can roll it back later in the
  // `cancelEditing` action.
  bufferedName: Ember.computed.oneWay('name'),

  actions: {
    createInvestigation: function () {
      var self = this;
      
      var investigation = this.store.createRecord('investigation');
      var project = this.get('model');
      
      investigation.save().then(function(){
        self.transitionToRoute('investigation', investigation);
        
        project.get('investigations').then(function(investigations){
          investigations.pushObject(investigation);
          project.save();
        });
      });
    },
    
    deleteInvestigation: function (investigation) {
      var project = this.get('model');

      project.get('investigations').then(function (investigations) {
        investigations.removeObject(investigation);
        project.save();
      });

      investigation.destroyRecord();
    },
    
    editProjectName: function () {<commit_msg>Delete investigation now in investigation controller<commit_after>App.ProjectController = App.AuthenticationController.extend({
  needs: ['application'],
  isEditing: false,

  // We use the bufferedName to store the original value of
  // the model's title so that we can roll it back later in the
  // `cancelEditing` action.
  bufferedName: Ember.computed.oneWay('name'),

  actions: {
    createInvestigation: function () {
      var self = this;
      
      var investigation = this.store.createRecord('investigation');
      var project = this.get('model');
      
      investigation.save().then(function(){
        self.transitionToRoute('investigation', investigation);
        
        project.get('investigations').then(function(investigations){
          investigations.pushObject(investigation);
          project.save();
        });
      });
    },
    
    
    
    editProjectName: function () {
{'fraction_non_alphanumeric': 0.11753371868978806, 'fraction_numerical': 0.0, 'mean_word_length': 2.9114877589453863, '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': '4615330', 'n_tokens_mistral': 561, 'n_tokens_neox': 535, 'n_words': 122}