<commit_before>from django.conf import settings
from django.views.debug import SafeExceptionReporterFilter, CLEANSED_SUBSTITUTE


class ExtraSensitiveReporterFilter(SafeExceptionReporterFilter):

    def get_post_parameters(self, *args, **kwargs):
        cleansed = super(ExtraSensitiveReporterFilter, self).get_post_parameters(*args, **kwargs)
        for param in settings.EXTRA_SENSITIVE_POST_PARAMETERS:
            if param in cleansed:
                cleansed[param] = CLEANSED_SUBSTITUTE
        return cleansed

    def get_traceback_frame_variables(self, *args, **kwargs):
        cleansed = dict(super(ExtraSensitiveReporterFilter, self).get_traceback_frame_variables(*args, **kwargs))<commit_msg>Fixed a bug regarding POST's immutable QueryDict<commit_after>from django.conf import settings
from django.views.debug import SafeExceptionReporterFilter, CLEANSED_SUBSTITUTE


class ExtraSensitiveReporterFilter(SafeExceptionReporterFilter):

    def get_post_parameters(self, *args, **kwargs):
        cleansed = super(ExtraSensitiveReporterFilter, self).get_post_parameters(*args, **kwargs).copy()
        for param in settings.EXTRA_SENSITIVE_POST_PARAMETERS:
            if param in cleansed:
                cleansed[param] = CLEANSED_SUBSTITUTE
        return cleansed

    def get_traceback_frame_variables(self, *args, **kwargs):
        cleansed = dict(super(ExtraSensitiveReporterFilter, self).get_traceback_frame_variables(*args, **kwargs))
{'fraction_non_alphanumeric': 0.07945205479452055, 'fraction_numerical': 0.0, 'mean_word_length': 4.939024390243903, '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': '5143768', 'n_tokens_mistral': 426, 'n_tokens_neox': 405, 'n_words': 83}