IdName values can be found in ParameterValue entities which are used in Dashboards widget parameters or Scheduler report runtime parameters
509930
private void convertOldIdNameClass() throws RepositoryException {
		String searchRoot = "/jcr:root" + ISO9075.encodePath(StorageConstants.NEXT_SERVER_ROOT);
		String searchPropertyName = "className";
		String searchPropertyValue = "com.asf.nextserver.domain.ParameterValue";
		String statement = searchRoot + "//*[@" + searchPropertyName + "='" + searchPropertyValue + "']";
        QueryResult queryResult = getTemplate().query(statement);

        NodeIterator nodes = queryResult.getNodes();
        LOG.info("Found " + nodes.getSize() +  " parameter value nodes");
        while (nodes.hasNext()) {
        	Node node = nodes.nextNode();
        	Property property = null;
        	try {
        		property = node.getProperty("value");
        	} catch (PathNotFoundException ex) {
        		continue;
        	}
        	try {
	        	Object value = deserialize(property.getBinary().getStream());
	        	if (value instanceof Object[]) {
	        		Object[] values = (Object[]) value;
	        		Object[] convertedValues = new Object[values.length];
		        	boolean converted = false;
	        		for (int i = 0; i < values.length; i++) {
	        			Object tmp = values[i];
	        			if (tmp instanceof com.asf.nextreports.engine.queryexec.IdName) {
	        				com.asf.nextreports.engine.queryexec.IdName oldIdName = (com.asf.nextreports.engine.queryexec.IdName) tmp;
	        				IdName idName = new IdName();
	        				idName.setId(oldIdName.getId());
	        				idName.setName(oldIdName.getName());
	        				convertedValues[i] = idName;
	        				converted = true;
	        			} else {
	        				convertedValues[i] = tmp;
	        			}
	        		}
	        		
	        		if (converted) {
	        			ValueFactory valueFactory = node.getSession().getValueFactory();
	                    Binary binary = valueFactory.createBinary(new ByteArrayInputStream(serialize(convertedValues)));
	        			property.setValue(binary);
	        		}
	        	} else if (value instanceof com.asf.nextreports.engine.queryexec.IdName) {
    				com.asf.nextreports.engine.queryexec.IdName oldIdName = (com.asf.nextreports.engine.queryexec.IdName) value;
    				IdName idName = new IdName();
    				idName.setId(oldIdName.getId());
    				idName.setName(oldIdName.getName());

        			ValueFactory valueFactory = node.getSession().getValueFactory();
                    Binary binary = valueFactory.createBinary(new ByteArrayInputStream(serialize(idName)));
        			property.setValue(binary);
	        	}
        	} catch (Exception e) {
        		e.printStackTrace();
        	}
        }
		
        getTemplate().save();
	}
592777
@Override
    public String getValueByNameAsString(String valueName, String intervalName, TimeUnit timeUnit){
        if (valueName == null || valueName.isEmpty())
            throw new IllegalArgumentException("Value name can not be empty");
        StatValue statValue = statValueMap.get(valueName);
        if (statValue != null) {
            for (T metric : metrics) {
                if (valueName.equals(metric.getCaption()))
                    return getStatValueAsString(metric, intervalName);
            }
        }
        return super.getValueByNameAsString(valueName, intervalName, timeUnit);
    }
41662
private Result getCandidateInfo(String candidateId){

        StatsStorage ss = knownSessionIDs.get(currentSessionID);
        if(ss == null){
            log.debug("getModelLastUpdateTimes(): Session ID is unknown: {}", currentSessionID);
            return ok();
        }

        GlobalConfigPersistable gcp = (GlobalConfigPersistable)ss.getStaticInfo(currentSessionID, ARBITER_UI_TYPE_ID, GlobalConfigPersistable.GLOBAL_WORKER_ID);;
        OptimizationConfiguration oc = gcp.getOptimizationConfiguration();

        Persistable p = ss.getLatestUpdate(currentSessionID, ARBITER_UI_TYPE_ID, candidateId);
        if(p == null){
            String title = "No results found for model " + candidateId + ".";
            ComponentText ct = new ComponentText.Builder(title,STYLE_TEXT_SZ12).build();
            return ok(asJson(ct)).as(JSON);
        }

        ModelInfoPersistable mip = (ModelInfoPersistable)p;

        //First: static info
        // Hyperparameter configuration/settings
        // Number of parameters
        // Maybe memory info in the future?

        //Second: dynamic info
        //Runtime
        // Performance stats (total minibatches, total time,
        // Score vs. time

        List<Component> components = new ArrayList<>();

        //First table: mix of static + dynamic in a table
        long runtimeDurationMs = mip.getLastUpdateTime() - mip.getTimeStamp();
        double avgMinibatchesPerSec = mip.getTotalNumUpdates() / (runtimeDurationMs/1000.0);
        String avgMinibatchesPerSecStr = DECIMAL_FORMAT_2DP.format(avgMinibatchesPerSec);
        String runtimeStr = UIUtils.formatDuration(runtimeDurationMs);

        if(mip.getStatus() == CandidateStatus.Failed){
            runtimeStr = "";
            avgMinibatchesPerSecStr = "";
        }

        String[][] table = new String[][]{
                {"Model Index", String.valueOf(mip.getModelIdx())},
                {"Status", mip.getStatus().toString()},
                {"Model Score", mip.getScore() == null ? "" : String.valueOf(mip.getScore())},
                {"Created", TIME_FORMATTER.print(mip.getTimeStamp())},
                {"Runtime", runtimeStr},
                {"Total Number of Model Updates", String.valueOf(mip.getTotalNumUpdates())},
                {"Average # Updates / Sec", avgMinibatchesPerSecStr},
                {"Number of Parameters", String.valueOf(mip.getNumParameters())},
                {"Number of Layers", String.valueOf(mip.getNumLayers())}
        };

        ComponentTable cTable = new ComponentTable.Builder(STYLE_TABLE)
                .content(table)
                .header("Model Information", "")
                .build();
        components.add(cTable);


        //Second: parameter space values, in multiple tables
        double[] paramSpaceValues = mip.getParamSpaceValues();
        if(paramSpaceValues != null){
            BaseNetworkSpace bns = (BaseNetworkSpace)oc.getCandidateGenerator().getParameterSpace();
            Map<String,ParameterSpace> m = bns.getNestedSpaces();

            String[][] hSpaceTable = new String[m.size()][3];
            int i=0;
            for(Map.Entry<String,ParameterSpace> e : m.entrySet()){
                hSpaceTable[i][0] = e.getKey();
                Object currCandidateValue = e.getValue().getValue(paramSpaceValues);
                hSpaceTable[i][1] = ObjectUtils.valueToString(currCandidateValue);
                hSpaceTable[i][2] = e.getValue().toString();
                i++;
            }

            String[] hSpaceTableHeader = new String[]{"Hyperparameter", "Model Value", "Hyperparameter Space"};

            ComponentTable ct2 = new ComponentTable.Builder(STYLE_TABLE3_25_25_50)
                    .content(hSpaceTable)
                    .header(hSpaceTableHeader)
                    .build();


            String title = "Global Network Configuration";
            components.add(DIV_SPACER_20PX);
            components.add(new ComponentText.Builder(title, STYLE_TEXT_SZ12).build());
            components.add(ct2);

            List<BaseNetworkSpace.LayerConf> layerConfs = bns.getLayerSpaces();

            for(BaseNetworkSpace.LayerConf l : layerConfs){
                LayerSpace<?> ls = l.getLayerSpace();
                Map<String,ParameterSpace> lpsm = ls.getNestedSpaces();

                String[][] t = new String[lpsm.size()][3];
                i=0;
                for(Map.Entry<String,ParameterSpace> e : lpsm.entrySet()){
                    t[i][0] = e.getKey();
                    Object currCandidateValue = e.getValue().getValue(paramSpaceValues);
                    t[i][1] = ObjectUtils.valueToString(currCandidateValue);
                    t[i][2] = e.getValue().toString();
                    i++;
                }

                ComponentTable ct3 = new ComponentTable.Builder(STYLE_TABLE3_25_25_50)
                        .content(t)
                        .header(hSpaceTableHeader)
                        .build();

                title = "Layer Space: " + ls.getClass().getSimpleName() + ", Name: " + l.getLayerName();

                components.add(DIV_SPACER_20PX);
                components.add(new ComponentText.Builder(title, STYLE_TEXT_SZ12).build());
                components.add(ct3);
            }
        }


        //Third: Score vs. time chart
        int[] iters = mip.getIter();
        float[] scores = mip.getScoreVsIter();

        if(iters != null) {
            double[] si = new double[iters.length];
            double[] scoresD = new double[iters.length];

            double minScore = Double.MAX_VALUE;
            double maxScore = -Double.MAX_VALUE;
            for( int i=0; i<iters.length; i++ ){
                si[i] = iters[i];
                scoresD[i] = scores[i];
                minScore = Math.min(minScore, scoresD[i]);
                maxScore = Math.max(maxScore, scoresD[i]);
            }

            double[] chartMinMax = UIUtils.graphNiceRange(maxScore, minScore, 5);

            ChartLine cl = new ChartLine.Builder("Model Score vs. Iteration", STYLE_CHART_800_400)
                    .addSeries("Score", si, scoresD )
                    .setYMin(chartMinMax[0])
                    .setYMax(chartMinMax[1])
                    .build();

            components.add(DIV_SPACER_60PX);
            components.add(cl);
        }


        //Post full network configuration JSON, if available:
        String modelJson = mip.getModelConfigJson();
        if(modelJson != null){
            components.add(DIV_SPACER_60PX);
            components.add(new ComponentDiv(STYLE_DIV_WIDTH_100_PC, new ComponentText("Model Configuration", STYLE_TEXT_SZ12)));
            ComponentText jsonText = new ComponentText(modelJson, STYLE_TEXT_SZ10_WHITESPACE_PRE);
            ComponentDiv cd = new ComponentDiv(STYLE_DIV_WIDTH_100_PC, jsonText);
            components.add(cd);
        }


        //Post exception stack trace, if necessary:
        if( mip.getExceptionStackTrace() != null ){
            components.add(DIV_SPACER_60PX);
            components.add(new ComponentDiv(STYLE_DIV_WIDTH_100_PC, new ComponentText("Model Exception - Stack Trace", STYLE_TEXT_SZ12)));
            ComponentText exText = new ComponentText(mip.getExceptionStackTrace(), STYLE_TEXT_SZ10_WHITESPACE_PRE);
            ComponentDiv cd = new ComponentDiv(STYLE_DIV_WIDTH_100_PC, exText);
            components.add(cd);
        }

        ComponentDiv cd = new ComponentDiv(STYLE_DIV_WIDTH_100_PC, components);

        return ok(asJson(cd)).as(JSON);
    }
896539
@Override
    @Transactional
    public Dashboard findDashboardByNameAndOwner(String name, PrincipalUser owner) {
        requireNotDisposed();
        requireArgument(name != null && !name.isEmpty(), "Dashboard name cannot be null or empty");
        requireArgument(owner != null, "Owner of the dashboard cannot be null");
        _logger.debug("Querying Dashboard by name: {} and owned by: {}", name, owner);

        Dashboard dashboard = Dashboard.findByNameAndOwner(emf.get(), name, owner);

        _logger.debug("Found Dashboard: {}", dashboard);
        return dashboard;
    }
24393
@Override
    public DataSourceHolder getHolder(StatementMetaData metaData, Map<String, Object> runtime) {
        String daoName = metaData.getDAOMetaData().getDAOClass().getName();
        String name = daoName;
        DataSourceHolder dataSource = dataSources.get(name);
        if (dataSource != null) {
            return dataSource;
        }
        while (true) {
            int index = name.lastIndexOf('.');
            if (index == -1) {
                dataSources.putIfAbsent(daoName, defaultDataSource);
                return defaultDataSource;
            }
            name = name.substring(0, index);
            dataSource = dataSources.get(name);
            if (dataSource != null) {
                dataSources.putIfAbsent(daoName, dataSource);
                return dataSource;
            }
        }
    }
107814
public static List<Object> processParameters(OperationResourceInfo ori,
                                                 MultivaluedMap<String, String> values,
                                                 Message message)
        throws IOException, WebApplicationException {

        Class<?>[] parameterTypes = ori.getInParameterTypes();
        List<Parameter> paramsInfo = ori.getParameters();
        boolean preferModelParams = paramsInfo.size() > parameterTypes.length
                                    && !PropertyUtils.isTrue(message.getContextualProperty("org.apache.cxf.preferMethodParameters"));

        int parameterTypesLengh = preferModelParams ? paramsInfo.size() : parameterTypes.length;

        Type[] genericParameterTypes = ori.getInGenericParameterTypes();
        Annotation[][] anns = ori.getInParameterAnnotations();
        List<Object> params = new ArrayList<Object>(parameterTypesLengh);

        for (int i = 0; i < parameterTypesLengh; i++) {
            Class<?> param = null;
            Type genericParam = null;
            Annotation[] paramAnns = null;
            if (!preferModelParams) {
                param = parameterTypes[i];
                genericParam = InjectionUtils.processGenericTypeIfNeeded(
                                                                         ori.getClassResourceInfo().getServiceClass(), param, genericParameterTypes[i]);
                param = InjectionUtils.updateParamClassToTypeIfNeeded(param, genericParam);
                paramAnns = anns == null ? EMPTY_ANNOTATIONS : anns[i];
            } else {
                param = paramsInfo.get(i).getJavaType();
                genericParam = param;
                paramAnns = EMPTY_ANNOTATIONS;
            }

            Object paramValue = processParameter(param,
                                                 genericParam,
                                                 paramAnns,
                                                 paramsInfo.get(i),
                                                 values,
                                                 message,
                                                 ori);
            params.add(paramValue);
        }

        return params;
    }
1329064
def _parameter_values(parameter_values_from_pillars, parameter_value_overrides):
    '''
    
    '''
    from_pillars = copy.deepcopy(__salt__['pillar.get'](parameter_values_from_pillars))
    from_pillars.update(parameter_value_overrides)
    parameter_values = _standardize(from_pillars)
    return _properties_from_dict(parameter_values, key_name='id')
1020990
@Override
    public Object[] findIdsByColumn(String schemaName, String tableName, String pKeyName, String columnName,
            Object columnValue, Class entityClazz)
    {
        String childIdStr = (String) columnValue;
        StringBuffer sqlQuery = new StringBuffer();
        sqlQuery.append("SELECT ").append(pKeyName).append(" FROM ").append(getFromClause(schemaName, tableName))
                .append(" WHERE ").append(columnName).append("='").append(childIdStr).append("'");

        Session s = getSession();

        SQLQuery query = s.createSQLQuery(sqlQuery.toString());

        List<Object> primaryKeys = new ArrayList<Object>();

        primaryKeys = query.list();

        if (primaryKeys != null && !primaryKeys.isEmpty())
        {
            return primaryKeys.toArray(new Object[0]);
        }
        return null;
    }
118729
def _params(sig):
        """"""
        params = []
        for p in sig.parameters:
            param = sig.parameters[p]
            optional = param.default != inspect.Signature.empty
            default = UIBuilder._safe_default(param.default) if param.default != inspect.Signature.empty else ''
            annotation = param.annotation if param.annotation != inspect.Signature.empty else ''
            type = UIBuilder._guess_type(default)

            # Create the parameter attribute dict
            p_attr = {
                "name": param.name,
                "label": param.name,
                "optional": optional,
                "default": default,
                "description": annotation,
                "hide": False,
                "type": type,
                "kinds": None,
                "choices": [],
                "id": None,
                "events": None
            }

            # Special choices handling for boolean parameters
            if isinstance(default, bool):
                p_attr['choices'] = {
                    'True': 'true',
                    'False': 'false'
                }

            # Append it to the list
            params.append(p_attr)
        return params
351769
function getDataRegistry(identifier) {
  assert(!identifier || (typeof identifier === 'string'), `Invalid identifier specified: ${identifier}`);

  if (!window.__private__) window.__private__ = {};
  if (window.__private__.dataRegistry === undefined) window.__private__.dataRegistry = {};

  if (identifier)
    return namespace(identifier, window.__private__.dataRegistry);
  else if (identifier === null)
    return null
  else
    return window.__private__.dataRegistry;
}
1252107
public void validateNamedParameters() {
      if (namedParameters != null) {
         for (Map.Entry<String, Object> e : namedParameters.entrySet()) {
            if (e.getValue() == null) {
               throw log.queryParameterNotSet(e.getKey());
            }
         }
      }
   }
464946
private Set<String> getAllReferencedTypeNames(Set<ApiResourceMetadata> controllers) {
		// TODO Add nested objects as well. For now only the top level objects
		// are included
		Set<String> parametersNames = controllers.stream().flatMap(resourceMetadata -> resourceMetadata.getParameters().stream())
				.map(apiParameter -> StringUtils.capitalize(apiParameter.getName())).collect(Collectors.toSet());
		Set<String> bodyNames = controllers.stream().flatMap(resourceMetadata -> resourceMetadata.getDependencies().stream())
				.map(ApiBodyMetadata::getName).collect(Collectors.toSet());
		bodyNames.addAll(parametersNames);
		return bodyNames;
	}
1197972
public String getIdName() {
        String result = null;
        if (idAccessor != null) {
            result = idAccessor.getPropertyName();
        }
        return result;
    }
647770
public static List<Object> processParameters(OperationResourceInfo ori,
                                                 MultivaluedMap<String, String> values,
                                                 Message message) throws IOException, WebApplicationException {

        Class<?>[] parameterTypes = ori.getInParameterTypes();
        List<Parameter> paramsInfo = ori.getParameters();
        boolean preferModelParams = paramsInfo.size() > parameterTypes.length
                                    && !PropertyUtils.isTrue(message.getContextualProperty("org.apache.cxf.preferMethodParameters"));

        final int parameterTypesLength = preferModelParams ? paramsInfo.size() : parameterTypes.length;
        if (parameterTypesLength < 1) {
            return Collections.emptyList();
        }

        Type[] genericParameterTypes = ori.getInGenericParameterTypes();
        Annotation[][] anns = ori.getInParameterAnnotations();
        Object[] params = new Object[parameterTypesLength];

        // Ensure we process all request-body parameters first, then all @*Params, etc.
        ParamTuple[] tuple = new ParamTuple[parameterTypesLength];
        for (int i = 0; i < parameterTypesLength; i++) {
            tuple[i] = new ParamTuple();
            if (!preferModelParams) {
                tuple[i].param = parameterTypes[i];
                tuple[i].genericParam = InjectionUtils.processGenericTypeIfNeeded(
                    ori.getClassResourceInfo().getServiceClass(), tuple[i].param, genericParameterTypes[i]);
                tuple[i].param = InjectionUtils.updateParamClassToTypeIfNeeded(tuple[i].param, 
                                                                               tuple[i].genericParam);
                tuple[i].paramAnns = anns == null ? EMPTY_ANNOTATIONS : anns[i];
            } else {
                tuple[i].param = paramsInfo.get(i).getJavaType();
                tuple[i].genericParam = tuple[i].param;
                tuple[i].paramAnns = EMPTY_ANNOTATIONS;
            }
            if (paramsInfo.get(i).getType() == ParameterType.REQUEST_BODY) {
                params[i] = processRequestBodyParameter(tuple[i].param, 
                                                        tuple[i].genericParam, 
                                                        tuple[i].paramAnns,
                                                        message,
                                                        ori);
            }
        }
        for (int i = 0; i < parameterTypesLength; i++) {

            if (paramsInfo.get(i).getType() != ParameterType.REQUEST_BODY) {
                params[i] = processParameter(tuple[i].param,
                                             tuple[i].genericParam,
                                             tuple[i].paramAnns,
                                             paramsInfo.get(i),
                                             values,
                                             message,
                                             ori);
            }
        }

        return Arrays.asList(params);
    }
1161273
def _getbugs(self, idlist, permissive,
            include_fields=None, exclude_fields=None, extra_fields=None):
        
        oldidlist = idlist
        idlist = []
        for i in oldidlist:
            try:
                idlist.append(int(i))
            except ValueError:
                # String aliases can be passed as well
                idlist.append(i)

        extra_fields = self._listify(extra_fields or [])
        extra_fields += self._getbug_extra_fields

        getbugdata = {"ids": idlist}
        if permissive:
            getbugdata["permissive"] = 1

        getbugdata.update(self._process_include_fields(
            include_fields, exclude_fields, extra_fields))

        r = self._proxy.Bug.get(getbugdata)

        if self._check_version(4, 0):
            bugdict = dict([(b['id'], b) for b in r['bugs']])
        else:
            bugdict = dict([(b['id'], b['internals']) for b in r['bugs']])

        ret = []
        for i in idlist:
            found = None
            if i in bugdict:
                found = bugdict[i]
            else:
                # Need to map an alias
                for valdict in bugdict.values():
                    if i in self._listify(valdict.get("alias", None)):
                        found = valdict
                        break

            ret.append(found)

        return ret
854718
public Map<String, String> getUriVariablesForEntity(BullhornEntityInfo entityInfo, Integer id, Set<String> fieldSet, EntityParams params) {

		if (params == null) {
			params = ParamFactory.entityParams();
		}

		Map<String, String> uriVariables = params.getParameterMap();
		this.addCommonUriVariables(fieldSet, entityInfo, uriVariables);
		
		uriVariables.put(ID, id == null ? "" : id.toString());
		return uriVariables;
	}
1024191
def getParamValues(self, paramName=None, paramId=None, useOnlyValids=True):
        
        
        if not paramName is None:
            if not paramId is None:
                if getParameterTypeNameFromID(paramId) != paramName:
                    raise ValueError("Parameters paramId and paramName "
                                    + "passed to ParamSample.getParamValues() are incompatible.")
        else:
            if paramId is None:
                raise ValueError("At least one of the attribute paramName and paramId "
                                    + "passed to ParamSample.getParamValues() most not be None.")
            paramName = getParameterTypeNameFromID(paramId)
        
        df = self.sampleDF
        if useOnlyValids:
            df = df[df["isValid"] == True]

        df.loc[:, "paramNames"] = [getParameterTypeNameFromID(param.typeId) for param in df["obj_parameter"]]

        return df[df["paramNames"] == paramName]