Add the buildInfo to step variables if missing and set its cps script.

@param cpsScript     the cps script
@param stepVariables step variables map
@return the build info
334900
public static BuildInfo appendBuildInfo(CpsScript cpsScript, Map<String, Object> stepVariables) {
        BuildInfo buildInfo = (BuildInfo) stepVariables.get(BUILD_INFO);
        if (buildInfo == null) {
            buildInfo = (BuildInfo) cpsScript.invokeMethod("newBuildInfo", Maps.newLinkedHashMap());
            stepVariables.put(BUILD_INFO, buildInfo);
        }
        buildInfo.setCpsScript(cpsScript);
        return buildInfo;
    }
971757
private IQTree projectAwayUnnecessaryVariables(IQTree child, IQProperties currentIQProperties) {
        if (child.getRootNode() instanceof ConstructionNode) {
            ConstructionNode constructionNode = (ConstructionNode) child.getRootNode();

            AscendingSubstitutionNormalization normalization = normalizeAscendingSubstitution(
                    constructionNode.getSubstitution(), projectedVariables);
            Optional<ConstructionNode> proposedConstructionNode = normalization.generateTopConstructionNode();

            if (proposedConstructionNode
                    .filter(c -> c.isSyntacticallyEquivalentTo(constructionNode))
                    .isPresent())
                return child;

            IQTree grandChild = normalization.normalizeChild(((UnaryIQTree) child).getChild());

            return proposedConstructionNode
                    .map(c -> (IQTree) iqFactory.createUnaryIQTree(c, grandChild, currentIQProperties.declareLifted()))
                    .orElse(grandChild);
        }
        else
            return child;
    }
299788
public void setStep(java.lang.Object _step) {
		getStateHelper().put(PropertyKeys.step, _step);
	}
509387
protected void registerBuildingAttributes() {
        // Default LmlActorBuilder:
        addBuildingAttributeProcessor(new SkinLmlAttribute(), "skin");
        addBuildingAttributeProcessor(new StyleLmlAttribute(), "style", "class");
        addBuildingAttributeProcessor(new OnResultInitialLmlAttribute(), "result", "onResult");
        addBuildingAttributeProcessor(new ToButtonTableLmlAttribute(), "toButtonTable");
        addBuildingAttributeProcessor(new ToDialogTableLmlAttribute(), "toDialogTable");
        addBuildingAttributeProcessor(new ToTitleTableLmlAttribute(), "toTitleTable");
        // Text:
        addBuildingAttributeProcessor(new TextLmlAttribute(), "text", "value");
        // Aligned:
        addBuildingAttributeProcessor(new HorizontalLmlAttribute(), "horizontal");
        addBuildingAttributeProcessor(new VerticalLmlAttribute(), "vertical");
        // FloatRange:
        addBuildingAttributeProcessor(new RangeInitialValueLmlAttribute(), "value");
        addBuildingAttributeProcessor(new RangeMaxValueLmlAttribute(), "max");
        addBuildingAttributeProcessor(new RangeMinValueLmlAttribute(), "min");
        addBuildingAttributeProcessor(new RangeStepSizeLmlAttribute(), "stepSize", "step");
        // Tooltip:
        addBuildingAttributeProcessor(new TooltipManagerLmlAttribute(), "tooltipManager");
    }
65835
@RequestMapping(value = "builds/{buildId}/links", method = RequestMethod.PUT)
    public Build createBuildLinkFromForm(@PathVariable ID buildId, @RequestBody BuildLinkForm form) {
        Build build = structureService.getBuild(buildId);
        structureService.editBuildLinks(build, form);
        return build;
    }
493435
public FunctionInputDefBuilder vars( String type, AbstractVarDef... vars)
    {
    for( AbstractVarDef var : vars)
      {
      var.setType( type);
      functionInputDef_.addVarDef( var);
      }
    return this;
    }
358487
@Override
	protected void putVariables(Map<String, String> variables) {
		variables.put(ScopeFormat.SCOPE_HOST, hostname);
		variables.put(ScopeFormat.SCOPE_TASKMANAGER_ID, taskManagerId);
	}
181036
public VarDefBuilder varDefAtPath( String[] path)
    {
    VarDefBuilder varDefBuilder = null;
    if( path != null && path.length > 0)
      {
      String varDefName = path[ path.length - 1];
      VarSetBuilder parentBuilder = varSetAtPath( Arrays.copyOfRange( path, 0, path.length - 1));
      if( parentBuilder != null)
        {
        varDefBuilder = parentBuilder.varDefAtPath( varDefName);
        }
      else
        {
        VarDef varDef = new VarDef( varDefName);
        functionInputDef_.addVarDef( varDef);
        varDefBuilder = new VarDefBuilder( varDef);
        }
      }

    return varDefBuilder;
    }
1104153
public static PropertySpec[] buildPropertySpecArray(String[][] typeProplists) {
        PropertySpec[] pSpecs = new PropertySpec[typeProplists.length];

        for (int i = 0; i < typeProplists.length; i++) {
            String type = typeProplists[i][0];
            String[] props = new String[typeProplists[i].length - 1];
            System.arraycopy(typeProplists[i], 1, props, 0, props.length);

            boolean all = (props.length == 0);
            pSpecs[i] = createPropertySpec(type, all, props);
        }
        return pSpecs;
    }
1227347
public void addStep(DeploymentOperationStep step) {
    if(currentStep != null) {
      steps.add(steps.indexOf(currentStep)+1, step);
    } else {
      steps.add(step);
    }
  }
334908
public static void setCustomPropertyVariables() {
        
        UPGRADE_READ_TIMEOUT = Integer.valueOf(customProps.getProperty("upgradereadtimeout", Integer.toString(TCPReadRequestContext.NO_TIMEOUT))).intValue();
        UPGRADE_WRITE_TIMEOUT = Integer.valueOf(customProps.getProperty("upgradewritetimeout", Integer.toString(TCPReadRequestContext.NO_TIMEOUT))).intValue();
    }
858952
public JavaScriptActionBuilder javascript(String script) {
        JavaScriptAction action = new JavaScriptAction();
        action.setScript(script);
        action(action);
        return new JavaScriptActionBuilder(action);
    }
580284
function ()
		{
			for (c in this.c)
			{
				if (this.c[c].build && this.c[c].build.extend && this.c[c].build.extend.indexOf('wnScript')!=-1)
				{
					this.prepareScript(c);
				}
			}
		}
1119237
private PBXObjectRef addNativeTargetConfigurationList(final Map objects, final String projectName) {

    //
    // Create a configuration list with
    // two stock configurations: Debug and Release
    //
    final List<PBXObjectRef> configurations = new ArrayList<>();
    final Map debugSettings = new HashMap();
    debugSettings.put("COPY_PHASE_STRIP", "NO");
    debugSettings.put("GCC_DYNAMIC_NO_PIC", "NO");
    debugSettings.put("GCC_ENABLE_FIX_AND_CONTINUE", "YES");
    debugSettings.put("GCC_MODEL_TUNING", "G5");
    debugSettings.put("GCC_OPTIMIZATION_LEVEL", "0");
    debugSettings.put("INSTALL_PATH", "$(HOME)/bin");
    debugSettings.put("PRODUCT_NAME", projectName);
    debugSettings.put("ZERO_LINK", "YES");
    final PBXObjectRef debugConfig = createXCBuildConfiguration("Debug", debugSettings);
    objects.put(debugConfig.getID(), debugConfig.getProperties());
    configurations.add(debugConfig);

    final Map<String, Object> releaseSettings = new HashMap<>();
    final List<String> archs = new ArrayList<>();
    archs.add("ppc");
    archs.add("i386");
    releaseSettings.put("ARCHS", archs);
    releaseSettings.put("GCC_GENERATE_DEBUGGING_SYMBOLS", "NO");
    releaseSettings.put("GCC_MODEL_TUNING", "G5");
    releaseSettings.put("INSTALL_PATH", "$(HOME)/bin");
    releaseSettings.put("PRODUCT_NAME", projectName);
    final PBXObjectRef releaseConfig = createXCBuildConfiguration("Release", releaseSettings);
    objects.put(releaseConfig.getID(), releaseConfig.getProperties());
    configurations.add(releaseConfig);

    final PBXObjectRef configurationList = createXCConfigurationList(configurations);
    objects.put(configurationList.getID(), configurationList.getProperties());
    return configurationList;
  }
46977
public void setStepStates(java.util.Collection<String> stepStates) {
        if (stepStates == null) {
            this.stepStates = null;
            return;
        }

        this.stepStates = new com.amazonaws.internal.SdkInternalList<String>(stepStates);
    }
1025402
private Map<String, JSType> buildTypeVariables(
      Map<TemplateType, JSType> inferredTypes) {
    Map<String, JSType> typeVars = new LinkedHashMap<>();
    for (Entry<TemplateType, JSType> e : inferredTypes.entrySet()) {
      // Only add the template type that do not have a type transformation
      if (!e.getKey().isTypeTransformation()) {
        typeVars.put(e.getKey().getReferenceName(), e.getValue());
      }
    }
    return typeVars;
  }
1310328
public final Set<Variable> vars() {
        if (vars == null) {
            ImmutableSet.Builder<Variable> builder = ImmutableSet.<Variable>builder().add(start());
            Variable end = end();
            if (end != null) builder.add(end);
            builder.addAll(otherVars());
            vars = builder.build();
        }

        return vars;
    }