def loadTrace(self, fileName, traceName = None, format = None):
    """
    Open a trace file.

    @param fileName:   Trace file to open
    @param traceName:  Resulting trace name
    @param format:     Force a specific format to be used instead of autodetection.
    """
    trace     = Trace.Trace()

    for importer in self.analyzer.importPlugins:
      if format is not None and importer.formatName == format:
        break
      if importer.recognizeTraceFile(fileName):
        break
    else:
      if format is not None:
        self.analyzer.fail("No such format. Available formats: %s." % (", ".join([i.formatName for i in self.analyzer.importPlugins])))
      self.analyzer.fail("Trace file format not recognized.")

    try:
      f = open(fileName, "rb")
      traces = importer.loadTrace(f)
      f.close()

      # Some decoders can load multiple trace files from one source
      if not isinstance(traces, list):
          traces = [traces]
     
      for trace in traces:
          traceName = traceName or len(self.analyzer.traces) % "t%d"
          self.analyzer.traces[traceName]     = trace
          self.analyzer.traceFiles[traceName] = fileName
          if not TraceOperations.verify(self, self.analyzer.project, trace):
            self.reportWarning("The loaded project probably does not match the trace file.")
          
          self.reportInfo("Loaded trace from '%s' as %s." % (fileName, traceName))
          traceName = None
      return traces[0]
    except IOError, e:
      self.analyzer.fail(e)
dataset/ETHPy150Open skyostil/tracy/src/analyzer/plugins/core/CorePlugin.py/CoreInteractivePlugin.loadTrace/swapped operands of `%`