Generates the blacklist.
@param model model to use
@return the blacklist
4313
public Blacklist generateBlacklist(Model model)
	{
		ChemicalNameNormalizer normalizer = new ChemicalNameNormalizer(model);
		SIFSearcher searcher = new SIFSearcher(new Fetcher(normalizer), SIFEnum.USED_TO_PRODUCE);

		Set<SIFInteraction> sifs = searcher.searchSIF(model);

		// read interactions into maps

		Map<String, Set<String>> upstrMap = new HashMap<String, Set<String>>();
		Map<String, Set<String>> dwstrMap = new HashMap<String, Set<String>>();
		Map<String, Set<String>> neighMap = new HashMap<String, Set<String>>();

		for (SIFInteraction sif : sifs)
		{
			String source = sif.sourceID;
			String target = sif.targetID;

			if (!neighMap.containsKey(source)) neighMap.put(source, new HashSet<String>());
			if (!neighMap.containsKey(target)) neighMap.put(target, new HashSet<String>());
			if (!dwstrMap.containsKey(source)) dwstrMap.put(source, new HashSet<String>());
			if (!dwstrMap.containsKey(target)) dwstrMap.put(target, new HashSet<String>());
			if (!upstrMap.containsKey(source)) upstrMap.put(source, new HashSet<String>());
			if (!upstrMap.containsKey(target)) upstrMap.put(target, new HashSet<String>());

			neighMap.get(source).add(target);
			neighMap.get(target).add(source);
			dwstrMap.get(source).add(target);
			upstrMap.get(target).add(source);
		}

		// remove intersection of upstream and downstream

		for (String name : neighMap.keySet())
		{
			if (!upstrMap.containsKey(name) || !dwstrMap.containsKey(name)) continue;

			Set<String> upstr = upstrMap.get(name);
			Set<String> dwstr = dwstrMap.get(name);

			Set<String> temp = new HashSet<String>(upstr);
			upstr.removeAll(dwstr);
			dwstr.removeAll(temp);
		}


		Blacklist blacklist = new Blacklist();

		// populate the blacklist

		for (SmallMoleculeReference smr : model.getObjects(SmallMoleculeReference.class))
		{
			String name = normalizer.getName(smr);

			int neighSize = neighMap.containsKey(name) ? neighMap.get(name).size() : 0;
			int upstrOnly = upstrMap.containsKey(name) ? upstrMap.get(name).size() : 0;
			int dwstrOnly = dwstrMap.containsKey(name) ? dwstrMap.get(name).size() : 0;

//			if (neighSize > 30) System.out.println(name + "\t" + neighSize + "\t" + upstrOnly + "\t" + dwstrOnly);

			if (decider.isUbique(neighSize, upstrOnly, dwstrOnly))
			{
				blacklist.addEntry(smr.getUri(),
					decider.getScore(neighSize, upstrOnly, dwstrOnly),
					decider.getContext(neighSize, upstrOnly, dwstrOnly));
			}
		}

		return blacklist;
	}
823008
private void blacklistIfNeeded(
        String nodeName, List<FaultStatsForType> faultStats) {
    for (FaultStatsForType stat : faultStats) {
      if (isBlacklisted(nodeName, stat.type)) {
        continue;
      }
      if (tooManyFailuresOnNode(stat) ||
          tooManyConnectionFailuresOnNode(stat)) {
        nm.blacklistNode(nodeName, stat.type);
        blacklist(nodeName, stat.type);
      }
    }
  }
282798
protected final FluentModelTImpl prepareInlineDefine(FluentModelTImpl model) {
        FluentModelTImpl childResource = find(model.childResourceKey());
        if (childResource != null) {
            throw new IllegalArgumentException(pendingOperationMessage(model.name(), model.childResourceKey()));
        }
        model.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeCreated);
        this.childCollection.put(model.childResourceKey(), model);
        return super.prepareForFutureCommitOrPostRun(model);
    }
508740
public synchronized void replaceModel (MaxentModel model) {
	replacementThread = Thread.currentThread();
	while (!replacementCanProceed) Thread.yield();
	setter.setModel(model);
	replacementThread = null;
    }
348767
private RuleModel updateMethodCall(RuleModel model) {

        for (int i = 0; i < model.rhs.length; i++) {
            if (model.rhs[i] instanceof ActionCallMethod) {
                ActionCallMethod action = (ActionCallMethod) model.rhs[i];
                // Check if method name is filled, if not this was made with an older Guvnor version
                if (action.getMethodName() == null || "".equals(action.getMethodName())) {
                    if (action.getFieldValues() != null && action.getFieldValues().length >= 1) {
                        action.setMethodName(action.getFieldValues()[0].getField());

                        action.setFieldValues(new ActionFieldValue[0]);
                        action.setState(ActionCallMethod.TYPE_DEFINED);
                    }
                }
            }
        }

        return model;
    }
15214
private ODocument getOrCreateModel(String model) {
        ODocument node = getModel(model);
        if (node == null) {
            node = graph.createVertex("Models");
            OrientModelGraphUtils.setIdFieldValue(node, model.toString());
            OrientModelGraphUtils.setActiveFieldValue(node, false);
            node.save();
        }
        return node;
    }
109613
public AdjacencyMatrix searchSIFGetMatrix(Model model)
	{
		Set<SIFInteraction> sifInts = searchSIF(model);
		return new AdjacencyMatrix(
			SIFInteraction.convertToAdjacencyMatrix(sifInts),
			SIFInteraction.getSortedGeneNames(sifInts));
	}
1251239
public void setBlacklist(java.util.Collection<String> blacklist) {
        if (blacklist == null) {
            this.blacklist = null;
            return;
        }

        this.blacklist = new java.util.ArrayList<String>(blacklist);
    }
1132519
@RequestMapping(value = "api/group", method = RequestMethod.GET)
    public
    @ResponseBody
    HashMap<String, Object> getAllGroups(Model model) {
        return Utils.getJQGridJSON(pathOverrideService.findAllGroups(), "groups");
    }
1351992
function ( req, model ) {
		// Create data object (monolithic combination of all parameters)
		// Omit the blacklisted params (like JSONP callback param, etc.)

		// Allow customizable blacklist for params NOT to include as values.
		req.options.values = req.options.values || {};
		req.options.values.blacklist = req.options.values.blacklist;

		// Validate blacklist to provide a more helpful error msg.
		var blacklist = req.options.values.blacklist;
		if ( blacklist && !_.isArray( blacklist ) ) {
			throw new Error( 'Invalid `req.options.values.blacklist`. Should be an array of strings (parameter names.)' );
		}

		// Get values using the model identity as resource identifier
		var values = req.param( _.kebabCase( model.globalId ) ) || {};

		// Omit built-in runtime config (like query modifiers)
		values = _.omit( values, blacklist || [] );

		// Omit any params w/ undefined values
		values = _.omit( values, function ( p ) {
			if ( _.isUndefined( p ) ) return true;
		} );

		// Omit jsonp callback param (but only if jsonp is enabled)
		var jsonpOpts = req.options.jsonp && !req.isSocket;
		jsonpOpts = _.isObject( jsonpOpts ) ? jsonpOpts : {
			callback: JSONP_CALLBACK_PARAM
		};
		if ( jsonpOpts ) {
			values = _.omit( values, [ jsonpOpts.callback ] );
		}

		return values;
	}
212392
@Override
    public String marshal( final TemplateModel model ) {
        model.putInSync();
        return this.xt.toXML( model );
    }
736947
@RequestMapping(value = "/api/profile/{profileIdentifier}", method = RequestMethod.DELETE)
    public
    @ResponseBody
    HashMap<String, Object> removeFromList(Model model, @PathVariable String profileIdentifier) throws Exception {
        Integer profileId = ControllerUtils.convertProfileIdentifier(profileIdentifier);
        logger.info("Want to (preRemove) DELETE on id {}", profileId);
        // TODO: make this remove all clients etc for a profile
        profileService.remove(profileId);
        return Utils.getJQGridJSON(profileService.findAllProfiles(), "profiles");
    }
327622
public List<Item> intercept(List<Model> models) {
        List<Item> items = new ArrayList<>(models.size());
        Item item;
        for (Model model : models) {
            item = intercept(model);
            if (item == null) continue;
            items.add(item);
        }
        return items;
    }
1023854
public String[] getLocalColumns(String modelName) {
		List<String> columnList = new ArrayList<String>();
		for(int i = 0; i < this.hasOne.length; i++){
			if(modelName.equalsIgnoreCase(this.hasOne[i])){
				columnList.add(hasOneLocalColumn[i]);
			}
		}
		for(int j = 0; j < this.hasMany.length; j++){
			if(modelName.equalsIgnoreCase(hasMany[j])){
				columnList.add(hasManyLocalColumn[j]);
			}
		}
		if(columnList.size() == 0){
			return null;
		}
		return columnList.toArray(new String[columnList.size()]);
	}
175597
@RequestMapping(value = "/profiles", method = RequestMethod.GET)
    public String list(Model model) {
        Profile profiles = new Profile();
        model.addAttribute("addNewProfile", profiles);
        model.addAttribute("version", Constants.VERSION);
        logger.info("Loading initial page");

        return "profiles";
    }
265878
public ClassGraph blacklistJars(final String... jarLeafNames) {
        for (final String jarLeafName : jarLeafNames) {
            final String leafName = JarUtils.leafName(jarLeafName);
            if (!leafName.equals(jarLeafName)) {
                throw new IllegalArgumentException("Can only blacklist jars by leafname: " + jarLeafName);
            }
            scanSpec.jarWhiteBlackList.addToBlacklist(leafName);
        }
        return this;
    }
1171994
function(collection, blacklist){
        var obj,
            result = [],
            prop,
            i,
            j,
            collLen,
            listLen;

        blacklist = blacklist || ["__columns"];

        if(!collection || !collection.length){
            return result;
        }

        collLen = collection.length;

        for(i=0; i<collLen; i++){
            obj = collection[i];

            //delete null properties
            for(prop in obj){
                if(obj[prop] === null){
                    delete obj[prop];
                }
            }

            listLen = blacklist.length;
            for(j=0; j<listLen; j++){
                delete obj[blacklist[j]];
            }
            //These are javascript objects and not json, so we have to do this magic to strip it of get methods.
            result.push(JSON.parse(JSON.stringify(obj)));
        }

        return result;
    }