Returns True if the path is up-to-date w.r.t. our data product: i.e. exists, and is no older
        than the DP itself, or the module itself (the last check ensures that subproducts are remade
        if the rendering code changes.)
344230
def subproductUpToDate(self, fpath):
        """"""
        # subproduct is up-to-date if it is older than the file mtime
        if not os.path.exists(self.dp.subproduct_dir()):
            os.mkdir(self.dp.subproduct_dir())
        ## This caused many re-rendering whenever a plugin got recompiled, so I disabled it.
        ## Need to add a control for re-rendering.
        ##    if os.path.exists(fpath) and os.path.getmtime(fpath) >= max(self.file_mtime,self.module_mtime):
        if os.path.exists(fpath) and os.path.getmtime(fpath) >= self.file_mtime:
            dprintf(3, "subproduct %s is up-to-date, no need to regenerate\n", fpath)
            return True
        else:
            if not os.path.exists(fpath):
                dprintf(3, "subproduct %s does not yet exist, will generate\n", fpath)
            else:
                dprintf(4, "subproduct %s is out of date (timestamp %s, file %s, module %s), will regenerate\n", fpath,
                        time.strftime("%x %X", time.localtime(os.path.getmtime(fpath))),
                        time.strftime("%x %X", time.localtime(self.file_mtime)),
                        time.strftime("%x %X", time.localtime(self.module_mtime)))
            return False
333303
private function checkProduct(){
		$product =  explode('/',trim($this->data[0]));
		if (count($product) !== 2) {
			return false;	
		}
		list($this->report['product'], $this->report['productVersion']) =$product;
		unset($this->data[0]);
		$this->data = $this->reindex($this->data);
		return true;
	}
1216063
def isValid( self ):
        
        check = nativestring(self._filepathEdit.text()).split(os.path.pathsep)[0]
        if ( self.filepathMode() == XFilepathEdit.Mode.SaveFile ):
            check = os.path.dirname(check)
        
        return os.path.exists(check)
575088
def hasBeenRotated(self):
      """"""
      try:
         # If the inodes don't match, it means the file has been replaced.
         # The inode number cannot be recycled as long as we hold the
         # filehandle open, so this test can be trusted.
         return os.stat(self._path).st_ino != self._inode
      except OSError:
         # If the file doesn't exist, let's call it "rotated".
         return True
1054475
def _package_exists(path):
    # type: (str) -> bool
    
    while path:
        if os.path.exists(path):
            return True
        else:
            path = os.path.dirname(path)

    return False
219801
@Exported
    public boolean hasUpdates() {
        Data data = getData();
        if(data==null)      return false;
        
        for (PluginWrapper pw : Jenkins.getInstance().getPluginManager().getPlugins()) {
            if(!pw.isBundled() && pw.getUpdateInfo()!=null)
                // do not advertize updates to bundled plugins, since we generally want users to get them
                // as a part of jenkins.war updates. This also avoids unnecessary pinning of plugins. 
                return true;
        }
        return false;
    }
20013
public boolean isUploadInProgressForSelectedSoftwareModule(final Long softwareModuleId) {
        for (final FileUploadId fileUploadId : getAllFileUploadIdsFromOverallUploadProcessList()) {
            if (fileUploadId.getSoftwareModuleId().equals(softwareModuleId)) {
                return true;
            }
        }
        return false;
    }
711192
def packageExists(self, package):
		
		url = "%s/packages" % self.base_url
		params = {"pattern": package}
		response = requests.get(url, params=params)
		if response.status_code != requests.codes.ok:
			return False

		return True
1130124
public function isVirtual()
    {
        foreach ($this->getCartItems() as $cartItem) {
            if (0 < $cartItem->getProductSaleElements()->getWeight()) {
                return false;
            }

            $product = $cartItem->getProductSaleElements()->getProduct();
            if (!$product->getVirtual()) {
                return false;
            }
        }

        return true;
    }
1043593
def checkUpgradePaths(self):
        
        cantUpgradeErrors = []

        for oldVersion in self._oldTypesRemaining:
            # We have to be able to get from oldVersion.schemaVersion to
            # the most recent type.

            currentType = _typeNameToMostRecentClass.get(
                oldVersion.typeName, None)

            if currentType is None:
                # There isn't a current version of this type; it's entirely
                # legacy, will be upgraded by deleting and replacing with
                # something else.
                continue

            typeInQuestion = oldVersion.typeName
            upgver = oldVersion.schemaVersion

            while upgver < currentType.schemaVersion:
                # Do we have enough of the schema present to upgrade?
                if ((typeInQuestion, upgver)
                    not in _upgradeRegistry):
                    cantUpgradeErrors.append(
                        "No upgrader present for %s (%s) from %d to %d" % (
                            typeInQuestion, qual(currentType), upgver,
                            upgver + 1))

                # Is there a type available for each upgrader version?
                if upgver+1 != currentType.schemaVersion:
                    if (typeInQuestion, upgver+1) not in _legacyTypes:
                        cantUpgradeErrors.append(
                            "Type schema required for upgrade missing:"
                            " %s version %d" % (
                                typeInQuestion, upgver+1))
                upgver += 1

            if cantUpgradeErrors:
                raise NoUpgradePathAvailable('\n    '.join(cantUpgradeErrors))
965945
def check_update_available(self):
        
        # Don't perform any check for development versions
        if 'dev' in self.version:
            return (False, latest_release)

        # Filter releases
        if is_stable_version(self.version):
            releases = [r for r in self.releases if is_stable_version(r)]
        else:
            releases = [r for r in self.releases
                        if not is_stable_version(r) or r in self.version]

        latest_release = releases[-1]

        return (check_version(self.version, latest_release, '<'),
                latest_release)
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;
	}
919101
protected function isVersioned()
    {
        /** @var Versioned|DataObject $owner */
        $owner = $this->owner;
        return class_exists(Versioned::class)
            && $owner->hasExtension(Versioned::class)
            && $owner->hasStages();
    }
1025985
def is_cache_valid(self):
        '''  '''

        if os.path.isfile(self.cache_path_cache):
            mod_time = os.path.getmtime(self.cache_path_cache)
            current_time = time()
            if (mod_time + self.cache_max_age) > current_time:
                if os.path.isfile(self.cache_path_index):
                    return True

        return False
1222656
def _isRepositoryReady(self):
        """"""
        return os.path.exists(os.path.join(self._absWorkdir(), '.hg'))
133005
def updatable(self):
        """"""
        if self.latest_version > self.current_version:
            updatable_version = self.latest_version
        else:
            updatable_version = False
        return updatable_version
1011914
public function isConverterUpdated()
        {
                if ($this->getCurrentFileHash(self::FILENAME_CONVERTER) ==
                        $this->getLocalFileHash(self::FILENAME_CONVERTER)) {
                        return true;
                } else {
                        return false;
                }
        }