/*{"name":"ctrl.builders.data", "priority":5}
This builder adds the `step.data` property allowing you to pass data
between steps. Additionally, if `data` is passed into the options its
contents will be available to the first step.
492027
function(step, next) {
      if (step.options.data != null) {
        step.data = step.options.data;
      } else {
        step.data = {};
      }
      return next();
    }
795275
function(data, done) {
      this._data.push(this._clone(data));
      var ret = this._data.length;
      done(null, ret);
    }
1227347
public void addStep(DeploymentOperationStep step) {
    if(currentStep != null) {
      steps.add(steps.indexOf(currentStep)+1, step);
    } else {
      steps.add(step);
    }
  }
603476
function(data) {
			var item = data.items;
			var gitService = serviceRegistry.getService("orion.git.provider"); //$NON-NLS-0$
			var progress = serviceRegistry.getService("orion.page.progress"); //$NON-NLS-0$
			var addFunction = function(gitUrl, path, name) {
				item.GitUrl = gitUrl;
				exports.getDefaultSshOptions(serviceRegistry, item).then(function func(options) {
					var msg = i18nUtil.formatMessage(messages["AddSubmodule"], name, data.items.Name);
					var deferred = progress.progress(gitService.addSubmodule(name, data.items.SubmoduleLocation, path, gitUrl, explorer.defaultPath,options.gitSshUsername, options.gitSshPassword, options.knownHosts, options.gitPrivateKey,
								options.gitPassphrase), msg);
					serviceRegistry.getService("orion.page.message").createProgressMonitor(deferred, //$NON-NLS-0$
						   messages["Adding submodule: "]  + gitUrl);
					deferred.then(function(jsonData) {
						exports.handleProgressServiceResponse(jsonData, options, serviceRegistry, function() {
							dispatchModelEventOn({type: "modelChanged", action: "addSubmodule", name: name, gitUrl: gitUrl}); //$NON-NLS-1$ //$NON-NL-0$
						}, func, messages['Add git submodule']);
					}, function(jsonData) {
						exports.handleProgressServiceResponse(jsonData, options, serviceRegistry, function() {}, func, messages['Add git submodule']);
					});
				});
			};
			if (data.parameters.valueFor("url") && !data.parameters.optionsRequested) { //$NON-NLS-0$
				addFunction(data.parameters.valueFor("url")); //$NON-NLS-0$
			} else {
				var dialog = new mCloneGitRepository.CloneGitRepositoryDialog({
					serviceRegistry: serviceRegistry,
					url: data.parameters.valueFor("url"), //$NON-NLS-0$
					alwaysShowAdvanced: data.parameters.optionsRequested,
					fileClient: fileClient,
					root:item.ContentLocation,
					func: addFunction
				});
						
				dialog.show();
				if (data.domNode) {
					dialog.setOriginalFocus(data.domNode);
				}
			}
		}
493031
function addChild(data) {
                var child = new TreeNode(data, this);
                if (!this.children) {
                    this.children = [];
                }
                this.children.push(child);
                return child;
            }
564197
function navigateSteps(data, _steps, authorization, nocache, resolve, reject){
        if(data && typeof _steps[0] === 'object'){
            var keyToLook = Object.keys(_steps[0]);
            if(data.Items) {
                data.Items.some(function (item, index) {
                    if(_steps[0] && _steps[0][keyToLook] === item[keyToLook]) { // Match the dataType
                        _steps.shift();
                        if(_steps.length === 0) {
                            resolve(item.Links[0].href); // self href
                            return true; // .some()
                        }
                        else {
                            navigate(item.Links[0].href, _steps, authorization, nocache, resolve, reject);
                            return true; // .some()
                        }
                    }
                    else {
                        if(index + 1 == data.Items.length){
                            reject(new Error('You have objects available in this resource group but the filter {' + keyToLook + ": " + _steps[0][keyToLook] + '} did not return a valid result. Please note data types matter.'));
                        }
                    }
                });
            }
            else {
                reject(new Error('{' + keyToLook + ': '+ _steps[0][keyToLook] +'} could not be found in the payload. You don\'t have any objects in this resource group.'));
            }
        }
        else if(data.Links){
            var Links = data.Links;
            Links.some(function(link, index) {
                if(_steps[0] === link.rel) {
                    _steps.shift();
                    if(_steps.length === 0) {
                        resolve(link.href);
                        return true; // .some()
                    }
                    else {
                        navigate(link.href, _steps, authorization, nocache, resolve, reject);
                        return true; // .some()
                    }
                }
                else if(index + 1 == Links.length){
                    reject(new Error('The Link you specified could not be found in the payload'));
                }
            });
        }
        else {
            reject(new Error('The link you specified could not be found in the payload. Please check host, relativeEntryPoint and steps options.'));
        }
}
533820
protected void buildData(String[] data, boolean validateOnly) {

        if (data == null) {
            return;
        }

        int length = data.length;

        for (int i = 0; i < length; i++) {
            addAddressToList(data[i], validateOnly);
        }

    }
602118
function getStep(step) {
        var template = grunt.file.read(templates.stepTemplate),
            stepTemplate;

        stepTemplate = grunt.template.process(template, {
            data: {
                status: step.result ? step.result.status : '',
                errorDetails: step.result ? toHtmlEntities(step.result.error_message) : '',
                duration: step.result.duration ? calculateDuration(step.result.duration) : 'no data',
                tableOutline: (step.arguments && step.arguments.length > 0) ? step.arguments[0].rows : step.rows,
                name: step.keyword + (step.name ? step.name : '')
            }
        });
        return stepTemplate;
    }
828996
public void addStep(String name, String robot, Map<String, Object> options){
        steps.addStep(name, robot, options);
    }
611556
private void addNewBuilds(List<BambooJob> enabledJobs,
                              Map<BambooJob, Set<Build>> buildsByJob) {
        long start = System.currentTimeMillis();
        int count = 0;

        for (BambooJob job : enabledJobs) {
            if (job.isPushed()) {
                LOG.info("Job Pushed already: " + job.getJobName());
                continue;
            }
            // process new builds in the order of their build numbers - this has implication to handling of commits in BuildEventListener
            ArrayList<Build> builds = Lists.newArrayList(nullSafe(buildsByJob.get(job)));
            builds.sort((Build b1, Build b2) -> Integer.valueOf(b1.getNumber()) - Integer.valueOf(b2.getNumber()));
            for (Build buildSummary : builds) {
                if (isNewBuild(job, buildSummary)) {
                    Build build = bambooClient.getBuildDetails(buildSummary
                            .getBuildUrl(), job.getInstanceUrl());
                    if (build != null) {
                        build.setCollectorItemId(job.getId());
                        buildRepository.save(build);
                        count++;
                    }
                }
            }
        }
        log("New builds", start, count);
    }
882769
public BranchEvent addCustomDataProperty(String propertyName, String propertyValue) {
        try {
            this.customProperties.put(propertyName, propertyValue);
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return this;
    }
299488
public void goToStep(int step) {
        for (int i = 0; i < getWidgetCount(); i++) {
            Widget w = getWidget(i);
            if (w instanceof MaterialStep) {
                ((MaterialStep) w).setActive(false);
            }
        }

        Widget w = getWidget(step - 1);
        if (w instanceof MaterialStep) {
            ((MaterialStep) w).setActive(true);
        }
        setCurrentStepIndex(step - 1);
    }
105202
function pushData(entry, data, token) {
  if (entry.con === 2) {
    throw injectError(new Error('Finished pair cannot have more values'),
      token);
  }
  if (token) {
    data.line = token.line;
    data.column = token.column;
  }
  let wrappedData = wrapData(entry, data, token);
  if (entry.comment) {
    entry.comment = false;
    return;
  }
  if (entry.con === 1) {
    if (entry.tail == null) {
      // Welp, if tail is missing, head is missing too (of course)
      // I don't think this will ever be called..
      entry.head = entry.tail = new PairValue(null, wrappedData);
    } else {
      // If not, just attach the value.
      entry.tail.cdr = wrappedData;
    }
    entry.con = 2;
  } else {
    let pair = new PairValue(wrappedData, null);
    if (entry.tail == null) {
      // Welp, if tail is missing, head is missing too (of course)
      entry.head = entry.tail = pair;
    } else {
      // If not, just attach the value.
      entry.tail.cdr = pair;
      entry.tail = pair;
    }
  }
  if (token) {
    entry.head.line = token.line;
    entry.head.column = token.column;
  }
}
1062727
function data(app, file, key) {
  var o = has(app.options, key);
  var c = has(app.cache.data, key);
  var d = has(file.data, key);
  if (!c && !d && !o) {
    set(file.data, key, comment(key, 'property'));
    console.log(warning(' missing variable:'));
  }
}
341022
public void prevStep() {
        if (currentStepIndex > 0) {
            Widget w = getWidget(currentStepIndex);
            if (w instanceof MaterialStep) {
                MaterialStep step = (MaterialStep) w;
                step.setActive(false);

                // prev step
                int prevStepIndex = getWidgetIndex(step) - 1;
                if (prevStepIndex >= 0) {
                    for (int i = prevStepIndex; i >= 0; i--) {
                        w = getWidget(i);
                        if (!(w instanceof MaterialStep)) {
                            continue;
                        }
                        MaterialStep prevStep = (MaterialStep) w;
                        if (prevStep.isEnabled() && prevStep.isVisible()) {
                            prevStep.setActive(true);
                            setCurrentStepIndex(i);
                            PreviousEvent.fire(MaterialStepper.this);
                            break;
                        }
                    }
                }
            }
        } else {
            GWT.log("You have reached the minimum step.");
        }
    }
1246418
public MetadataBuilder addDataSource(@NotNull InputStream dataSource, String path, boolean closeAfterBuild) {
    checkHashingResultIsNotSet();
    filesPaths.add(path);
    dataSources.add(new StreamBasedHolderImpl(dataSource, closeAfterBuild));
    return this;
  }
487590
function step() {
          const f = files.pop();
          if (f) {
            console.error('Ractive: compiling component ' + path.join(opts.directory, f));
            util
              .readToString(fs.createReadStream(path.join(opts.directory, f)))
              .then(string => {
                return component
                  .build(string, opts, mkReadFile(path.join(opts.directory, f)))
                  .then(string => {
                    const file = path.join(
                      opts.output,
                      f.replace(ext, opts.outputExtension || '.js')
                    );
                    util.mkdirp(path.dirname(file));
                    util.writeToStream(fs.createWriteStream(file), string);
                  });
              })
              .then(step, err => {
                console.error(err && typeof err === 'object' ? err.stack : err);
                process.exit(1);
              });
          }
        }