anchor.diff:      }
   
       // Get know files one by one.
  -    while (fileIndex < files!.length) {
  +    while (fileIndex < files.length) {
         if (timer.elapsedMilliseconds > _MS_WORK_INTERVAL) {
           return;
         }
  -      var file = files![fileIndex++];
  +      var file = files[fileIndex++];
         driver._fsState.getFileForPath(file);
       }
   
       // The task is done, clean up.
       folderIterator = null;
  -    files = null;
  -
  -    // Complete and clean up.
  -    isCompleted = true;
  -    completer!.complete();
  -    completer = null;
  +    files.clear();
  +    completer.complete();
     }
   
     void _appendFilesRecursively(Folder folder) {
  
positive.code: 
    final AnalysisDriver driver;
  
    bool isCompleted = false;
    Completer<void>? completer = Completer<void>();
  
    Iterator<Folder>? folderIterator;
    List<String>? files = [];
    int fileIndex = 0;
  
    _DiscoverAvailableFilesTask(this.driver);
  
    /// Perform the next piece of work, and set [isCompleted] to `true` to
    /// indicate that the task is done, or keeps it `false` to indicate that the
    /// task should continue to be run.
    void perform() {
      if (folderIterator == null) {
        files!.addAll(driver.addedFiles);
  
        // Discover SDK libraries.
        var dartSdk = driver._sourceFactory.dartSdk;
        if (dartSdk != null) {
          for (var sdkLibrary in dartSdk.sdkLibraries) {
            var file = dartSdk.mapDartUri(sdkLibrary.shortName)!.fullName;
            files!.add(file);
          }
        }
  
  
negative.code:         if (child is File) {
            var path = child.path;
            if (file_paths.isDart(pathContext, path)) {
              files.add(path);
            }
          } else if (child is Folder) {
            _appendFilesRecursively(child);
  