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: 
    Future _sendRequest(List<int> httpRequest, [String target]) {
      if (target == null) {
        AndroidDevice _device;
        return _fetchAndroidDevice().then((deviceResult) {
          _device = deviceResult;
          return _device.sendHttpRequest(httpRequest, 2424).timeout(
              new Duration(minutes: 5), onTimeout: () {
                return new Future.error(
                    'Push timed out: Total time exceeds 5 minutes');
              });
        }).whenComplete(() {
          if (_device != null) _device.dispose();
        });
      } else {
        return TcpClient.createClient(target, 2424).then((TcpClient client) {
          client.write(httpRequest);
          return client.stream.timeout(new Duration(minutes: 1)).first;
        }).whenComplete(() {
          if (client != null) {
            client.dispose();
          }
        });
      }
  
negative.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);
  