idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
683,817
public void updateList(List<AztecCode> detected, List<AztecCode> failures) {<NEW_LINE>BoofSwingUtil.checkGuiThread();<NEW_LINE>this.listDetected.removeListSelectionListener(this);<NEW_LINE>DefaultListModel<String> model = (DefaultListModel) listDetected.getModel();<NEW_LINE>model.clear();<NEW_LINE>this.detected.clear();<NEW_LINE>for (int i = 0; i < detected.size(); i++) {<NEW_LINE>AztecCode marker = detected.get(i);<NEW_LINE>String shortName = marker.structure.toString(<MASK><NEW_LINE>model.addElement(String.format("%4s L=%02d %.10s", shortName, marker.dataLayers, marker.message));<NEW_LINE>this.detected.add(marker.copy());<NEW_LINE>}<NEW_LINE>this.failures.clear();<NEW_LINE>for (int i = 0; i < failures.size(); i++) {<NEW_LINE>AztecCode marker = failures.get(i);<NEW_LINE>String shortName = marker.structure.toString().substring(0, 4);<NEW_LINE>model.addElement(String.format("%4s L=%02d %s", shortName, marker.dataLayers, marker.failure));<NEW_LINE>this.failures.add(marker.copy());<NEW_LINE>}<NEW_LINE>listDetected.invalidate();<NEW_LINE>listDetected.repaint();<NEW_LINE>textArea.setText("");<NEW_LINE>this.listDetected.addListSelectionListener(this);<NEW_LINE>}
).substring(0, 4);
901,359
/*<NEW_LINE>private static final Set warnedAboutDupeKids = new HashSet(1); // Set<String><NEW_LINE>*/<NEW_LINE>public String[] children(String f) {<NEW_LINE>TreeElement el = findElement(f);<NEW_LINE>if (el == null) {<NEW_LINE>// System.err.println("children <" + f + ">: none, no such element");<NEW_LINE>return new String[] {};<NEW_LINE>}<NEW_LINE>ArrayList<String> kids <MASK><NEW_LINE>Set<String> allNames = new HashSet<String>();<NEW_LINE>Iterator<TreeElement> it = el.getChildNodes(TreeElement.class).iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>TreeElement sub = it.next();<NEW_LINE>if (// NOI18N<NEW_LINE>sub.getLocalName().equals("file") || sub.getLocalName().equals("folder")) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>TreeAttribute childName = sub.getAttribute("name");<NEW_LINE>if (childName == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>String name = childName.getValue();<NEW_LINE>if (allNames.add(name)) {<NEW_LINE>kids.add(name);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// System.err.println("children <" + f + ">: " + kids);<NEW_LINE>return kids.toArray(new String[kids.size()]);<NEW_LINE>}
= new ArrayList<String>();
1,680,828
public boolean blockLocation(Location location) {<NEW_LINE>final float inaccuracy = location.getAccuracy();<NEW_LINE>final double altitude = location.getAltitude();<NEW_LINE>final float bearing = location.getBearing();<NEW_LINE>final double latitude = location.getLatitude();<NEW_LINE>final double longitude = location.getLongitude();<NEW_LINE>final float speed = location.getSpeed();<NEW_LINE>final long timestamp = location.getTime();<NEW_LINE>final long tomorrow <MASK><NEW_LINE>boolean block = false;<NEW_LINE>if (latitude == 0 && longitude == 0) {<NEW_LINE>block = true;<NEW_LINE>Log.w(LOG_TAG, "Bogus latitude,longitude: 0,0");<NEW_LINE>} else {<NEW_LINE>if (latitude < -90 || latitude > 90) {<NEW_LINE>block = true;<NEW_LINE>Log.w(LOG_TAG, "Bogus latitude: " + latitude);<NEW_LINE>}<NEW_LINE>if (longitude < -180 || longitude > 180) {<NEW_LINE>block = true;<NEW_LINE>Log.w(LOG_TAG, "Bogus longitude: " + longitude);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (location.hasAccuracy() && (inaccuracy < 0 || inaccuracy > MIN_ACCURACY)) {<NEW_LINE>block = true;<NEW_LINE>Log.w(LOG_TAG, "Insufficient accuracy: " + inaccuracy + " meters");<NEW_LINE>}<NEW_LINE>if (location.hasAltitude() && (altitude < MIN_ALTITUDE || altitude > MAX_ALTITUDE)) {<NEW_LINE>block = true;<NEW_LINE>Log.w(LOG_TAG, "Bogus altitude: " + altitude + " meters");<NEW_LINE>}<NEW_LINE>if (location.hasBearing() && (bearing < 0 || bearing > 360)) {<NEW_LINE>block = true;<NEW_LINE>Log.w(LOG_TAG, "Bogus bearing: " + bearing + " degrees");<NEW_LINE>}<NEW_LINE>if (location.hasSpeed() && (speed < 0 || speed > MAX_SPEED)) {<NEW_LINE>block = true;<NEW_LINE>Log.w(LOG_TAG, "Bogus speed: " + speed + " meters/second");<NEW_LINE>}<NEW_LINE>if (timestamp < MIN_TIMESTAMP || timestamp > tomorrow) {<NEW_LINE>block = true;<NEW_LINE>Log.w(LOG_TAG, "Bogus timestamp: " + timestamp);<NEW_LINE>}<NEW_LINE>return block;<NEW_LINE>}
= System.currentTimeMillis() + MILLISECONDS_PER_DAY;
447,604
public GetKeyGroupConfigResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>GetKeyGroupConfigResult getKeyGroupConfigResult = new GetKeyGroupConfigResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument()) {<NEW_LINE>context.setCurrentHeader("ETag");<NEW_LINE>getKeyGroupConfigResult.setETag(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE><MASK><NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return getKeyGroupConfigResult;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("KeyGroupConfig", targetDepth)) {<NEW_LINE>getKeyGroupConfigResult.setKeyGroupConfig(KeyGroupConfigStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return getKeyGroupConfigResult;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
XMLEvent xmlEvent = context.nextEvent();
1,727,805
private static <T> boolean containsRow(TableView<T> tableView, Object... cells) {<NEW_LINE>if (tableView.getItems().isEmpty()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Map<Integer, List<ObservableValue<?>>> rowValuesMap = new HashMap<>(tableView.<MASK><NEW_LINE>for (int j = 0; j < tableView.getItems().size(); j++) {<NEW_LINE>List<ObservableValue<?>> rowValues = getRowValues(tableView, j);<NEW_LINE>rowValuesMap.put(j, rowValues);<NEW_LINE>}<NEW_LINE>for (List<ObservableValue<?>> rowValues : rowValuesMap.values()) {<NEW_LINE>for (int i = 0; i < cells.length; i++) {<NEW_LINE>if (rowValues.get(i).getValue() == null && cells[i] != null) {<NEW_LINE>break;<NEW_LINE>} else if (cells[i] == null && rowValues.get(i).getValue() != null) {<NEW_LINE>break;<NEW_LINE>} else if (rowValues.get(i).getValue() != null && !rowValues.get(i).getValue().equals(cells[i])) {<NEW_LINE>break;<NEW_LINE>} else {<NEW_LINE>if (i == cells.length - 1) {<NEW_LINE>if (rowValues.get(i).getValue() == null && cells[i] != null) {<NEW_LINE>break;<NEW_LINE>} else if (cells[i] == null && rowValues.get(i).getValue() != null) {<NEW_LINE>break;<NEW_LINE>} else {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
getColumns().size());
1,092,998
Node processObjectLiteral(ObjectLiteralExpressionTree objTree) {<NEW_LINE>Node node = newNode(Token.OBJECTLIT);<NEW_LINE>node.setTrailingComma(objTree.hasTrailingComma);<NEW_LINE>boolean maybeWarn = false;<NEW_LINE>for (ParseTree el : objTree.propertyNameAndValues) {<NEW_LINE>if (el.type == ParseTreeType.DEFAULT_PARAMETER) {<NEW_LINE>// (e.g. var o = { x=4 };) This is only parsed for compatibility with object patterns.<NEW_LINE>errorReporter.error("Default value cannot appear at top level of an object literal.", sourceName<MASK><NEW_LINE>continue;<NEW_LINE>} else if (el.type == ParseTreeType.GET_ACCESSOR && maybeReportGetter(el)) {<NEW_LINE>continue;<NEW_LINE>} else if (el.type == ParseTreeType.SET_ACCESSOR && maybeReportSetter(el)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Node key = transform(el);<NEW_LINE>if (!key.isComputedProp() && !key.isQuotedString() && !key.isSpread() && !currentFileIsExterns) {<NEW_LINE>maybeWarnKeywordProperty(key);<NEW_LINE>}<NEW_LINE>if (key.isShorthandProperty()) {<NEW_LINE>maybeWarn = true;<NEW_LINE>}<NEW_LINE>node.addChildToBack(key);<NEW_LINE>}<NEW_LINE>if (maybeWarn) {<NEW_LINE>maybeWarnForFeature(objTree, Feature.EXTENDED_OBJECT_LITERALS);<NEW_LINE>}<NEW_LINE>return node;<NEW_LINE>}
, lineno(el), 0);
797,642
public void onGameObjectSpawned(GameObjectSpawned event) {<NEW_LINE>GameObject gameObject = event.getGameObject();<NEW_LINE>TitheFarmPlantType type = TitheFarmPlantType.getPlantType(gameObject.getId());<NEW_LINE>if (type == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TitheFarmPlantState state = TitheFarmPlantState.getState(gameObject.getId());<NEW_LINE>TitheFarmPlant newPlant = new TitheFarmPlant(state, type, gameObject);<NEW_LINE>TitheFarmPlant oldPlant = getPlantFromCollection(gameObject);<NEW_LINE>if (oldPlant == null && newPlant.getType() != TitheFarmPlantType.EMPTY) {<NEW_LINE>log.debug("Added plant {}", newPlant);<NEW_LINE>plants.add(newPlant);<NEW_LINE>} else if (oldPlant == null) {<NEW_LINE>return;<NEW_LINE>} else if (newPlant.getType() == TitheFarmPlantType.EMPTY) {<NEW_LINE>log.debug("Removed plant {}", oldPlant);<NEW_LINE>plants.remove(oldPlant);<NEW_LINE>} else if (oldPlant.getGameObject().getId() != newPlant.getGameObject().getId()) {<NEW_LINE>if (oldPlant.getState() != TitheFarmPlantState.WATERED && newPlant.getState() == TitheFarmPlantState.WATERED) {<NEW_LINE>log.debug("Updated plant (watered)");<NEW_LINE>newPlant.<MASK><NEW_LINE>plants.remove(oldPlant);<NEW_LINE>plants.add(newPlant);<NEW_LINE>} else {<NEW_LINE>log.debug("Updated plant");<NEW_LINE>plants.remove(oldPlant);<NEW_LINE>plants.add(newPlant);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setPlanted(oldPlant.getPlanted());
1,855,539
private // The derivatives are [0] spot, [1] strike, [2] rate, [3] cost-of-carry, [4] volatility, [5] timeToExpiry, [6] spot twice<NEW_LINE>ValueDerivatives priceDerivatives(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities) {<NEW_LINE>validate(option, ratesProvider, volatilities);<NEW_LINE>SimpleConstantContinuousBarrier barrier = (SimpleConstantContinuousBarrier) option.getBarrier();<NEW_LINE>ResolvedFxVanillaOption underlyingOption = option.getUnderlyingOption();<NEW_LINE>double[] derivatives = new double[7];<NEW_LINE>if (volatilities.relativeTime(underlyingOption.getExpiry()) < 0d) {<NEW_LINE>return ValueDerivatives.of(0d, DoubleArray.ofUnsafe(derivatives));<NEW_LINE>}<NEW_LINE>ResolvedFxSingle underlyingFx = underlyingOption.getUnderlying();<NEW_LINE>CurrencyPair currencyPair = underlyingFx.getCurrencyPair();<NEW_LINE>Currency ccyBase = currencyPair.getBase();<NEW_LINE>Currency ccyCounter = currencyPair.getCounter();<NEW_LINE>DiscountFactors baseDiscountFactors = ratesProvider.discountFactors(ccyBase);<NEW_LINE>DiscountFactors counterDiscountFactors = ratesProvider.discountFactors(ccyCounter);<NEW_LINE>double rateBase = baseDiscountFactors.zeroRate(underlyingFx.getPaymentDate());<NEW_LINE>double rateCounter = counterDiscountFactors.zeroRate(underlyingFx.getPaymentDate());<NEW_LINE>double costOfCarry = rateCounter - rateBase;<NEW_LINE>double dfBase = baseDiscountFactors.discountFactor(underlyingFx.getPaymentDate());<NEW_LINE>double dfCounter = counterDiscountFactors.discountFactor(underlyingFx.getPaymentDate());<NEW_LINE>double todayFx = ratesProvider.fxRate(currencyPair);<NEW_LINE>double strike = underlyingOption.getStrike();<NEW_LINE>double forward = todayFx * dfBase / dfCounter;<NEW_LINE>double volatility = volatilities.volatility(currencyPair, underlyingOption.getExpiry(), strike, forward);<NEW_LINE>double timeToExpiry = volatilities.<MASK><NEW_LINE>ValueDerivatives valueDerivatives = BARRIER_PRICER.priceAdjoint(todayFx, strike, timeToExpiry, costOfCarry, rateCounter, volatility, underlyingOption.getPutCall().isCall(), barrier);<NEW_LINE>if (!option.getRebate().isPresent()) {<NEW_LINE>return valueDerivatives;<NEW_LINE>}<NEW_LINE>CurrencyAmount rebate = option.getRebate().get();<NEW_LINE>ValueDerivatives valueDerivativesRebate = rebate.getCurrency().equals(ccyCounter) ? CASH_REBATE_PRICER.priceAdjoint(todayFx, timeToExpiry, costOfCarry, rateCounter, volatility, barrier.inverseKnockType()) : ASSET_REBATE_PRICER.priceAdjoint(todayFx, timeToExpiry, costOfCarry, rateCounter, volatility, barrier.inverseKnockType());<NEW_LINE>double rebateRate = rebate.getAmount() / Math.abs(underlyingFx.getBaseCurrencyPayment().getAmount());<NEW_LINE>double price = valueDerivatives.getValue() + rebateRate * valueDerivativesRebate.getValue();<NEW_LINE>derivatives[0] = valueDerivatives.getDerivative(0) + rebateRate * valueDerivativesRebate.getDerivative(0);<NEW_LINE>derivatives[1] = valueDerivatives.getDerivative(1);<NEW_LINE>for (int i = 2; i < 7; ++i) {<NEW_LINE>derivatives[i] = valueDerivatives.getDerivative(i) + rebateRate * valueDerivativesRebate.getDerivative(i - 1);<NEW_LINE>}<NEW_LINE>return ValueDerivatives.of(price, DoubleArray.ofUnsafe(derivatives));<NEW_LINE>}
relativeTime(underlyingOption.getExpiry());
1,299,500
public Document makeDocument(InputDoc input) throws Exception {<NEW_LINE>List<List<Mention>> mentions = new ArrayList<>();<NEW_LINE>if (CorefProperties.useGoldMentions(props)) {<NEW_LINE>List<CoreMap> sentences = input.annotation.get(CoreAnnotations.SentencesAnnotation.class);<NEW_LINE>for (int i = 0; i < sentences.size(); i++) {<NEW_LINE>CoreMap sentence = sentences.get(i);<NEW_LINE>List<CoreLabel> sentenceWords = sentence.get(CoreAnnotations.TokensAnnotation.class);<NEW_LINE>List<Mention> sentenceMentions = new ArrayList<>();<NEW_LINE>mentions.add(sentenceMentions);<NEW_LINE>for (Mention g : input.goldMentions.get(i)) {<NEW_LINE>sentenceMentions.add(new Mention(-1, g.startIndex, g.endIndex, sentenceWords, null, null, new ArrayList<>(sentenceWords.subList(g.startIndex, g.endIndex))));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (CoreMap sentence : input.annotation.get(CoreAnnotations.SentencesAnnotation.class)) {<NEW_LINE>mentions.add(sentence.get(CorefCoreAnnotations.CorefMentionsAnnotation.class));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Document doc = new Document(input, mentions);<NEW_LINE>if (input.goldMentions != null) {<NEW_LINE>findGoldMentionHeads(doc);<NEW_LINE>}<NEW_LINE>DocumentPreprocessor.preprocess(doc, dict, null, headFinder);<NEW_LINE>return doc;<NEW_LINE>}
md.findHead(sentence, sentenceMentions);
426,002
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller != null) {<NEW_LINE>// Target opponent loses 2 life for each Swamp you control<NEW_LINE>Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));<NEW_LINE>if (opponent != null) {<NEW_LINE>int swamps = game.getBattlefield().count(filterSwamp, source.getControllerId(), source, game);<NEW_LINE>opponent.loseLife(swamps * <MASK><NEW_LINE>}<NEW_LINE>// Last Stand deals damage equal to the number of Mountains you control to target creature.<NEW_LINE>Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());<NEW_LINE>if (creature != null) {<NEW_LINE>int mountains = game.getBattlefield().count(filterMountain, source.getControllerId(), source, game);<NEW_LINE>if (mountains > 0) {<NEW_LINE>creature.damage(mountains, source.getSourceId(), source, game, false, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Create a 1/1 green Saproling creature token for each Forest you control.<NEW_LINE>int forests = game.getBattlefield().count(filterForest, source.getControllerId(), source, game);<NEW_LINE>if (forests > 0) {<NEW_LINE>new CreateTokenEffect(new SaprolingToken(), forests).apply(game, source);<NEW_LINE>}<NEW_LINE>// You gain 2 life for each Plains you control.<NEW_LINE>int plains = game.getBattlefield().count(filterPlains, source.getControllerId(), source, game);<NEW_LINE>controller.gainLife(plains * 2, game, source);<NEW_LINE>// Draw a card for each Island you control, then discard that many cards<NEW_LINE>int islands = game.getBattlefield().count(filterIsland, source.getControllerId(), source, game);<NEW_LINE>if (islands > 0) {<NEW_LINE>controller.drawCards(islands, source, game);<NEW_LINE>controller.discard(islands, false, false, source, game);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
2, game, source, false);
384,254
private String checkDefaultBinding(String action, SoapMessage message, RequestData data) throws WSSecurityException {<NEW_LINE>action = addToAction(action, "Signature", true);<NEW_LINE>action = addToAction(action, "Encrypt", true);<NEW_LINE>Object s = SecurityUtils.getSecurityPropertyValue(SecurityConstants.SIGNATURE_CRYPTO, message);<NEW_LINE>if (s == null) {<NEW_LINE>s = SecurityUtils.<MASK><NEW_LINE>}<NEW_LINE>Object e = SecurityUtils.getSecurityPropertyValue(SecurityConstants.ENCRYPT_CRYPTO, message);<NEW_LINE>if (e == null) {<NEW_LINE>e = SecurityUtils.getSecurityPropertyValue(SecurityConstants.ENCRYPT_PROPERTIES, message);<NEW_LINE>}<NEW_LINE>Crypto encrCrypto = getEncryptionCrypto(e, message, data);<NEW_LINE>Crypto signCrypto = null;<NEW_LINE>if (e != null && e.equals(s)) {<NEW_LINE>signCrypto = encrCrypto;<NEW_LINE>} else {<NEW_LINE>signCrypto = getSignatureCrypto(s, message, data);<NEW_LINE>}<NEW_LINE>final String signCryptoRefId = signCrypto != null ? "RefId-" + signCrypto.hashCode() : null;<NEW_LINE>if (signCrypto != null) {<NEW_LINE>message.put(ConfigurationConstants.DEC_PROP_REF_ID, signCryptoRefId);<NEW_LINE>message.put(signCryptoRefId, signCrypto);<NEW_LINE>}<NEW_LINE>if (encrCrypto != null) {<NEW_LINE>final String encCryptoRefId = "RefId-" + encrCrypto.hashCode();<NEW_LINE>message.put(ConfigurationConstants.SIG_VER_PROP_REF_ID, encCryptoRefId);<NEW_LINE>message.put(encCryptoRefId, encrCrypto);<NEW_LINE>} else if (signCrypto != null) {<NEW_LINE>message.put(ConfigurationConstants.SIG_VER_PROP_REF_ID, signCryptoRefId);<NEW_LINE>message.put(signCryptoRefId, signCrypto);<NEW_LINE>}<NEW_LINE>return action;<NEW_LINE>}
getSecurityPropertyValue(SecurityConstants.SIGNATURE_PROPERTIES, message);
1,172,266
public <I> void hear(TypeLiteral<I> type, TypeEncounter<I> encounter) {<NEW_LINE>for (final Method method : type.getRawType().getMethods()) {<NEW_LINE>final Gauge annotation = method.getAnnotation(Gauge.class);<NEW_LINE>if (annotation != null) {<NEW_LINE>boolean validMethod = true;<NEW_LINE>if (method.getParameterTypes().length != 0) {<NEW_LINE>validMethod = false;<NEW_LINE>encounter.addError("Method %s is annotated with @Gauge but requires parameters.", method);<NEW_LINE>}<NEW_LINE>if (method.getReturnType().equals(Void.TYPE)) {<NEW_LINE>validMethod = false;<NEW_LINE>encounter.addError("Method %s is annotated with @Gauge but has a void return type.", method);<NEW_LINE>}<NEW_LINE>if (validMethod) {<NEW_LINE>final String gaugeTag = buildGaugeTag(method.getAnnotation(Gauge.class), method);<NEW_LINE>encounter.register(new GaugeInjectionListener<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
<>(gaugeTag, method));
1,784,814
protected IThanos create() {<NEW_LINE>if (localService != null) {<NEW_LINE>return localService;<NEW_LINE>}<NEW_LINE>IThanos thanos = IThanos.Stub.asInterface(ServiceManager.getService(T.serviceInstallName()));<NEW_LINE>if (thanos != null) {<NEW_LINE>return thanos;<NEW_LINE>}<NEW_LINE>Parcel data = Parcel.obtain();<NEW_LINE>Parcel reply = Parcel.obtain();<NEW_LINE>try {<NEW_LINE>IBinder backup = ServiceManager.getService(PROXIED_ANDROID_SERVICE_NAME);<NEW_LINE>if (backup == null) {<NEW_LINE>XLog.w("Get Thanos from IPC_TRANS_CODE_THANOS_SERVER, service is null.");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>data.writeInterfaceToken(IThanos.class.getName());<NEW_LINE>backup.transact(ThanosManager.IPC_TRANS_CODE_THANOS_SERVER, data, reply, 0);<NEW_LINE><MASK><NEW_LINE>XLog.d("Get Thanos from IPC_TRANS_CODE_THANOS_SERVER: %s", binder);<NEW_LINE>return IThanos.Stub.asInterface(binder);<NEW_LINE>} catch (RemoteException e) {<NEW_LINE>XLog.e("Get Thanos from IPC_TRANS_CODE_THANOS_SERVER err", e);<NEW_LINE>} finally {<NEW_LINE>data.recycle();<NEW_LINE>reply.recycle();<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
IBinder binder = reply.readStrongBinder();
1,443,463
public Void visitLabeledStatement(LabeledStatementTree labelledStatement, Trees trees) {<NEW_LINE>Tree parent = getParent(MethodTree.class);<NEW_LINE>if (parent == null) {<NEW_LINE>parent = getParent(BlockTree.class);<NEW_LINE>while (parent != null && getParent(BlockTree.class, parent) != null) {<NEW_LINE>parent = getParent(BlockTree.class, parent);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean[] used = { false };<NEW_LINE>new TreeScanner<Void, Trees>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void visitBreak(BreakTree b, Trees trees) {<NEW_LINE>if (b.getLabel() != null && labelledStatement.getLabel().equals(b.getLabel())) {<NEW_LINE>used[0] = true;<NEW_LINE>}<NEW_LINE>return returnNothing();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void visitContinue(ContinueTree c, Trees trees) {<NEW_LINE>if (c.getLabel() != null && labelledStatement.getLabel().equals(c.getLabel())) {<NEW_LINE>used[0] = true;<NEW_LINE>}<NEW_LINE>return returnNothing();<NEW_LINE>}<NEW_LINE>}.scan(parent, trees);<NEW_LINE>if (!used[0]) {<NEW_LINE>print("/*");<NEW_LINE>}<NEW_LINE>print(labelledStatement.getLabel().toString<MASK><NEW_LINE>if (!used[0]) {<NEW_LINE>print("*/");<NEW_LINE>}<NEW_LINE>print(" ");<NEW_LINE>print(labelledStatement.getStatement());<NEW_LINE>return returnNothing();<NEW_LINE>}
()).print(":");
1,268,846
public void start() throws Exception {<NEW_LINE>// To simplify the development of the web components we use a Router to route all HTTP requests<NEW_LINE>// to organize our code in a reusable way.<NEW_LINE>final Router router = Router.router(vertx);<NEW_LINE>// In order to use a template we first need to create an engine<NEW_LINE>final HandlebarsTemplateEngine <MASK><NEW_LINE>// Entry point to the application, this will render a custom template.<NEW_LINE>router.get().handler(ctx -> {<NEW_LINE>// we define a hardcoded title for our application<NEW_LINE>JsonObject data = new JsonObject().put("title", "Seasons of the year");<NEW_LINE>// we define a hardcoded array of json objects<NEW_LINE>JsonArray seasons = new JsonArray();<NEW_LINE>seasons.add(new JsonObject().put("name", "Spring"));<NEW_LINE>seasons.add(new JsonObject().put("name", "Summer"));<NEW_LINE>seasons.add(new JsonObject().put("name", "Autumn"));<NEW_LINE>seasons.add(new JsonObject().put("name", "Winter"));<NEW_LINE>data.put("seasons", seasons);<NEW_LINE>// and now delegate to the engine to render it.<NEW_LINE>engine.render(data, "templates/index.hbs", res -> {<NEW_LINE>if (res.succeeded()) {<NEW_LINE>ctx.response().end(res.result());<NEW_LINE>} else {<NEW_LINE>ctx.fail(res.cause());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>});<NEW_LINE>// start a HTTP web server on port 8080<NEW_LINE>vertx.createHttpServer().requestHandler(router).listen(8080);<NEW_LINE>}
engine = HandlebarsTemplateEngine.create(vertx);
1,268,614
public static DescribeInstanceDomainsResponse unmarshall(DescribeInstanceDomainsResponse describeInstanceDomainsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeInstanceDomainsResponse.setRequestId(_ctx.stringValue("DescribeInstanceDomainsResponse.RequestId"));<NEW_LINE>describeInstanceDomainsResponse.setTotalItems(_ctx.integerValue("DescribeInstanceDomainsResponse.TotalItems"));<NEW_LINE>describeInstanceDomainsResponse.setPageNumber(_ctx.integerValue("DescribeInstanceDomainsResponse.PageNumber"));<NEW_LINE>describeInstanceDomainsResponse.setPageSize(_ctx.integerValue("DescribeInstanceDomainsResponse.PageSize"));<NEW_LINE>describeInstanceDomainsResponse.setTotalPages(_ctx.integerValue("DescribeInstanceDomainsResponse.TotalPages"));<NEW_LINE>List<InstanceDomain> instanceDomains = new ArrayList<InstanceDomain>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeInstanceDomainsResponse.InstanceDomains.Length"); i++) {<NEW_LINE>InstanceDomain instanceDomain = new InstanceDomain();<NEW_LINE>instanceDomain.setDomainName(_ctx.stringValue("DescribeInstanceDomainsResponse.InstanceDomains[" + i + "].DomainName"));<NEW_LINE>instanceDomain.setCreateTime(_ctx.stringValue<MASK><NEW_LINE>instanceDomain.setCreateTimestamp(_ctx.longValue("DescribeInstanceDomainsResponse.InstanceDomains[" + i + "].CreateTimestamp"));<NEW_LINE>instanceDomains.add(instanceDomain);<NEW_LINE>}<NEW_LINE>describeInstanceDomainsResponse.setInstanceDomains(instanceDomains);<NEW_LINE>return describeInstanceDomainsResponse;<NEW_LINE>}
("DescribeInstanceDomainsResponse.InstanceDomains[" + i + "].CreateTime"));
928,312
protected void runTask(Properties periodicTaskProperties) {<NEW_LINE>// Make it so that only one controller is responsible for cleaning up minion instances.<NEW_LINE>if (!_leadControllerManager.isLeaderForTable(TASK_NAME)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<String> offlineInstances = new ArrayList<>(_pinotHelixResourceManager.getAllInstances());<NEW_LINE>offlineInstances.removeAll(_pinotHelixResourceManager.getOnlineInstanceList());<NEW_LINE>for (String offlineInstance : offlineInstances) {<NEW_LINE>// Since ZNodes under "/LIVEINSTANCES" are ephemeral, if there is a ZK session expire (e.g. due to network issue),<NEW_LINE>// the ZNode under "/LIVEINSTANCES" will be deleted. Thus, such race condition can happen when this task is<NEW_LINE>// running.<NEW_LINE>// In order to double confirm the live status of an instance, the field "LAST_OFFLINE_TIME" in ZNode under<NEW_LINE>// "/INSTANCES/<instance_id>/HISTORY" needs to be checked. If the value is "-1", that means the instance is<NEW_LINE>// ONLINE;<NEW_LINE>// if the value is a timestamp, that means the instance starts to be OFFLINE since that time.<NEW_LINE>if (offlineInstance.startsWith(CommonConstants.Helix.PREFIX_OF_MINION_INSTANCE)) {<NEW_LINE>// Drop the minion instance if it has been offline for more than a period of this task.<NEW_LINE>if (_pinotHelixResourceManager.isInstanceOfflineFor(offlineInstance, _minionInstanceCleanupTaskMinOfflineTimeBeforeDeletionInMilliseconds)) {<NEW_LINE>LOGGER.info("Dropping minion instance: {}", offlineInstance);<NEW_LINE>PinotResourceManagerResponse response = _pinotHelixResourceManager.dropInstance(offlineInstance);<NEW_LINE>if (response.isSuccessful()) {<NEW_LINE>_controllerMetrics.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
addValueToGlobalGauge(ControllerGauge.DROPPED_MINION_INSTANCES, 1);
1,111,282
public byte[] toByteArray() {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "toByteArray");<NEW_LINE>// Just in case you're wondering, if two threads race to create the<NEW_LINE>// cached arrays, we may end up with two identical arrays, one of which<NEW_LINE>// is cached, while the other thread uses the second. Since the contents of<NEW_LINE>// the arrays are identical, this does not cause a problem!<NEW_LINE>if (_cachedBytes == null) {<NEW_LINE>_cachedBytes = new byte[16];<NEW_LINE>_cachedBytes[0] = (byte) ((_uuidHigh & 0xFF00000000000000L) >>> 56);<NEW_LINE>_cachedBytes[1] = (byte) ((_uuidHigh & 0x00FF000000000000L) >>> 48);<NEW_LINE>_cachedBytes[2] = (byte) ((_uuidHigh & 0x0000FF0000000000L) >>> 40);<NEW_LINE>_cachedBytes[3] = (byte) ((_uuidHigh & 0x000000FF00000000L) >>> 32);<NEW_LINE>_cachedBytes[4] = (byte) ((_uuidHigh & 0x00000000FF000000L) >>> 24);<NEW_LINE>_cachedBytes[5] = (byte) ((_uuidHigh & 0x0000000000FF0000L) >>> 16);<NEW_LINE>_cachedBytes[6] = (byte) ((_uuidHigh & 0x000000000000FF00L) >>> 8);<NEW_LINE>_cachedBytes[7] = (byte) ((_uuidHigh & 0x00000000000000FFL) >>> 0);<NEW_LINE>_cachedBytes[8] = (byte) ((_uuidLow & 0xFF00000000000000L) >>> 56);<NEW_LINE>_cachedBytes[9] = (byte) ((_uuidLow & 0x00FF000000000000L) >>> 48);<NEW_LINE>_cachedBytes[10] = (byte) ((_uuidLow & 0x0000FF0000000000L) >>> 40);<NEW_LINE>_cachedBytes[11] = (byte) ((_uuidLow & 0x000000FF00000000L) >>> 32);<NEW_LINE>_cachedBytes[12] = (byte) ((_uuidLow & 0x00000000FF000000L) >>> 24);<NEW_LINE>_cachedBytes[13] = (byte) ((_uuidLow & 0x0000000000FF0000L) >>> 16);<NEW_LINE>_cachedBytes[14] = (byte) ((_uuidLow & 0x000000000000FF00L) >>> 8);<NEW_LINE>_cachedBytes[15] = (byte) ((_uuidLow <MASK><NEW_LINE>}<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.exit(tc, "toByteArray", com.ibm.ejs.util.Util.toHexString(_cachedBytes));<NEW_LINE>return _cachedBytes;<NEW_LINE>}
& 0x00000000000000FFL) >>> 0);
1,331,236
static Feature featureFromStarlark(StarlarkInfo featureStruct) throws EvalException {<NEW_LINE>checkRightProviderType(featureStruct, "feature");<NEW_LINE>String name = getMandatoryFieldFromStarlarkProvider(featureStruct, "name", String.class);<NEW_LINE>Boolean enabled = getMandatoryFieldFromStarlarkProvider(featureStruct, "enabled", Boolean.class);<NEW_LINE>if (name == null || (name.isEmpty() && !enabled)) {<NEW_LINE>throw infoError(featureStruct, "A feature must either have a nonempty 'name' field or be enabled.");<NEW_LINE>}<NEW_LINE>if (!name.matches("^[_a-z0-9+\\-\\.]*$")) {<NEW_LINE>throw infoError(<MASK><NEW_LINE>}<NEW_LINE>ImmutableList.Builder<FlagSet> flagSetBuilder = ImmutableList.builder();<NEW_LINE>ImmutableList<StarlarkInfo> flagSets = getStarlarkProviderListFromStarlarkField(featureStruct, "flag_sets");<NEW_LINE>for (StarlarkInfo flagSetObject : flagSets) {<NEW_LINE>FlagSet flagSet = flagSetFromStarlark(flagSetObject, /* actionName= */<NEW_LINE>null);<NEW_LINE>if (flagSet.getActions().isEmpty()) {<NEW_LINE>throw infoError(flagSetObject, "A flag_set that belongs to a feature must have nonempty 'actions' parameter.");<NEW_LINE>}<NEW_LINE>flagSetBuilder.add(flagSet);<NEW_LINE>}<NEW_LINE>ImmutableList.Builder<EnvSet> envSetBuilder = ImmutableList.builder();<NEW_LINE>ImmutableList<StarlarkInfo> envSets = getStarlarkProviderListFromStarlarkField(featureStruct, "env_sets");<NEW_LINE>for (StarlarkInfo envSet : envSets) {<NEW_LINE>envSetBuilder.add(envSetFromStarlark(envSet));<NEW_LINE>}<NEW_LINE>ImmutableList.Builder<ImmutableSet<String>> requiresBuilder = ImmutableList.builder();<NEW_LINE>ImmutableList<StarlarkInfo> requires = getStarlarkProviderListFromStarlarkField(featureStruct, "requires");<NEW_LINE>for (StarlarkInfo featureSetStruct : requires) {<NEW_LINE>if (!"feature_set".equals(featureSetStruct.getValue("type_name"))) {<NEW_LINE>// getValue() may be null<NEW_LINE>throw infoError(featureStruct, "expected object of type 'feature_set'.");<NEW_LINE>}<NEW_LINE>ImmutableSet<String> featureSet = getStringSetFromStarlarkProviderField(featureSetStruct, "features");<NEW_LINE>requiresBuilder.add(featureSet);<NEW_LINE>}<NEW_LINE>ImmutableList<String> implies = getStringListFromStarlarkProviderField(featureStruct, "implies");<NEW_LINE>ImmutableList<String> provides = getStringListFromStarlarkProviderField(featureStruct, "provides");<NEW_LINE>return new Feature(name, flagSetBuilder.build(), envSetBuilder.build(), enabled, requiresBuilder.build(), implies, provides);<NEW_LINE>}
featureStruct, "A feature's name must consist solely of lowercase ASCII letters, digits, '.', " + "'_', '+', and '-', got '%s'", name);
1,828,893
public static DescribeScdnServiceResponse unmarshall(DescribeScdnServiceResponse describeScdnServiceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeScdnServiceResponse.setRequestId(_ctx.stringValue("DescribeScdnServiceResponse.RequestId"));<NEW_LINE>describeScdnServiceResponse.setChangingAffectTime(_ctx.stringValue("DescribeScdnServiceResponse.ChangingAffectTime"));<NEW_LINE>describeScdnServiceResponse.setInternetChargeType(_ctx.stringValue("DescribeScdnServiceResponse.InternetChargeType"));<NEW_LINE>describeScdnServiceResponse.setChangingChargeType(_ctx.stringValue("DescribeScdnServiceResponse.ChangingChargeType"));<NEW_LINE>describeScdnServiceResponse.setInstanceId(_ctx.stringValue("DescribeScdnServiceResponse.InstanceId"));<NEW_LINE>describeScdnServiceResponse.setOpenTime(_ctx.stringValue("DescribeScdnServiceResponse.OpenTime"));<NEW_LINE>describeScdnServiceResponse.setEndTime(_ctx.stringValue("DescribeScdnServiceResponse.EndTime"));<NEW_LINE>describeScdnServiceResponse.setProtectType(_ctx.stringValue("DescribeScdnServiceResponse.ProtectType"));<NEW_LINE>describeScdnServiceResponse.setProtectTypeValue(_ctx.stringValue("DescribeScdnServiceResponse.ProtectTypeValue"));<NEW_LINE>describeScdnServiceResponse.setBandwidth(_ctx.stringValue("DescribeScdnServiceResponse.Bandwidth"));<NEW_LINE>describeScdnServiceResponse.setCcProtection(_ctx.stringValue("DescribeScdnServiceResponse.CcProtection"));<NEW_LINE>describeScdnServiceResponse.setDDoSBasic<MASK><NEW_LINE>describeScdnServiceResponse.setDomainCount(_ctx.stringValue("DescribeScdnServiceResponse.DomainCount"));<NEW_LINE>describeScdnServiceResponse.setElasticProtection(_ctx.stringValue("DescribeScdnServiceResponse.ElasticProtection"));<NEW_LINE>describeScdnServiceResponse.setBandwidthValue(_ctx.stringValue("DescribeScdnServiceResponse.BandwidthValue"));<NEW_LINE>describeScdnServiceResponse.setCcProtectionValue(_ctx.stringValue("DescribeScdnServiceResponse.CcProtectionValue"));<NEW_LINE>describeScdnServiceResponse.setDDoSBasicValue(_ctx.stringValue("DescribeScdnServiceResponse.DDoSBasicValue"));<NEW_LINE>describeScdnServiceResponse.setDomainCountValue(_ctx.stringValue("DescribeScdnServiceResponse.DomainCountValue"));<NEW_LINE>describeScdnServiceResponse.setElasticProtectionValue(_ctx.stringValue("DescribeScdnServiceResponse.ElasticProtectionValue"));<NEW_LINE>describeScdnServiceResponse.setCurrentProtectType(_ctx.stringValue("DescribeScdnServiceResponse.CurrentProtectType"));<NEW_LINE>describeScdnServiceResponse.setCurrentProtectTypeValue(_ctx.stringValue("DescribeScdnServiceResponse.CurrentProtectTypeValue"));<NEW_LINE>describeScdnServiceResponse.setCurrentBandwidth(_ctx.stringValue("DescribeScdnServiceResponse.CurrentBandwidth"));<NEW_LINE>describeScdnServiceResponse.setCurrentCcProtection(_ctx.stringValue("DescribeScdnServiceResponse.CurrentCcProtection"));<NEW_LINE>describeScdnServiceResponse.setCurrentDDoSBasic(_ctx.stringValue("DescribeScdnServiceResponse.CurrentDDoSBasic"));<NEW_LINE>describeScdnServiceResponse.setCurrentDomainCount(_ctx.stringValue("DescribeScdnServiceResponse.CurrentDomainCount"));<NEW_LINE>describeScdnServiceResponse.setCurrentElasticProtection(_ctx.stringValue("DescribeScdnServiceResponse.CurrentElasticProtection"));<NEW_LINE>describeScdnServiceResponse.setCurrentBandwidthValue(_ctx.stringValue("DescribeScdnServiceResponse.CurrentBandwidthValue"));<NEW_LINE>describeScdnServiceResponse.setCurrentCcProtectionValue(_ctx.stringValue("DescribeScdnServiceResponse.CurrentCcProtectionValue"));<NEW_LINE>describeScdnServiceResponse.setCurrentDDoSBasicValue(_ctx.stringValue("DescribeScdnServiceResponse.CurrentDDoSBasicValue"));<NEW_LINE>describeScdnServiceResponse.setCurrentDomainCountValue(_ctx.stringValue("DescribeScdnServiceResponse.CurrentDomainCountValue"));<NEW_LINE>describeScdnServiceResponse.setCurrentElasticProtectionValue(_ctx.stringValue("DescribeScdnServiceResponse.CurrentElasticProtectionValue"));<NEW_LINE>describeScdnServiceResponse.setPriceType(_ctx.stringValue("DescribeScdnServiceResponse.PriceType"));<NEW_LINE>describeScdnServiceResponse.setPricingCycle(_ctx.stringValue("DescribeScdnServiceResponse.PricingCycle"));<NEW_LINE>List<LockReason> operationLocks = new ArrayList<LockReason>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeScdnServiceResponse.OperationLocks.Length"); i++) {<NEW_LINE>LockReason lockReason = new LockReason();<NEW_LINE>lockReason.setLockReason(_ctx.stringValue("DescribeScdnServiceResponse.OperationLocks[" + i + "].LockReason"));<NEW_LINE>operationLocks.add(lockReason);<NEW_LINE>}<NEW_LINE>describeScdnServiceResponse.setOperationLocks(operationLocks);<NEW_LINE>return describeScdnServiceResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeScdnServiceResponse.DDoSBasic"));
1,541,427
public Injector createInjector(Collection<Module> additionalModules) {<NEW_LINE>List<Module> localModules = Lists.newArrayList();<NEW_LINE>// Add the discovered modules FIRST. The discovered modules<NEW_LINE>// are added, and will subsequently be configured, in module dependency<NEW_LINE>// order which will ensure that any singletons bound in these modules<NEW_LINE>// will be created in the same order as the bind() calls are made.<NEW_LINE>// Note that the singleton ordering is only guaranteed for<NEW_LINE>// singleton scope.<NEW_LINE>// Add the LifecycleListener module<NEW_LINE>localModules.add(new LifecycleListenerModule());<NEW_LINE>localModules.add(new AbstractModule() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void configure() {<NEW_LINE>if (requireExplicitBindings) {<NEW_LINE>binder().requireExplicitBindings();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (additionalModules != null) {<NEW_LINE>localModules.addAll(additionalModules);<NEW_LINE>}<NEW_LINE>localModules.addAll(modules);<NEW_LINE>// Finally, add the AutoBind module, which will use classpath scanning<NEW_LINE>// to creating singleton bindings. These singletons will be instantiated<NEW_LINE>// in an indeterminate order but are guaranteed to occur AFTER singletons<NEW_LINE>// bound in any of the discovered modules.<NEW_LINE>if (!ignoreAllClasses) {<NEW_LINE>Collection<Class<?>> localIgnoreClasses = Sets.newHashSet(ignoreClasses);<NEW_LINE>localModules.add(new InternalAutoBindModule<MASK><NEW_LINE>}<NEW_LINE>return createChildInjector(localModules);<NEW_LINE>}
(injector, scanner, localIgnoreClasses));
1,488,045
public void run(String[] args) {<NEW_LINE>try {<NEW_LINE>// No args is not a valid use of the command, so<NEW_LINE>// print help and exit with an error code.<NEW_LINE>if (args.length == 0) {<NEW_LINE>printMainHelp();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String argument = args[0];<NEW_LINE>if (argument.equals("-h") || argument.equals(HELP)) {<NEW_LINE>printMainHelp();<NEW_LINE>} else if (commands.containsKey(argument)) {<NEW_LINE>Command command = commands.get(argument);<NEW_LINE><MASK><NEW_LINE>Arguments parsedArguments = parser.parse(args, 1);<NEW_LINE>// Use the --no-color argument to globally disable ANSI colors.<NEW_LINE>if (parsedArguments.has(NO_COLOR)) {<NEW_LINE>setUseAnsiColors(false);<NEW_LINE>} else if (parsedArguments.has(FORCE_COLOR)) {<NEW_LINE>setUseAnsiColors(true);<NEW_LINE>}<NEW_LINE>// Automatically handle --help output for subcommands.<NEW_LINE>if (parsedArguments.has(HELP)) {<NEW_LINE>printHelp(command, parser);<NEW_LINE>} else {<NEW_LINE>configureLogging(parsedArguments);<NEW_LINE>command.execute(parsedArguments, classLoader);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new CliError("Unknown command or argument: '" + argument + "'", 1);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>printException(args, e);<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}
Parser parser = command.getParser();
1,199,816
final ListConnectionsResult executeListConnections(ListConnectionsRequest listConnectionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listConnectionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListConnectionsRequest> request = null;<NEW_LINE>Response<ListConnectionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListConnectionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listConnectionsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "CodeStar connections");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListConnections");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListConnectionsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListConnectionsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
523,408
public static void main(String[] args) {<NEW_LINE>// Sequence of input pairs to produce a tree of height 4:<NEW_LINE>// 0 1<NEW_LINE>// 0 2<NEW_LINE>// 0 3<NEW_LINE>// 6 7<NEW_LINE>// 8 9<NEW_LINE>// 6 8<NEW_LINE>// 0 6<NEW_LINE>// 10 11<NEW_LINE>// 10 12<NEW_LINE>// 10 13<NEW_LINE>// 10 14<NEW_LINE>// 10 15<NEW_LINE>// 10 16<NEW_LINE>// 10 17<NEW_LINE>// 10 18<NEW_LINE>// 0 10<NEW_LINE>// Path of height 4: 9 -> 8 -> 6 -> 0 -> 10<NEW_LINE>WeightedQuickUnionPathCompression weightedQuickUnionPathCompression = new Exercise13_WeightedQUPathCompression().new WeightedQuickUnionPathCompression(19);<NEW_LINE>weightedQuickUnionPathCompression.union(0, 1);<NEW_LINE>weightedQuickUnionPathCompression.union(0, 2);<NEW_LINE>weightedQuickUnionPathCompression.union(0, 3);<NEW_LINE>weightedQuickUnionPathCompression.union(6, 7);<NEW_LINE>weightedQuickUnionPathCompression.union(8, 9);<NEW_LINE>weightedQuickUnionPathCompression.union(6, 8);<NEW_LINE><MASK><NEW_LINE>weightedQuickUnionPathCompression.union(10, 11);<NEW_LINE>weightedQuickUnionPathCompression.union(10, 12);<NEW_LINE>weightedQuickUnionPathCompression.union(10, 13);<NEW_LINE>weightedQuickUnionPathCompression.union(10, 14);<NEW_LINE>weightedQuickUnionPathCompression.union(10, 15);<NEW_LINE>weightedQuickUnionPathCompression.union(10, 16);<NEW_LINE>weightedQuickUnionPathCompression.union(10, 17);<NEW_LINE>weightedQuickUnionPathCompression.union(10, 18);<NEW_LINE>weightedQuickUnionPathCompression.union(0, 10);<NEW_LINE>StdOut.println("Components: " + weightedQuickUnionPathCompression.count() + " Expected: 3");<NEW_LINE>}
weightedQuickUnionPathCompression.union(0, 6);
437,371
private static void updateDataRecordWithRequestQtys(final I_MD_Cockpit dataRecord, final UpdateMainDataRequest dataUpdateRequest) {<NEW_LINE>// was QtyMaterialentnahme<NEW_LINE>dataRecord.setQtyMaterialentnahme(stripTrailingDecimalZeros(dataRecord.getQtyMaterialentnahme().add(dataUpdateRequest.getDirectMovementQty())));<NEW_LINE>// was PMM_QtyPromised_OnDate<NEW_LINE>dataRecord.setPMM_QtyPromised_OnDate(stripTrailingDecimalZeros(dataRecord.getPMM_QtyPromised_OnDate().add(dataUpdateRequest.getOfferedQty())));<NEW_LINE>// this column was not in the old data model<NEW_LINE>dataRecord.setQtyStockChange(stripTrailingDecimalZeros(dataRecord.getQtyStockChange().add(dataUpdateRequest.getOnHandQtyChange())));<NEW_LINE>// was QtyOrdered_OnDate => sum of RV_C_OrderLine_QtyOrderedReservedPromised_OnDate_V.QtyReserved_Purchase => ol.QtyReserved of purchaseOrders<NEW_LINE>dataRecord.setQtySupply_PurchaseOrder(computeSum(dataRecord.getQtySupply_PurchaseOrder(), dataUpdateRequest.getQtySupplyPurchaseOrder()));<NEW_LINE>// was QtyReserved_OnDate, was QtyReserved_Sale<NEW_LINE>dataRecord.setQtyDemand_SalesOrder(computeSum(dataRecord.getQtyDemand_SalesOrder(), dataUpdateRequest.getQtyDemandSalesOrder()));<NEW_LINE>dataRecord.setQtySupply_DD_Order(computeSum(dataRecord.getQtySupply_DD_Order(), dataUpdateRequest.getQtySupplyDDOrder()));<NEW_LINE>dataRecord.setQtyDemand_DD_Order(computeSum(dataRecord.getQtyDemand_DD_Order()<MASK><NEW_LINE>dataRecord.setQtySupply_PP_Order(computeSum(dataRecord.getQtySupply_PP_Order(), dataUpdateRequest.getQtySupplyPPOrder()));<NEW_LINE>// was Fresh_QtyMRP, was QtyRequiredForProduction<NEW_LINE>dataRecord.setQtyDemand_PP_Order(computeSum(dataRecord.getQtyDemand_PP_Order(), dataUpdateRequest.getQtyDemandPPOrder()));<NEW_LINE>dataRecord.setQtySupplyRequired(CoalesceUtil.firstPositiveOrZero(computeSum(dataRecord.getQtySupplyRequired(), dataUpdateRequest.getQtySupplyRequired())));<NEW_LINE>updateQtyStockEstimateColumns(dataRecord, dataUpdateRequest);<NEW_LINE>dataRecord.setQtyInventoryCount(computeSum(dataRecord.getQtyInventoryCount(), dataUpdateRequest.getQtyInventoryCount()));<NEW_LINE>dataRecord.setQtyInventoryTime(TimeUtil.asTimestamp(TimeUtil.max(TimeUtil.asInstant(dataRecord.getDateGeneral()), dataUpdateRequest.getQtyInventoryTime())));<NEW_LINE>dataRecord.setQtySupplySum(computeQtySupply_Sum(dataRecord));<NEW_LINE>dataRecord.setQtyDemandSum(computeQtyDemand_Sum(dataRecord));<NEW_LINE>}
, dataUpdateRequest.getQtyDemandDDOrder()));
100,533
public static String markup(@NonNls @Nonnull String textToMarkup, @Nullable String filter) {<NEW_LINE>if (filter == null || filter.length() == 0) {<NEW_LINE>return textToMarkup;<NEW_LINE>}<NEW_LINE>int bodyStart = textToMarkup.indexOf("<body>");<NEW_LINE>final int bodyEnd = textToMarkup.indexOf("</body>");<NEW_LINE>final String head;<NEW_LINE>final String foot;<NEW_LINE>if (bodyStart >= 0) {<NEW_LINE>bodyStart += "<body>".length();<NEW_LINE>head = textToMarkup.substring(0, bodyStart);<NEW_LINE>if (bodyEnd >= 0) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>foot = "";<NEW_LINE>}<NEW_LINE>textToMarkup = textToMarkup.substring(bodyStart, bodyEnd);<NEW_LINE>} else {<NEW_LINE>foot = "";<NEW_LINE>head = "";<NEW_LINE>}<NEW_LINE>final Pattern insideHtmlTagPattern = Pattern.compile("[<[^<>]*>]*<[^<>]*");<NEW_LINE>final SearchableOptionsRegistrar registrar = SearchableOptionsRegistrar.getInstance();<NEW_LINE>final HashSet<String> quoted = new HashSet<String>();<NEW_LINE>filter = processFilter(quoteStrictOccurrences(textToMarkup, filter), quoted);<NEW_LINE>final Set<String> options = registrar.getProcessedWords(filter);<NEW_LINE>final Set<String> words = registrar.getProcessedWords(textToMarkup);<NEW_LINE>for (String option : options) {<NEW_LINE>if (words.contains(option)) {<NEW_LINE>textToMarkup = markup(textToMarkup, insideHtmlTagPattern, option);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (String stripped : quoted) {<NEW_LINE>textToMarkup = markup(textToMarkup, insideHtmlTagPattern, stripped);<NEW_LINE>}<NEW_LINE>return head + textToMarkup + foot;<NEW_LINE>}
foot = textToMarkup.substring(bodyEnd);
573,025
public JsonInput next() {<NEW_LINE>try {<NEW_LINE>final JsonInput jsonInput = new JsonInput();<NEW_LINE>final int len = fields.length;<NEW_LINE>if (fields.length > propertyNames.length) {<NEW_LINE>throw new FrameworkException(422, "Line contains more fields than columns - maybe a problem with the field quoting?");<NEW_LINE>}<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE><MASK><NEW_LINE>String targetKey = key;<NEW_LINE>// map key name to its transformed name<NEW_LINE>if (propertyMapping != null && propertyMapping.containsKey(key)) {<NEW_LINE>targetKey = propertyMapping.get(key);<NEW_LINE>}<NEW_LINE>if (StructrApp.getConfiguration().getPropertyKeyForJSONName(type, targetKey).isCollection()) {<NEW_LINE>// if the current property is a collection, split it into its parts<NEW_LINE>jsonInput.add(key, extractArrayContentsFromArray(fields[i], key));<NEW_LINE>} else {<NEW_LINE>jsonInput.add(key, fields[i]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return jsonInput;<NEW_LINE>} catch (Throwable t) {<NEW_LINE>final String lineInfo = Arrays.toString(fields);<NEW_LINE>final String atMostFirst100Characters = lineInfo.substring(0, Math.min(100, lineInfo.length()));<NEW_LINE>logger.warn("Exception in CSV line: {}", atMostFirst100Characters);<NEW_LINE>logger.warn("", t);<NEW_LINE>final Map<String, Object> data = new LinkedHashMap();<NEW_LINE>data.put("type", "CSV_IMPORT_ERROR");<NEW_LINE>data.put("title", "CSV Import Error");<NEW_LINE>data.put("text", "Error occured with dataset: " + atMostFirst100Characters);<NEW_LINE>data.put("username", userName);<NEW_LINE>TransactionCommand.simpleBroadcastGenericMessage(data);<NEW_LINE>} finally {<NEW_LINE>// mark line as "consumed"<NEW_LINE>fields = null;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
final String key = propertyNames[i];
1,306,885
public boolean cellsCleanedUp(Transaction t, Set<Cell> cells) {<NEW_LINE>DataStreamIdxTable usersIndex = tables.getDataStreamIdxTable(t);<NEW_LINE>Set<DataStreamIdxTable.DataStreamIdxRow> rows = Sets.newHashSetWithExpectedSize(cells.size());<NEW_LINE>for (Cell cell : cells) {<NEW_LINE>rows.add(DataStreamIdxTable.DataStreamIdxRow.BYTES_HYDRATOR.hydrateFromBytes(cell.getRowName()));<NEW_LINE>}<NEW_LINE>BatchColumnRangeSelection oneColumn = BatchColumnRangeSelection.create(PtBytes.<MASK><NEW_LINE>Map<DataStreamIdxTable.DataStreamIdxRow, BatchingVisitable<DataStreamIdxTable.DataStreamIdxColumnValue>> existentRows = usersIndex.getRowsColumnRange(rows, oneColumn);<NEW_LINE>Set<DataStreamIdxTable.DataStreamIdxRow> rowsInDb = Sets.newHashSetWithExpectedSize(cells.size());<NEW_LINE>for (Map.Entry<DataStreamIdxTable.DataStreamIdxRow, BatchingVisitable<DataStreamIdxTable.DataStreamIdxColumnValue>> rowVisitable : existentRows.entrySet()) {<NEW_LINE>rowVisitable.getValue().batchAccept(1, columnValues -> {<NEW_LINE>if (!columnValues.isEmpty()) {<NEW_LINE>rowsInDb.add(rowVisitable.getKey());<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>});<NEW_LINE>}<NEW_LINE>Set<Long> toDelete = Sets.newHashSetWithExpectedSize(rows.size() - rowsInDb.size());<NEW_LINE>for (DataStreamIdxTable.DataStreamIdxRow rowToDelete : Sets.difference(rows, rowsInDb)) {<NEW_LINE>toDelete.add(rowToDelete.getId());<NEW_LINE>}<NEW_LINE>DataStreamStore.of(tables).deleteStreams(t, toDelete);<NEW_LINE>return false;<NEW_LINE>}
EMPTY_BYTE_ARRAY, PtBytes.EMPTY_BYTE_ARRAY, 1);
629,981
private Mono<Response<Flux<ByteBuffer>>> restartWithResponseAsync(String resourceGroupName, String resourceName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = <MASK><NEW_LINE>return service.restart(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context);<NEW_LINE>}
this.client.mergeContext(context);
1,597,324
public SOAPMessage invoke(SOAPMessage request) {<NEW_LINE>SOAPMessage response = null;<NEW_LINE>try {<NEW_LINE>System.out.println("Incoming Client Request as a SOAPMessage:");<NEW_LINE>request.writeTo(System.out);<NEW_LINE>String hdrText = request.getSOAPHeader().getTextContent();<NEW_LINE>System.out.println("Incoming SOAP Header:" + hdrText);<NEW_LINE>StringReader respMsg = new StringReader("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">" + "<soapenv:Header/>" + "<soapenv:Body xmlns=\"http://wsstemplates.wssecfvt.test/types\">" + "<provider>This is WSSTemplateWebSvc6 Web Service.</provider></soapenv:Body></soapenv:Envelope>");<NEW_LINE><MASK><NEW_LINE>MessageFactory factory = MessageFactory.newInstance();<NEW_LINE>response = factory.createMessage();<NEW_LINE>response.getSOAPPart().setContent(src);<NEW_LINE>response.saveChanges();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
Source src = new StreamSource(respMsg);
1,399,996
private static void drawCubeQuads(MatrixStack matrixStack, IRenderTypeBuffer renderBuffer, Color color, int combinedLight) {<NEW_LINE>IVertexBuilder vertexBuilderBlockQuads = renderBuffer.getBuffer(RenderType.getEntitySolid(MBE21_CUBE_FACE_TEXTURE));<NEW_LINE>// other typical RenderTypes used by TER are:<NEW_LINE>// getEntityCutout, getBeaconBeam (which has translucency),<NEW_LINE>// retrieves the current transformation matrix<NEW_LINE>Matrix4f matrixPos = matrixStack.getLast().getMatrix();<NEW_LINE>// retrieves the current transformation matrix for the normal vector<NEW_LINE>Matrix3f matrixNormal = matrixStack.getLast().getNormal();<NEW_LINE>// we use the whole texture<NEW_LINE>Vector2f bottomLeftUV = new Vector2f(0.0F, 1.0F);<NEW_LINE>float UVwidth = 1.0F;<NEW_LINE>float UVheight = 1.0F;<NEW_LINE>// all faces have the same height and width<NEW_LINE>final float WIDTH = 1.0F;<NEW_LINE>final float HEIGHT = 1.0F;<NEW_LINE>final Vector3d EAST_FACE_MIDPOINT = new Vector3d(1.0, 0.5, 0.5);<NEW_LINE>final Vector3d WEST_FACE_MIDPOINT = new Vector3d(0.0, 0.5, 0.5);<NEW_LINE>final Vector3d NORTH_FACE_MIDPOINT = new Vector3d(0.5, 0.5, 0.0);<NEW_LINE>final Vector3d SOUTH_FACE_MIDPOINT = new Vector3d(0.5, 0.5, 1.0);<NEW_LINE>final Vector3d UP_FACE_MIDPOINT = new Vector3d(0.5, 1.0, 0.5);<NEW_LINE>final Vector3d DOWN_FACE_MIDPOINT = new Vector3d(0.5, 0.0, 0.5);<NEW_LINE>addFace(Direction.EAST, matrixPos, matrixNormal, vertexBuilderBlockQuads, color, EAST_FACE_MIDPOINT, WIDTH, HEIGHT, bottomLeftUV, UVwidth, UVheight, combinedLight);<NEW_LINE>addFace(Direction.WEST, matrixPos, matrixNormal, vertexBuilderBlockQuads, color, WEST_FACE_MIDPOINT, WIDTH, HEIGHT, bottomLeftUV, UVwidth, UVheight, combinedLight);<NEW_LINE>addFace(Direction.NORTH, matrixPos, matrixNormal, vertexBuilderBlockQuads, color, NORTH_FACE_MIDPOINT, WIDTH, HEIGHT, <MASK><NEW_LINE>addFace(Direction.SOUTH, matrixPos, matrixNormal, vertexBuilderBlockQuads, color, SOUTH_FACE_MIDPOINT, WIDTH, HEIGHT, bottomLeftUV, UVwidth, UVheight, combinedLight);<NEW_LINE>addFace(Direction.UP, matrixPos, matrixNormal, vertexBuilderBlockQuads, color, UP_FACE_MIDPOINT, WIDTH, HEIGHT, bottomLeftUV, UVwidth, UVheight, combinedLight);<NEW_LINE>addFace(Direction.DOWN, matrixPos, matrixNormal, vertexBuilderBlockQuads, color, DOWN_FACE_MIDPOINT, WIDTH, HEIGHT, bottomLeftUV, UVwidth, UVheight, combinedLight);<NEW_LINE>}
bottomLeftUV, UVwidth, UVheight, combinedLight);
722,661
public static List<Versioned<byte[]>> fromByteArray(byte[] bytes) {<NEW_LINE>if (bytes.length < 1)<NEW_LINE>throw new VoldemortException("Invalid value length: " + bytes.length);<NEW_LINE>if (bytes[0] != VERSION)<NEW_LINE>throw new VoldemortException("Unexpected version number in value: " + bytes[0]);<NEW_LINE>int pos = 1;<NEW_LINE>List<Versioned<byte[]>> vals = new ArrayList<Versioned<byte[]>>(2);<NEW_LINE>while (pos < bytes.length) {<NEW_LINE>VectorClock clock = new VectorClock(bytes, pos);<NEW_LINE>pos += clock.sizeInBytes();<NEW_LINE>int valueSize = ByteUtils.readInt(bytes, pos);<NEW_LINE>pos += ByteUtils.SIZE_OF_INT;<NEW_LINE>byte[] val = new byte[valueSize];<NEW_LINE>System.arraycopy(bytes, <MASK><NEW_LINE>pos += valueSize;<NEW_LINE>vals.add(Versioned.value(val, clock));<NEW_LINE>}<NEW_LINE>if (pos != bytes.length)<NEW_LINE>throw new VoldemortException((bytes.length - pos) + " straggling bytes found in value (this should not be possible)!");<NEW_LINE>return vals;<NEW_LINE>}
pos, val, 0, valueSize);
1,235,125
public Model onRemove(ModelTransformer transformer, Collection<Shape> shapes, Model model) {<NEW_LINE>Set<ShapeId> removedOperations = shapes.stream().filter(Shape::isOperationShape).map(Shape::getId).collect(Collectors.toSet());<NEW_LINE>Set<ShapeId> removedErrors = shapes.stream().filter(shape -> shape.hasTrait(ErrorTrait.class)).map(Shape::getId).collect(Collectors.toSet());<NEW_LINE>Set<Shape> servicesToUpdate = getServicesToUpdate(model, removedOperations, removedErrors);<NEW_LINE>Set<Shape> shapesToUpdate <MASK><NEW_LINE>Set<Shape> operationsToUpdate = getOperationsToUpdate(model, servicesToUpdate.stream().map(Shape::getId).collect(Collectors.toSet()));<NEW_LINE>shapesToUpdate.addAll(operationsToUpdate);<NEW_LINE>Set<Shape> membersToUpdate = getMembersToUpdate(model, operationsToUpdate.stream().map(Shape::getId).collect(Collectors.toSet()));<NEW_LINE>shapesToUpdate.addAll(membersToUpdate);<NEW_LINE>return transformer.replaceShapes(model, shapesToUpdate);<NEW_LINE>}
= new HashSet<>(servicesToUpdate);
460,626
protected IStatus run(final IProgressMonitor monitor) {<NEW_LINE>monitor.beginTask("Loading...", IProgressMonitor.UNKNOWN);<NEW_LINE>twdata.clear();<NEW_LINE>collectObj();<NEW_LINE>Iterator<Integer> serverIds = serverObjMap.keySet().iterator();<NEW_LINE>final TreeSet<XLogData> tempSet = new TreeSet<XLogData>(new XLogDataComparator());<NEW_LINE>int limit = PManager.getInstance().getInt(PreferenceConstants.P_XLOG_IGNORE_TIME);<NEW_LINE>final int max = getMaxCount();<NEW_LINE>twdata.setMax(max);<NEW_LINE>while (serverIds.hasNext()) {<NEW_LINE>final int serverId = serverIds.next();<NEW_LINE>final Server server = ServerManager.getInstance().getServer(serverId);<NEW_LINE>monitor.subTask(server.getName() + " data loading...");<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>try {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>param.put("date", DateUtil.yyyymmdd(stime));<NEW_LINE><MASK><NEW_LINE>param.put("etime", etime);<NEW_LINE>param.put("objHash", serverObjMap.get(serverId));<NEW_LINE>if (limit > 0) {<NEW_LINE>param.put("limit", limit);<NEW_LINE>}<NEW_LINE>if (max > 0) {<NEW_LINE>param.put("max", max);<NEW_LINE>}<NEW_LINE>tcp.process(RequestCmd.TRANX_LOAD_TIME_GROUP, param, new INetReader() {<NEW_LINE><NEW_LINE>public void process(DataInputX in) throws IOException {<NEW_LINE>Pack p = in.readPack();<NEW_LINE>if (monitor.isCanceled()) {<NEW_LINE>throw new IOException("User cancelled");<NEW_LINE>}<NEW_LINE>XLogPack x = XLogUtil.toXLogPack(p);<NEW_LINE>if (tempSet.size() < max) {<NEW_LINE>tempSet.add(new XLogData(x, serverId));<NEW_LINE>count++;<NEW_LINE>}<NEW_LINE>if (count % 10000 == 0) {<NEW_LINE>monitor.subTask(count + " XLog data received.");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (Throwable e) {<NEW_LINE>ConsoleProxy.errorSafe(e.toString());<NEW_LINE>} finally {<NEW_LINE>TcpProxy.putTcpProxy(tcp);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (XLogData d : tempSet) {<NEW_LINE>twdata.putLast(d.p.txid, d);<NEW_LINE>}<NEW_LINE>monitor.done();<NEW_LINE>refresh();<NEW_LINE>return Status.OK_STATUS;<NEW_LINE>}
param.put("stime", stime);
1,059,918
public void validateUndeploymentTarget(String target, String name) {<NEW_LINE>List<String> <MASK><NEW_LINE>if (referencedTargets.size() > 1) {<NEW_LINE>Application app = applications.getApplication(name);<NEW_LINE>if (!DeploymentUtils.isDomainTarget(target) && domain.getDeploymentGroupNamed(target) == null) {<NEW_LINE>if (app.isLifecycleModule()) {<NEW_LINE>throw new IllegalArgumentException(localStrings.getLocalString("delete_lifecycle_on_multiple_targets", "Lifecycle module {0} is referenced by more than one targets. Please remove other references before attempting delete operation.", name));<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException(localStrings.getLocalString("undeploy_on_multiple_targets", "Application {0} is referenced by more than one targets. Please remove other references or specify all targets (or domain target if using asadmin command line) before attempting undeploy operation.", name));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
referencedTargets = domain.getAllReferencedTargetsForApplication(name);
662,527
public static void main(String[] args) throws Exception {<NEW_LINE>String inputfilepath = System.getProperty("user.dir") + "/sample-docs/Hier2Level.glox";<NEW_LINE>// inputfilepath = System.getProperty("user.dir") + "/sample-docs/extracted/SmartArt-BasicChevronProcess.pptx.glox";<NEW_LINE>// String inputfilepath = System.getProperty("user.dir") + "/RectTimeline2.glox";<NEW_LINE>// Make a basic docx<NEW_LINE>WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();<NEW_LINE>wordMLPackage.getMainDocumentPart().addStyledParagraphOfText("Title", "Hello world");<NEW_LINE>wordMLPackage.getMainDocumentPart().addParagraphOfText("from docx4j!");<NEW_LINE>// Now add the SmartArt parts from the glox<NEW_LINE>GloxPackage gloxPackage = GloxPackage.load(new java.io.File(inputfilepath));<NEW_LINE>ObjectFactory factory = new ObjectFactory();<NEW_LINE>// Layout part<NEW_LINE>DiagramLayoutPart layout = new DiagramLayoutPart();<NEW_LINE>layout.setJaxbElement(gloxPackage.getDiagramLayoutPart().getJaxbElement());<NEW_LINE>gloxPackage.getDiagramLayoutPart().getJaxbElement().setUniqueId("mylayout");<NEW_LINE>DiagramColorsPart colors = new DiagramColorsPart();<NEW_LINE>colors.unmarshal("colorsDef-accent1_2.xml");<NEW_LINE>// colors.CreateMinimalContent("mycolors");<NEW_LINE>DiagramStylePart style = new DiagramStylePart();<NEW_LINE>style.unmarshal("quickStyle-simple1.xml");<NEW_LINE>// style.CreateMinimalContent("mystyle");<NEW_LINE>// DiagramDataPart<NEW_LINE>DiagramDataPart data = new DiagramDataPart();<NEW_LINE>// Get the sample data from dgm:sampData<NEW_LINE>if (gloxPackage.getDiagramLayoutPart().getJaxbElement().getSampData() == null) {<NEW_LINE>log.error("Sample data missing!");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CTDataModel sampleDataModel = gloxPackage.getDiagramLayoutPart().getJaxbElement().getSampData().getDataModel();<NEW_LINE>// If there is none, this sample won't work<NEW_LINE>if (sampleDataModel == null || sampleDataModel.getPtLst() == null || sampleDataModel.getPtLst().getPt().size() == 0) {<NEW_LINE>System.out.println("No sample data in this glox, so can't create demo docx");<NEW_LINE>return;<NEW_LINE>// TODO: in this case, try generating our own sample data?<NEW_LINE>}<NEW_LINE>CTDataModel clonedDataModel = XmlUtils.deepCopy((CTDataModel) sampleDataModel);<NEW_LINE>data.setJaxbElement(clonedDataModel);<NEW_LINE>CTElemPropSet prSet = factory.createCTElemPropSet();<NEW_LINE>prSet.setLoTypeId("mylayout");<NEW_LINE>prSet.setQsTypeId(style.getJaxbElement().getUniqueId());<NEW_LINE>prSet.setCsTypeId(colors.getJaxbElement().getUniqueId());<NEW_LINE>clonedDataModel.getPtLst().getPt().get(0).setPrSet(prSet);<NEW_LINE>String layoutRelId = wordMLPackage.getMainDocumentPart().addTargetPart(layout).getId();<NEW_LINE>String dataRelId = wordMLPackage.getMainDocumentPart().addTargetPart(data).getId();<NEW_LINE>String colorsRelId = wordMLPackage.getMainDocumentPart().addTargetPart(colors).getId();<NEW_LINE>String styleRelId = wordMLPackage.getMainDocumentPart().addTargetPart(style).getId();<NEW_LINE>// Now use it in the docx<NEW_LINE>wordMLPackage.getMainDocumentPart().addObject(createSmartArt(layoutRelId<MASK><NEW_LINE>wordMLPackage.save(new java.io.File(System.getProperty("user.dir") + "/glox-p1.docx"));<NEW_LINE>System.out.println("Done!");<NEW_LINE>}
, dataRelId, colorsRelId, styleRelId));
490,432
public Symbol apply(Function operator, Captures captures, NodeContext nodeCtx, Symbol parentNode) {<NEW_LINE>var literal = operator.arguments().get(0);<NEW_LINE>var castFunction = captures.get(castCapture);<NEW_LINE>var reference = castFunction.arguments().get(0);<NEW_LINE>DataType<?> targetType = reference.valueType();<NEW_LINE>if (targetType.id() != ArrayType.ID) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>targetType = ((ArrayType<?>) targetType).innerType();<NEW_LINE><MASK><NEW_LINE>if (List.of(AnyEqOperator.NAME, AnyNeqOperator.NAME).contains(operatorName) == false && literal.valueType().id() == ArrayType.ID) {<NEW_LINE>// this is not supported and will fail later on with more verbose error than a cast error<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return functionResolver.apply(operator.name(), List.of(literal.cast(targetType), reference));<NEW_LINE>}
var operatorName = operator.name();
341,807
final GetTrafficPolicyInstanceCountResult executeGetTrafficPolicyInstanceCount(GetTrafficPolicyInstanceCountRequest getTrafficPolicyInstanceCountRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTrafficPolicyInstanceCountRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetTrafficPolicyInstanceCountRequest> request = null;<NEW_LINE>Response<GetTrafficPolicyInstanceCountResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetTrafficPolicyInstanceCountRequestMarshaller().marshall(super.beforeMarshalling(getTrafficPolicyInstanceCountRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Route 53");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTrafficPolicyInstanceCount");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<GetTrafficPolicyInstanceCountResult> responseHandler = new StaxResponseHandler<GetTrafficPolicyInstanceCountResult>(new GetTrafficPolicyInstanceCountResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,486,428
private Optional<IntegerSpace> toPorts(PortSpec portSpec) {<NEW_LINE>// TODO: rewrite to allow for better tracing?<NEW_LINE>return portSpec.accept(new PortSpecVisitor<Optional<IntegerSpace>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Optional<IntegerSpace> visitLiteralPortSpec(LiteralPortSpec literalPortSpec) {<NEW_LINE>return Optional.<MASK><NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Optional<IntegerSpace> visitPortGroupPortSpec(PortGroupPortSpec portGroupPortSpec) {<NEW_LINE>Optional<ObjectGroupIpPort> group = Optional.ofNullable(_objectGroups.get(portGroupPortSpec.getName())).filter(g -> g instanceof ObjectGroupIpPort).map(g -> ((ObjectGroupIpPort) g));<NEW_LINE>if (!group.isPresent()) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>IntegerSpace[] ports = group.get().getLines().values().stream().map(ObjectGroupIpPortLine::getPorts).toArray(IntegerSpace[]::new);<NEW_LINE>return Optional.of(IntegerSpace.unionOf(ports));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
of(literalPortSpec.getPorts());
904,000
public boolean checkTrigger(GameEvent event, Game game) {<NEW_LINE>switch(targetController) {<NEW_LINE>case YOU:<NEW_LINE>boolean yours = event.getPlayerId().equals(this.controllerId);<NEW_LINE>if (yours && setTargetPointer) {<NEW_LINE>if (getTargets().isEmpty()) {<NEW_LINE>this.getEffects().forEach(effect -> {<NEW_LINE>effect.setTargetPointer(new FixedTarget(event.getPlayerId()));<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return yours;<NEW_LINE>case OPPONENT:<NEW_LINE>if (game.getPlayer(this.controllerId).hasOpponent(event.getPlayerId(), game)) {<NEW_LINE>if (setTargetPointer) {<NEW_LINE>this.getEffects().forEach(effect -> {<NEW_LINE>effect.setTargetPointer(new FixedTarget<MASK><NEW_LINE>});<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case ANY:<NEW_LINE>if (setTargetPointer) {<NEW_LINE>this.getEffects().forEach(effect -> {<NEW_LINE>effect.setTargetPointer(new FixedTarget(event.getPlayerId()));<NEW_LINE>});<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
(event.getPlayerId()));
1,756,318
private // ----------------//<NEW_LINE>GradeImpacts computeImpacts(SegmentInter s1, SegmentInter s2, boolean rev) {<NEW_LINE>// Intrinsic segments impacts<NEW_LINE>GradeImpacts imp1 = s1.getImpacts();<NEW_LINE>double d1 = imp1.getGrade() / imp1.getIntrinsicRatio();<NEW_LINE>GradeImpacts imp2 = s2.getImpacts();<NEW_LINE>double d2 = imp2.getGrade() / imp2.getIntrinsicRatio();<NEW_LINE>// Max dy of closed end(s)<NEW_LINE>Point c1 = s1.getInfo().getEnd(rev);<NEW_LINE>Point c2 = s2.getInfo().getEnd(rev);<NEW_LINE>double closedDy = Math.abs(c1.y - c2.y);<NEW_LINE>if (closedDy > params.closedMaxDy) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>double cDy = 1 - (closedDy / params.closedMaxDy);<NEW_LINE>// Min dy of open ends<NEW_LINE>Point open1 = s1.getInfo().getEnd(!rev);<NEW_LINE>Point open2 = s2.getInfo().getEnd(!rev);<NEW_LINE>double openDy = Math.abs(open1.y - open2.y);<NEW_LINE>if (openDy < params.openMinDyLow) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>double oDy = (openDy - params.openMinDyLow) / (params.openMinDyHigh - params.openMinDyLow);<NEW_LINE>// Open ends rather aligned vertically (max bias)<NEW_LINE>double invSlope = Math.abs(LineUtil.getInvertedSlope(open1, open2));<NEW_LINE>if (invSlope > params.openMaxBias) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>double oBias = 1 <MASK><NEW_LINE>// Min horizontal length<NEW_LINE>final int width1 = s1.getInfo().getBounds().width;<NEW_LINE>final int width2 = s2.getInfo().getBounds().width;<NEW_LINE>final int width = Math.min(width1, width2);<NEW_LINE>if (width < params.minLengthLow) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>double lg = (width - params.minLengthLow) / (params.minLengthHigh - params.minLengthLow);<NEW_LINE>return new WedgeInter.Impacts(d1, d2, cDy, oDy, oBias, lg);<NEW_LINE>}
- (invSlope / params.openMaxBias);
619,915
bbBlock truncate(Object caller, int version, int pos) {<NEW_LINE>assert mutation_in_progress(caller, version);<NEW_LINE>if (0 > pos || pos > this._buf_limit)<NEW_LINE>throw new IllegalArgumentException();<NEW_LINE>// clear out all the blocks in use from the last in use<NEW_LINE>// to the block where the eof will be located<NEW_LINE>bbBlock b = null;<NEW_LINE>for (int idx = this._next_block_position - 1; idx >= 0; idx--) {<NEW_LINE>b = this._blocks.get(idx);<NEW_LINE>if (b._offset <= pos)<NEW_LINE>break;<NEW_LINE>b.clearBlock();<NEW_LINE>}<NEW_LINE>if (b == null) {<NEW_LINE>throw new IllegalStateException("block missing at position " + pos);<NEW_LINE>}<NEW_LINE>// reset the next block position to account for this.<NEW_LINE>this<MASK><NEW_LINE>// on the block where eof is, set it's limit appropriately<NEW_LINE>b._limit = pos - b._offset;<NEW_LINE>// set the overall buffer limits<NEW_LINE>this._buf_limit = pos;<NEW_LINE>b = this.findBlockForRead(pos, version, b, pos);<NEW_LINE>return b;<NEW_LINE>}
._next_block_position = b._idx + 1;
1,081,058
private JPanel createXPathQueryPanel() {<NEW_LINE>JPanel p = new JPanel();<NEW_LINE>p.setLayout(new BorderLayout());<NEW_LINE>xpathQueryArea.setBorder(BorderFactory.createLineBorder(Color.black));<NEW_LINE>makeTextComponentUndoable(xpathQueryArea);<NEW_LINE>JScrollPane scrollPane = new JScrollPane(xpathQueryArea);<NEW_LINE><MASK><NEW_LINE>scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);<NEW_LINE>final JButton b = createGoButton();<NEW_LINE>JPanel topPanel = new JPanel();<NEW_LINE>topPanel.setLayout(new BorderLayout());<NEW_LINE>topPanel.add(new JLabel("XPath Query (if any):"), BorderLayout.WEST);<NEW_LINE>topPanel.add(createXPathVersionPanel(), BorderLayout.EAST);<NEW_LINE>p.add(topPanel, BorderLayout.NORTH);<NEW_LINE>p.add(scrollPane, BorderLayout.CENTER);<NEW_LINE>p.add(b, BorderLayout.SOUTH);<NEW_LINE>return p;<NEW_LINE>}
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
1,217,879
private void populatePathToRoot(File file, SVNUrl rootUrl) throws SVNClientException {<NEW_LINE>Map<File, SVNUrl> <MASK><NEW_LINE>for (Entry<File, SVNUrl> e : m.entrySet()) {<NEW_LINE>SVNUrl url = e.getValue();<NEW_LINE>if (url != null) {<NEW_LINE>String rootPath = SvnUtils.decodeToString(SVNUrlUtils.getRelativePath(rootUrl, url, true));<NEW_LINE>if (rootPath == null) {<NEW_LINE>LOG.log(Level.FINE, "populatePathToRoot: rootUrl: {0}, url: {1}, probably svn:externals", new String[] { rootUrl.toString(), url.toString() });<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String fileAbsPath = e.getKey().getAbsolutePath().replace(File.separatorChar, '/');<NEW_LINE>int commonPathLength = getCommonPostfixLength(rootPath, fileAbsPath);<NEW_LINE>pathToRoot.put(rootPath.substring(0, rootPath.length() - commonPathLength), new File(fileAbsPath.substring(0, fileAbsPath.length() - commonPathLength)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
m = SvnUtils.getRepositoryUrls(file);
1,334,531
public Request<ApplyPendingMaintenanceActionRequest> marshall(ApplyPendingMaintenanceActionRequest applyPendingMaintenanceActionRequest) {<NEW_LINE>if (applyPendingMaintenanceActionRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<ApplyPendingMaintenanceActionRequest> request = new DefaultRequest<ApplyPendingMaintenanceActionRequest>(applyPendingMaintenanceActionRequest, "AmazonNeptune");<NEW_LINE>request.addParameter("Action", "ApplyPendingMaintenanceAction");<NEW_LINE><MASK><NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>if (applyPendingMaintenanceActionRequest.getResourceIdentifier() != null) {<NEW_LINE>request.addParameter("ResourceIdentifier", StringUtils.fromString(applyPendingMaintenanceActionRequest.getResourceIdentifier()));<NEW_LINE>}<NEW_LINE>if (applyPendingMaintenanceActionRequest.getApplyAction() != null) {<NEW_LINE>request.addParameter("ApplyAction", StringUtils.fromString(applyPendingMaintenanceActionRequest.getApplyAction()));<NEW_LINE>}<NEW_LINE>if (applyPendingMaintenanceActionRequest.getOptInType() != null) {<NEW_LINE>request.addParameter("OptInType", StringUtils.fromString(applyPendingMaintenanceActionRequest.getOptInType()));<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.addParameter("Version", "2014-10-31");
264,478
private void simulateSlowFileUpload(final String mediaId, final String mediaUrl) {<NEW_LINE>Thread thread = new Thread() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>sleep(5000);<NEW_LINE>float count = (float) 0.1;<NEW_LINE>while (count < 1.1) {<NEW_LINE>sleep(2000);<NEW_LINE>((EditorMediaUploadListener) mEditorFragment).onMediaUploadProgress(mediaId, count);<NEW_LINE>count += 0.1;<NEW_LINE>}<NEW_LINE>MediaFile mediaFile = new MediaFile();<NEW_LINE>mediaFile.setMediaId(MEDIA_REMOTE_ID_SAMPLE);<NEW_LINE>mediaFile.setFileURL(mediaUrl);<NEW_LINE>((EditorMediaUploadListener) mEditorFragment<MASK><NEW_LINE>if (mFailedUploads.containsKey(mediaId)) {<NEW_LINE>mFailedUploads.remove(mediaId);<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>thread.start();<NEW_LINE>}
).onMediaUploadSucceeded(mediaId, mediaFile);
1,753,167
protected List<MetricDatum> counterMetricOf(MetricType type, Request<?> req, Object resp, boolean includesRequestType) {<NEW_LINE>AWSRequestMetrics m = req.getAWSRequestMetrics();<NEW_LINE>TimingInfo ti = m.getTimingInfo();<NEW_LINE>final String metricName = type.name();<NEW_LINE>Number counter = ti.getCounter(metricName);<NEW_LINE>if (counter == null) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>int count = counter.intValue();<NEW_LINE>if (count < 1) {<NEW_LINE>LogFactory.getLog(getClass()).debug("Count must be at least one");<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>final List<MetricDatum> result = new ArrayList<MetricDatum>();<NEW_LINE>final Dimension metricDimension = new Dimension().withName(Dimensions.MetricType.name<MASK><NEW_LINE>// non-request type specific metric datum<NEW_LINE>final MetricDatum first = new MetricDatum().withMetricName(req.getServiceName()).withDimensions(metricDimension).withUnit(StandardUnit.Count).withValue(Double.valueOf(count)).withTimestamp(endTimestamp(ti));<NEW_LINE>result.add(first);<NEW_LINE>if (includesRequestType) {<NEW_LINE>// additional request type specific metric datum<NEW_LINE>Dimension requestDimension = new Dimension().withName(Dimensions.RequestType.name()).withValue(requestType(req));<NEW_LINE>final MetricDatum second = newMetricDatum(first, metricDimension, requestDimension);<NEW_LINE>result.add(second);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
()).withValue(metricName);
1,696,467
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.decrypt_bip38_private_key_activity);<NEW_LINE>mbwManager = MbwManager.getInstance(this);<NEW_LINE>// Get parameters<NEW_LINE>encryptedPrivateKey = getIntent().getStringExtra("encryptedPrivateKey");<NEW_LINE>// Decode the BIP38 key<NEW_LINE>Bip38PrivateKey bip38Privatekey = Bip38.parseBip38PrivateKey(encryptedPrivateKey);<NEW_LINE>if (bip38Privatekey == null) {<NEW_LINE>new Toaster(this).toast(R.string.unrecognized_format, true);<NEW_LINE>finish();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Button btDecrypt = findViewById(R.id.btDecrypt);<NEW_LINE>btDecrypt.setEnabled(false);<NEW_LINE>btDecrypt.setOnClickListener(v -> startKeyStretching());<NEW_LINE>passwordEdit = findViewById(R.id.password);<NEW_LINE>passwordEdit.addTextChangedListener(passwordWatcher);<NEW_LINE>checkboxShowPassword = findViewById(R.id.showPassword);<NEW_LINE>checkboxShowPassword.setOnCheckedChangeListener((compoundButton, b) -> setPasswordHideShow(checkboxShowPassword.isChecked()));<NEW_LINE>if (savedInstanceState != null) {<NEW_LINE>String <MASK><NEW_LINE>if (password != null) {<NEW_LINE>passwordEdit.setText(password);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
password = savedInstanceState.getString("password");
478,737
public void call(FullAccessIntArrPointer dst, int stride, ReadOnlyIntArrPointer above, ReadOnlyIntArrPointer left) {<NEW_LINE>int i;<NEW_LINE>// outer border from bottom-left<NEW_LINE>FullAccessIntArrPointer border = new FullAccessIntArrPointer(32 + 32 - 1);<NEW_LINE>// to top-right<NEW_LINE>PositionableIntArrPointer pLeft = PositionableIntArrPointer.makePositionable(left);<NEW_LINE>pLeft.incBy(bs);<NEW_LINE>// dst(bs, bs - 2)[0], i.e., border starting at bottom-left<NEW_LINE>for (i = 0; i < bs - 2; ++i) {<NEW_LINE>border.setAndInc(avg3(pLeft.getRel(3 - i), pLeft.getRel(2 - i), pLeft.getRel(1 - i)));<NEW_LINE>}<NEW_LINE>border.setAndInc(avg3(above.getRel(-1), left.get(), left.getRel(1)));<NEW_LINE>border.setAndInc(avg3(left.get(), above.getRel(-1), above.get()));<NEW_LINE>border.setAndInc(avg3(above.getRel(-1), above.get(), above.getRel(1)));<NEW_LINE>// dst[0][2, size), i.e., remaining top border ascending<NEW_LINE>for (i = 0; i < bs - 2; ++i) {<NEW_LINE>border.setAndInc(avg3(above.getRel(i), above.getRel(i + 1), above.getRel(i + 2)));<NEW_LINE>}<NEW_LINE>border.rewind();<NEW_LINE>for (i = 0; i < bs; ++i) {<NEW_LINE>dst.memcopyin(i * stride, border, <MASK><NEW_LINE>}<NEW_LINE>}
bs - 1 - i, bs);
1,292,889
public static String download(FilePath folder, String fileName) throws IOException {<NEW_LINE>// local<NEW_LINE>if (folder.getFileSystem() instanceof LocalFileSystem) {<NEW_LINE>return folder.getPathStr();<NEW_LINE>}<NEW_LINE>File localConfDir = new File(System.getProperty("java.io.tmpdir"), FileUtils.getRandomFilename(""));<NEW_LINE>String scheme = folder.getPath().toUri().getScheme();<NEW_LINE>if (!localConfDir.mkdir()) {<NEW_LINE>throw new RuntimeException(<MASK><NEW_LINE>}<NEW_LINE>try (FileOutputStream outputStream = new FileOutputStream(Paths.get(localConfDir.getPath(), fileName).toFile())) {<NEW_LINE>// http<NEW_LINE>if (scheme != null && (scheme.equalsIgnoreCase("http") || scheme.equalsIgnoreCase("https"))) {<NEW_LINE>try (HttpFileSplitReader reader = new HttpFileSplitReader(new Path(folder.getPath(), fileName).toString())) {<NEW_LINE>long fileLen = reader.getFileLength();<NEW_LINE>reader.open(null, 0, fileLen);<NEW_LINE>int offset = 0;<NEW_LINE>byte[] buffer = new byte[1024];<NEW_LINE>while (offset < fileLen) {<NEW_LINE>int len = reader.read(buffer, offset, 1024);<NEW_LINE>outputStream.write(buffer, offset, len);<NEW_LINE>offset += len;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// file system<NEW_LINE>try (FSDataInputStream inputStream = folder.getFileSystem().open(new Path(folder.getPath(), fileName))) {<NEW_LINE>IOUtils.copy(inputStream, outputStream);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return localConfDir.getAbsolutePath();<NEW_LINE>}<NEW_LINE>}
"Could not create the dir " + localConfDir.getAbsolutePath());
465,679
private void findSruExecutedFiles(String sruDb, Content dataSource) {<NEW_LINE>org.sleuthkit.autopsy.casemodule.services.FileManager fileManager = currentCase.getServices().getFileManager();<NEW_LINE>String sqlStatement = // NON-NLS<NEW_LINE>"SELECT DISTINCT SUBSTR(LTRIM(IdBlob, '\\Device\\HarddiskVolume'), INSTR(LTRIM(IdBlob, '\\Device\\HarddiskVolume'), '\\')) " + " application_name, idBlob source_name FROM SruDbIdMapTable WHERE idType = 0 AND idBlob NOT LIKE '!!%'";<NEW_LINE>try (// NON-NLS<NEW_LINE>SQLiteDBConnect tempdbconnect = new <MASK><NEW_LINE>ResultSet resultSet = tempdbconnect.executeQry(sqlStatement)) {<NEW_LINE>while (resultSet.next()) {<NEW_LINE>if (context.dataSourceIngestIsCancelled()) {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.INFO, "Cancelled SRU Artifact Creation.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// NON-NLS<NEW_LINE>String applicationName = resultSet.getString("application_name");<NEW_LINE>// NON-NLS<NEW_LINE>String sourceName = resultSet.getString("source_name");<NEW_LINE>String normalizePathName = FilenameUtils.normalize(applicationName, true);<NEW_LINE>String fileName = FilenameUtils.getName(normalizePathName);<NEW_LINE>String filePath = FilenameUtils.getPath(normalizePathName);<NEW_LINE>if (fileName.contains(" [")) {<NEW_LINE>fileName = fileName.substring(0, fileName.indexOf(" ["));<NEW_LINE>}<NEW_LINE>List<AbstractFile> sourceFiles;<NEW_LINE>try {<NEW_LINE>// NON-NLS<NEW_LINE>sourceFiles = fileManager.findFiles(dataSource, fileName, filePath);<NEW_LINE>for (AbstractFile sourceFile : sourceFiles) {<NEW_LINE>if (sourceFile.getParentPath().endsWith(filePath)) {<NEW_LINE>applicationFilesFound.put(sourceName.toLowerCase(), sourceFile);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (TskCoreException ex) {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.WARNING, String.format("Error finding actual file %s. file may not exist", normalizePathName));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (SQLException ex) {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.WARNING, "Error while trying to read into a sqlite db.", ex);<NEW_LINE>}<NEW_LINE>}
SQLiteDBConnect("org.sqlite.JDBC", "jdbc:sqlite:" + sruDb);
976,238
public long insert(@NonNull SignalServiceEnvelope envelope) {<NEW_LINE>Optional<Long> messageId = find(envelope);<NEW_LINE>if (messageId.isPresent()) {<NEW_LINE>return -1;<NEW_LINE>} else {<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE>values.put(TYPE, envelope.getType());<NEW_LINE>values.put(SOURCE_UUID, envelope.getSourceUuid().orElse(null));<NEW_LINE>values.put(SOURCE_E164, envelope.getSourceE164().orElse(null));<NEW_LINE>values.put(DEVICE_ID, envelope.getSourceDevice());<NEW_LINE>values.put(LEGACY_MSG, envelope.hasLegacyMessage() ? Base64.encodeBytes(envelope.getLegacyMessage()) : "");<NEW_LINE>values.put(CONTENT, envelope.hasContent() ? Base64.encodeBytes(envelope.getContent()) : "");<NEW_LINE>values.put(TIMESTAMP, envelope.getTimestamp());<NEW_LINE>values.put(SERVER_RECEIVED_TIMESTAMP, envelope.getServerReceivedTimestamp());<NEW_LINE>values.put(<MASK><NEW_LINE>values.put(SERVER_GUID, envelope.getServerGuid());<NEW_LINE>return databaseHelper.getSignalWritableDatabase().insert(TABLE_NAME, null, values);<NEW_LINE>}<NEW_LINE>}
SERVER_DELIVERED_TIMESTAMP, envelope.getServerDeliveredTimestamp());
1,593,412
private boolean basicReadJandex(TargetsTableImpl targetData) {<NEW_LINE>String methodName = "readJandex";<NEW_LINE><MASK><NEW_LINE>if (logger.isLoggable(Level.FINER)) {<NEW_LINE>logger.logp(Level.FINER, CLASS_NAME, methodName, "Container [ " + getName() + " ] Jandex File [ " + getCoreDataLink() + " ]");<NEW_LINE>}<NEW_LINE>File coreDataFile = getCoreDataFile();<NEW_LINE>String coreDataPath = coreDataFile.getPath();<NEW_LINE>boolean didRead;<NEW_LINE>try {<NEW_LINE>SparseIndex sparseIndex = Jandex_Utils.basicReadSparseIndex(coreDataPath);<NEW_LINE>targetData.transfer(sparseIndex);<NEW_LINE>didRead = true;<NEW_LINE>} catch (IOException e) {<NEW_LINE>List<TargetCache_ParseError> errors = Collections.emptyList();<NEW_LINE>readError(coreDataFile, e, errors);<NEW_LINE>didRead = false;<NEW_LINE>}<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>long readDuration = addReadTime(readStart, "Jandex");<NEW_LINE>// System.out.println("Sparse jandex cache read [ " + getName() + " ] [ " + readDuration + " ]");<NEW_LINE>return didRead;<NEW_LINE>}
long readStart = System.nanoTime();
1,569,374
public View generateView(@NonNull final BaseActivity activity, @Nullable final Integer textColor, @Nullable final Float textSize, final boolean showLinkButtons) {<NEW_LINE>final LinearLayout outerLayout = new LinearLayout(activity);<NEW_LINE>final int paddingPx = General.dpToPixels(activity, 6);<NEW_LINE>outerLayout.setPadding(paddingPx, 0, paddingPx, 0);<NEW_LINE>final TextView number = new TextView(activity);<NEW_LINE>// noinspection SetTextI18n<NEW_LINE>number.setText(mListIndex + ". ");<NEW_LINE>if (textSize != null) {<NEW_LINE>number.setTextSize(textSize);<NEW_LINE>}<NEW_LINE>outerLayout.addView(number);<NEW_LINE>if (mElements.size() == 1) {<NEW_LINE>outerLayout.addView(mElements.get(0).generateView(activity<MASK><NEW_LINE>} else {<NEW_LINE>outerLayout.addView(new BodyElementVerticalSequence(mElements).generateView(activity, textColor, textSize, showLinkButtons));<NEW_LINE>}<NEW_LINE>General.setLayoutMatchWidthWrapHeight(outerLayout);<NEW_LINE>return outerLayout;<NEW_LINE>}
, textColor, textSize, showLinkButtons));
1,167,479
private static void initWindows2AndroidMap() {<NEW_LINE>windowsToAndroidEventMap.<MASK><NEW_LINE>windowsToAndroidEventMap.put(0x09, KeyEvent.KEYCODE_TAB);<NEW_LINE>windowsToAndroidEventMap.put(0x0C, KeyEvent.KEYCODE_CLEAR);<NEW_LINE>windowsToAndroidEventMap.put(0x0D, KeyEvent.KEYCODE_ENTER);<NEW_LINE>windowsToAndroidEventMap.put(0x12, KeyEvent.KEYCODE_MENU);<NEW_LINE>windowsToAndroidEventMap.put(0x13, KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE);<NEW_LINE>windowsToAndroidEventMap.put(0x20, KeyEvent.KEYCODE_SPACE);<NEW_LINE>windowsToAndroidEventMap.put(0x21, KeyEvent.KEYCODE_PAGE_UP);<NEW_LINE>windowsToAndroidEventMap.put(0x22, KeyEvent.KEYCODE_PAGE_DOWN);<NEW_LINE>windowsToAndroidEventMap.put(0x25, KeyEvent.KEYCODE_DPAD_LEFT);<NEW_LINE>windowsToAndroidEventMap.put(0x26, KeyEvent.KEYCODE_DPAD_UP);<NEW_LINE>windowsToAndroidEventMap.put(0x27, KeyEvent.KEYCODE_DPAD_RIGHT);<NEW_LINE>windowsToAndroidEventMap.put(0x28, KeyEvent.KEYCODE_DPAD_DOWN);<NEW_LINE>windowsToAndroidEventMap.put(0x29, KeyEvent.KEYCODE_BUTTON_SELECT);<NEW_LINE>int j = 0;<NEW_LINE>for (int i = 0x30; i <= 0x3A; i++, j++) windowsToAndroidEventMap.put(i, KeyEvent.KEYCODE_0 + j);<NEW_LINE>j = 0;<NEW_LINE>for (int i = 0x41; i <= 0x5A; i++, j++) windowsToAndroidEventMap.put(i, KeyEvent.KEYCODE_A + j);<NEW_LINE>windowsToAndroidEventMap.put(0x6A, KeyEvent.KEYCODE_STAR);<NEW_LINE>windowsToAndroidEventMap.put(0x6B, KeyEvent.KEYCODE_PLUS);<NEW_LINE>windowsToAndroidEventMap.put(0x6D, KeyEvent.KEYCODE_MINUS);<NEW_LINE>windowsToAndroidEventMap.put(0x10, KeyEvent.KEYCODE_SHIFT_LEFT);<NEW_LINE>windowsToAndroidEventMap.put(0xA6, KeyEvent.KEYCODE_BACK);<NEW_LINE>windowsToAndroidEventMap.put(0xAA, KeyEvent.KEYCODE_SEARCH);<NEW_LINE>windowsToAndroidEventMap.put(0xAE, KeyEvent.KEYCODE_VOLUME_DOWN);<NEW_LINE>windowsToAndroidEventMap.put(0xAF, KeyEvent.KEYCODE_VOLUME_UP);<NEW_LINE>windowsToAndroidEventMap.put(0xBA, KeyEvent.KEYCODE_SEMICOLON);<NEW_LINE>windowsToAndroidEventMap.put(0xBC, KeyEvent.KEYCODE_COMMA);<NEW_LINE>windowsToAndroidEventMap.put(0xBE, KeyEvent.KEYCODE_PERIOD);<NEW_LINE>windowsToAndroidEventMap.put(0xBF, KeyEvent.KEYCODE_SLASH);<NEW_LINE>windowsToAndroidEventMap.put(0xDB, KeyEvent.KEYCODE_LEFT_BRACKET);<NEW_LINE>windowsToAndroidEventMap.put(0xDC, KeyEvent.KEYCODE_BACKSLASH);<NEW_LINE>windowsToAndroidEventMap.put(0xDD, KeyEvent.KEYCODE_RIGHT_BRACKET);<NEW_LINE>windowsToAndroidEventMap.put(0xDE, KeyEvent.KEYCODE_APOSTROPHE);<NEW_LINE>// Characters which can't be mapped<NEW_LINE>androidToWindowsEventMap.put(KeyEvent.KEYCODE_GRAVE + 0xFE, KeyEvent.KEYCODE_GRAVE);<NEW_LINE>androidToWindowsEventMap.put(KeyEvent.KEYCODE_AT + 0xFE, KeyEvent.KEYCODE_AT);<NEW_LINE>androidToWindowsEventMap.put(KeyEvent.KEYCODE_POUND + 0xFE, KeyEvent.KEYCODE_POUND);<NEW_LINE>androidToWindowsEventMap.put(KeyEvent.KEYCODE_ALT_LEFT + 0xFE, KeyEvent.KEYCODE_ALT_LEFT);<NEW_LINE>androidToWindowsEventMap.put(KeyEvent.KEYCODE_EQUALS + 0xFE, KeyEvent.KEYCODE_EQUALS);<NEW_LINE>}
put(0x08, KeyEvent.KEYCODE_DEL);
1,654,491
private static void addVoidPointersAsSymbols(String structureName, long structureAddress, StructureReader structureReader, IProcess process) throws DataUnavailableException, CorruptDataException {<NEW_LINE>if (structureAddress == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<String> voidFields = getVoidPointerFieldsFromStructure(structureReader, structureName);<NEW_LINE>if (voidFields == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Format the hex and structure name the same as the rest of DDR.<NEW_LINE>int paddingSize = process.bytesPerPointer() * 2;<NEW_LINE>String formatString = "[!%s 0x%0" + paddingSize + "X->%s]";<NEW_LINE>for (String field : voidFields) {<NEW_LINE>if (ignoredSymbols.contains(structureName + "." + field)) {<NEW_LINE>// Ignore this field, it's not a function.<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>long functionAddress = followPointerFromStructure(structureName, structureAddress, field, structureReader, process);<NEW_LINE>if (functionAddress == 0) {<NEW_LINE>// Skip null pointers.<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Lower case the structure name to match the rest of the DDR !<struct> commands.<NEW_LINE>String symName = String.format(formatString, structureName.toLowerCase(), structureAddress, field);<NEW_LINE>if (functionAddress == 0) {<NEW_LINE>// Null pointer, possibly unset or no longer used.<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (addSymbols) {<NEW_LINE>IModule module = getModuleForInstructionAddress(process, functionAddress);<NEW_LINE>if (module == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>boolean found = false;<NEW_LINE>// Don't override/duplicate symbols we've already seen.<NEW_LINE>for (ISymbol sym : module.getSymbols()) {<NEW_LINE>if (sym.getAddress() == functionAddress) {<NEW_LINE>Logger logger = <MASK><NEW_LINE>logger.log(FINER, "DDRSymbolFinder: Found exact match with " + sym.toString() + " not adding.");<NEW_LINE>found = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!found) {<NEW_LINE>Logger logger = Logger.getLogger(LoggerNames.LOGGER_STRUCTURE_READER);<NEW_LINE>logger.log(FINER, "DDRSymbolFinder: Adding new DDR symbol " + symName);<NEW_LINE>SymbolUtil.addDDRSymbolToModule(module, "[" + field + "]", symName, functionAddress);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Logger.getLogger(LoggerNames.LOGGER_STRUCTURE_READER);
284,770
public static DescribeAntChainsResponse unmarshall(DescribeAntChainsResponse describeAntChainsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAntChainsResponse.setRequestId(_ctx.stringValue("DescribeAntChainsResponse.RequestId"));<NEW_LINE>Result result = new Result();<NEW_LINE>result.setIsExist(_ctx.booleanValue("DescribeAntChainsResponse.Result.IsExist"));<NEW_LINE>Pagination pagination = new Pagination();<NEW_LINE>pagination.setPageSize(_ctx.integerValue("DescribeAntChainsResponse.Result.Pagination.PageSize"));<NEW_LINE>pagination.setPageNumber(_ctx.integerValue("DescribeAntChainsResponse.Result.Pagination.PageNumber"));<NEW_LINE>pagination.setTotalCount<MASK><NEW_LINE>result.setPagination(pagination);<NEW_LINE>List<AntChainsItem> antChains = new ArrayList<AntChainsItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeAntChainsResponse.Result.AntChains.Length"); i++) {<NEW_LINE>AntChainsItem antChainsItem = new AntChainsItem();<NEW_LINE>antChainsItem.setExpireTime(_ctx.longValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].ExpireTime"));<NEW_LINE>antChainsItem.setCreateTime(_ctx.longValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].CreateTime"));<NEW_LINE>antChainsItem.setChainType(_ctx.stringValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].ChainType"));<NEW_LINE>antChainsItem.setMemberStatus(_ctx.stringValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].MemberStatus"));<NEW_LINE>antChainsItem.setMerkleTreeSuit(_ctx.stringValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].MerkleTreeSuit"));<NEW_LINE>antChainsItem.setIsAdmin(_ctx.booleanValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].IsAdmin"));<NEW_LINE>antChainsItem.setAntChainName(_ctx.stringValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].AntChainName"));<NEW_LINE>antChainsItem.setRegionId(_ctx.stringValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].RegionId"));<NEW_LINE>antChainsItem.setNetwork(_ctx.stringValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].Network"));<NEW_LINE>antChainsItem.setTlsAlgo(_ctx.stringValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].TlsAlgo"));<NEW_LINE>antChainsItem.setVersion(_ctx.stringValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].Version"));<NEW_LINE>antChainsItem.setCipherSuit(_ctx.stringValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].CipherSuit"));<NEW_LINE>antChainsItem.setResourceSize(_ctx.stringValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].ResourceSize"));<NEW_LINE>antChainsItem.setNodeNum(_ctx.integerValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].NodeNum"));<NEW_LINE>antChainsItem.setAntChainId(_ctx.stringValue("DescribeAntChainsResponse.Result.AntChains[" + i + "].AntChainId"));<NEW_LINE>antChains.add(antChainsItem);<NEW_LINE>}<NEW_LINE>result.setAntChains(antChains);<NEW_LINE>describeAntChainsResponse.setResult(result);<NEW_LINE>return describeAntChainsResponse;<NEW_LINE>}
(_ctx.integerValue("DescribeAntChainsResponse.Result.Pagination.TotalCount"));
105,259
public boolean actPrimary(Platform server, LocalConfiguration config, Player player, LocalSession session, Location clicked, @Nullable Direction face) {<NEW_LINE>World world = (World) clicked.getExtent();<NEW_LINE>BlockVector3 origin = clicked.toVector().toBlockPoint();<NEW_LINE>BlockType initialType = world.getBlock(origin).getBlockType();<NEW_LINE>if (initialType.getMaterial().isAir()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (initialType == BlockTypes.BEDROCK && !player.canDestroyBedrock()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>try (EditSession editSession = session.createEditSession(player)) {<NEW_LINE>editSession.getSurvivalExtent().setToolUse(config.superPickaxeManyDrop);<NEW_LINE>try {<NEW_LINE>recurse(server, editSession, world, clicked.toVector().toBlockPoint(), clicked.toVector().toBlockPoint(), range, initialType, new HashSet<>());<NEW_LINE>} catch (MaxChangedBlocksException e) {<NEW_LINE>player.printError<MASK><NEW_LINE>} finally {<NEW_LINE>session.remember(editSession);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
(TranslatableComponent.of("worldedit.tool.max-block-changes"));
1,498,757
public void deserialize(ByteBuffer buffer) {<NEW_LINE>name = ReadWriteIOUtils.readString(buffer);<NEW_LINE>isAligned = ReadWriteIOUtils.readBool(buffer);<NEW_LINE>// measurements<NEW_LINE>int size = ReadWriteIOUtils.readInt(buffer);<NEW_LINE>measurements = new String[size];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>measurements[i<MASK><NEW_LINE>}<NEW_LINE>// datatypes<NEW_LINE>size = ReadWriteIOUtils.readInt(buffer);<NEW_LINE>dataTypes = new TSDataType[size];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>dataTypes[i] = TSDataType.values()[ReadWriteIOUtils.readInt(buffer)];<NEW_LINE>}<NEW_LINE>// encodings<NEW_LINE>size = ReadWriteIOUtils.readInt(buffer);<NEW_LINE>encodings = new TSEncoding[size];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>encodings[i] = TSEncoding.values()[ReadWriteIOUtils.readInt(buffer)];<NEW_LINE>}<NEW_LINE>// compressor<NEW_LINE>size = ReadWriteIOUtils.readInt(buffer);<NEW_LINE>compressors = new CompressionType[size];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>compressors[i] = CompressionType.values()[ReadWriteIOUtils.readInt(buffer)];<NEW_LINE>}<NEW_LINE>this.index = buffer.getLong();<NEW_LINE>}
] = ReadWriteIOUtils.readString(buffer);
1,092,845
private boolean run(final Namespace options, final Target target, final PrintStream out, final PrintStream err, final String username, final boolean json, final BufferedReader stdin) throws Exception {<NEW_LINE>final HeliosClient client = Utils.getClient(target, err, username, options);<NEW_LINE>if (client == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final int result = run(options, client, out, json, stdin);<NEW_LINE>return result == 0;<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>final Throwable cause = e.getCause();<NEW_LINE>// if target is a domain, print message like<NEW_LINE>// "Request timed out to master in ash.spotify.net (http://ash2-helios-a4.ash2.spotify.net)",<NEW_LINE>// otherwise "Request timed out to master http://ash2-helios-a4.ash2.spotify.net:5800"<NEW_LINE>if (cause instanceof TimeoutException) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>throw new RuntimeException(cause);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>} finally {<NEW_LINE>client.close();<NEW_LINE>}<NEW_LINE>}
err.println("Request timed out to master in " + target);
1,161,983
public void write(JsonWriter writer, Session value) throws IOException {<NEW_LINE>if (value == null) {<NEW_LINE>writer.nullValue();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>writer.beginObject();<NEW_LINE>if (value.getSessionId() != null) {<NEW_LINE>writer.name("sid").value(value.getSessionId().toString());<NEW_LINE>}<NEW_LINE>if (value.getDistinctId() != null) {<NEW_LINE>writer.name("did").value(value.getDistinctId());<NEW_LINE>}<NEW_LINE>if (value.getInit() != null) {<NEW_LINE>writer.name("init").value(value.getInit());<NEW_LINE>}<NEW_LINE>final Date started = value.getStarted();<NEW_LINE>if (started != null) {<NEW_LINE>writer.name("started").value(DateUtils.getTimestamp(started));<NEW_LINE>}<NEW_LINE>final Session.<MASK><NEW_LINE>if (status != null) {<NEW_LINE>writer.name("status").value(status.name().toLowerCase(Locale.ROOT));<NEW_LINE>}<NEW_LINE>if (value.getSequence() != null) {<NEW_LINE>writer.name("seq").value(value.getSequence());<NEW_LINE>}<NEW_LINE>int errorCount = value.errorCount();<NEW_LINE>if (errorCount > 0) {<NEW_LINE>writer.name("errors").value(errorCount);<NEW_LINE>}<NEW_LINE>if (value.getDuration() != null) {<NEW_LINE>writer.name("duration").value(value.getDuration());<NEW_LINE>}<NEW_LINE>if (value.getTimestamp() != null) {<NEW_LINE>writer.name("timestamp").value(DateUtils.getTimestamp(value.getTimestamp()));<NEW_LINE>}<NEW_LINE>boolean hasInitAttrs = false;<NEW_LINE>hasInitAttrs = initAttrs(writer, hasInitAttrs);<NEW_LINE>writer.name("release").value(value.getRelease());<NEW_LINE>if (value.getEnvironment() != null) {<NEW_LINE>hasInitAttrs = initAttrs(writer, hasInitAttrs);<NEW_LINE>writer.name("environment").value(value.getEnvironment());<NEW_LINE>}<NEW_LINE>if (value.getIpAddress() != null) {<NEW_LINE>hasInitAttrs = initAttrs(writer, hasInitAttrs);<NEW_LINE>writer.name("ip_address").value(value.getIpAddress());<NEW_LINE>}<NEW_LINE>if (value.getUserAgent() != null) {<NEW_LINE>hasInitAttrs = initAttrs(writer, hasInitAttrs);<NEW_LINE>writer.name("user_agent").value(value.getUserAgent());<NEW_LINE>}<NEW_LINE>if (hasInitAttrs) {<NEW_LINE>writer.endObject();<NEW_LINE>}<NEW_LINE>writer.endObject();<NEW_LINE>}
State status = value.getStatus();
963,709
final BatchDeleteDelegationByAssessmentResult executeBatchDeleteDelegationByAssessment(BatchDeleteDelegationByAssessmentRequest batchDeleteDelegationByAssessmentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchDeleteDelegationByAssessmentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchDeleteDelegationByAssessmentRequest> request = null;<NEW_LINE>Response<BatchDeleteDelegationByAssessmentResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchDeleteDelegationByAssessmentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchDeleteDelegationByAssessmentRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "AuditManager");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<BatchDeleteDelegationByAssessmentResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchDeleteDelegationByAssessmentResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchDeleteDelegationByAssessment");
875,259
public void onBindViewHolder(HistoryHolder holder, int position) {<NEW_LINE>if (null == mLazyList) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>GalleryInfo gi = mLazyList.get(position);<NEW_LINE>holder.thumb.load(EhCacheKeyFactory.getThumbKey(gi.gid), gi.thumb);<NEW_LINE>holder.title.setText<MASK><NEW_LINE>holder.uploader.setText(gi.uploader);<NEW_LINE>holder.rating.setRating(gi.rating);<NEW_LINE>TextView category = holder.category;<NEW_LINE>String newCategoryText = EhUtils.getCategory(gi.category);<NEW_LINE>if (!newCategoryText.equals(category.getText())) {<NEW_LINE>category.setText(newCategoryText);<NEW_LINE>category.setBackgroundColor(EhUtils.getCategoryColor(gi.category));<NEW_LINE>}<NEW_LINE>holder.posted.setText(gi.posted);<NEW_LINE>holder.simpleLanguage.setText(gi.simpleLanguage);<NEW_LINE>// Update transition name<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {<NEW_LINE>long gid = gi.gid;<NEW_LINE>ViewCompat.setTransitionName(holder.thumb, TransitionNameFactory.getThumbTransitionName(gid));<NEW_LINE>}<NEW_LINE>}
(EhUtils.getSuitableTitle(gi));
1,162,417
private List<AnalyticJob> readApps(URL url) throws IOException, AuthenticationException {<NEW_LINE>List<AnalyticJob> appList = new ArrayList<AnalyticJob>();<NEW_LINE>JsonNode rootNode = readJsonNode(url);<NEW_LINE>JsonNode apps = rootNode.path("apps").path("app");<NEW_LINE>for (JsonNode app : apps) {<NEW_LINE>String appId = app.get("id").getValueAsText();<NEW_LINE>// When called first time after launch, hit the DB and avoid duplicated analytic jobs that have been analyzed<NEW_LINE>// before.<NEW_LINE>if (_lastTime > _fetchStartTime || (_lastTime == _fetchStartTime && AppResult.find.byId(appId) == null)) {<NEW_LINE>String user = app.get("user").getValueAsText();<NEW_LINE>String name = app.get("name").getValueAsText();<NEW_LINE>String queueName = app.get("queue").getValueAsText();<NEW_LINE>String trackingUrl = app.get("trackingUrl") != null ? app.get(<MASK><NEW_LINE>long startTime = app.get("startedTime").getLongValue();<NEW_LINE>long finishTime = app.get("finishedTime").getLongValue();<NEW_LINE>ApplicationType type = ElephantContext.instance().getApplicationTypeForName(app.get("applicationType").getValueAsText());<NEW_LINE>// If the application type is supported<NEW_LINE>if (type != null) {<NEW_LINE>AnalyticJob analyticJob = new AnalyticJob();<NEW_LINE>analyticJob.setAppId(appId).setAppType(type).setUser(user).setName(name).setQueueName(queueName).setTrackingUrl(trackingUrl).setStartTime(startTime).setFinishTime(finishTime);<NEW_LINE>appList.add(analyticJob);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return appList;<NEW_LINE>}
"trackingUrl").getValueAsText() : null;
1,825,431
public static void validatePMMLVsSchema(PMML pmml, InputSchema schema) {<NEW_LINE>List<Model> models = pmml.getModels();<NEW_LINE>Preconditions.checkArgument(models.size() == 1, "Should have exactly one model, but had %s", models.size());<NEW_LINE>Model model = models.get(0);<NEW_LINE>MiningFunction function = model.getMiningFunction();<NEW_LINE>if (schema.isClassification()) {<NEW_LINE>Preconditions.checkArgument(function == MiningFunction.CLASSIFICATION, "Expected classification function type but got %s", function);<NEW_LINE>} else {<NEW_LINE>Preconditions.checkArgument(function == MiningFunction.REGRESSION, "Expected regression function type but got %s", function);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>Preconditions.checkArgument(schema.getFeatureNames().equals(AppPMMLUtils.getFeatureNames(dictionary)), "Feature names in schema don't match names in PMML");<NEW_LINE>MiningSchema miningSchema = model.getMiningSchema();<NEW_LINE>Preconditions.checkArgument(schema.getFeatureNames().equals(AppPMMLUtils.getFeatureNames(miningSchema)));<NEW_LINE>Integer pmmlIndex = AppPMMLUtils.findTargetIndex(miningSchema);<NEW_LINE>if (schema.hasTarget()) {<NEW_LINE>int schemaIndex = schema.getTargetFeatureIndex();<NEW_LINE>Preconditions.checkArgument(pmmlIndex != null && schemaIndex == pmmlIndex, "Configured schema expects target at index %s, but PMML has target at index %s", schemaIndex, pmmlIndex);<NEW_LINE>} else {<NEW_LINE>Preconditions.checkArgument(pmmlIndex == null);<NEW_LINE>}<NEW_LINE>}
DataDictionary dictionary = pmml.getDataDictionary();
1,336,727
public static Bytes encryptMsgEip8(final Bytes message, final SECPPublicKey remoteKey) throws InvalidCipherTextException {<NEW_LINE>final ECIESEncryptionEngine engine = ECIESEncryptionEngine.forEncryption(remoteKey);<NEW_LINE>// Do the encryption.<NEW_LINE>final Bytes bytes = addPadding(message);<NEW_LINE>final int size = bytes.size() + ECIESEncryptionEngine.ENCRYPTION_OVERHEAD;<NEW_LINE>final byte[] sizePrefix = { (byte) (size >>> 8), (byte) size };<NEW_LINE>final Bytes encrypted = engine.encrypt(bytes, sizePrefix);<NEW_LINE>final Bytes iv = engine.getIv();<NEW_LINE>final SECPPublicKey ephPubKey = engine.getEphPubKey();<NEW_LINE>// Create the output message by concatenating the ephemeral public key (prefixed with<NEW_LINE>// 0x04 to designate uncompressed), IV, and encrypted bytes.<NEW_LINE>final MutableBytes answer = MutableBytes.create(3 + ECIESHandshaker.PUBKEY_LENGTH + IV_SIZE + encrypted.size());<NEW_LINE>answer.set(0, sizePrefix[0]);<NEW_LINE>answer.set(1, sizePrefix[1]);<NEW_LINE>// Set the first byte as 0x04 to specify it's an uncompressed key.<NEW_LINE>answer.set(2, (byte) 0x04);<NEW_LINE>int offset = 0;<NEW_LINE>ephPubKey.getEncodedBytes().copyTo(answer, offset += 3);<NEW_LINE>iv.copyTo(answer, offset += ECIESHandshaker.PUBKEY_LENGTH);<NEW_LINE>encrypted.<MASK><NEW_LINE>return answer;<NEW_LINE>}
copyTo(answer, offset + IV_SIZE);
392,223
private void animatingZoomInThread(int zoomStart, double zoomFloatStart, int zoomEnd, double zoomFloatEnd, float animationTime, boolean notifyListener) {<NEW_LINE>try {<NEW_LINE>isAnimatingZoom = true;<NEW_LINE>// could be 0 ]-0.5,0.5], -1 ]-1,0], 1 ]0, 1]<NEW_LINE>int threshold = ((int) (zoomFloatEnd * 2));<NEW_LINE>double beginZoom = zoomStart + zoomFloatStart;<NEW_LINE>double endZoom = zoomEnd + zoomFloatEnd;<NEW_LINE>animationTime *= <MASK><NEW_LINE>// AccelerateInterpolator interpolator = new AccelerateInterpolator(1);<NEW_LINE>LinearInterpolator interpolator = new LinearInterpolator();<NEW_LINE>long timeMillis = SystemClock.uptimeMillis();<NEW_LINE>float normalizedTime;<NEW_LINE>while (!stopped) {<NEW_LINE>normalizedTime = (SystemClock.uptimeMillis() - timeMillis) / animationTime;<NEW_LINE>if (normalizedTime > 1f) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>float interpolation = interpolator.getInterpolation(normalizedTime);<NEW_LINE>double curZoom = interpolation * (endZoom - beginZoom) + beginZoom;<NEW_LINE>int baseZoom = (int) Math.round(curZoom - 0.5 * threshold);<NEW_LINE>double zaAnimate = curZoom - baseZoom;<NEW_LINE>tileView.zoomToAnimate(baseZoom, zaAnimate, notifyListener);<NEW_LINE>try {<NEW_LINE>Thread.sleep(DEFAULT_SLEEP_TO_REDRAW);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>stopped = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>tileView.setFractionalZoom(zoomEnd, zoomFloatEnd, notifyListener);<NEW_LINE>} finally {<NEW_LINE>isAnimatingZoom = false;<NEW_LINE>}<NEW_LINE>}
Math.abs(endZoom - beginZoom);
919,809
private void loadNode476() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ServerConfiguration_CertificateGroups_DefaultHttpsGroup_TrustList_GetPosition_OutputArguments, new QualifiedName(0, "OutputArguments"), new LocalizedText("en", "OutputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.Argument, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.ServerConfiguration_CertificateGroups_DefaultHttpsGroup_TrustList_GetPosition_OutputArguments, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ServerConfiguration_CertificateGroups_DefaultHttpsGroup_TrustList_GetPosition_OutputArguments, Identifiers.HasProperty, Identifiers.ServerConfiguration_CertificateGroups_DefaultHttpsGroup_TrustList_GetPosition.expanded(), false));<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<ListOfExtensionObject xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\"><ExtensionObject><TypeId><Identifier>i=297</Identifier> </TypeId><Body><Argument><Name>Position</Name><DataType><Identifier>i=9</Identifier> </DataType><ValueRank>-1</ValueRank><ArrayDimensions/> </Argument> </Body> </ExtensionObject> </ListOfExtensionObject>");<NEW_LINE>String xml = sb.toString();<NEW_LINE>OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).setInput(new StringReader(xml));<NEW_LINE><MASK><NEW_LINE>DataValue value = new DataValue(new Variant(o));<NEW_LINE>node.setValue(value);<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
Object o = decoder.readVariantValue();
1,358,254
public io.kubernetes.client.proto.V1.PreferredSchedulingTerm buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1.PreferredSchedulingTerm result = new io.kubernetes.client.<MASK><NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>to_bitField0_ |= 0x00000001;<NEW_LINE>}<NEW_LINE>result.weight_ = weight_;<NEW_LINE>if (((from_bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>to_bitField0_ |= 0x00000002;<NEW_LINE>}<NEW_LINE>if (preferenceBuilder_ == null) {<NEW_LINE>result.preference_ = preference_;<NEW_LINE>} else {<NEW_LINE>result.preference_ = preferenceBuilder_.build();<NEW_LINE>}<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
proto.V1.PreferredSchedulingTerm(this);
1,432,805
public ListDomainsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListDomainsResult listDomainsResult = new ListDomainsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return listDomainsResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("DomainSummaries", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listDomainsResult.setDomainSummaries(new ListUnmarshaller<DomainSummary>(DomainSummaryJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listDomainsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return listDomainsResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,837,126
private void resumeScreenLock(boolean force) {<NEW_LINE>KeyguardManager keyguardManager = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);<NEW_LINE>assert keyguardManager != null;<NEW_LINE>if (!keyguardManager.isKeyguardSecure()) {<NEW_LINE>Log.w(TAG, "Keyguard not secure...");<NEW_LINE>handleAuthenticated();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (Build.VERSION.SDK_INT != 29 && biometricManager.canAuthenticate(ALLOWED_AUTHENTICATORS) == BiometricManager.BIOMETRIC_SUCCESS) {<NEW_LINE>if (force) {<NEW_LINE>Log.i(TAG, "Listening for biometric authentication...");<NEW_LINE>biometricPrompt.authenticate(biometricPromptInfo);<NEW_LINE>} else {<NEW_LINE>Log.i(TAG, "Skipping show system biometric dialog unless forced");<NEW_LINE>}<NEW_LINE>} else if (Build.VERSION.SDK_INT >= 21) {<NEW_LINE>if (force) {<NEW_LINE>Log.i(TAG, "firing intent...");<NEW_LINE>Intent intent = keyguardManager.createConfirmDeviceCredentialIntent(getString(R<MASK><NEW_LINE>startActivityForResult(intent, AUTHENTICATE_REQUEST_CODE);<NEW_LINE>} else {<NEW_LINE>Log.i(TAG, "Skipping firing intent unless forced");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Log.w(TAG, "Not compatible...");<NEW_LINE>handleAuthenticated();<NEW_LINE>}<NEW_LINE>}
.string.PassphrasePromptActivity_unlock_signal), "");
362,676
private void readDictionariesFromSegment(String segmentDirectory) throws Exception {<NEW_LINE>File segmentIndexDir = new File(segmentDirectory);<NEW_LINE>SegmentMetadataImpl segmentMetadata = new SegmentMetadataImpl(segmentIndexDir);<NEW_LINE>pinotToAvroSchema(segmentMetadata);<NEW_LINE>// read dictionaries from segment and build equivalent dictionary of random values<NEW_LINE>ImmutableSegment immutableSegment = ImmutableSegmentLoader.load(segmentIndexDir, ReadMode.mmap);<NEW_LINE>Map<String, ColumnMetadata> columnMetadataMap = segmentMetadata.getColumnMetadataMap();<NEW_LINE>for (Map.Entry<String, ColumnMetadata> entry : columnMetadataMap.entrySet()) {<NEW_LINE><MASK><NEW_LINE>if (!_globalDictionaryColumns.containsKey(columnName)) {<NEW_LINE>// global dictionary will be built only for columns participating in filters<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int totalCardinality = _globalDictionaryColumns.get(columnName);<NEW_LINE>ColumnMetadata columnMetadata = entry.getValue();<NEW_LINE>Dictionary dictionary = immutableSegment.getDictionary(columnName);<NEW_LINE>if (dictionary != null) {<NEW_LINE>// column has dictionary<NEW_LINE>for (int dictId = 0; dictId < columnMetadata.getCardinality(); dictId++) {<NEW_LINE>Object origValue = dictionary.get(dictId);<NEW_LINE>_globalDictionaries.addOrigValueToGlobalDictionary(origValue, columnName, columnMetadata, totalCardinality);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// we build global dictionary only for columns that appear in filter<NEW_LINE>// and such columns should ideally always have a dictionary in segment<NEW_LINE>// so we should never end up here<NEW_LINE>throw new UnsupportedOperationException("Data generator currently does not support filter columns without dictionary");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String columnName = entry.getKey();
1,533,159
public boolean visit(Assignment node) {<NEW_LINE>Expression leftHandSide = node.getLeftHandSide();<NEW_LINE>if (!considerBinding(resolveBinding(leftHandSide), leftHandSide)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>checkParent(node);<NEW_LINE>Expression rightHandSide = node.getRightHandSide();<NEW_LINE>if (!fIsFieldFinal) {<NEW_LINE>// Write access.<NEW_LINE>AST ast = node.getAST();<NEW_LINE>MethodInvocation invocation = ast.newMethodInvocation();<NEW_LINE>invocation.setName(ast.newSimpleName(fSetter));<NEW_LINE>fReferencingSetter = true;<NEW_LINE>Expression receiver = getReceiver(leftHandSide);<NEW_LINE>if (receiver != null) {<NEW_LINE>invocation.setExpression((Expression) fRewriter.createCopyTarget(receiver));<NEW_LINE>}<NEW_LINE>List<Expression> arguments = invocation.arguments();<NEW_LINE>if (node.getOperator() == Assignment.Operator.ASSIGN) {<NEW_LINE>arguments.add((Expression) fRewriter.createCopyTarget(rightHandSide));<NEW_LINE>} else {<NEW_LINE>// This is the compound assignment case: field+= 10;<NEW_LINE>InfixExpression exp = ast.newInfixExpression();<NEW_LINE>exp.setOperator(ASTNodes.convertToInfixOperator(node.getOperator()));<NEW_LINE>MethodInvocation getter = ast.newMethodInvocation();<NEW_LINE>getter.setName(ast.newSimpleName(fGetter));<NEW_LINE>fReferencingGetter = true;<NEW_LINE>if (receiver != null) {<NEW_LINE>getter.setExpression((Expression) fRewriter.createCopyTarget(receiver));<NEW_LINE>}<NEW_LINE>exp.setLeftOperand(getter);<NEW_LINE>Expression rhs = (Expression) fRewriter.createCopyTarget(rightHandSide);<NEW_LINE>if (NecessaryParenthesesChecker.needsParenthesesForRightOperand(rightHandSide, exp, leftHandSide.resolveTypeBinding())) {<NEW_LINE><MASK><NEW_LINE>p.setExpression(rhs);<NEW_LINE>rhs = p;<NEW_LINE>}<NEW_LINE>exp.setRightOperand(rhs);<NEW_LINE>arguments.add(exp);<NEW_LINE>}<NEW_LINE>fRewriter.replace(node, invocation, createGroupDescription(WRITE_ACCESS));<NEW_LINE>}<NEW_LINE>rightHandSide.accept(this);<NEW_LINE>return false;<NEW_LINE>}
ParenthesizedExpression p = ast.newParenthesizedExpression();
518,031
Path compile() throws IOException, SourceCompilationException {<NEW_LINE>Path compilationStdOut = Files.createTempFile("compilation_stdout_", ".txt");<NEW_LINE>Path compilationStdErr = Files.createTempFile("compilation_stderr_", ".txt");<NEW_LINE>Path compiledRootDir = Files.createTempDirectory("compilation_prodout_");<NEW_LINE>ImmutableList<String> javacOptions = ImmutableList.<String>builder().addAll(customJavacOptions).add("-d " + compiledRootDir).build();<NEW_LINE>final List<Path> compiledFiles;<NEW_LINE>try (OutputStream stdOutStream = Files.newOutputStream(compilationStdOut);<NEW_LINE>OutputStream stdErrStream = Files.newOutputStream(compilationStdErr)) {<NEW_LINE>Splitter splitter = Splitter.on(" ").trimResults().omitEmptyStrings();<NEW_LINE>ImmutableList<String> compilationArguments = ImmutableList.<String>builder().addAll(splitter.split(String.join(" ", javacOptions))).addAll(sourceInputs.stream().map(Path::toString).collect(Collectors.toList())).build();<NEW_LINE>compiler.run(nullInputStream(), stdOutStream, stdErrStream, compilationArguments.toArray(new String[0]));<NEW_LINE>int maxDepth = sourceInputs.stream().mapToInt(Path::getNameCount).max().getAsInt();<NEW_LINE>try (Stream<Path> outputStream = Files.find(compiledRootDir, maxDepth, (path, fileAttr) -> true)) {<NEW_LINE>compiledFiles = outputStream.collect(Collectors.toList());<NEW_LINE>}<NEW_LINE>try (JarOutputStream jarOutputStream = new JarOutputStream(Files.newOutputStream(outputJar))) {<NEW_LINE>for (Path compiledFile : compiledFiles) {<NEW_LINE>try (InputStream inputStream = Files.newInputStream(compiledFile)) {<NEW_LINE>Path inArchivalPath = compiledRootDir.relativize(compiledFile);<NEW_LINE>JarEntry jarEntry = new JarEntry(inArchivalPath.toString());<NEW_LINE>jarOutputStream.putNextEntry(jarEntry);<NEW_LINE>if (!Files.isDirectory(compiledFile)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>jarOutputStream.closeEntry();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String compilationStandardErrorMessage = new String(Files.readAllBytes(compilationStdErr), Charset.defaultCharset());<NEW_LINE>if (!compilationStandardErrorMessage.isEmpty()) {<NEW_LINE>throw new SourceCompilationException(compilationStandardErrorMessage);<NEW_LINE>}<NEW_LINE>return outputJar;<NEW_LINE>}
ByteStreams.copy(inputStream, jarOutputStream);
413,457
public Snapshot archiveSnapshot(Long snapshotId) {<NEW_LINE>SnapshotInfo snapshotOnPrimary = snapshotFactory.getSnapshot(snapshotId, DataStoreRole.Primary);<NEW_LINE>if (snapshotOnPrimary == null || !snapshotOnPrimary.getStatus().equals(ObjectInDataStoreStateMachine.State.Ready)) {<NEW_LINE>throw new CloudRuntimeException("Can only archive snapshots present on primary storage. " + "Cannot find snapshot " + snapshotId + " on primary storage");<NEW_LINE>}<NEW_LINE>SnapshotInfo snapshotOnSecondary = snapshotSrv.backupSnapshot(snapshotOnPrimary);<NEW_LINE>SnapshotVO snapshotVO = _snapshotDao.findById(snapshotOnSecondary.getId());<NEW_LINE>snapshotVO.setLocationType(Snapshot.LocationType.SECONDARY);<NEW_LINE>_snapshotDao.persist(snapshotVO);<NEW_LINE>try {<NEW_LINE>snapshotSrv.deleteSnapshot(snapshotOnPrimary);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new CloudRuntimeException(<MASK><NEW_LINE>}<NEW_LINE>return snapshotOnSecondary;<NEW_LINE>}
"Snapshot archived to Secondary Storage but there was an error deleting " + " the snapshot on Primary Storage. Please manually delete the primary snapshot " + snapshotId, e);
1,139,918
public SampleChannelDataResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SampleChannelDataResult sampleChannelDataResult = new SampleChannelDataResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return sampleChannelDataResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("payloads", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>sampleChannelDataResult.setPayloads(new ListUnmarshaller<java.nio.ByteBuffer>(context.getUnmarshaller(java.nio.ByteBuffer.class)).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return sampleChannelDataResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
922,419
protected OWLAxiom trIntersectionOf(OWLClass cls, Collection<Clause> clauses) {<NEW_LINE>Set<<MASK><NEW_LINE>Set<OWLClassExpression> eSet = new HashSet<>();<NEW_LINE>eSet.add(cls);<NEW_LINE>Set<OWLClassExpression> iSet = new HashSet<>();<NEW_LINE>for (Clause clause : clauses) {<NEW_LINE>Collection<QualifierValue> qvs = clause.getQualifierValues();<NEW_LINE>if (clause.getValues().size() == 1) {<NEW_LINE>iSet.add(trClass(clause.getValue()));<NEW_LINE>} else {<NEW_LINE>iSet.add(trRel((String) clause.getValue(), (String) clause.getValue2(), qvs));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>eSet.add(fac.getOWLObjectIntersectionOf(iSet));<NEW_LINE>// TODO - fix this<NEW_LINE>if (annotations.isEmpty()) {<NEW_LINE>return fac.getOWLEquivalentClassesAxiom(eSet);<NEW_LINE>} else {<NEW_LINE>return fac.getOWLEquivalentClassesAxiom(eSet, annotations);<NEW_LINE>}<NEW_LINE>}
OWLAnnotation> annotations = trAnnotations(clauses);
494,055
private void init_card_thumb_resourceURL_style() {<NEW_LINE>// Create a Card<NEW_LINE>Card card = new Card(getActivity());<NEW_LINE>// Create a CardHeader<NEW_LINE>CardHeader header = new CardHeader(getActivity());<NEW_LINE>// Set the header title<NEW_LINE>header.setTitle(getString(R.string.demo_header_basetitle));<NEW_LINE>card.addCardHeader(header);<NEW_LINE>// Create thumbnail<NEW_LINE>CustomThumbCard thumb = new CustomThumbCard(getActivity());<NEW_LINE>// Set URL resource<NEW_LINE>thumb.setUrlResource("https://lh5.googleusercontent.com/-N8bz9q4Kz0I/AAAAAAAAAAI/AAAAAAAAAAs/Icl2bQMyK7c/s265-c-k-no/photo.jpg");<NEW_LINE>// Error Resource ID<NEW_LINE>thumb.setErrorResource(R.drawable.ic_error_loadingorangesmall);<NEW_LINE>// Add thumbnail to a card<NEW_LINE>card.addCardThumbnail(thumb);<NEW_LINE>// Set card in the cardView<NEW_LINE>CardViewNative cardView = (CardViewNative) getActivity().<MASK><NEW_LINE>cardView.setCard(card);<NEW_LINE>}
findViewById(R.id.carddemo_thumb_style);
980,649
protected Transferable copyBytes(ClipboardType copyType, TaskMonitor monitor) {<NEW_LINE>if (copyType == BYTE_STRING_TYPE) {<NEW_LINE>String byteString = copyBytesAsString(getSelectedAddresses(), true, monitor);<NEW_LINE>return new ByteStringTransferable(byteString);<NEW_LINE>} else if (copyType == BYTE_STRING_NO_SPACE_TYPE) {<NEW_LINE>String byteString = copyBytesAsString(getSelectedAddresses(), false, monitor);<NEW_LINE>return new ByteStringTransferable(byteString);<NEW_LINE>} else if (copyType == PYTHON_BYTE_STRING_TYPE) {<NEW_LINE>String prefix = "\\x";<NEW_LINE>String bs = copyBytesAsString(getSelectedAddresses(), prefix, monitor);<NEW_LINE>String fixed = "b'" + prefix + bs + "'";<NEW_LINE>return new ProgrammingByteStringTransferable(fixed, copyType.getFlavor());<NEW_LINE>} else if (copyType == PYTHON_LIST_TYPE) {<NEW_LINE>String prefix = "0x";<NEW_LINE>String bs = copyBytesAsString(getSelectedAddresses(), ", " + prefix, monitor);<NEW_LINE>String fixed = "[ " + prefix + bs + " ]";<NEW_LINE>return new ProgrammingByteStringTransferable(fixed, copyType.getFlavor());<NEW_LINE>} else if (copyType == CPP_BYTE_ARRAY_TYPE) {<NEW_LINE>String prefix = "0x";<NEW_LINE>String bs = copyBytesAsString(getSelectedAddresses(<MASK><NEW_LINE>String byteString = "{ " + prefix + bs + " }";<NEW_LINE>return new ProgrammingByteStringTransferable(byteString, copyType.getFlavor());<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
), ", " + prefix, monitor);
1,263,058
public void askConfirmationMoveToRubbish(final ArrayList<Long> handleList) {<NEW_LINE>logDebug("askConfirmationMoveToRubbish");<NEW_LINE>DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>switch(which) {<NEW_LINE>case DialogInterface.BUTTON_POSITIVE:<NEW_LINE>moveToTrash(handleList);<NEW_LINE>break;<NEW_LINE>case DialogInterface.BUTTON_NEGATIVE:<NEW_LINE>// No button clicked<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>if (handleList != null) {<NEW_LINE>if (handleList.size() > 0) {<NEW_LINE>MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this);<NEW_LINE>if (handleList.size() > 1) {<NEW_LINE>builder.setMessage(getResources().getString<MASK><NEW_LINE>} else {<NEW_LINE>builder.setMessage(getResources().getString(R.string.confirmation_move_to_rubbish));<NEW_LINE>}<NEW_LINE>builder.setPositiveButton(R.string.general_move, dialogClickListener);<NEW_LINE>builder.setNegativeButton(R.string.general_cancel, dialogClickListener);<NEW_LINE>builder.show();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logWarning("handleList NULL");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}
(R.string.confirmation_move_to_rubbish_plural));
797,982
public void authenticate(JsonObject user, Handler<AsyncResult<User>> resultHandler) {<NEW_LINE>JsonObject object = new JsonObject();<NEW_LINE>object.put("foo", "bar").put("num", 123).put("mybool", true);<NEW_LINE>JsonArray array = new JsonArray();<NEW_LINE>array.add("foo").add(123).add(false);<NEW_LINE>DeliveryOptions options = new DeliveryOptions();<NEW_LINE>options.setSendTimeout(5000);<NEW_LINE>vertx.eventBus().send("to-akka-gw", "Yay! Someone kicked a ball across a patch of grass", options, ar -> {<NEW_LINE>if (ar.succeeded()) {<NEW_LINE>System.out.println("Received reply: " + ar.<MASK><NEW_LINE>System.out.println("Got Authenticated");<NEW_LINE>resultHandler.handle(Future.succeededFuture(new BbbUser(object, array)));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
result().body());
1,230,820
public static ListCallEventDetailByContactIdResponse unmarshall(ListCallEventDetailByContactIdResponse listCallEventDetailByContactIdResponse, UnmarshallerContext context) {<NEW_LINE>listCallEventDetailByContactIdResponse.setRequestId(context.stringValue("ListCallEventDetailByContactIdResponse.RequestId"));<NEW_LINE>listCallEventDetailByContactIdResponse.setSuccess(context.booleanValue("ListCallEventDetailByContactIdResponse.Success"));<NEW_LINE>listCallEventDetailByContactIdResponse.setCode(context.stringValue("ListCallEventDetailByContactIdResponse.Code"));<NEW_LINE>listCallEventDetailByContactIdResponse.setMessage(context.stringValue("ListCallEventDetailByContactIdResponse.Message"));<NEW_LINE>listCallEventDetailByContactIdResponse.setHttpStatusCode(context.integerValue("ListCallEventDetailByContactIdResponse.HttpStatusCode"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setCaller(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Caller"));<NEW_LINE>data.setCallee<MASK><NEW_LINE>data.setCallType(context.stringValue("ListCallEventDetailByContactIdResponse.Data.CallType"));<NEW_LINE>data.setStartTime(context.stringValue("ListCallEventDetailByContactIdResponse.Data.StartTime"));<NEW_LINE>data.setPrivacyNumber(context.stringValue("ListCallEventDetailByContactIdResponse.Data.PrivacyNumber"));<NEW_LINE>List<CallEventDetail> events = new ArrayList<CallEventDetail>();<NEW_LINE>for (int i = 0; i < context.lengthValue("ListCallEventDetailByContactIdResponse.Data.Events.Length"); i++) {<NEW_LINE>CallEventDetail callEventDetail = new CallEventDetail();<NEW_LINE>callEventDetail.setTimeStamp(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Events[" + i + "].TimeStamp"));<NEW_LINE>callEventDetail.setEvent(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Events[" + i + "].Event"));<NEW_LINE>callEventDetail.setAgentName(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Events[" + i + "].AgentName"));<NEW_LINE>callEventDetail.setStatus(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Events[" + i + "].Status"));<NEW_LINE>callEventDetail.setCallMode(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Events[" + i + "].CallMode"));<NEW_LINE>callEventDetail.setDuration(context.integerValue("ListCallEventDetailByContactIdResponse.Data.Events[" + i + "].Duration"));<NEW_LINE>DetailData detailData = new DetailData();<NEW_LINE>detailData.setEventType(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Events[" + i + "].DetailData.EventType"));<NEW_LINE>detailData.setHelper(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Events[" + i + "].DetailData.Helper"));<NEW_LINE>detailData.setSatisfactionalResearch(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Events[" + i + "].DetailData.SatisfactionalResearch"));<NEW_LINE>detailData.setSkillGroup(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Events[" + i + "].DetailData.SkillGroup"));<NEW_LINE>detailData.setHangUper(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Events[" + i + "].DetailData.HangUper"));<NEW_LINE>callEventDetail.setDetailData(detailData);<NEW_LINE>events.add(callEventDetail);<NEW_LINE>}<NEW_LINE>data.setEvents(events);<NEW_LINE>listCallEventDetailByContactIdResponse.setData(data);<NEW_LINE>return listCallEventDetailByContactIdResponse;<NEW_LINE>}
(context.stringValue("ListCallEventDetailByContactIdResponse.Data.Callee"));
1,294,192
protected Tuple3<Params, Iterable<String>, Iterable<Object>> serializeModel(TreeModelDataConverter modelData) {<NEW_LINE>List<String> serialized = new ArrayList<>();<NEW_LINE>int pStart = 0, pEnd = 0;<NEW_LINE>// toString partition of stringIndexerModel<NEW_LINE>if (modelData.stringIndexerModelSerialized != null) {<NEW_LINE>for (Row row : stringIndexerModelSerialized) {<NEW_LINE>Object[] objs = new Object[row.getArity()];<NEW_LINE>for (int i = 0; i < row.getArity(); ++i) {<NEW_LINE>objs[i] = row.getField(i);<NEW_LINE>}<NEW_LINE>serialized.add(JsonConverter.toJson(objs));<NEW_LINE>}<NEW_LINE>pEnd = serialized.size();<NEW_LINE>}<NEW_LINE>modelData.meta.set(STRING_INDEXER_MODEL_PARTITION, Partition<MASK><NEW_LINE>// toString partition of trees<NEW_LINE>Partitions treesPartition = new Partitions();<NEW_LINE>for (Node root : modelData.roots) {<NEW_LINE>List<String> localSerialize = serializeTree(root);<NEW_LINE>pStart = pEnd;<NEW_LINE>pEnd = pStart + localSerialize.size();<NEW_LINE>treesPartition.add(Partition.of(pStart, pEnd));<NEW_LINE>serialized.addAll(localSerialize);<NEW_LINE>}<NEW_LINE>modelData.meta.set(TREE_PARTITIONS, treesPartition);<NEW_LINE>return Tuple3.of(modelData.meta, serialized, modelData.labels == null ? null : Arrays.asList(modelData.labels));<NEW_LINE>}
.of(pStart, pEnd));
670,746
private void handleBeanDefinitionMetadata(Builder code) {<NEW_LINE>String bdVariable = determineVariableName("bd");<NEW_LINE>MultiStatement statements = new MultiStatement();<NEW_LINE>if (this.beanDefinition.isPrimary()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>String scope = this.beanDefinition.getScope();<NEW_LINE>if (StringUtils.hasText(scope) && !ConfigurableBeanFactory.SCOPE_SINGLETON.equals(scope)) {<NEW_LINE>statements.add("$L.setScope($S)", bdVariable, scope);<NEW_LINE>}<NEW_LINE>String[] dependsOn = this.beanDefinition.getDependsOn();<NEW_LINE>if (!ObjectUtils.isEmpty(dependsOn)) {<NEW_LINE>statements.add("$L.setDependsOn($L)", bdVariable, this.parameterWriter.writeParameterValue(dependsOn));<NEW_LINE>}<NEW_LINE>if (this.beanDefinition.isLazyInit()) {<NEW_LINE>statements.add("$L.setLazyInit(true)", bdVariable);<NEW_LINE>}<NEW_LINE>if (!this.beanDefinition.isAutowireCandidate()) {<NEW_LINE>statements.add("$L.setAutowireCandidate(false)", bdVariable);<NEW_LINE>}<NEW_LINE>if (this.beanDefinition instanceof AbstractBeanDefinition && ((AbstractBeanDefinition) this.beanDefinition).isSynthetic()) {<NEW_LINE>statements.add("$L.setSynthetic(true)", bdVariable);<NEW_LINE>}<NEW_LINE>if (this.beanDefinition.getRole() != BeanDefinition.ROLE_APPLICATION) {<NEW_LINE>statements.add("$L.setRole($L)", bdVariable, this.beanDefinition.getRole());<NEW_LINE>}<NEW_LINE>Map<Integer, ValueHolder> indexedArgumentValues = this.beanDefinition.getConstructorArgumentValues().getIndexedArgumentValues();<NEW_LINE>if (!indexedArgumentValues.isEmpty()) {<NEW_LINE>handleArgumentValues(statements, bdVariable, indexedArgumentValues);<NEW_LINE>}<NEW_LINE>if (this.beanDefinition.hasPropertyValues()) {<NEW_LINE>handlePropertyValues(statements, bdVariable, this.beanDefinition.getPropertyValues());<NEW_LINE>}<NEW_LINE>if (this.beanDefinition.attributeNames().length > 0) {<NEW_LINE>handleAttributes(statements, bdVariable);<NEW_LINE>}<NEW_LINE>if (statements.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>code.add(statements.toCodeBlock(".customize((" + bdVariable + ") ->"));<NEW_LINE>code.add(")");<NEW_LINE>}
statements.add("$L.setPrimary(true)", bdVariable);
1,697,499
private void buildDependencyDashboard(Model model, Payload payload, Date reportTime) {<NEW_LINE>ProductLinesDashboard dashboardGraph = m_graphManager.buildDependencyDashboard(reportTime.getTime());<NEW_LINE>Map<String, List<TopologyNode>> nodes = dashboardGraph.getNodes();<NEW_LINE>SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHH");<NEW_LINE>String minute = String.valueOf(parseQueryMinute(payload));<NEW_LINE>for (List<TopologyNode> n : nodes.values()) {<NEW_LINE>for (TopologyNode node : n) {<NEW_LINE><MASK><NEW_LINE>String link = String.format("?op=dependencyGraph&minute=%s&domain=%s&date=%s", minute, domain, sdf.format(new Date(payload.getDate())));<NEW_LINE>node.setLink(link);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>model.setReportStart(new Date(payload.getDate()));<NEW_LINE>model.setReportEnd(new Date(payload.getDate() + TimeHelper.ONE_HOUR - 1));<NEW_LINE>model.setDashboardGraph(dashboardGraph.toJson());<NEW_LINE>model.setDashboardGraphData(dashboardGraph);<NEW_LINE>model.setFormat(m_formatConfigManager.buildFormatJson());<NEW_LINE>}
String domain = node.getId();
668,244
public void processFlushQuery(ControlAreYouFlushed flushQuery) throws SIResourceException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "processFlushQuery", new Object[] { flushQuery });<NEW_LINE>SIBUuid12 streamID = flushQuery.getGuaranteedStreamUUID();<NEW_LINE>try {<NEW_LINE>// synchronize to give a consistent view of the flushed state<NEW_LINE>synchronized (this) {<NEW_LINE><MASK><NEW_LINE>if (isFlushed(streamID)) {<NEW_LINE>// It's flushed. Send a message saying as much.<NEW_LINE>downControl.sendFlushedMessage(requestor, streamID);<NEW_LINE>} else {<NEW_LINE>// Not flushed. Send a message saying as much.<NEW_LINE>downControl.sendNotFlushedMessage(requestor, streamID, flushQuery.getRequestID());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (SIResourceException e) {<NEW_LINE>// FFDC<NEW_LINE>FFDCFilter.processException(e, "com.ibm.ws.sib.processor.gd.InternalOutputStreamManager.processFlushQuery", "1:516:1.48.1.1", this);<NEW_LINE>SibTr.exception(tc, e);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "processFlushQuery", e);<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "processFlushQuery");<NEW_LINE>}
SIBUuid8 requestor = flushQuery.getGuaranteedSourceMessagingEngineUUID();
1,287,614
public FormInfo execute(CommandContext commandContext) {<NEW_LINE>CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration(commandContext);<NEW_LINE>FormService formService = CommandContextUtil.getFormService(commandContext);<NEW_LINE>if (formService == null) {<NEW_LINE>throw new FlowableIllegalArgumentException("Form engine is not initialized");<NEW_LINE>}<NEW_LINE>FormInfo formInfo = null;<NEW_LINE>CaseDefinition caseDefinition = CaseDefinitionUtil.getCaseDefinition(caseDefinitionId);<NEW_LINE>CmmnModel cmmnModel = CaseDefinitionUtil.getCmmnModel(caseDefinitionId);<NEW_LINE>Case caseModel = cmmnModel.<MASK><NEW_LINE>Stage planModel = caseModel.getPlanModel();<NEW_LINE>if (StringUtils.isNotEmpty(planModel.getFormKey())) {<NEW_LINE>CmmnDeployment deployment = CommandContextUtil.getCmmnDeploymentEntityManager(commandContext).findById(caseDefinition.getDeploymentId());<NEW_LINE>formInfo = formService.getFormInstanceModelByKeyAndParentDeploymentIdAndScopeId(planModel.getFormKey(), deployment.getParentDeploymentId(), caseInstanceId, ScopeTypes.CMMN, null, caseDefinition.getTenantId(), cmmnEngineConfiguration.isFallbackToDefaultTenant());<NEW_LINE>}<NEW_LINE>// If form does not exists, we don't want to leak out this info to just anyone<NEW_LINE>if (formInfo == null) {<NEW_LINE>throw new FlowableObjectNotFoundException("Form model for case definition " + caseDefinitionId + " cannot be found");<NEW_LINE>}<NEW_LINE>FormFieldHandler formFieldHandler = cmmnEngineConfiguration.getFormFieldHandler();<NEW_LINE>formFieldHandler.enrichFormFields(formInfo);<NEW_LINE>return formInfo;<NEW_LINE>}
getCaseById(caseDefinition.getKey());
1,400,066
public void displayChatNotification(ChatNotification chatNotification) {<NEW_LINE>// We need to specify these parameters so that the data returned<NEW_LINE>// from the launching intent is processed correctly.<NEW_LINE>// https://github.com/keybase/client/blob/95959e12d76612f455ab4a90835debff489eacf4/shared/actions/platform-specific/push.native.js#L363-L381<NEW_LINE>Bundle bundle = (Bundle) this.bundle.clone();<NEW_LINE>bundle.putBoolean("userInteraction", true);<NEW_LINE>bundle.putString("type", "chat.newmessage");<NEW_LINE>bundle.putString("convID", chatNotification.getConvID());<NEW_LINE>PendingIntent pending_intent = buildPendingIntent(bundle);<NEW_LINE>ConvData convData = new ConvData(chatNotification.getConvID(), chatNotification.getTlfName(), chatNotification.getMessage().getID());<NEW_LINE>NotificationCompat.Builder builder = new NotificationCompat.Builder(this.context, KeybasePushNotificationListenerService.CHAT_CHANNEL_ID).setSmallIcon(R.drawable.ic_notif).setContentIntent(pending_intent).setAutoCancel(true);<NEW_LINE>int notificationDefaults = NotificationCompat.DEFAULT_LIGHTS | NotificationCompat.DEFAULT_VIBRATE;<NEW_LINE>// Set notification sound<NEW_LINE>if (chatNotification.getSoundName().equals("default")) {<NEW_LINE>notificationDefaults |= NotificationCompat.DEFAULT_SOUND;<NEW_LINE>} else {<NEW_LINE>String soundResource = filenameResourceName(chatNotification.getSoundName());<NEW_LINE>String soundUriStr = "android.resource://" + this.context.getPackageName() + "/raw/" + soundResource;<NEW_LINE>Uri soundUri = Uri.parse(soundUriStr);<NEW_LINE>builder.setSound(soundUri);<NEW_LINE>}<NEW_LINE>builder.setDefaults(notificationDefaults);<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) {<NEW_LINE>builder.addAction(newReplyAction(this.context, convData, pending_intent));<NEW_LINE>}<NEW_LINE>Message msg = chatNotification.getMessage();<NEW_LINE>keybase.Person from = msg.getFrom();<NEW_LINE>Person.Builder personBuilder = new Person.Builder().setName(from.getKeybaseUsername()).setBot(from.getIsBot());<NEW_LINE>String avatarUri = chatNotification.getMessage().getFrom().getKeybaseAvatar();<NEW_LINE>IconCompat icon = getKeybaseAvatar(avatarUri);<NEW_LINE>if (icon != null) {<NEW_LINE>personBuilder.setIcon(icon);<NEW_LINE>}<NEW_LINE>Person fromPerson = personBuilder.build();<NEW_LINE>if (this.convMsgCache != null) {<NEW_LINE>String msgText = chatNotification.getIsPlaintext() ? chatNotification.getMessage().getPlaintext() : "";<NEW_LINE>if (msgText.isEmpty()) {<NEW_LINE>msgText = chatNotification.getMessage().getServerMessage();<NEW_LINE>}<NEW_LINE>convMsgCache.add(new MessagingStyle.Message(msgText, msg.getAt(), fromPerson));<NEW_LINE>}<NEW_LINE>MessagingStyle style = buildStyle(fromPerson);<NEW_LINE>style.setConversationTitle(chatNotification.getConversationName());<NEW_LINE>style.setGroupConversation(chatNotification.getIsGroupConversation());<NEW_LINE>builder.setStyle(style);<NEW_LINE>NotificationManagerCompat notificationManager = <MASK><NEW_LINE>notificationManager.notify(chatNotification.getConvID(), 0, builder.build());<NEW_LINE>}
NotificationManagerCompat.from(this.context);
836,593
public void simpleQueries() {<NEW_LINE>// [START simple_queries]<NEW_LINE>// Create a reference to the cities collection<NEW_LINE>CollectionReference citiesRef = db.collection("cities");<NEW_LINE>// Create a query against the collection.<NEW_LINE>Query query = citiesRef.whereEqualTo("state", "CA");<NEW_LINE>// [END simple_queries]<NEW_LINE>// [START simple_query_capital]<NEW_LINE>Query capitalCities = db.collection("cities").whereEqualTo("capital", true);<NEW_LINE>// [END simple_query_capital]<NEW_LINE>// [START example_filters]<NEW_LINE>Query stateQuery = citiesRef.whereEqualTo("state", "CA");<NEW_LINE>Query populationQuery = citiesRef.whereLessThan("population", 100000);<NEW_LINE>Query nameQuery = citiesRef.whereGreaterThanOrEqualTo("name", "San Francisco");<NEW_LINE>// [END example_filters]<NEW_LINE>// [START simple_query_not_equal]<NEW_LINE>Query notCapitalQuery = <MASK><NEW_LINE>// [END simple_query_not_equal]<NEW_LINE>}
citiesRef.whereNotEqualTo("capital", false);
1,616,211
public AuthConfig updateAuthConfig(AuthConfig body, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'body' when calling updateAuthConfig");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/system/config/settings/auth";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new <MASK><NEW_LINE>if (xSdsAuthToken != null)<NEW_LINE>localVarHeaderParams.put("X-Sds-Auth-Token", apiClient.parameterToString(xSdsAuthToken));<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "application/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<AuthConfig> localVarReturnType = new GenericType<AuthConfig>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
HashMap<String, Object>();
875,277
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {<NEW_LINE>if (XposedBridge.disableHooks) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>logD("SystemServer#startBootstrapServices() starts");<NEW_LINE>try {<NEW_LINE>XposedInit.loadedPackagesInProcess.add("android");<NEW_LINE>XC_LoadPackage.LoadPackageParam lpparam = new XC_LoadPackage.LoadPackageParam(XposedBridge.sLoadedPackageCallbacks);<NEW_LINE>lpparam.packageName = "android";<NEW_LINE>// it's actually system_server, but other functions return this as well<NEW_LINE>lpparam.processName = "android";<NEW_LINE>lpparam.classLoader = SystemMain.systemServerCL;<NEW_LINE>lpparam.appInfo = null;<NEW_LINE>lpparam.isFirstApplication = true;<NEW_LINE>XC_LoadPackage.callAll(lpparam);<NEW_LINE>// Huawei<NEW_LINE>try {<NEW_LINE>findAndHookMethod("com.android.server.pm.HwPackageManagerService", SystemMain.systemServerCL, "isOdexMode", XC_MethodReplacement.returnConstant(false));<NEW_LINE>} catch (XposedHelpers.ClassNotFoundError | NoSuchMethodError ignored) {<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>String className = "com.android.server.pm." + (Build.VERSION.SDK_INT >= 23 ? "PackageDexOptimizer" : "PackageManagerService");<NEW_LINE>findAndHookMethod(className, SystemMain.systemServerCL, "dexEntryExists", String.class, XC_MethodReplacement.returnConstant(true));<NEW_LINE>} catch (XposedHelpers.ClassNotFoundError | NoSuchMethodError ignored) {<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
Hookers.logE("error when hooking startBootstrapServices", t);
979,125
public int compareTo(FullRuleKey other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetKey()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetName()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetType()).compareTo(other.isSetType());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetType()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetValues()).<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetValues()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
compareTo(other.isSetValues());
82,893
public static Map<String, Object> putModelUniversalOmni(CameraUniversalOmni parameters, @Nullable Map<String, Object> map) {<NEW_LINE>if (map == null)<NEW_LINE>map = new HashMap<>();<NEW_LINE>map.put("model", MODEL_OMNIDIRECTIONAL_UNIVERSAL);<NEW_LINE>map.put(VERSION, 0);<NEW_LINE>map.put("pinhole", putParamsPinhole(parameters));<NEW_LINE>map.put("mirror_offset", parameters.mirrorOffset);<NEW_LINE>Map<String, Object> mapDistort = new HashMap<>();<NEW_LINE>if (parameters.radial != null)<NEW_LINE>mapDistort.put("radial", parameters.radial);<NEW_LINE>mapDistort.put("t1", parameters.t1);<NEW_LINE>mapDistort.put("t2", parameters.t2);<NEW_LINE><MASK><NEW_LINE>return map;<NEW_LINE>}
map.put("radial_tangential", mapDistort);
1,339,898
void updateProgress(int progressUnits) {<NEW_LINE>// Only do the percentage calculation if the result would be logged.<NEW_LINE>if (!logger.isLoggable(logLevel)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!timerStarted) {<NEW_LINE>throw new IllegalStateException("#updateProgress() called before #startTimer().");<NEW_LINE>}<NEW_LINE>double progress = progressUnits / (double) maxProgressUnits;<NEW_LINE>double currentPercentage = 100 * progress;<NEW_LINE>long elapsedNanos = nanoSource.getNanos() - startNanos;<NEW_LINE>// Display the percent complete if progress has reached the<NEW_LINE>// next percentage increment, or if progress is 100%.<NEW_LINE>if (currentPercentage < nextPercentage && progressUnits != maxProgressUnits) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Don't log anything if < LOG_BLACKOUT_PERIOD_NANOS nanoseconds have elapsed.<NEW_LINE>if (elapsedNanos < LOG_BLACKOUT_PERIOD_NANOS) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Show the largest integer multiple of the percentage increment that is less than the<NEW_LINE>// actual percentage.<NEW_LINE>long displayedPercentage = percentageIncrement * Math.round(Math.floor(currentPercentage / percentageIncrement));<NEW_LINE>// If progress is 100%, just show 100%.<NEW_LINE>if (progressUnits == maxProgressUnits) {<NEW_LINE>displayedPercentage = 100;<NEW_LINE>}<NEW_LINE>// Only attempt to estimate a time remaining if we have a reasonable amount of data to go<NEW_LINE>// on. Otherwise the estimates are wildly misleading.<NEW_LINE>if (progress >= ETR_ACCURACY_THRESHOLD) {<NEW_LINE>// Do linear extrapolation to estimate the amount of time remaining.<NEW_LINE>double estimatedTotalNanos = elapsedNanos / progress;<NEW_LINE>double estimatedNanosRemaining = estimatedTotalNanos - elapsedNanos;<NEW_LINE>// Convert nanos to seconds.<NEW_LINE>double estimatedSecondsRemaining = estimatedNanosRemaining / (double) NANOSECONDS_IN_SECOND;<NEW_LINE>logger.log(logLevel, String.format("%d%% complete (ETR: %d seconds)", displayedPercentage, Math.round(estimatedSecondsRemaining)));<NEW_LINE>} else {<NEW_LINE>// Not enough information to estimate time remaining.<NEW_LINE>logger.log(logLevel, String<MASK><NEW_LINE>}<NEW_LINE>nextPercentage += percentageIncrement;<NEW_LINE>}
.format("%d%% complete (ETR: ?)", displayedPercentage));
1,203,371
final CreatePolicyVersionResult executeCreatePolicyVersion(CreatePolicyVersionRequest createPolicyVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPolicyVersionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreatePolicyVersionRequest> request = null;<NEW_LINE>Response<CreatePolicyVersionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreatePolicyVersionRequestMarshaller().marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IAM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePolicyVersion");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<CreatePolicyVersionResult> responseHandler = new StaxResponseHandler<CreatePolicyVersionResult>(new CreatePolicyVersionResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(createPolicyVersionRequest));
592,633
public static ListProofChainResponse unmarshall(ListProofChainResponse listProofChainResponse, UnmarshallerContext _ctx) {<NEW_LINE>listProofChainResponse.setRequestId(_ctx.stringValue("ListProofChainResponse.RequestId"));<NEW_LINE>listProofChainResponse.setCode(_ctx.integerValue("ListProofChainResponse.Code"));<NEW_LINE>listProofChainResponse.setSuccess(_ctx.booleanValue("ListProofChainResponse.Success"));<NEW_LINE>listProofChainResponse.setMessage(_ctx.stringValue("ListProofChainResponse.Message"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setTotal<MASK><NEW_LINE>data.setNum(_ctx.integerValue("ListProofChainResponse.Data.Num"));<NEW_LINE>data.setSize(_ctx.integerValue("ListProofChainResponse.Data.Size"));<NEW_LINE>List<ProofChainInfo> pageData = new ArrayList<ProofChainInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListProofChainResponse.Data.PageData.Length"); i++) {<NEW_LINE>ProofChainInfo proofChainInfo = new ProofChainInfo();<NEW_LINE>proofChainInfo.setBizChainId(_ctx.stringValue("ListProofChainResponse.Data.PageData[" + i + "].BizChainId"));<NEW_LINE>proofChainInfo.setName(_ctx.stringValue("ListProofChainResponse.Data.PageData[" + i + "].Name"));<NEW_LINE>proofChainInfo.setRemark(_ctx.stringValue("ListProofChainResponse.Data.PageData[" + i + "].Remark"));<NEW_LINE>proofChainInfo.setRoleType(_ctx.stringValue("ListProofChainResponse.Data.PageData[" + i + "].RoleType"));<NEW_LINE>proofChainInfo.setBizChainCode(_ctx.stringValue("ListProofChainResponse.Data.PageData[" + i + "].BizChainCode"));<NEW_LINE>proofChainInfo.setDataTypeCode(_ctx.stringValue("ListProofChainResponse.Data.PageData[" + i + "].DataTypeCode"));<NEW_LINE>pageData.add(proofChainInfo);<NEW_LINE>}<NEW_LINE>data.setPageData(pageData);<NEW_LINE>listProofChainResponse.setData(data);<NEW_LINE>return listProofChainResponse;<NEW_LINE>}
(_ctx.integerValue("ListProofChainResponse.Data.Total"));
248,905
public <B extends BlockStateHolder<B>> BlockStateHolder<?> updateNBT(B block, Map<String, Tag> values) {<NEW_LINE>Tag typeTag = values.get("color");<NEW_LINE>if (typeTag instanceof IntTag) {<NEW_LINE>String bedType = convertBedType(((IntTag) typeTag).getValue());<NEW_LINE>if (bedType != null) {<NEW_LINE>BlockType type = BlockTypes.get("minecraft:" + bedType);<NEW_LINE>if (type != null) {<NEW_LINE>BlockState state = type.getDefaultState();<NEW_LINE>Property<Direction> facingProp = type.getProperty("facing");<NEW_LINE>state = state.with(facingProp<MASK><NEW_LINE>Property<Boolean> occupiedProp = type.getProperty("occupied");<NEW_LINE>state = state.with(occupiedProp, false);<NEW_LINE>Property<String> partProp = type.getProperty("part");<NEW_LINE>state = state.with(partProp, block.getState(PART_PROPERTY));<NEW_LINE>values.remove("color");<NEW_LINE>return state;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return block;<NEW_LINE>}
, block.getState(FACING_PROPERTY));
1,057,900
public SelectionResults renderSelectionResultsWithOrdering(boolean preserveType) {<NEW_LINE>LinkedList<Serializable[]> rowsInSelectionResults = new LinkedList<>();<NEW_LINE>int[] columnIndices = SelectionOperatorUtils.getColumnIndices(_selectionColumns, _dataSchema);<NEW_LINE>int numColumns = columnIndices.length;<NEW_LINE>ColumnDataType[] columnDataTypes = _dataSchema.getColumnDataTypes();<NEW_LINE>if (preserveType) {<NEW_LINE>while (_rows.size() > _offset) {<NEW_LINE>Object[] row = _rows.poll();<NEW_LINE>assert row != null;<NEW_LINE>Serializable[] extractedRow = new Serializable[numColumns];<NEW_LINE>for (int i = 0; i < numColumns; i++) {<NEW_LINE>int columnIndex = columnIndices[i];<NEW_LINE>extractedRow[i] = columnDataTypes[columnIndex]<MASK><NEW_LINE>}<NEW_LINE>rowsInSelectionResults.addFirst(extractedRow);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>while (_rows.size() > _offset) {<NEW_LINE>Object[] row = _rows.poll();<NEW_LINE>assert row != null;<NEW_LINE>Serializable[] extractedRow = new Serializable[numColumns];<NEW_LINE>for (int i = 0; i < numColumns; i++) {<NEW_LINE>int columnIndex = columnIndices[i];<NEW_LINE>extractedRow[i] = SelectionOperatorUtils.getFormattedValue(row[columnIndex], columnDataTypes[columnIndex]);<NEW_LINE>}<NEW_LINE>rowsInSelectionResults.addFirst(extractedRow);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new SelectionResults(_selectionColumns, rowsInSelectionResults);<NEW_LINE>}
.convertAndFormat(row[columnIndex]);
176,735
private FieldValueReader createReader(String mapping) {<NEW_LINE>FieldValueReader reader = null;<NEW_LINE>if (mapping.startsWith(MAPPING_INDEX_PREFIX)) {<NEW_LINE>int propertySepIdx = mapping.indexOf(MAPPING_INDEX_PROPERTY_SEP, MAPPING_INDEX_PREFIX_LENGTH + 1);<NEW_LINE>if (propertySepIdx < 0) {<NEW_LINE>String indexStr = mapping.substring(MAPPING_INDEX_PREFIX_LENGTH);<NEW_LINE>try {<NEW_LINE>int index = Integer.parseInt(indexStr);<NEW_LINE>reader <MASK><NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String indexStr = mapping.substring(MAPPING_INDEX_PREFIX_LENGTH, propertySepIdx);<NEW_LINE>try {<NEW_LINE>int index = Integer.parseInt(indexStr);<NEW_LINE>String property = mapping.substring(propertySepIdx + MAPPING_INDEX_PROPERTY_SEP_LENGTH);<NEW_LINE>reader = new IndexPropertyReader(index - 1, property);<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// default to a property mapping<NEW_LINE>if (reader == null) {<NEW_LINE>reader = new PropertyReader(mapping);<NEW_LINE>}<NEW_LINE>return reader;<NEW_LINE>}
= new IndexReader(index - 1);
1,176,916
private void countComponentsInCollectionRecursively(Project project, CollectionDesc.Builder builder, Map<String, Integer> target) throws IOException, CompileExceptionError {<NEW_LINE>for (InstanceDesc inst : builder.getInstancesList()) {<NEW_LINE>IResource res = project.getResource(inst.getPrototype());<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>for (EmbeddedInstanceDesc desc : builder.getEmbeddedInstancesList()) {<NEW_LINE>byte[] data = desc.getData().getBytes();<NEW_LINE>long hash = MurmurHash.hash64(data, data.length);<NEW_LINE>IResource res = project.getGeneratedResource(hash, "go");<NEW_LINE>countComponentInResource(project, res, target);<NEW_LINE>}<NEW_LINE>for (CollectionInstanceDesc collInst : builder.getCollectionInstancesList()) {<NEW_LINE>IResource collResource = project.getResource(collInst.getCollection());<NEW_LINE>CollectionDesc.Builder subCollBuilder = CollectionDesc.newBuilder();<NEW_LINE>ProtoUtil.merge(collResource, subCollBuilder);<NEW_LINE>countComponentsInCollectionRecursively(project, subCollBuilder, target);<NEW_LINE>}<NEW_LINE>}
countComponentInResource(project, res, target);