def get_line_details(self, patch_content, file_extension):
        details = []
        block_comment = False
        previous_block_comment = False

        lines = patch_content.split('\n')
        previous_original_line = 0
        previous_new_line = 0
        original_line = 0
        new_line = 0
        for line in lines:
            is_commented = False
            is_partially_commented = False
            is_empty = False
            is_documentation = False
            #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]

                if block_comment:
                    previous_block_comment = True
                else:
                    previous_block_comment = False
                block_comment = False
            #if the line does not contain diff info
            else:
                #collect content of the line
                #check if the line concerns an addition
                if re.match(r"^\+.*", line, re.M):

                    #check if the line is empty
                    if self.line_is_empty(line):
                        self.add_to_details(details, "addition", new_line, False, False, True, line)
                    else:
                        if file_extension in GitQuerier.ALLOWED_EXTENSION:
                            #calculate if the line is commented
                            result = self.line_is_commented("addition", previous_block_comment, previous_new_line, new_line, block_comment, details, line, file_extension)
                            details = result[0]
                            previous_block_comment = result[1]
                            block_comment = result[2]
                            is_commented = result[3]
                            is_partially_commented = result[4]
                        #else:
                            #self.no_treated_extensions.add(file_extension)
                            #check if the comment contains code or documentation (natural language)
                            #if is_commented:
                            #    guess = guess_lexer(line)
                        self.add_to_details(details, "addition", new_line, is_commented, is_partially_commented, False, line)

                    previous_new_line = new_line
                    new_line += 1
                #check if the line concerns a deletion
                elif re.match(r"^\-.*", line, re.M):
                    #check if the line is empty
                    if self.line_is_empty(line):
                        self.add_to_details(details, "deletion", original_line, False, False, True, line)
                    else:
                        if file_extension in GitQuerier.ALLOWED_EXTENSION:
                            #calculate if the line is commented
                            result = self.line_is_commented("deletion", previous_block_comment, previous_original_line, original_line, block_comment, details, line, file_extension)
                            details = result[0]
                            previous_block_comment = result[1]
                            block_comment = result[2]
                            is_commented = result[3]
                            is_partially_commented = result[4]

                        self.add_to_details(details, "deletion", original_line, is_commented, is_partially_commented, False, line)

                    previous_original_line = original_line
                    original_line += 1
                else:
                    if line != '\\ No newline at end of file' and line != '':
                        original_line += 1
                        new_line += 1

        return details
dataset/ETHPy150Open SOM-Research/Gitana/gitquerier.py/GitQuerier.get_line_details/original