idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,367,003
final BatchCreateAttendeeResult executeBatchCreateAttendee(BatchCreateAttendeeRequest batchCreateAttendeeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchCreateAttendeeRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchCreateAttendeeRequest> request = null;<NEW_LINE>Response<BatchCreateAttendeeResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchCreateAttendeeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchCreateAttendeeRequest));<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, "Chime SDK Meetings");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchCreateAttendee");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<BatchCreateAttendeeResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchCreateAttendeeResultJsonUnmarshaller());<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();
196,329
public void onSuccess(String result) {<NEW_LINE>int comma = result.indexOf(",");<NEW_LINE>if (comma < 0) {<NEW_LINE>OdeLog.log("screenshot invalid");<NEW_LINE>next.run();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Strip off url header<NEW_LINE>result = result.substring(comma + 1);<NEW_LINE>String screenShotName = fileNode.getName();<NEW_LINE>int period = screenShotName.lastIndexOf(".");<NEW_LINE>screenShotName = "screenshots/" + screenShotName.substring(0, period) + ".png";<NEW_LINE><MASK><NEW_LINE>projectService.screenshot(sessionId, projectId, screenShotName, result, new OdeAsyncCallback<RpcResult>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess(RpcResult result) {<NEW_LINE>if (deferred) {<NEW_LINE>next.run();<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>public void OnFailure(Throwable caught) {<NEW_LINE>super.onFailure(caught);<NEW_LINE>if (deferred) {<NEW_LINE>next.run();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (!deferred) {<NEW_LINE>next.run();<NEW_LINE>}<NEW_LINE>}
OdeLog.log("ScreenShotName = " + screenShotName);
373,527
// -------------------------------------------- Methods from ConfigProcessor<NEW_LINE>@Override<NEW_LINE>public void process(ServletContext sc, DocumentInfo[] documentInfos) {<NEW_LINE>for (int i = 0, length = documentInfos.length; i < length; i++) {<NEW_LINE>if (LOGGER.isLoggable(Level.FINE)) {<NEW_LINE>LOGGER.log(Level.FINE, MessageFormat.format("Processing facelet-taglibrary document: ''{0}''", documentInfos[i].getSourceURI()));<NEW_LINE>}<NEW_LINE>Document document = documentInfos[i].getDocument();<NEW_LINE>// #243750 - skip incomplete tag libraries files<NEW_LINE>if (document == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String namespace = document.getDocumentElement().getNamespaceURI();<NEW_LINE>Element documentElement = document.getDocumentElement();<NEW_LINE>NodeList libraryClass = documentElement.getElementsByTagNameNS(namespace, LIBRARY_CLASS);<NEW_LINE>if (libraryClass != null && libraryClass.getLength() > 0) {<NEW_LINE>processTaglibraryClass(sc, libraryClass, compiler);<NEW_LINE>} else {<NEW_LINE>processTagLibrary(sc, documentInfos[i<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// try {<NEW_LINE>// invokeNext(sc, documentInfos);<NEW_LINE>// } catch (Exception e) {<NEW_LINE>// //ignore<NEW_LINE>// }<NEW_LINE>}
], documentElement, namespace, compiler);
1,263,172
public boolean copySlides(Long originDisplayId, Long displayId, User user) {<NEW_LINE>// copy slide entity<NEW_LINE>List<DisplaySlide> originSlides = displaySlideMapper.selectByDisplayId(originDisplayId);<NEW_LINE>if (CollectionUtils.isEmpty(originSlides)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>List<RelModelCopy> slideCopies = new ArrayList<>();<NEW_LINE>originSlides.forEach(originDisplay -> {<NEW_LINE>DisplaySlide slide = new DisplaySlide();<NEW_LINE>BeanUtils.copyProperties(originDisplay, slide, "id");<NEW_LINE>slide.setDisplayId(displayId);<NEW_LINE>slide.createdBy(user.getId());<NEW_LINE>if (displaySlideMapper.insert(slide) > 0) {<NEW_LINE>optLogger.info("Slide({}) is copied from {}, by user({})", slide.toString(), originDisplay.toString(), user.getId());<NEW_LINE>slideCopies.add(new RelModelCopy(originDisplay.getId(), slide.getId()));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// copy relRoleSlide<NEW_LINE>if (!slideCopies.isEmpty()) {<NEW_LINE>if (relRoleSlideMapper.copyRoleSlideRelation(slideCopies, user.getId()) > 0) {<NEW_LINE>optLogger.info("Display({}) slides role is copied by user({}), from:{}", displayId, user.getId(), originDisplayId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// copy memDisplaySlideWidget<NEW_LINE>List<MemDisplaySlideWidgetWithSlide> memWithSlideWidgetList = memDisplaySlideWidgetMapper.getMemWithSlideByDisplayId(originDisplayId);<NEW_LINE>if (CollectionUtils.isEmpty(memWithSlideWidgetList)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>List<RelModelCopy> memCopies = new ArrayList<>();<NEW_LINE>Map<Long, Long> slideCopyIdMap = new HashMap<>();<NEW_LINE>slideCopies.forEach(copy -> slideCopyIdMap.put(copy.getOriginId(), copy.getCopyId()));<NEW_LINE>memWithSlideWidgetList.forEach(originMem -> {<NEW_LINE>MemDisplaySlideWidget mem = new MemDisplaySlideWidget();<NEW_LINE>BeanUtils.copyProperties(originMem, mem, "id");<NEW_LINE>mem.setDisplaySlideId(slideCopyIdMap.get(originMem.getDisplaySlideId()));<NEW_LINE>mem.createdBy(user.getId());<NEW_LINE>int insert = memDisplaySlideWidgetMapper.insert(mem);<NEW_LINE>if (insert > 0) {<NEW_LINE>optLogger.info("MemDisplaySlideWidget({}) is copied from {}, by user({})", mem.toString(), originMem.toString(), user.getId());<NEW_LINE>memCopies.add(new RelModelCopy(originMem.getId()<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>// copy relRoleDisplaySlideWidget<NEW_LINE>if (!memCopies.isEmpty()) {<NEW_LINE>if (relRoleDisplaySlideWidgetMapper.copyRoleSlideWidgetRelation(memCopies, user.getId()) > 0) {<NEW_LINE>optLogger.info("Display({}) relRoleDisplaySlideWidgetMapper is copied by user({}), from:{}", displayId, user.getId(), originDisplayId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
, mem.getId()));
525,854
public void showAddRemoteDialog() {<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);<NEW_LINE>LayoutInflater inflater = mActivity.getLayoutInflater();<NEW_LINE>View layout = inflater.inflate(R.layout.dialog_add_remote, null);<NEW_LINE>final EditText remoteName = (EditText) layout.findViewById(R.id.remoteName);<NEW_LINE>final EditText remoteUrl = (EditText) layout.findViewById(R.id.remoteUrl);<NEW_LINE>builder.setTitle(R.string.dialog_add_remote_title).setView(layout).setPositiveButton(R.string.dialog_add_remote_positive_label, new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialogInterface, int i) {<NEW_LINE>String name = remoteName.getText().toString();<NEW_LINE>String url = remoteUrl<MASK><NEW_LINE>try {<NEW_LINE>addToRemote(name, url);<NEW_LINE>} catch (IOException e) {<NEW_LINE>Timber.e(e);<NEW_LINE>mActivity.showMessageDialog(R.string.dialog_error_title, mActivity.getString(R.string.error_something_wrong));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}).setNegativeButton(R.string.label_cancel, new DummyDialogListener()).show();<NEW_LINE>}
.getText().toString();
268,894
private void checkOwnClaim() {<NEW_LINE>if (claim != null) {<NEW_LINE>boolean isOwnClaim = Lbry.ownClaims.contains(claim);<NEW_LINE>View root = getView();<NEW_LINE>if (root != null) {<NEW_LINE>Helper.setViewVisibility(root.findViewById(R.id.file_view_action_report), isOwnClaim ? View.GONE : View.VISIBLE);<NEW_LINE>Helper.setViewVisibility(root.findViewById(R.id.file_view_action_edit), isOwnClaim ? View.VISIBLE : View.GONE);<NEW_LINE>Helper.setViewVisibility(root.findViewById(R.id.file_view_action_unpublish), isOwnClaim ? View.VISIBLE : View.GONE);<NEW_LINE>LinearLayout fileViewActionsArea = root.<MASK><NEW_LINE>fileViewActionsArea.setWeightSum(isOwnClaim ? 6 : 5);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
findViewById(R.id.file_view_actions_area);
1,216,685
private MSPData parse(String source) {<NEW_LINE>Scanner sc = new Scanner(source);<NEW_LINE>mspdata = new MSPData();<NEW_LINE>mspdata.numberOfMeetings = sc.nextInt();<NEW_LINE>sc.nextLine();<NEW_LINE>mspdata.numberOfAgents = sc.nextInt();<NEW_LINE>sc.nextLine();<NEW_LINE>mspdata.numberOfMeetingPerAgent = sc.nextInt();<NEW_LINE>sc.nextLine();<NEW_LINE>mspdata.minDisTimeBetweenMeetings = sc.nextInt();<NEW_LINE>sc.nextLine();<NEW_LINE>mspdata.maxDisTimeBetweenMeetings = sc.nextInt();<NEW_LINE>sc.nextLine();<NEW_LINE>mspdata.domainSize = sc.nextInt();<NEW_LINE>sc.nextLine();<NEW_LINE>mspdata.agentMeetings = new int[mspdata.numberOfAgents][mspdata.numberOfMeetingPerAgent];<NEW_LINE>for (int i = 0; i < mspdata.numberOfAgents; i++) {<NEW_LINE>Arrays.fill(mspdata.agentMeetings[i], -1);<NEW_LINE>int j = 0;<NEW_LINE>while (j < mspdata.numberOfMeetingPerAgent) {<NEW_LINE>mspdata.agentMeetings[i][j++] = sc.nextInt();<NEW_LINE>}<NEW_LINE>sc.nextLine();<NEW_LINE>}<NEW_LINE>mspdata.betweenMeetingsDistance = new int[mspdata.numberOfMeetings][mspdata.numberOfMeetings];<NEW_LINE>for (int i = 0; i < mspdata.numberOfMeetings; i++) {<NEW_LINE>for (int j = 0; j < mspdata.numberOfMeetings; j++) {<NEW_LINE>mspdata.betweenMeetingsDistance[i][<MASK><NEW_LINE>}<NEW_LINE>sc.nextLine();<NEW_LINE>}<NEW_LINE>sc.close();<NEW_LINE>return mspdata;<NEW_LINE>}
j] = sc.nextInt();
1,193,715
final void executeRespondDecisionTaskCompleted(RespondDecisionTaskCompletedRequest respondDecisionTaskCompletedRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(respondDecisionTaskCompletedRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RespondDecisionTaskCompletedRequest> request = null;<NEW_LINE>Response<Void> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new RespondDecisionTaskCompletedRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(respondDecisionTaskCompletedRequest));<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, "SWF");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RespondDecisionTaskCompleted");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<Void>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), null);<NEW_LINE>invoke(request, responseHandler, executionContext);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
867,392
protected void performWorkload(BaseSubscriber<CosmosItemResponse> baseSubscriber, long i) throws InterruptedException {<NEW_LINE>String id = uuid + i;<NEW_LINE><MASK><NEW_LINE>PojoizedJson newDoc = BenchmarkHelper.generateDocument(id, dataFieldValue, partitionKey, configuration.getDocumentDataFieldCount());<NEW_LINE>for (int j = 1; j <= configuration.getEncryptedStringFieldCount(); j++) {<NEW_LINE>newDoc.setProperty(ENCRYPTED_STRING_FIELD + j, uuid);<NEW_LINE>}<NEW_LINE>for (int j = 1; j <= configuration.getEncryptedLongFieldCount(); j++) {<NEW_LINE>newDoc.setProperty(ENCRYPTED_LONG_FIELD + j, 1234l);<NEW_LINE>}<NEW_LINE>for (int j = 1; j <= configuration.getEncryptedDoubleFieldCount(); j++) {<NEW_LINE>newDoc.setProperty(ENCRYPTED_DOUBLE_FIELD + j, 1234.01d);<NEW_LINE>}<NEW_LINE>if (configuration.isDisablePassingPartitionKeyAsOptionOnWrite()) {<NEW_LINE>// require parsing partition key from the doc<NEW_LINE>obs = cosmosEncryptionAsyncContainer.createItem(newDoc, new PartitionKey(id), new CosmosItemRequestOptions());<NEW_LINE>} else {<NEW_LINE>// more optimized for write as partition key is already passed as config<NEW_LINE>obs = cosmosEncryptionAsyncContainer.createItem(newDoc, new PartitionKey(id), null);<NEW_LINE>}<NEW_LINE>concurrencyControlSemaphore.acquire();<NEW_LINE>if (configuration.getOperationType() == Configuration.Operation.WriteThroughput) {<NEW_LINE>obs.subscribeOn(Schedulers.parallel()).subscribe(baseSubscriber);<NEW_LINE>} else {<NEW_LINE>LatencySubscriber<CosmosItemResponse> latencySubscriber = new LatencySubscriber<>(baseSubscriber);<NEW_LINE>latencySubscriber.context = latency.time();<NEW_LINE>obs.subscribeOn(Schedulers.parallel()).subscribe(latencySubscriber);<NEW_LINE>}<NEW_LINE>}
Mono<CosmosItemResponse<PojoizedJson>> obs;
370,284
private CaptureDescription cloneCurrentSettings() {<NEW_LINE>Objects.requireNonNull(this.currentSettings);<NEW_LINE>CaptureDescription clone = new CaptureDescription();<NEW_LINE>clone.withSizeLimitInBytes(this.currentSettings.sizeLimitInBytes());<NEW_LINE>clone.withSkipEmptyArchives(this.currentSettings.skipEmptyArchives());<NEW_LINE>clone.withIntervalInSeconds(this.currentSettings.intervalInSeconds());<NEW_LINE>clone.withEnabled(this.currentSettings.enabled());<NEW_LINE>clone.withEncoding(<MASK><NEW_LINE>if (this.currentSettings.destination() != null) {<NEW_LINE>clone.withDestination(new Destination());<NEW_LINE>clone.destination().withArchiveNameFormat(this.currentSettings.destination().archiveNameFormat());<NEW_LINE>clone.destination().withBlobContainer(this.currentSettings.destination().blobContainer());<NEW_LINE>clone.destination().withName(this.currentSettings.destination().name());<NEW_LINE>clone.destination().withStorageAccountResourceId(this.currentSettings.destination().storageAccountResourceId());<NEW_LINE>} else {<NEW_LINE>clone.withDestination(new Destination());<NEW_LINE>}<NEW_LINE>return clone;<NEW_LINE>}
this.currentSettings.encoding());
99,283
public void init(ICommonActionExtensionSite aSite) {<NEW_LINE>site = aSite;<NEW_LINE>super.init(aSite);<NEW_LINE>final StructuredViewer viewer = aSite.getStructuredViewer();<NEW_LINE>final BugContentProvider provider = BugContentProvider.getProvider(site.getContentService());<NEW_LINE>filterChangeListener = new IPropertyChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void propertyChange(PropertyChangeEvent event) {<NEW_LINE>if (!initDone) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>IWorkingSet oldWorkingSet = provider.getCurrentWorkingSet();<NEW_LINE>IWorkingSet oldWorkingSet1 = (IWorkingSet) event.getOldValue();<NEW_LINE>IWorkingSet newWorkingSet = (IWorkingSet) event.getNewValue();<NEW_LINE>if (newWorkingSet != null && (oldWorkingSet == newWorkingSet || oldWorkingSet1 == newWorkingSet)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (viewer != null) {<NEW_LINE>provider.setCurrentWorkingSet(newWorkingSet);<NEW_LINE>if (newWorkingSet == null) {<NEW_LINE>viewer.setInput(ResourcesPlugin.<MASK><NEW_LINE>} else if (oldWorkingSet != newWorkingSet) {<NEW_LINE>viewer.setInput(newWorkingSet);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>workingSetActionGroup = new WorkingSetFilterActionGroup(aSite.getViewSite().getShell(), filterChangeListener);<NEW_LINE>if (provider == null)<NEW_LINE>throw new NullPointerException("no provider");<NEW_LINE>workingSetActionGroup.setWorkingSet(provider.getCurrentWorkingSet());<NEW_LINE>doubleClickAction = new MyAction();<NEW_LINE>// only if doubleClickAction must know tree selection:<NEW_LINE>viewer.addSelectionChangedListener(doubleClickAction);<NEW_LINE>initDone = true;<NEW_LINE>}
getWorkspace().getRoot());
753,024
protected void writeResponse(BaseRequest request, BaseResponse response, HttpResponseStatus status) {<NEW_LINE>// if (HttpHeaders.is100ContinueExpected(request.getRequest())) {<NEW_LINE>// ctx.write(new DefaultFullHttpResponse(HttpVersion.HTTP_1_1,<NEW_LINE>// HttpResponseStatus.CONTINUE));<NEW_LINE>// }<NEW_LINE>FullHttpResponse responseObj = null;<NEW_LINE>try {<NEW_LINE>responseObj = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, status, Unpooled.wrappedBuffer(response.getContent().toString().getBytes("UTF-8")));<NEW_LINE>} catch (UnsupportedEncodingException e) {<NEW_LINE><MASK><NEW_LINE>responseObj = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, status, Unpooled.wrappedBuffer(response.getContent().toString().getBytes()));<NEW_LINE>}<NEW_LINE>Preconditions.checkNotNull(responseObj);<NEW_LINE>HttpMethod method = request.getRequest().method();<NEW_LINE>checkDefaultContentTypeHeader(response, responseObj);<NEW_LINE>if (!method.equals(HttpMethod.HEAD)) {<NEW_LINE>response.updateHeader(HttpHeaderNames.CONTENT_LENGTH.toString(), String.valueOf(responseObj.content().readableBytes()));<NEW_LINE>}<NEW_LINE>writeCustomHeaders(response, responseObj);<NEW_LINE>writeCookies(response, responseObj);<NEW_LINE>boolean keepAlive = HttpUtil.isKeepAlive(request.getRequest());<NEW_LINE>if (!keepAlive) {<NEW_LINE>request.getContext().write(responseObj).addListener(ChannelFutureListener.CLOSE);<NEW_LINE>} else {<NEW_LINE>responseObj.headers().set(HttpHeaderNames.CONNECTION.toString(), HttpHeaderValues.KEEP_ALIVE.toString());<NEW_LINE>request.getContext().write(responseObj);<NEW_LINE>}<NEW_LINE>}
LOG.warn("get exception.", e);
767,614
public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@audit @name('ctx') @public create context MyTermByUnrelated partition by theString from SupportBean(intPrimitive=0) terminated by SupportBean", path);<NEW_LINE>env.compileDeploy("@name('s0') context MyTermByUnrelated select theString, count(*) as cnt from SupportBean output last when terminated", path);<NEW_LINE>env.addListener("s0");<NEW_LINE>String[] fields = "theString,cnt".split(",");<NEW_LINE>env.sendEventBean(new SupportBean("A", 2));<NEW_LINE>env.milestone(0);<NEW_LINE>env.sendEventBean(new SupportBean("B", 1));<NEW_LINE>env.sendEventBean(new SupportBean("B", 2));<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.milestone(1);<NEW_LINE>env.sendEventBean(new SupportBean("B", 0));<NEW_LINE>env.sendEventBean(new SupportBean("A", 0));<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.milestone(2);<NEW_LINE>env.sendEventBean(new SupportBean("B", 99));<NEW_LINE>env.assertPropsPerRowLastNewAnyOrder("s0", fields, new Object[][] { { "B", 1L } });<NEW_LINE>env.milestone(3);<NEW_LINE>env.sendEventBean(new SupportBean("A", 0));<NEW_LINE>env.assertPropsPerRowLastNewAnyOrder("s0", fields, new Object[][] { { "A", 1L } });<NEW_LINE>env.undeployModuleContaining("s0");<NEW_LINE><MASK><NEW_LINE>env.undeployAll();<NEW_LINE>}
assertFilterSvcCount(env, 0, "ctx");
1,669,825
public void actionPerformed(AnActionEvent e) {<NEW_LINE>final VirtualFile projectFile = findProjectFile(e);<NEW_LINE>if (projectFile == null) {<NEW_LINE>FlutterMessages.showError("Error Opening Android Studio", "Project not found.", e.getProject());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int modifiers = e.getModifiers();<NEW_LINE>// From ReopenProjectAction.<NEW_LINE>final boolean forceOpenInNewFrame = BitUtil.isSet(modifiers, InputEvent.CTRL_MASK) || BitUtil.isSet(modifiers, InputEvent.SHIFT_MASK) || e.getPlace() == ActionPlaces.WELCOME_SCREEN;<NEW_LINE>VirtualFile sourceFile = e.getData(CommonDataKeys.VIRTUAL_FILE);<NEW_LINE>// Using:<NEW_LINE>// ProjectUtil.openOrImport(projectFile.getPath(), e.getProject(), forceOpenInNewFrame);<NEW_LINE>// presents the user with a really imposing Gradle project import dialog.<NEW_LINE>openOrImportProject(projectFile, e.<MASK><NEW_LINE>}
getProject(), sourceFile, forceOpenInNewFrame);
1,183,356
public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>// Use id to get the correct spell in case of copied spells<NEW_LINE>Spell sourceSpell = game.getStack().<MASK><NEW_LINE>if (player == null || sourceSpell == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 3));<NEW_LINE>if (!cards.isEmpty()) {<NEW_LINE>if (sourceSpell.isCopy() || Zone.HAND.equals(sourceSpell.getFromZone())) {<NEW_LINE>// A copied spell was NOT cast at all<NEW_LINE>TargetCardInLibrary target = new TargetCardInLibrary(new FilterCard("card to put into your hand"));<NEW_LINE>player.chooseTarget(outcome, cards, target, source, game);<NEW_LINE>cards.removeIf(target.getFirstTarget()::equals);<NEW_LINE>player.moveCards(game.getCard(target.getFirstTarget()), Zone.HAND, source, game);<NEW_LINE>player.putCardsOnBottomOfLibrary(cards, game, source, true);<NEW_LINE>} else {<NEW_LINE>player.moveCards(cards, Zone.HAND, source, game);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
getSpell(source.getId());
998,470
private List<ContainerElementChange> parseChanges(JsonObject jsonObject, JsonDeserializationContext context, ContainerType containerType) {<NEW_LINE>List<ContainerElementChange> result = new ArrayList<>();<NEW_LINE>JsonArray array = jsonObject.getAsJsonArray(CHANGES_FIELD);<NEW_LINE>for (JsonElement e : array) {<NEW_LINE>JsonObject elementChange = (JsonObject) e;<NEW_LINE>String elementChangeType = elementChange.<MASK><NEW_LINE>if (ValueAdded.class.getSimpleName().equals(elementChangeType)) {<NEW_LINE>result.add(parseValueAdded(elementChange, context, containerType));<NEW_LINE>} else if (ValueRemoved.class.getSimpleName().equals(elementChangeType)) {<NEW_LINE>result.add(parseValueRemoved(elementChange, context, containerType));<NEW_LINE>} else if (ElementValueChange.class.getSimpleName().equals(elementChangeType)) {<NEW_LINE>result.add(parseElementValueChange(elementChange, context, containerType));<NEW_LINE>} else {<NEW_LINE>throw new JaversException(JaversExceptionCode.MALFORMED_ENTRY_CHANGE_TYPE_FIELD, containerType);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
get(ELEMENT_CHANGE_TYPE_FIELD).getAsString();
1,019,627
public void run() {<NEW_LINE>final Optional<String> sheetId = Optional.ofNullable(idParam.orElse(idConfig.orElse(null)));<NEW_LINE>if (!sheetId.isPresent()) {<NEW_LINE>Result.MISSINGNO.send(response, null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!idParam.isPresent()) {<NEW_LINE>if (!syncRegistrarsSheet.wereRegistrarsModified()) {<NEW_LINE>Result.NOTMODIFIED.send(response, null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String sheetLockName = String.format("%s: %s", LOCK_NAME, sheetId.get());<NEW_LINE>Callable<Void> runner = () -> {<NEW_LINE>try {<NEW_LINE>syncRegistrarsSheet.run(sheetId.get());<NEW_LINE>Result.OK.send(response, null);<NEW_LINE>} catch (IOException e) {<NEW_LINE>Result.<MASK><NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>};<NEW_LINE>if (!lockHandler.executeWithLocks(runner, null, timeout, sheetLockName)) {<NEW_LINE>// If we fail to acquire the lock, it probably means lots of updates are happening at once, in<NEW_LINE>// which case it should be safe to not bother. The task queue definition should *not* specify<NEW_LINE>// max-concurrent-requests for this very reason.<NEW_LINE>Result.LOCKED.send(response, null);<NEW_LINE>}<NEW_LINE>}
FAILED.send(response, e);
622,171
private static Hashtable<String, String> createEnvironmentFromProperties() {<NEW_LINE>String factory = System.getProperty("factory", "com.sun.jndi.ldap.LdapCtxFactory");<NEW_LINE>String authType = System.getProperty("authType", "none");<NEW_LINE>String url = System.getProperty("url");<NEW_LINE>String user = System.getProperty("user");<NEW_LINE>String password = System.getProperty("password");<NEW_LINE>String query = <MASK><NEW_LINE>if (url == null) {<NEW_LINE>throw new IllegalArgumentException("please provide 'url' system property");<NEW_LINE>}<NEW_LINE>Hashtable<String, String> env = new Hashtable<>();<NEW_LINE>env.put(Context.INITIAL_CONTEXT_FACTORY, factory);<NEW_LINE>env.put("com.sun.jndi.ldap.read.timeout", "5000");<NEW_LINE>env.put("com.sun.jndi.ldap.connect.timeout", "5000");<NEW_LINE>env.put(Context.SECURITY_AUTHENTICATION, authType);<NEW_LINE>env.put(Context.PROVIDER_URL, url);<NEW_LINE>if (query != null) {<NEW_LINE>env.put(LdapConnectionTool.QUERY, query);<NEW_LINE>}<NEW_LINE>if (user != null) {<NEW_LINE>if (password == null) {<NEW_LINE>throw new IllegalArgumentException("please provide 'password' system property");<NEW_LINE>}<NEW_LINE>env.put(Context.SECURITY_PRINCIPAL, user);<NEW_LINE>env.put(Context.SECURITY_CREDENTIALS, password);<NEW_LINE>}<NEW_LINE>return env;<NEW_LINE>}
System.getProperty(QUERY, user);
1,689,001
private static Trackable createTrackableFromDatabaseContent(final Cursor cursor) {<NEW_LINE>final Trackable trackable = new Trackable();<NEW_LINE>try {<NEW_LINE>trackable.setGeocode(cursor.getString(<MASK><NEW_LINE>trackable.setGuid(cursor.getString(cursor.getColumnIndexOrThrow("guid")));<NEW_LINE>trackable.setName(cursor.getString(cursor.getColumnIndexOrThrow("title")));<NEW_LINE>trackable.setOwner(cursor.getString(cursor.getColumnIndexOrThrow("owner")));<NEW_LINE>trackable.setReleased(getDate(cursor, "released"));<NEW_LINE>trackable.setGoal(cursor.getString(cursor.getColumnIndexOrThrow("goal")));<NEW_LINE>trackable.setDetails(cursor.getString(cursor.getColumnIndexOrThrow("description")));<NEW_LINE>trackable.setLogDate(getDate(cursor, "log_date"));<NEW_LINE>trackable.setLogType(LogType.getById(cursor.getInt(cursor.getColumnIndexOrThrow("log_type"))));<NEW_LINE>trackable.setLogGuid(cursor.getString(cursor.getColumnIndexOrThrow("log_guid")));<NEW_LINE>trackable.setLogs(loadLogs(trackable.getGeocode()));<NEW_LINE>} catch (final IllegalArgumentException e) {<NEW_LINE>Log.e("IllegalArgumentException in createTrackableFromDatabaseContent", e);<NEW_LINE>}<NEW_LINE>return trackable;<NEW_LINE>}
cursor.getColumnIndexOrThrow("tbcode")));
1,400,204
public static final void forwardJSMessage(JsMessage jsMsg, SIBUuid8 targetMEUuid, String destName, boolean temporary) {<NEW_LINE>if (jsMsg.isApiMessage()) {<NEW_LINE>String apiMsgId = null;<NEW_LINE>String correlationId = null;<NEW_LINE>String msg = "MESSAGE_FORWARDED_CWSJU0022";<NEW_LINE>if (temporary)<NEW_LINE>msg = "MESSAGE_FORWARDED_TEMP_CWSJU0122";<NEW_LINE>if (jsMsg instanceof JsApiMessage) {<NEW_LINE>apiMsgId = ((<MASK><NEW_LINE>correlationId = ((JsApiMessage) jsMsg).getCorrelationId();<NEW_LINE>} else {<NEW_LINE>if (jsMsg.getApiMessageIdAsBytes() != null)<NEW_LINE>apiMsgId = new String(jsMsg.getApiMessageIdAsBytes());<NEW_LINE>if (jsMsg.getCorrelationIdAsBytes() != null)<NEW_LINE>correlationId = new String(jsMsg.getCorrelationIdAsBytes());<NEW_LINE>}<NEW_LINE>// As we are forwarding to a foreign bus then the likelyhood is that we can't obtain the<NEW_LINE>// name anyway so just use the uuid. Calling getMENameByUuidx has significant<NEW_LINE>// delays if the ME Name can't be found (1 minute plus)<NEW_LINE>String meName = targetMEUuid.toString();<NEW_LINE>if (tc_mt.isDebugEnabled())<NEW_LINE>SibTr.debug(UserTrace.tc_mt, nls_mt.getFormattedMessage(msg, new Object[] { apiMsgId, jsMsg.getSystemMessageId(), correlationId, meName, destName }, null));<NEW_LINE>}<NEW_LINE>}
JsApiMessage) jsMsg).getApiMessageId();
459,723
public ParseException generateParseException() {<NEW_LINE>jj_expentries.clear();<NEW_LINE>boolean[] la1tokens = new boolean[19];<NEW_LINE>if (jj_kind >= 0) {<NEW_LINE>la1tokens[jj_kind] = true;<NEW_LINE>jj_kind = -1;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < 6; i++) {<NEW_LINE>if (jj_la1[i] == jj_gen) {<NEW_LINE>for (int j = 0; j < 32; j++) {<NEW_LINE>if ((jj_la1_0[i] & (1 << j)) != 0) {<NEW_LINE>la1tokens[j] = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < 19; i++) {<NEW_LINE>if (la1tokens[i]) {<NEW_LINE>jj_expentry = new int[1];<NEW_LINE>jj_expentry[0] = i;<NEW_LINE>jj_expentries.add(jj_expentry);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int[][] exptokseq = new int[<MASK><NEW_LINE>for (int i = 0; i < jj_expentries.size(); i++) {<NEW_LINE>exptokseq[i] = jj_expentries.get(i);<NEW_LINE>}<NEW_LINE>return new ParseException(token, exptokseq, tokenImage, token_source == null ? null : OBOParserTokenManager.lexStateNames[token_source.curLexState]);<NEW_LINE>}
jj_expentries.size()][];
836,869
public ASTNode visitCreateTableAsSelectClause(final CreateTableAsSelectClauseContext ctx) {<NEW_LINE>SQLServerCreateTableStatement result = new SQLServerCreateTableStatement();<NEW_LINE>if (null != ctx.createTableAsSelect()) {<NEW_LINE>result.setTable((SimpleTableSegment) visit(ctx.createTableAsSelect<MASK><NEW_LINE>result.setSelectStatement((SQLServerSelectStatement) visit(ctx.createTableAsSelect().select()));<NEW_LINE>if (null != ctx.createTableAsSelect().columnNames()) {<NEW_LINE>CollectionValue<ColumnSegment> columnSegments = (CollectionValue<ColumnSegment>) visit(ctx.createTableAsSelect().columnNames());<NEW_LINE>for (ColumnSegment each : columnSegments.getValue()) {<NEW_LINE>result.getColumns().add(each);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>result.setTable((SimpleTableSegment) visit(ctx.createRemoteTableAsSelect().tableName()));<NEW_LINE>result.setSelectStatement((SQLServerSelectStatement) visit(ctx.createRemoteTableAsSelect().select()));<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
().tableName()));
1,175,970
public void execute(RequestContext requestContext) {<NEW_LINE>StringBuilder sBuilder = new StringBuilder(512);<NEW_LINE>try {<NEW_LINE>HttpServletRequest req = requestContext.getReq();<NEW_LINE>if (this.master.isStopped()) {<NEW_LINE>throw new Exception("Sever is stopping...");<NEW_LINE>}<NEW_LINE>MetaDataService defMetaDataService = this.master.getMetaDataService();<NEW_LINE>if (!defMetaDataService.isSelfMaster()) {<NEW_LINE>throw new StandbyException("Please send your request to the master Node.");<NEW_LINE>}<NEW_LINE>String type = req.getParameter("type");<NEW_LINE>if ("consumer".equals(type)) {<NEW_LINE>getConsumerListInfo(req, sBuilder);<NEW_LINE>} else if ("sub_info".equals(type)) {<NEW_LINE>getConsumerSubInfo(req, sBuilder);<NEW_LINE>} else if ("producer".equals(type)) {<NEW_LINE>getProducerListInfo(req, sBuilder);<NEW_LINE>} else if ("broker".equals(type)) {<NEW_LINE>innGetBrokerInfo(req, sBuilder, true);<NEW_LINE>} else if ("newBroker".equals(type)) {<NEW_LINE>innGetBrokerInfo(req, sBuilder, false);<NEW_LINE>} else if ("topic_pub".equals(type)) {<NEW_LINE>getTopicPubInfo(req, sBuilder);<NEW_LINE>} else if ("unbalance_group".equals(type)) {<NEW_LINE>getUnbalanceGroupInfo(sBuilder);<NEW_LINE>} else {<NEW_LINE>sBuilder.append("Unsupported request type : ").append(type);<NEW_LINE>}<NEW_LINE>requestContext.put(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>requestContext.put("sb", "Bad request from client. " + e.getMessage());<NEW_LINE>}<NEW_LINE>}
"sb", sBuilder.toString());
1,825,641
public RelWriter explainTermsForDisplay(RelWriter pw) {<NEW_LINE>pw.item(RelDrdsWriter.REL_NAME, "MysqlLimit");<NEW_LINE>assert fieldExps.size() == collation.getFieldCollations().size();<NEW_LINE>if (pw.nest()) {<NEW_LINE>pw.item("collation", collation);<NEW_LINE>} else {<NEW_LINE>List<String> sortList = new ArrayList<String>(fieldExps.size());<NEW_LINE>for (int i = 0; i < fieldExps.size(); i++) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE><MASK><NEW_LINE>fieldExps.get(i).accept(visitor);<NEW_LINE>sb.append(visitor.toSqlString()).append(" ").append(collation.getFieldCollations().get(i).getDirection().shortString);<NEW_LINE>sortList.add(sb.toString());<NEW_LINE>}<NEW_LINE>String sortString = StringUtils.join(sortList, ",");<NEW_LINE>pw.itemIf("sort", sortString, !StringUtils.isEmpty(sortString));<NEW_LINE>}<NEW_LINE>pw.itemIf("offset", offset, offset != null);<NEW_LINE>pw.itemIf("fetch", fetch, fetch != null);<NEW_LINE>return pw;<NEW_LINE>}
RexExplainVisitor visitor = new RexExplainVisitor(this);
425,266
public static void uncompressDirectory(final InputStream in, final String out, final OCommandOutputListener iListener) throws IOException {<NEW_LINE>final File outdir = new File(out);<NEW_LINE>final String targetDirPath = outdir.getCanonicalPath() + File.separator;<NEW_LINE>try (ZipInputStream zin = new ZipInputStream(in)) {<NEW_LINE>ZipEntry entry;<NEW_LINE>String name;<NEW_LINE>String dir;<NEW_LINE>while ((entry = zin.getNextEntry()) != null) {<NEW_LINE>name = entry.getName();<NEW_LINE>final File file = new File(outdir, name);<NEW_LINE>if (!file.getCanonicalPath().startsWith(targetDirPath))<NEW_LINE>throw new IOException("Expanding '" + entry.getName(<MASK><NEW_LINE>if (entry.isDirectory()) {<NEW_LINE>mkdirs(outdir, name);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>dir = getDirectoryPart(name);<NEW_LINE>if (dir != null)<NEW_LINE>mkdirs(outdir, dir);<NEW_LINE>extractFile(zin, outdir, name, iListener);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
) + "' would create file outside of directory '" + outdir + "'");
1,106,093
final DeleteBlueprintResult executeDeleteBlueprint(DeleteBlueprintRequest deleteBlueprintRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteBlueprintRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteBlueprintRequest> request = null;<NEW_LINE>Response<DeleteBlueprintResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteBlueprintRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Glue");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBlueprint");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteBlueprintResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBlueprintResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(deleteBlueprintRequest));
477,773
static // / @brief Print the solution.<NEW_LINE>void printSolution(DataModel data, RoutingModel routing, RoutingIndexManager manager, Assignment solution) {<NEW_LINE>// Solution cost.<NEW_LINE>logger.info("Objective: " + solution.objectiveValue());<NEW_LINE>// Inspect solution.<NEW_LINE>long totalDistance = 0;<NEW_LINE>long totalLoad = 0;<NEW_LINE>for (int i = 0; i < data.vehicleNumber; ++i) {<NEW_LINE>long index = routing.start(i);<NEW_LINE>logger.info("Route for Vehicle " + i + ":");<NEW_LINE>long routeDistance = 0;<NEW_LINE>long routeLoad = 0;<NEW_LINE>String route = "";<NEW_LINE>while (!routing.isEnd(index)) {<NEW_LINE>long nodeIndex = manager.indexToNode(index);<NEW_LINE>routeLoad += data.demands[(int) nodeIndex];<NEW_LINE>route += nodeIndex + " Load(" + routeLoad + ") -> ";<NEW_LINE>long previousIndex = index;<NEW_LINE>index = solution.value(routing.nextVar(index));<NEW_LINE>routeDistance += routing.getArcCostForVehicle(previousIndex, index, i);<NEW_LINE>}<NEW_LINE>route += manager.indexToNode(routing.end(i));<NEW_LINE>logger.info(route);<NEW_LINE>logger.info("Distance of the route: " + routeDistance + "m");<NEW_LINE>totalDistance += routeDistance;<NEW_LINE>totalLoad += routeLoad;<NEW_LINE>}<NEW_LINE>logger.<MASK><NEW_LINE>logger.info("Total load of all routes: " + totalLoad);<NEW_LINE>}
info("Total distance of all routes: " + totalDistance + "m");
769,747
private static void applyLanguage(final Activity activity) {<NEW_LINE>synchronized (mDefaultLocale) {<NEW_LINE>if (mDefaultLocale.get() == null) {<NEW_LINE>mDefaultLocale.set(Locale.getDefault());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final String lang = getString(R.string.pref_appearance_langforce_key, "auto");<NEW_LINE>for (final Resources res : new Resources[] { activity.getResources(), activity.getApplication().getResources() }) {<NEW_LINE>final DisplayMetrics dm = res.getDisplayMetrics();<NEW_LINE>final android.content.res.Configuration conf = res.getConfiguration();<NEW_LINE>if (!lang.equals("auto")) {<NEW_LINE>if (lang.contains("-r")) {<NEW_LINE>final String[] split = lang.split("-r");<NEW_LINE>setLocaleOnConfiguration(conf, new Locale(split[0], split[1]));<NEW_LINE>} else {<NEW_LINE>setLocaleOnConfiguration(conf, new Locale(lang));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>setLocaleOnConfiguration(<MASK><NEW_LINE>}<NEW_LINE>res.updateConfiguration(conf, dm);<NEW_LINE>}<NEW_LINE>}
conf, mDefaultLocale.get());
1,154,164
final DescribePendingMaintenanceActionsResult executeDescribePendingMaintenanceActions(DescribePendingMaintenanceActionsRequest describePendingMaintenanceActionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describePendingMaintenanceActionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribePendingMaintenanceActionsRequest> request = null;<NEW_LINE>Response<DescribePendingMaintenanceActionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribePendingMaintenanceActionsRequestMarshaller().marshall(super.beforeMarshalling(describePendingMaintenanceActionsRequest));<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, "DocDB");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePendingMaintenanceActions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribePendingMaintenanceActionsResult> responseHandler = new StaxResponseHandler<DescribePendingMaintenanceActionsResult>(new DescribePendingMaintenanceActionsResultStaxUnmarshaller());<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);
1,416,634
public void deleteNode(String userName, AbstractAppConnNode node) throws ExternalOperationFailedException {<NEW_LINE>NodeInfo nodeInfo = nodeInfoMapper.getWorkflowNodeByType(node.getNodeType());<NEW_LINE>AppConn appConn = AppConnManager.getAppConnManager().getAppConn(nodeInfo.getAppConnName());<NEW_LINE>DevelopmentIntegrationStandard developmentIntegrationStandard = ((OnlyDevelopmentAppConn) appConn).getOrCreateDevelopmentStandard();<NEW_LINE>if (null != developmentIntegrationStandard) {<NEW_LINE>String label = node.getJobContent().get(DSSCommonUtils.DSS_LABELS_KEY).toString();<NEW_LINE>AppInstance <MASK><NEW_LINE>RefDeletionOperation refDeletionOperation = developmentIntegrationStandard.getRefCRUDService(appInstance).getRefDeletionOperation();<NEW_LINE>Workspace workspace = (Workspace) node.getJobContent().get("workspace");<NEW_LINE>NodeRequestRef ref = null;<NEW_LINE>try {<NEW_LINE>ref = AppConnRefFactoryUtils.newAppConnRefByPackageName(NodeRequestRef.class, appConn.getClass().getClassLoader(), appConn.getClass().getPackage().getName());<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("Failed to create DeleteNodeRequestRef", e);<NEW_LINE>}<NEW_LINE>ref.setUserName(userName);<NEW_LINE>ref.setWorkspace(workspace);<NEW_LINE>ref.setJobContent(node.getJobContent());<NEW_LINE>ref.setName(node.getName());<NEW_LINE>ref.setOrcId(node.getFlowId());<NEW_LINE>ref.setOrcName(node.getFlowName());<NEW_LINE>ref.setProjectId(node.getProjectId());<NEW_LINE>ref.setProjectName(node.getProjectName());<NEW_LINE>ref.setNodeType(node.getNodeType());<NEW_LINE>refDeletionOperation.deleteRef(ref);<NEW_LINE>}<NEW_LINE>}
appInstance = getAppInstance(appConn, label);
1,652,633
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr());<NEW_LINE>// Get Session attributes<NEW_LINE>HttpSession <MASK><NEW_LINE>session.removeAttribute(WebSessionCtx.HDR_MESSAGE);<NEW_LINE>//<NEW_LINE>Properties ctx = JSPEnv.getCtx(request);<NEW_LINE>WebUser wu = (WebUser) session.getAttribute(WebUser.NAME);<NEW_LINE>if (wu == null) {<NEW_LINE>log.warning("No web user");<NEW_LINE>if (!response.isCommitted())<NEW_LINE>// entry<NEW_LINE>response.sendRedirect("loginServlet?ForwardTo=advertisement.jsp");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int W_Advertisement_ID = WebUtil.getParameterAsInt(request, P_ADVERTISEMENT_ID);<NEW_LINE>MAdvertisement ad = new MAdvertisement(ctx, W_Advertisement_ID, null);<NEW_LINE>if (ad.get_ID() == 0) {<NEW_LINE>WebUtil.createForwardPage(response, "Web Advertisement Not Found", "advertisements.jsp", 0);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>StringBuffer info = new StringBuffer();<NEW_LINE>//<NEW_LINE>String Name = WebUtil.getParameter(request, "Name");<NEW_LINE>if (Name != null && Name.length() > 0 && !Name.equals(ad.getName())) {<NEW_LINE>ad.setName(Name);<NEW_LINE>info.append("Name - ");<NEW_LINE>}<NEW_LINE>String Description = WebUtil.getParameter(request, "Description");<NEW_LINE>if (Description != null && Description.length() > 0 && !Description.equals(ad.getDescription())) {<NEW_LINE>ad.setDescription(Description);<NEW_LINE>info.append("Description - ");<NEW_LINE>}<NEW_LINE>String ImageURL = null;<NEW_LINE>String AdText = WebUtil.getParameter(request, "AdText");<NEW_LINE>if (AdText != null && AdText.length() > 0 && !AdText.equals(ad.getAdText())) {<NEW_LINE>ad.setAdText(AdText);<NEW_LINE>info.append("AdText - ");<NEW_LINE>}<NEW_LINE>String ClickTargetURL = WebUtil.getParameter(request, "ClickTargetURL");<NEW_LINE>if (ClickTargetURL != null && ClickTargetURL.length() > 0 && !ClickTargetURL.equals(ad.getClickTargetURL())) {<NEW_LINE>ad.setClickTargetURL(ClickTargetURL);<NEW_LINE>info.append("ClickTargetURL - ");<NEW_LINE>}<NEW_LINE>if (info.length() > 0) {<NEW_LINE>if (ad.save())<NEW_LINE>WebUtil.createForwardPage(response, "Web Advertisement Updated: " + info.toString(), "advertisements.jsp", 0);<NEW_LINE>else<NEW_LINE>WebUtil.createForwardPage(response, "Web Advertisement Update Error", "advertisements.jsp", 0);<NEW_LINE>} else<NEW_LINE>WebUtil.createForwardPage(response, "Web Advertisement not changed", "advertisements.jsp", 0);<NEW_LINE>}
session = request.getSession(true);
1,573,462
protected ECPoint.Fp twiceJacobianModified(boolean calculateW) {<NEW_LINE>ECFieldElement X1 = this.x, Y1 = this.y, Z1 = this.zs[0], W1 = getJacobianModifiedW();<NEW_LINE>ECFieldElement X1Squared = X1.square();<NEW_LINE>ECFieldElement M = three(X1Squared).add(W1);<NEW_LINE>ECFieldElement _2Y1 = two(Y1);<NEW_LINE>ECFieldElement _2Y1Squared = _2Y1.multiply(Y1);<NEW_LINE>ECFieldElement S = two(X1.multiply(_2Y1Squared));<NEW_LINE>ECFieldElement X3 = M.square()<MASK><NEW_LINE>ECFieldElement _4T = _2Y1Squared.square();<NEW_LINE>ECFieldElement _8T = two(_4T);<NEW_LINE>ECFieldElement Y3 = M.multiply(S.subtract(X3)).subtract(_8T);<NEW_LINE>ECFieldElement W3 = calculateW ? two(_8T.multiply(W1)) : null;<NEW_LINE>ECFieldElement Z3 = Z1.isOne() ? _2Y1 : _2Y1.multiply(Z1);<NEW_LINE>return new ECPoint.Fp(this.getCurve(), X3, Y3, new ECFieldElement[] { Z3, W3 });<NEW_LINE>}
.subtract(two(S));
845,321
public void addShortcut(LayoutElementParcelable path) {<NEW_LINE>// Adding shortcut for MainActivity<NEW_LINE>// on Home screen<NEW_LINE>final Context ctx = getContext();<NEW_LINE>if (!ShortcutManagerCompat.isRequestPinShortcutSupported(ctx)) {<NEW_LINE>Toast.makeText(getActivity(), getString(R.string.add_shortcut_not_supported_by_launcher), Toast.LENGTH_SHORT).show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Intent shortcutIntent = new Intent(ctx, MainActivity.class);<NEW_LINE>shortcutIntent.putExtra("path", path.desc);<NEW_LINE>shortcutIntent.setAction(Intent.ACTION_MAIN);<NEW_LINE>shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);<NEW_LINE>// Using file path as shortcut id.<NEW_LINE>ShortcutInfoCompat info = new ShortcutInfoCompat.Builder(ctx, path.desc).setActivity(getMainActivity().getComponentName()).setIcon(IconCompat.createWithResource(ctx, R.mipmap.ic_launcher)).setIntent(shortcutIntent).setLongLabel(path.desc).setShortLabel(new File(path.desc).getName()).build();<NEW_LINE>ShortcutManagerCompat.<MASK><NEW_LINE>}
requestPinShortcut(ctx, info, null);
146,689
protected void interceptInputHeader() {<NEW_LINE>if (!interceptDebugEnabled) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Enumeration<String> headerNames = strategyContextHolder.getHeaderNames();<NEW_LINE>if (headerNames != null) {<NEW_LINE>InterceptorType interceptorType = getInterceptorType();<NEW_LINE>switch(interceptorType) {<NEW_LINE>case FEIGN:<NEW_LINE>System.out.println("--------- Feign Intercept Input Header Information ---------");<NEW_LINE>break;<NEW_LINE>case REST_TEMPLATE:<NEW_LINE><MASK><NEW_LINE>break;<NEW_LINE>case WEB_CLIENT:<NEW_LINE>System.out.println("------- WebClient Intercept Input Header Information -------");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>while (headerNames.hasMoreElements()) {<NEW_LINE>String headerName = headerNames.nextElement();<NEW_LINE>boolean isHeaderContains = isHeaderContains(headerName.toLowerCase());<NEW_LINE>if (isHeaderContains) {<NEW_LINE>String headerValue = strategyContextHolder.getHeader(headerName);<NEW_LINE>System.out.println(headerName + "=" + headerValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.out.println("------------------------------------------------------------");<NEW_LINE>}<NEW_LINE>}
System.out.println("----- RestTemplate Intercept Input Header Information ------");
63,251
public InsertsStreamSubscriber createInsertsSubscriber(final String caseInsensitiveTarget, final JsonObject properties, final Subscriber<InsertResult> acksSubscriber, final Context context, final WorkerExecutor workerExecutor, final ServiceContext serviceContext) {<NEW_LINE>VertxUtils.checkIsWorker();<NEW_LINE>if (!ksqlConfig.getBoolean(KsqlConfig.KSQL_INSERT_INTO_VALUES_ENABLED)) {<NEW_LINE>throw new KsqlApiException(<MASK><NEW_LINE>}<NEW_LINE>final String target;<NEW_LINE>try {<NEW_LINE>target = Identifiers.getIdentifierText(caseInsensitiveTarget);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw new KsqlApiException("Invalid target name: " + e.getMessage(), ERROR_CODE_BAD_STATEMENT);<NEW_LINE>}<NEW_LINE>final DataSource dataSource = getDataSource(ksqlEngine.getMetaStore(), SourceName.of(target));<NEW_LINE>return InsertsSubscriber.createInsertsSubscriber(serviceContext, properties, dataSource, ksqlConfig, context, acksSubscriber, workerExecutor);<NEW_LINE>}
"The server has disabled INSERT INTO ... VALUES functionality. " + "To enable it, restart your ksqlDB server " + "with 'ksql.insert.into.values.enabled'=true", ERROR_CODE_BAD_REQUEST);
1,397,944
public static QuerySingleActivityInfoResponse unmarshall(QuerySingleActivityInfoResponse querySingleActivityInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>querySingleActivityInfoResponse.setRequestId(_ctx.stringValue("QuerySingleActivityInfoResponse.RequestId"));<NEW_LINE>querySingleActivityInfoResponse.setCode(_ctx.stringValue("QuerySingleActivityInfoResponse.Code"));<NEW_LINE>querySingleActivityInfoResponse.setSuccess(_ctx.booleanValue("QuerySingleActivityInfoResponse.Success"));<NEW_LINE>querySingleActivityInfoResponse.setMessage(_ctx.stringValue("QuerySingleActivityInfoResponse.Message"));<NEW_LINE>List<DataItem> data <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QuerySingleActivityInfoResponse.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setId(_ctx.longValue("QuerySingleActivityInfoResponse.Data[" + i + "].Id"));<NEW_LINE>dataItem.setActivityId(_ctx.longValue("QuerySingleActivityInfoResponse.Data[" + i + "].ActivityId"));<NEW_LINE>dataItem.setCustomerName(_ctx.stringValue("QuerySingleActivityInfoResponse.Data[" + i + "].CustomerName"));<NEW_LINE>dataItem.setMobile(_ctx.stringValue("QuerySingleActivityInfoResponse.Data[" + i + "].Mobile"));<NEW_LINE>dataItem.setCompanyName(_ctx.stringValue("QuerySingleActivityInfoResponse.Data[" + i + "].CompanyName"));<NEW_LINE>dataItem.setQRCode(_ctx.stringValue("QuerySingleActivityInfoResponse.Data[" + i + "].QRCode"));<NEW_LINE>dataItem.setChannelName(_ctx.stringValue("QuerySingleActivityInfoResponse.Data[" + i + "].ChannelName"));<NEW_LINE>dataItem.setIsVipCustomer(_ctx.stringValue("QuerySingleActivityInfoResponse.Data[" + i + "].IsVipCustomer"));<NEW_LINE>dataItem.setReportFields(_ctx.stringValue("QuerySingleActivityInfoResponse.Data[" + i + "].ReportFields"));<NEW_LINE>dataItem.setEmail(_ctx.stringValue("QuerySingleActivityInfoResponse.Data[" + i + "].Email"));<NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>querySingleActivityInfoResponse.setData(data);<NEW_LINE>return querySingleActivityInfoResponse;<NEW_LINE>}
= new ArrayList<DataItem>();
51,166
public Datasource createDatasource(final String jndiName, final String url, final String username, final String password, final String driver) throws UnsupportedOperationException, ConfigurationException, DatasourceAlreadyExistsException {<NEW_LINE>Datasource ds = null;<NEW_LINE>File resourceDir = module.getResourceDirectory();<NEW_LINE>if (resourceDir == null) {<NEW_LINE>// Unable to create JDBC data source for resource ref.<NEW_LINE>// NOI18N<NEW_LINE>postResourceError(NbBundle.getMessage(SunONEDeploymentConfiguration.class, "ERR_NoRefJdbcDataSource", jndiName));<NEW_LINE>// NOI18N<NEW_LINE>throw new ConfigurationException(NbBundle.getMessage(SunONEDeploymentConfiguration.class, "ERR_NoRefJdbcDataSource", jndiName));<NEW_LINE>}<NEW_LINE>ResourceConfiguratorInterface rci = getResourceConfigurator();<NEW_LINE>if (rci != null) {<NEW_LINE>ds = rci.createDataSource(jndiName, url, username, <MASK><NEW_LINE>}<NEW_LINE>return ds;<NEW_LINE>}
password, driver, resourceDir, "sun-resources");
728,464
public void onClick(View view) {<NEW_LINE>if (holder.isFavorited || !settings.crossAccActions) {<NEW_LINE>new FavoriteStatus(holder, holder.tweetId, !secondAcc ? FavoriteStatus.TYPE_ACC_ONE : FavoriteStatus.TYPE_ACC_TWO).execute();<NEW_LINE>} else {<NEW_LINE>// dialog for favoriting<NEW_LINE>String[<MASK><NEW_LINE>options[0] = "@" + settings.myScreenName;<NEW_LINE>options[1] = "@" + settings.secondScreenName;<NEW_LINE>options[2] = context.getString(R.string.both_accounts);<NEW_LINE>new AlertDialog.Builder(context).setItems(options, new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>public void onClick(final DialogInterface dialog, final int item) {<NEW_LINE>new FavoriteStatus(holder, holder.tweetId, item + 1).execute();<NEW_LINE>}<NEW_LINE>}).create().show();<NEW_LINE>}<NEW_LINE>}
] options = new String[3];
241,945
public static boolean enablePlugin(@Nullable Activity activity, @NonNull OsmandApplication app, @NonNull OsmandPlugin plugin, boolean enable) {<NEW_LINE>if (enable) {<NEW_LINE>if (!plugin.init(app, activity)) {<NEW_LINE>plugin.setEnabled(false);<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>plugin.setEnabled(true);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>plugin.disable(app);<NEW_LINE>plugin.setEnabled(false);<NEW_LINE>}<NEW_LINE>app.getSettings().enablePlugin(plugin.getId(), enable);<NEW_LINE>app.getQuickActionRegistry().updateActionTypes();<NEW_LINE>if (activity != null) {<NEW_LINE>if (activity instanceof MapActivity) {<NEW_LINE><MASK><NEW_LINE>plugin.updateLayers(mapActivity, mapActivity);<NEW_LINE>mapActivity.getDashboard().refreshDashboardFragments();<NEW_LINE>DashFragmentData fragmentData = plugin.getCardFragment();<NEW_LINE>if (!enable && fragmentData != null) {<NEW_LINE>FragmentManager fm = mapActivity.getSupportFragmentManager();<NEW_LINE>Fragment fragment = fm.findFragmentByTag(fragmentData.tag);<NEW_LINE>if (fragment != null) {<NEW_LINE>fm.beginTransaction().remove(fragment).commitAllowingStateLoss();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (plugin.isMarketPlugin() || plugin.isPaid()) {<NEW_LINE>if (plugin.isActive()) {<NEW_LINE>plugin.showInstallDialog(activity);<NEW_LINE>} else if (OsmandPlugin.checkPluginPackage(app, plugin)) {<NEW_LINE>plugin.showDisableDialog(activity);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
final MapActivity mapActivity = (MapActivity) activity;
929,263
protected void printUniqueKey(JavaWriter out, int uniqueKeyCounter, UniqueKeyDefinition uniqueKey, boolean distributeUniqueKeys) {<NEW_LINE>final int block = uniqueKeyCounter / maxMembersPerInitialiser();<NEW_LINE>// Print new nested class<NEW_LINE>if (distributeUniqueKeys && uniqueKeyCounter % maxMembersPerInitialiser() == 0) {<NEW_LINE>if (uniqueKeyCounter > 0)<NEW_LINE>out.println("}");<NEW_LINE>out.println();<NEW_LINE>if (scala || kotlin)<NEW_LINE>out.println("private object UniqueKeys%s {", block);<NEW_LINE>else<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (scala)<NEW_LINE>out.print("%sval %s: %s[%s] = ", visibility(), scalaWhitespaceSuffix(getStrategy().getJavaIdentifier(uniqueKey)), UniqueKey.class, out.ref(getStrategy().getFullJavaClassName(uniqueKey.getTable(), Mode.RECORD)));<NEW_LINE>else if (kotlin)<NEW_LINE>out.print("%sval %s: %s<%s> = ", visibility(), getStrategy().getJavaIdentifier(uniqueKey), UniqueKey.class, out.ref(getStrategy().getFullJavaClassName(uniqueKey.getTable(), Mode.RECORD)));<NEW_LINE>else<NEW_LINE>out.print("%sstatic final %s<%s> %s = ", visibility(), UniqueKey.class, out.ref(getStrategy().getFullJavaClassName(uniqueKey.getTable(), Mode.RECORD)), getStrategy().getJavaIdentifier(uniqueKey));<NEW_LINE>printCreateUniqueKey(out, uniqueKey);<NEW_LINE>out.println("%s", semicolon);<NEW_LINE>}
out.println("private static class UniqueKeys%s {", block);
1,170,697
public Flux<NumericResponse<ZInterStoreCommand, Long>> zInterStore(Publisher<ZInterStoreCommand> commands) {<NEW_LINE>return execute(commands, command -> {<NEW_LINE>Assert.notNull(command.getKey(), "Destination key must not be null!");<NEW_LINE>Assert.notEmpty(command.getSourceKeys(), "Source keys must not be null or empty!");<NEW_LINE>byte[] keyBuf = toByteArray(command.getKey());<NEW_LINE>List<Object> args = new ArrayList<Object>(command.getSourceKeys().size() * 2 + 5);<NEW_LINE>args.add(keyBuf);<NEW_LINE>args.add(command.getSourceKeys().size());<NEW_LINE>args.addAll(command.getSourceKeys().stream().map(e -> toByteArray(e)).collect(Collectors.toList()));<NEW_LINE>if (!command.getWeights().isEmpty()) {<NEW_LINE>args.add("WEIGHTS");<NEW_LINE>for (Double weight : command.getWeights()) {<NEW_LINE>args.add(BigDecimal.valueOf(weight).toPlainString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (command.getAggregateFunction().isPresent()) {<NEW_LINE>args.add("AGGREGATE");<NEW_LINE>args.add(command.getAggregateFunction().get().name());<NEW_LINE>}<NEW_LINE>Mono<Long> m = write(keyBuf, LongCodec.INSTANCE, ZINTERSTORE, args.toArray());<NEW_LINE>return m.map(v -> new NumericResponse<MASK><NEW_LINE>});<NEW_LINE>}
<>(command, v));
544,628
private static void generateSearchMsg(StringBuilder pysb, Class<?> clazz) {<NEW_LINE>String actionName = populateActionName(clazz);<NEW_LINE>pysb.append(String.format("\n\nclass %s(inventory.%s):", actionName, clazz.getSimpleName()));<NEW_LINE>pysb.append(String.format("\n%sdef __init__(self):", whiteSpace(4)));<NEW_LINE>pysb.append(String.format("\n%ssuper(%s, self).__init__()", <MASK><NEW_LINE>pysb.append(String.format("\n%sself.sessionUuid = None", whiteSpace(8)));<NEW_LINE>pysb.append(String.format("\n%sself.out = None", whiteSpace(8)));<NEW_LINE>pysb.append(String.format("\n%sdef run(self):", whiteSpace(4)));<NEW_LINE>pysb.append(String.format("\n%sif not self.sessionUuid:", whiteSpace(8)));<NEW_LINE>pysb.append(String.format("\n%sraise Exception('sessionUuid of action[%s] cannot be None')", whiteSpace(12), actionName));<NEW_LINE>pysb.append(String.format("\n%sreply = api.sync_call(self, self.sessionUuid)", whiteSpace(8)));<NEW_LINE>pysb.append(String.format("\n%sself.out = jsonobject.loads(reply.content)", whiteSpace(8)));<NEW_LINE>pysb.append(String.format("\n%sreturn self.out", whiteSpace(8)));<NEW_LINE>}
whiteSpace(8), actionName));
69,987
private JavaType createJavaType(Type type) {<NEW_LINE>if (type == null) {<NEW_LINE>return null;<NEW_LINE>} else if (type instanceof JavaType) {<NEW_LINE>return (JavaType) type;<NEW_LINE>} else if (type instanceof ParameterizedType) {<NEW_LINE>final ParameterizedType parameterizedType = (ParameterizedType) type;<NEW_LINE>final Type[] actualTypeArguments = parameterizedType.getActualTypeArguments();<NEW_LINE>JavaType[] javaTypeArguments = new JavaType[actualTypeArguments.length];<NEW_LINE>for (int i = 0; i != actualTypeArguments.length; i++) {<NEW_LINE>javaTypeArguments[i] <MASK><NEW_LINE>}<NEW_LINE>return getFromCache(TYPE_TO_JAVA_TYPE_CACHE, type, t -> mapper.getTypeFactory().constructParametricType((Class<?>) parameterizedType.getRawType(), javaTypeArguments));<NEW_LINE>} else {<NEW_LINE>return getFromCache(TYPE_TO_JAVA_TYPE_CACHE, type, t -> mapper.getTypeFactory().constructType(t));<NEW_LINE>}<NEW_LINE>}
= createJavaType(actualTypeArguments[i]);
254,247
public void stop() {<NEW_LINE>int read_wait;<NEW_LINE>List<Object[]> suspended = null;<NEW_LINE>try {<NEW_LINE>this_mon.enter();<NEW_LINE>if (stopped || !started) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>stopped = true;<NEW_LINE>read_wait = async_reads;<NEW_LINE>if (!suspended_requests.isEmpty()) {<NEW_LINE>suspended = new ArrayList<>(suspended_requests);<NEW_LINE>suspended_requests.clear();<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>this_mon.exit();<NEW_LINE>}<NEW_LINE>if (suspended != null) {<NEW_LINE>for (Object[] susp : suspended) {<NEW_LINE>DiskManagerReadRequest request = (DiskManagerReadRequest) susp[0];<NEW_LINE>DiskManagerReadRequestListener listener = (DiskManagerReadRequestListener) susp[1];<NEW_LINE>listener.readFailed(request, new Exception("Disk Reader stopped"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < read_wait; i++) {<NEW_LINE>long now = SystemTime.getCurrentTime();<NEW_LINE>if (now < log_time) {<NEW_LINE>log_time = now;<NEW_LINE>} else {<NEW_LINE>if (now - log_time > 1000) {<NEW_LINE>log_time = now;<NEW_LINE>if (Logger.isEnabled()) {<NEW_LINE>Logger.log(new LogEvent(disk_manager, LOGID, "Waiting for reads to complete - " + (read_wait - i) + " remaining"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>async_read_sem.reserve();<NEW_LINE>}<NEW_LINE>}
long log_time = SystemTime.getCurrentTime();
114,511
public static void main(String[] argv) throws Exception {<NEW_LINE>NoekeonVects bot = new NoekeonVects(0xdefacedbadfacadeL, true, true);<NEW_LINE>NoekeonVects tom = new NoekeonVects(0xdefacedbadfacadeL, false, false);<NEW_LINE>System.out.println("# ECB vectors for indirect Noekeon, in Botan's");<NEW_LINE>System.out.println("# test vector format, suitable for insertion");<NEW_LINE>System.out.println("# into Botan's file checks/validate.dat");<NEW_LINE><MASK><NEW_LINE>bot.ecb_vectors();<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("/* ECB vectors for direct Noekeon, as C arrays");<NEW_LINE>System.out.println(" * suitable for insertion into LibTomCrypt's");<NEW_LINE>System.out.println(" * noekeon_test() in src/ciphers/noekeon.c,");<NEW_LINE>System.out.println(" * once LTC's PI1/PI2 bug is fixed. */");<NEW_LINE>tom.ecb_vectors();<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("# EAX vectors for indirect Noekeon, in the format");<NEW_LINE>System.out.println("# generated by LTC's demos/tv_gen.c and consumed");<NEW_LINE>System.out.println("# by Botan's doc/examples/eax_test.cpp, suitable");<NEW_LINE>System.out.println("# for insertion in Botan's doc/examples/eax.vec");<NEW_LINE>bot.eax_vectors();<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("# EAX vectors for direct Noekeon, in the format");<NEW_LINE>System.out.println("# generated by LTC's demos/tv_gen.c and consumed");<NEW_LINE>System.out.println("# by Botan's doc/examples/eax_test.cpp, which");<NEW_LINE>System.out.println("# should match LTC's notes/eax_tv.txt, once");<NEW_LINE>System.out.println("# LTC's PI1/PI2 bug is fixed.");<NEW_LINE>tom.eax_vectors();<NEW_LINE>System.out.flush();<NEW_LINE>}
System.out.println("# Block cipher format is plaintext:ciphertext:key");
1,848,679
public void sendAckMessage(SIBUuid8 sourceMEUuid, SIBUuid12 destUuid, SIBUuid8 busUuid, long ackPrefix, int priority, Reliability reliability, SIBUuid12 stream, boolean consolidate) throws SIResourceException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "sendAckMessage", new Long(ackPrefix));<NEW_LINE>ControlAck ackMsg = createControlAckMessage();<NEW_LINE>// As we are using the Guaranteed Header - set all the attributes as<NEW_LINE>// well as the ones we want.<NEW_LINE>SIMPUtils.setGuaranteedDeliveryProperties(ackMsg, _messageProcessor.getMessagingEngineUuid(), sourceMEUuid, stream, null, destUuid, <MASK><NEW_LINE>ackMsg.setPriority(priority);<NEW_LINE>ackMsg.setReliability(reliability);<NEW_LINE>ackMsg.setAckPrefix(ackPrefix);<NEW_LINE>// Send Ack messages at the priority of the original message +1<NEW_LINE>sendToME(ackMsg, sourceMEUuid, busUuid, priority + 1);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "sendAckMessage");<NEW_LINE>}
ProtocolType.UNICASTOUTPUT, GDConfig.PROTOCOL_VERSION);
42,478
// return -1 for the left side from the infinite line passing through thais<NEW_LINE>// Line, 1 for the right side of the line, 0 if on the line (in the bounds<NEW_LINE>// of the roundoff error)<NEW_LINE>int _side(double ptX, double ptY) {<NEW_LINE>Point2D v1 = new Point2D(ptX, ptY);<NEW_LINE>v1.sub(getStartXY());<NEW_LINE>Point2D v2 = new Point2D();<NEW_LINE>v2.sub(<MASK><NEW_LINE>double cross = v2.crossProduct(v1);<NEW_LINE>double crossError = 4 * NumberUtils.doubleEps() * (Math.abs(v2.x * v1.y) + Math.abs(v2.y * v1.x));<NEW_LINE>return cross > crossError ? -1 : cross < -crossError ? 1 : 0;<NEW_LINE>}
getEndXY(), getStartXY());
636,863
public NetworkACLItemResponse createNetworkACLItemResponse(NetworkACLItem aclItem) {<NEW_LINE>NetworkACLItemResponse response = new NetworkACLItemResponse();<NEW_LINE>response.setId(aclItem.getUuid());<NEW_LINE>response.setProtocol(aclItem.getProtocol());<NEW_LINE>if (aclItem.getSourcePortStart() != null) {<NEW_LINE>response.setStartPort(Integer.toString(aclItem.getSourcePortStart()));<NEW_LINE>}<NEW_LINE>if (aclItem.getSourcePortEnd() != null) {<NEW_LINE>response.setEndPort(Integer.toString(aclItem.getSourcePortEnd()));<NEW_LINE>}<NEW_LINE>response.setCidrList(StringUtils.join(aclItem<MASK><NEW_LINE>response.setTrafficType(aclItem.getTrafficType().toString());<NEW_LINE>NetworkACLItem.State state = aclItem.getState();<NEW_LINE>String stateToSet = state.toString();<NEW_LINE>if (state.equals(NetworkACLItem.State.Revoke)) {<NEW_LINE>stateToSet = "Deleting";<NEW_LINE>}<NEW_LINE>response.setIcmpCode(aclItem.getIcmpCode());<NEW_LINE>response.setIcmpType(aclItem.getIcmpType());<NEW_LINE>response.setState(stateToSet);<NEW_LINE>response.setNumber(aclItem.getNumber());<NEW_LINE>response.setAction(aclItem.getAction().toString());<NEW_LINE>response.setForDisplay(aclItem.isDisplay());<NEW_LINE>NetworkACL acl = ApiDBUtils.findByNetworkACLId(aclItem.getAclId());<NEW_LINE>if (acl != null) {<NEW_LINE>response.setAclId(acl.getUuid());<NEW_LINE>response.setAclName(acl.getName());<NEW_LINE>}<NEW_LINE>// set tag information<NEW_LINE>List<? extends ResourceTag> tags = ApiDBUtils.listByResourceTypeAndId(ResourceObjectType.NetworkACL, aclItem.getId());<NEW_LINE>List<ResourceTagResponse> tagResponses = new ArrayList<ResourceTagResponse>();<NEW_LINE>for (ResourceTag tag : tags) {<NEW_LINE>ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);<NEW_LINE>CollectionUtils.addIgnoreNull(tagResponses, tagResponse);<NEW_LINE>}<NEW_LINE>response.setTags(tagResponses);<NEW_LINE>response.setReason(aclItem.getReason());<NEW_LINE>response.setObjectName("networkacl");<NEW_LINE>return response;<NEW_LINE>}
.getSourceCidrList(), ","));
1,091,601
static File findDeveloperImage(File dsDir, String productVersion, String buildVersion) throws FileNotFoundException {<NEW_LINE>String[] versionParts = getProductVersionParts(productVersion);<NEW_LINE>String[] patterns = new String[] { // 7.0.3 (11B508)<NEW_LINE>// 7.0.3 (*)<NEW_LINE>String.format("%s\\.%s\\.%s \\(%s\\)", versionParts[0], versionParts[1], versionParts[2], buildVersion), // 7.0.3<NEW_LINE>String.format("%s\\.%s\\.%s \\(.*\\)", versionParts[0], versionParts[1], versionParts[2], buildVersion), // 7.0 (11A465)<NEW_LINE>String.format("%s\\.%s\\.%s", versionParts[0], versionParts[1], versionParts[2]), // 7.0 (*)<NEW_LINE>String.format("%s\\.%s \\(%s\\)", versionParts[0], versionParts[1], buildVersion), // 7.0<NEW_LINE>String.format("%s\\.%s \\(.*\\)", versionParts[0], versionParts[1], buildVersion), String.format("%s\\.%s", versionParts[0], versionParts[1]) };<NEW_LINE>File[] dirs = dsDir.listFiles();<NEW_LINE>for (String pattern : patterns) {<NEW_LINE>for (File dir : dirs) {<NEW_LINE>if (dir.isDirectory() && dir.getName().matches(pattern)) {<NEW_LINE>File dmg = new File(dir, "DeveloperDiskImage.dmg");<NEW_LINE>File sig = new File(dir, <MASK><NEW_LINE>if (dmg.isFile() && sig.isFile()) {<NEW_LINE>return dmg;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new FileNotFoundException("No DeveloperDiskImage.dmg found in " + dsDir.getAbsolutePath() + " for iOS version " + productVersion + " (" + buildVersion + ")");<NEW_LINE>}
dmg.getName() + ".signature");
1,471,425
public void bind(OCShare publicShare, ShareeListAdapterListener listener) {<NEW_LINE>if (ShareType.EMAIL == publicShare.getShareType()) {<NEW_LINE>binding.name.setText(publicShare.getSharedWithDisplayName());<NEW_LINE>binding.icon.setImageDrawable(ResourcesCompat.getDrawable(context.getResources(), R.drawable.ic_email, null));<NEW_LINE>binding.copyLink.setVisibility(View.GONE);<NEW_LINE>binding.icon.getBackground().setColorFilter(context.getResources().getColor(R.color.nc_grey), PorterDuff.Mode.SRC_IN);<NEW_LINE>binding.icon.getDrawable().mutate().setColorFilter(context.getResources().getColor(R.color.icon_on_nc_grey), PorterDuff.Mode.SRC_IN);<NEW_LINE>} else {<NEW_LINE>if (!TextUtils.isEmpty(publicShare.getLabel())) {<NEW_LINE>String text = String.format(context.getString(R.string.share_link_with_label), publicShare.getLabel());<NEW_LINE>binding.name.setText(text);<NEW_LINE>} else {<NEW_LINE>binding.name.setText(R.string.share_link);<NEW_LINE>}<NEW_LINE>themeAvatarUtils.colorIconImageViewWithBackground(binding.icon, context, themeColorUtils);<NEW_LINE>}<NEW_LINE>String permissionName = SharingMenuHelper.getPermissionName(context, publicShare);<NEW_LINE>setPermissionName(permissionName);<NEW_LINE>binding.copyLink.setOnClickListener(v -> listener.copyLink(publicShare));<NEW_LINE>binding.overflowMenu.setOnClickListener(v <MASK><NEW_LINE>binding.shareByLinkContainer.setOnClickListener(v -> listener.showPermissionsDialog(publicShare));<NEW_LINE>}
-> listener.showSharingMenuActionSheet(publicShare));
1,459,688
public void printConfigSettings() {<NEW_LINE>String thisMethod = "printConfigSettings";<NEW_LINE>String indent = " ";<NEW_LINE>Log.info(thisClass, thisMethod, "SSL config settings:");<NEW_LINE>Log.info(thisClass, thisMethod, indent + ATTR_SSL_ID + ": " + id);<NEW_LINE>Log.info(thisClass, thisMethod, indent + ATTR_SSL_KEY_STORE_REF + ": " + keyStoreRef);<NEW_LINE>Log.info(thisClass, thisMethod, indent + ATTR_SSL_TRUST_STORE_REF + ": " + trustStoreRef);<NEW_LINE>Log.info(thisClass, thisMethod, <MASK><NEW_LINE>Log.info(thisClass, thisMethod, indent + ATTR_SSL_CLIENT_AUTHENTICATION + ": " + clientAuthentication);<NEW_LINE>Log.info(thisClass, thisMethod, indent + ATTR_SSL_CLIENT_AUTHENTICATION_SUPPORTED + ": " + clientAuthenticationSupported);<NEW_LINE>Log.info(thisClass, thisMethod, indent + ATTR_SSL_SECURITY_LEVEL + ": " + securityLevel);<NEW_LINE>Log.info(thisClass, thisMethod, indent + ATTR_SSL_CLIENT_KEY_ALIAS + ": " + clientKeyAlias);<NEW_LINE>Log.info(thisClass, thisMethod, indent + ATTR_SSL_SERVER_KEY_ALIAS + ": " + serverKeyAlias);<NEW_LINE>Log.info(thisClass, thisMethod, indent + ATTR_SSL_ENABLED_CIPHERS + ": " + enabledCiphers);<NEW_LINE>}
indent + ATTR_SSL_SSL_PROTOCOL + ": " + sslProtocol);
942,538
public ProcessContinuation processElement(RestrictionTracker<UnboundedSourceRestriction<OutputT, CheckpointT>, UnboundedSourceValue[]> tracker, ManualWatermarkEstimator<Instant> watermarkEstimator, OutputReceiver<ValueWithRecordId<OutputT>> receiver, BundleFinalizer bundleFinalizer) throws IOException {<NEW_LINE>UnboundedSourceRestriction<OutputT, CheckpointT> initialRestriction = tracker.currentRestriction();<NEW_LINE>UnboundedSourceValue<OutputT>[] out = new UnboundedSourceValue[1];<NEW_LINE>while (tracker.tryClaim(out) && out[0] != null) {<NEW_LINE>watermarkEstimator.setWatermark(out[0].getWatermark());<NEW_LINE>receiver.outputWithTimestamp(new ValueWithRecordId<>(out[0].getValue(), out[0].getId()), out<MASK><NEW_LINE>}<NEW_LINE>UnboundedSourceRestriction<OutputT, CheckpointT> currentRestriction = tracker.currentRestriction();<NEW_LINE>// Add the checkpoint mark to be finalized if the checkpoint mark isn't trivial and is not<NEW_LINE>// the initial restriction. The initial restriction would have been finalized as part of<NEW_LINE>// a prior bundle being executed.<NEW_LINE>@SuppressWarnings("ReferenceEquality")<NEW_LINE>boolean isInitialRestriction = initialRestriction == currentRestriction;<NEW_LINE>if (currentRestriction.getCheckpoint() != null && !isInitialRestriction && !(tracker.currentRestriction().getCheckpoint() instanceof NoopCheckpointMark)) {<NEW_LINE>bundleFinalizer.afterBundleCommit(Instant.now().plus(Duration.standardMinutes(DEFAULT_BUNDLE_FINALIZATION_LIMIT_MINS)), currentRestriction.getCheckpoint()::finalizeCheckpoint);<NEW_LINE>}<NEW_LINE>// If we have been split/checkpoint by a runner, the tracker will have been updated to the<NEW_LINE>// empty source and we will return stop. Otherwise the unbounded source has only temporarily<NEW_LINE>// run out of work.<NEW_LINE>if (currentRestriction.getSource() instanceof EmptyUnboundedSource) {<NEW_LINE>return ProcessContinuation.stop();<NEW_LINE>}<NEW_LINE>// Advance the watermark even if zero elements may have been output. Only report it if we<NEW_LINE>// are resuming.<NEW_LINE>watermarkEstimator.setWatermark(currentRestriction.getWatermark());<NEW_LINE>return ProcessContinuation.resume();<NEW_LINE>}
[0].getTimestamp());
1,680,531
static boolean verify(final byte[] message, final byte[] signature, final byte[] publicKey) throws GeneralSecurityException {<NEW_LINE>if (signature.length != SIGNATURE_LEN) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>byte[] s = Arrays.copyOfRange(signature, FIELD_LEN, SIGNATURE_LEN);<NEW_LINE>if (!isSmallerThanGroupOrder(s)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>MessageDigest digest = <MASK><NEW_LINE>digest.update(signature, 0, FIELD_LEN);<NEW_LINE>digest.update(publicKey);<NEW_LINE>digest.update(message);<NEW_LINE>byte[] h = digest.digest();<NEW_LINE>reduce(h);<NEW_LINE>XYZT negPublicKey = XYZT.fromBytesNegateVarTime(publicKey);<NEW_LINE>XYZ xyz = doubleScalarMultVarTime(h, negPublicKey, s);<NEW_LINE>byte[] expectedR = xyz.toBytes();<NEW_LINE>for (int i = 0; i < FIELD_LEN; i++) {<NEW_LINE>if (expectedR[i] != signature[i]) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
EngineFactory.MESSAGE_DIGEST.getInstance("SHA-512");
691,633
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null || controller.getHand().isEmpty()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TargetCardInHand targetCard = new TargetCardInHand();<NEW_LINE>if (!controller.chooseTarget(Outcome.PutCardInPlay, controller.getHand(), targetCard, source, game)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Ability newSource = source.copy();<NEW_LINE>newSource.setWorksFaceDown(true);<NEW_LINE>Set<Card> cards = targetCard.getTargets().stream().map(game::getCard).filter(Objects::nonNull).collect(Collectors.toSet());<NEW_LINE>cards.stream().forEach(card -> {<NEW_LINE>ManaCosts manaCosts = null;<NEW_LINE>if (card.isCreature(game)) {<NEW_LINE>manaCosts = card.getSpellAbility() != null ? card.getSpellAbility().getManaCosts() : null;<NEW_LINE>if (manaCosts == null) {<NEW_LINE>manaCosts = new ManaCostsImpl("{0}");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>MageObjectReference objectReference = new MageObjectReference(card.getId(), card.getZoneChangeCounter(game) + 1, game);<NEW_LINE>game.addEffect(new BecomesFaceDownCreatureEffect(manaCosts, objectReference, Duration.Custom, BecomesFaceDownCreatureEffect<MASK><NEW_LINE>});<NEW_LINE>controller.moveCards(cards, Zone.BATTLEFIELD, source, game, false, true, false, null);<NEW_LINE>cards.stream().map(Card::getId).map(game::getPermanent).filter(permanent -> permanent != null).forEach(permanent -> permanent.setManifested(true));<NEW_LINE>return true;<NEW_LINE>}
.FaceDownType.MANIFESTED), newSource);
1,546,202
private void init(ResourceGroupInfo resourceGroupInfo) {<NEW_LINE>this.id = requireNonNull(resourceGroupInfo.getId(), "id is null");<NEW_LINE>this.state = requireNonNull(<MASK><NEW_LINE>this.schedulingPolicy = resourceGroupInfo.getSchedulingPolicy();<NEW_LINE>this.schedulingWeight = resourceGroupInfo.getSchedulingWeight();<NEW_LINE>this.softMemoryLimit = resourceGroupInfo.getSoftMemoryLimit();<NEW_LINE>this.softConcurrencyLimit = resourceGroupInfo.getSoftConcurrencyLimit();<NEW_LINE>this.hardConcurrencyLimit = resourceGroupInfo.getHardConcurrencyLimit();<NEW_LINE>this.maxQueuedQueries = resourceGroupInfo.getMaxQueuedQueries();<NEW_LINE>this.memoryUsageBytes = resourceGroupInfo.getMemoryUsage().toBytes();<NEW_LINE>this.numQueuedQueries = resourceGroupInfo.getNumQueuedQueries();<NEW_LINE>this.numRunningQueries = resourceGroupInfo.getNumRunningQueries();<NEW_LINE>this.subGroupsMap = new HashMap<>();<NEW_LINE>this.runningQueriesBuilder = ImmutableList.builder();<NEW_LINE>addRunningQueries(resourceGroupInfo.getRunningQueries());<NEW_LINE>addSubgroups(resourceGroupInfo.getSubGroups());<NEW_LINE>}
resourceGroupInfo.getState(), "state is null");
1,111,571
public void showPopUpNotification(String title, String body, String popUpEvent) {<NEW_LINE>// Shows the pop-up notification.<NEW_LINE>if (title != null && body != null && popUpEvent != null) {<NEW_LINE>NotificationService notificationService = NeomediaActivator.getNotificationService();<NEW_LINE>if (notificationService != null) {<NEW_LINE>// Registers only once to the popup message notification<NEW_LINE>// handler.<NEW_LINE>if (!isRegisteredToPopupMessageListener) {<NEW_LINE>isRegisteredToPopupMessageListener = true;<NEW_LINE>addOrRemovePopupMessageListener(true);<NEW_LINE>}<NEW_LINE>// Fires the popup notification.<NEW_LINE>Map<String, Object> extras = new HashMap<String, Object>();<NEW_LINE>extras.<MASK><NEW_LINE>notificationService.fireNotification(popUpEvent, title, body + "\r\n\r\n" + NeomediaActivator.getResources().getI18NString("impl.media.configform.AUDIO_DEVICE_CONFIG_MANAGMENT_CLICK"), null, extras);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
put(NotificationData.POPUP_MESSAGE_HANDLER_TAG_EXTRA, this);
203,798
// POST /api/admin/searchlist/doc<NEW_LINE>@Execute<NEW_LINE>public JsonResponse<ApiResult> post$doc(final EditBody body) {<NEW_LINE>validateApi(body, messages -> {<NEW_LINE>});<NEW_LINE>if (body.doc == null) {<NEW_LINE>throwValidationErrorApi(messages -> messages.addErrorsCrudFailedToCreateCrudTable(GLOBAL, "doc is required"));<NEW_LINE>}<NEW_LINE>validateFields(body, this::throwValidationErrorApi);<NEW_LINE>body.crudMode = CrudMode.EDIT;<NEW_LINE>final Map<String, Object> doc = getDoc(body).map(entity -> {<NEW_LINE>final String index = fessConfig.getIndexDocumentUpdateIndex();<NEW_LINE>try {<NEW_LINE>entity.putAll(fessConfig.convertToStorableDoc(body.doc));<NEW_LINE>final String newId = ComponentUtil.getCrawlingInfoHelper().generateId(entity);<NEW_LINE>final String oldId = (String) entity.get(fessConfig.getIndexFieldId());<NEW_LINE>if (!newId.equals(oldId)) {<NEW_LINE>entity.put(fessConfig.getIndexFieldId(), newId);<NEW_LINE>entity.remove(fessConfig.getIndexFieldVersion());<NEW_LINE>final Number seqNo = (Number) entity.remove(fessConfig.getIndexFieldSeqNo());<NEW_LINE>final Number primaryTerm = (Number) entity.remove(fessConfig.getIndexFieldPrimaryTerm());<NEW_LINE>if (seqNo != null && primaryTerm != null && oldId != null) {<NEW_LINE>searchEngineClient.delete(index, oldId, seqNo, primaryTerm);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>saveInfo(messages -> messages.addSuccessCrudUpdateCrudTable(GLOBAL));<NEW_LINE>} catch (final Exception e) {<NEW_LINE>logger.error("Failed to update {}", entity, e);<NEW_LINE>throwValidationErrorApi(messages -> messages.addErrorsCrudFailedToUpdateCrudTable(GLOBAL, buildThrowableMessage(e)));<NEW_LINE>}<NEW_LINE>return entity;<NEW_LINE>}).orElseGet(() -> {<NEW_LINE>throwValidationErrorApi(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, body.doc.toString()));<NEW_LINE>return null;<NEW_LINE>});<NEW_LINE>return asJson(new ApiUpdateResponse().id(doc.get(fessConfig.getIndexFieldDocId()).toString()).created(false).status(Status.OK).result());<NEW_LINE>}
searchEngineClient.store(index, entity);
1,070,896
public void testBasicPassivation() throws Exception {<NEW_LINE>SessionIdCache.clearAll();<NEW_LINE>final InitialContext ic = new InitialContext();<NEW_LINE>StatefulSessionBeanLocal sBean = (StatefulSessionBeanLocal) ic.lookup(BeanName);<NEW_LINE>assertNotNull(sBean);<NEW_LINE>final String beanId = sBean.getSessionId();<NEW_LINE>assertTrue(SessionIdCache.sessionList.contains(beanId));<NEW_LINE>SessionIdCache.removeActivatePassivate(beanId);<NEW_LINE>final String description = "This is a test with beanId = " + beanId;<NEW_LINE>final String mutatedDescription = "MUTATION:" + description;<NEW_LINE>final PassivateEntity newEntity = sBean.newEntity(description);<NEW_LINE>assertNotNull(newEntity);<NEW_LINE>assertTrue(SessionIdCache.passivateList.contains(beanId));<NEW_LINE>assertTrue(SessionIdCache<MASK><NEW_LINE>SessionIdCache.removeActivatePassivate(beanId);<NEW_LINE>final PassivateEntity findEntity = sBean.findEntity(newEntity.getId());<NEW_LINE>assertNotNull(findEntity);<NEW_LINE>assertNotSame(newEntity, findEntity);<NEW_LINE>assertTrue(SessionIdCache.passivateList.contains(beanId));<NEW_LINE>assertTrue(SessionIdCache.activateList.contains(beanId));<NEW_LINE>SessionIdCache.removeActivatePassivate(beanId);<NEW_LINE>findEntity.setDescription(mutatedDescription);<NEW_LINE>final PassivateEntity updatedEntity = sBean.updateEntity(findEntity);<NEW_LINE>assertNotNull(updatedEntity);<NEW_LINE>assertNotSame(updatedEntity, findEntity);<NEW_LINE>assertTrue(SessionIdCache.passivateList.contains(beanId));<NEW_LINE>assertTrue(SessionIdCache.activateList.contains(beanId));<NEW_LINE>SessionIdCache.removeActivatePassivate(beanId);<NEW_LINE>sBean.removeEntity(updatedEntity);<NEW_LINE>assertTrue(SessionIdCache.passivateList.contains(beanId));<NEW_LINE>assertTrue(SessionIdCache.activateList.contains(beanId));<NEW_LINE>sBean.remove();<NEW_LINE>// writer.println("SUCCESS:testBasicPassivation");<NEW_LINE>}
.activateList.contains(beanId));
209,560
public synchronized void close() {<NEW_LINE>if (_mmapDirectory != null) {<NEW_LINE>// Move all meta files. We will create new ones when each buffer gets closed.<NEW_LINE>File bakDir = new File(_mmapDirectory.getAbsolutePath() + BAK_DIRNAME_SUFFIX);<NEW_LINE>FilePrefixFilter filter = new <MASK><NEW_LINE>File[] metaFiles = _mmapDirectory.listFiles(filter);<NEW_LINE>for (File f : metaFiles) {<NEW_LINE>if (f.isFile()) {<NEW_LINE>moveFile(f, bakDir);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (Map.Entry<PhysicalPartitionKey, DbusEventBuffer> entry : _bufsMap.entrySet()) {<NEW_LINE>try {<NEW_LINE>entry.getValue().closeBuffer(true);<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>LOG.error("error closing buffer for partition: " + entry.getKey().getPhysicalPartition() + ": " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (_mmapDirectory != null) {<NEW_LINE>File bakDir = new File(_mmapDirectory.getAbsolutePath() + BAK_DIRNAME_SUFFIX);<NEW_LINE>moveUnusedSessionDirs(bakDir);<NEW_LINE>}<NEW_LINE>}
FilePrefixFilter(DbusEventBuffer.getMmapMetaInfoFileNamePrefix());
1,330,481
public void compute(double[][] seasonMatrix, int sP, int sQ, int season) {<NEW_LINE>int dataLength = TsMethod.seasonMatrix2Array(seasonMatrix).length;<NEW_LINE>// step 1: set residual[i]=0, if i<initPoint; set data[i]=0, if i<initPoint<NEW_LINE>double[] cResidual = new double[seasonMatrix[0].length];<NEW_LINE>// step 2: find initial parameters for fitting CSS<NEW_LINE>double[] newARCoef = new double[sP];<NEW_LINE>double[] newMACoef = new double[sQ];<NEW_LINE>double[] newIntercept = new double[1];<NEW_LINE>ArrayList<double[]> initCoef = new ArrayList<>();<NEW_LINE>initCoef.add(newARCoef);<NEW_LINE>initCoef.add(newMACoef);<NEW_LINE>initCoef.add(newIntercept);<NEW_LINE>// step 3: gradient descent<NEW_LINE>SCSSGradientTarget sarmaGT = new SCSSGradientTarget();<NEW_LINE>sarmaGT.fit(seasonMatrix, cResidual, initCoef, season);<NEW_LINE>AbstractGradientTarget problem = BFGS.solve(sarmaGT, 1000, 0.001, 0.000001, new int[] { 1, 2, 3 }, -1);<NEW_LINE>this.sResidual = problem.getResidual();<NEW_LINE>this.variance = problem.getMinValue() / (dataLength - sP - sQ);<NEW_LINE>DenseMatrix result = problem.getFinalCoef();<NEW_LINE>this.warn = problem.getWarn();<NEW_LINE>this.sARCoef = new double[sP];<NEW_LINE>this.sMACoef = new double[sQ];<NEW_LINE>for (int i = 0; i < sP; i++) {<NEW_LINE>this.sARCoef[i] = result.get(i, 0);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < sQ; i++) {<NEW_LINE>this.sMACoef[i] = result.get(i + sP, 0);<NEW_LINE>}<NEW_LINE>this<MASK><NEW_LINE>this.logLikelihood = -((double) (dataLength - sP) / 2) * Math.log(2 * Math.PI) - ((double) (dataLength - sP) / 2) * Math.log(variance) - css / (2 * variance);<NEW_LINE>DenseMatrix information = problem.getH();<NEW_LINE>this.sArStdError = new double[sP];<NEW_LINE>this.sMaStdError = new double[sQ];<NEW_LINE>for (int i = 0; i < sP; i++) {<NEW_LINE>this.sArStdError[i] = Math.sqrt(information.get(i, i));<NEW_LINE>if (Double.isNaN(this.sArStdError[i])) {<NEW_LINE>this.sArStdError[i] = -99;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < sQ; i++) {<NEW_LINE>this.sMaStdError[i] = Math.sqrt(information.get(i + sP, i + sP));<NEW_LINE>if (Double.isNaN(this.sMaStdError[i])) {<NEW_LINE>this.sMaStdError[i] = -99;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.css = problem.getMinValue();
1,684,941
protected void rebalanceClusterOwnership(final String iNode, String databaseName, final OModifiableDistributedConfiguration cfg, final boolean canCreateNewClusters) {<NEW_LINE>final ODistributedConfiguration.ROLES role = cfg.getServerRole(iNode);<NEW_LINE>if (role != ODistributedConfiguration.ROLES.MASTER)<NEW_LINE>// NO MASTER, DON'T CREATE LOCAL CLUSTERS<NEW_LINE>return;<NEW_LINE>ODatabaseDocumentInternal current = ODatabaseRecordThreadLocal.instance().getIfDefined();<NEW_LINE>try (ODatabaseDocumentInternal iDatabase = getServerInstance().openDatabase(databaseName)) {<NEW_LINE>ODistributedServerLog.info(this, nodeName, null, DIRECTION.NONE, "Reassigning ownership of clusters for database %s...", iDatabase.getName());<NEW_LINE>final Set<String> availableNodes = getAvailableNodeNames(iDatabase.getName());<NEW_LINE>iDatabase.activateOnCurrentThread();<NEW_LINE>final OSchema schema = iDatabase.getDatabaseOwner().getMetadata().getSchema();<NEW_LINE>final Map<OClass, List<String>> cluster2CreateMap = new HashMap<OClass, List<String>>(1);<NEW_LINE>for (final OClass clazz : schema.getClasses()) {<NEW_LINE>final List<String> cluster2Create = clusterAssignmentStrategy.assignClusterOwnershipOfClass(iDatabase, <MASK><NEW_LINE>cluster2CreateMap.put(clazz, cluster2Create);<NEW_LINE>}<NEW_LINE>if (canCreateNewClusters)<NEW_LINE>createClusters(iDatabase, cluster2CreateMap, cfg);<NEW_LINE>ODistributedServerLog.info(this, nodeName, null, DIRECTION.NONE, "Reassignment of clusters for database '%s' completed (classes=%d)", iDatabase.getName(), cluster2CreateMap.size());<NEW_LINE>} finally {<NEW_LINE>ODatabaseRecordThreadLocal.instance().set(current);<NEW_LINE>}<NEW_LINE>}
cfg, clazz, availableNodes, canCreateNewClusters);
1,736,630
public static void migrate() {<NEW_LINE>String configVersionRaw = DiscordSRV.<MASK><NEW_LINE>if (configVersionRaw.contains("/"))<NEW_LINE>configVersionRaw = configVersionRaw.substring(0, configVersionRaw.indexOf("/"));<NEW_LINE>String pluginVersionRaw = DiscordSRV.getPlugin().getDescription().getVersion();<NEW_LINE>if (configVersionRaw.equals(pluginVersionRaw))<NEW_LINE>return;<NEW_LINE>Version configVersion = configVersionRaw.split("\\.").length == 3 ? Version.valueOf(configVersionRaw.replace("-SNAPSHOT", "")) : Version.valueOf("1." + configVersionRaw.replace("-SNAPSHOT", ""));<NEW_LINE>Version pluginVersion = Version.valueOf(pluginVersionRaw.replace("-SNAPSHOT", ""));<NEW_LINE>// no migration necessary<NEW_LINE>if (configVersion.equals(pluginVersion))<NEW_LINE>return;<NEW_LINE>if (configVersion.greaterThan(pluginVersion)) {<NEW_LINE>DiscordSRV.warning("You're attempting to use a higher config version than the plugin. Things probably won't work correctly.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String oldVersionName = configVersion.toString();<NEW_LINE>DiscordSRV.info("Your DiscordSRV config file was outdated; attempting migration...");<NEW_LINE>try {<NEW_LINE>Provider configProvider = DiscordSRV.config().getProvider("config");<NEW_LINE>Provider messageProvider = DiscordSRV.config().getProvider("messages");<NEW_LINE>Provider voiceProvider = DiscordSRV.config().getProvider("voice");<NEW_LINE>Provider linkingProvider = DiscordSRV.config().getProvider("linking");<NEW_LINE>Provider synchronizationProvider = DiscordSRV.config().getProvider("synchronization");<NEW_LINE>Provider alertsProvider = DiscordSRV.config().getProvider("alerts");<NEW_LINE>migrate("config.yml-build." + oldVersionName + ".old", DiscordSRV.getPlugin().getConfigFile(), configProvider);<NEW_LINE>migrate("messages.yml-build." + oldVersionName + ".old", DiscordSRV.getPlugin().getMessagesFile(), messageProvider);<NEW_LINE>migrate("voice.yml-build." + oldVersionName + ".old", DiscordSRV.getPlugin().getVoiceFile(), voiceProvider);<NEW_LINE>migrate("linking.yml-build." + oldVersionName + ".old", DiscordSRV.getPlugin().getLinkingFile(), linkingProvider);<NEW_LINE>migrate("synchronization.yml-build." + oldVersionName + ".old", DiscordSRV.getPlugin().getSynchronizationFile(), synchronizationProvider);<NEW_LINE>migrate("alerts.yml-build." + oldVersionName + ".old", DiscordSRV.getPlugin().getAlertsFile(), alertsProvider);<NEW_LINE>DiscordSRV.info("Successfully migrated configuration files to version " + pluginVersionRaw);<NEW_LINE>} catch (Exception e) {<NEW_LINE>DiscordSRV.error("Failed migrating configs: " + e.getMessage());<NEW_LINE>DiscordSRV.debug(ExceptionUtils.getStackTrace(e));<NEW_LINE>}<NEW_LINE>}
config().getString("ConfigVersion");
1,662,831
private void execute(JSDynamicObject obj, Object getterV, Object setterV) {<NEW_LINE>DynamicObjectLibrary dynamicObjectLib = dynamicObjectLibrary();<NEW_LINE>JSDynamicObject getter = (JSDynamicObject) getterV;<NEW_LINE>JSDynamicObject setter = (JSDynamicObject) setterV;<NEW_LINE>if ((getterNode == null || setterNode == null) && JSProperty.isAccessor(dynamicObjectLib.getPropertyFlagsOrDefault(obj, name, 0))) {<NEW_LINE>// No full accessor information and there is an accessor property already<NEW_LINE>// => merge the new and existing accessor functions<NEW_LINE>Accessor existing = (Accessor) dynamicObjectLib.getOrDefault(obj, name, null);<NEW_LINE>getter = (getter == null) ? existing.getGetter() : getter;<NEW_LINE>setter = (setter == null) <MASK><NEW_LINE>}<NEW_LINE>Accessor accessor = new Accessor(getter, setter);<NEW_LINE>dynamicObjectLib.putWithFlags(obj, name, accessor, attributes | JSProperty.ACCESSOR);<NEW_LINE>}
? existing.getSetter() : setter;
133,720
protected ServerOperation<HttpClientResponse<O>> requestToOperation(final HttpClientRequest<I> request, final ClientConfig rxClientConfig) {<NEW_LINE>Preconditions.checkNotNull(request);<NEW_LINE>return new ServerOperation<HttpClientResponse<O>>() {<NEW_LINE><NEW_LINE>final AtomicInteger count = new AtomicInteger(0);<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Observable<HttpClientResponse<O>> call(Server server) {<NEW_LINE>HttpClient<I, O> rxClient = getOrCreateRxClient(server);<NEW_LINE>setHostHeader(request, server.getHost());<NEW_LINE><MASK><NEW_LINE>if (rxClientConfig != null) {<NEW_LINE>o = rxClient.submit(request, rxClientConfig);<NEW_LINE>} else {<NEW_LINE>o = rxClient.submit(request);<NEW_LINE>}<NEW_LINE>return o.concatMap(new Func1<HttpClientResponse<O>, Observable<HttpClientResponse<O>>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Observable<HttpClientResponse<O>> call(HttpClientResponse<O> t1) {<NEW_LINE>if (t1.getStatus().code() / 100 == 4 || t1.getStatus().code() / 100 == 5)<NEW_LINE>return responseToErrorPolicy.call(t1, backoffStrategy.call(count.getAndIncrement()));<NEW_LINE>else<NEW_LINE>return Observable.just(t1);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
Observable<HttpClientResponse<O>> o;
378,318
public void draw(Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom, Paint paint) {<NEW_LINE>Drawable b = getCachedDrawable();<NEW_LINE>if (b != null) {<NEW_LINE>canvas.save();<NEW_LINE>int transY = bottom <MASK><NEW_LINE>if (mVerticalAlignment == ALIGN_BASELINE) {<NEW_LINE>transY -= paint.getFontMetricsInt().descent;<NEW_LINE>} else if (mVerticalAlignment == ALIGN_TOPLINE) {<NEW_LINE>transY = (int) (top + paint.getFontMetrics().ascent - paint.getFontMetricsInt().top + 3);<NEW_LINE>} else if (mVerticalAlignment == ALIGN_CENTERVERTICAL) {<NEW_LINE>int tmp = bottom - top - b.getBounds().bottom;<NEW_LINE>if (tmp >= 0) {<NEW_LINE>transY = top + tmp / 2;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>canvas.translate(x, transY);<NEW_LINE>b.draw(canvas);<NEW_LINE>canvas.restore();<NEW_LINE>}<NEW_LINE>}
- b.getBounds().bottom;
1,823,415
public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@public @buseventtype create objectarray schema MyEventOne (d1 String, d2 String, val int);\n" + "@name('s0') select sum(val, group_by: d1) as c0, sum(val, group_by: d2) as c1 from MyEventOne";<NEW_LINE>env.compileDeploy(epl, new RegressionPath()).addListener("s0");<NEW_LINE>String[] <MASK><NEW_LINE>env.sendEventObjectArray(new Object[] { "E1", "E1", 10 }, "MyEventOne");<NEW_LINE>env.assertPropsNew("s0", cols, new Object[] { 10, 10 });<NEW_LINE>env.sendEventObjectArray(new Object[] { "E1", "E2", 11 }, "MyEventOne");<NEW_LINE>env.assertPropsNew("s0", cols, new Object[] { 21, 11 });<NEW_LINE>env.sendEventObjectArray(new Object[] { "E2", "E1", 12 }, "MyEventOne");<NEW_LINE>env.assertPropsNew("s0", cols, new Object[] { 12, 22 });<NEW_LINE>env.sendEventObjectArray(new Object[] { "E3", "E1", 13 }, "MyEventOne");<NEW_LINE>env.assertPropsNew("s0", cols, new Object[] { 13, 35 });<NEW_LINE>env.sendEventObjectArray(new Object[] { "E3", "E3", 14 }, "MyEventOne");<NEW_LINE>env.assertPropsNew("s0", cols, new Object[] { 27, 14 });<NEW_LINE>env.undeployAll();<NEW_LINE>}
cols = "c0,c1".split(",");
855,162
public static void main(String[] args) throws IOException, ApiException {<NEW_LINE>ApiClient client = Config.defaultClient();<NEW_LINE>Configuration.setDefaultApiClient(client);<NEW_LINE>Metrics metrics = new Metrics(client);<NEW_LINE>NodeMetricsList list = metrics.getNodeMetrics();<NEW_LINE>for (NodeMetrics item : list.getItems()) {<NEW_LINE>System.out.println(item.getMetadata().getName());<NEW_LINE>System.out.println("------------------------------");<NEW_LINE>for (String key : item.getUsage().keySet()) {<NEW_LINE>System.out.println("\t" + key);<NEW_LINE>System.out.println("\t" + item.getUsage().get(key));<NEW_LINE>}<NEW_LINE>System.out.println();<NEW_LINE>}<NEW_LINE>for (PodMetrics item : metrics.getPodMetrics("default").getItems()) {<NEW_LINE>System.out.println(item.getMetadata().getName());<NEW_LINE>System.out.println("------------------------------");<NEW_LINE>if (item.getContainers() == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>for (ContainerMetrics container : item.getContainers()) {<NEW_LINE>System.out.println(container.getName());<NEW_LINE>System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");<NEW_LINE>for (String key : container.getUsage().keySet()) {<NEW_LINE>System.<MASK><NEW_LINE>System.out.println("\t" + container.getUsage().get(key));<NEW_LINE>}<NEW_LINE>System.out.println();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
out.println("\t" + key);
743,612
public void onMessageClicked(SpannableStringBuilder formattedMessage, final String userName, final String message) {<NEW_LINE>View v = LayoutInflater.from(getContext()).inflate(R.layout.chat_message_options, null);<NEW_LINE>bottomSheetDialog <MASK><NEW_LINE>bottomSheetDialog.setContentView(v);<NEW_LINE>final BottomSheetBehavior behavior = BottomSheetBehavior.from((View) v.getParent());<NEW_LINE>behavior.setPeekHeight(getContext().getResources().getDisplayMetrics().heightPixels / 3);<NEW_LINE>bottomSheetDialog.setOnDismissListener(dialogInterface -> behavior.setState(BottomSheetBehavior.STATE_COLLAPSED));<NEW_LINE>TextView mMessage = v.findViewById(R.id.text_chat_message);<NEW_LINE>TextView mMention = v.findViewById(R.id.text_mention);<NEW_LINE>TextView mDuplicateMessage = v.findViewById(R.id.text_duplicate_message);<NEW_LINE>mMessage.setText(formattedMessage);<NEW_LINE>mMention.setOnClickListener(view -> {<NEW_LINE>insertSendText("@" + userName);<NEW_LINE>bottomSheetDialog.dismiss();<NEW_LINE>});<NEW_LINE>mDuplicateMessage.setOnClickListener(view -> {<NEW_LINE>insertSendText(message);<NEW_LINE>bottomSheetDialog.dismiss();<NEW_LINE>});<NEW_LINE>bottomSheetDialog.show();<NEW_LINE>}
= new BottomSheetDialog(requireContext());
596,432
private void updatePoster() {<NEW_LINE>if (isFinishing())<NEW_LINE>return;<NEW_LINE>// Figure image size<NEW_LINE>Double aspect = ImageUtils.getImageAspectRatio(mBaseItem, false);<NEW_LINE>int posterHeight = aspect > 1 ? Utils.convertDpToPixel(mActivity, 150) : Utils.convertDpToPixel(mActivity, 250);<NEW_LINE>int posterWidth = (int) ((aspect) * posterHeight);<NEW_LINE>if (posterHeight < 10)<NEW_LINE>// Guard against zero size images causing picasso to barf<NEW_LINE>posterWidth = Utils.convertDpToPixel(mActivity, 150);<NEW_LINE>String primaryImageUrl = ImageUtils.getPrimaryImageUrl(<MASK><NEW_LINE>Timber.d("Audio Poster url: %s", primaryImageUrl);<NEW_LINE>Glide.with(mActivity).load(primaryImageUrl).error(R.drawable.ic_album).override(posterWidth, posterHeight).centerInside().into(mPoster);<NEW_LINE>}
this, mBaseItem, false, posterHeight);
1,852,844
public FieldElement multInv() {<NEW_LINE>if (this.getData().equals(BigInteger.ZERO)) {<NEW_LINE>throw new ArithmeticException();<NEW_LINE>}<NEW_LINE>if (this.getData().equals(BigInteger.ONE)) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>// Polynomial EEA:<NEW_LINE>BigInteger r2 = this.getModulus();<NEW_LINE><MASK><NEW_LINE>BigInteger t2 = new BigInteger("0");<NEW_LINE>BigInteger t1 = BigInteger.ONE;<NEW_LINE>do {<NEW_LINE>BigInteger[] division = this.polynomialDivision(r2, r1);<NEW_LINE>// r = r2 mod r1<NEW_LINE>BigInteger r = division[1];<NEW_LINE>// q = (r2 - r) / r1<NEW_LINE>BigInteger q = division[0];<NEW_LINE>// t = t2 - (t1 * q)<NEW_LINE>FieldElementF2m pointT1Polynomial = new FieldElementF2m(t1, this.getModulus());<NEW_LINE>FieldElementF2m pointQPolynomial = new FieldElementF2m(q, this.getModulus());<NEW_LINE>BigInteger t = pointT1Polynomial.mult(pointQPolynomial).getData();<NEW_LINE>t = this.reduce(t);<NEW_LINE>t = t2.xor(t);<NEW_LINE>t2 = t1;<NEW_LINE>t1 = t;<NEW_LINE>r2 = r1;<NEW_LINE>r1 = r;<NEW_LINE>} while (!r1.equals(BigInteger.ONE) && !r1.equals(BigInteger.ZERO));<NEW_LINE>// t1 * this.getData() == 1<NEW_LINE>return new FieldElementF2m(t1, this.getModulus());<NEW_LINE>}
BigInteger r1 = this.getData();
264,088
void init(boolean decrypting, String algorithm, byte[] key) throws InvalidKeyException {<NEW_LINE>int keyLength = key.length;<NEW_LINE>if (effectiveKeyBits == 0) {<NEW_LINE>effectiveKeyBits = keyLength << 3;<NEW_LINE>}<NEW_LINE>checkKey(algorithm, keyLength);<NEW_LINE>// key buffer, the L[] byte array from the spec<NEW_LINE>byte[] expandedKeyBytes = new byte[128];<NEW_LINE>// place key into key buffer<NEW_LINE>System.arraycopy(key, 0, expandedKeyBytes, 0, keyLength);<NEW_LINE>// first loop<NEW_LINE>int t = expandedKeyBytes[keyLength - 1];<NEW_LINE>for (int i = keyLength; i < 128; i++) {<NEW_LINE>t = PI_TABLE[(t + expandedKeyBytes[i - keyLength]) & 0xff];<NEW_LINE>expandedKeyBytes[i] = (byte) t;<NEW_LINE>}<NEW_LINE>int t8 = (effectiveKeyBits + 7) >> 3;<NEW_LINE>int tm = 0xff >> (-effectiveKeyBits & 7);<NEW_LINE>// second loop, reduce search space to effective key bits<NEW_LINE>t = PI_TABLE[expandedKeyBytes[128 - t8] & tm];<NEW_LINE>expandedKeyBytes[128 <MASK><NEW_LINE>for (int i = 127 - t8; i >= 0; i--) {<NEW_LINE>t = PI_TABLE[t ^ (expandedKeyBytes[i + t8] & 0xff)];<NEW_LINE>expandedKeyBytes[i] = (byte) t;<NEW_LINE>}<NEW_LINE>// byte to short conversion, little endian (copy into K[])<NEW_LINE>for (int i = 0, j = 0; i < 64; i++, j += 2) {<NEW_LINE>t = (expandedKeyBytes[j] & 0xff) + ((expandedKeyBytes[j + 1] & 0xff) << 8);<NEW_LINE>expandedKey[i] = t;<NEW_LINE>}<NEW_LINE>}
- t8] = (byte) t;
1,717,672
private boolean tryUpgradeSharedToExclusive(LockTracer tracer, LockWaitEvent waitEvent, ResourceType resourceType, ConcurrentMap<Long, ForsetiLockManager.Lock> lockMap, long resourceId, SharedLock sharedLock, long waitStartNano) throws AcquireLockTimeoutException {<NEW_LINE>int tries = 0;<NEW_LINE>boolean holdsSharedLock = getSharedLockCount(resourceType).containsKey(resourceId);<NEW_LINE>if (!holdsSharedLock) {<NEW_LINE>// We don't hold the shared lock, we need to grab it to upgrade it to an exclusive one<NEW_LINE>if (!sharedLock.acquire(this)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>activeLockCount.incrementAndGet();<NEW_LINE>memoryTracker.allocateHeap(CONCURRENT_NODE_SIZE);<NEW_LINE>try {<NEW_LINE>if (tryUpgradeToExclusiveWithShareLockHeld(tracer, waitEvent, resourceType, resourceId, sharedLock, tries, waitStartNano)) {<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>releaseGlobalLock(lockMap, resourceId);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} catch (Throwable e) {<NEW_LINE>releaseGlobalLock(lockMap, resourceId);<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// We do hold the shared lock, so no reason to deal with the complexity in the case above.<NEW_LINE>return tryUpgradeToExclusiveWithShareLockHeld(tracer, waitEvent, resourceType, <MASK><NEW_LINE>}<NEW_LINE>}
resourceId, sharedLock, tries, waitStartNano);
69,049
final ListContainerRecipesResult executeListContainerRecipes(ListContainerRecipesRequest listContainerRecipesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listContainerRecipesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListContainerRecipesRequest> request = null;<NEW_LINE>Response<ListContainerRecipesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListContainerRecipesRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "imagebuilder");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListContainerRecipes");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListContainerRecipesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListContainerRecipesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(listContainerRecipesRequest));
1,369,863
public void accept(final String bucketId, final RateBucketPeriod period, final long limit, final long increment, final IAsyncResultHandler<RateLimitResponse> handler) {<NEW_LINE>final String id = id(bucketId);<NEW_LINE>try {<NEW_LINE>GetResponse response = getClient().get(new GetRequest(getFullIndexName()).id(id), RequestOptions.DEFAULT);<NEW_LINE>RateLimiterBucket bucket;<NEW_LINE>long version;<NEW_LINE>if (response.isExists()) {<NEW_LINE>// use the existing bucket<NEW_LINE>version = response.getVersion();<NEW_LINE>String sourceAsString = response.getSourceAsString();<NEW_LINE>bucket = JSON_MAPPER.readValue(sourceAsString, RateLimiterBucket.class);<NEW_LINE>} else {<NEW_LINE>// make a new bucket<NEW_LINE>version = 0;<NEW_LINE>bucket = new RateLimiterBucket();<NEW_LINE>}<NEW_LINE>bucket.resetIfNecessary(period);<NEW_LINE>final RateLimitResponse rlr = new RateLimitResponse();<NEW_LINE>if (bucket.getCount() > limit) {<NEW_LINE>rlr.setAccepted(false);<NEW_LINE>} else {<NEW_LINE>rlr.setAccepted(bucket.getCount() < limit);<NEW_LINE>bucket.setCount(bucket.getCount() + increment);<NEW_LINE>bucket.setLast(System.currentTimeMillis());<NEW_LINE>}<NEW_LINE>int reset = (int) (bucket.getResetMillis(period) / 1000L);<NEW_LINE>rlr.setReset(reset);<NEW_LINE>rlr.setRemaining(<MASK><NEW_LINE>updateBucketAndReturn(id, bucket, rlr, version, bucketId, period, limit, increment, handler);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>handler.handle(AsyncResultImpl.create(e, RateLimitResponse.class));<NEW_LINE>}<NEW_LINE>}
limit - bucket.getCount());
464,220
private void debugDrawPoints(final Canvas canvas, final int startIndex, final int endIndex, final Paint paint) {<NEW_LINE>final int[] xCoords = mXCoordinates.getPrimitiveArray();<NEW_LINE>final int[<MASK><NEW_LINE>final int[] pointTypes = mPointTypes.getPrimitiveArray();<NEW_LINE>// {@link Paint} that is zero width stroke and anti alias off draws exactly 1 pixel.<NEW_LINE>paint.setAntiAlias(false);<NEW_LINE>paint.setStrokeWidth(0);<NEW_LINE>for (int i = startIndex; i < endIndex; i++) {<NEW_LINE>final int pointType = pointTypes[i];<NEW_LINE>if (pointType == POINT_TYPE_INTERPOLATED) {<NEW_LINE>paint.setColor(Color.RED);<NEW_LINE>} else if (pointType == POINT_TYPE_SAMPLED) {<NEW_LINE>paint.setColor(0xFFA000FF);<NEW_LINE>} else {<NEW_LINE>paint.setColor(Color.GREEN);<NEW_LINE>}<NEW_LINE>canvas.drawPoint(getXCoordValue(xCoords[i]), yCoords[i], paint);<NEW_LINE>}<NEW_LINE>paint.setAntiAlias(true);<NEW_LINE>}
] yCoords = mYCoordinates.getPrimitiveArray();
1,728,012
private boolean createAlignedTimeseries(List<String> seriesList, InsertPlan insertPlan) throws IllegalPathException {<NEW_LINE>List<String> measurements = new ArrayList<>();<NEW_LINE>for (String series : seriesList) {<NEW_LINE>measurements.add((new PartialPath(series)).getMeasurement());<NEW_LINE>}<NEW_LINE>List<TSDataType> dataTypes = new ArrayList<>(measurements.size());<NEW_LINE>List<TSEncoding> encodings = new ArrayList<>(measurements.size());<NEW_LINE>List<CompressionType> compressors = new ArrayList<>(measurements.size());<NEW_LINE>for (int index = 0; index < measurements.size(); index++) {<NEW_LINE>TSDataType dataType;<NEW_LINE>if (insertPlan.getDataTypes() != null && insertPlan.getDataTypes()[index] != null) {<NEW_LINE>dataType = insertPlan.getDataTypes()[index];<NEW_LINE>} else {<NEW_LINE>dataType = TypeInferenceUtils.getPredictedDataType(insertPlan instanceof InsertTabletPlan ? Array.get(((InsertTabletPlan) insertPlan).getColumns()[index], 0) : ((InsertRowPlan) insertPlan).getValues()[index], true);<NEW_LINE>}<NEW_LINE>dataTypes.add(dataType);<NEW_LINE>encodings.add(getDefaultEncoding(dataType));<NEW_LINE>compressors.add(TSFileDescriptor.getInstance().<MASK><NEW_LINE>}<NEW_LINE>CreateAlignedTimeSeriesPlan plan = new CreateAlignedTimeSeriesPlan(insertPlan.getDevicePath(), measurements, dataTypes, encodings, compressors, null, null, null);<NEW_LINE>TSStatus result;<NEW_LINE>try {<NEW_LINE>result = coordinator.processPartitionedPlan(plan);<NEW_LINE>} catch (UnsupportedPlanException e) {<NEW_LINE>logger.error("Failed to create timeseries {} automatically. Unsupported plan exception {} ", plan, e.getMessage());<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (result.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode() && result.getCode() != TSStatusCode.PATH_ALREADY_EXIST_ERROR.getStatusCode() && result.getCode() != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {<NEW_LINE>logger.error("{} failed to execute create timeseries {}: {}", metaGroupMember.getThisNode(), plan, result);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
getConfig().getCompressor());
643,434
static JSONObject createJsonObject(Media media) {<NEW_LINE>JSONObject jsonObject = new JSONObject();<NEW_LINE>if (media.hasBitrate) {<NEW_LINE>jsonObject.put("bitrate", media.bitrate);<NEW_LINE>}<NEW_LINE>jsonObject.put("copyright", media.copyright);<NEW_LINE>jsonObject.put("duration", media.duration);<NEW_LINE>jsonObject.put("format", media.format);<NEW_LINE>jsonObject.put("height", media.height);<NEW_LINE>int size = media.persons.size();<NEW_LINE>JSONArray personsJsonArray = new JSONArray();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>personsJsonArray.add(media.persons.get(i));<NEW_LINE>}<NEW_LINE>jsonObject.put("persons", personsJsonArray);<NEW_LINE>jsonObject.put("player", media.player.name());<NEW_LINE>jsonObject.put("size", media.size);<NEW_LINE>jsonObject.put("title", media.title);<NEW_LINE>jsonObject.<MASK><NEW_LINE>jsonObject.put("width", media.width);<NEW_LINE>return jsonObject;<NEW_LINE>}
put("uri", media.uri);
1,491,506
private static boolean checkIfConflictingPaths(@Nonnull VFileEvent event, @Nonnull String path, @Nonnull MostlySingularMultiMap<String, VFileEvent> files, @Nonnull Set<? super String> middleDirs) {<NEW_LINE>Iterable<VFileEvent> stored = files.get(path);<NEW_LINE>if (!canReconcileEvents(event, stored)) {<NEW_LINE>// conflicting event found for (non-strict) descendant, stop<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (middleDirs.contains(path)) {<NEW_LINE>// conflicting event found for (non-strict) descendant, stop<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>files.add(path, event);<NEW_LINE>int li = path.length();<NEW_LINE>while (true) {<NEW_LINE>int liPrev = path.<MASK><NEW_LINE>if (liPrev == -1)<NEW_LINE>break;<NEW_LINE>String parentDir = path.substring(0, liPrev);<NEW_LINE>if (files.containsKey(parentDir)) {<NEW_LINE>// conflicting event found for ancestor, stop<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// all parents up already stored, stop<NEW_LINE>if (!middleDirs.add(parentDir))<NEW_LINE>break;<NEW_LINE>li = liPrev;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
lastIndexOf('/', li - 1);
1,759,217
public static ListMediasWithPublicResponse unmarshall(ListMediasWithPublicResponse listMediasWithPublicResponse, UnmarshallerContext context) {<NEW_LINE>listMediasWithPublicResponse.setRequestId(context.stringValue("ListMediasWithPublicResponse.RequestId"));<NEW_LINE>listMediasWithPublicResponse.setSuccess(context.booleanValue("ListMediasWithPublicResponse.Success"));<NEW_LINE>listMediasWithPublicResponse.setCode(context.stringValue("ListMediasWithPublicResponse.Code"));<NEW_LINE>listMediasWithPublicResponse.setMessage(context.stringValue("ListMediasWithPublicResponse.Message"));<NEW_LINE>listMediasWithPublicResponse.setHttpStatusCode(context.integerValue("ListMediasWithPublicResponse.HttpStatusCode"));<NEW_LINE>Medias medias = new Medias();<NEW_LINE>medias.setTotalCount(context.integerValue("ListMediasWithPublicResponse.Medias.TotalCount"));<NEW_LINE>medias.setPageNumber(context.integerValue("ListMediasWithPublicResponse.Medias.PageNumber"));<NEW_LINE>medias.setPageSize(context.integerValue("ListMediasWithPublicResponse.Medias.PageSize"));<NEW_LINE>List<Media> list <MASK><NEW_LINE>for (int i = 0; i < context.lengthValue("ListMediasWithPublicResponse.Medias.List.Length"); i++) {<NEW_LINE>Media media = new Media();<NEW_LINE>media.setInstance(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Instance"));<NEW_LINE>media.setName(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Name"));<NEW_LINE>media.setDescription(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Description"));<NEW_LINE>media.setType(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Type"));<NEW_LINE>media.setContent(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Content"));<NEW_LINE>media.setFilePath(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].FilePath"));<NEW_LINE>media.setFileName(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].FileName"));<NEW_LINE>media.setOssFileName(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].OssFileName"));<NEW_LINE>media.setScope(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Scope"));<NEW_LINE>media.setStatus(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Status"));<NEW_LINE>list.add(media);<NEW_LINE>}<NEW_LINE>medias.setList(list);<NEW_LINE>listMediasWithPublicResponse.setMedias(medias);<NEW_LINE>List<PublicMedia> publicMedias = new ArrayList<PublicMedia>();<NEW_LINE>for (int i = 0; i < context.lengthValue("ListMediasWithPublicResponse.PublicMedias.Length"); i++) {<NEW_LINE>PublicMedia publicMedia = new PublicMedia();<NEW_LINE>publicMedia.setId(context.longValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Id"));<NEW_LINE>publicMedia.setInstance(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Instance"));<NEW_LINE>publicMedia.setName(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Name"));<NEW_LINE>publicMedia.setDescription(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Description"));<NEW_LINE>publicMedia.setType(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Type"));<NEW_LINE>publicMedia.setContent(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Content"));<NEW_LINE>publicMedia.setFilePath(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].FilePath"));<NEW_LINE>publicMedia.setFileName(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].FileName"));<NEW_LINE>publicMedia.setOssFileName(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].OssFileName"));<NEW_LINE>publicMedia.setScope(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Scope"));<NEW_LINE>publicMedia.setStatus(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Status"));<NEW_LINE>publicMedias.add(publicMedia);<NEW_LINE>}<NEW_LINE>listMediasWithPublicResponse.setPublicMedias(publicMedias);<NEW_LINE>return listMediasWithPublicResponse;<NEW_LINE>}
= new ArrayList<Media>();
1,623,816
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<TagResourceRequest> request = null;<NEW_LINE>Response<TagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));<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 Contacts");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<TagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller());<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.ADVANCED_CONFIG, advancedConfig);
241,337
// DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static void addClassFilter(com.sun.jdi.request.MonitorWaitRequest a, com.sun.jdi.ReferenceType b) 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.request.MonitorWaitRequest", "addClassFilter", "JDI CALL: com.sun.jdi.request.MonitorWaitRequest({0}).addClassFilter({1})", new Object[] { a, b });<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>a.addClassFilter(b);<NEW_LINE>} catch (com.sun.jdi.InternalException ex) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.report(ex);<NEW_LINE>throw new org.netbeans.modules.debugger.<MASK><NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException 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>throw new org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper(ex);<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.request.MonitorWaitRequest", "addClassFilter", org.netbeans.modules.debugger.jpda.JDIExceptionReporter.RET_VOID);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
jpda.jdi.InternalExceptionWrapper(ex);
724,840
private void initAccessibility() {<NEW_LINE>this.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(TransformPanel.class, "ACSD_TransformPanel"));<NEW_LINE>overwriteCheckBox.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(TransformPanel.class, "ACSD_overwriteCheckBox"));<NEW_LINE>outputComboBox.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(TransformPanel.class, "ACSD_outputComboBox"));<NEW_LINE>inputComboBox.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(TransformPanel.class, "ACSD_inputComboBox"));<NEW_LINE>browseXSLTButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(TransformPanel.class, "ACSD_browseXSLTButton"));<NEW_LINE>showComboBox.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(TransformPanel.class, "ACSD_showComboBox"));<NEW_LINE>browseInputButton.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage<MASK><NEW_LINE>transformComboBox.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(TransformPanel.class, "ACSD_transformComboBox"));<NEW_LINE>}
(TransformPanel.class, "ACSD_browseInputButton"));
497,796
public boolean onCreateOptionsMenu(Menu menu) {<NEW_LINE>getMenuInflater().inflate(R.menu.crop_image_menu, menu);<NEW_LINE>if (!mOptions.allowRotation) {<NEW_LINE>menu.removeItem(R.id.crop_image_menu_rotate_left);<NEW_LINE>menu.removeItem(R.id.crop_image_menu_rotate_right);<NEW_LINE>} else if (mOptions.allowCounterRotation) {<NEW_LINE>menu.findItem(R.id<MASK><NEW_LINE>}<NEW_LINE>if (!mOptions.allowFlipping) {<NEW_LINE>menu.removeItem(R.id.crop_image_menu_flip);<NEW_LINE>}<NEW_LINE>if (mOptions.cropMenuCropButtonTitle != null) {<NEW_LINE>menu.findItem(R.id.crop_image_menu_crop).setTitle(mOptions.cropMenuCropButtonTitle);<NEW_LINE>}<NEW_LINE>Drawable cropIcon = null;<NEW_LINE>try {<NEW_LINE>if (mOptions.cropMenuCropButtonIcon != 0) {<NEW_LINE>cropIcon = ContextCompat.getDrawable(this, mOptions.cropMenuCropButtonIcon);<NEW_LINE>menu.findItem(R.id.crop_image_menu_crop).setIcon(cropIcon);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>Log.w("AIC", "Failed to read menu crop drawable", e);<NEW_LINE>}<NEW_LINE>if (mOptions.activityMenuIconColor != 0) {<NEW_LINE>updateMenuItemIconColor(menu, R.id.crop_image_menu_rotate_left, mOptions.activityMenuIconColor);<NEW_LINE>updateMenuItemIconColor(menu, R.id.crop_image_menu_rotate_right, mOptions.activityMenuIconColor);<NEW_LINE>updateMenuItemIconColor(menu, R.id.crop_image_menu_flip, mOptions.activityMenuIconColor);<NEW_LINE>if (cropIcon != null) {<NEW_LINE>updateMenuItemIconColor(menu, R.id.crop_image_menu_crop, mOptions.activityMenuIconColor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
.crop_image_menu_rotate_left).setVisible(true);
1,771,998
public void rip() throws IOException {<NEW_LINE>int page = 0;<NEW_LINE>String baseURL = "https://vine.co/api/timelines/users/" + getGID(this.url);<NEW_LINE>JSONObject json = null;<NEW_LINE>while (true) {<NEW_LINE>page++;<NEW_LINE>String theURL = baseURL;<NEW_LINE>if (page > 1) {<NEW_LINE>theURL += "?page=" + page;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>sendUpdate(STATUS.LOADING_RESOURCE, theURL);<NEW_LINE>json = Http.url(theURL).getJSON();<NEW_LINE>} catch (HttpStatusException e) {<NEW_LINE>logger.debug("Hit end of pages at page " + page, e);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>JSONArray records = json.getJSONObject("data").getJSONArray("records");<NEW_LINE>for (int i = 0; i < records.length(); i++) {<NEW_LINE>String videoURL = records.getJSONObject(i).getString("videoUrl");<NEW_LINE>addURLToDownload(new URL(videoURL));<NEW_LINE>if (isThisATest()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (isThisATest()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (records.length() == 0) {<NEW_LINE>logger.info("Zero records returned");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Thread.sleep(2000);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>logger.error("[!] Interrupted while waiting to load next page", e);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>waitForThreads();<NEW_LINE>}
logger.info(" Retrieving " + theURL);
1,644,073
private void drawBackground(Canvas canvas) {<NEW_LINE>RectF rect = mCropWindowHandler.getRect();<NEW_LINE>float left = Math.max(BitmapUtils.getRectLeft(mBoundsPoints), 0);<NEW_LINE>float top = Math.max(BitmapUtils.getRectTop(mBoundsPoints), 0);<NEW_LINE>float right = Math.min(BitmapUtils.getRectRight(mBoundsPoints), getWidth());<NEW_LINE>float bottom = Math.min(BitmapUtils.getRectBottom(mBoundsPoints), getHeight());<NEW_LINE>if (mCropShape == CropImageView.CropShape.RECTANGLE) {<NEW_LINE>if (!isNonStraightAngleRotated() || Build.VERSION.SDK_INT <= 17) {<NEW_LINE>canvas.drawRect(left, top, right, rect.top, mBackgroundPaint);<NEW_LINE>canvas.drawRect(left, rect.bottom, right, bottom, mBackgroundPaint);<NEW_LINE>canvas.drawRect(left, rect.top, rect.left, rect.bottom, mBackgroundPaint);<NEW_LINE>canvas.drawRect(rect.right, rect.top, right, rect.bottom, mBackgroundPaint);<NEW_LINE>} else {<NEW_LINE>mPath.reset();<NEW_LINE>mPath.moveTo(mBoundsPoints[0], mBoundsPoints[1]);<NEW_LINE>mPath.lineTo(mBoundsPoints[2], mBoundsPoints[3]);<NEW_LINE>mPath.lineTo(mBoundsPoints[4], mBoundsPoints[5]);<NEW_LINE>mPath.lineTo(mBoundsPoints[<MASK><NEW_LINE>mPath.close();<NEW_LINE>canvas.save();<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {<NEW_LINE>canvas.clipOutPath(mPath);<NEW_LINE>} else {<NEW_LINE>canvas.clipPath(mPath, Region.Op.INTERSECT);<NEW_LINE>}<NEW_LINE>canvas.clipRect(rect, Region.Op.XOR);<NEW_LINE>canvas.drawRect(left, top, right, bottom, mBackgroundPaint);<NEW_LINE>canvas.restore();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>mPath.reset();<NEW_LINE>if (Build.VERSION.SDK_INT <= 17 && mCropShape == CropImageView.CropShape.OVAL) {<NEW_LINE>mDrawRect.set(rect.left + 2, rect.top + 2, rect.right - 2, rect.bottom - 2);<NEW_LINE>} else {<NEW_LINE>mDrawRect.set(rect.left, rect.top, rect.right, rect.bottom);<NEW_LINE>}<NEW_LINE>mPath.addOval(mDrawRect, Path.Direction.CW);<NEW_LINE>canvas.save();<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {<NEW_LINE>canvas.clipOutPath(mPath);<NEW_LINE>} else {<NEW_LINE>canvas.clipPath(mPath, Region.Op.XOR);<NEW_LINE>}<NEW_LINE>canvas.drawRect(left, top, right, bottom, mBackgroundPaint);<NEW_LINE>canvas.restore();<NEW_LINE>}<NEW_LINE>}
6], mBoundsPoints[7]);
1,839,843
public void saveAs(FileObject folder, String fileName) throws IOException {<NEW_LINE>String fn = FileUtil.getFileDisplayName(folder) + File.separator + fileName;<NEW_LINE>File existingFile = FileUtil.normalizeFile(new File(fn));<NEW_LINE>if (existingFile.exists()) {<NEW_LINE>NotifyDescriptor confirm = new NotifyDescriptor.Confirmation(NbBundle.getMessage(SQLEditorSupport.class, "MSG_ConfirmReplace", fileName), NbBundle.getMessage(SQLEditorSupport.class, "MSG_ConfirmReplaceFileTitle"), NotifyDescriptor.YES_NO_OPTION);<NEW_LINE>DialogDisplayer.getDefault().notify(confirm);<NEW_LINE>if (!confirm.getValue().equals(NotifyDescriptor.YES_OPTION)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (isConsole()) {<NEW_LINE>// #166370 - if console, need to save document before copying<NEW_LINE>saveDocument();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
super.saveAs(folder, fileName);
506,269
private boolean initBulkprocessIfNeed() {<NEW_LINE>try {<NEW_LINE>if (bulkProcessor == null) {<NEW_LINE>EsCallbackListener esListener = new EsCallbackListener(context);<NEW_LINE>BiConsumer<BulkRequest, ActionListener<BulkResponse>> consumer = (request, bulkListener) -> esClient.bulkAsync(request, RequestOptions.DEFAULT, bulkListener);<NEW_LINE>BulkProcessor bulkProcessor = BulkProcessor.builder(consumer, esListener).setBulkActions(context.getBulkAction()).setBulkSize(new ByteSizeValue(context.getBulkSizeMb(), ByteSizeUnit.MB)).setFlushInterval(TimeValue.timeValueSeconds(context.getFlushInterval())).setConcurrentRequests(context.getConcurrentRequests()).build();<NEW_LINE>this.bulkProcessor = bulkProcessor;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE><MASK><NEW_LINE>esClient = null;<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
LOG.error("init esclient failed", e);
446,629
public SuppressedDestination unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SuppressedDestination suppressedDestination = new SuppressedDestination();<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("EmailAddress", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>suppressedDestination.setEmailAddress(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Reason", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>suppressedDestination.setReason(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("LastUpdateTime", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>suppressedDestination.setLastUpdateTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Attributes", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>suppressedDestination.setAttributes(SuppressedDestinationAttributesJsonUnmarshaller.getInstance<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 suppressedDestination;<NEW_LINE>}
().unmarshall(context));
559,395
public String toGss() throws UnableToCompleteException {<NEW_LINE>try {<NEW_LINE>CssStylesheet sheet = <MASK><NEW_LINE>DefCollectorVisitor defCollectorVisitor = new DefCollectorVisitor(lenient, treeLogger);<NEW_LINE>defCollectorVisitor.accept(sheet);<NEW_LINE>defNameMapping = defCollectorVisitor.getDefMapping();<NEW_LINE>addScopeDefs(scopeFiles, defNameMapping);<NEW_LINE>new UndefinedConstantVisitor(new HashSet<String>(defNameMapping.values()), lenient, treeLogger).accept(sheet);<NEW_LINE>new ElseNodeCreator().accept(sheet);<NEW_LINE>new AlternateAnnotationCreatorVisitor().accept(sheet);<NEW_LINE>GssGenerationVisitor gssGenerationVisitor = new GssGenerationVisitor(new DefaultTextOutput(false), defNameMapping, lenient, treeLogger, simpleBooleanConditionPredicate);<NEW_LINE>gssGenerationVisitor.accept(sheet);<NEW_LINE>return gssGenerationVisitor.getContent();<NEW_LINE>} finally {<NEW_LINE>if (printWriter != null) {<NEW_LINE>printWriter.flush();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
GenerateCssAst.exec(treeLogger, cssFile);
432,166
public Request<GetEffectivePoliciesRequest> marshall(GetEffectivePoliciesRequest getEffectivePoliciesRequest) {<NEW_LINE>if (getEffectivePoliciesRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(GetEffectivePoliciesRequest)");<NEW_LINE>}<NEW_LINE>Request<GetEffectivePoliciesRequest> request = new DefaultRequest<GetEffectivePoliciesRequest>(getEffectivePoliciesRequest, "AWSIot");<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/effective-policies";<NEW_LINE>if (getEffectivePoliciesRequest.getThingName() != null) {<NEW_LINE>request.addParameter("thingName", StringUtils.fromString(getEffectivePoliciesRequest.getThingName()));<NEW_LINE>}<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 (getEffectivePoliciesRequest.getPrincipal() != null) {<NEW_LINE>String principal = getEffectivePoliciesRequest.getPrincipal();<NEW_LINE>jsonWriter.name("principal");<NEW_LINE>jsonWriter.value(principal);<NEW_LINE>}<NEW_LINE>if (getEffectivePoliciesRequest.getCognitoIdentityPoolId() != null) {<NEW_LINE><MASK><NEW_LINE>jsonWriter.name("cognitoIdentityPoolId");<NEW_LINE>jsonWriter.value(cognitoIdentityPoolId);<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.0");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
String cognitoIdentityPoolId = getEffectivePoliciesRequest.getCognitoIdentityPoolId();
1,057,161
private void readBadges(String url, Map<String, Map<String, Badge>> badgeMap) {<NEW_LINE>try {<NEW_LINE>JSONObject globalBadgeSets = new JSONObject(Service.urlToJSONString(url)).getJSONObject("badge_sets");<NEW_LINE>for (Iterator<String> it = globalBadgeSets.keys(); it.hasNext(); ) {<NEW_LINE>String badgeSet = it.next();<NEW_LINE>Map<String, Badge> <MASK><NEW_LINE>badgeMap.put(badgeSet, versionMap);<NEW_LINE>JSONObject versions = globalBadgeSets.getJSONObject(badgeSet).getJSONObject("versions");<NEW_LINE>for (Iterator<String> iter = versions.keys(); iter.hasNext(); ) {<NEW_LINE>String version = iter.next();<NEW_LINE>JSONObject versionObject = versions.getJSONObject(version);<NEW_LINE>SparseArray<String> urls = new SparseArray<>();<NEW_LINE>urls.put(1, versionObject.getString("image_url_1x"));<NEW_LINE>urls.put(2, versionObject.getString("image_url_2x"));<NEW_LINE>urls.put(4, versionObject.getString("image_url_4x"));<NEW_LINE>versionMap.put(version, new Badge(badgeSet, urls));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (JSONException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}
versionMap = new HashMap<>();
1,240,694
public boolean saveOrUpdateBatch(Collection<T> entityList, int batchSize) {<NEW_LINE>TableInfo tableInfo = TableInfoHelper.getTableInfo(entityClass);<NEW_LINE>Assert.notNull(tableInfo, "error: can not execute. because can not find cache of TableInfo for entity!");<NEW_LINE>String keyProperty = tableInfo.getKeyProperty();<NEW_LINE>Assert.notEmpty(keyProperty, "error: can not execute. because can not find column for id from entity!");<NEW_LINE>return SqlHelper.saveOrUpdateBatch(this.entityClass, this.mapperClass, this.log, entityList, batchSize, (sqlSession, entity) -> {<NEW_LINE>Object idVal = tableInfo.getPropertyValue(entity, keyProperty);<NEW_LINE>return StringUtils.checkValNull(idVal) || CollectionUtils.isEmpty(sqlSession.selectList(getSqlStatement(SqlMethod.SELECT_BY_ID), entity));<NEW_LINE>}, (sqlSession, entity) -> {<NEW_LINE>MapperMethod.ParamMap<T> param = new MapperMethod.ParamMap<>();<NEW_LINE>param.put(Constants.ENTITY, entity);<NEW_LINE>sqlSession.update(getSqlStatement<MASK><NEW_LINE>});<NEW_LINE>}
(SqlMethod.UPDATE_BY_ID), param);
1,378,287
public boolean updateLibrary(final LibraryImplementation oldLibrary, final LibraryImplementation newLibrary) throws IOException {<NEW_LINE>final Libs data = this.initStorage(false);<NEW_LINE>assert this.storage != null : "Storage is not initialized";<NEW_LINE>final String path = data.findPath(oldLibrary);<NEW_LINE>if (path != null) {<NEW_LINE>final FileObject fo = this.storage.getFileSystem().findResource(path);<NEW_LINE>if (fo != null) {<NEW_LINE>String libraryType = newLibrary.getType();<NEW_LINE>final LibraryTypeProvider <MASK><NEW_LINE>if (libraryTypeProvider == null) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.warning("LibrariesStorageL Cannot store library, the library type is not recognized by any of installed LibraryTypeProviders.");<NEW_LINE>} else {<NEW_LINE>this.storage.getFileSystem().runAtomicAction(new FileSystem.AtomicAction() {<NEW_LINE><NEW_LINE>public void run() throws IOException {<NEW_LINE>LibraryDeclarationParser.writeLibraryDefinition(fo, newLibrary, libraryTypeProvider);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
libraryTypeProvider = ltRegistry.getLibraryTypeProvider(libraryType);
1,379,738
public String loginUser(String username, String password) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'username' is set<NEW_LINE>if (username == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'password' is set<NEW_LINE>if (password == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/user/login".replaceAll("\\{format\\}", "json");<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams <MASK><NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));<NEW_LINE>final String[] localVarAccepts = { "application/xml", "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>GenericType<String> localVarReturnType = new GenericType<String>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
= new ArrayList<Pair>();
682,152
public void run(RegressionEnvironment env) {<NEW_LINE>env.advanceTime(0);<NEW_LINE>String[] fields = "theString,longPrimitive,intPrimitive,thesum".split(",");<NEW_LINE>String epl = "@name('s0') select theString, longPrimitive, intPrimitive, sum(intPrimitive) as thesum from SupportBean#keepall " + "group by theString, longPrimitive output all every 1 seconds";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>sendBeanEvent(env, "A", 0, 10);<NEW_LINE>sendBeanEvent(env, "B", 1, 11);<NEW_LINE>env.milestone(0);<NEW_LINE>sendBeanEvent(env, "A", 0, 12);<NEW_LINE>sendBeanEvent(<MASK><NEW_LINE>env.advanceTime(1000);<NEW_LINE>env.assertListener("s0", listener -> EPAssertionUtil.assertPropsPerRowAnyOrder(listener.getAndResetLastNewData(), fields, new Object[][] { { "A", 0L, 10, 10 }, { "B", 1L, 11, 11 }, { "A", 0L, 12, 22 }, { "C", 0L, 13, 13 } }));<NEW_LINE>sendBeanEvent(env, "A", 0, 14);<NEW_LINE>env.advanceTime(2000);<NEW_LINE>env.assertListener("s0", listener -> EPAssertionUtil.assertPropsPerRowAnyOrder(listener.getAndResetLastNewData(), fields, new Object[][] { { "A", 0L, 14, 36 }, { "B", 1L, 11, 11 }, { "C", 0L, 13, 13 } }));<NEW_LINE>env.undeployAll();<NEW_LINE>}
env, "C", 0, 13);
303,981
public static void main(String[] args) {<NEW_LINE>String imagePath;<NEW_LINE>imagePath = "eye01.jpg";<NEW_LINE>// imagePath = "small_sunflower.jpg";<NEW_LINE>BufferedImage buffered = UtilImageIO.loadImageNotNull(UtilIO.pathExample(imagePath));<NEW_LINE>var gui = new ListDisplayPanel();<NEW_LINE>gui.addImage(buffered, "Original");<NEW_LINE>// For sake of simplicity assume it's a gray scale image. Interpolation functions exist for planar and<NEW_LINE>// interleaved color images too<NEW_LINE>GrayF32 input = ConvertBufferedImage.convertFrom(buffered, (GrayF32) null);<NEW_LINE>GrayF32 scaled = input.createNew(500, 500 * input.height / input.width);<NEW_LINE>for (InterpolationType type : InterpolationType.values()) {<NEW_LINE>// Create the single band (gray scale) interpolation function for the input image<NEW_LINE>InterpolatePixelS<GrayF32> interp = FactoryInterpolation.createPixelS(0, 255, type, BorderType.EXTENDED, input.getDataType());<NEW_LINE>// Tell it which image is being interpolated<NEW_LINE>interp.setImage(input);<NEW_LINE>// Manually apply scaling to the input image. See FDistort() for a built in function which does<NEW_LINE>// the same thing and is slightly more efficient<NEW_LINE>for (int y = 0; y < scaled.height; y++) {<NEW_LINE>// iterate using the 1D index for added performance. Altertively there is the set(x,y) operator<NEW_LINE>int indexScaled = scaled.startIndex + y * scaled.stride;<NEW_LINE>float origY = y * input.height / (float) scaled.height;<NEW_LINE>for (int x = 0; x < scaled.width; x++) {<NEW_LINE>float origX = x * input.<MASK><NEW_LINE>scaled.data[indexScaled++] = interp.get(origX, origY);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Add the results to the output<NEW_LINE>BufferedImage out = ConvertBufferedImage.convertTo(scaled, null, true);<NEW_LINE>gui.addImage(out, type.toString());<NEW_LINE>}<NEW_LINE>ShowImages.showWindow(gui, "Example Interpolation", true);<NEW_LINE>}
width / (float) scaled.width;
1,133,377
public void insert(Object key, CacheObject value) {<NEW_LINE>boolean forceInMemory = false;<NEW_LINE>// for (Object cred : value.getSubject().getPrivateCredentials()) {<NEW_LINE>// if ("ClassNameHere".equals(cred.getClass().getSimpleName())) {<NEW_LINE>// forceInMemory = true;<NEW_LINE>// break;<NEW_LINE>// }<NEW_LINE>// }<NEW_LINE>if (!forceInMemory) {<NEW_LINE>try {<NEW_LINE>Cache<Object, Object> jCache = getJCache();<NEW_LINE>if (jCache != null) {<NEW_LINE>jCache.put(key, value);<NEW_LINE>}<NEW_LINE>} catch (SerializationException e) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Failed to insert value for key " + key + " into JCache due to SerializationException. Inserting into in-memory cache instead.", e);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Refused to insert value for key " + key + " into JCache due to known limitation. Inserting into in-memory cache instead.");<NEW_LINE>}<NEW_LINE>inMemoryCache.insert(key, value);<NEW_LINE>}<NEW_LINE>}
inMemoryCache.insert(key, value);
257,725
private void checkRange(Address start, long size) throws MemoryConflictException, AddressOverflowException {<NEW_LINE>AddressSpace space = start.getAddressSpace();<NEW_LINE>if (!space.isMemorySpace()) {<NEW_LINE>throw new IllegalArgumentException("Invalid memory address for block: " + start.toString(true));<NEW_LINE>}<NEW_LINE>AddressSpace mySpace = addrMap.getAddressFactory().getAddressSpace(space.getName());<NEW_LINE>if (mySpace == null || !mySpace.equals(space)) {<NEW_LINE>throw new IllegalArgumentException("Block may not be created with unrecognized address space");<NEW_LINE>}<NEW_LINE>if (space.isOverlaySpace()) {<NEW_LINE>throw new IllegalArgumentException("Block may not be created with an Overlay space");<NEW_LINE>}<NEW_LINE>if (size == 0) {<NEW_LINE>throw new IllegalArgumentException("Block must have a non-zero length");<NEW_LINE>}<NEW_LINE>Address end = start.addNoWrap(size - 1);<NEW_LINE>if (space == program.getAddressFactory().getDefaultAddressSpace()) {<NEW_LINE><MASK><NEW_LINE>if (start.compareTo(imageBase) < 0 && end.compareTo(imageBase) >= 0) {<NEW_LINE>throw new MemoryConflictException("Block may not span image base address (" + imageBase + ")");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (allAddrSet.intersects(start, end)) {<NEW_LINE>throw new MemoryConflictException("Part of range (" + start + ", " + end + ") already exists in memory.");<NEW_LINE>}<NEW_LINE>}
Address imageBase = addrMap.getImageBase();
853,079
private CodegenExpression makeInstrumentationProvider(CodegenMethod method, CodegenClassScope classScope) {<NEW_LINE>if (!instrumented) {<NEW_LINE>return constantNull();<NEW_LINE>}<NEW_LINE>CodegenExpressionNewAnonymousClass anonymousClass = newAnonymousClass(method.getBlock(), InstrumentationCommon.EPTYPE);<NEW_LINE>CodegenMethod activated = CodegenMethod.makeParentNode(EPTypePremade.BOOLEANPRIMITIVE.getEPType(), this.getClass(), classScope);<NEW_LINE>anonymousClass.addMethod("activated", activated);<NEW_LINE>activated.getBlock().methodReturn(constantTrue());<NEW_LINE>for (Method forwarded : InstrumentationCommon.class.getMethods()) {<NEW_LINE>if (forwarded.getDeclaringClass() == Object.class) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (forwarded.getName().equals("activated")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>List<CodegenNamedParam> params = new ArrayList<>();<NEW_LINE>CodegenExpression[] expressions = new CodegenExpression[forwarded.getParameterCount()];<NEW_LINE>int num = 0;<NEW_LINE>for (Parameter param : forwarded.getParameters()) {<NEW_LINE>EPTypeClass paramType = ClassHelperGenericType.getParameterType(param);<NEW_LINE>params.add(new CodegenNamedParam(paramType, param.getName()));<NEW_LINE>expressions[num] = ref(param.getName());<NEW_LINE>num++;<NEW_LINE>}<NEW_LINE>CodegenMethod m = CodegenMethod.makeParentNode(EPTypePremade.VOID.getEPType(), this.getClass()<MASK><NEW_LINE>anonymousClass.addMethod(forwarded.getName(), m);<NEW_LINE>m.getBlock().apply(InstrumentationCode.instblock(classScope, forwarded.getName(), expressions));<NEW_LINE>}<NEW_LINE>return anonymousClass;<NEW_LINE>}
, classScope).addParam(params);
113,281
private boolean validateNameAndPath(@Nonnull NewModuleWizardContext context) throws WizardStepValidationException {<NEW_LINE>final String name = myNamePathComponent.getNameValue();<NEW_LINE>if (name.length() == 0) {<NEW_LINE>final ApplicationInfo info = ApplicationInfo.getInstance();<NEW_LINE>throw new WizardStepValidationException(IdeBundle.message("prompt.new.project.file.name", info.getVersionName(), context.getTargetId()));<NEW_LINE>}<NEW_LINE>final String projectFileDirectory = myNamePathComponent.getPath();<NEW_LINE>if (projectFileDirectory.length() == 0) {<NEW_LINE>throw new WizardStepValidationException(IdeBundle.message("prompt.enter.project.file.location", context.getTargetId()));<NEW_LINE>}<NEW_LINE>final boolean shouldPromptCreation = myNamePathComponent.isPathChangedByUser();<NEW_LINE>if (!ProjectWizardUtil.createDirectoryIfNotExists(IdeBundle.message("directory.project.file.directory", context.getTargetId()), projectFileDirectory, shouldPromptCreation)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final File file = new File(projectFileDirectory);<NEW_LINE>if (file.exists() && !file.canWrite()) {<NEW_LINE>throw new WizardStepValidationException(String.format("Directory '%s' is not writable!\nPlease choose another project location.", projectFileDirectory));<NEW_LINE>}<NEW_LINE>boolean shouldContinue = true;<NEW_LINE>final File projectDir = new File(myNamePathComponent.getPath(), Project.DIRECTORY_STORE_FOLDER);<NEW_LINE>if (projectDir.exists()) {<NEW_LINE>int answer = Messages.showYesNoDialog(IdeBundle.message("prompt.overwrite.project.folder", projectDir.getAbsolutePath(), context.getTargetId()), IdeBundle.message("title.file.already.exists"), Messages.getQuestionIcon());<NEW_LINE>shouldContinue <MASK><NEW_LINE>}<NEW_LINE>return shouldContinue;<NEW_LINE>}
= (answer == Messages.YES);