anchor.diff:      if (version == null) {
         final list = await db.lookup([packageKey]);
         final PackageAnalysis pa = list[0];
  -      if (pa == null) return null;
  +      if (pa == null) {
  +        _logger.info('PackageAnalysis lookup failed: no entry for $package.');
  +        return null;
  +      }
         version = pa.latestVersion;
       }
   
  
positive.code:         list.sort((a, b) => -a.timestamp.compareTo(b.timestamp));
          final Analysis entry = list[0];
          return _toData(entry);
        }
      }
  
      // analysis was set
      final Key analysisKey = versionKey.append(Analysis, id: analysis);
      final List list = await db.lookup([analysisKey]);
      return _toData(list[0]);
    }
  
    AnalysisData _toData(Analysis entry) {
  
negative.code:     if (analysis == null) {
        final list = await db.lookup([versionKey]);
        final PackageVersionAnalysis pva = list[0];
        if (pva == null) {
          _logger.info(
              'PackageVersionAnalysis lookup failed: no entry for $package $version.');
          return null;
        }
        analysis = pva.latestAnalysis;
        lookupMatchingPanaVersion =
            panaVersion != null && pva.panaVersion != panaVersion;
  