<commit_before>
class Oauth::ApplicationsController < Doorkeeper::ApplicationsController

  before_filter :require_login

  def index
    @applications = current_user.oauth_applications
  end


  def show
    @token =  Doorkeeper::AccessToken.find_or_create_by(:application_id => @application.id, :resource_owner_id => current_user.id)
    if @token.revoked? || @token.expired? then
      @token =  Doorkeeper::AccessToken.create(:application_id => @application.id, :resource_owner_id => current_user.id)
    end
    super
  end

  # only needed if each application must have some owner
  def create
    @application = Doorkeeper::Application.new(application_params)
    @application.owner = current_user if Doorkeeper.configuration.confirm_application_owner?<commit_msg>force ownership for apps<commit_after>
class Oauth::ApplicationsController < Doorkeeper::ApplicationsController

  before_filter :require_login

  def index
    @applications = current_user.oauth_applications
  end


  def show
     @token =  Doorkeeper::AccessToken.find_or_create_by(:application_id => @application.id, :resource_owner_id => current_user.id)
    if @token.revoked? || @token.expired? then
        @token =  Doorkeeper::AccessToken.create(:application_id => @application.id, :resource_owner_id => current_user.id)
    end
    super
  end

  # only needed if each application must have some owner
  def create
    @application = Doorkeeper::Application.new(application_params)
    @application.owner = current_user # if Doorkeeper.configuration.confirm_application_owner?
{'fraction_non_alphanumeric': 0.08793324775353016, 'fraction_numerical': 0.0, 'mean_word_length': 4.996153846153846, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '4222325', 'n_tokens_mistral': 447, 'n_tokens_neox': 436, 'n_words': 96}