<commit_before>class PublicsController < ApplicationController
  require 'lib/diaspora/parser'
  include Diaspora::Parser
  
  def hcard
    @person = Person.first(:_id => params[:id])

    unless @person.nil? || @person.owner.nil?
      render 'hcard'
    end
  end

  def host_meta
    render 'host_meta', :layout => false, :content_type => 'application/xrd+xml'
  end

  def webfinger
    @person = Person.by_webfinger(params[:q])
    unless @person.nil? || @person.owner.nil?
      render 'webfinger', :layout => false, :content_type => 'application/xrd+xml'
    end
  end
  
  def receive
    begin
      @user = Person.first(:id => params[:id]).owner
    rescue NoMethodError => e
      Rails.logger.error("Received post #{params[:xml]} for nonexistent person #{params[:id}")
    end
    Rails.logger.debug "PublicsController has received: #{params[:xml]}"
    @user.receive params[:xml] if params[:xml]
    render :nothing => true
  end
  
end
<commit_msg>render nothing at the top<commit_after>class PublicsController < ApplicationController
  require 'lib/diaspora/parser'
  include Diaspora::Parser
  
  def hcard
    @person = Person.first(:_id => params[:id])

    unless @person.nil? || @person.owner.nil?
      render 'hcard'
    end
  end

  def host_meta
    render 'host_meta', :layout => false, :content_type => 'application/xrd+xml'
  end

  def webfinger
    @person = Person.by_webfinger(params[:q])
    unless @person.nil? || @person.owner.nil?
      render 'webfinger', :layout => false, :content_type => 'application/xrd+xml'
    end
  end
  
  def receive
    render :nothing => true
    begin
      @user = Person.first(:id => params[:id]).owner
    rescue NoMethodError => e
      Rails.logger.error("Received post #{params[:xml]} for nonexistent person #{params[:id}")
      return
    end
    Rails.logger.debug "PublicsController has received: #{params[:xml]}"
    @user.receive params[:xml] if params[:xml]
  end
  
end

{'fraction_non_alphanumeric': 0.13326499231163505, 'fraction_numerical': 0.0, 'mean_word_length': 3.416289592760181, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, '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': '4609730', 'n_tokens_mistral': 634, 'n_tokens_neox': 621, 'n_words': 153}