String constructor
@param name
@param help
@param placeholder
@return
350180
public static ParamConfig String(String name, String help, String placeholder) {
        return new SingleParamConfig(name, "String", help, placeholder);
    }
285364
private static Token createPlainToken(final String placeholder) {
		int splitIndex = placeholder.indexOf(':');
		Token token;

		if (splitIndex == -1) {
			token = createPlainToken(placeholder.trim(), null);
		} else {
			String name = placeholder.substring(0, splitIndex).trim();
			String configuration = placeholder.substring(splitIndex + 1).trim();
			token = createPlainToken(name, configuration);
		}

		return token == null ? new PlainTextToken(placeholder) : token;
	}
625108
private java.lang.reflect.Method findConstr(String name) {
        Selection slkt;
        int i;

        slkt = Method.forName(name);
        slkt = slkt.restrictArgumentCount(fields.length);
        for (i = 0; i < fields.length; i++) {
            slkt.restrictArgumentType(i, fields[i].getReturnType());
        }
        switch (slkt.size()) {
        case 0:
            throw new RuntimeException("no such constructor: " + name);
        case 1:
            return ((Method) slkt.getFunction()).getRaw();
        default:
            throw new RuntimeException("constructor ambiguous: " + name);
        }
    }
830257
private String initConsoleAndGetAnswer() {

        ConsoleReaderWrapper consoleReaderWrapper = initConsole();

        String input = "";
        boolean valid = false;

        while (!valid) {
            input = consoleReaderWrapper.getInput();
            valid = validate(consoleReaderWrapper, input);
            if (!valid) {
                consoleReaderWrapper.print("");
                consoleReaderWrapper.print(question);
            }
        }

        consoleReaderWrapper.close();
        return input;
    }
158729
public void help() {
        p("");
        p("Command                Description");
        p("=======                ===========");
        p("help()                 Display usage and help messages. ");
        p("defineClass(className) Define an extension using the Java class");
        p("                       named with the string argument. ");
        p("                       Uses ScriptableObject.defineClass(). ");
        p("load(['foo.js', ...])  Load JavaScript source files named by ");
        p("                       string arguments. ");
        p("loadClass(className)   Load a class named by a string argument.");
        p("                       The class must be a script compiled to a");
        p("                       class file. ");
        p("print([expr ...])      Evaluate and print expressions. ");
        p("quit()                 Quit the shell. ");
        p("version([number])      Get or set the JavaScript version number.");
        p("");
    }
528283
private String generateSafeMethodName(StorableInfo info, String prefix) {
        Class type = info.getStorableType();

        // Try a few times to generate a unique name. There's nothing special
        // about choosing 100 as the limit.
        int value = 0;
        for (int i = 0; i < 100; i++) {
            String name = prefix + value;
            if (!methodExists(type, name)) {
                return name;
            }
            value = name.hashCode();
        }

        throw new InternalError("Unable to create unique method name starting with: "
                + prefix);
    }
681268
public Symbol resolveIdent(String name) {
        if (name.equals(""))
            return syms.errSymbol;
        JavaFileObject prev = log.useSource(null);
        try {
            JCExpression tree = null;
            for (String s : name.split("\\.", -1)) {
                if (!SourceVersion.isIdentifier(s)) // TODO: check for keywords
                    return syms.errSymbol;
                tree = (tree == null) ? make.Ident(names.fromString(s))
                                      : make.Select(tree, names.fromString(s));
            }
            JCCompilationUnit toplevel =
                make.TopLevel(List.<JCTree.JCAnnotation>nil(), null, List.<JCTree>nil());
            toplevel.packge = syms.unnamedPackage;
            return attr.attribIdent(tree, toplevel);
        } finally {
            log.useSource(prev);
        }
    }
99477
private Node tryFoldLiteralConstructor(Node n) {
    checkArgument(n.isCall() || n.isNew());

    Node constructorNameNode = n.getFirstChild();

    Node newLiteralNode = null;

    // We require the AST to be normalized to ensure that, say,
    // Object() really refers to the built-in Object constructor
    // and not a user-defined constructor with the same name.

    if (isASTNormalized() && constructorNameNode.isName()) {

      String className = constructorNameNode.getString();

      if ("RegExp".equals(className)) {
        // "RegExp("boo", "g")" --> /boo/g
        return tryFoldRegularExpressionConstructor(n);
      } else {
        boolean constructorHasArgs = constructorNameNode.getNext() != null;

        if ("Object".equals(className) && !constructorHasArgs) {
          // "Object()" --> "{}"
          newLiteralNode = IR.objectlit();
        } else if ("Array".equals(className)) {
          // "Array(arg0, arg1, ...)" --> "[arg0, arg1, ...]"
          Node arg0 = constructorNameNode.getNext();
          FoldArrayAction action = isSafeToFoldArrayConstructor(arg0);

          if (action == FoldArrayAction.SAFE_TO_FOLD_WITH_ARGS ||
              action == FoldArrayAction.SAFE_TO_FOLD_WITHOUT_ARGS) {
            newLiteralNode = IR.arraylit();
            n.removeFirstChild(); // discard the function name
            Node elements = n.removeChildren();
            if (action == FoldArrayAction.SAFE_TO_FOLD_WITH_ARGS) {
              newLiteralNode.addChildrenToFront(elements);
            }
          }
        }

        if (newLiteralNode != null) {
          n.replaceWith(newLiteralNode);
          reportChangeToEnclosingScope(newLiteralNode);
          return newLiteralNode;
        }
      }
    }
    return n;
  }
831241
@Override
    public void addPlaceholder(String placeholder, String value) {
        placeholderMap.put(placeholder, value);
    }
153061
def create(prefix, params, hint):
        """"""
        current = getattr(_BlockScope._current, "value", None)
        if current is None:
            if prefix is None:
                if not hasattr(_name.NameManager._current, "value"):
                    _name.NameManager._current.value = _name.NameManager()
                prefix = _name.NameManager._current.value.get(None, hint) + '_'
            if params is None:
                params = ParameterDict(prefix)
            else:
                params = ParameterDict(params.prefix, params)
            return prefix, params

        if prefix is None:
            count = current._counter.get(hint, 0)
            prefix = '%s%d_'%(hint, count)
            current._counter[hint] = count + 1
        if params is None:
            parent = current._block.params
            params = ParameterDict(parent.prefix+prefix, parent._shared)
        else:
            params = ParameterDict(params.prefix, params)
        return current._block.prefix+prefix, params
4991
public String helloWorld(String name)
   {
      if (mc == null)
         associate();

      return mc.helloWorld(name);
   }
207230
public static Matcher constructorPropertyDeclaration() {
    return new Matcher() {
      @Override public boolean matches(Node node, NodeMetadata metadata) {
        // This will match against code that looks like:
        // /** @constructor */
        // function constructor() {
        //   this.variable = 3;
        // }
        if (!node.isAssign()
            || !node.getFirstChild().isGetProp()
            || !node.getFirstFirstChild().isThis()) {
          return false;
        }
        while (node != null && !node.isFunction()) {
          node = node.getParent();
        }
        if (node != null && node.isFunction()) {
          JSDocInfo jsDoc = NodeUtil.getBestJSDocInfo(node);
          if (jsDoc != null) {
            return jsDoc.isConstructor();
          }
        }
        return false;
      }
    };
  }
510688
public final void setPlaceholder(String text,
                                     @ColorInt int backgroundColor,
                                     @ColorInt int textColor) {
        boolean invalidate = false;
        // Set the placeholder background color
        if (backgroundColor != mBackgroundColor) {
            mBackgroundColor = backgroundColor;
            if (null != mBackgroundPaint) {
                mBackgroundPaint.setColor(backgroundColor);
                invalidate = true;
            }
        }
        // Set the placeholder text color
        if (!text.equalsIgnoreCase(mText) ||
            (backgroundColor != mBackgroundColor) ||
            (textColor != mTextColor)) {
            setPlaceholderTextInternal(text, textColor, mTextSize, false);
            invalidate = true;
        }

        if (invalidate) {
            invalidate();
        }
    }
1059080
@Restricted(NoExternalUse.class)
    public @Nonnull FormValidation doCheckNewName(@QueryParameter String newName) {
        // TODO: Create an Item.RENAME permission to use here, see JENKINS-18649.
        if (!hasPermission(Item.CONFIGURE)) {
            if (parent instanceof AccessControlled) {
                ((AccessControlled)parent).checkPermission(Item.CREATE);
            }
            checkPermission(Item.DELETE);
        }

        newName = newName == null ? null : newName.trim();
        try {
            Jenkins.checkGoodName(newName);
            assert newName != null; // Would have thrown Failure
            if (newName.equals(name)) {
                return FormValidation.warning(Messages.AbstractItem_NewNameUnchanged());
            }
            Jenkins.get().getProjectNamingStrategy().checkName(newName);
            checkIfNameIsUsed(newName);
            checkRename(newName);
        } catch (Failure e) {
            return FormValidation.error(e.getMessage());
        }
        return FormValidation.ok();
    }
120561
public T queryString(String name, String value) {
        List<String> l = queryString.get(name);
        if (l == null) {
            l = new ArrayList<String>();
        }
        l.add(value);
        queryString.put(name, l);
        return derived.cast(this);
    }
945592
protected void bindViewHelper(BaseViewHolder viewHolder) {
        Context ctx = viewHolder.itemView.getContext();

        //set the identifier from the drawerItem here. It can be used to run tests
        viewHolder.itemView.setId(hashCode());

        //set the item selected if it is
        viewHolder.itemView.setSelected(isSelected());

        //set the item enabled if it is
        viewHolder.itemView.setEnabled(isEnabled());

        //get the correct color for the background
        int selectedColor = getSelectedColor(ctx);
        //get the correct color for the text
        int color = getColor(ctx);
        ColorStateList selectedTextColor = getTextColorStateList(color, getSelectedTextColor(ctx));
        //get the correct color for the icon
        int iconColor = getIconColor(ctx);
        int selectedIconColor = getSelectedIconColor(ctx);

        //set the background for the item
        themeDrawerItem(ctx, viewHolder.view, selectedColor, isSelectedBackgroundAnimated());
        //set the text for the name
        StringHolder.applyTo(this.getName(), viewHolder.name);
        //set the text for the description or hide
        StringHolder.applyToOrHide(this.getDescription(), viewHolder.description);

        //set the colors for textViews
        viewHolder.name.setTextColor(selectedTextColor);
        //set the description text color
        ColorHolder.applyToOr(getDescriptionTextColor(), viewHolder.description, selectedTextColor);

        //define the typeface for our textViews
        if (getTypeface() != null) {
            viewHolder.name.setTypeface(getTypeface());
            viewHolder.description.setTypeface(getTypeface());
        }

        //get the drawables for our icon and set it
        Drawable icon = ImageHolder.decideIcon(getIcon(), ctx, iconColor, isIconTinted(), 1);
        if (icon != null) {
            Drawable selectedIcon = ImageHolder.decideIcon(getSelectedIcon(), ctx, selectedIconColor, isIconTinted(), 1);
            ImageHolder.applyMultiIconTo(icon, iconColor, selectedIcon, selectedIconColor, isIconTinted(), viewHolder.icon);
        } else {
            ImageHolder.applyDecidedIconOrSetGone(getIcon(), viewHolder.icon, iconColor, isIconTinted(), 1);
        }

        //for android API 17 --> Padding not applied via xml
        DrawerUIUtils.setDrawerVerticalPadding(viewHolder.view, level);
    }
157263
@Override
    protected String resolvePlaceholder(String placeholder, Properties props) {
        String resolvedPlaceholder = super.resolvePlaceholder(placeholder, props);
        if (null == resolvedPlaceholder) {
			LOGGER.trace("could not resolve place holder for key: " + placeholder + ". Please check your configuration files.");
			return resolvedPlaceholder;
		} else {
			return resolvedPlaceholder.trim();
		}
		
    }