anchor.diff:      }
   
       return doOpen(0).then((_) {
  -      return device.connect(new SystemIdentity()).catchError((e) {
  -        device.dispose();
  +      return _device.connect(new SystemIdentity()).catchError((e) {
  +        _device.dispose();
           throw e;
         });
  -    }).then((_) => device);
  +    }).then((_) => _device);
     }
   
     Future _pushToAdbServer(AdbClientTcp client, ProgressMonitor monitor) {
  
positive.code:       }
  
        DeviceInfo di = _knownDevices[index];
        return device.open(di.vendorId, di.productId).catchError((e) {
          if ((e == 'no-device') || (e == 'no-connection')) {
            // No matching device found, try again.
            return doOpen(index + 1);
  
negative.code: 
    // Safe to call multiple times. It will open the device if it has not been opened yet.
    Future<AndroidDevice> _fetchAndroidDevice() {
      if (_device != null) return new Future.value(_device);
  
      _device = new AndroidDevice(_prefs);
  
      Future doOpen(int index) {
        if (_knownDevices.length == 0) {
  