'Checks the results of the CloneDetectionBear with the given function.
:param files:                 The files to check. Each will be checked
on its own.
:param result_check_function: A function yielding an exception if the
results are invalid.'

def check_clone_detection_bear(self, files, result_check_function):

    for file in files:
        difference_results = ClangFunctionDifferenceBear({file: ''}, self.section, Queue()).run_bear_from_section([], {})
        uut = ClangCloneDetectionBear({file: ''}, self.section, Queue())
        arg_dict = {'dependency_results': {ClangFunctionDifferenceBear.__name__: list(difference_results)}}
        result_check_function(list(uut.run_bear_from_section([], arg_dict)), ('while    analyzing    ' + file))
