def xml_to_db(self, xml_file):
        self._verbose(xml_file % '- Parsing %s')
        test_run = ExecutionResult(xml_file, include_keywords=self._include_keywords)
        hash = self._hash(xml_file)
        try:
            test_run_id = self._db.insert('test_runs', {
                'hash': hash,
                'imported_at': datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f'),
                'source_file': test_run.source,
                'started_at': self._format_robot_timestamp(test_run.suite.starttime),
                'finished_at': self._format_robot_timestamp(test_run.suite.endtime)
            })
        except IntegrityError:
            test_run_id = self._db.fetch_id('test_runs', {
                'source_file': test_run.source,
                'started_at': self._format_robot_timestamp(test_run.suite.starttime),
                'finished_at': self._format_robot_timestamp(test_run.suite.endtime)
            })
        self._parse_errors(test_run.errors.messages, test_run_id)
        self._parse_statistics(test_run.statistics, test_run_id)
        self._parse_suite(test_run.suite, test_run_id)
dataset/ETHPy150Open robotframework/DbBot/dbbot/reader/robot_results_parser.py/RobotResultsParser.xml_to_db/swapped operands of `%`