idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,251,722
public Request<DescribeDominantLanguageDetectionJobRequest> marshall(DescribeDominantLanguageDetectionJobRequest describeDominantLanguageDetectionJobRequest) {<NEW_LINE>if (describeDominantLanguageDetectionJobRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DescribeDominantLanguageDetectionJobRequest)");<NEW_LINE>}<NEW_LINE>Request<DescribeDominantLanguageDetectionJobRequest> request = new DefaultRequest<DescribeDominantLanguageDetectionJobRequest>(describeDominantLanguageDetectionJobRequest, "AmazonComprehend");<NEW_LINE>String target = "Comprehend_20171127.DescribeDominantLanguageDetectionJob";<NEW_LINE><MASK><NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (describeDominantLanguageDetectionJobRequest.getJobId() != null) {<NEW_LINE>String jobId = describeDominantLanguageDetectionJobRequest.getJobId();<NEW_LINE>jsonWriter.name("JobId");<NEW_LINE>jsonWriter.value(jobId);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE>String snippet = stringWriter.toString();<NEW_LINE>byte[] content = snippet.getBytes(UTF8);<NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.1");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.addHeader("X-Amz-Target", target);
1,648,192
void migration(MigrationStrategy strategy, boolean initializeEmpty, String schema, File databaseUpdateFile, Connection connection, KeycloakSession session) {<NEW_LINE>JpaUpdaterProvider updater = session.getProvider(JpaUpdaterProvider.class, LiquibaseJpaUpdaterProviderFactory.PROVIDER_ID);<NEW_LINE>JpaUpdaterProvider.Status status = updater.validate(connection, schema);<NEW_LINE>if (status == JpaUpdaterProvider.Status.VALID) {<NEW_LINE>logger.debug("Database is up-to-date");<NEW_LINE>} else if (status == JpaUpdaterProvider.Status.EMPTY) {<NEW_LINE>if (initializeEmpty) {<NEW_LINE>update(connection, schema, session, updater);<NEW_LINE>} else {<NEW_LINE>switch(strategy) {<NEW_LINE>case UPDATE:<NEW_LINE>update(connection, schema, session, updater);<NEW_LINE>break;<NEW_LINE>case MANUAL:<NEW_LINE>export(connection, schema, databaseUpdateFile, session, updater);<NEW_LINE>throw new ServerStartupError("Database not initialized, please initialize database with " + databaseUpdateFile.getAbsolutePath(), false);<NEW_LINE>case VALIDATE:<NEW_LINE>throw new ServerStartupError("Database not initialized, please enable database initialization", false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>switch(strategy) {<NEW_LINE>case UPDATE:<NEW_LINE>update(connection, schema, session, updater);<NEW_LINE>break;<NEW_LINE>case MANUAL:<NEW_LINE>export(connection, schema, databaseUpdateFile, session, updater);<NEW_LINE>throw new ServerStartupError("Database not up-to-date, please migrate database with " + databaseUpdateFile.getAbsolutePath(), false);<NEW_LINE>case VALIDATE:<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
throw new ServerStartupError("Database not up-to-date, please enable database migration", false);
570,065
public void onChunkChange(ChunkChangeEvent event) {<NEW_LINE>if (event.getDocId() != docUpdateSentinel_.getId())<NEW_LINE>return;<NEW_LINE>switch(event.getChangeType()) {<NEW_LINE>case ChunkChangeEvent.CHANGE_CREATE:<NEW_LINE>createChunkOutput(ChunkDefinition.create(event.getRow(), 1, true, ChunkOutputWidget.EXPANDED, RmdChunkOptions.create(), event.getDocId(), event.getChunkId(), getKnitrChunkLabel(event.getRow(), docDisplay_, new ScopeList(docDisplay_))));<NEW_LINE>break;<NEW_LINE>case ChunkChangeEvent.CHANGE_REMOVE:<NEW_LINE>removeChunk(event.getChunkId(<MASK><NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// In source mode, creating and removing chunks causes a LineWidget to be<NEW_LINE>// created or destroyed, which in turn triggers a FoldChangeEvent, which<NEW_LINE>// in turn triggers an autosave. No line widgets are present in the visual<NEW_LINE>// editor, so nudge autosave directly so that the new set of chunk<NEW_LINE>// definitions is persisted.<NEW_LINE>if (editingTarget_.isVisualEditorActive()) {<NEW_LINE>docUpdateSentinel_.nudgeAutosave();<NEW_LINE>}<NEW_LINE>}
), event.getRequestId());
945,916
public List<ValidateError> validate(Map<String, String> values) {<NEW_LINE>List<ValidateError> errors = new ArrayList<>();<NEW_LINE>Validator validator;<NEW_LINE>ValidateError error;<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(values.get(<MASK><NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.INTEGER);<NEW_LINE>error = validator.validate(values.get("commentStatus"), convLabelName("Comment Status"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.INTEGER);<NEW_LINE>error = validator.validate(values.get("anonymous"), convLabelName("Anonymous"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.INTEGER);<NEW_LINE>error = validator.validate(values.get("insertUser"), convLabelName("Insert User"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.INTEGER);<NEW_LINE>error = validator.validate(values.get("updateUser"), convLabelName("Update User"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.INTEGER);<NEW_LINE>error = validator.validate(values.get("deleteFlag"), convLabelName("Delete Flag"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>return errors;<NEW_LINE>}
"knowledgeId"), convLabelName("Knowledge Id"));
1,513,354
protected void updateTarget() {<NEW_LINE>String text = getFirstNotNullTrimmed(targetDir.getText(), "");<NEW_LINE>if (isFolderUsable(text)) {<NEW_LINE>targetDir.setForeground(control.getDisplay()<MASK><NEW_LINE>if (isFileAccesible(text)) {<NEW_LINE>targetDir.setToolTipText(null);<NEW_LINE>targetLabel.setImage(null);<NEW_LINE>} else {<NEW_LINE>targetDir.setToolTipText(text + " does not yet exist");<NEW_LINE>targetLabel.setImage(ExtendedImageRegistry.INSTANCE.getImage(warningimage));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>targetDir.setForeground(targetDir.getDisplay().getSystemColor(SWT.COLOR_RED));<NEW_LINE>targetDir.setToolTipText("Cannot use " + text + " for writing");<NEW_LINE>targetLabel.setImage(ExtendedImageRegistry.INSTANCE.getImage(errorimage));<NEW_LINE>}<NEW_LINE>targetLabel.setSize(targetLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false));<NEW_LINE>}
.getSystemColor(SWT.COLOR_BLACK));
978,698
public Future<Boolean> addContextRootRequirement(DeployedModule deployedModule) {<NEW_LINE>String methodName = "addContextRootRequirement";<NEW_LINE>String contextRoot = deployedModule.getMappingContextRoot();<NEW_LINE>synchronized (contextRoots) {<NEW_LINE>Future<Boolean> future = futureMonitor.createFuture(Boolean.class);<NEW_LINE>// This listener is added to track conetxtRoot future and the web application init<NEW_LINE>deployedModule.addStartupListener(future, new CompletionListener<Boolean>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void failedCompletion(Future<Boolean> arg0, Throwable arg1) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void successfulCompletion(Future<Boolean> arg0, Boolean arg1) {<NEW_LINE>futureMonitor.setResult(arg0, arg1);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (contextRoots.contains(contextRoot)) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, methodName, "contextRoot-> [" + contextRoot + "] already added , set future done for deployedModule -->" + deployedModule);<NEW_LINE>}<NEW_LINE>// complete the notification here for app manager<NEW_LINE>deployedModule.initTaskComplete();<NEW_LINE>} else {<NEW_LINE>Set<DeployedModule> pending = pendingContextRoots.get(contextRoot);<NEW_LINE>if (pending == null) {<NEW_LINE>pending = new LinkedHashSet<DeployedModule>();<NEW_LINE>pendingContextRoots.put(contextRoot, pending);<NEW_LINE>}<NEW_LINE>pending.add(deployedModule);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, methodName, "contextRoot-> [" + contextRoot + <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return future;<NEW_LINE>}<NEW_LINE>}
"] not added , in pending future " + future + " for deployedModule -->" + deployedModule);
348,073
public void onMethodCall(MethodCall call, Result result) {<NEW_LINE>switch(call.method) {<NEW_LINE>case "getUrl":<NEW_LINE>{<NEW_LINE>Kraken kraken = getKraken();<NEW_LINE>result.success(kraken == null ? "" : kraken.getUrl());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case "getDynamicLibraryPath":<NEW_LINE>{<NEW_LINE>Kraken kraken = getKraken();<NEW_LINE>result.success(kraken == null ? "" : kraken.getDynamicLibraryPath());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case "invokeMethod":<NEW_LINE>{<NEW_LINE>Kraken kraken = getKraken();<NEW_LINE>if (kraken != null) {<NEW_LINE>String method = call.argument("method");<NEW_LINE>Object args = call.argument("args");<NEW_LINE>assert method != null;<NEW_LINE>MethodCall callWrap <MASK><NEW_LINE>kraken._handleMethodCall(callWrap, result);<NEW_LINE>} else {<NEW_LINE>result.error("Kraken instance not found.", null, null);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case "getTemporaryDirectory":<NEW_LINE>result.success(getTemporaryDirectory());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>result.notImplemented();<NEW_LINE>}<NEW_LINE>}
= new MethodCall(method, args);
1,322,631
public void process(CtExecutable<?> ctExecutable) {<NEW_LINE>procTimer.start();<NEW_LINE>try {<NEW_LINE>if (smplRule == null) {<NEW_LINE>throw new IllegalStateException("SmPL rule must be loaded before calling process()");<NEW_LINE>}<NEW_LINE>File sourceFile = ctExecutable.getPosition().getFile();<NEW_LINE>if (sourceFile != null) {<NEW_LINE>if (skippedFiles.contains(sourceFile)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!candidateFiles.contains(sourceFile)) {<NEW_LINE>grepTimer.start();<NEW_LINE>boolean isCandidateFile = smplRule.isPotentialMatch(sourceFile);<NEW_LINE>grepTimer.stop();<NEW_LINE>grepCounter += 1;<NEW_LINE>if (isCandidateFile) {<NEW_LINE>candidateFiles.add(sourceFile);<NEW_LINE>System.out.println("HANDLING: " + sourceFile.getPath());<NEW_LINE>} else {<NEW_LINE>skippedFiles.add(sourceFile);<NEW_LINE>System.out.println("Skipped: " + sourceFile.getPath());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>grepTimer.start();<NEW_LINE>boolean <MASK><NEW_LINE>grepTimer.stop();<NEW_LINE>grepCounter += 1;<NEW_LINE>if (!potentialMatch) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>System.out.print("Potential: " + getFullyQualifiedName(ctExecutable));<NEW_LINE>storeOriginalSourceIfNotAlreadyStored(ctExecutable.getPosition().getCompilationUnit());<NEW_LINE>patchTimer.start();<NEW_LINE>new TypeAccessReplacer(EnumSet.of(TypeAccessReplacer.Options.NoCheckParents)).scan(ctExecutable);<NEW_LINE>boolean patchApplied = tryApplyPatch(ctExecutable, smplRule);<NEW_LINE>patchTimer.stop();<NEW_LINE>if (patchApplied) {<NEW_LINE>System.out.println("... Patched!");<NEW_LINE>transformedCUs.put(ctExecutable.getPosition().getFile(), ctExecutable.getPosition().getCompilationUnit());<NEW_LINE>transformationCounter += 1;<NEW_LINE>} else {<NEW_LINE>System.out.print("\n");<NEW_LINE>}<NEW_LINE>tryPatchCounter += 1;<NEW_LINE>} finally {<NEW_LINE>procTimer.stop();<NEW_LINE>}<NEW_LINE>}
potentialMatch = smplRule.isPotentialMatch(ctExecutable);
344,979
private void fillButtonInfo(final TitleButtonController buttonController, View buttonView, TextView buttonText) {<NEW_LINE>if (buttonController != null) {<NEW_LINE>setupButton(buttonView, buttonController.enabled, createRightTextCaption(buttonController));<NEW_LINE>buttonView.setVisibility(buttonController.visible ? <MASK><NEW_LINE>Drawable startIcon = buttonController.getStartIcon();<NEW_LINE>Drawable endIcon = buttonController.getEndIcon();<NEW_LINE>AndroidUtils.setCompoundDrawablesWithIntrinsicBounds(buttonText, startIcon, null, endIcon, null);<NEW_LINE>buttonText.setCompoundDrawablePadding(view.getResources().getDimensionPixelSize(R.dimen.content_padding_half));<NEW_LINE>((LinearLayout) buttonView).setGravity(endIcon != null ? Gravity.END : Gravity.START);<NEW_LINE>buttonView.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>buttonController.buttonPressed();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>buttonView.setVisibility(View.INVISIBLE);<NEW_LINE>}<NEW_LINE>}
View.VISIBLE : View.INVISIBLE);
534,542
public final PropertyExpressionAtomicContext propertyExpressionAtomic() throws RecognitionException {<NEW_LINE>PropertyExpressionAtomicContext _localctx = new PropertyExpressionAtomicContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 394, RULE_propertyExpressionAtomic);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(2750);<NEW_LINE>match(LBRACK);<NEW_LINE>setState(2752);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (_la == SELECT) {<NEW_LINE>{<NEW_LINE>setState(2751);<NEW_LINE>propertyExpressionSelect();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(2754);<NEW_LINE>expression();<NEW_LINE>setState(2756);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (_la == ATCHAR) {<NEW_LINE>{<NEW_LINE>setState(2755);<NEW_LINE>typeExpressionAnnotation();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(2760);<NEW_LINE>_errHandler.sync(this);<NEW_LINE><MASK><NEW_LINE>if (_la == AS) {<NEW_LINE>{<NEW_LINE>setState(2758);<NEW_LINE>match(AS);<NEW_LINE>setState(2759);<NEW_LINE>((PropertyExpressionAtomicContext) _localctx).n = match(IDENT);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(2764);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (_la == WHERE) {<NEW_LINE>{<NEW_LINE>setState(2762);<NEW_LINE>match(WHERE);<NEW_LINE>setState(2763);<NEW_LINE>((PropertyExpressionAtomicContext) _localctx).where = expression();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(2766);<NEW_LINE>match(RBRACK);<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE>_errHandler.reportError(this, re);<NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
_la = _input.LA(1);
775,319
public NullnessHint onDataflowVisitMethodInvocation(MethodInvocationNode node, Types types, Context context, AccessPath.AccessPathContext apContext, AccessPathNullnessPropagation.SubNodeValues inputs, AccessPathNullnessPropagation.Updates thenUpdates, AccessPathNullnessPropagation.Updates elseUpdates, AccessPathNullnessPropagation.Updates bothUpdates) {<NEW_LINE>MethodInvocationTree tree = castToNonNull(node.getTree());<NEW_LINE>Symbol.MethodSymbol symbol = ASTHelpers.getSymbol(tree);<NEW_LINE>if (grpcIsMetadataContainsKeyCall(symbol, types)) {<NEW_LINE>// On seeing o.containsKey(k), set AP for o.get(k) to @NonNull<NEW_LINE>Element getter = getGetterForMetadataSubtype(symbol.enclClass(), types);<NEW_LINE>Node base = node.getTarget().getReceiver();<NEW_LINE>// Argument list and types should be already checked by grpcIsMetadataContainsKeyCall<NEW_LINE>Symbol keyArgSymbol = ASTHelpers.getSymbol(tree.getArguments().get(0));<NEW_LINE>if (getter != null && keyArgSymbol.getKind().equals(ElementKind.FIELD)) {<NEW_LINE>Symbol.VarSymbol varSymbol = (Symbol.VarSymbol) keyArgSymbol;<NEW_LINE>String immutableFieldFQN = varSymbol.enclClass().flatName().toString() + "." + varSymbol.flatName().toString();<NEW_LINE>String keyStr = AccessPath.immutableFieldNameAsConstantArgument(immutableFieldFQN);<NEW_LINE>List<String> constantArgs = new ArrayList<>(1);<NEW_LINE>constantArgs.add(keyStr);<NEW_LINE>AccessPath ap = AccessPath.fromBaseMethodAndConstantArgs(<MASK><NEW_LINE>if (ap != null) {<NEW_LINE>thenUpdates.set(ap, Nullness.NONNULL);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return NullnessHint.UNKNOWN;<NEW_LINE>}
base, getter, constantArgs, apContext);
983,254
private void registerNullChannel() {<NEW_LINE>if (this.beanFactory.containsBean(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME)) {<NEW_LINE>BeanDefinition nullChannelDefinition = null;<NEW_LINE>BeanFactory beanFactoryToUse = this.beanFactory;<NEW_LINE>do {<NEW_LINE>if (beanFactoryToUse instanceof ConfigurableListableBeanFactory) {<NEW_LINE>ConfigurableListableBeanFactory listable = (ConfigurableListableBeanFactory) beanFactoryToUse;<NEW_LINE>if (listable.containsBeanDefinition(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME)) {<NEW_LINE>nullChannelDefinition = listable.getBeanDefinition(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (beanFactoryToUse instanceof HierarchicalBeanFactory) {<NEW_LINE>beanFactoryToUse = ((HierarchicalBeanFactory) beanFactoryToUse).getParentBeanFactory();<NEW_LINE>}<NEW_LINE>} while (nullChannelDefinition == null);<NEW_LINE>if (!NullChannel.class.getName().equals(nullChannelDefinition.getBeanClassName())) {<NEW_LINE>throw new IllegalStateException(<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>this.registry.registerBeanDefinition(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME, new RootBeanDefinition(NullChannel.class, NullChannel::new));<NEW_LINE>}<NEW_LINE>}
"The bean name '" + IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME + "' is reserved.");
1,573,077
public boolean apply(Game game, Ability source) {<NEW_LINE>Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));<NEW_LINE>if (spell == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId());<NEW_LINE>if (sourceObject == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Player spellController = game.getPlayer(spell.getControllerId());<NEW_LINE>if (spellController == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), sourceObject.getZoneChangeCounter(game));<NEW_LINE>if (!spellController.moveCardsToExile(spell, source, game, true, exileZoneId, sourceObject.getIdName())) {<NEW_LINE>// The card didn't make it to exile, none of Knowledge Pool's effect applied<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// From here on down the function returns true since at least part of the effect went off<NEW_LINE>if (!spellController.chooseUse(Outcome.PlayForFree, "Cast another nonland card exiled with " + sourceObject.getLogName() + " without paying that card's mana cost?", source, game)) {<NEW_LINE>// Pleyer didn't want to cast another spell BUT their original spell was exiled with Knowledge Pool, so return true.<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>FilterNonlandCard filter = new FilterNonlandCard("nonland card exiled with Knowledge Pool");<NEW_LINE>filter.add(Predicates.not(new CardIdPredicate(spell.getSourceId())));<NEW_LINE>TargetCardInExile target = new TargetCardInExile(0, 1, filter, source.getSourceId());<NEW_LINE>target.setNotTarget(true);<NEW_LINE>if (!spellController.choose(Outcome.PlayForFree, game.getExile().getExileZone(exileZoneId), target, game)) {<NEW_LINE>// Player chose to not cast any ofthe spells<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Card card = game.getCard(target.getFirstTarget());<NEW_LINE>if (card == null || card.getId().equals(spell.getSourceId())) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE);<NEW_LINE>spellController.cast(spellController.chooseAbilityForCast(card, game, true), game, true, new ApprovingObject(source, game));<NEW_LINE>game.getState().setValue("PlayFromNotOwnHandZone" + <MASK><NEW_LINE>return true;<NEW_LINE>}
card.getId(), null);
1,498,580
// Lazy refresh of a plugin we think we know about.<NEW_LINE>private PluginHandle refresh(PluginHandle entry, StoragePluginConfig config) {<NEW_LINE>// Deleted or disabled in persistent storage?<NEW_LINE>if (config == null || !config.isEnabled()) {<NEW_LINE>// Move the old config to the ephemeral store.<NEW_LINE>try {<NEW_LINE>if (pluginCache.remove(entry.name()) == entry) {<NEW_LINE>moveToEphemeral(entry);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>} catch (PluginException e) {<NEW_LINE>// Should never occur, only if the persistent store where to<NEW_LINE>// somehow contain an entry with the same name as a system plugin.<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Unchanged?<NEW_LINE>if (entry.config().equals(config)) {<NEW_LINE>return entry;<NEW_LINE>}<NEW_LINE>// Plugin changed. Handle race condition on replacement.<NEW_LINE>PluginHandle newEntry = restoreFromEphemeral(entry.name(), config);<NEW_LINE>try {<NEW_LINE>if (pluginCache.replace(entry, newEntry)) {<NEW_LINE>moveToEphemeral(entry);<NEW_LINE>return newEntry;<NEW_LINE>} else {<NEW_LINE>return pluginCache.get(entry.name());<NEW_LINE>}<NEW_LINE>} catch (PluginException e) {<NEW_LINE>// Should never occur, only if the persistent store where to<NEW_LINE>// somehow contain an entry with the same name as a system plugin.<NEW_LINE>throw new IllegalStateException("Plugin refresh failed", e);<NEW_LINE>}<NEW_LINE>}
throw new IllegalStateException("Plugin refresh failed", e);
1,084,542
public StageDeclaration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>StageDeclaration stageDeclaration = new StageDeclaration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<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("name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>stageDeclaration.setName(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("blockers", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>stageDeclaration.setBlockers(new ListUnmarshaller<BlockerDeclaration>(BlockerDeclarationJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("actions", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>stageDeclaration.setActions(new ListUnmarshaller<ActionDeclaration>(ActionDeclarationJsonUnmarshaller.getInstance()).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 stageDeclaration;<NEW_LINE>}
class).unmarshall(context));
1,741,851
public boolean apply(Game game, Ability source) {<NEW_LINE>Player you = game.getPlayer(source.getControllerId());<NEW_LINE>Player targetPlayer = game.getPlayer(source.getFirstTarget());<NEW_LINE>if (targetPlayer != null && you != null) {<NEW_LINE>FilterCard filter = new FilterCard("card from your graveyard");<NEW_LINE>filter.add(new OwnerIdPredicate(targetPlayer.getId()));<NEW_LINE>TargetCardInGraveyard target = new TargetCardInGraveyard(filter);<NEW_LINE>boolean opponentChoosesExile = targetPlayer.chooseUse(Outcome.<MASK><NEW_LINE>boolean opponentExilesACard = false;<NEW_LINE>if (opponentChoosesExile && targetPlayer.chooseTarget(Outcome.Exile, target, source, game)) {<NEW_LINE>Card card = game.getCard(target.getFirstTarget());<NEW_LINE>if (card != null) {<NEW_LINE>opponentExilesACard = targetPlayer.moveCardToExileWithInfo(card, null, "", source, game, Zone.GRAVEYARD, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!opponentExilesACard) {<NEW_LINE>if (you.chooseUse(Outcome.DrawCard, "Draw a card?", source, game)) {<NEW_LINE>you.drawCards(1, source, game);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
Exile, "Exile a card from your graveyard?", source, game);
1,505,621
private static String inferName(CompilationInfo info, TreePath currentPath) {<NEW_LINE>Scope s = info.getTrees().getScope(currentPath);<NEW_LINE>Set<String> existingVariables = new HashSet<String>();<NEW_LINE>for (Element e : info.getElementUtilities().getLocalVars(s, new ElementAcceptor() {<NEW_LINE><NEW_LINE>public boolean accept(Element e, TypeMirror type) {<NEW_LINE>return e != null && (e.getKind() == ElementKind.PARAMETER || e.getKind() == ElementKind.LOCAL_VARIABLE || e.getKind() == ElementKind.EXCEPTION_PARAMETER);<NEW_LINE>}<NEW_LINE>})) {<NEW_LINE>existingVariables.add(e.<MASK><NEW_LINE>}<NEW_LINE>int index = 0;<NEW_LINE>while (true) {<NEW_LINE>String proposal = "ex" + (index == 0 ? "" : ("" + index));<NEW_LINE>if (!existingVariables.contains(proposal)) {<NEW_LINE>return proposal;<NEW_LINE>}<NEW_LINE>index++;<NEW_LINE>}<NEW_LINE>}
getSimpleName().toString());
1,597,707
private void readJSONEncodedItem(String key, SharedPreferences prefs, ReadableArguments options, Promise promise) {<NEW_LINE>String encryptedItemString = prefs.getString(key, null);<NEW_LINE>JSONObject encryptedItem;<NEW_LINE>try {<NEW_LINE>encryptedItem = new JSONObject(encryptedItemString);<NEW_LINE>} catch (JSONException e) {<NEW_LINE>Log.e(TAG, String.format("Could not parse stored value as JSON (key = %s, value = %s)", key, encryptedItemString), e);<NEW_LINE>promise.reject("E_SECURESTORE_JSON_ERROR", "Could not parse the encrypted JSON item in SecureStore");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String scheme = encryptedItem.optString(SCHEME_PROPERTY);<NEW_LINE>if (scheme == null) {<NEW_LINE>Log.e(TAG, String.format("Stored JSON object is missing a scheme (key = %s, value = %s)", key, encryptedItemString));<NEW_LINE>promise.reject("E_SECURESTORE_DECODE_ERROR", "Could not find the encryption scheme used for SecureStore item");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>switch(scheme) {<NEW_LINE>case AESEncrypter.NAME:<NEW_LINE>KeyStore.SecretKeyEntry secretKeyEntry = getKeyEntry(KeyStore.<MASK><NEW_LINE>mAESEncrypter.decryptItem(promise, encryptedItem, secretKeyEntry, options, mAuthenticationHelper.getDefaultCallback());<NEW_LINE>break;<NEW_LINE>case HybridAESEncrypter.NAME:<NEW_LINE>KeyStore.PrivateKeyEntry privateKeyEntry = getKeyEntry(KeyStore.PrivateKeyEntry.class, mHybridAESEncrypter, options);<NEW_LINE>mHybridAESEncrypter.decryptItem(promise, encryptedItem, privateKeyEntry, options, mAuthenticationHelper.getDefaultCallback());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>String message = String.format("The item for key \"%s\" in SecureStore has an unknown encoding scheme (%s)", key, scheme);<NEW_LINE>Log.e(TAG, message);<NEW_LINE>promise.reject("E_SECURESTORE_DECODE_ERROR", message);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>Log.w(TAG, e);<NEW_LINE>promise.reject("E_SECURESTORE_IO_ERROR", "There was an I/O error loading the keystore for SecureStore", e);<NEW_LINE>return;<NEW_LINE>} catch (GeneralSecurityException e) {<NEW_LINE>Log.w(TAG, e);<NEW_LINE>promise.reject("E_SECURESTORE_DECRYPT_ERROR", "Could not decrypt the item in SecureStore", e);<NEW_LINE>return;<NEW_LINE>} catch (JSONException e) {<NEW_LINE>Log.w(TAG, e);<NEW_LINE>promise.reject("E_SECURESTORE_DECODE_ERROR", "Could not decode the encrypted JSON item in SecureStore", e);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}
SecretKeyEntry.class, mAESEncrypter, options);
1,303,524
ArrayList<Object> new80() /* reduce AAfullmethodbody5MethodBody */<NEW_LINE>{<NEW_LINE>@SuppressWarnings("hiding")<NEW_LINE>ArrayList<Object> nodeList = new ArrayList<Object>();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<MASK><NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList2 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList1 = pop();<NEW_LINE>PMethodBody pmethodbodyNode1;<NEW_LINE>{<NEW_LINE>// Block<NEW_LINE>TLBrace tlbraceNode2;<NEW_LINE>LinkedList<Object> listNode3 = new LinkedList<Object>();<NEW_LINE>LinkedList<Object> listNode4 = new LinkedList<Object>();<NEW_LINE>LinkedList<Object> listNode6 = new LinkedList<Object>();<NEW_LINE>TRBrace trbraceNode7;<NEW_LINE>tlbraceNode2 = (TLBrace) nodeArrayList1.get(0);<NEW_LINE>{<NEW_LINE>// Block<NEW_LINE>}<NEW_LINE>{<NEW_LINE>// Block<NEW_LINE>}<NEW_LINE>{<NEW_LINE>// Block<NEW_LINE>LinkedList<Object> listNode5 = new LinkedList<Object>();<NEW_LINE>listNode5 = (LinkedList) nodeArrayList2.get(0);<NEW_LINE>if (listNode5 != null) {<NEW_LINE>listNode6.addAll(listNode5);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>trbraceNode7 = (TRBrace) nodeArrayList3.get(0);<NEW_LINE>pmethodbodyNode1 = new AFullMethodBody(tlbraceNode2, listNode3, listNode4, listNode6, trbraceNode7);<NEW_LINE>}<NEW_LINE>nodeList.add(pmethodbodyNode1);<NEW_LINE>return nodeList;<NEW_LINE>}
<Object> nodeArrayList3 = pop();
589,866
public Map<String, Object> props() {<NEW_LINE>Map<String, Object<MASK><NEW_LINE>props.put(Constants.KEY_DISTRIBUTION_EXECUTABLE, executable);<NEW_LINE>props.putAll(java.getResolvedExtraProperties());<NEW_LINE>safePut(Constants.KEY_DISTRIBUTION_JAVA_GROUP_ID, java.getGroupId(), props, true);<NEW_LINE>safePut(Constants.KEY_DISTRIBUTION_JAVA_ARTIFACT_ID, java.getArtifactId(), props, true);<NEW_LINE>safePut(Constants.KEY_DISTRIBUTION_JAVA_MAIN_CLASS, java.getMainClass(), props, true);<NEW_LINE>if (isNotBlank(java.getVersion())) {<NEW_LINE>props.put(Constants.KEY_DISTRIBUTION_JAVA_VERSION, java.getVersion());<NEW_LINE>SemVer jv = SemVer.of(java.getVersion());<NEW_LINE>safePut(Constants.KEY_DISTRIBUTION_JAVA_VERSION_MAJOR, jv.getMajor(), props, true);<NEW_LINE>safePut(Constants.KEY_DISTRIBUTION_JAVA_VERSION_MINOR, jv.getMinor(), props, true);<NEW_LINE>safePut(Constants.KEY_DISTRIBUTION_JAVA_VERSION_PATCH, jv.getPatch(), props, true);<NEW_LINE>safePut(Constants.KEY_DISTRIBUTION_JAVA_VERSION_TAG, jv.getTag(), props, true);<NEW_LINE>safePut(Constants.KEY_DISTRIBUTION_JAVA_VERSION_BUILD, jv.getBuild(), props, true);<NEW_LINE>} else {<NEW_LINE>props.put(Constants.KEY_DISTRIBUTION_JAVA_VERSION, "");<NEW_LINE>props.put(Constants.KEY_DISTRIBUTION_JAVA_VERSION_MAJOR, "");<NEW_LINE>props.put(Constants.KEY_DISTRIBUTION_JAVA_VERSION_MINOR, "");<NEW_LINE>props.put(Constants.KEY_DISTRIBUTION_JAVA_VERSION_PATCH, "");<NEW_LINE>props.put(Constants.KEY_DISTRIBUTION_JAVA_VERSION_TAG, "");<NEW_LINE>props.put(Constants.KEY_DISTRIBUTION_JAVA_VERSION_BUILD, "");<NEW_LINE>}<NEW_LINE>return props;<NEW_LINE>}
> props = super.props();
1,432,821
private Mono<PagedResponse<AnomalyIncident>> listIncidentsForAlertSinglePageAsync(String alertConfigurationId, String alertId, ListIncidentsAlertedOptions options, Context context) {<NEW_LINE>Objects.requireNonNull(alertConfigurationId, "'alertConfigurationId' is required.");<NEW_LINE><MASK><NEW_LINE>final Context withTracing = context.addData(AZ_TRACING_NAMESPACE_KEY, METRICS_ADVISOR_TRACING_NAMESPACE_VALUE);<NEW_LINE>return service.getIncidentsFromAlertByAnomalyAlertingConfigurationSinglePageAsync(UUID.fromString(alertConfigurationId), alertId, options == null ? null : options.getSkip(), options == null ? null : options.getMaxPageSize(), withTracing).doOnRequest(ignoredValue -> logger.info("Listing incidents for alert")).doOnSuccess(response -> logger.info("Listed incidents {}", response)).doOnError(error -> logger.warning("Failed to list the incidents for alert", error)).map(response -> IncidentTransforms.fromInnerPagedResponse(response));<NEW_LINE>}
Objects.requireNonNull(alertId, "'alertId' is required.");
1,190,933
private static boolean checkKeytool(String keytoolPath) {<NEW_LINE>final SystemCommand nativeCommand = new SystemCommand(null, null);<NEW_LINE>final List<String> arguments = new ArrayList<>();<NEW_LINE>arguments.add(keytoolPath);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>arguments.add("-help");<NEW_LINE>try {<NEW_LINE>int status = nativeCommand.run(arguments);<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("checkKeyTool:status=" + status);<NEW_LINE>log.debug(nativeCommand.getOutResult());<NEW_LINE>}<NEW_LINE>// TODO this is rather fragile<NEW_LINE><MASK><NEW_LINE>} catch (IOException ioe) {<NEW_LINE>log.info("Exception checking for keytool existence, will return false, try another way.");<NEW_LINE>log.debug("Exception is: ", ioe);<NEW_LINE>return false;<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>// NOSONAR<NEW_LINE>log.error("Command was interrupted\n" + nativeCommand.getOutResult(), e);<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>return false;<NEW_LINE>} catch (TimeoutException e) {<NEW_LINE>// NOSONAR<NEW_LINE>log.info("Timeout reached while checking for keytool existence, will return false, try another way.", e);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
return status == 0 || status == 1;
1,101,425
private void commonInit(MUser from, String to, String subject, String message, File attachment) {<NEW_LINE>m_client = MClient.<MASK><NEW_LINE>try {<NEW_LINE>int WindowNo = 0;<NEW_LINE>int AD_Column_ID = 0;<NEW_LINE>Lookup lookup = MLookupFactory.get(Env.getCtx(), WindowNo, AD_Column_ID, DisplayType.Search, Env.getLanguage(Env.getCtx()), "AD_User_ID", 0, false, "EMail IS NOT NULL");<NEW_LINE>fUser = new VLookup("AD_User_ID", false, false, true, lookup);<NEW_LINE>fUser.addVetoableChangeListener(this);<NEW_LINE>fCcUser = new VLookup("AD_User_ID", false, false, true, lookup);<NEW_LINE>fCcUser.addVetoableChangeListener(this);<NEW_LINE>jbInit();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>log.log(Level.SEVERE, "EMailDialog", ex);<NEW_LINE>}<NEW_LINE>set(from, to, subject, message);<NEW_LINE>setAttachment(attachment);<NEW_LINE>AEnv.showCenterScreen(this);<NEW_LINE>}
get(Env.getCtx());
702,065
private Mono<PagedResponse<ServerInner>> listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><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>final String apiVersion = "2017-12-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, accept, context).map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
1,563,566
public VoidResponse updatePort(String serverName, String userId, String portGUID, PortRequestBody requestBody) {<NEW_LINE>final String methodName = "updatePort";<NEW_LINE>RESTCallToken token = restCallLogger.<MASK><NEW_LINE>VoidResponse response = new VoidResponse();<NEW_LINE>AuditLog auditLog = null;<NEW_LINE>try {<NEW_LINE>auditLog = instanceHandler.getAuditLog(userId, serverName, methodName);<NEW_LINE>if (requestBody != null) {<NEW_LINE>ProcessExchangeHandler handler = instanceHandler.getProcessExchangeHandler(userId, serverName, methodName);<NEW_LINE>handler.updatePort(userId, requestBody.getMetadataCorrelationProperties(), portGUID, requestBody.getElementProperties(), methodName);<NEW_LINE>} else {<NEW_LINE>restExceptionHandler.handleNoRequestBody(userId, methodName, serverName);<NEW_LINE>}<NEW_LINE>} catch (Exception error) {<NEW_LINE>restExceptionHandler.captureExceptions(response, error, methodName, auditLog);<NEW_LINE>}<NEW_LINE>restCallLogger.logRESTCallReturn(token, response.toString());<NEW_LINE>return response;<NEW_LINE>}
logRESTCall(serverName, userId, methodName);
172,810
private void initComponents() {<NEW_LINE>// GEN-BEGIN:initComponents<NEW_LINE>scrollPane = new javax.swing.JScrollPane();<NEW_LINE>scriptPane = new javax.swing.JEditorPane();<NEW_LINE>hintsArea = new javax.swing.JTextArea();<NEW_LINE>setLayout(new java.awt.BorderLayout(0, 11));<NEW_LINE>scrollPane.setPreferredSize(new java.awt<MASK><NEW_LINE>scrollPane.setViewportView(scriptPane);<NEW_LINE>add(scrollPane, java.awt.BorderLayout.CENTER);<NEW_LINE>hintsArea.setBackground(new java.awt.Color(204, 204, 204));<NEW_LINE>hintsArea.setEditable(false);<NEW_LINE>hintsArea.setFont(javax.swing.UIManager.getFont("Label.font"));<NEW_LINE>hintsArea.setForeground(new java.awt.Color(102, 102, 153));<NEW_LINE>hintsArea.setLineWrap(true);<NEW_LINE>hintsArea.setText(NbBundle.getMessage(CustomizeScriptPanel.class, "CSP_TEXT_you_may_customize_gend2"));<NEW_LINE>hintsArea.setWrapStyleWord(true);<NEW_LINE>hintsArea.setDisabledTextColor(javax.swing.UIManager.getColor("Label.foreground"));<NEW_LINE>hintsArea.setEnabled(false);<NEW_LINE>hintsArea.setOpaque(false);<NEW_LINE>add(hintsArea, java.awt.BorderLayout.NORTH);<NEW_LINE>}
.Dimension(100, 100));
1,665,532
public List<T> mapRow(Result result, int rowNum) throws Exception {<NEW_LINE>if (result.isEmpty()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>final byte[] distributedRowKey = result.getRow();<NEW_LINE>final String applicationId = this.hbaseOperationFactory.getApplicationId(distributedRowKey);<NEW_LINE>final long baseTimestamp = this.hbaseOperationFactory.getBaseTimestamp(distributedRowKey);<NEW_LINE>List<T> dataPoints = new ArrayList<>();<NEW_LINE>for (Cell cell : result.rawCells()) {<NEW_LINE>if (CellUtil.matchingFamily(cell, HbaseColumnFamily.APPLICATION_STAT_STATISTICS.getName())) {<NEW_LINE>Buffer qualifierBuffer = new OffsetFixedBuffer(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());<NEW_LINE>Buffer valueBuffer = new OffsetFixedBuffer(cell.getValueArray(), cell.getValueOffset(<MASK><NEW_LINE>long timestampDelta = this.decoder.decodeQualifier(qualifierBuffer);<NEW_LINE>ApplicationStatDecodingContext decodingContext = new ApplicationStatDecodingContext();<NEW_LINE>decodingContext.setApplicationId(applicationId);<NEW_LINE>decodingContext.setBaseTimestamp(baseTimestamp);<NEW_LINE>decodingContext.setTimestampDelta(timestampDelta);<NEW_LINE>List<T> candidates = this.decoder.decodeValue(valueBuffer, decodingContext);<NEW_LINE>for (T candidate : candidates) {<NEW_LINE>long timestamp = candidate.getTimestamp();<NEW_LINE>if (this.filter.filter(timestamp)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>dataPoints.add(candidate);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Reverse sort as timestamp is stored in a reversed order.<NEW_LINE>dataPoints.sort(REVERSE_TIMESTAMP_COMPARATOR);<NEW_LINE>return dataPoints;<NEW_LINE>}
), cell.getValueLength());
1,666,726
final PutParameterResult executePutParameter(PutParameterRequest putParameterRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putParameterRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutParameterRequest> request = null;<NEW_LINE>Response<PutParameterResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutParameterRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putParameterRequest));<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, "SSM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutParameter");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutParameterResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutParameterResultJsonUnmarshaller());<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>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
929,513
public SubmissionCCLicenseUrlRest findByRightsByQuestions() {<NEW_LINE>ServletRequest servletRequest = requestService.getCurrentRequest().getServletRequest();<NEW_LINE>Map<String, String[]> requestParameterMap = servletRequest.getParameterMap();<NEW_LINE>Map<String, String> parameterMap = new HashMap<>();<NEW_LINE>String licenseId = servletRequest.getParameter("license");<NEW_LINE>if (StringUtils.isBlank(licenseId)) {<NEW_LINE>throw new DSpaceBadRequestException("A \"license\" parameter needs to be provided.");<NEW_LINE>}<NEW_LINE>// Loop through parameters to find answer parameters, adding them to the parameterMap. Zero or more answers<NEW_LINE>// may exist, as some CC licenses do not require answers<NEW_LINE>for (String parameter : requestParameterMap.keySet()) {<NEW_LINE>if (StringUtils.startsWith(parameter, "answer_")) {<NEW_LINE>String field = StringUtils.substringAfter(parameter, "answer_");<NEW_LINE>String answer = "";<NEW_LINE>if (requestParameterMap.get(parameter).length > 0) {<NEW_LINE>answer = requestParameterMap<MASK><NEW_LINE>}<NEW_LINE>parameterMap.put(field, answer);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Map<String, String> fullParamMap = creativeCommonsService.retrieveFullAnswerMap(licenseId, parameterMap);<NEW_LINE>if (fullParamMap == null) {<NEW_LINE>throw new ResourceNotFoundException("No CC License could be matched on the provided ID: " + licenseId);<NEW_LINE>}<NEW_LINE>boolean licenseContainsCorrectInfo = creativeCommonsService.verifyLicenseInformation(licenseId, fullParamMap);<NEW_LINE>if (!licenseContainsCorrectInfo) {<NEW_LINE>throw new DSpaceBadRequestException("The provided answers do not match the required fields for the provided license.");<NEW_LINE>}<NEW_LINE>String licenseUri = creativeCommonsService.retrieveLicenseUri(licenseId, fullParamMap);<NEW_LINE>SubmissionCCLicenseUrl submissionCCLicenseUrl = new SubmissionCCLicenseUrl(licenseUri, licenseUri);<NEW_LINE>if (StringUtils.isBlank(licenseUri)) {<NEW_LINE>throw new ResourceNotFoundException("No CC License URI could be found for ID: " + licenseId);<NEW_LINE>}<NEW_LINE>return converter.toRest(submissionCCLicenseUrl, utils.obtainProjection());<NEW_LINE>}
.get(parameter)[0];
1,085,582
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.sitewhere.spi.device.communication.IDeviceStreamManager#<NEW_LINE>* handleDeviceStreamRequest (java.lang.String,<NEW_LINE>* com.sitewhere.spi.device.event.request.IDeviceStreamCreateRequest)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void handleDeviceStreamRequest(String deviceToken, IDeviceStreamCreateRequest request) throws SiteWhereException {<NEW_LINE>List<? extends IDeviceAssignment> assignments = getActiveAssignments(deviceToken);<NEW_LINE>DeviceStreamAckCommand ack = new DeviceStreamAckCommand();<NEW_LINE>try {<NEW_LINE>// TODO: Send to all active assignments?<NEW_LINE>getDeviceStreamManagement().createDeviceStream(assignments.get(0<MASK><NEW_LINE>ack.setStatus(DeviceStreamStatus.DeviceStreamCreated);<NEW_LINE>} catch (SiteWhereException e) {<NEW_LINE>getLogger().error("Unable to create device stream.", e);<NEW_LINE>ack.setStatus(DeviceStreamStatus.DeviceStreamFailed);<NEW_LINE>}<NEW_LINE>// getDeviceCommunication(getTenantEngine().getTenant()).deliverSystemCommand(hardwareId,<NEW_LINE>// ack);<NEW_LINE>}
).getId(), request);
883,798
private Tag trimNSAttributes(Tag tag) {<NEW_LINE>TagAttribute[] attr = tag.getAttributes().getAll();<NEW_LINE>int remove = 0;<NEW_LINE>for (int i = 0; i < attr.length; i++) {<NEW_LINE>if (attr[i].getQName().startsWith("xmlns") && this.tagLibrary.containsNamespace(attr[i].getValue())) {<NEW_LINE>remove |= 1 << i;<NEW_LINE>if (log.isLoggable(Level.FINE)) {<NEW_LINE>log.fine(attr[i] + " Namespace Bound to TagLibrary");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (remove == 0) {<NEW_LINE>return tag;<NEW_LINE>} else {<NEW_LINE>List<TagAttribute> attrList = new ArrayList<TagAttribute>(attr.length);<NEW_LINE>int p = 0;<NEW_LINE>for (int i = 0; i < attr.length; i++) {<NEW_LINE>p = 1 << i;<NEW_LINE>if ((p & remove) == p) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>attrList<MASK><NEW_LINE>}<NEW_LINE>attr = attrList.toArray(new TagAttribute[attrList.size()]);<NEW_LINE>return new Tag(tag.getLocation(), tag.getNamespace(), tag.getLocalName(), tag.getQName(), new TagAttributesImpl(attr));<NEW_LINE>}<NEW_LINE>}
.add(attr[i]);
126,852
// DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static boolean equals0(com.sun.jdi.ByteValue a, java.lang.Object b) {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallStart("com.sun.jdi.ByteValue", "equals", "JDI CALL: com.sun.jdi.ByteValue({0}).equals({1})", new Object[] { a, b });<NEW_LINE>}<NEW_LINE>Object retValue = null;<NEW_LINE>try {<NEW_LINE>boolean ret;<NEW_LINE><MASK><NEW_LINE>retValue = ret;<NEW_LINE>return ret;<NEW_LINE>} catch (com.sun.jdi.InternalException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.report(ex);<NEW_LINE>return false;<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>if (a instanceof com.sun.jdi.Mirror) {<NEW_LINE>com.sun.jdi.VirtualMachine vm = ((com.sun.jdi.Mirror) a).virtualMachine();<NEW_LINE>try {<NEW_LINE>vm.dispose();<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException vmdex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>} catch (Error err) {<NEW_LINE>retValue = err;<NEW_LINE>throw err;<NEW_LINE>} catch (RuntimeException rex) {<NEW_LINE>retValue = rex;<NEW_LINE>throw rex;<NEW_LINE>} finally {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallEnd("com.sun.jdi.ByteValue", "equals", retValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ret = a.equals(b);
1,050,919
public final void parseNodeBody2(final MicroCache2 mc, final OsmNodesMap hollowNodes, final IByteArrayUnifier expCtxWay) {<NEW_LINE>final ByteArrayUnifier abUnifier = hollowNodes.getByteArrayUnifier();<NEW_LINE>// read turn restrictions<NEW_LINE>while (mc.readBoolean()) {<NEW_LINE>final TurnRestriction tr = new TurnRestriction();<NEW_LINE>tr.exceptions = mc.readShort();<NEW_LINE>tr.isPositive = mc.readBoolean();<NEW_LINE>tr.fromLon = mc.readInt();<NEW_LINE>tr<MASK><NEW_LINE>tr.toLon = mc.readInt();<NEW_LINE>tr.toLat = mc.readInt();<NEW_LINE>addTurnRestriction(tr);<NEW_LINE>}<NEW_LINE>selev = mc.readShort();<NEW_LINE>final int nodeDescSize = mc.readVarLengthUnsigned();<NEW_LINE>nodeDescription = nodeDescSize == 0 ? null : mc.readUnified(nodeDescSize, abUnifier);<NEW_LINE>while (mc.hasMoreData()) {<NEW_LINE>// read link data<NEW_LINE>final int endPointer = mc.getEndPointer();<NEW_LINE>final int linklon = ilon + mc.readVarLengthSigned();<NEW_LINE>final int linklat = ilat + mc.readVarLengthSigned();<NEW_LINE>final int sizecode = mc.readVarLengthUnsigned();<NEW_LINE>final boolean isReverse = (sizecode & 1) != 0;<NEW_LINE>byte[] description = null;<NEW_LINE>final int descSize = sizecode >> 1;<NEW_LINE>if (descSize > 0) {<NEW_LINE>description = mc.readUnified(descSize, expCtxWay);<NEW_LINE>}<NEW_LINE>final byte[] geometry = mc.readDataUntil(endPointer);<NEW_LINE>addLink(linklon, linklat, description, geometry, hollowNodes, isReverse);<NEW_LINE>}<NEW_LINE>hollowNodes.remove(this);<NEW_LINE>}
.fromLat = mc.readInt();
602,859
public void checkCapturedLocalInitializationIfNecessary(ReferenceBinding checkedType, BlockScope currentScope, FlowInfo flowInfo) {<NEW_LINE>if (((checkedType.tagBits & (TagBits.AnonymousTypeMask | TagBits.LocalTypeMask)) == TagBits.LocalTypeMask) && !currentScope.isDefinedInType(checkedType)) {<NEW_LINE>// only check external allocations<NEW_LINE>NestedTypeBinding nestedType = (NestedTypeBinding) checkedType;<NEW_LINE>SyntheticArgumentBinding[] syntheticArguments = nestedType.syntheticOuterLocalVariables();<NEW_LINE>if (syntheticArguments != null)<NEW_LINE>for (int i = 0, count = syntheticArguments.length; i < count; i++) {<NEW_LINE>SyntheticArgumentBinding syntheticArgument = syntheticArguments[i];<NEW_LINE>LocalVariableBinding targetLocal;<NEW_LINE>if ((targetLocal = syntheticArgument.actualOuterLocalVariable) == null)<NEW_LINE>continue;<NEW_LINE>if (targetLocal.declaration != null && !flowInfo.isDefinitelyAssigned(targetLocal)) {<NEW_LINE>currentScope.problemReporter().<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
uninitializedLocalVariable(targetLocal, this, currentScope);
232,857
final DescribeAuditFindingResult executeDescribeAuditFinding(DescribeAuditFindingRequest describeAuditFindingRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeAuditFindingRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeAuditFindingRequest> request = null;<NEW_LINE>Response<DescribeAuditFindingResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new DescribeAuditFindingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAuditFindingRequest));<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, "IoT");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAuditFinding");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeAuditFindingResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAuditFindingResultJsonUnmarshaller());<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>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
555,905
private void logRhsFieldAccExprErrors(BLangFieldBasedAccess fieldAccessExpr, BType varRefType, Name fieldName, AnalyzerData data) {<NEW_LINE>if (varRefType.tag == TypeTags.RECORD) {<NEW_LINE>BRecordType recordVarRefType = (BRecordType) varRefType;<NEW_LINE>boolean isFieldDeclared = recordVarRefType.getFields().containsKey(fieldName.getValue());<NEW_LINE>if (isFieldDeclared) {<NEW_LINE>// The field being accessed using the field access expression is declared as an optional field<NEW_LINE>dlog.error(fieldAccessExpr.pos, DiagnosticErrorCode.FIELD_ACCESS_CANNOT_BE_USED_TO_ACCESS_OPTIONAL_FIELDS);<NEW_LINE>} else if (recordVarRefType.sealed) {<NEW_LINE>// Accessing an undeclared field in a close record<NEW_LINE>dlog.error(fieldAccessExpr.pos, DiagnosticErrorCode.UNDECLARED_FIELD_IN_RECORD, fieldName, varRefType);<NEW_LINE>} else {<NEW_LINE>// The field accessed is either not declared or maybe declared as a rest field in an open record<NEW_LINE>dlog.error(fieldAccessExpr.pos, DiagnosticErrorCode.INVALID_FIELD_ACCESS_IN_RECORD_TYPE, fieldName, varRefType);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// If the type is not a record, it needs to be a union of records<NEW_LINE>LinkedHashSet<BType> memberTypes = ((BUnionType) varRefType).getMemberTypes();<NEW_LINE>RecordUnionDiagnostics recUnionInfo = checkRecordUnion(fieldAccessExpr, memberTypes, fieldName, data);<NEW_LINE>if (recUnionInfo.hasNilableAndUndeclared()) {<NEW_LINE>dlog.error(fieldAccessExpr.pos, DiagnosticErrorCode.UNDECLARED_AND_NILABLE_FIELDS_IN_UNION_OF_RECORDS, fieldName, recUnionInfo.recordsToString(recUnionInfo.undeclaredInRecords), recUnionInfo<MASK><NEW_LINE>} else if (recUnionInfo.hasUndeclared()) {<NEW_LINE>dlog.error(fieldAccessExpr.pos, DiagnosticErrorCode.UNDECLARED_FIELD_IN_UNION_OF_RECORDS, fieldName, recUnionInfo.recordsToString(recUnionInfo.undeclaredInRecords));<NEW_LINE>} else if (recUnionInfo.hasNilable()) {<NEW_LINE>dlog.error(fieldAccessExpr.pos, DiagnosticErrorCode.NILABLE_FIELD_IN_UNION_OF_RECORDS, fieldName, recUnionInfo.recordsToString(recUnionInfo.nilableInRecords));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.recordsToString(recUnionInfo.nilableInRecords));
280,838
public DataBuffer create(Pointer pointer, Pointer specialPointer, DataType type, long length, Indexer indexer) {<NEW_LINE>switch(type) {<NEW_LINE>case UINT64:<NEW_LINE>return new CudaUInt64DataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case LONG:<NEW_LINE>return new CudaLongDataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case UINT32:<NEW_LINE>return new CudaUInt32DataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case INT:<NEW_LINE>return new CudaIntDataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case UINT16:<NEW_LINE>return new CudaUInt16DataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case SHORT:<NEW_LINE>return new CudaShortDataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case UBYTE:<NEW_LINE>return new CudaUByteDataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case BYTE:<NEW_LINE>return new CudaByteDataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case DOUBLE:<NEW_LINE>return new CudaDoubleDataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case FLOAT:<NEW_LINE>return new CudaFloatDataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case HALF:<NEW_LINE>return new CudaHalfDataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case BFLOAT16:<NEW_LINE>return new CudaBfloat16DataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>case BOOL:<NEW_LINE>return new CudaBoolDataBuffer(pointer, specialPointer, indexer, length);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
throw new IllegalArgumentException("Illegal dtype " + type);
126,061
public void predictions(PredictionsRequest request, StreamObserver<PredictionResponse> responseObserver) {<NEW_LINE>String modelName = request.getModelName();<NEW_LINE>String modelVersion = request.getModelVersion();<NEW_LINE>if (modelName == null || "".equals(modelName)) {<NEW_LINE>BadRequestException e = new BadRequestException("Parameter model_name is required.");<NEW_LINE>sendErrorResponse(responseObserver, Status.INTERNAL, e, "BadRequestException.()");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (modelVersion == null || "".equals(modelVersion)) {<NEW_LINE>modelVersion = null;<NEW_LINE>}<NEW_LINE>String requestId = UUID.randomUUID().toString();<NEW_LINE>RequestInput inputData = new RequestInput(requestId);<NEW_LINE>for (Map.Entry<String, ByteString> entry : request.getInputMap().entrySet()) {<NEW_LINE>inputData.addParameter(new InputParameter(entry.getKey(), entry.getValue<MASK><NEW_LINE>}<NEW_LINE>MetricAggregator.handleInferenceMetric(modelName, modelVersion);<NEW_LINE>Job job = new GRPCJob(responseObserver, modelName, modelVersion, WorkerCommands.PREDICT, inputData);<NEW_LINE>try {<NEW_LINE>if (!ModelManager.getInstance().addJob(job)) {<NEW_LINE>String responseMessage = ApiUtils.getInferenceErrorResponseMessage(modelName, modelVersion);<NEW_LINE>InternalServerException e = new InternalServerException(responseMessage);<NEW_LINE>sendErrorResponse(responseObserver, Status.INTERNAL, e, "InternalServerException.()");<NEW_LINE>}<NEW_LINE>} catch (ModelNotFoundException | ModelVersionNotFoundException e) {<NEW_LINE>sendErrorResponse(responseObserver, Status.INTERNAL, e, null);<NEW_LINE>}<NEW_LINE>}
().toByteArray()));
959,176
final AssumeRoleWithSAMLResult executeAssumeRoleWithSAML(AssumeRoleWithSAMLRequest assumeRoleWithSAMLRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(assumeRoleWithSAMLRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AssumeRoleWithSAMLRequest> request = null;<NEW_LINE>Response<AssumeRoleWithSAMLResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new AssumeRoleWithSAMLRequestMarshaller().marshall(super.beforeMarshalling(assumeRoleWithSAMLRequest));<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, "STS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssumeRoleWithSAML");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<AssumeRoleWithSAMLResult> responseHandler = new StaxResponseHandler<<MASK><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>}
AssumeRoleWithSAMLResult>(new AssumeRoleWithSAMLResultStaxUnmarshaller());
1,117,774
public SetterDetails analyze(Class<?> setterType) {<NEW_LINE>Objects.requireNonNull(setterType, "setterType");<NEW_LINE>if (!setterType.isInterface()) {<NEW_LINE>throw new IllegalArgumentException("setterType " + setterType + "is not an interface");<NEW_LINE>}<NEW_LINE>Method[<MASK><NEW_LINE>if (methods.length != 1) {<NEW_LINE>throw new IllegalArgumentException("Setter interface must have only one method: " + setterType.getName());<NEW_LINE>}<NEW_LINE>Method setter = methods[0];<NEW_LINE>Class<?>[] arguments = setter.getParameterTypes();<NEW_LINE>if (arguments.length != 1) {<NEW_LINE>throw new IllegalArgumentException("Setter interface method must have exactly 1 argument: " + setterType.getName());<NEW_LINE>}<NEW_LINE>Class<?> fieldType = arguments[0];<NEW_LINE>Class<?> returnType = setter.getReturnType();<NEW_LINE>if (returnType != void.class) {<NEW_LINE>throw new IllegalArgumentException("Setter must have return type void: " + setterType.getName());<NEW_LINE>}<NEW_LINE>return new SetterDetails(setter, fieldType);<NEW_LINE>}
] methods = setterType.getDeclaredMethods();
882,952
// DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static com.sun.jdi.VoidValue mirrorOfVoid(com.sun.jdi.VirtualMachine a) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallStart("com.sun.jdi.VirtualMachine", "mirrorOfVoid", "JDI CALL: com.sun.jdi.VirtualMachine({0}).mirrorOfVoid()", new Object[] { a });<NEW_LINE>}<NEW_LINE>Object retValue = null;<NEW_LINE>try {<NEW_LINE>com.sun.jdi.VoidValue ret;<NEW_LINE>ret = a.mirrorOfVoid();<NEW_LINE>retValue = ret;<NEW_LINE>return ret;<NEW_LINE>} catch (com.sun.jdi.InternalException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.report(ex);<NEW_LINE>throw new org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper(ex);<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>if (a instanceof com.sun.jdi.Mirror) {<NEW_LINE>com.sun.jdi.VirtualMachine vm = ((com.sun.jdi.<MASK><NEW_LINE>try {<NEW_LINE>vm.dispose();<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException vmdex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper(ex);<NEW_LINE>} catch (Error err) {<NEW_LINE>retValue = err;<NEW_LINE>throw err;<NEW_LINE>} catch (RuntimeException rex) {<NEW_LINE>retValue = rex;<NEW_LINE>throw rex;<NEW_LINE>} finally {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallEnd("com.sun.jdi.VirtualMachine", "mirrorOfVoid", retValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Mirror) a).virtualMachine();
1,305,649
private void onBoundedFling(float velocityX, float velocityY) {<NEW_LINE>int xOffset = (int) pdfView.getCurrentXOffset();<NEW_LINE>int yOffset = (int) pdfView.getCurrentYOffset();<NEW_LINE>PdfFile pdfFile = pdfView.pdfFile;<NEW_LINE>float pageStart = -pdfFile.getPageOffset(pdfView.getCurrentPage(), pdfView.getZoom());<NEW_LINE>float pageEnd = pageStart - pdfFile.getPageLength(pdfView.getCurrentPage(<MASK><NEW_LINE>float minX, minY, maxX, maxY;<NEW_LINE>if (pdfView.isSwipeVertical()) {<NEW_LINE>minX = -(pdfView.toCurrentScale(pdfFile.getMaxPageWidth()) - pdfView.getWidth());<NEW_LINE>minY = pageEnd + pdfView.getHeight();<NEW_LINE>maxX = 0;<NEW_LINE>maxY = pageStart;<NEW_LINE>} else {<NEW_LINE>minX = pageEnd + pdfView.getWidth();<NEW_LINE>minY = -(pdfView.toCurrentScale(pdfFile.getMaxPageHeight()) - pdfView.getHeight());<NEW_LINE>maxX = pageStart;<NEW_LINE>maxY = 0;<NEW_LINE>}<NEW_LINE>animationManager.startFlingAnimation(xOffset, yOffset, (int) (velocityX), (int) (velocityY), (int) minX, (int) maxX, (int) minY, (int) maxY);<NEW_LINE>}
), pdfView.getZoom());
1,250,296
public ProcessStatus handleClearExisting(final PwmRequest pwmRequest) throws PwmUnrecoverableException, ChaiUnavailableException, IOException {<NEW_LINE>LOGGER.trace(pwmRequest, () -> "request for response clear received");<NEW_LINE>final PwmDomain pwmDomain = pwmRequest.getPwmDomain();<NEW_LINE>final PwmSession pwmSession = pwmRequest.getPwmSession();<NEW_LINE>try {<NEW_LINE>final String userGUID = pwmSession.getUserInfo().getUserGuid();<NEW_LINE>final ChaiUser theUser = pwmSession.getSessionManager().getActor();<NEW_LINE>pwmDomain.getCrService().clearResponses(pwmRequest.getLabel(), pwmRequest.getUserInfoIfLoggedIn(), theUser, userGUID);<NEW_LINE>pwmSession.reloadUserInfoBean(pwmRequest);<NEW_LINE>pwmRequest.getPwmDomain().getSessionStateService().clearBean(pwmRequest, SetupResponsesBean.class);<NEW_LINE>// mark the event log<NEW_LINE>final UserAuditRecord auditRecord = AuditRecordFactory.make(pwmRequest).createUserAuditRecord(AuditEvent.CLEAR_RESPONSES, pwmSession.getUserInfo(), pwmSession);<NEW_LINE>AuditServiceClient.submit(pwmRequest, auditRecord);<NEW_LINE>pwmRequest.getPwmResponse().sendRedirect(PwmServletDefinition.SetupResponses);<NEW_LINE>} catch (final PwmOperationalException e) {<NEW_LINE>LOGGER.debug(pwmRequest, e.getErrorInformation());<NEW_LINE>setLastError(<MASK><NEW_LINE>}<NEW_LINE>return ProcessStatus.Continue;<NEW_LINE>}
pwmRequest, e.getErrorInformation());
1,442,314
public RuleGroupSourceStatelessRuleMatchAttributesSourcePorts unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RuleGroupSourceStatelessRuleMatchAttributesSourcePorts ruleGroupSourceStatelessRuleMatchAttributesSourcePorts = new RuleGroupSourceStatelessRuleMatchAttributesSourcePorts();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<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("FromPort", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>ruleGroupSourceStatelessRuleMatchAttributesSourcePorts.setFromPort(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("ToPort", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>ruleGroupSourceStatelessRuleMatchAttributesSourcePorts.setToPort(context.getUnmarshaller(Integer.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 ruleGroupSourceStatelessRuleMatchAttributesSourcePorts;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,030,318
public double tableCardinality(RelOptTable table) {<NEW_LINE>final JdbcTable jdbcTable = table.unwrap(JdbcTable.class);<NEW_LINE>return withBuilder(jdbcTable.jdbcSchema, (cluster, relOptSchema, jdbcSchema, relBuilder) -> {<NEW_LINE>// Generate:<NEW_LINE>// SELECT COUNT(*) FROM `EMP`<NEW_LINE>relBuilder.push(table.toRel(ViewExpanders.simpleContext(cluster))).aggregate(relBuilder.groupKey(), relBuilder.count());<NEW_LINE>final String sql = toSql(relBuilder.build(), jdbcSchema.dialect);<NEW_LINE>final DataSource dataSource = jdbcSchema.getDataSource();<NEW_LINE>try (Connection connection = dataSource.getConnection();<NEW_LINE>Statement statement = connection.createStatement();<NEW_LINE>ResultSet resultSet = statement.executeQuery(sql)) {<NEW_LINE>if (!resultSet.next()) {<NEW_LINE>throw new AssertionError("expected exactly 1 row: " + sql);<NEW_LINE>}<NEW_LINE>final double cardinality = resultSet.getDouble(1);<NEW_LINE>if (resultSet.next()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return cardinality;<NEW_LINE>} catch (SQLException e) {<NEW_LINE>throw handle(e, sql);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
throw new AssertionError("expected exactly 1 row: " + sql);
484,912
public void nextPDU() throws IOException {<NEW_LINE>checkThread();<NEW_LINE>Association.<MASK><NEW_LINE>readFully(0, 10);<NEW_LINE>pos = 0;<NEW_LINE>pdutype = get();<NEW_LINE>get();<NEW_LINE>pdulen = getInt();<NEW_LINE>Association.LOG.trace("{} >> PDU[type={}, len={}]", new Object[] { as, pdutype, pdulen & 0xFFFFFFFFL });<NEW_LINE>switch(pdutype) {<NEW_LINE>case PDUType.A_ASSOCIATE_RQ:<NEW_LINE>readPDU();<NEW_LINE>as.onAAssociateRQ((AAssociateRQ) decode(new AAssociateRQ()));<NEW_LINE>return;<NEW_LINE>case PDUType.A_ASSOCIATE_AC:<NEW_LINE>readPDU();<NEW_LINE>as.onAAssociateAC((AAssociateAC) decode(new AAssociateAC()));<NEW_LINE>return;<NEW_LINE>case PDUType.P_DATA_TF:<NEW_LINE>readPDU();<NEW_LINE>as.onPDataTF();<NEW_LINE>return;<NEW_LINE>case PDUType.A_ASSOCIATE_RJ:<NEW_LINE>checkPDULength(4);<NEW_LINE>get();<NEW_LINE>as.onAAssociateRJ(new AAssociateRJ(get(), get(), get()));<NEW_LINE>break;<NEW_LINE>case PDUType.A_RELEASE_RQ:<NEW_LINE>checkPDULength(4);<NEW_LINE>as.onAReleaseRQ();<NEW_LINE>break;<NEW_LINE>case PDUType.A_RELEASE_RP:<NEW_LINE>checkPDULength(4);<NEW_LINE>as.onAReleaseRP();<NEW_LINE>break;<NEW_LINE>case PDUType.A_ABORT:<NEW_LINE>checkPDULength(4);<NEW_LINE>get();<NEW_LINE>get();<NEW_LINE>as.onAAbort(new AAbort(get(), get()));<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>abort(AAbort.UNRECOGNIZED_PDU, UNRECOGNIZED_PDU);<NEW_LINE>}<NEW_LINE>}
LOG.trace("{}: waiting for PDU", as);
523,838
public InputComponent errorMessage(String errorMessage) {<NEW_LINE>String col = getUIManager().getThemeConstant("textComponentErrorColor", null);<NEW_LINE>boolean line = getUIManager().isThemeConstant("textComponentErrorLineBorderBool", true);<NEW_LINE>if (errorMessage == null || errorMessage.length() == 0) {<NEW_LINE>// no need for double showing of error<NEW_LINE>if (this.errorMessageImpl.getText().length() == 0) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>// clear the error mode<NEW_LINE>this.errorMessageImpl.setText("");<NEW_LINE>if (col != null) {<NEW_LINE>lbl.setUIID(lbl.getUIID());<NEW_LINE>getEditor().setUIID(getEditor().getUIID());<NEW_LINE>}<NEW_LINE>descriptionMessage.setVisible(true);<NEW_LINE>} else {<NEW_LINE>descriptionMessage.setVisible(false);<NEW_LINE>this.errorMessageImpl.setText(errorMessage);<NEW_LINE>if (col != null) {<NEW_LINE>int val = Integer.parseInt(col, 16);<NEW_LINE>lbl.getAllStyles().setFgColor(val);<NEW_LINE>// only show the line border error if the component is designed to allow it<NEW_LINE>if (line) {<NEW_LINE>Border b = Border.createUnderlineBorder(2, val);<NEW_LINE>getEditor().<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>refreshForGuiBuilder();<NEW_LINE>return this;<NEW_LINE>}
getAllStyles().setBorder(b);
431,701
private void initializeSetTaskFactories() {<NEW_LINE>factories.put(SetRemoveListenerCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetRemoveListenerMessageTask(cm, node, con));<NEW_LINE>factories.put(SetClearCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetClearMessageTask(cm, node, con));<NEW_LINE>factories.put(SetCompareAndRemoveAllCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetCompareAndRemoveAllMessageTask(cm, node, con));<NEW_LINE>factories.put(SetContainsAllCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetContainsAllMessageTask(cm, node, con));<NEW_LINE>factories.put(SetIsEmptyCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetIsEmptyMessageTask(cm, node, con));<NEW_LINE>factories.put(SetAddAllCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetAddAllMessageTask(cm, node, con));<NEW_LINE>factories.put(SetAddCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetAddMessageTask(cm, node, con));<NEW_LINE>factories.put(SetCompareAndRetainAllCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetCompareAndRetainAllMessageTask(cm, node, con));<NEW_LINE>factories.put(SetGetAllCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetGetAllMessageTask(cm, node, con));<NEW_LINE>factories.put(SetRemoveCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetRemoveMessageTask<MASK><NEW_LINE>factories.put(SetAddListenerCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetAddListenerMessageTask(cm, node, con));<NEW_LINE>factories.put(SetContainsCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetContainsMessageTask(cm, node, con));<NEW_LINE>factories.put(SetSizeCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new SetSizeMessageTask(cm, node, con));<NEW_LINE>}
(cm, node, con));
326,108
public static String toMemoryUnits(double value) {<NEW_LINE>if (value == 0) {<NEW_LINE>return "0";<NEW_LINE>}<NEW_LINE>if (value < (10l << 10)) {<NEW_LINE>String val = String.format("%.2f", value).trim();<NEW_LINE>if (val.endsWith(".00")) {<NEW_LINE>val = val.substring(0, val.length() - 3);<NEW_LINE>} else if (val.indexOf('.') > 0 && val.endsWith("0")) {<NEW_LINE>val = val.substring(0, val.length() - 1);<NEW_LINE>}<NEW_LINE>return val;<NEW_LINE>} else if (value < (1l << 20)) {<NEW_LINE>return String.format("%5.4gKi", value / (1l << 10)).trim();<NEW_LINE>} else if (value < (1l << 30)) {<NEW_LINE>return String.format("%5.4gMi", value / (1l <MASK><NEW_LINE>} else if (value < (1l << 40)) {<NEW_LINE>return String.format("%5.4gGi", value / (1l << 30)).trim();<NEW_LINE>} else {<NEW_LINE>return String.format("%dGi", (long) (value / (1l << 30))).trim();<NEW_LINE>}<NEW_LINE>}
<< 20)).trim();
1,035,093
private void tryAssertionSubqueryNamedWindowUncorrelated(RegressionEnvironment env, String epl) {<NEW_LINE>String[] fieldsSelected = "c0,c1".split(",");<NEW_LINE>String[] fieldsInside = "val0".split(",");<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy(EventRepresentationChoice.MAP.getAnnotationText() + " @public create window MyWindow#keepall as (val0 string, val1 int)", path);<NEW_LINE>env.compileDeploy("insert into MyWindow (val0, val1) select theString, intPrimitive from SupportBean", path);<NEW_LINE>env.compileDeploy(epl, path).addListener("s0");<NEW_LINE>EPTypeClass inner = EPTypeClassParameterized.from(Collection.class, new EPTypeClassParameterized(Map.class, new EPTypeClass[] { STRING.getEPType(), OBJECT.getEPType() }));<NEW_LINE>env.assertStmtTypes("s0", fieldsSelected, new EPTypeClass[] { inner, inner });<NEW_LINE>env.sendEventBean(new SupportBean("E0", 0));<NEW_LINE>env.sendEventBean(new SupportBean_ST0("ID0", 0));<NEW_LINE>env.assertListener("s0", listener -> {<NEW_LINE>EPAssertionUtil.assertPropsPerRow(toArrayMap((Collection) listener.assertOneGetNew().get("c0")), fieldsInside, null);<NEW_LINE>EPAssertionUtil.assertPropsPerRow(toArrayMap((Collection) listener.assertOneGetNew().get("c1")), fieldsInside, null);<NEW_LINE>listener.reset();<NEW_LINE>});<NEW_LINE>env.sendEventBean(new SupportBean("E1", 11));<NEW_LINE>env.sendEventBean(new SupportBean_ST0("ID1", 0));<NEW_LINE>env.assertListener("s0", listener -> {<NEW_LINE>EPAssertionUtil.assertPropsPerRow(toArrayMap((Collection) listener.assertOneGetNew().get("c0")), fieldsInside, new Object[][] { { "E1" } });<NEW_LINE>EPAssertionUtil.assertPropsPerRow(toArrayMap((Collection) listener.assertOneGetNew().get("c1")), fieldsInside, new Object[][] { { "E1" } });<NEW_LINE>listener.reset();<NEW_LINE>});<NEW_LINE>env.sendEventBean(<MASK><NEW_LINE>env.sendEventBean(new SupportBean_ST0("ID2", 0));<NEW_LINE>env.assertListener("s0", listener -> {<NEW_LINE>EPAssertionUtil.assertPropsPerRow(toArrayMap((Collection) listener.assertOneGetNew().get("c0")), fieldsInside, new Object[][] { { "E1" }, { "E2" } });<NEW_LINE>EPAssertionUtil.assertPropsPerRow(toArrayMap((Collection) listener.assertOneGetNew().get("c1")), fieldsInside, new Object[][] { { "E1" } });<NEW_LINE>listener.reset();<NEW_LINE>});<NEW_LINE>env.undeployAll();<NEW_LINE>}
new SupportBean("E2", 500));
1,351,920
public void marshall(FleetSummary fleetSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (fleetSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(fleetSummary.getFleetArn(), FLEETARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(fleetSummary.getCreatedTime(), CREATEDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(fleetSummary.getLastUpdatedTime(), LASTUPDATEDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(fleetSummary.getFleetName(), FLEETNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(fleetSummary.getDisplayName(), DISPLAYNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(fleetSummary.getCompanyCode(), COMPANYCODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(fleetSummary.getFleetStatus(), FLEETSTATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(fleetSummary.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
858,962
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NEW_LINE>Response<UntagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest));<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, "IoT 1Click Devices Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UntagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
1,284,234
private static void performRenames(String tmpFileName, String fileName, final List<Tuple<Path, Directory>> stateDirectories) throws WriteStateException {<NEW_LINE>Directory firstStateDirectory = stateDirectories.get(0).v2();<NEW_LINE>try {<NEW_LINE>firstStateDirectory.rename(tmpFileName, fileName);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new WriteStateException(false, "failed to rename tmp file to final name in the first state location " + stateDirectories.get(0).v1()<MASK><NEW_LINE>}<NEW_LINE>for (int i = 1; i < stateDirectories.size(); i++) {<NEW_LINE>Directory extraStateDirectory = stateDirectories.get(i).v2();<NEW_LINE>try {<NEW_LINE>extraStateDirectory.rename(tmpFileName, fileName);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new WriteStateException(true, "failed to rename tmp file to final name in extra state location " + stateDirectories.get(i).v1().resolve(tmpFileName), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.resolve(tmpFileName), e);
897,635
public void run() {<NEW_LINE>double CAMERA_PADDING = DEFAULT_CAMERA_PADDING;<NEW_LINE>try {<NEW_LINE>if (mParams.has("camera")) {<NEW_LINE>JSONObject camera = mParams.getJSONObject("camera");<NEW_LINE>if (camera.has("padding")) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>map.moveCamera(CameraUpdateFactory.newLatLngBounds(initCameraBounds, (int) (CAMERA_PADDING * density)));<NEW_LINE>CameraPosition.Builder builder = CameraPosition.builder(map.getCameraPosition());<NEW_LINE>try {<NEW_LINE>if (mParams.has("camera")) {<NEW_LINE>Boolean additionalParams = false;<NEW_LINE>JSONObject camera = mParams.getJSONObject("camera");<NEW_LINE>if (camera.has("bearing")) {<NEW_LINE>builder.bearing((float) camera.getDouble("bearing"));<NEW_LINE>additionalParams = true;<NEW_LINE>}<NEW_LINE>if (camera.has("tilt")) {<NEW_LINE>builder.tilt((float) camera.getDouble("tilt"));<NEW_LINE>additionalParams = true;<NEW_LINE>}<NEW_LINE>if (additionalParams) {<NEW_LINE>map.moveCamera(CameraUpdateFactory.newCameraPosition(builder.build()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>mapView.setVisibility(View.VISIBLE);<NEW_LINE>mCallback.success();<NEW_LINE>// if (map.getMapType() == GoogleMap.MAP_TYPE_NONE) {<NEW_LINE>PluginMap.this.onMapLoaded();<NEW_LINE>// }<NEW_LINE>// fitBounds(initCameraBounds, CAMERA_PADDING);<NEW_LINE>}
CAMERA_PADDING = camera.getDouble("padding");
1,270,941
private void injectManFileManager() {<NEW_LINE>// Override javac's JavaFileManager<NEW_LINE>_fileManager = getContext().get(JavaFileManager.class);<NEW_LINE>_manFileManager = new ManifoldJavaFileManager(getHost(), _fileManager, getContext(), true);<NEW_LINE>getContext().put(JavaFileManager.class, (JavaFileManager) null);<NEW_LINE>getContext().put(JavaFileManager.class, _manFileManager);<NEW_LINE>// Assign our file manager to javac's various components<NEW_LINE>try {<NEW_LINE>if (JreUtil.isJava8()) {<NEW_LINE>ReflectUtil.field(ClassReader.instance(getContext())<MASK><NEW_LINE>} else {<NEW_LINE>Object classFinder = ReflectUtil.method(CLASSFINDER_CLASS, "instance", Context.class).invokeStatic(getContext());<NEW_LINE>ReflectUtil.field(classFinder, "fileManager").set(_manFileManager);<NEW_LINE>ReflectUtil.field(classFinder, "preferSource").set(true);<NEW_LINE>Object modules = ReflectUtil.method(MODULES_CLASS, "instance", Context.class).invokeStatic(getContext());<NEW_LINE>ReflectUtil.field(modules, "fileManager").set(_manFileManager);<NEW_LINE>Object moduleFinder = ReflectUtil.method(MODULEFINDER_CLASS, "instance", Context.class).invokeStatic(getContext());<NEW_LINE>ReflectUtil.field(moduleFinder, "fileManager").set(_manFileManager);<NEW_LINE>}<NEW_LINE>// Hack for using "-source 8" with Java 9<NEW_LINE>try {<NEW_LINE>Object classFinder = ReflectUtil.method(CLASSFINDER_CLASS, "instance", Context.class).invokeStatic(getContext());<NEW_LINE>ReflectUtil.field(classFinder, "fileManager").set(_manFileManager);<NEW_LINE>Object modules = ReflectUtil.method(MODULES_CLASS, "instance", Context.class).invokeStatic(getContext());<NEW_LINE>ReflectUtil.field(modules, "fileManager").set(_manFileManager);<NEW_LINE>Object moduleFinder = ReflectUtil.method(MODULEFINDER_CLASS, "instance", Context.class).invokeStatic(getContext());<NEW_LINE>ReflectUtil.field(moduleFinder, "fileManager").set(_manFileManager);<NEW_LINE>} catch (Throwable ignore) {<NEW_LINE>}<NEW_LINE>ReflectUtil.field(ClassWriter.instance(getContext()), "fileManager").set(_manFileManager);<NEW_LINE>ReflectUtil.field(Enter.instance(getContext()), "fileManager").set(_manFileManager);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
, "fileManager").set(_manFileManager);
1,498,280
public ApiResponse<FileLock> fileLocksUpdateLockWithHttpInfo(String fileId, String lockId, FileLockRequest request) throws ApiException {<NEW_LINE>Object localVarPostBody = request;<NEW_LINE>// verify the required parameter 'fileId' is set<NEW_LINE>if (fileId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'fileId' when calling fileLocksUpdateLock");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'lockId' is set<NEW_LINE>if (lockId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'lockId' when calling fileLocksUpdateLock");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'request' is set<NEW_LINE>if (request == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'request' when calling fileLocksUpdateLock");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/filelocks/{fileId}/{lockId}".replaceAll("\\{" + "fileId" + "\\}", apiClient.escapeString(fileId.toString())).replaceAll("\\{" + "lockId" + "\\}", apiClient.escapeString(lockId.toString()));<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>final String[] localVarAccepts = { "application/json", "text/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "application/json", "text/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<FileLock> localVarReturnType = new GenericType<FileLock>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
HashMap<String, Object>();
226,484
protected ValidationInfo doValidate() {<NEW_LINE>if (StringUtils.isEmpty(comboBoxIcon.getInputText().trim())) {<NEW_LINE>return new ValidationInfo(ERROR_ICON_NOT_SELECTED, comboBoxIcon);<NEW_LINE>}<NEW_LINE>if (StringUtils.isEmpty(textFieldFileName.getText().trim())) {<NEW_LINE>return new ValidationInfo(ERROR_FILE_NAME_EMPTY, textFieldFileName);<NEW_LINE>}<NEW_LINE>if (!checkBoxMdpi.isSelected() && !checkBoxHdpi.isSelected() && !checkBoxXhdpi.isSelected() && !checkBoxXxhdpi.isSelected() && !checkBoxXxxhdpi.isSelected()) {<NEW_LINE>return new ValidationInfo(ERROR_SIZE_CHECK_EMPTY, checkBoxMdpi);<NEW_LINE>}<NEW_LINE>File resourcePath = new File<MASK><NEW_LINE>if (!resourcePath.exists() || !resourcePath.isDirectory()) {<NEW_LINE>return new ValidationInfo(ERROR_RESOURCE_DIR_NOTHING_PREFIX + resourcePath, panelMain);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
(model.getResourcePath(project));
511,530
public static List<VolumeResponse> createVolumeResponse(ResponseView view, VolumeJoinVO... volumes) {<NEW_LINE>Hashtable<Long, VolumeResponse> vrDataList = new Hashtable<Long, VolumeResponse>();<NEW_LINE>DecimalFormat df = new DecimalFormat("0.0%");<NEW_LINE>for (VolumeJoinVO vr : volumes) {<NEW_LINE>VolumeResponse vrData = vrDataList.get(vr.getId());<NEW_LINE>if (vrData == null) {<NEW_LINE>// first time encountering this volume<NEW_LINE>vrData = ApiDBUtils.newVolumeResponse(view, vr);<NEW_LINE>} else {<NEW_LINE>// update tags<NEW_LINE>vrData = ApiDBUtils.fillVolumeDetails(view, vrData, vr);<NEW_LINE>}<NEW_LINE>vrDataList.put(vr.getId(), vrData);<NEW_LINE>VolumeStats vs = null;<NEW_LINE>if (vr.getFormat() == ImageFormat.VHD || vr.getFormat() == ImageFormat.QCOW2 || vr.getFormat() == ImageFormat.RAW) {<NEW_LINE>if (vrData.getPath() != null) {<NEW_LINE>vs = ApiDBUtils.getVolumeStatistics(vrData.getPath());<NEW_LINE>}<NEW_LINE>} else if (vr.getFormat() == ImageFormat.OVA) {<NEW_LINE>if (vrData.getChainInfo() != null) {<NEW_LINE>vs = ApiDBUtils.getVolumeStatistics(vrData.getChainInfo());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (vs != null) {<NEW_LINE>long vsz = vs.getVirtualSize();<NEW_LINE>long psz = vs.getPhysicalSize();<NEW_LINE>double util = (double) psz / vsz;<NEW_LINE>vrData.setUtilization<MASK><NEW_LINE>if (view == ResponseView.Full) {<NEW_LINE>vrData.setVirtualsize(vsz);<NEW_LINE>vrData.setPhysicalsize(psz);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new ArrayList<VolumeResponse>(vrDataList.values());<NEW_LINE>}
(df.format(util));
1,178,232
private void generateKeyPairs() {<NEW_LINE>try {<NEW_LINE>final ECNamedCurveParameterSpec parameterSpec = ECNamedCurveTable.getParameterSpec("secp256r1");<NEW_LINE>final KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("ECDH", "SC");<NEW_LINE>keyPairGenerator.initialize(parameterSpec);<NEW_LINE>final <MASK><NEW_LINE>final ECPublicKey publicKey = (ECPublicKey) keyPair.getPublic();<NEW_LINE>mProvisionerPrivaetKey = (ECPrivateKey) keyPair.getPrivate();<NEW_LINE>final ECPoint point = publicKey.getQ();<NEW_LINE>final BigInteger x = point.getXCoord().toBigInteger();<NEW_LINE>final BigInteger y = point.getYCoord().toBigInteger();<NEW_LINE>final byte[] tempX = BigIntegers.asUnsignedByteArray(32, x);<NEW_LINE>final byte[] tempY = BigIntegers.asUnsignedByteArray(32, y);<NEW_LINE>LOG.info("X: length: " + tempX.length + " " + MeshParserUtils.bytesToHex(tempX, false));<NEW_LINE>LOG.info("Y: length: " + tempY.length + " " + MeshParserUtils.bytesToHex(tempY, false));<NEW_LINE>final byte[] tempXY = new byte[64];<NEW_LINE>System.arraycopy(tempX, 0, tempXY, 0, tempX.length);<NEW_LINE>System.arraycopy(tempY, 0, tempXY, tempY.length, tempY.length);<NEW_LINE>mUnprovisionedMeshNode.setProvisionerPublicKeyXY(tempXY);<NEW_LINE>LOG.info("XY: " + MeshParserUtils.bytesToHex(tempXY, true));<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}
KeyPair keyPair = keyPairGenerator.generateKeyPair();
849,637
private void configureCertificateTrust(Properties props) throws IOException {<NEW_LINE>if (trustAllCerts) {<NEW_LINE>if (useSSL) {<NEW_LINE>props.setProperty("mail.smtps.ssl.socketFactory.class", TRUST_ALL_SOCKET_FACTORY);<NEW_LINE>props.setProperty("mail.smtps.ssl.socketFactory.fallback", FALSE);<NEW_LINE>} else if (useStartTLS) {<NEW_LINE>props.setProperty("mail.smtp.ssl.socketFactory.class", TRUST_ALL_SOCKET_FACTORY);<NEW_LINE>props.setProperty("mail.smtp.ssl.socketFactory.fallback", FALSE);<NEW_LINE>}<NEW_LINE>} else if (useLocalTrustStore) {<NEW_LINE>File truststore = new File(trustStoreToUse);<NEW_LINE>logger.info("load local truststore - try to load truststore from: {}", truststore.getAbsolutePath());<NEW_LINE>if (!truststore.exists()) {<NEW_LINE>logger.info("load local truststore -Failed to load truststore from: {}", truststore.getAbsolutePath());<NEW_LINE>truststore = new File(FileServer.getFileServer().getBaseDir(), trustStoreToUse);<NEW_LINE>logger.info("load local truststore -Attempting to read truststore from: {}", truststore.getAbsolutePath());<NEW_LINE>if (!truststore.exists()) {<NEW_LINE>logger.info("load local truststore -Failed to load truststore from: {}. Local truststore not available, aborting execution.", truststore.getAbsolutePath());<NEW_LINE>throw new IOException("Local truststore file not found. Also not available under : " + truststore.getAbsolutePath());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (useSSL) {<NEW_LINE>// Requires JavaMail 1.4.2+<NEW_LINE>props.put("mail.smtps.ssl.socketFactory", new LocalTrustStoreSSLSocketFactory(truststore));<NEW_LINE>props.put("mail.smtps.ssl.socketFactory.fallback", FALSE);<NEW_LINE>} else if (useStartTLS) {<NEW_LINE>// Requires JavaMail 1.4.2+<NEW_LINE>props.put(<MASK><NEW_LINE>props.put("mail.smtp.ssl.socketFactory.fallback", FALSE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
"mail.smtp.ssl.socketFactory", new LocalTrustStoreSSLSocketFactory(truststore));
526,255
public boolean isLastExecutionFinished(ScheduledTask task, long now) {<NEW_LINE>EntityManager em = persistence.getEntityManager();<NEW_LINE>Query query = em.createQuery("select e.finishTime from sys$ScheduledExecution e where e.task.id = ?1 and e.startTime = ?2");<NEW_LINE>query.setParameter(<MASK><NEW_LINE>query.setParameter(2, task.getLastStartTime());<NEW_LINE>List list = query.getResultList();<NEW_LINE>if (list.isEmpty() || list.get(0) == null) {<NEW_LINE>// Execution finish was not registered for some reason, so using timeout value or just return false<NEW_LINE>boolean result = task.getTimeout() != null && (task.getLastStart() + task.getTimeout() * 1000) <= now;<NEW_LINE>if (result)<NEW_LINE>log.trace(task + ": considered finished because of timeout");<NEW_LINE>else<NEW_LINE>log.trace(task + ": not finished and not timed out");<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>Date date = (Date) list.get(0);<NEW_LINE>log.trace("{} : finished at {}", task, date.getTime());<NEW_LINE>return true;<NEW_LINE>}
1, task.getId());
900,334
final GetJobManifestResult executeGetJobManifest(GetJobManifestRequest getJobManifestRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getJobManifestRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetJobManifestRequest> request = null;<NEW_LINE>Response<GetJobManifestResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetJobManifestRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getJobManifestRequest));<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, "Snowball");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetJobManifest");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetJobManifestResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetJobManifestResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
323,051
public ElementJavadoc resolveLink(final String link) {<NEW_LINE>if (link.startsWith(ASSOCIATE_JDOC)) {<NEW_LINE>final String root = link.substring(ASSOCIATE_JDOC.length());<NEW_LINE>try {<NEW_LINE>final <MASK><NEW_LINE>final AtomicBoolean success = new AtomicBoolean();<NEW_LINE>SourceJavadocAttacher.attachJavadoc(new URL(root), new SourceJavadocAttacher.AttachmentListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void attachmentSucceeded() {<NEW_LINE>success.set(true);<NEW_LINE>latch.countDown();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void attachmentFailed() {<NEW_LINE>latch.countDown();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (!SwingUtilities.isEventDispatchThread()) {<NEW_LINE>latch.await();<NEW_LINE>return success.get() ? resolveElement(handle, link) : new ElementJavadoc(NbBundle.getMessage(ElementJavadoc.class, "javadoc_attaching_failed"), cancel);<NEW_LINE>}<NEW_LINE>} catch (MalformedURLException | InterruptedException ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final ElementHandle<? extends Element> linkDoc = links.get(link);<NEW_LINE>return resolveElement(linkDoc, link);<NEW_LINE>}
CountDownLatch latch = new CountDownLatch(1);
1,148,321
public void remove(final Object key, final NodeModel from, final NodeModel which) {<NEW_LINE>if (!key.equals(LogicalStyleKeys.NODE_STYLE)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final EdgeModel whichStyle = which.getExtension(EdgeModel.class);<NEW_LINE>if (whichStyle == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final EdgeModel fromStyle = <MASK><NEW_LINE>if (fromStyle == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>from.removeExtension(fromStyle);<NEW_LINE>EdgeModel delta = new EdgeModel();<NEW_LINE>final Color color = fromStyle.getColor();<NEW_LINE>boolean deltaFound = false;<NEW_LINE>if (color != null && whichStyle.getColor() == null) {<NEW_LINE>delta.setColor(color);<NEW_LINE>deltaFound = true;<NEW_LINE>}<NEW_LINE>final EdgeStyle style = fromStyle.getStyle();<NEW_LINE>if (style != null && whichStyle.getStyle() == null) {<NEW_LINE>delta.setStyle(style);<NEW_LINE>deltaFound = true;<NEW_LINE>}<NEW_LINE>final int width = fromStyle.getWidth();<NEW_LINE>if (width != EdgeModel.AUTO_WIDTH && whichStyle.getWidth() == EdgeModel.AUTO_WIDTH) {<NEW_LINE>delta.setWidth(width);<NEW_LINE>deltaFound = true;<NEW_LINE>}<NEW_LINE>if (deltaFound)<NEW_LINE>from.addExtension(delta);<NEW_LINE>}
from.getExtension(EdgeModel.class);
661,114
final StartCopyJobResult executeStartCopyJob(StartCopyJobRequest startCopyJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startCopyJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StartCopyJobRequest> request = null;<NEW_LINE>Response<StartCopyJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StartCopyJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startCopyJobRequest));<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, "Backup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartCopyJob");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StartCopyJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartCopyJobResultJsonUnmarshaller());<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,393,389
private void initOptions(DefaultCodeFormatterOptions defaultCodeFormatterOptions, Map<String, String> options) {<NEW_LINE>if (options != null) {<NEW_LINE>this.originalOptions = new DefaultCodeFormatterOptions(options);<NEW_LINE>this.workingOptions = new DefaultCodeFormatterOptions(options);<NEW_LINE>this.oldCommentFormatOption = getOldCommentFormatOption(options);<NEW_LINE>String compilerSource = <MASK><NEW_LINE>this.sourceLevel = compilerSource != null ? compilerSource : CompilerOptions.VERSION_15;<NEW_LINE>this.previewEnabled = JavaCore.ENABLED.equals(options.get(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES));<NEW_LINE>} else {<NEW_LINE>Map<String, String> settings = DefaultCodeFormatterConstants.getJavaConventionsSettings();<NEW_LINE>this.originalOptions = new DefaultCodeFormatterOptions(settings);<NEW_LINE>this.workingOptions = new DefaultCodeFormatterOptions(settings);<NEW_LINE>this.oldCommentFormatOption = DefaultCodeFormatterConstants.TRUE;<NEW_LINE>this.sourceLevel = CompilerOptions.VERSION_15;<NEW_LINE>}<NEW_LINE>if (defaultCodeFormatterOptions != null) {<NEW_LINE>this.originalOptions.set(defaultCodeFormatterOptions.getMap());<NEW_LINE>this.workingOptions.set(defaultCodeFormatterOptions.getMap());<NEW_LINE>}<NEW_LINE>}
options.get(CompilerOptions.OPTION_Source);
1,127,453
public Request<CreateQueryLoggingConfigRequest> marshall(CreateQueryLoggingConfigRequest createQueryLoggingConfigRequest) {<NEW_LINE>if (createQueryLoggingConfigRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<CreateQueryLoggingConfigRequest> request = new DefaultRequest<CreateQueryLoggingConfigRequest>(createQueryLoggingConfigRequest, "AmazonRoute53");<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/2013-04-01/queryloggingconfig";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>XMLWriter xmlWriter <MASK><NEW_LINE>xmlWriter.startElement("CreateQueryLoggingConfigRequest");<NEW_LINE>if (createQueryLoggingConfigRequest != null) {<NEW_LINE>if (createQueryLoggingConfigRequest.getHostedZoneId() != null) {<NEW_LINE>xmlWriter.startElement("HostedZoneId").value(createQueryLoggingConfigRequest.getHostedZoneId()).endElement();<NEW_LINE>}<NEW_LINE>if (createQueryLoggingConfigRequest.getCloudWatchLogsLogGroupArn() != null) {<NEW_LINE>xmlWriter.startElement("CloudWatchLogsLogGroupArn").value(createQueryLoggingConfigRequest.getCloudWatchLogsLogGroupArn()).endElement();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>xmlWriter.endElement();<NEW_LINE>request.setContent(new StringInputStream(stringWriter.getBuffer().toString()));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(stringWriter.getBuffer().toString().getBytes(UTF8).length));<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/xml");<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to XML: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
= new XMLWriter(stringWriter, "https://route53.amazonaws.com/doc/2013-04-01/");
1,226,862
private void startMapWithCondition(final String condition) {<NEW_LINE>mapView.onStart();<NEW_LINE>if (condition.equals("Without Permission")) {<NEW_LINE>applicationKvStore.putBoolean("doNotAskForLocationPermission", true);<NEW_LINE>}<NEW_LINE>final CameraPosition position;<NEW_LINE>if (applicationKvStore.getString("LastLocation") != null) {<NEW_LINE>final String[] locationLatLng = applicationKvStore.getString("LastLocation").split(",");<NEW_LINE>lastKnownLocation = new fr.free.nrw.commons.location.LatLng(Double.parseDouble(locationLatLng[0]), Double.parseDouble(locationLatLng[1]), 1f);<NEW_LINE>position = new CameraPosition.Builder().target(LocationUtils.commonsLatLngToMapBoxLatLng(lastKnownLocation)).zoom(ZOOM_LEVEL).build();<NEW_LINE>} else {<NEW_LINE>lastKnownLocation = new fr.free.nrw.commons.location.LatLng(51.50550, -0.07520, 1f);<NEW_LINE>position = new CameraPosition.Builder().target(LocationUtils.commonsLatLngToMapBoxLatLng(lastKnownLocation)).zoom(ZOOM_OUT).build();<NEW_LINE>}<NEW_LINE>if (mapBox != null) {<NEW_LINE>mapBox.moveCamera<MASK><NEW_LINE>addOnCameraMoveListener();<NEW_LINE>presenter.onMapReady();<NEW_LINE>removeCurrentLocationMarker();<NEW_LINE>}<NEW_LINE>}
(CameraUpdateFactory.newCameraPosition(position));
93,865
private static boolean check_VK13(FunctionProvider provider, long[] caps, Set<String> ext) {<NEW_LINE>if (!ext.contains("Vulkan13")) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return checkFunctions(provider, caps, new int[] { 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185 }, "vkCreatePrivateDataSlot", "vkDestroyPrivateDataSlot", "vkSetPrivateData", "vkGetPrivateData", "vkCmdSetEvent2", "vkCmdResetEvent2", "vkCmdWaitEvents2", "vkCmdPipelineBarrier2", "vkCmdWriteTimestamp2", "vkQueueSubmit2", "vkCmdCopyBuffer2", "vkCmdCopyImage2", "vkCmdCopyBufferToImage2", "vkCmdCopyImageToBuffer2", "vkCmdBlitImage2", "vkCmdResolveImage2", "vkCmdBeginRendering", "vkCmdEndRendering", "vkCmdSetCullMode", "vkCmdSetFrontFace", "vkCmdSetPrimitiveTopology", "vkCmdSetViewportWithCount", "vkCmdSetScissorWithCount", "vkCmdBindVertexBuffers2", "vkCmdSetDepthTestEnable", "vkCmdSetDepthWriteEnable", "vkCmdSetDepthCompareOp", "vkCmdSetDepthBoundsTestEnable", "vkCmdSetStencilTestEnable", "vkCmdSetStencilOp", "vkCmdSetRasterizerDiscardEnable", "vkCmdSetDepthBiasEnable", "vkCmdSetPrimitiveRestartEnable", "vkGetDeviceBufferMemoryRequirements", "vkGetDeviceImageMemoryRequirements", "vkGetDeviceImageSparseMemoryRequirements"<MASK><NEW_LINE>}
) || reportMissing("VK", "Vulkan13");
1,651,338
private void stage0(ByteBuffer buf, Link link) {<NEW_LINE>// At least 4 bytes are necessary<NEW_LINE>if (!cap(buf, 4, UNLIMITED, link, true))<NEW_LINE>return;<NEW_LINE>// Read security type<NEW_LINE><MASK><NEW_LINE>switch(authType) {<NEW_LINE>case RfbConstants.CONNECTION_FAILED:<NEW_LINE>{<NEW_LINE>// Server forbids to connect. Read reason and throw exception<NEW_LINE>int length = buf.readSignedInt();<NEW_LINE>String reason = new String(buf.data, buf.offset, length, RfbConstants.US_ASCII_CHARSET);<NEW_LINE>throw new RuntimeException("Authentication to VNC server is failed. Reason: " + reason);<NEW_LINE>}<NEW_LINE>case RfbConstants.NO_AUTH:<NEW_LINE>{<NEW_LINE>// Client can connect without authorization. Nothing to do.<NEW_LINE>// Switch off this element from circuit<NEW_LINE>switchOff();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case RfbConstants.VNC_AUTH:<NEW_LINE>{<NEW_LINE>// Read challenge and generate response<NEW_LINE>responseToChallenge(buf, link);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>throw new RuntimeException("Unsupported VNC protocol authorization scheme, scheme code: " + authType + ".");<NEW_LINE>}<NEW_LINE>}
int authType = buf.readSignedInt();
550,131
public void onClick(DialogInterface dialog, int item) {<NEW_LINE>if (items.get(item).value.startsWith("KP2ASPECIAL")) {<NEW_LINE>// change entry<NEW_LINE>String packageName = getApplicationContext().getPackageName();<NEW_LINE>Intent startKp2aIntent = getPackageManager().getLaunchIntentForPackage(packageName);<NEW_LINE>if (startKp2aIntent != null) {<NEW_LINE>startKp2aIntent.addCategory(Intent.CATEGORY_LAUNCHER);<NEW_LINE>startKp2aIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);<NEW_LINE>String value = items.get(item).value;<NEW_LINE>String taskName = value.substring("KP2ASPECIAL_".length());<NEW_LINE>startKp2aIntent.putExtra("KP2A_APPTASK", taskName);<NEW_LINE>if (taskName.equals("SearchUrlTask")) {<NEW_LINE>startKp2aIntent.putExtra("UrlToSearch", "androidapp://" + clientPackageName);<NEW_LINE>}<NEW_LINE>startActivity(startKp2aIntent);<NEW_LINE>} else<NEW_LINE>Log.<MASK><NEW_LINE>} else {<NEW_LINE>StringForTyping theItem = items.get(item);<NEW_LINE>commitStringForTyping(theItem);<NEW_LINE>}<NEW_LINE>}
w("KP2AK", "didn't find intent for " + packageName);
616,655
public List<ProjectFileHandler> handle(final ResultSet rs) throws SQLException {<NEW_LINE>if (!rs.next()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final List<ProjectFileHandler> handlers = new ArrayList<>();<NEW_LINE>do {<NEW_LINE>final int projectId = rs.getInt(1);<NEW_LINE>final int version = rs.getInt(2);<NEW_LINE>final long uploadTime = rs.getLong(3);<NEW_LINE>final String uploader = rs.getString(4);<NEW_LINE>final String fileType = rs.getString(5);<NEW_LINE>final String fileName = rs.getString(6);<NEW_LINE>final byte[] md5 = rs.getBytes(7);<NEW_LINE>final int numChunks = rs.getInt(8);<NEW_LINE>final String resourceId = rs.getString(9);<NEW_LINE>final Blob <MASK><NEW_LINE>final String uploaderIpAddr = rs.getString(11);<NEW_LINE>Set<Dependency> startupDependencies = Collections.emptySet();<NEW_LINE>if (startupDependenciesBlob != null) {<NEW_LINE>try {<NEW_LINE>startupDependencies = ThinArchiveUtils.parseStartupDependencies(IOUtils.toString(startupDependenciesBlob.getBinaryStream(), StandardCharsets.UTF_8));<NEW_LINE>} catch (IOException | InvalidHashException e) {<NEW_LINE>// This should never happen unless the file is malformed in the database.<NEW_LINE>// The file was already validated when the project was uploaded.<NEW_LINE>throw new SQLException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final ProjectFileHandler handler = new ProjectFileHandler(projectId, version, uploadTime, uploader, fileType, fileName, numChunks, md5, startupDependencies, resourceId, uploaderIpAddr);<NEW_LINE>handlers.add(handler);<NEW_LINE>} while (rs.next());<NEW_LINE>return handlers;<NEW_LINE>}
startupDependenciesBlob = rs.getBlob(10);
1,326,183
private static void updateSystemProxy() {<NEW_LINE>Proxy proxy = proxyProperty.get();<NEW_LINE>if (proxy.type() == Proxy.Type.DIRECT) {<NEW_LINE>System.clearProperty("http.proxyHost");<NEW_LINE>System.clearProperty("http.proxyPort");<NEW_LINE>System.clearProperty("https.proxyHost");<NEW_LINE>System.clearProperty("https.proxyPort");<NEW_LINE>System.clearProperty("socksProxyHost");<NEW_LINE>System.clearProperty("socksProxyPort");<NEW_LINE>} else {<NEW_LINE>InetSocketAddress address = (InetSocketAddress) proxy.address();<NEW_LINE><MASK><NEW_LINE>String port = String.valueOf(address.getPort());<NEW_LINE>if (proxy.type() == Type.HTTP) {<NEW_LINE>System.clearProperty("socksProxyHost");<NEW_LINE>System.clearProperty("socksProxyPort");<NEW_LINE>System.setProperty("http.proxyHost", host);<NEW_LINE>System.setProperty("http.proxyPort", port);<NEW_LINE>System.setProperty("https.proxyHost", host);<NEW_LINE>System.setProperty("https.proxyPort", port);<NEW_LINE>} else if (proxy.type() == Type.SOCKS) {<NEW_LINE>System.clearProperty("http.proxyHost");<NEW_LINE>System.clearProperty("http.proxyPort");<NEW_LINE>System.clearProperty("https.proxyHost");<NEW_LINE>System.clearProperty("https.proxyPort");<NEW_LINE>System.setProperty("socksProxyHost", host);<NEW_LINE>System.setProperty("socksProxyPort", port);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String host = address.getHostString();
1,254,621
public void handleDeferredFiles() {<NEW_LINE>final Class<Relation> relType = StructrApp.getConfiguration().getRelationshipEntityClass("AbstractMinifiedFileMINIFICATIONFile");<NEW_LINE>final PropertyKey<Integer> positionKey = <MASK><NEW_LINE>if (!this.deferredFiles.isEmpty()) {<NEW_LINE>for (File file : this.deferredFiles) {<NEW_LINE>try (final Tx tx = app.tx(true, false, false)) {<NEW_LINE>tx.disableChangelog();<NEW_LINE>// set properties from files.json<NEW_LINE>final Map<String, Object> rawProperties = getRawPropertiesForFileOrFolder(file.getPath());<NEW_LINE>final Map<String, String> sourcesConfig = (Map<String, String>) rawProperties.remove("minificationSources");<NEW_LINE>final PropertyMap fileProperties = convertRawPropertiesForFileOrFolder(rawProperties);<NEW_LINE>file.unlockSystemPropertiesOnce();<NEW_LINE>file.setProperties(securityContext, fileProperties);<NEW_LINE>for (String positionString : sourcesConfig.keySet()) {<NEW_LINE>final Integer position = Integer.parseInt(positionString);<NEW_LINE>final String sourcePath = sourcesConfig.get(positionString);<NEW_LINE>final AbstractFile source = FileHelper.getFileByAbsolutePath(securityContext, sourcePath);<NEW_LINE>if (source != null) {<NEW_LINE>app.create(app.get(AbstractMinifiedFile.class, file.getUuid()), (File) source, relType, new PropertyMap(positionKey, position));<NEW_LINE>} else {<NEW_LINE>logger.warn("Source file {} for minified file {} at position {} not found - please verify that it is included in the export", sourcePath, file.getPath(), positionString);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>tx.success();<NEW_LINE>} catch (FrameworkException fxe) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
StructrApp.key(relType, "position");
702,151
private CompletableFuture<Pair<SchemaData, SchemaVersion>> addOrGetSchemaForTopic(SchemaData schemaData, LongSchemaVersion schemaVersion) {<NEW_LINE>CompletableFuture<Pair<SchemaData, SchemaVersion>> <MASK><NEW_LINE>// If schema version presents try to fetch existing schema.<NEW_LINE>if (null != schemaVersion) {<NEW_LINE>String id = TopicName.get(topicName.getPartitionedTopicName()).getSchemaName();<NEW_LINE>SchemaRegistry.SchemaAndMetadata schemaAndMetadata;<NEW_LINE>try {<NEW_LINE>schemaAndMetadata = pulsar().getSchemaRegistryService().getSchema(id, schemaVersion).get();<NEW_LINE>future.complete(Pair.of(schemaAndMetadata.schema, schemaAndMetadata.version));<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Fail to retrieve schema of version {} for topic {}: {}", schemaVersion.getVersion(), topicName, e.getMessage());<NEW_LINE>}<NEW_LINE>future.completeExceptionally(e);<NEW_LINE>}<NEW_LINE>} else if (null != schemaData) {<NEW_LINE>// Else try to add schema to topic.<NEW_LINE>SchemaVersion sv;<NEW_LINE>try {<NEW_LINE>sv = addSchema(schemaData).get();<NEW_LINE>future.complete(Pair.of(schemaData, sv));<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Fail to add schema {} for topic {}: {}", new String(schemaData.toSchemaInfo().getSchema()), topicName, e.getMessage());<NEW_LINE>}<NEW_LINE>future.completeExceptionally(e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Indicating exception.<NEW_LINE>future.complete(Pair.of(null, null));<NEW_LINE>}<NEW_LINE>return future;<NEW_LINE>}
future = new CompletableFuture<>();
774,286
private Mono<Response<ValidateOperationsResponseInner>> validateWithResponseAsync(String vaultName, String resourceGroupName, ValidateOperationRequest parameters, 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 (vaultName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter vaultName 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 (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 (parameters == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));<NEW_LINE>} else {<NEW_LINE>parameters.validate();<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.validate(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, this.client.getSubscriptionId(<MASK><NEW_LINE>}
), parameters, accept, context);
1,498,434
public Message addOrchestrator(HttpServletRequest req, @RequestBody AddOrchestratorRequest addOrchestratorRequest) throws Exception {<NEW_LINE>String userName = SecurityFilter.getLoginUsername(req);<NEW_LINE>String name = addOrchestratorRequest.getName();<NEW_LINE>String workspaceName = addOrchestratorRequest.getWorkspaceName();<NEW_LINE>String projectName = addOrchestratorRequest.getProjectName();<NEW_LINE>String typeStr = addOrchestratorRequest.getType();<NEW_LINE>String desc = addOrchestratorRequest.getDesc();<NEW_LINE>Long projectID = addOrchestratorRequest.getProjectID();<NEW_LINE>List<DSSLabel> dssLabelList = Arrays.asList(new EnvDSSLabel(addOrchestratorRequest.getLabels().getRoute()));<NEW_LINE>DSSOrchestratorInfo dssOrchestratorInfo = new DSSOrchestratorInfo();<NEW_LINE>dssOrchestratorInfo.setName(name);<NEW_LINE>dssOrchestratorInfo.setCreator(userName);<NEW_LINE>dssOrchestratorInfo.setDesc(desc);<NEW_LINE>dssOrchestratorInfo.setType(typeStr);<NEW_LINE>OrchestratorVo orchestratorVo = orchestratorService.createOrchestrator(userName, workspaceName, projectName, projectID, desc, dssOrchestratorInfo, dssLabelList);<NEW_LINE>return Message.ok(<MASK><NEW_LINE>}
).data("OrchestratorVo", orchestratorVo);
44,543
public List<ShardLock> lockAllForIndex(final Index index, final IndexSettings settings, final String lockDetails, final long lockTimeoutMS) throws ShardLockObtainFailedException {<NEW_LINE>final int numShards = settings.getNumberOfShards();<NEW_LINE>if (numShards <= 0) {<NEW_LINE>throw new IllegalArgumentException("settings must contain a non-null > 0 number of shards");<NEW_LINE>}<NEW_LINE>logger.trace("locking all shards for index {} - [{}]", index, numShards);<NEW_LINE>List<ShardLock> allLocks = new ArrayList<>(numShards);<NEW_LINE>boolean success = false;<NEW_LINE>long startTimeNS = System.nanoTime();<NEW_LINE>try {<NEW_LINE>for (int i = 0; i < numShards; i++) {<NEW_LINE>long timeoutLeftMS = Math.max(0, lockTimeoutMS - TimeValue.nsecToMSec((System.nanoTime() - startTimeNS)));<NEW_LINE>allLocks.add(shardLock(new ShardId(index, i), lockDetails, timeoutLeftMS));<NEW_LINE>}<NEW_LINE>success = true;<NEW_LINE>} finally {<NEW_LINE>if (success == false) {<NEW_LINE><MASK><NEW_LINE>IOUtils.closeWhileHandlingException(allLocks);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return allLocks;<NEW_LINE>}
logger.trace("unable to lock all shards for index {}", index);
37,279
private static String copyNativeLibraryFromClasspath(Platform platform) {<NEW_LINE>Path tmp = null;<NEW_LINE>try {<NEW_LINE>String libName = System.mapLibraryName(NATIVE_LIB_NAME);<NEW_LINE>Path cacheDir = getCacheDir(platform);<NEW_LINE>Path path = cacheDir.resolve(libName);<NEW_LINE>if (Files.exists(path)) {<NEW_LINE>return path.toAbsolutePath().toString();<NEW_LINE>}<NEW_LINE>Path <MASK><NEW_LINE>Files.createDirectories(dlrCacheRoot);<NEW_LINE>tmp = Files.createTempDirectory(dlrCacheRoot, "tmp");<NEW_LINE>for (String file : platform.getLibraries()) {<NEW_LINE>String libPath = "native/lib/" + file;<NEW_LINE>logger.info("Extracting {} to cache ...", libPath);<NEW_LINE>try (InputStream is = ClassLoaderUtils.getResourceAsStream(libPath)) {<NEW_LINE>Files.copy(is, tmp.resolve(file), StandardCopyOption.REPLACE_EXISTING);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Utils.moveQuietly(tmp, cacheDir);<NEW_LINE>return path.toAbsolutePath().toString();<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new IllegalStateException("Failed to extract DLR native library", e);<NEW_LINE>} finally {<NEW_LINE>if (tmp != null) {<NEW_LINE>Utils.deleteQuietly(tmp);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
dlrCacheRoot = Utils.getEngineCacheDir("dlr");
1,418,354
private Mono<PagedResponse<PacketCaptureResultInner>> listSinglePageAsync(String resourceGroupName, String networkWatcherName, 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 (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (networkWatcherName == null) {<NEW_LINE>return Mono.<MASK><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>final String apiVersion = "2018-11-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.list(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, this.client.getSubscriptionId(), accept, context).map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));<NEW_LINE>}
error(new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."));
1,699,386
private void bindBookingDetailHolder(final BookingDetailsHolder holder, final int position) {<NEW_LINE>final ALBookingDetailsModel detailsModel = new ALBookingDetailsModel();<NEW_LINE>detailsModel.setSessionId(model.getSessionId());<NEW_LINE>final ALBookingDetailsModel.ALBookingDetails bookingDetails = detailsModel.getPersonInfo();<NEW_LINE>holder.titleSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {<NEW_LINE>bookingDetails.setTitle(titleList.get(position));<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onNothingSelected(AdapterView<?> parent) {<NEW_LINE>bookingDetails.setTitle("Title *");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>holder.submitAction.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>if (TextUtils.isEmpty(holder.firstNameEt.getText().toString().trim()) || TextUtils.isEmpty(holder.lastNameEt.getText().toString().trim()) || TextUtils.isEmpty(holder.emailIdEt.getText().toString().trim()) || TextUtils.isEmpty(holder.firstNameEt.getText().toString().trim()) || "Title *".equals(titleList.get(holder.titleSpinner.getSelectedItemPosition()))) {<NEW_LINE>Toast.makeText(context, R.string.mandatory_fields, Toast.LENGTH_SHORT).show();<NEW_LINE>} else {<NEW_LINE>bookingDetails.setTitle(titleList.get(holder.titleSpinner.getSelectedItemPosition()));<NEW_LINE>bookingDetails.setFirstName(holder.firstNameEt.getText().toString().trim());<NEW_LINE>bookingDetails.setLastName(holder.lastNameEt.getText().<MASK><NEW_LINE>bookingDetails.setEmailId(holder.emailIdEt.getText().toString().trim());<NEW_LINE>bookingDetails.setPhoneNo(holder.contactNumberEt.getText().toString().trim());<NEW_LINE>listener.onAction(context, AlRichMessage.SEND_BOOKING_DETAILS, null, detailsModel, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
toString().trim());
1,221,608
public static Observable<List<String>> loadAutoComplete(final String keyword) {<NEW_LINE>return Observable.create(new Observable.OnSubscribe<List<String>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void call(Subscriber<? super List<String>> subscriber) {<NEW_LINE>// RequestBody body = new FormBody.Builder()<NEW_LINE>// .add("key", keyword)<NEW_LINE>// .add("s", "1")<NEW_LINE>// .build();<NEW_LINE>// Request request = new Request.Builder()<NEW_LINE>// .url("http://m.ikanman.com/support/word.ashx")<NEW_LINE>// .post(body)<NEW_LINE>// .build();<NEW_LINE>Request request = new Request.Builder().url("http://m.ac.qq.com/search/smart?word=" + keyword).build();<NEW_LINE>try {<NEW_LINE>String jsonString = getResponseBody(App.getHttpClient(), request);<NEW_LINE>// JSONArray array = new JSONArray(jsonString);<NEW_LINE>JSONObject jsonObject = new JSONObject(jsonString);<NEW_LINE>JSONArray array = jsonObject.getJSONArray("data");<NEW_LINE>List<String> <MASK><NEW_LINE>for (int i = 0; i != array.length(); ++i) {<NEW_LINE>// list.add(array.getJSONObject(i).getString("t"));<NEW_LINE>list.add(array.getJSONObject(i).getString("title"));<NEW_LINE>}<NEW_LINE>subscriber.onNext(list);<NEW_LINE>subscriber.onCompleted();<NEW_LINE>} catch (Exception e) {<NEW_LINE>subscriber.onError(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}).subscribeOn(Schedulers.io());<NEW_LINE>}
list = new ArrayList<>();
294,101
private boolean usedInOuter(NameDeclaration decl, JavaNode body) {<NEW_LINE>List<ASTClassOrInterfaceBodyDeclaration> classOrInterfaceBodyDeclarations = body.findChildrenOfType(ASTClassOrInterfaceBodyDeclaration.class);<NEW_LINE>List<ASTEnumConstant> enumConstants = <MASK><NEW_LINE>List<AbstractJavaNode> nodes = new ArrayList<>();<NEW_LINE>nodes.addAll(classOrInterfaceBodyDeclarations);<NEW_LINE>nodes.addAll(enumConstants);<NEW_LINE>for (AbstractJavaNode node : nodes) {<NEW_LINE>for (ASTPrimarySuffix primarySuffix : node.findDescendantsOfType(ASTPrimarySuffix.class, true)) {<NEW_LINE>if (decl.getImage().equals(primarySuffix.getImage())) {<NEW_LINE>// No violation<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (ASTPrimaryPrefix primaryPrefix : node.findDescendantsOfType(ASTPrimaryPrefix.class, true)) {<NEW_LINE>ASTName name = primaryPrefix.getFirstDescendantOfType(ASTName.class);<NEW_LINE>if (name != null) {<NEW_LINE>for (String id : name.getImage().split("\\.")) {<NEW_LINE>if (id.equals(decl.getImage())) {<NEW_LINE>// No violation<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
body.findChildrenOfType(ASTEnumConstant.class);
601,971
public static Drawable createSimpleSelectorDrawable(Context context, int resource, int defaultColor, int pressedColor) {<NEW_LINE>Resources resources = context.getResources();<NEW_LINE>Drawable defaultDrawable = resources.getDrawable(resource).mutate();<NEW_LINE>if (defaultColor != 0) {<NEW_LINE>defaultDrawable.setColorFilter(new PorterDuffColorFilter(defaultColor<MASK><NEW_LINE>}<NEW_LINE>Drawable pressedDrawable = resources.getDrawable(resource).mutate();<NEW_LINE>if (pressedColor != 0) {<NEW_LINE>pressedDrawable.setColorFilter(new PorterDuffColorFilter(pressedColor, PorterDuff.Mode.SRC_IN));<NEW_LINE>}<NEW_LINE>StateListDrawable stateListDrawable = new StateListDrawable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean selectDrawable(int index) {<NEW_LINE>if (Build.VERSION.SDK_INT < 21) {<NEW_LINE>Drawable drawable = Theme.getStateDrawable(this, index);<NEW_LINE>ColorFilter colorFilter = null;<NEW_LINE>if (drawable instanceof BitmapDrawable) {<NEW_LINE>colorFilter = ((BitmapDrawable) drawable).getPaint().getColorFilter();<NEW_LINE>} else if (drawable instanceof NinePatchDrawable) {<NEW_LINE>colorFilter = ((NinePatchDrawable) drawable).getPaint().getColorFilter();<NEW_LINE>}<NEW_LINE>boolean result = super.selectDrawable(index);<NEW_LINE>if (colorFilter != null) {<NEW_LINE>drawable.setColorFilter(colorFilter);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>return super.selectDrawable(index);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>stateListDrawable.addState(new int[] { android.R.attr.state_pressed }, pressedDrawable);<NEW_LINE>stateListDrawable.addState(new int[] { android.R.attr.state_selected }, pressedDrawable);<NEW_LINE>stateListDrawable.addState(StateSet.WILD_CARD, defaultDrawable);<NEW_LINE>return stateListDrawable;<NEW_LINE>}
, PorterDuff.Mode.SRC_IN));
601,633
public HardCodedString modifyHCStringText(HardCodedString hcString) {<NEW_LINE>String hcStr = hcString.getText();<NEW_LINE>int strAndVarLength = strAndVarFound.length();<NEW_LINE>if (hcStr.contains(strAndVarFound)) {<NEW_LINE>// NOI18N<NEW_LINE>String newHcstrText = "";<NEW_LINE>int startVar = hcStr.indexOf(strAndVarFound);<NEW_LINE>int endVar = -1;<NEW_LINE>int counterVar = 0;<NEW_LINE>newHcstrText = hcStr.substring(0, startVar);<NEW_LINE>while (startVar != -1) {<NEW_LINE>if (counterVar > 0) {<NEW_LINE>// NOI18N<NEW_LINE>newHcstrText = newHcstrText.concat(" + \"").concat(hcStr.substring(endVar + strAndVarLength, startVar));<NEW_LINE>}<NEW_LINE>endVar = hcStr.indexOf(strAndVarFound, startVar + strAndVarLength);<NEW_LINE>if (startVar + strAndVarLength == endVar) {<NEW_LINE>// NOI18N<NEW_LINE>newHcstrText = newHcstrText.concat("\"");<NEW_LINE>counterVar--;<NEW_LINE>} else {<NEW_LINE>// NOI18N<NEW_LINE>newHcstrText = newHcstrText.concat("\" + ").concat(hcStr.substring(startVar + strAndVarLength, endVar).trim());<NEW_LINE>}<NEW_LINE>startVar = hcStr.indexOf(strAndVarFound, endVar + strAndVarLength);<NEW_LINE>counterVar++;<NEW_LINE>if (startVar == -1) {<NEW_LINE>// NOI18N<NEW_LINE>newHcstrText = hcStr.substring(endVar + strAndVarLength).trim().length() == 0 ? <MASK><NEW_LINE>newHcstrText = newHcstrText.concat(hcStr.substring(endVar + strAndVarLength));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new HardCodedString(newHcstrText, hcString.getStartPosition(), hcString.getEndPosition());<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
newHcstrText : newHcstrText.concat(" + \"");
695,950
private void prepare(UploadCheckPoint uploadCheckPoint, UploadFileRequest uploadFileRequest) {<NEW_LINE>uploadCheckPoint.magic = UploadCheckPoint.UPLOAD_MAGIC;<NEW_LINE>uploadCheckPoint.uploadFile = uploadFileRequest.getUploadFile();<NEW_LINE>uploadCheckPoint.key = uploadFileRequest.getKey();<NEW_LINE>uploadCheckPoint.uploadFileStat = FileStat.getFileStat(uploadCheckPoint.uploadFile);<NEW_LINE>uploadCheckPoint.uploadParts = splitFile(uploadCheckPoint.uploadFileStat.size, uploadFileRequest.getPartSize());<NEW_LINE>uploadCheckPoint.partETags = new ArrayList<PartETag>();<NEW_LINE>uploadCheckPoint.originPartSize = uploadFileRequest.getPartSize();<NEW_LINE>ObjectMetadata metadata = uploadFileRequest.getObjectMetadata();<NEW_LINE>if (metadata == null) {<NEW_LINE>metadata = new ObjectMetadata();<NEW_LINE>}<NEW_LINE>if (metadata.getContentType() == null) {<NEW_LINE>metadata.setContentType(Mimetypes.getInstance().getMimetype(uploadCheckPoint<MASK><NEW_LINE>}<NEW_LINE>InitiateMultipartUploadRequest initiateUploadRequest = new InitiateMultipartUploadRequest(uploadFileRequest.getBucketName(), uploadFileRequest.getKey(), metadata);<NEW_LINE>Payer payer = uploadFileRequest.getRequestPayer();<NEW_LINE>if (payer != null) {<NEW_LINE>initiateUploadRequest.setRequestPayer(payer);<NEW_LINE>}<NEW_LINE>initiateUploadRequest.setSequentialMode(uploadFileRequest.getSequentialMode());<NEW_LINE>InitiateMultipartUploadResult initiateUploadResult = initiateMultipartUploadWrap(uploadCheckPoint, initiateUploadRequest);<NEW_LINE>uploadCheckPoint.uploadID = initiateUploadResult.getUploadId();<NEW_LINE>}
.uploadFile, uploadCheckPoint.key));
1,128,033
public RecoveryInstanceDataReplicationError unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RecoveryInstanceDataReplicationError recoveryInstanceDataReplicationError = new RecoveryInstanceDataReplicationError();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<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("error", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>recoveryInstanceDataReplicationError.setError(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("rawError", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>recoveryInstanceDataReplicationError.setRawError(context.getUnmarshaller(String.<MASK><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 recoveryInstanceDataReplicationError;<NEW_LINE>}
class).unmarshall(context));
1,116,697
private void queueIO(TCPBaseRequestContext req) throws IOException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.entry(tc, "queueIO");<NEW_LINE>}<NEW_LINE>final TCPConnLink conn = req.getTCPConnLink();<NEW_LINE>final ChannelSelector channelSelector;<NEW_LINE>if (req.isRequestTypeRead()) {<NEW_LINE>channelSelector = ((NioSocketIOChannel) conn.getSocketIOChannel()).getChannelSelectorRead();<NEW_LINE>} else {<NEW_LINE>channelSelector = ((NioSocketIOChannel) conn.getSocketIOChannel()).getChannelSelectorWrite();<NEW_LINE>}<NEW_LINE>if (channelSelector != null) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {<NEW_LINE>Tr.event(tc, "Adding work to selector");<NEW_LINE>}<NEW_LINE>channelSelector.addWork(req);<NEW_LINE>} else {<NEW_LINE>// Figure out which ChannelSelector to queue this work<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {<NEW_LINE>Tr.event(tc, "Finding selector for IO");<NEW_LINE>}<NEW_LINE>if (req.isRequestTypeRead()) {<NEW_LINE>// Read IO, determine if this req is inbound or outbound.<NEW_LINE>if (conn.getConfig().isInbound() || combineSelectors) {<NEW_LINE>moveIntoPosition(readInboundCount, readInbound, req, CS_READ_INBOUND);<NEW_LINE>} else {<NEW_LINE>moveIntoPosition(<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Write IO, determine if this req is inbound or outbound.<NEW_LINE>if (conn.getConfig().isInbound() || combineSelectors) {<NEW_LINE>moveIntoPosition(writeInboundCount, writeInbound, req, CS_WRITE_INBOUND);<NEW_LINE>} else {<NEW_LINE>moveIntoPosition(writeOutboundCount, writeOutbound, req, CS_WRITE_OUTBOUND);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.exit(tc, "queueIO");<NEW_LINE>}<NEW_LINE>}
readOutboundCount, readOutbound, req, CS_READ_OUTBOUND);
1,823,771
private static List<URI> expand(Iterable<URI> inputs) throws IOException {<NEW_LINE>List<URI> expanded = new ArrayList<>();<NEW_LINE>for (URI input : inputs) {<NEW_LINE>if (isFileOrDir(input)) {<NEW_LINE>Path inputPath = Paths.get(input);<NEW_LINE>if (Files.isDirectory(inputPath)) {<NEW_LINE>try (DirectoryStream<Path> childPaths = Files.newDirectoryStream(inputPath)) {<NEW_LINE>for (Path childPath : childPaths) {<NEW_LINE>expanded.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>expanded.add(input);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>expanded.add(input);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < expanded.size(); i++) {<NEW_LINE>URI input = expanded.get(i);<NEW_LINE>if (input.getScheme() == null) {<NEW_LINE>expanded.set(i, Paths.get(input.getRawPath()).toUri());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return expanded;<NEW_LINE>}
add(childPath.toUri());
471,275
private Set<VideoFormat> excludeFormats(Set<VideoFormat> formats) {<NEW_LINE>// remain no more than four position<NEW_LINE>// formats to remove: 240p, 480p<NEW_LINE>// get rid off java.util.Collections$UnmodifiableCollection<NEW_LINE>TreeSet<VideoFormat> sortedSet = new TreeSet<>(formats);<NEW_LINE>sortedSet.add(VideoFormat._Auto_);<NEW_LINE>sortedSet.remove(VideoFormat._720p60_);<NEW_LINE>sortedSet.remove(VideoFormat._1080p60_);<NEW_LINE>sortedSet.remove(VideoFormat._1440p_);<NEW_LINE><MASK><NEW_LINE>sortedSet.remove(VideoFormat._2160p);<NEW_LINE>sortedSet.remove(VideoFormat._2160p60);<NEW_LINE>if (sortedSet.size() > 5) {<NEW_LINE>sortedSet.remove(VideoFormat._240p_);<NEW_LINE>}<NEW_LINE>if (sortedSet.size() > 5) {<NEW_LINE>sortedSet.remove(VideoFormat._480p_);<NEW_LINE>}<NEW_LINE>return sortedSet;<NEW_LINE>}
sortedSet.remove(VideoFormat._1440p60_);
1,331,738
private static String renderDocumentType(DocumentType docType) {<NEW_LINE>String publicId = docType.getPublicId();<NEW_LINE>String systemId = docType.getSystemId();<NEW_LINE>String nodeName;<NEW_LINE>if (null != docType.getOwnerDocument() && null != docType.getOwnerDocument().getDocumentElement() && null != docType.getOwnerDocument().getDocumentElement().getNodeName()) {<NEW_LINE>nodeName = docType.getOwnerDocument()<MASK><NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!DoctypeMaker.isHtml(nodeName, publicId, systemId)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<!DOCTYPE ").append(nodeName);<NEW_LINE>// The Name in the document type declaration must match the element type<NEW_LINE>// of the root element.<NEW_LINE>if (null != publicId && publicId.length() > 0) {<NEW_LINE>sb.append(" PUBLIC ").append('"').append(publicId.replaceAll("\"", "%22")).append('"');<NEW_LINE>}<NEW_LINE>if (null != systemId && systemId.length() > 0) {<NEW_LINE>// Sanity check - system urls should parse as an absolute uris<NEW_LINE>try {<NEW_LINE>URI u = new URI(systemId);<NEW_LINE>if (u.isAbsolute() && ("http".equals(u.getScheme()) || "https".equals(u.getScheme()))) {<NEW_LINE>sb.append(" ").append('"').append(systemId.replaceAll("\"", "%22")).append('"');<NEW_LINE>}<NEW_LINE>} catch (URISyntaxException e) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sb.append(">");<NEW_LINE>return sb.toString();<NEW_LINE>}
.getDocumentElement().getNodeName();
987,588
private boolean copyDataByLogSegment(LogSegment logSegmentToCopy, FileSpan duplicateSearchSpan) throws IOException, StoreException {<NEW_LINE>logger.debug("Copying data from {}", logSegmentToCopy);<NEW_LINE>long logSegmentStartTime = time.milliseconds();<NEW_LINE>for (Offset indexSegmentStartOffset : getIndexSegmentDetails(logSegmentToCopy.getName()).keySet()) {<NEW_LINE>IndexSegment indexSegmentToCopy = srcIndex.<MASK><NEW_LINE>logger.info("Processing index segment {} with {}", indexSegmentToCopy.getFile(), storeId);<NEW_LINE>long startTime = SystemTime.getInstance().milliseconds();<NEW_LINE>if (needsCopying(indexSegmentToCopy.getEndOffset()) && !copyDataByIndexSegment(logSegmentToCopy, indexSegmentToCopy, duplicateSearchSpan)) {<NEW_LINE>// there is a shutdown in progress or there was no space to copy all entries.<NEW_LINE>logger.info("Did not copy all entries in {} with {} (either because there is no space or there is a shutdown)", indexSegmentToCopy.getFile(), storeId);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>srcMetrics.compactionCopyDataByIndexSegmentTimeInMs.update(SystemTime.getInstance().milliseconds() - startTime, TimeUnit.MILLISECONDS);<NEW_LINE>}<NEW_LINE>srcMetrics.compactionCopyDataByLogSegmentTimeInMs.update(SystemTime.getInstance().milliseconds() - logSegmentStartTime, TimeUnit.MILLISECONDS);<NEW_LINE>return true;<NEW_LINE>}
getIndexSegments().get(indexSegmentStartOffset);
410,391
private void sendHandshakeRequest(String key) {<NEW_LINE>try {<NEW_LINE>String path = "/mqtt";<NEW_LINE>URI srvUri = new URI(uri);<NEW_LINE>if (srvUri.getRawPath() != null && !srvUri.getRawPath().isEmpty()) {<NEW_LINE>path = srvUri.getRawPath();<NEW_LINE>if (srvUri.getRawQuery() != null && !srvUri.getRawQuery().isEmpty()) {<NEW_LINE>path += "?" + srvUri.getRawQuery();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>PrintWriter pw = new PrintWriter(output);<NEW_LINE>pw.print("GET " + path + " HTTP/1.1" + LINE_SEPARATOR);<NEW_LINE>if (port != 80 && port != 443) {<NEW_LINE>pw.print("Host: " + host + ":" + port + LINE_SEPARATOR);<NEW_LINE>} else {<NEW_LINE>pw.print("Host: " + host + LINE_SEPARATOR);<NEW_LINE>}<NEW_LINE>pw.print("Upgrade: websocket" + LINE_SEPARATOR);<NEW_LINE>pw.print("Connection: Upgrade" + LINE_SEPARATOR);<NEW_LINE>pw.print("Sec-WebSocket-Key: " + key + LINE_SEPARATOR);<NEW_LINE>pw.print("Sec-WebSocket-Protocol: mqtt" + LINE_SEPARATOR);<NEW_LINE>pw.print("Sec-WebSocket-Version: 13" + LINE_SEPARATOR);<NEW_LINE>if (customWebSocketHeaders != null) {<NEW_LINE>customWebSocketHeaders.entrySet().forEach(entry -> pw.print(entry.getKey() + ": " + entry<MASK><NEW_LINE>}<NEW_LINE>String userInfo = srvUri.getUserInfo();<NEW_LINE>if (userInfo != null) {<NEW_LINE>pw.print("Authorization: Basic " + Base64.encode(userInfo) + LINE_SEPARATOR);<NEW_LINE>}<NEW_LINE>pw.print(LINE_SEPARATOR);<NEW_LINE>pw.flush();<NEW_LINE>} catch (URISyntaxException e) {<NEW_LINE>throw new IllegalStateException(e.getMessage());<NEW_LINE>}<NEW_LINE>}
.getValue() + LINE_SEPARATOR));
840,378
public void marshall(ProactiveAnomalySummary proactiveAnomalySummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (proactiveAnomalySummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getId(), ID_BINDING);<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getSeverity(), SEVERITY_BINDING);<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getStatus(), STATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getUpdateTime(), UPDATETIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getAnomalyTimeRange(), ANOMALYTIMERANGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getAnomalyReportedTimeRange(), ANOMALYREPORTEDTIMERANGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getPredictionTimeRange(), PREDICTIONTIMERANGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getSourceDetails(), SOURCEDETAILS_BINDING);<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getAssociatedInsightId(), ASSOCIATEDINSIGHTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getResourceCollection(), RESOURCECOLLECTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getLimit(), LIMIT_BINDING);<NEW_LINE>protocolMarshaller.marshall(proactiveAnomalySummary.getSourceMetadata(), SOURCEMETADATA_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
proactiveAnomalySummary.getAnomalyResources(), ANOMALYRESOURCES_BINDING);
100,705
public DomainDeliverabilityTrackingOption unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DomainDeliverabilityTrackingOption domainDeliverabilityTrackingOption = new DomainDeliverabilityTrackingOption();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<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("Domain", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>domainDeliverabilityTrackingOption.setDomain(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("SubscriptionStartDate", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>domainDeliverabilityTrackingOption.setSubscriptionStartDate(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("InboxPlacementTrackingOption", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>domainDeliverabilityTrackingOption.setInboxPlacementTrackingOption(InboxPlacementTrackingOptionJsonUnmarshaller.getInstance().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 domainDeliverabilityTrackingOption;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,375,048
private void incrementCountAndCheckExhausted() {<NEW_LINE>if (countResponsesReceived.incrementAndGet() == numMasters) {<NEW_LINE>if (responseDCalled.compareAndSet(false, true)) {<NEW_LINE>boolean allUnrecoverable = true;<NEW_LINE>// When there are no exceptions, default to retry semantics.<NEW_LINE>if (exceptionsReceived.isEmpty()) {<NEW_LINE>allUnrecoverable = false;<NEW_LINE>}<NEW_LINE>for (Exception ex : exceptionsReceived) {<NEW_LINE>if (!(ex instanceof NonRecoverableException)) {<NEW_LINE>allUnrecoverable = false;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (Exception ex : exceptionsReceived) {<NEW_LINE>if (!(ex instanceof NoLeaderMasterFoundException)) {<NEW_LINE>allUnrecoverable = false;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String allHosts = NetUtil.hostsAndPortsToString(masterAddrs);<NEW_LINE>// Doing a negative check because allUnrecoverable stays true if there are no exceptions.<NEW_LINE>if (!allUnrecoverable) {<NEW_LINE>if (exceptionsReceived.isEmpty()) {<NEW_LINE>LOG.warn("None of the provided masters (" + allHosts + ") is a leader, will retry.");<NEW_LINE>} else {<NEW_LINE>LOG.warn("Unable to find the leader master (" + allHosts + "), will retry");<NEW_LINE>}<NEW_LINE>responseD.callback(NoLeaderMasterFoundException.create("Master config (" <MASK><NEW_LINE>} else {<NEW_LINE>// This will stop retries.<NEW_LINE>responseD.callback(new NonRecoverableException("Couldn't find a valid master in (" + allHosts + "), exceptions: " + exceptionsReceived));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
+ allHosts + ") has no leader.", exceptionsReceived));
1,853,695
private void createAndCheckForSymlinks(Path dir, Artifact outputFile) throws IOException {<NEW_LINE>Path rootPath = outputFile.getRoot().getRoot().asPath();<NEW_LINE>PathFragment root = rootPath.asFragment();<NEW_LINE>// If the output root has not been created yet, do so now.<NEW_LINE>if (!knownDirectories.containsKey(root)) {<NEW_LINE>FileStatus stat = rootPath.statNullable(Symlinks.NOFOLLOW);<NEW_LINE>if (stat == null) {<NEW_LINE>rootPath.createDirectoryAndParents();<NEW_LINE>knownDirectories.put(root, DirectoryState.CREATED);<NEW_LINE>} else {<NEW_LINE>knownDirectories.put(root, DirectoryState.FOUND);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Walk up until the first known directory is found (must be root or below).<NEW_LINE>List<Path> checkDirs = new ArrayList<>();<NEW_LINE>while (!dir.equals(rootPath) && !knownDirectories.containsKey(dir.asFragment())) {<NEW_LINE>checkDirs.add(dir);<NEW_LINE>dir = dir.getParentDirectory();<NEW_LINE>}<NEW_LINE>// Check in reverse order (parent directory first):<NEW_LINE>// - If symlink -> Exception.<NEW_LINE>// - If non-existent -> Create directory and all children.<NEW_LINE>boolean parentCreated = knownDirectories.get(dir.<MASK><NEW_LINE>for (Path path : Lists.reverse(checkDirs)) {<NEW_LINE>if (parentCreated) {<NEW_LINE>// If we have created this directory's parent, we know that it doesn't exist or else we<NEW_LINE>// would know about it already. Even if a parallel thread has created it in the meantime,<NEW_LINE>// createDirectory() will return normally and we can assume that a regular directory exists<NEW_LINE>// afterwards.<NEW_LINE>path.createDirectory();<NEW_LINE>knownDirectories.put(path.asFragment(), DirectoryState.CREATED);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>boolean createdNew = path.createWritableDirectory();<NEW_LINE>knownDirectories.put(path.asFragment(), createdNew ? DirectoryState.CREATED : DirectoryState.FOUND);<NEW_LINE>}<NEW_LINE>}
asFragment()) == DirectoryState.CREATED;
715,214
private void mapInvoicedQty(@NonNull final DETAILXrech detailXrech, @NonNull final EDICctopInvoic500VType xmlCctopInvoic500V, @NonNull final InvoicSettings settings, @NonNull final DecimalFormat decimalFormat) {<NEW_LINE>final String lineNumber = formatNumber(xmlCctopInvoic500V.getLine(), decimalFormat);<NEW_LINE>final DQUAN1 dQuan1 = INVOIC_objectFactory.createDQUAN1();<NEW_LINE>detailXrech.getDQUAN1().add(dQuan1);<NEW_LINE>dQuan1.setDOCUMENTID(detailXrech.getDOCUMENTID());<NEW_LINE>dQuan1.setLINENUMBER(lineNumber);<NEW_LINE>dQuan1.setQUANTITYQUAL(QuantityQual.INVO.name());<NEW_LINE>switch(settings.getInvoicLineQuantityInUOM()) {<NEW_LINE>case InvoicedUOM -><NEW_LINE>{<NEW_LINE>final BigDecimal qtyInvoiced = ValidationHelper.validateObject(xmlCctopInvoic500V.getQtyInvoiced(), "@FillMandatory@ @C_InvoiceLine_ID@=" + xmlCctopInvoic500V.getLine() + " @QtyInvoiced@");<NEW_LINE>dQuan1.setQUANTITY(formatNumber(qtyInvoiced, decimalFormat));<NEW_LINE>if (settings.isInvoicLineMEASUREMENTUNITRequired()) {<NEW_LINE>final String eanComUom = ValidationHelper.validateString(xmlCctopInvoic500V.getEanComUOM(), "@FillMandatory@ @C_InvoiceLine_ID@=" + <MASK><NEW_LINE>final MeasurementUnit measurementUnit = MeasurementUnit.fromMetasfreshUOM(eanComUom);<NEW_LINE>if (!settings.isMeasurementUnitAllowed(measurementUnit)) {<NEW_LINE>throw new RuntimeCamelException("@C_InvoiceLine_ID@=" + xmlCctopInvoic500V.getLine() + " @EanComUOM@=" + settings.getInvoicLineRequiredMEASUREMENTUNIT() + " @REQUIRED@");<NEW_LINE>}<NEW_LINE>dQuan1.setMEASUREMENTUNIT(measurementUnit.name());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>case OrderedUOM -><NEW_LINE>{<NEW_LINE>final BigDecimal qtyInvoicedInOrderedUOM = ValidationHelper.validateObject(xmlCctopInvoic500V.getQtyInvoicedInOrderedUOM(), "@FillMandatory@ @C_InvoiceLine_ID@=" + xmlCctopInvoic500V.getLine() + " @QtyInvoicedInOrderedUOM@");<NEW_LINE>dQuan1.setQUANTITY(formatNumber(qtyInvoicedInOrderedUOM, decimalFormat));<NEW_LINE>if (settings.isInvoicLineMEASUREMENTUNITRequired()) {<NEW_LINE>final String eanComUom = ValidationHelper.validateString(xmlCctopInvoic500V.getEanComOrderedUOM(), "@FillMandatory@ @C_InvoiceLine_ID@=" + xmlCctopInvoic500V.getLine() + " @EanComOrderedUOM@");<NEW_LINE>final MeasurementUnit measurementUnit = MeasurementUnit.fromMetasfreshUOM(eanComUom);<NEW_LINE>if (!settings.isMeasurementUnitAllowed(measurementUnit)) {<NEW_LINE>throw new RuntimeCamelException("@C_InvoiceLine_ID@=" + xmlCctopInvoic500V.getLine() + " @EanComOrderedUOM@=" + settings.getInvoicLineRequiredMEASUREMENTUNIT() + " @REQUIRED@");<NEW_LINE>}<NEW_LINE>dQuan1.setMEASUREMENTUNIT(measurementUnit.name());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>default -><NEW_LINE>throw new RuntimeCamelException("Unexpected InvoicLineQuantityInUOM=" + settings.getInvoicLineQuantityInUOM());<NEW_LINE>}<NEW_LINE>}
xmlCctopInvoic500V.getLine() + " @EanComUOM@");
1,343,821
private void initView(Context context, AttributeSet attrs) {<NEW_LINE>mContext = context;<NEW_LINE>TypedArray attributesArray = context.obtainStyledAttributes(attrs, R.styleable.TagView);<NEW_LINE>mTagMargin = (int) attributesArray.getDimension(R.styleable.TagView_tagMargin, dipToPixels(mTagMargin));<NEW_LINE>mTextPaddingLeft = (int) attributesArray.getDimension(R.styleable<MASK><NEW_LINE>mTextPaddingRight = (int) attributesArray.getDimension(R.styleable.TagView_textPaddingRight, dipToPixels(mTextPaddingRight));<NEW_LINE>mTextPaddingTop = (int) attributesArray.getDimension(R.styleable.TagView_textPaddingTop, dipToPixels(mTextPaddingTop));<NEW_LINE>mTextPaddingBottom = (int) attributesArray.getDimension(R.styleable.TagView_textPaddingBottom, dipToPixels(mTextPaddingBottom));<NEW_LINE>mTagCornerRadius = attributesArray.getDimensionPixelSize(R.styleable.TagView_tagCornerRadius, dipToPixels(DEFAULT_CORNER_RADIUS));<NEW_LINE>mUppercaseTags = attributesArray.getBoolean(R.styleable.TagView_tagUppercase, DEFAULT_UPPERCASE);<NEW_LINE>mTagDrawablePadding = (int) attributesArray.getDimension(R.styleable.TagView_tagDrawablePadding, dipToPixels(mTagDrawablePadding));<NEW_LINE>mTagTextSize = attributesArray.getDimension(R.styleable.TagView_tagTextSize, DEFAULT_TEXT_SIZE);<NEW_LINE>mTagTextColor = attributesArray.getColor(R.styleable.TagView_tagTextColor, mContext.getResources().getColor(mTagTextColor));<NEW_LINE>mIsAnimated = attributesArray.getBoolean(R.styleable.TagView_isActionAnimated, mIsAnimated);<NEW_LINE>attributesArray.recycle();<NEW_LINE>setOrientation(VERTICAL);<NEW_LINE>setGravity(Gravity.CENTER_HORIZONTAL);<NEW_LINE>getViewTreeObserver().addOnGlobalLayoutListener(() -> {<NEW_LINE>if (!mInitialized) {<NEW_LINE>mInitialized = true;<NEW_LINE>setTags();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.TagView_textPaddingLeft, dipToPixels(mTextPaddingLeft));
724,265
private Notification create() {<NEW_LINE>Type type = this.type.getSettingValue();<NEW_LINE>Color foreground = HtmlColors.decode(foregroundColor.getSettingValue());<NEW_LINE>Color background = HtmlColors.decode(backgroundColor.getSettingValue());<NEW_LINE>Notification.Builder b = new Notification.Builder(type);<NEW_LINE>b.setDesktopEnabled(desktopState.getSettingValue());<NEW_LINE>b.setSoundEnabled(soundState.getSettingValue());<NEW_LINE>b.setForeground(foreground);<NEW_LINE>b.setBackground(background);<NEW_LINE>b.setSoundFile(soundFile.getSettingValue());<NEW_LINE>b.setVolume(volumeSlider.getSettingValue());<NEW_LINE>b.setSoundCooldown(soundCooldown.getSettingValue<MASK><NEW_LINE>b.setSoundInactiveCooldown(soundInactiveCooldown.getSettingValue(0L).intValue());<NEW_LINE>b.setChannels(channels.getSettingValue());<NEW_LINE>b.setMatcher(matcher.getSettingValue());<NEW_LINE>b.setOptions(getSubTypes());<NEW_LINE>current = new Notification(b);<NEW_LINE>return current;<NEW_LINE>}
(0L).intValue());