anchor.diff:    }
   
     void writeTraceToBuffer(StringBuffer buf) {
  -    if (traceEvents.isNotEmpty) {
  -      buf.writeln(beginTraceEventJson.toString());
  -      for (TimelineEvent child in children) {
  -        child.writeTraceToBuffer(buf);
  -      }
  -      for (var traceEvent in traceEvents.where(
  -          (event) => !collectionEquals(event.json, beginTraceEventJson))) {
  -        buf.writeln(traceEvent.json.toString());
  -      }
  +    buf.writeln(beginTraceEventJson);
  +    for (TimelineEvent child in children) {
  +      child.writeTraceToBuffer(buf);
  +    }
  +    if (!collectionEquals(beginTraceEventJson, endTraceEventJson)) {
  +      buf.writeln(endTraceEventJson);
       }
     }
   
  
positive.code:     }
  
      switch (event.phase) {
        case 'B':
          _handleDurationBeginEvent(eventWrapper);
          break;
        case 'E':
          _handleDurationEndEvent(eventWrapper);
          break;
        case 'X':
          _handleDurationCompleteEvent(eventWrapper);
          break;
        // We do not need to handle other event types (phases 'b', 'n', 'e', etc.)
  
negative.code:   }
  }
  
  /// Data describing a single frame.
  ///
  /// Each TimelineFrame should have 2 distinct pieces of data:
  