anchor.diff:  
   import "dart:io";
   import "dart:utf";
  -import "dart:json";
  +import "dart:json" as JSON;
   
   // TODO(hausner): need to select a different port number for each
   // test that runs in parallel.
  
positive.code:       if (errorsDetected) {
          error("Error while handling script entry ${script.currentIndex}");
          error("Message received from debug target: $msg");
          close();
          return;
        }
        if (shutdownEventSeen) {
  
negative.code:         handleMessages();
        } catch(e, trace) {
          print("Unexpected exception:\n$e\n$trace");
          close(killDebugee: true);
        }
      };
      from.onClosed = () {
        print("Connection closed by debug target");
        close(killDebugee: true);
      };
      from.onError = (e) {
        print("Error '$e' detected in input stream from debug target");
        close(killDebugee: true);
      };
    }
  
    void close({killDebugee: false}) {
      if (errorsDetected) {
        for (int i = 0; i < errors.length; i++) print(errors[i]);
      }
      to.close();
      socket.close();
      if (killDebugee) {
        targetProcess.kill();
        print("Target process killed");
      }
      Expect.isTrue(!errorsDetected);
      stdin.close();
      stdout.close();
  