/**
  * Writes a trace which has a source location
  *
  * @param refId file reference number
  * @param trace the trace
  */
 private void writeTraceWithLocation(int refId, Trace trace) {
   LocationProperties loc = findFirstLocation(trace);
   int line = 0;
   String className = ""; // $NON-NLS-1$
   String functionName = ""; // $NON-NLS-1$
   if (loc != null) {
     line = loc.getLineNumber();
     className = loc.getClassName();
     functionName = loc.getFunctionName();
   }
   com.nokia.tracecompiler.decodeplugins.dictionary.encoder.Trace.writeInstance(
       trace.getID(), refId, line, functionName, className);
 }