/* To Do check for other modified phosphates?
169161
private static boolean hasPhosphat(MonomerNotationUnitRNA monomerNotationUnitRNA) {
		if (monomerNotationUnitRNA.getContents().get(monomerNotationUnitRNA.getContents().size() - 1).getUnit()
				.endsWith("P")) {
			LOG.info("MonomerNotationUnitRNA " + monomerNotationUnitRNA.getUnit() + " has a phosphate");
			return true;
		}
		LOG.info("MonomerNotationUnitRNA " + monomerNotationUnitRNA.getUnit() + " has no phosphate");
		return false;
	}
1336679
private void checkTrimDupStore() {
        if ((stack.getStackDepth() >= 2) && (getPrevOpcode(1) == Const.DUP)) {
            OpcodeStack.Item item = stack.getStackItem(0);
            SPPUserValue uv = (SPPUserValue) item.getUserValue();
            if ((uv == null) || (uv.getMethod() != SPPMethod.TRIM)) {
                return;
            }

            item = stack.getStackItem(1);
            uv = (SPPUserValue) item.getUserValue();
            if ((uv == null) || (uv.getMethod() != SPPMethod.TRIM)) {
                return;
            }

            item.setUserValue(null);
        }
    }
818419
def matched(self, other):
        
        mods = ["allocatable", "pointer"]
        return (self.kind.lower() == other.kind.lower() and
                self.dtype.lower() == other.dtype.lower() and
                self.D == other.D and
                all([m in other.modifiers for m in self.modifiers if m in mods]))
1293594
private void check() {
		final Constructor<?> constructor = getConstructor();
		final XParameter[] parameters = getParameters();
		final Class<?>[] parameterTypes = constructor.getParameterTypes();
		Validate.isTrue(parameters.length == parameterTypes.length,
				"Wrong number of parameters: [" + parameters.length
						+ "], expected [" + parameterTypes.length + "].");
		for (int index = 0; index < parameters.length; index++) {
			final XParameter parameter = parameters[index];
			final Class<?> parameterType = parameterTypes[index];
			Validate.isTrue(parameterType.equals(parameter.getType()),
					"Wrong parameter type: [" + parameter.getType()
							+ "], expected [" + parameterType + "]");
		}
	}
1148929
def _check(self, args):
        """"""
        if sum(bool(args[arg]) for arg in self._mapping) > 1:
            raise DocoptExit(_('These options are mutually exclusive: {0}',
                               ', '.join(self._mapping)))
845311
private void checkDefaults() {
        Utils.require(m_shards != null || m_shardsRange != null, "shards or range parameter is not set");
        Utils.require(m_shards == null || m_shardsRange == null, "shards and range parameters cannot be both set");
        
        Utils.require(m_continueAt == null || m_continueAfter == null, "Both continue-at and continue-after parameters cannot be set");
        Utils.require((m_continueAt == null && m_continueAfter == null) || m_sortOrder == null, "continuation oarameters cannot be set if sort order is set");
        
        Utils.require(m_xshards == null || m_xshardsRange == null, "xshards and xrange parameters cannot be both set");
        if(m_xshards == null && m_xshardsRange == null) {
        	m_xshards = m_shards;
        	m_xshardsRange = m_shardsRange;
        }
        
        if (m_query == null) m_query = "*";
        if (m_pageSize == -1) m_pageSize = search_default_page_size;
    }
729631
private String getPhosphateSymbol() {
    String phosphateSymbol = null;
    // nucleotide notation
    String ncNotation = getNotation();
    // nucleotide has base
    if (ncNotation.contains("(")) {
      int start = ncNotation.indexOf(")");
      phosphateSymbol = ncNotation.substring(start + 1);
      phosphateSymbol = phosphateSymbol.replaceAll("\\[|\\]", "");
    } else {
      if (getPositionType() == ENDING_POSITION_TYPE) {
        if (ncNotation.startsWith("[")) {
          phosphateSymbol = ncNotation.substring(ncNotation.indexOf("]") + 1);
          phosphateSymbol = phosphateSymbol.replaceAll("\\[|\\]", "");
        } else {
          phosphateSymbol = ncNotation.substring(1);
        }
      } else {
        if (ncNotation.endsWith("]")) {
          char[] chars = ncNotation.toCharArray();
          for (int i = chars.length; i > 0; i--) {
            String letter = String.valueOf(chars[i - 1]);
            if (letter.equals("[")) {
              phosphateSymbol = ncNotation.substring(i);
              phosphateSymbol = phosphateSymbol.replaceAll("\\[|\\]", "");
              break;
            }
          }
        } else {
          int pos = ncNotation.length() - 1;
          phosphateSymbol = ncNotation.substring(pos);
        }
      }
    }
    return phosphateSymbol;
  }
816532
def check_quirks(block_id, block_op, db_state):
    
    if op_get_opcode_name(block_op['op']) in OPCODE_NAME_NAMEOPS and op_get_opcode_name(block_op['op']) not in OPCODE_NAME_STATE_PREORDER:
        assert 'last_creation_op' in block_op, 'QUIRK BUG: missing last_creation_op in {}'.format(op_get_opcode_name(block_op['op']))

        if block_op['last_creation_op'] == NAME_IMPORT:
            # the op_fee will be a float if the name record was created with a NAME_IMPORT
            assert isinstance(block_op['op_fee'], float), 'QUIRK BUG: op_fee is not a float when it should be'
   
    return
1028510
function checkForDuplicates (params) {
  for (var i = 0; i < params.length - 1; i++) {
    var outer = params[i];
    for (var j = i + 1; j < params.length; j++) {
      var inner = params[j];
      if (outer.name === inner.name && outer.in === inner.in) {
        throw ono.syntax('Validation failed. Found multiple %s parameters named "%s"', outer.in, outer.name);
      }
    }
  }
}
990183
def check_egg(pth):
    """"""
    if is_py23:
        if os.path.altsep:
            pth = pth.replace(os.path.altsep, os.path.sep)
        components = pth.split(os.path.sep)
        sep = os.path.sep
    else:
        components = pth.replace("\\", "/").split("/")
        sep = "/"
        if is_win:
            sep = "\\"
    for i, name in zip(range(0, len(components)), components):
        if name.lower().endswith(".egg"):
            eggpth = sep.join(components[:i + 1])
            if os.path.isfile(eggpth):
                # eggs can also be directories!
                return True
    return False
317028
private boolean checkFrVatId(final String pvatId) {
    final int checkSum = Integer.parseInt(pvatId.substring(2, 4));
    final int sum = Integer.parseInt(pvatId.substring(4));
    final int calculatedCheckSum = (12 + 3 * (sum % MODULO_97)) % MODULO_97;
    return checkSum == calculatedCheckSum;
  }
284728
def __exists(self, p):

        

        try:
            p = self.__pathToTuple(p)
        except TypeError:
            pass

        return ((not p[0] and not p[1]) or (p[0] in self.searches and not p[1]) or (p[0] in self.searches and
            p[1] in self.searches[p[0]]))
1076308
private void checkDoc() {
        if (foundDoc) {
            if (!checkDocWarningEmitted) {
                env.warning(null, "javadoc.Multiple_package_comments", name());
                checkDocWarningEmitted = true;
            }
        } else {
            foundDoc = true;
        }
    }
494276
public void checkForModifications ()
    {
        for (Iterator<Map.Entry<String, ObservedResource>> it = _observed.entrySet().iterator();
                it.hasNext(); ) {
            Map.Entry<String, ObservedResource> entry = it.next();
            ObservedResource resource = entry.getValue();
            if (resource.checkForModification(entry.getKey())) {
                it.remove();
            }
        }
    }
366950
def check_extras(dist, attr, value):
    """"""
    try:
        list(itertools.starmap(_check_extra, value.items()))
    except (TypeError, ValueError, AttributeError):
        raise DistutilsSetupError(
            "'extras_require' must be a dictionary whose values are "
            "strings or lists of strings containing valid project/version "
            "requirement specifiers."
        )
1288158
public static void checkIfModifiedSince(final String method, final String ifModifiedSince,
            final Instant modified) {
        if (isGetOrHead(method)) {
            final Instant time = parseDate(ifModifiedSince);
            if (time != null && time.isAfter(modified.truncatedTo(SECONDS))) {
                throw new RedirectionException(notModified().build());
            }
        }
    }
844354
private void check() {
		final Method method = getMethod();
		final XParameter[] parameters = getParameters();
		final Class<?>[] parameterTypes = method.getParameterTypes();
		Validate.isTrue(parameters.length == parameterTypes.length,
				"Wrong number of parameters: [" + parameters.length
						+ "], expected [" + parameterTypes.length + "].");
		for (int index = 0; index < parameters.length; index++) {
			final XParameter parameter = parameters[index];
			final Class<?> parameterType = parameterTypes[index];
			Validate.isTrue(parameterType.equals(parameter.getType()),
					"Wrong parameter type: [" + parameter.getType()
							+ "], expected [" + parameterType + "]");
		}
	}