def check_for_duplicate_comment(self, new):
        possible_duplicates = self.get_comment_model()._default_manager.using(
            self.target_object._state.db
        ).filter(
            content_type = new.content_type,
            object_pk = new.object_pk,
            user_name = new.user_name,
            user_email = new.user_email,
            user_url = new.user_url,
        )
        for old in possible_duplicates:
            if old.submit_date.date() == new.submit_date.date() and old.comment == new.comment:
                return old

        return new
Check that a submitted comment isn't a duplicate. This might be caused
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/comments/forms.py/CommentDetailsForm.check_for_duplicate_comment