/* DIAMOND BEGIN
421928
public MaterialRevisions getRevisionsBasedOnDependencies(MaterialRevisions actualRevisions, CruiseConfig cruiseConfig, CaseInsensitiveString pipelineName) {
        FanInGraph fanInGraph = new FanInGraph(cruiseConfig, pipelineName, materialRepository, pipelineDao, systemEnvironment, materialConfigConverter);
        final MaterialRevisions computedRevisions = fanInGraph.computeRevisions(actualRevisions, pipelineTimeline);
        fillUpNonOverridableRevisions(actualRevisions, computedRevisions);
        return restoreOriginalMaterialConfigAndMaterialOrderUsingFingerprint(actualRevisions, computedRevisions);
    }
47728
function intro() {
  // @TODO: How best to pull in .scss color data export to reference branch colors below?
  const b = chalk.hex('#545DA6'); // indigo, light
  const y = chalk.hex('#ffcc4d'); // yellow, base

  const CLI_TITLE = chalk.bold.underline('Bolt-CLI');
  const CLI_DESCRIPTION = 'Welcome to the Bolt CLI ⚡️  Have fun!';
  const CLI_USAGE = 'Usage: `bolt <command> [options ...]`';
  const HELP_USAGE = 'Help: `bolt -h` or `bolt <command> --help`';

  // const HELP_HEADER_BACKUP = `
  //     /˜˜˜˜˜˜˜˜˜˜˜˜\
  //    / /˜˜˜˜/|˜˜˜˜\ \
  //   / /    / |     \ \
  //  / /    /  |____  \ \
  // / /    /       /   \ \
  // \ \   /____   /    / /
  //  \ \      |  /    / /
  //   \ \     | /    / /
  //    \ \____|/____/ /
  //     \____________/
  // `

  // ^ Colorized + partially filled in version of logo above
  const HELP_HEADER = `
    ${b('///////|\\\\\\\\\\\\')}
   ${b('///˜˜˜˜')}${y('/|')}${b('˜˜˜˜\\\\\\')}
  ${b('///    ')}${y('//|')}${b('     \\\\\\')}     ${CLI_TITLE}
 ${b('///    ')}${y('///|____')}${b('  \\\\\\')}
${b('///    ')}${y('/////////')}${b('   \\\\\\')}   ${CLI_DESCRIPTION}
${b('\\\\\\   ')}${y('/////////')}${b('    ///')}
 ${b('\\\\\\      ')}${y('|///')}${b('    ///')}    ${CLI_USAGE}
  ${b('\\\\\\     ')}${y('|//')}${b('    ///')}     ${HELP_USAGE}
   ${b('\\\\\\____')}${y('|/')}${b('____///')}
    ${b('\\\\\\\\\\\\|///////')}
`;

  info(HELP_HEADER);
}
1089418
function (start, end) {
            var ret = null, l;
            l = end - start;
            if (l > 0) {
                ret = this.nodeFactory.createCDataNode(this.page, start, end);
            }
            return ret;
        }
617367
function middleInside (data, start, a, b) {
  var node = start,
    inside = false,
    px = (data[a] + data[b]) / 2,
    py = (data[a + 1] + data[b + 1]) / 2
  do {
    var p1 = node.i,
      p2 = node.next.i

    if (((data[p1 + 1] > py) !== (data[p2 + 1] > py)) &&
      (px < (data[p2] - data[p1]) * (py - data[p1 + 1]) / (data[p2 + 1] - data[p1 + 1]) + data[p1])) {
      inside = !inside
    }

    node = node.next
  } while (node !== start)

  return inside
}
485529
function (M) { //starting at bottom right, moving horizontally
    var jump = false,
      tl = n * n,
      br = 1,
      inc = 1,
      row, col, val, i, j;
    M[0][0] = tl;
    M[n - 1][n - 1] = br;

    for (i = 1; i < n; i++) {
      //generate top/bottom row
      if (jump) {
        tl -= 4 * inc;
        br += 4 * inc;
        inc++;
      } else {
        tl--;
        br++;
      }

      M[0][i] = tl;
      M[n - 1][n - 1 - i] = br;
      jump = !jump;
    }

    var dec = true;
    for (i = 1; i < n; i++) {
      //iterate diagonally from top row
      row = 0;
      col = i;
      val = M[row][col];

      for (j = 1; j < i + 1; j++) {
        if (dec) {
          val -= 1;
        } else {
          val += 1;
        }
        row++;
        col--;
        M[row][col] = val;
      }
      dec = !dec;
    }

    if (n % 2 === 0) {
      dec = true;
    } else {
      dec = false;
    }
    for (i = 1; i < n - 1; i++) {
      //iterate diagonally from bottom row
      row = n - 1;
      col = i;
      val = M[row][col];

      for (j = 1; j < n - i; j++) {
        if (dec) {
          val--;
        } else {
          val++;
        }
        row--;
        col++;
        M[row][col] = val;
      }
      dec = !dec;
    }
    return M;
  }
1021835
function(amount) {
      for (var sI = 0; sI < this.slices.length; sI++) {
        var slice = this.slices[sI];
        slice.start = (slice.start + amount);
      }
    }
1228050
function start (msg) {
    const msgLength = strip(msg).length,
          diff      = lineWidth - 4 - msgLength;
    write(msg + Array(diff + 1).join(' '));
  }
1287065
function sgStart(ctx) {
  const statementGroupParts = {
		previousStatementGroup: this._statementGroup,
		previousStatements: this._statements,
    statements: [],
    location: Location.FromANTLRNode(ctx),
    character: null,
	}

	this._statementGroup = statementGroupParts;
	this._statements = statementGroupParts.statements;
}
1096501
function AddrRange(begin, end) {
  begin = _toAddr(begin);
  end = _toAddr(end);

  if (begin.compare(end) > 0) {
    throw new Error('begin address must be <= end address');
  }

  this._begin = begin;
  this._end = end;
}
1127164
async function initiateGame(team1, team2, pitchDetails) {
  validate.validateArguments(team1, team2, pitchDetails)
  validate.validateTeam(team1)
  validate.validateTeam(team2)
  validate.validatePitch(pitchDetails)
  let matchDetails = setVariables.populateMatchDetails(team1, team2, pitchDetails)
  let kickOffTeam = setVariables.setGameVariables(matchDetails.kickOffTeam)
  let secondTeam = setVariables.setGameVariables(matchDetails.secondTeam)
  kickOffTeam = setVariables.koDecider(kickOffTeam, matchDetails)
  matchDetails.iterationLog.push(`Team to kick off - ${kickOffTeam.name}`)
  matchDetails.iterationLog.push(`Second team - ${secondTeam.name}`)
  secondTeam = setPositions.switchSide(secondTeam, matchDetails)
  matchDetails.kickOffTeam = kickOffTeam
  matchDetails.secondTeam = secondTeam
  return matchDetails
}
1086899
function emitStart(name, attrs) {
  this.emit('data', '<' + name);
  for (var attr in attrs) if (__own.call(attrs, attr)) {
    this.emit('data', ' ' + attr + '="' + escape(attrs[attr]) + '"');
  }
  this.emit('data', '>');
}
785522
public static function Begin () {
		if (static::InTransaction()) {
			throw CoreException::RaiseSystemError('既にトランザクションが開始されています。');
		}

		static::_ForceMasterConnect();

		$ret = [];
		foreach (static::$_connectionList as $connection_name => $connection) {
			foreach ($connection[static::PRIORITY_MASTER] as $number => $node) {
				$ret[$connection_name][static::PRIORITY_MASTER][$number] = $node->beginTransaction();
			}
		}
		static::$_inTransaction = true;
		return $ret;
	}
699495
function isAtStart(string, index) {
  const before = string.substring(0, index).trim();

  return before.length === 0 || before.search(/[({,]$/) !== -1;
}
1000589
function mine(js) {
		var names = [];
		var state = 0;
		var ident;
		var quote;
		var name;

		var isIdent = /[a-z0-9_.]/i;
		var isWhitespace = /[ \r\n\t]/;

		function $start(char) {
			if (char === "/") {
				return $slash;
			}
			if (char === "'" || char === '"') {
				quote = char;
				return $string;
			}
			if (isIdent.test(char)) {
				ident = char;
				return $ident;
			}
			return $start;
		}

		function $ident(char) {
			if (isIdent.test(char)) {
				ident += char;
				return $ident;
			}
			if (char === "(" && ident === "require") {
				ident = undefined;
				return $call;
			}
			return $start(char);
		}

		function $call(char) {
			if (isWhitespace.test(char)) return $call;
			if (char === "'" || char === '"') {
				quote = char;
				name = "";
				return $name;
			}
			return $start(char);
		}

		function $name(char) {
			if (char === quote) {
				return $close;
			}
			name += char;
			return $name;
		}

		function $close(char) {
			if (isWhitespace.test(char)) return $close;
			if (char === ")" || char === ',') {
				names.push(name);
			}
			name = undefined;
			return $start(char);
		}

		function $string(char) {
			if (char === "\\") {
				return $escape;
			}
			if (char === quote) {
				return $start;
			}
			return $string;
		}

		function $escape(char) {
			return $string;
		}

		function $slash(char) {
			if (char === "/") return $lineComment;
			if (char === "*") return $multilineComment;
			return $start(char);
		}

		function $lineComment(char) {
			if (char === "\r" || char === "\n") return $start;
			return $lineComment;
		}

		function $multilineComment(char) {
			if (char === "*") return $multilineEnding;
			return $multilineComment;
		}

		function $multilineEnding(char) {
			if (char === "/") return $start;
			if (char === "*") return $multilineEnding;
			return $multilineComment;
		}

		var state = $start;
		for (var i = 0, l = js.length; i < l; i++) {
			state = state(js[i]);
		}
		return names;
	}
271515
function start() {
    proc = spawn(procCommand, procArgs, procOptions);

    var onClose = function (code) {
      if (!restarting) {
        process.exit(code);
      }
      start();
      restarting = false;
    };

    proc.on('error', function () {
      debug('restarting due error');
      restarting = true;
      proc.kill('SIGINT');
    });

    proc.on('close', onClose);
  }
495258
def beginning_of_each(unit, options = {}, &block)
      iterate(unit, options.merge(:map_result => false, :beginning_of => true), &block)
    end
769616
function start( next ) {
	/* jshint validthis:true */
	cnt += 1;

	this.rid = process.pid + ':' + cnt;

	this.start = null;
	this.end = null;
	this.timer = null;

	this.req = {
		'opts': this._opts,
		'body': this._body
	};
	this.res = {
		'status': null,
		'headers': null,
		'body': null,
		'bytes': 0
	};

	next();
}