CHECKSTYLE.OFF: IllegalType
324202
private static HashMap<String, ? super Serializable> convertToSerializable(Map<String, Object> objectMap) {
        HashMap<String, ? super Serializable> serializableMap = new HashMap<>(objectMap.size());
        for (Map.Entry<String, Object> objectEntry : objectMap.entrySet()) {
            if (objectEntry.getValue() == null) {
                serializableMap.put(objectEntry.getKey(), (String) null);
            } else if (objectEntry.getValue() instanceof Serializable) {
                serializableMap.put(objectEntry.getKey(), (Serializable) objectEntry.getValue());
            } else {
                serializableMap.put(objectEntry.getKey(), objectEntry.getValue().toString());
            }
        }
        return serializableMap;
    }
1200671
public void typeInvalid(final String type) {
		this.addStatusMessage(
				ProtocolConstants.StatusCodes.Delete.TYPE_INVALID,
				"\"" + type + "\" is not a valid delete request type. Use \""
						+ DeleteRequestType.USER.getIdentifier()
						+ "\" to delete a user, \""
						+ DeleteRequestType.FOLLOW.getIdentifier()
						+ "\" to delete a follow edge or \""
						+ DeleteRequestType.STATUS_UPDATE.getIdentifier()
						+ "\" to delete a status update.");
	}
1207345
function isValidType(value, authorizedTypes) {
  var valueToString = Object.prototype.toString.call(value);

  for (var i = 0; i < authorizedTypes.length; i++)
    if (valueToString === '[object ' + authorizedTypes[i] + ']') return true;

  return false;
}
920448
private boolean notFormat(Match m, String type) {
        return m.getEndpoint().getRendererNamed(type) == null;
    }
804091
def check(*args, **kwds):
  
  def wrapper(checkfunc):
    return wraps(checkfunc)(FontBakeryCheck(checkfunc, *args, **kwds))
  return wrapper
1327156
public static TransactionException illegalUnhasInherited(String type, String attributeType, boolean isKey) {
        return create(ErrorMessage.ILLEGAL_TYPE_UNHAS_ATTRIBUTE_INHERITED.getMessage(type, isKey ? "key" : "has", attributeType));
    }
537086
final void checkReturnType(TypeElement autoValueClass, ExecutableElement getter) {
    TypeMirror type = getter.getReturnType();
    if (type.getKind() == TypeKind.ARRAY) {
      TypeMirror componentType = ((ArrayType) type).getComponentType();
      if (componentType.getKind().isPrimitive()) {
        warnAboutPrimitiveArrays(autoValueClass, getter);
      } else {
        errorReporter.reportError(
            "An @"
                + simpleAnnotationName
                + " class cannot define an array-valued property unless it is a primitive array",
            getter);
      }
    }
  }
629499
public void typeCheck(AFromModuleImports ifm, ModuleEnvironment env)
			throws AnalysisException
	{
		TypeCheckVisitor tc = new TypeCheckVisitor();
		TypeCheckInfo question = new TypeCheckInfo(af, env, null, null);

		for (List<PImport> ofType : ifm.getSignatures())
		{
			for (PImport imp : ofType)
			{
				imp.apply(tc, question);
			}
		}

	}
947560
def enforce_type(self, attr, val):
        """"""
        if not attr in self.types:
            return utfstr(val)
        elif self.types[attr] == 'int':
            return int(float(val))
        elif self.types[attr] == 'float':
            return float(val)
        else:
            return utfstr(val)
1065280
public static final void checkFileType(Path path, String perms)
    {
        if (perms.length() != 10)
        {
            throw new IllegalArgumentException(perms+" not permission. E.g. -rwxr--r--");
        }
        switch (perms.charAt(0))
        {
            case '-':
                if (!Files.isRegularFile(path))
                {
                    throw new IllegalArgumentException("file is not regular file");
                }
                break;
            case 'd':
                if (!Files.isDirectory(path))
                {
                    throw new IllegalArgumentException("file is not directory");
                }
                break;
            case 'l':
                if (!Files.isSymbolicLink(path))
                {
                    throw new IllegalArgumentException("file is not symbolic link");
                }
                break;
            default:
                throw new UnsupportedOperationException(perms+" not supported");
        }
    }
1285913
function validStyle( prop, value, check_vend ) {
	var div = document.createElement( 'div' ),
		uc = function( txt ) {
			return txt.charAt( 0 ).toUpperCase() + txt.substr( 1 );
		},
		vend_pref = function( vend ) {
			if( vend === "" ) {
				return "";
			} else {
				return  "-" + vend.charAt( 0 ).toLowerCase() + vend.substr( 1 ) + "-";
			}
		},
		check_style = function( vend ) {
			var vend_prop = vend_pref( vend ) + prop + ": " + value + ";",
				uc_vend = uc( vend ),
				propStyle = uc_vend + ( uc_vend === "" ? prop : uc( prop ) );

			div.setAttribute( "style", vend_prop );

			if ( !!div.style[ propStyle ] ) {
				ret = true;
			}
		},
		check_vends = check_vend ? check_vend : vendors,
		ret;

	for( var i = 0; i < check_vends.length; i++ ) {
		check_style( check_vends[i] );
	}
	return !!ret;
}
1313162
async function deleteUnspecifiedTypes(options) {
  const { outputDir, fontName, types } = options

  for (let ext of FONT_TYPES) {
    if (types.indexOf(ext) !== -1) { continue }

    let filepath = path.resolve(outputDir, `${ fontName }.${ ext }`)

    if (await fsAsync.exists(filepath)) {
      await fsAsync.unlink(filepath)
    }
  }
}
14735
private static void checkContentType(String contentType, String accept, String ext, boolean strict) throws PageException {

	if (!StringUtil.isEmpty(ext, true)) {
	    ext = ext.trim().toLowerCase();
	    if (ext.startsWith("*.")) ext = ext.substring(2);
	    if (ext.startsWith(".")) ext = ext.substring(1);

		String blacklistedTypes = SystemUtil.getSystemPropOrEnvVar(
				SystemUtil.SETTING_UPLOAD_EXT_BLACKLIST, SystemUtil.DEFAULT_UPLOAD_EXT_BLACKLIST
		).toLowerCase();
		Array blacklist = ListUtil.listToArrayRemoveEmpty(blacklistedTypes, ',');

		for (int i=blacklist.size(); i > 0; i--) {
			if (ext.equals(Caster.toString(blacklist.getE(i)).trim())){
				throw new ApplicationException("Upload of files with extension [" + ext + "] is not permitted.  "
						+ "You can configure the "
						+ SystemUtil.SETTING_UPLOAD_EXT_BLACKLIST
						+ " System property or the "
						+ SystemUtil.convertSystemPropToEnvVar(SystemUtil.SETTING_UPLOAD_EXT_BLACKLIST)
						+ " Environment variable to allow that file type."
				);
			}
		}
	}
	else ext = null;

	if (StringUtil.isEmpty(accept, true)) return;

	MimeType mt = MimeType.getInstance(contentType), sub;

	Array whishedTypes = ListUtil.listToArrayRemoveEmpty(accept, ',');
	int len = whishedTypes.size();
	for (int i = 1; i <= len; i++) {
	    String whishedType = Caster.toString(whishedTypes.getE(i)).trim().toLowerCase();
	    if (whishedType.equals("*")) return;
	    // check mimetype
	    if (ListUtil.len(whishedType, "/", true) == 2) {
		sub = MimeType.getInstance(whishedType);
		if (mt.match(sub)) return;
	    }

	    // check extension
	    if (ext != null && !strict) {
		if (whishedType.startsWith("*.")) whishedType = whishedType.substring(2);
		if (whishedType.startsWith(".")) whishedType = whishedType.substring(1);
		if (ext.equals(whishedType)) return;
	    }
	}
	throw new ApplicationException("The MIME type of the uploaded file [" + contentType + "] was not accepted by the server.",
		"only this [" + accept + "] mime type are accepted");
    }
17302
function(type, checks) {
			var handler = checks[0];
			var bglobal = checks[1];
			if (this._remove(type, [handler])) {
				if (bglobal) {
					gui.Tick.removeGlobal(type, handler);
				} else {
					gui.Tick.remove(type, handler, this.$contextid);
				}
			}
		}
1195149
function getChecksum(fs, path, callback) {
  getAttr(fs, path, constants.attributes.checksum, callback);
}
799094
protected function checkTypeAllowed()
    {
        if (!in_array($this->type, static::$ALLOWED_TYPES)) {
            throw new \Exception(
                sprintf(
                    "`%s` is not a valid environment type. Expected one of: %s",
                    $this->type,
                    implode(', ', static::$ALLOWED_TYPES)
                )
            );
        }
    }
925434
private boolean checkStyle(String style) throws IOException {
		if (CSL.supportsStyle(style)) {
			//style is supported
			return true;
		}

		//style is not supported. look for alternatives.
		String message = "Could not find style in classpath: " + style;
		Set<String> availableStyles = CSL.getSupportedStyles();
		
		//output alternative
		if (!availableStyles.isEmpty()) {
			String dyms = ToolUtils.getDidYouMeanString(availableStyles, style);
			if (dyms != null && !dyms.isEmpty()) {
				message += "\n\n" + dyms;
			}
		}
		
		error(message);
		return false;
	}