returns true if data_src needs to be rebuilt, given that data_sink
            has had a rebuild requested.
197885
def is_build_needed(self, data_sink, data_src):
        
        return (self._gettask(data_src).last_build_time == 0 or
                self._gettask(data_src).last_build_time <
                self._gettask(data_sink).last_build_time)
5510
public boolean restoreLastMapFromArchive() {
		boolean success = false;
		List<Map<Object, Object>> object = null;
		if (oldBlockHierarchy.size() > 0) {
			object = oldBlockHierarchy.remove(oldBlockHierarchy.size() - 1);
			if (object != null) {
				working = object;
				success = true;
			}
		}
		return success;
	}
502860
public boolean isSourceListModified() {
		if (sourceList != null) {
			for (int i = 0, size = sourceList.size(); i < size; i++) {
				if (sourceList.get(i).isModified()) {
					return true;
				}
			}
		}
		return false;
	}
215517
protected function rebuildEstimatedData()
    {
        $this->estimatedData = array();
        foreach ($this->serverData as $key => $value)
        {
            $this->estimatedData[$key] = $value;
        }
        $this->applyOperations($this->operationSet, $this->estimatedData);
    }
563328
protected boolean needsToBeRefreshed(DefaultFacelet facelet)
    {
        // if set to 0, constantly reload-- nocache
        if (_refreshPeriod == NO_CACHE_DELAY)
        {
            return true;
        }

        // if set to -1, never reload
        if (_refreshPeriod == INFINITE_DELAY)
        {
            return false;
        }

        long target = facelet.getCreateTime() + _refreshPeriod;
        if (System.currentTimeMillis() > target)
        {
            // Should check for file modification

            URLConnection conn = null;
            try
            {
                conn = facelet.getSource().openConnection();
                long lastModified = ResourceLoaderUtils.getResourceLastModified(conn);

                return lastModified == 0 || lastModified > target;
            }
            catch (IOException e)
            {
                throw new FaceletException("Error Checking Last Modified for " + facelet.getAlias(), e);
            }
            finally
            {
                // finally close input stream when finished, if fails just continue.
                if (conn != null)
                {
                    try 
                    {
                        InputStream is = conn.getInputStream();
                        if (is != null)
                        {
                            is.close();
                        }
                    }
                    catch (IOException e)
                    {
                        // Ignore 
                    }
                }
            }
        }

        return false;
    }
658213
def check_datafile_present_and_download(path, backup_url=None):
    
    path = Path(path)
    if path.is_file(): return True
    if backup_url is None: return False
    logg.info('try downloading from url\n' + backup_url + '\n' +
              '... this may take a while but only happens once')
    if not path.parent.is_dir():
        logg.info('creating directory', str(path.parent) + '/', 'for saving data')
        path.parent.mkdir(parents=True)
    from urllib.request import urlretrieve
    urlretrieve(backup_url, str(path), reporthook=download_progress)
    logg.info('')
    return True
772827
private void checkDataSink(GenericDataSinkBase<?> dataSinkContract) {
		Operator<?> input = dataSinkContract.getInput();
		// check if input exists
		if (input == null) {
			throw new MissingChildException();
		}
	}
1162236
def rebuild(str)
      extract_root_pivot(str)

      list = Dir.glob(dress_down(@pivot) + '*')

      @cycler = list.empty? ? nil : list.cycle
    end
476409
def should_regenerate(self, response):
        

        if response.has_header('Last-Modified'):
            last_modified = parse_http_date(response['Last-Modified'])
            next_regen = last_modified + settings.BETTERCACHE_LOCAL_POSTCHECK
            return time.time() > next_regen
1023028
def is_valid_pid_to_be_updated(did):
    """"""
    return (
        is_existing_object(did)
        and not is_local_replica(did)
        and not is_archived(did)
        and not is_obsoleted(did)
    )
1011914
public function isConverterUpdated()
        {
                if ($this->getCurrentFileHash(self::FILENAME_CONVERTER) ==
                        $this->getLocalFileHash(self::FILENAME_CONVERTER)) {
                        return true;
                } else {
                        return false;
                }
        }
628585
def download_needed?(task)
      return true if !File.exist?(name)

      if snapshot?
        return false if offline? && File.exist?(name)
        return true if update_snapshot? || old?
      end

      return false
    end
606250
public synchronized boolean reloadConfigsIfNecessary() {
    long time = RaidNode.now();
    if (time > lastReloadAttempt + reloadInterval) {
      lastReloadAttempt = time;
      try {
        File file = new File(configFileName);
        long lastModified = file.lastModified();
        if (lastModified > lastSuccessfulReload &&
            time > lastModified + RELOAD_WAIT) {
          reloadConfigs();
          lastSuccessfulReload = time;
          lastReloadAttemptFailed = false;
          return true;
        }
      } catch (Exception e) {
        if (!lastReloadAttemptFailed) {
          LOG.error("Failed to reload config file - " +
              "will use existing configuration.", e);
        }
        lastReloadAttemptFailed = true;
      }
    }
    return false;
  }
1062901
def IsDirty(self, proto):
    """"""
    if proto.dirty:
      return True

    for python_format, _, type_descriptor in itervalues(proto.GetRawData()):
      if python_format is not None and type_descriptor.IsDirty(python_format):
        proto.dirty = True
        return True

    return False
1299801
def api_rebuild():
    """"""
    if db is None:
        return '{"error": "single-user mode"}'
    build_job = q.fetch_job('build')
    orphans_job = q.fetch_job('orphans')

    if not build_job and not orphans_job:
        build_job = q.enqueue_call(func=coil.tasks.build,
                                   args=(app.config['REDIS_URL'],
                                         app.config['NIKOLA_ROOT'],
                                         ''),
                                   job_id='build')
        orphans_job = q.enqueue_call(func=coil.tasks.orphans,
                                     args=(app.config['REDIS_URL'],
                                           app.config['NIKOLA_ROOT']),
                                     job_id='orphans', depends_on=build_job)

    d = json.dumps({'build': build_job.meta, 'orphans': orphans_job.meta})

    if ('status' in build_job.meta and
            build_job.meta['status'] is not None and
            'status' in orphans_job.meta and
            orphans_job.meta['status'] is not None):
        rq.cancel_job('build', db)
        rq.cancel_job('orphans', db)
        db.set('site:needs_rebuild', '0')
        site.coil_needs_rebuild = '1'

    return d
456205
def check(repair = false)
      # Determine size of the data blobs file.
      data_file_size = File.exist?(@blobs_file_name) ?
        File.size(@blobs_file_name) : 0

      next_start = 0
      prev_entry = nil
      @entries.each do |entry|
        # Entries should never overlap
        if prev_entry && next_start > entry[START]
          PEROBS.log.fatal
                "#{@dir}: Index entries are overlapping\n" +
                "ID: #{'%016X' % prev_entry[ID]}  " +
                "Start: #{prev_entry[START]}  " +
                "Bytes: #{prev_entry[BYTES]}\n" +
                "ID: #{'%016X' % entry[ID]}  Start: #{entry[START]}  " +
                "Bytes: #{entry[BYTES]}"
        end
        next_start = entry[START] + entry[BYTES]

        # Entries must fit within the data file
        if next_start > data_file_size
          PEROBS.log.fatal
                "#{@dir}: Entry for ID #{'%016X' % entry[ID]} " +
                "goes beyond 'data' file " +
                "size (#{data_file_size})\n" +
                "ID: #{'%016X' % entry[ID]}  Start: #{entry[START]}  " +
                "Bytes: #{entry[BYTES]}"
        end

        prev_entry = entry
      end

      true
    end
1099258
private static function doesThisPackNeedRegeneration(string $pack_path) :bool {
		return 
			// if the file does not exist
			!file_exists($pack_path) || 
			// or if we're not allowed to use cached items
			!\Polyfony\Config::get('response','cache') ||
			// of if the request explicitely disallows that
			!\Polyfony\Request::isCacheAllowed();
	}