anchor.diff:  
     Map<String, dynamic> get beginTraceEventJson => traceEvents.first.json;
   
  -  Map<String, dynamic> get endTraceEventJson => traceEvents.last.json;
  +  Map<String, dynamic> get endTraceEventJson =>
  +      traceEvents.length > 1 ? traceEvents.last.json : null;
   
     bool get isUiEvent => type == TimelineEventType.ui;
   
  
positive.code:     for (TimelineEvent child in children) {
        child.writeTraceToBuffer(buf);
      }
      if (!collectionEquals(beginTraceEventJson, endTraceEventJson)) {
        buf.writeln(endTraceEventJson);
      }
    }
  
negative.code:     for (TimelineEvent event in children) {
        event.recordTrace();
      }
      if (endTraceEventJson != null) {
        timelineTraceEvents.add(endTraceEventJson);
      }
    }
  