code: public void checkSourceStatus(boolean check_gensrc) {
          removedSources = calculateRemovedSources();
          for (Source s : removedSources) {
              if (!s.isGenerated() || check_gensrc) {
                  taintPackage(s.pkg().name(), "source "+s.name()+" was removed");
              }
          }
  
          addedSources = calculateAddedSources();
          for (Source s : addedSources) {
              String msg = null;
              if (isIncremental()) {
                  // When building from scratch, there is no point
                  // printing "was added" for every file since all files are added.
                  // However for an incremental build it makes sense.
                  msg = "source "+s.name()+" was added";
              }
              if (!s.isGenerated() || check_gensrc) {
                  taintPackage(s.pkg().name(), msg);
              }
          }
  
          modifiedSources = calculateModifiedSources();
          for (Source s : modifiedSources) {
              if (!s.isGenerated() || check_gensrc) {
                  taintPackage(s.pkg().name(), "source "+s.name()+" was modified");
              }
          }
      }
docs: Go through all sources and check which have been removed, added or modified
  and taint the corresponding packages.