Yields the value of the required and error level CSS class.

@param input
@param clientId
@return
767266
public String getErrorAndRequiredClass(UIInput input, String clientId) {
		String[] levels = { "bf-no-message", "bf-info", "bf-warning", "bf-error", "bf-fatal" };
		int level = 0;
		Iterator<FacesMessage> messages = FacesContext.getCurrentInstance().getMessages(clientId);
		if (null != messages) {
			while (messages.hasNext()) {
				FacesMessage message = messages.next();
				if (message.getSeverity().equals(FacesMessage.SEVERITY_INFO))
					if (level < 1)
						level = 1;
				if (message.getSeverity().equals(FacesMessage.SEVERITY_WARN))
					if (level < 2)
						level = 2;
				if (message.getSeverity().equals(FacesMessage.SEVERITY_ERROR))
					if (level < 3)
						level = 3;
				if (message.getSeverity().equals(FacesMessage.SEVERITY_FATAL))
					if (level < 4)
						level = 4;
			}
		}
		String styleClass = levels[level];
		if (input.isRequired()) {
			styleClass += " bf-required";
		}
		return styleClass;
	}
46714
public static int readRawVarint32(InputStream input) throws IOException {
    int firstByte = input.read();
    return CodedInputStream.readRawVarint32(firstByte, input);
  }
855063
public static BufferedImage readQuietly(final InputStream input)
	{
		BufferedImage img = null;
		try
		{
			img = ImageIO.read(input);
		}
		catch (IOException e)
		{
			log.log(Level.SEVERE, "Reading image failed.", e);
		}
		return img;
	}
1085843
protected String getSubstitutionValue(String input)
   {
      if (input == null || input.trim().equals(""))
         return input;

      while (input.indexOf("${") != -1)
      {
         int from = input.indexOf("${");
         int to = input.indexOf("}");
         int dv = input.indexOf(":", from + 2);

         if (dv != -1 && dv > to)
         {
            dv = -1;
         }
         
         String systemProperty = "";
         String defaultValue = "";
         if (dv == -1)
         {
            String s = input.substring(from + 2, to);
            if ("/".equals(s))
            {
               systemProperty = File.separator;
            }
            else if (":".equals(s))
            {
               systemProperty = File.pathSeparator;
            }
            else
            {
               systemProperty = SecurityActions.getSystemProperty(s);
            }
         }
         else
         {
            systemProperty = SecurityActions.getSystemProperty(input.substring(from + 2, dv));
            defaultValue = input.substring(dv + 1, to);
         }
         String prefix = "";
         String postfix = "";

         if (from != 0)
         {
            prefix = input.substring(0, from);
         }
         
         if (to + 1 < input.length() - 1)
         {
            postfix = input.substring(to + 1);
         }

         if (systemProperty != null && !systemProperty.trim().equals(""))
         {
            input = prefix + systemProperty + postfix;
         }
         else if (!defaultValue.trim().equals(""))
         {
            input = prefix + defaultValue + postfix;
         }
         else
         {
            input = prefix + postfix;
         }
      }
      return input;
   }
1224256
public static Appendable render(final String input, Appendable target) throws IOException {

        int i = 0;
        int j, k;

        while (true) {
            j = input.indexOf(BEGIN_TOKEN, i);
            if (j == -1) {
                if (i == 0) {
                    target.append(input);
                    return target;
                }
                target.append(input.substring(i, input.length()));
                return target;
            }
            target.append(input.substring(i, j));
            k = input.indexOf(END_TOKEN, j);

            if (k == -1) {
                target.append(input);
                return target;
            }
            j += BEGIN_TOKEN_LEN;
            String spec = input.substring(j, k);

            String[] items = spec.split(CODE_TEXT_SEPARATOR, 2);
            if (items.length == 1) {
                target.append(input);
                return target;
            }
            String replacement = render(items[1], items[0].split(CODE_LIST_SEPARATOR));

            target.append(replacement);

            i = k + END_TOKEN_LEN;
        }
    }
455259
@SuppressWarnings("rawtypes")
	@Override
	public int doGetClassificationId(Object input) {
		Object hashValue = input instanceof Entry ? ((Entry)input).getKey() : input;

		int groupId = (hashValue.hashCode() & Integer.MAX_VALUE) % this.getSize();
		return groupId;
	}
1140843
private static TDClientHttpException clientError(TDClientHttpException e, ResponseContext responseContext)
    {
        boolean showWarning = true;
        boolean showStackTrace = false;
        int code = e.getStatusCode();
        switch (code) {
            case HttpStatus.NOT_FOUND_404:
                // Not found (e.g., database, table, table distribution data might be missing)
                showWarning = false;
                break;
            case HttpStatus.CONFLICT_409:
                // Suppress stack trace because 409 frequently happens when checking the presence of databases and tables.
                showStackTrace = false;
                break;
            default:
                if (!(HttpStatus.isClientError(code) || HttpStatus.isServerError(code))) {
                    // Show stack trace for non 4xx, 5xx errors
                    showStackTrace = true;
                }
                break;
        }
        if (showWarning) {
            if (showStackTrace) {
                logger.warn(e.getCause() == null ? e.getMessage() : e.getCause().getClass().toString(), e);
            }
            else {
                logger.warn(e.getCause() == null ? e.getMessage() : e.getCause().getClass().toString());
            }
        }
        return e;
    }
838823
protected void renderId(
      FacesContext context,
      UIComponent  component) throws IOException
    {
      if (shouldRenderId(context, component))
      {
        String clientId = getClientId(context, component);
        context.getResponseWriter().writeAttribute(HTML.ID_ATTR, clientId, JSFAttr.ID_ATTR);
      }
    }
395336
private String _getIdFromClientId(String clientId)
  {
    final char separator = getFacesContext().getNamingContainerSeparatorChar();
    int lastIndex = clientId.lastIndexOf(separator);

    String id = null;

    if (lastIndex < 0)
    {
      id = clientId;
    }
    else if (lastIndex < (clientId.length() - 1))
    {
      id = clientId.substring(lastIndex + 1);              
    }
    //else
    //{
      // TODO log warning for trailing colon case
    //}
 
    return id;
  }
425786
protected void generateErrorAndRequiredClass(UIInput input, ResponseWriter rw, String clientId,
			String additionalClass1, String additionalClass2, String additionalClass3) throws IOException {
		String styleClass = getErrorAndRequiredClass(input, clientId);
		if (null != additionalClass1) {
			additionalClass1 = additionalClass1.trim();
			if (additionalClass1.trim().length() > 0) {
				styleClass += " " + additionalClass1;
			}
		}
		if (null != additionalClass2) {
			additionalClass2 = additionalClass2.trim();
			if (additionalClass2.trim().length() > 0) {
				styleClass += " " + additionalClass2;
			}
		}
		if (null != additionalClass3) {
			additionalClass3 = additionalClass3.trim();
			if (additionalClass3.trim().length() > 0) {
				styleClass += " " + additionalClass3;
			}
		}
		rw.writeAttribute("class", styleClass, "class");
	}
1342528
protected void renderInputBegin(FacesContext facesContext,
            UIComponent uiComponent) throws IOException
    {
        ResponseWriter writer = facesContext.getResponseWriter();
        
        writer.startElement(HTML.INPUT_ELEM, uiComponent);
        writer.writeAttribute(HTML.TYPE_ATTR, org.apache.myfaces.shared.renderkit.html.HTML.INPUT_TYPE_PASSWORD, null);

        if (uiComponent instanceof ClientBehaviorHolder
                && !((ClientBehaviorHolder) uiComponent).getClientBehaviors().isEmpty())
        {
            writer.writeAttribute(HTML.ID_ATTR, 
                                  uiComponent.getClientId(facesContext), null);
        }
        else
        {
            HtmlRendererUtils.writeIdIfNecessary(writer, uiComponent, facesContext);
        }
        writer.writeAttribute(HTML.NAME_ATTR,
                              uiComponent.getClientId(facesContext), null);

        boolean isRedisplay;
        if (uiComponent instanceof HtmlInputSecret)
        {
            isRedisplay = ((HtmlInputSecret)uiComponent).isRedisplay();
        }
        else
        {
            isRedisplay = org.apache.myfaces.shared.renderkit.RendererUtils.getBooleanAttribute(uiComponent, 
                    JSFAttr.REDISPLAY_ATTR, false);
        }
        if (isRedisplay)
        {
            String strValue = RendererUtils.getStringValue(facesContext, uiComponent);
            writer.writeAttribute(HTML.VALUE_ATTR, strValue, JSFAttr.VALUE_ATTR);
        }

        Map<String, List<ClientBehavior>> behaviors = null;
        if (uiComponent instanceof ClientBehaviorHolder)
        {
            behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
            
            long commonPropertiesMarked = 0L;
            if (isCommonPropertiesOptimizationEnabled(facesContext))
            {
                commonPropertiesMarked = CommonPropertyUtils.getCommonPropertiesMarked(uiComponent);
            }
            if (behaviors.isEmpty() && isCommonPropertiesOptimizationEnabled(facesContext))
            {
                CommonPropertyUtils.renderChangeEventProperty(writer, 
                        commonPropertiesMarked, uiComponent);
                CommonPropertyUtils.renderEventProperties(writer, 
                        commonPropertiesMarked, uiComponent);
                CommonPropertyUtils.renderFieldEventPropertiesWithoutOnchange(writer, 
                        commonPropertiesMarked, uiComponent);
            }
            else
            {
                HtmlRendererUtils.renderBehaviorizedOnchangeEventHandler(facesContext, writer, uiComponent, behaviors);
                if (isCommonEventsOptimizationEnabled(facesContext))
                {
                    Long commonEventsMarked = CommonEventUtils.getCommonEventsMarked(uiComponent);
                    CommonEventUtils.renderBehaviorizedEventHandlers(facesContext, writer, 
                            commonPropertiesMarked, commonEventsMarked, uiComponent, behaviors);
                    CommonEventUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(
                        facesContext, writer, commonPropertiesMarked, commonEventsMarked, uiComponent, behaviors);
                }
                else
                {
                    HtmlRendererUtils.renderBehaviorizedEventHandlers(facesContext, writer, uiComponent, behaviors);
                    HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(
                            facesContext, writer, uiComponent, behaviors);
                }
            }
            if (isCommonPropertiesOptimizationEnabled(facesContext))
            {
                CommonPropertyUtils.renderInputPassthroughPropertiesWithoutDisabledAndEvents(writer, 
                        commonPropertiesMarked, uiComponent);
            }
            else
            {
                HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, 
                        HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
            }
        }
        else
        {
            if (isCommonPropertiesOptimizationEnabled(facesContext))
            {
                CommonPropertyUtils.renderInputPassthroughPropertiesWithoutDisabled(writer, 
                        CommonPropertyUtils.getCommonPropertiesMarked(uiComponent), uiComponent);
            }
            else
            {
                HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, 
                        HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
            }
        }

        if (isDisabled(facesContext, uiComponent))
        {
            writer.writeAttribute(HTML.DISABLED_ATTR, Boolean.TRUE, null);
        }

        if (isAutocompleteOff(facesContext, uiComponent))
        {
            writer.writeAttribute(HTML.AUTOCOMPLETE_ATTR, AUTOCOMPLETE_VALUE_OFF, HTML.AUTOCOMPLETE_ATTR);
        }
    }
1296281
function(input){

                this._tokenStream = new TokenStream(input, Tokens);

                //skip any leading white space
                this._readWhitespace();

                var result = this._selector();

                //skip any trailing white space
                this._readWhitespace();

                //if there's anything more, then it's an invalid selector
                this._verifyEnd();

                //otherwise return result
                return result;
            }
859698
public Document check(final InputStream input) {
        Document document;
        try {
            final DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
            document = docBuilder.parse(input);

            final InputStream is = getClass().getResourceAsStream(xslSchema);
            final Source source = new SAXSource(new InputSource(is));
            checkIsValid(document, source);
        } catch (final SAXException exce) {
            throw new JaxRxException(400, exce.getMessage());
        } catch (final ParserConfigurationException exce) {
            throw new JaxRxException(exce);
        } catch (final IOException exce) {
            throw new JaxRxException(exce);
        }
        return document;
    }
455598
public Optional<? extends Style> loadStyle(
            final Configuration configuration,
            @Nonnull final ClientHttpRequestFactory clientHttpRequestFactory,
            final String styleString) {
        if (styleString != null) {
            for (StyleParserPlugin plugin: this.plugins) {
                final Optional<? extends Style> style = plugin.parseStyle(
                        configuration, clientHttpRequestFactory, styleString);
                if (style.isPresent()) {
                    if (LOGGER.isDebugEnabled()) {
                        try {
                            final SLDTransformer transformer = new SLDTransformer();
                            final StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory();
                            final UserLayer userLayer = styleFactory.createUserLayer();
                            userLayer.addUserStyle(style.get());
                            final StyledLayerDescriptor sld = styleFactory.createStyledLayerDescriptor();
                            sld.addStyledLayer(userLayer);
                            if (LOGGER.isDebugEnabled()) {
                                LOGGER.debug("Loaded style from: \n\n '{}': \n\n{}",
                                             styleString, transformer.transform(sld));
                            }
                        } catch (Exception e) {
                            LOGGER.debug(
                                    "Loaded style from: \n\n '{}' \n\n<Unable to transform it to xml>",
                                    styleString, e);
                        }
                    }
                    return style;
                }
            }
        }
        return Optional.empty();
    }
1109406
function doRenderValueInput(value, onChange) {
        return _react2.default.createElement(_TextField.TextField, { value: value, onChanged: function onChanged(val) {
                return onChange(val);
            } });
    }
955091
public function html($client=null)
	{
		$this->setRendered(true);
		$id = self::idPrefix.$this->id;
		$return  = '<div class="'.self::elementClass."\" id=\"{$id}_container\">";
		$return .= "<label for=\"".self::idPrefix."{$this->id}\">{$this->title}:</label>";
		$return .= "<div class=\"input\">";
		$return .= "<input type=\"text\" name=\"{$this->name}\" ".
			"id=\"{$id}\" value=\"".htmlspecialchars($this->value)."\" ".
			(isset($this->min)?"maxlength=\"{$this->max}\" ":'').
			($this->readonly===true?'readonly="readonly" ':'').
			($this->disabled===true?'disabled="disabled" ':'').
			"/></div></div>";
		if(!is_null($client) and is_callable(array($this, $client)))
		{
			$return = $this->{$client}($return);
		}
		return $return;
	}
270659
public static Integer parseWebColorAsAndroidColor(String input) {
		// Swap if input is #RRGGBBAA, but not if it is #RRGGBB
		Boolean swapAlpha = (input.length() == 9);
		try {
			Integer ret = Color.parseColor(input);
			if (swapAlpha) {
				ret = (ret >>> 8) | ((ret & 0x000000FF) << 24);
			}
			return ret;
		} catch (IllegalArgumentException e) {
			logException(e);
		}
		return null;
	}