Compiles the effective media query of this section into a string

@param scope the scope used to resolve variables
@param gen   the generator used to evaluate functions
@return the effective media query as string or "" if there is no media query
508938
public String getMediaQuery(Scope scope, Generator gen) {
        StringBuilder sb = new StringBuilder();
        for (Expression expr : mediaQueries) {
            if (sb.length() > 0) {
                sb.append(" and ");
            }
            sb.append(expr.eval(scope, gen));
        }
        return sb.toString();
    }
172229
public static int getScopeId(String scope) throws JspTagException {
		if(scope==null || PAGE.equals(scope)) return PageContext.PAGE_SCOPE;
		else if(REQUEST.equals(scope)) return PageContext.REQUEST_SCOPE;
		else if(SESSION.equals(scope)) return PageContext.SESSION_SCOPE;
		else if(APPLICATION.equals(scope)) return PageContext.APPLICATION_SCOPE;
		else throw new LocalizedJspTagException(ApplicationResources.accessor, "Scope.scope.invalid", scope);
	}
1273518
function stringify(name, props, query) {
  return query ? makeMediaQuery(name, props, query) : makeClass(name, props);
}
563027
public static <E> String generateQuestion(byte[] args) {
		if (args == null || args.length == 0)
			return "";

		return generateInternal(args.length);
	}
460651
public TypeUsage.Builder nullableScope(QualifiedName scope) {
    if (scope != null) {
      return scope(scope);
    } else {
      return clearScope();
    }
  }
109900
public GenerateMediaDeliveryInfoResponse generateMediaDeliveryInfo(String mediaId, String transcodingPresetName) {
        GenerateMediaDeliveryInfoRequest request = new GenerateMediaDeliveryInfoRequest()
                .withMediaId(mediaId)
                .withTranscodingPresetName(transcodingPresetName);
        return generateMediaDeliveryInfo(request);
    }
529985
protected String formatStreamOutput(GenericData genData) {
        String txt = null;
        String loglevel = null;
        KeyValuePair kvp = null;

        KeyValuePair[] pairs = genData.getPairs();
        for (KeyValuePair p : pairs) {

            if (p != null && !p.isList()) {

                kvp = p;
                if (kvp.getKey().equals("message")) {
                    txt = kvp.getStringValue();
                } else if (kvp.getKey().equals("loglevel")) {
                    loglevel = kvp.getStringValue();
                }
            }
        }

        String message = BaseTraceService.filterStackTraces(txt);
        if (message != null) {
            if (loglevel.equals("SystemErr")) {
                message = "[err] " + message;
            }
        }
        return message;
    }
72023
protected String redefineArgsIfNeeds(String formatString) {
        if (!formatString.contains("{") || !formatString.contains("}")) { // no parameter
            return formatString;
        }
        final List<ScopeInfo> plainVariableList = Srl.extractScopeList(formatString, "{", "}");
        if (!plainVariableList.stream()
                .map(info -> info.getContent()) // to content list
                .filter(tent -> !Srl.isNumberHarfAll(tent)) // named only (non-number only)
                .findAny() // one or zero
                .isPresent()) { // no named exists, number only
            return formatString; // no need to redefine
        }
        createVariableOrderAgent().orderScopeList(plainVariableList);
        final Map<String, String> fromToMap = new LinkedHashMap<String, String>(plainVariableList.size());
        int index = 0;
        for (ScopeInfo scopeInfo : plainVariableList) {
            fromToMap.put(scopeInfo.getScope(), "{" + index + "}");
            ++index;
        }
        return buildRedefinedMessage(formatString, fromToMap);
    }
368670
public GeneratorSetBuilder generator( String functionName, ITestCaseGenerator generator)
    {
    generatorSet_.addGenerator( functionName, generator);
    return this;
    }
1343555
public ProjectGenerationResponse generate(ProjectGenerationRequest request)
			throws IOException {
		Log.info("Using service at " + request.getServiceUrl());
		InitializrServiceMetadata metadata = loadMetadata(request.getServiceUrl());
		URI url = request.generateUrl(metadata);
		CloseableHttpResponse httpResponse = executeProjectGenerationRequest(url);
		HttpEntity httpEntity = httpResponse.getEntity();
		validateResponse(httpResponse, request.getServiceUrl());
		return createResponse(httpResponse, httpEntity);
	}
94486
public String getGenre(int type)
	{
		if (allow(type&ID3V1))
		{
			return id3v1.getGenreString();
		}
		if (allow(type&ID3V2))
		{
			return id3v2.getFrameDataString(ID3v2Frames.CONTENT_TYPE);
		}
		return null;
	}
326666
public static String[] streamTags(String scope, String stream) {
        return new String[] {TAG_SCOPE, scope, TAG_STREAM, stream};
    }
446638
public static <RESULT> JSONComposer<RESULT> streamComposer(int features,
            JsonGenerator gen, boolean closeGenerator)
    {
        return new JSONComposer<RESULT>(features, gen, closeGenerator);
    }
194391
@SuppressWarnings("null")
  protected final @Nullable String getMediaRef(@NotNull MediaRequest mediaRequest,
      @Nullable MediaHandlerConfig mediaHandlerConfig) {
    if (StringUtils.isNotEmpty(mediaRequest.getMediaRef())) {
      return mediaRequest.getMediaRef();
    }
    else if (mediaRequest.getResource() != null) {
      String refProperty = getMediaRefProperty(mediaRequest, mediaHandlerConfig);
      return mediaRequest.getResource().getValueMap().get(refProperty, String.class);
    }
    else {
      return null;
    }
  }
275752
public Collection<File> getClasspath( String scope )
        throws MojoExecutionException
    {
        try
        {
            Collection<File> files = classpathBuilder.buildClasspathList( getProject(), scope, getProjectArtifacts(), isGenerator() );

            if ( getLog().isDebugEnabled() )
            {
                getLog().debug( "GWT SDK execution classpath :" );
                for ( File f : files )
                {
                    getLog().debug( "   " + f.getAbsolutePath() );
                }
            }
            return files;
        }
        catch ( ClasspathBuilderException e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }
    }
467241
protected String getRealIdScope()
    {
        ServletRequest request = pageContext.getRequest();
        
        // default to the set idScope.
        String idScope = _idScope;

        // if there isn't a set idScope and generate scope is on, generate the scope id.
        if (_idScope == null && _genScope) {
            int id = getNextId(request);
            idScope = "n" + Integer.toString(id);
            _idScope = idScope;
        }
        
        // if there's still no idScope and we're in a ScopedRequest, use the scope-key from the request.
        if (_idScope == null) {
            ScopedRequest scopedRequest = ScopedServletUtils.unwrapRequest(request);
            if (scopedRequest != null) {
                _idScope = scopedRequest.getScopeKey().toString();
                idScope = _idScope;
            }
        }
        
        return idScope;
    }
569906
def gen_res(args, resource, inflow, outflow):
    
    return "".join(["RESOURCE ", resource, ":inflow=", str(inflow),
                    ":outflow=", str(outflow), "\n"])