def get_line_content(self, patch_content, line_number):
        content = ""
        content_list = []
        lines = patch_content.split('\n')
        original_line = 0
        new_line = 0
        original_end = 0
        new_end = 0


        last_content_added = ""

        for line in lines:
            #if the line contains diff info
            if re.match(r"^@@(\s|\+|\-|\d|,)+@@", line, re.M):
                #re-init parameters
                begin = self.get_file_modification_begin(line)
                original_line = begin[0]
                new_line = begin[1]
                end = self.get_file_modification_end(line)
                deletion_end = end[0]
                addition_end = end[1]
            #if the line does not contain diff info
            else:
                if deletion_end > line_number:
                    if len(content_list) == 2:
                        break
                    if original_line > line_number and new_line > line_number:
                        break
                else:
                    if new_line > line_number:
                        break

                #collect content of the line
                #check if the line concerns an addition
                if re.match(r"^\+.*", line, re.M):
                    if new_line == line_number:
                        content_list.append({'type': 'addition', 'text': line[1:]})
                        last_content_added = 'addition'
                    new_line += 1
                #check if the line concerns a deletion
                elif re.match(r"^\-.*", line, re.M):
                    if original_line == line_number:
                        content_list.append({'type': 'deletion', 'text': line[1:]})
                        last_content_added = 'deletion'
                    original_line += 1
                else:
                    if line != '\\ No newline at end of file' and line != '':
                        original_line += 1
                        new_line += 1
        if content_list:
            content = content_list[-1]
        return content
dataset/ETHPy150Open SOM-Research/Gitana/gitquerier.py/GitQuerier.get_line_content/original