<commit_before>{% if response.HasType -%}
{%     if response.IsFile -%}
{%         if response.IsSuccess -%}
var responseStream_ = response_.Content == null ? null : await response_.Content.ReadAsStreamAsync().ConfigureAwait(false);
var fileResponse_ = new FileResponse((int)response_.StatusCode, headers_, responseStream_, {% if InjectHttpClient %}null{% else %}client_{% endif %}, response_); 
client_ = null; response_ = null; // response and client are disposed by FileResponse
return fileResponse_;
{%         else -%}
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); 
throw new {{ ExceptionClass }}("{{ response.ExceptionDescription }}", (int)response_.StatusCode, responseData_, headers_, null);
{%         endif -%}
{%     else -%}
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); 
var result_ = default({{ response.Type }}); 
try
{
    result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<{{ response.Type }}>(responseData_, _settings.Value);
{%         if response.IsSuccess -%}
{%             if operation.WrapResponse -%}
    return new {{ ResponseClass }}<{{ operation.UnwrappedResultType }}>((int)response_.StatusCode, headers_, result_); 
{%             else -%}
    return result_; 
{%             endif -%}
{%         endif -%}
} 
catch (System.Exception exception_) 
{
    throw new {{ ExceptionClass }}("Could not deserialize the response body.", (int)response_.StatusCode, responseData_, headers_, exception_);
}
{%         if response.IsSuccess == false -%}<commit_msg>Use Stream.Null instead of null.<commit_after>{% if response.HasType -%}
{%     if response.IsFile -%}
{%         if response.IsSuccess -%}
var responseStream_ = response_.Content == null ? System.IO.Stream.Null : await response_.Content.ReadAsStreamAsync().ConfigureAwait(false);
var fileResponse_ = new FileResponse((int)response_.StatusCode, headers_, responseStream_, {% if InjectHttpClient %}null{% else %}client_{% endif %}, response_); 
client_ = null; response_ = null; // response and client are disposed by FileResponse
return fileResponse_;
{%         else -%}
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); 
throw new {{ ExceptionClass }}("{{ response.ExceptionDescription }}", (int)response_.StatusCode, responseData_, headers_, null);
{%         endif -%}
{%     else -%}
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); 
var result_ = default({{ response.Type }}); 
try
{
    result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<{{ response.Type }}>(responseData_, _settings.Value);
{%         if response.IsSuccess -%}
{%             if operation.WrapResponse -%}
    return new {{ ResponseClass }}<{{ operation.UnwrappedResultType }}>((int)response_.StatusCode, headers_, result_); 
{%             else -%}
    return result_; 
{%             endif -%}
{%         endif -%}
} 
catch (System.Exception exception_) 
{
    throw new {{ ExceptionClass }}("Could not deserialize the response body.", (int)response_.StatusCode, responseData_, headers_, exception_);
}
{%         if response.IsSuccess == false -%}
{'fraction_non_alphanumeric': 0.14212432106216052, 'fraction_numerical': 0.0, 'mean_word_length': 4.007552870090635, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2018341', 'n_tokens_mistral': 931, 'n_tokens_neox': 897, 'n_words': 224}