Incrase fcp usage of given fcp

        Returns True if it's a new fcp, otherwise return False
967814
def increase_fcp_usage(self, fcp, assigner_id=None):
        
        # TODO: check assigner_id to make sure on the correct fcp record
        connections = self.db.get_connections_from_assigner(assigner_id)
        new = False

        if connections == 0:
            self.db.assign(fcp, assigner_id)
            new = True
        else:
            self.db.increase_usage(fcp)

        return new
1152924
@Contract(pure = true)
	public boolean hasRemainingBytes(int remaining) {
		assert remaining >= 0;
		if (remaining == 0) return true;
		for (int i = first; i != last; i = next(i)) {
			int bufRemaining = bufs[i].readRemaining();
			if (bufRemaining >= remaining)
				return true;
			remaining -= bufRemaining;
		}
		return false;
	}
596329
private static boolean isPersistedInOtherTable(Attribute attr) {
    boolean bidirectionalOneToMany = attr.getDataType() == ONE_TO_MANY && attr.isMappedBy();
    return isMultipleReferenceType(attr) || bidirectionalOneToMany;
  }
441246
boolean isValidCopy(BackedSession sess, long nowTime, int versionId) {
        synchronized (sess) {
            if (!sess.isValid())
                return false;

            int maxTime = sess.getMaxInactiveInterval();
            boolean accBeforeTO = (sess.getCurrentAccessTime() >= nowTime - (1000 * (long) maxTime));//PK90548
            boolean cacheIdMatch = (sess.getVersion() >= versionId);

            return (cacheIdMatch && (accBeforeTO || maxTime == -1));
        }
    }
653945
public boolean setNewPassword(String oldPwd, String newPwd) {
    	boolean result = false;
    	if (this.protectionHash.equals(RtfProtection.generateHash(oldPwd))) {
    		this.protectionHash = RtfProtection.generateHash(newPwd);
    		result = true;
    	}
    	return result;
    }
1308080
private boolean checkIdentical(int start, int end) {
        if (strength_ != Collator.IDENTICAL) {
            return true;
        }
        // Note: We could use Normalizer::compare() or similar, but for short strings
        // which may not be in FCD it might be faster to just NFD them.
        String textstr = getString(targetText, start, end - start);
        if (Normalizer.quickCheck(textstr, Normalizer.NFD, 0) == Normalizer.NO) {
            textstr = Normalizer.decompose(textstr, false);
        }
        String patternstr = pattern_.text_;
        if (Normalizer.quickCheck(patternstr, Normalizer.NFD, 0) == Normalizer.NO) {
            patternstr = Normalizer.decompose(patternstr, false);
        }
        return textstr.equals(patternstr);
    }
1317090
private boolean isCacheValid()
  {
    long now = CurrentTime.currentTime();

    if ((now - _lastTime < 100) && ! CurrentTime.isTest())
      return true;

    long oldLastModified = _lastModified;
    long oldLength = _length;
    
    long newLastModified = getBacking().getLastModified();
    long newLength = getBacking().length();
    
    _lastTime = now;

    if (newLastModified == oldLastModified && newLength == oldLength) {
      _lastTime = now;
      return true;
    }
    else {
      _changeSequence.incrementAndGet();
      
      // If the file has changed, close the old file
      clearCache();
      
      _zipEntryCache.clear();
      
      _lastModified = newLastModified;
      _length = newLength;
      
      _lastTime = now;

      return false;
    }
  }
587088
def content=(new_content)
      content_ptr = ::FFI::MemoryPointer.new(new_content.bytesize)
      content_ptr.write_bytes(new_content)
      ffi_delegate.reset(content_ptr, content_ptr.size)
      # NOTE: FFI::MemoryPointer will autorelease
    end
128345
public boolean recordIdGenerator() {
    if (!currentInfo.isIdGenerator()) {
      currentInfo.setIdGenerator(true);
      populated = true;
      return true;
    } else {
      return false;
    }
  }
341448
def isSelfSigned(self):
        
        if self.issuer == self.subject:
            return self.isIssuerCert(self)
        return False
128831
public boolean containsFile(SftpFile f) {
		return unchangedFiles.contains(f) || newFiles.contains(f)
				|| updatedFiles.contains(f) || deletedFiles.contains(f)
				|| recursedDirectories.contains(f.getAbsolutePath())
				|| failedTransfers.containsKey(f);
	}
1026102
def _nested_fcn(f: Callable, filters: List):
        
        return None if len(filters) == 0 \
            else filters[0] if len(filters) == 1 \
            else f(filters[0], I2B2CoreWithUploadId._nested_fcn(f, filters[1:]))
723874
function isAttrDifferent (newAttrs, oldAttrs, attributeName) {
  let oldValue = _.get(oldAttrs, attributeName + '.value')
  let newValue = _.get(newAttrs, attributeName + '.value')

  if (newValue !== undefined && !_.isEqual(oldValue, newValue)) {
    return true
  }
  return false
}
1189855
def renew(self):
        
        if self.token is not None:
            try:
                self.client.test_and_set(self.key, self.token, self.token, ttl=self.ttl)
                return True
            except ValueError, e:
                self.token = None
                return False
935487
function(fs1, fs2) {
        if(!fs2 || (fs2.length > fs1.length)) return false;
        for (var key in fs2) {
            var fact = fs2[key];
            if(!(fact.appearsIn(fs1))) {
                return false;
            }
        }
        return true;
    }
832516
private boolean isKeysConfigChanged(String oldKeyImportFile, Long oldKeyTokenExpiration) {
        return ((oldKeyImportFile.equals(keyImportFile) == false) || (oldKeyTokenExpiration != keyTokenExpiration));
    }
351664
def not_completed(f):
    

    @wraps(f)
    def check_if_complete(cls, *args, **kwargs):
        if cls.is_complete:
            raise FMBaseError('Transfer already completed.')

        return f(cls, *args, **kwargs)

    return check_if_complete