idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,448,471
public static JSONObject printTransactionToJSON(Transaction transaction, boolean selfType) {<NEW_LINE>JSONObject jsonTransaction = JSONObject.parseObject(JsonFormat.printToString(transaction, selfType));<NEW_LINE>JSONArray contracts = new JSONArray();<NEW_LINE>transaction.getRawData().getContractList().stream().forEach(contract -> {<NEW_LINE>try {<NEW_LINE>JSONObject contractJson = null;<NEW_LINE>Any contractParameter = contract.getParameter();<NEW_LINE>switch(contract.getType()) {<NEW_LINE>case CreateSmartContract:<NEW_LINE>CreateSmartContract deployContract = contractParameter.unpack(CreateSmartContract.class);<NEW_LINE>contractJson = JSONObject.parseObject(JsonFormat.printToString(deployContract, selfType));<NEW_LINE>byte[] ownerAddress = deployContract.getOwnerAddress().toByteArray();<NEW_LINE>byte[] contractAddress = generateContractAddress(transaction, ownerAddress);<NEW_LINE>jsonTransaction.put("contract_address", ByteArray.toHexString(contractAddress));<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>Class clazz = TransactionFactory.getContract(contract.getType());<NEW_LINE>if (clazz != null) {<NEW_LINE>contractJson = JSONObject.parseObject(JsonFormat.printToString(contractParameter.unpack(clazz), selfType));<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>JSONObject parameter = new JSONObject();<NEW_LINE>parameter.put(VALUE, contractJson);<NEW_LINE>parameter.put("type_url", contract.getParameterOrBuilder().getTypeUrl());<NEW_LINE>JSONObject jsonContract = new JSONObject();<NEW_LINE>jsonContract.put(PARAMETER, parameter);<NEW_LINE>jsonContract.put("type", contract.getType());<NEW_LINE>if (contract.getPermissionId() > 0) {<NEW_LINE>jsonContract.put(PERMISSION_ID, contract.getPermissionId());<NEW_LINE>}<NEW_LINE>contracts.add(jsonContract);<NEW_LINE>} catch (InvalidProtocolBufferException e) {<NEW_LINE>logger.debug("InvalidProtocolBufferException: {}", e.getMessage());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>JSONObject rawData = JSONObject.parseObject(jsonTransaction.get("raw_data").toString());<NEW_LINE>rawData.put("contract", contracts);<NEW_LINE>jsonTransaction.put("raw_data", rawData);<NEW_LINE>String rawDataHex = ByteArray.toHexString(transaction.getRawData().toByteArray());<NEW_LINE>jsonTransaction.put("raw_data_hex", rawDataHex);<NEW_LINE>String txID = ByteArray.toHexString(Sha256Hash.hash(CommonParameter.getInstance().isECKeyCryptoEngine(), transaction.getRawData().toByteArray()));<NEW_LINE><MASK><NEW_LINE>return jsonTransaction;<NEW_LINE>}
jsonTransaction.put("txID", txID);
579,366
public static HttpCompliance from(String spec) {<NEW_LINE>Set<Violation> sections;<NEW_LINE>String[] elements = spec.split("\\s*,\\s*");<NEW_LINE>switch(elements[0]) {<NEW_LINE>case "0":<NEW_LINE><MASK><NEW_LINE>break;<NEW_LINE>case "*":<NEW_LINE>sections = allOf(Violation.class);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>HttpCompliance mode = HttpCompliance.valueOf(elements[0]);<NEW_LINE>sections = (mode == null) ? noneOf(HttpCompliance.Violation.class) : copyOf(mode.getAllowed());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 1; i < elements.length; i++) {<NEW_LINE>String element = elements[i];<NEW_LINE>boolean exclude = element.startsWith("-");<NEW_LINE>if (exclude)<NEW_LINE>element = element.substring(1);<NEW_LINE>Violation section = Violation.valueOf(element);<NEW_LINE>if (exclude)<NEW_LINE>sections.remove(section);<NEW_LINE>else<NEW_LINE>sections.add(section);<NEW_LINE>}<NEW_LINE>return new HttpCompliance("CUSTOM" + __custom.getAndIncrement(), sections);<NEW_LINE>}
sections = noneOf(Violation.class);
1,313,507
public static void horizontal9(Kernel1D_S32 kernel, GrayU8 image, GrayI16 dest) {<NEW_LINE>final byte[] dataSrc = image.data;<NEW_LINE>final short[] dataDst = dest.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = kernel.data[3];<NEW_LINE>final int k5 = kernel.data[4];<NEW_LINE>final int k6 = kernel.data[5];<NEW_LINE>final int k7 = kernel.data[6];<NEW_LINE>final int k8 = kernel.data[7];<NEW_LINE>final int k9 = kernel.data[8];<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int width = image.getWidth();<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, image.height, i -> {<NEW_LINE>for (int i = 0; i < image.height; i++) {<NEW_LINE>int indexDst = dest.startIndex + i * dest.stride + radius;<NEW_LINE>int j = image.startIndex + i * image.stride - radius;<NEW_LINE>final int jEnd = j + width - radius;<NEW_LINE>for (j += radius; j < jEnd; j++) {<NEW_LINE>int indexSrc = j;<NEW_LINE>int total = (dataSrc[indexSrc++] & 0xFF) * k1;<NEW_LINE>total += (dataSrc[indexSrc++] & 0xFF) * k2;<NEW_LINE>total += (dataSrc[indexSrc++] & 0xFF) * k3;<NEW_LINE>total += (dataSrc[indexSrc++] & 0xFF) * k4;<NEW_LINE>total += (dataSrc[indexSrc++] & 0xFF) * k5;<NEW_LINE>total += (dataSrc[indexSrc++] & 0xFF) * k6;<NEW_LINE>total += (dataSrc[indexSrc++] & 0xFF) * k7;<NEW_LINE>total += (dataSrc[indexSrc++] & 0xFF) * k8;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k9;<NEW_LINE>dataDst[<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
indexDst++] = (short) total;
88,650
protected void visitRange(MemberReader memberReader, RolapLevel level, RolapMember lowerMember, RolapMember upperMember, boolean recurse) {<NEW_LINE>final List<RolapMember> list = new ArrayList<RolapMember>();<NEW_LINE>memberReader.getMemberRange(level, lowerMember, upperMember, list);<NEW_LINE>for (RolapMember member : list) {<NEW_LINE>visit(member);<NEW_LINE>}<NEW_LINE>if (recurse) {<NEW_LINE>list.clear();<NEW_LINE><MASK><NEW_LINE>if (list.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RolapMember lowerChild = list.get(0);<NEW_LINE>list.clear();<NEW_LINE>memberReader.getMemberChildren(upperMember, list);<NEW_LINE>if (list.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RolapMember upperChild = list.get(list.size() - 1);<NEW_LINE>visitRange(memberReader, level, lowerChild, upperChild, recurse);<NEW_LINE>}<NEW_LINE>}
memberReader.getMemberChildren(lowerMember, list);
572,306
private TaskDOExample convert(TaskQueryCondition condition) {<NEW_LINE>TaskDOExample example = new TaskDOExample();<NEW_LINE>Criteria criteria = example.createCriteria();<NEW_LINE>if (!StringUtils.isEmpty(condition.getTaskUuid())) {<NEW_LINE>criteria.andTaskUuidEqualTo(condition.getTaskUuid());<NEW_LINE>}<NEW_LINE>if (!StringUtils.isEmpty(condition.getSceneCode())) {<NEW_LINE>criteria.<MASK><NEW_LINE>}<NEW_LINE>if (!StringUtils.isEmpty(condition.getDetectorCode())) {<NEW_LINE>criteria.andDetectorCodeEqualTo(condition.getDetectorCode());<NEW_LINE>}<NEW_LINE>if (condition.getTaskType() != null) {<NEW_LINE>criteria.andTaskTypeEqualTo(condition.getTaskType().getValue());<NEW_LINE>}<NEW_LINE>if (condition.getTaskStatus() != null) {<NEW_LINE>criteria.andTaskStatusEqualTo(condition.getTaskStatus().getValue());<NEW_LINE>}<NEW_LINE>if (!StringUtils.isEmpty(condition.getInstanceCode())) {<NEW_LINE>criteria.andInstanceCodeEqualTo(condition.getInstanceCode());<NEW_LINE>}<NEW_LINE>if (condition.getStartTime() != null) {<NEW_LINE>criteria.andGmtCreateGreaterThan(condition.getStartTime());<NEW_LINE>}<NEW_LINE>if (condition.getEndTime() != null) {<NEW_LINE>criteria.andGmtCreateLessThan(condition.getEndTime());<NEW_LINE>}<NEW_LINE>return example;<NEW_LINE>}
andSceneCodeEqualTo(condition.getSceneCode());
264,166
public void updateText(NodeModel nodeModel) {<NEW_LINE>final NodeView nodeView = getNodeView();<NEW_LINE>if (nodeView == null)<NEW_LINE>return;<NEW_LINE>final ModeController modeController = nodeView.getMap().getModeController();<NEW_LINE>final TextController textController = TextController.getController(modeController);<NEW_LINE>isShortened = textController.isMinimized(nodeModel);<NEW_LINE>final Object userObject = nodeModel.getUserObject();<NEW_LINE>String text;<NEW_LINE>try {<NEW_LINE>final Object transformedContent = textController.getTransformedObject(nodeModel);<NEW_LINE>if (nodeView.isSelected()) {<NEW_LINE>nodeView.getMap().getModeController().getController().getViewController().addObjectTypeInfo(transformedContent);<NEW_LINE>}<NEW_LINE>Icon icon = textController.getIcon(transformedContent);<NEW_LINE>setTextRenderingIcon(icon);<NEW_LINE>text = icon == null ? transformedContent.toString() : "";<NEW_LINE>textModified = transformedContent instanceof HighlightedTransformedObject ? TextModificationState.HIGHLIGHT : TextModificationState.NONE;<NEW_LINE>} catch (Throwable e) {<NEW_LINE>LogUtils.<MASK><NEW_LINE>text = TextUtils.format("MainView.errorUpdateText", String.valueOf(userObject), e.getLocalizedMessage());<NEW_LINE>textModified = TextModificationState.FAILURE;<NEW_LINE>}<NEW_LINE>if (isShortened) {<NEW_LINE>text = textController.getShortText(text);<NEW_LINE>}<NEW_LINE>text = convertTextToHtmlLink(text, nodeModel);<NEW_LINE>updateText(text);<NEW_LINE>}
warn(e.getMessage());
748,636
public static void renderProgressPie(PoseStack ms, int x, int y, float progress, ItemStack stack) {<NEW_LINE>Minecraft mc = Minecraft.getInstance();<NEW_LINE>mc.getItemRenderer().renderAndDecorateItem(stack, x, y);<NEW_LINE>RenderSystem.clear(GL11.GL_DEPTH_BUFFER_BIT, true);<NEW_LINE>GL11.glEnable(GL11.GL_STENCIL_TEST);<NEW_LINE>RenderSystem.colorMask(false, false, false, false);<NEW_LINE>RenderSystem.depthMask(false);<NEW_LINE>RenderSystem.stencilFunc(GL11.GL_NEVER, 1, 0xFF);<NEW_LINE>RenderSystem.stencilOp(GL11.GL_REPLACE, GL11.GL_KEEP, GL11.GL_KEEP);<NEW_LINE>RenderSystem.stencilMask(0xFF);<NEW_LINE>mc.getItemRenderer().renderAndDecorateItem(stack, x, y);<NEW_LINE>int r = 10;<NEW_LINE>int centerX = x + 8;<NEW_LINE>int centerY = y + 8;<NEW_LINE>int degs = (int) (360 * progress);<NEW_LINE>float a = 0.5F + 0.2F * ((float) Math.cos((double) (ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) / 10) * 0.5F + 0.5F);<NEW_LINE>RenderSystem.disableTexture();<NEW_LINE>RenderSystem.enableBlend();<NEW_LINE>RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);<NEW_LINE>RenderSystem.colorMask(true, true, true, true);<NEW_LINE>RenderSystem.depthMask(true);<NEW_LINE>RenderSystem.stencilMask(0x00);<NEW_LINE>RenderSystem.stencilFunc(GL11.GL_EQUAL, 1, 0xFF);<NEW_LINE>Matrix4f mat = ms.last().pose();<NEW_LINE>BufferBuilder buf = Tesselator.getInstance().getBuilder();<NEW_LINE>RenderSystem.setShader(GameRenderer::getPositionColorShader);<NEW_LINE>buf.begin(VertexFormat.Mode.TRIANGLE_FAN, DefaultVertexFormat.POSITION_COLOR);<NEW_LINE>buf.vertex(mat, centerX, centerY, 0).color(0, 0.5F, 0.5F, a).endVertex();<NEW_LINE>for (int i = degs; i > 0; i--) {<NEW_LINE>float rad = (i - 90) / <MASK><NEW_LINE>buf.vertex(mat, centerX + Mth.cos(rad) * r, centerY + Mth.sin(rad) * r, 0).color(0F, 1F, 0.5F, a).endVertex();<NEW_LINE>}<NEW_LINE>buf.vertex(mat, centerX, centerY, 0).color(0F, 1F, 0.5F, a).endVertex();<NEW_LINE>Tesselator.getInstance().end();<NEW_LINE>RenderSystem.disableBlend();<NEW_LINE>RenderSystem.enableTexture();<NEW_LINE>GL11.glDisable(GL11.GL_STENCIL_TEST);<NEW_LINE>}
180F * (float) Math.PI;
472,333
private Mode findCloserMode(List<Mode> modes, float videoFramerate) {<NEW_LINE>HashMap<Integer, int[]> relatedRates;<NEW_LINE>relatedRates = getRateMapping();<NEW_LINE>int myRate = <MASK><NEW_LINE>if (myRate >= 2300 && myRate <= 2399) {<NEW_LINE>myRate = 2397;<NEW_LINE>}<NEW_LINE>if (relatedRates.containsKey(myRate)) {<NEW_LINE>HashMap<Integer, Mode> rateAndMode = new HashMap<>();<NEW_LINE>Iterator modeIterator = modes.iterator();<NEW_LINE>while (modeIterator.hasNext()) {<NEW_LINE>Mode mode = (Mode) modeIterator.next();<NEW_LINE>rateAndMode.put((int) (mode.getRefreshRate() * 100.0F), mode);<NEW_LINE>}<NEW_LINE>int[] rates = relatedRates.get(myRate);<NEW_LINE>int ratesLen = rates.length;<NEW_LINE>for (int i = 0; i < ratesLen; ++i) {<NEW_LINE>int newRate = rates[i];<NEW_LINE>if (rateAndMode.containsKey(newRate)) {<NEW_LINE>return rateAndMode.get(newRate);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
(int) (videoFramerate * 100.0F);
1,331,044
public Void call() {<NEW_LINE>File oldMinimalRebuildCacheFile = computeMinimalRebuildCacheFile(moduleName, permutationDescription);<NEW_LINE>File newMinimalRebuildCacheFile = new File(oldMinimalRebuildCacheFile.getAbsoluteFile() + ".new");<NEW_LINE>// Ensure the cache folder exists.<NEW_LINE>oldMinimalRebuildCacheFile.getParentFile().mkdirs();<NEW_LINE>// Write the new cache to disk.<NEW_LINE>ObjectOutputStream objectOutputStream = null;<NEW_LINE>try {<NEW_LINE>objectOutputStream = new ObjectOutputStream(new BufferedOutputStream<MASK><NEW_LINE>objectOutputStream.writeObject(minimalRebuildCache);<NEW_LINE>Utility.close(objectOutputStream);<NEW_LINE>// Replace the old cache file with the new one.<NEW_LINE>oldMinimalRebuildCacheFile.delete();<NEW_LINE>newMinimalRebuildCacheFile.renameTo(oldMinimalRebuildCacheFile);<NEW_LINE>} catch (IOException e) {<NEW_LINE>logger.log(TreeLogger.WARN, "Unable to update the cache in " + oldMinimalRebuildCacheFile + ".");<NEW_LINE>newMinimalRebuildCacheFile.delete();<NEW_LINE>} finally {<NEW_LINE>if (objectOutputStream != null) {<NEW_LINE>Utility.close(objectOutputStream);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
(new FileOutputStream(newMinimalRebuildCacheFile)));
1,472,301
long handlePendingConnection(long expectedState, Queue<ByteBuf> cachedFrames) {<NEW_LINE>CoreSubscriber<? super ByteBuf> lastActual = null;<NEW_LINE>for (; ; ) {<NEW_LINE>final CoreSubscriber<? super ByteBuf> nextActual = this.pendingActual;<NEW_LINE>if (nextActual != lastActual) {<NEW_LINE>for (final ByteBuf frame : cachedFrames) {<NEW_LINE>nextActual.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>expectedState = markConnected(this, expectedState);<NEW_LINE>if (isConnected(expectedState)) {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Side[{}]|Session[{}]. Connected at Position[{}] and ImpliedPosition[{}]", side, session, firstAvailableFramePosition, impliedPosition);<NEW_LINE>}<NEW_LINE>this.actual = nextActual;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (!hasPendingConnection(expectedState)) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>lastActual = nextActual;<NEW_LINE>}<NEW_LINE>return expectedState;<NEW_LINE>}
onNext(frame.retainedSlice());
1,159,507
public List<SDVariable> doDiff(List<SDVariable> f1) {<NEW_LINE>// Args at libnd4j level: in, gradAtOut, wD, wP, bias<NEW_LINE>// Args for SConv2d libnd4j: input, wD, wP, bias<NEW_LINE>List<SDVariable> inputs = new ArrayList<>();<NEW_LINE>inputs.add(arg(0));<NEW_LINE>inputs.add(f1.get(0));<NEW_LINE>SDVariable[] args = args();<NEW_LINE>for (int i = 1; i < args.length; i++) {<NEW_LINE>// Skip input, already added<NEW_LINE>inputs.add(args[i]);<NEW_LINE>}<NEW_LINE>SConv2DDerivative conv2DDerivative = SConv2DDerivative.sDerviativeBuilder().conv2DConfig(config).inputFunctions(inputs.toArray(new SDVariable[inputs.size()])).sameDiff(sameDiff).build();<NEW_LINE>List<SDVariable> ret = Arrays.<MASK><NEW_LINE>return ret;<NEW_LINE>}
asList(conv2DDerivative.outputVariables());
1,394,561
final CreatePartitionResult executeCreatePartition(CreatePartitionRequest createPartitionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPartitionRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreatePartitionRequest> request = null;<NEW_LINE>Response<CreatePartitionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreatePartitionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createPartitionRequest));<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, "CreatePartition");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreatePartitionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreatePartitionResultJsonUnmarshaller());<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();
1,834,818
public boolean isSupported(final Path workdir, final String filename) {<NEW_LINE>if (workdir.isRoot()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!this.validate(filename)) {<NEW_LINE>log.warn(String.format("Validation failed for target name %s", filename));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (workdir.attributes().getQuota() != -1) {<NEW_LINE>if (workdir.attributes().getQuota() <= workdir.attributes().getSize() + new HostPreferences(session.getHost()).getInteger("sds.upload.multipart.chunksize")) {<NEW_LINE>log.warn(String.format("Quota %d exceeded with %d in %s", workdir.attributes().getQuota(), workdir.attributes()<MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final SDSPermissionsFeature permissions = new SDSPermissionsFeature(session, nodeid);<NEW_LINE>return // For existing files the delete role is also required to overwrite<NEW_LINE>permissions.containsRole(workdir, SDSPermissionsFeature.CREATE_ROLE) && permissions.containsRole(workdir, SDSPermissionsFeature.DELETE_ROLE);<NEW_LINE>}
.getSize(), workdir));
626,433
final ListControlsResult executeListControls(ListControlsRequest listControlsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listControlsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListControlsRequest> request = null;<NEW_LINE>Response<ListControlsResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new ListControlsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listControlsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "AuditManager");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListControls");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListControlsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListControlsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
451,927
public static Object instantiateDefault(final Class inClass) throws Exception {<NEW_LINE>Object result = null;<NEW_LINE>final Class objectClass = primitiveClassToObjectClass(inClass);<NEW_LINE>if (Number.class.isAssignableFrom(objectClass)) {<NEW_LINE>result = instantiateFromString(objectClass, "0");<NEW_LINE>} else if (objectClass == Boolean.class) {<NEW_LINE>result = Boolean.TRUE;<NEW_LINE>} else if (objectClass == Character.class) {<NEW_LINE>result = 'X';<NEW_LINE>} else if (classIsArray(objectClass)) {<NEW_LINE>result = Array.newInstance(objectClass, 0);<NEW_LINE>} else if (objectClass == Object.class) {<NEW_LINE>result = "anyObject";<NEW_LINE>} else if (objectClass == String.class) {<NEW_LINE>result = "";<NEW_LINE>} else if (objectClass == java.net.URL.class) {<NEW_LINE>result = new <MASK><NEW_LINE>} else if (objectClass == java.net.URI.class) {<NEW_LINE>result = new java.net.URI("http://www.sun.com");<NEW_LINE>} else if (classIsArray(inClass)) {<NEW_LINE>final int dimensions = 3;<NEW_LINE>result = Array.newInstance(getInnerArrayElementClass(inClass), dimensions);<NEW_LINE>} else {<NEW_LINE>result = objectClass.newInstance();<NEW_LINE>}<NEW_LINE>return (result);<NEW_LINE>}
java.net.URL("http://www.sun.com");
1,798,371
public void onSubmit(Object task, PolicyTaskFuture<?> future, int invokeAnyCount) {<NEW_LINE>// notify listener: taskSubmitted<NEW_LINE>if (task instanceof ManagedTask) {<NEW_LINE>ManagedTaskListener listener = ((ManagedTask) task).getManagedTaskListener();<NEW_LINE>if (listener != null) {<NEW_LINE>ThreadContext tranContextRestorer = managedExecutor.suspendTransaction();<NEW_LINE>try {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())<NEW_LINE>Tr.event(this, tc, "taskSubmitted", managedExecutor, task);<NEW_LINE>listener.<MASK><NEW_LINE>} finally {<NEW_LINE>if (tranContextRestorer != null)<NEW_LINE>tranContextRestorer.taskStopping();<NEW_LINE>}<NEW_LINE>if (invokeAnyCount <= 1 && future.isCancelled())<NEW_LINE>if (invokeAnyCount == 1)<NEW_LINE>throw new RejectedExecutionException(Tr.formatMessage(tc, "CWWKC1112.all.tasks.canceled"));<NEW_LINE>else<NEW_LINE>throw new RejectedExecutionException(Tr.formatMessage(tc, "CWWKC1110.task.canceled", getName(task), managedExecutor.name));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
taskSubmitted(future, managedExecutor, task);
157,566
public static void down(GrayS16 input, GrayI16 output) {<NEW_LINE>int maxY = input.height - input.height % 2;<NEW_LINE>int maxX = input.width - input.width % 2;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, maxY, 2, y -> {<NEW_LINE>for (int y = 0; y < maxY; y += 2) {<NEW_LINE>int indexOut = output.startIndex + (y / 2) * output.stride;<NEW_LINE>int indexIn0 = input.startIndex + y * input.stride;<NEW_LINE>int indexIn1 = indexIn0 + input.stride;<NEW_LINE>for (int x = 0; x < maxX; x += 2) {<NEW_LINE>int total = input.data[indexIn0++];<NEW_LINE>total += input.data[indexIn0++];<NEW_LINE>total += input.data[indexIn1++];<NEW_LINE>total += input.data[indexIn1++];<NEW_LINE>output.data[indexOut++] = (short) ((total + 2) / 4);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>if (maxX != input.width) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, maxY, 2, y -> {<NEW_LINE>for (int y = 0; y < maxY; y += 2) {<NEW_LINE>int indexOut = output.startIndex + (y / 2) * output.stride + output.width - 1;<NEW_LINE>int indexIn0 = input.startIndex + y * input.stride + maxX;<NEW_LINE>int indexIn1 = indexIn0 + input.stride;<NEW_LINE>int total = input.data[indexIn0];<NEW_LINE>total += input.data[indexIn1];<NEW_LINE>output.data[indexOut] = (short) ((total + 1) / 2);<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}<NEW_LINE>if (maxY != input.height) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, maxX, 2, x -> {<NEW_LINE>for (int x = 0; x < maxX; x += 2) {<NEW_LINE>int indexOut = output.startIndex + (output.height - 1) * output.stride + x / 2;<NEW_LINE>int indexIn0 = input.startIndex + (input.height - 1) * input.stride + x;<NEW_LINE>int total = input.data[indexIn0++];<NEW_LINE>total <MASK><NEW_LINE>output.data[indexOut++] = (short) ((total + 1) / 2);<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}<NEW_LINE>if (maxX != input.width && maxY != input.height) {<NEW_LINE>int indexOut = output.startIndex + (output.height - 1) * output.stride + output.width - 1;<NEW_LINE>int indexIn = input.startIndex + (input.height - 1) * input.stride + input.width - 1;<NEW_LINE>output.data[indexOut] = input.data[indexIn];<NEW_LINE>}<NEW_LINE>}
+= input.data[indexIn0++];
850,134
public static ListOutboundOrderSKUTagsResponse unmarshall(ListOutboundOrderSKUTagsResponse listOutboundOrderSKUTagsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listOutboundOrderSKUTagsResponse.setRequestId(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.RequestId"));<NEW_LINE>listOutboundOrderSKUTagsResponse.setPageSize(_ctx.integerValue("ListOutboundOrderSKUTagsResponse.PageSize"));<NEW_LINE>listOutboundOrderSKUTagsResponse.setTotalCount(_ctx.integerValue("ListOutboundOrderSKUTagsResponse.TotalCount"));<NEW_LINE>listOutboundOrderSKUTagsResponse.setPageNumber(_ctx.integerValue("ListOutboundOrderSKUTagsResponse.PageNumber"));<NEW_LINE>listOutboundOrderSKUTagsResponse.setSuccess(_ctx.booleanValue("ListOutboundOrderSKUTagsResponse.Success"));<NEW_LINE>List<OutboundOrderSkuTagBiz> skuTags = new ArrayList<OutboundOrderSkuTagBiz>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListOutboundOrderSKUTagsResponse.SkuTags.Length"); i++) {<NEW_LINE>OutboundOrderSkuTagBiz outboundOrderSkuTagBiz = new OutboundOrderSkuTagBiz();<NEW_LINE>outboundOrderSkuTagBiz.setBarcode(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].Barcode"));<NEW_LINE>outboundOrderSkuTagBiz.setCaseId(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].CaseId"));<NEW_LINE>outboundOrderSkuTagBiz.setTagValue(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].TagValue"));<NEW_LINE>outboundOrderSkuTagBiz.setCaseCode(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].CaseCode"));<NEW_LINE>outboundOrderSkuTagBiz.setSKUId(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].SKUId"));<NEW_LINE>outboundOrderSkuTagBiz.setSKUName(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].SKUName"));<NEW_LINE>outboundOrderSkuTagBiz.setStyleId(_ctx.stringValue<MASK><NEW_LINE>outboundOrderSkuTagBiz.setStyleCode(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].StyleCode"));<NEW_LINE>outboundOrderSkuTagBiz.setStyleName(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].StyleName"));<NEW_LINE>outboundOrderSkuTagBiz.setSizeId(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].SizeId"));<NEW_LINE>outboundOrderSkuTagBiz.setSizeCode(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].SizeCode"));<NEW_LINE>outboundOrderSkuTagBiz.setSizeName(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].SizeName"));<NEW_LINE>outboundOrderSkuTagBiz.setColorId(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].ColorId"));<NEW_LINE>outboundOrderSkuTagBiz.setColorCode(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].ColorCode"));<NEW_LINE>outboundOrderSkuTagBiz.setColorName(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].ColorName"));<NEW_LINE>skuTags.add(outboundOrderSkuTagBiz);<NEW_LINE>}<NEW_LINE>listOutboundOrderSKUTagsResponse.setSkuTags(skuTags);<NEW_LINE>return listOutboundOrderSKUTagsResponse;<NEW_LINE>}
("ListOutboundOrderSKUTagsResponse.SkuTags[" + i + "].StyleId"));
953,199
void onFedAuthInfo(SqlFedAuthInfo fedAuthInfo, TDSTokenHandler tdsTokenHandler) throws SQLServerException {<NEW_LINE>assert (null != activeConnectionProperties.getProperty(SQLServerDriverStringProperty.USER.toString()) && null != activeConnectionProperties.getProperty(SQLServerDriverStringProperty.PASSWORD.toString())) || (authenticationString.equalsIgnoreCase(SqlAuthentication.ActiveDirectoryIntegrated.toString()) || authenticationString.equalsIgnoreCase(SqlAuthentication.ActiveDirectoryMSI.toString()) || authenticationString.equalsIgnoreCase(SqlAuthentication.ActiveDirectoryInteractive<MASK><NEW_LINE>assert null != fedAuthInfo;<NEW_LINE>attemptRefreshTokenLocked = true;<NEW_LINE>fedAuthToken = getFedAuthToken(fedAuthInfo);<NEW_LINE>attemptRefreshTokenLocked = false;<NEW_LINE>// fedAuthToken cannot be null.<NEW_LINE>assert null != fedAuthToken;<NEW_LINE>TDSCommand fedAuthCommand = new FedAuthTokenCommand(fedAuthToken, tdsTokenHandler);<NEW_LINE>fedAuthCommand.execute(tdsChannel.getWriter(), tdsChannel.getReader(fedAuthCommand));<NEW_LINE>}
.toString()) && fedAuthRequiredPreLoginResponse);
1,605,936
protected Mono<Endpoints> convert(List<DetectedEndpoint> endpoints) {<NEW_LINE>if (endpoints.isEmpty()) {<NEW_LINE>return Mono.empty();<NEW_LINE>}<NEW_LINE>Map<String, List<DetectedEndpoint>> endpointsById = endpoints.stream().collect(groupingBy((e) -> e.getDefinition().getId()));<NEW_LINE>List<Endpoint> result = endpointsById.values().stream().map((endpointList) -> {<NEW_LINE>endpointList.sort(comparingInt((e) -> this.endpoints.indexOf(e.getDefinition())));<NEW_LINE>if (endpointList.size() > 1) {<NEW_LINE>log.warn("Duplicate endpoints for id '{}' detected. Omitting: {}", endpointList.get(0).getDefinition().getId(), endpointList.subList(1, endpointList.size()));<NEW_LINE>}<NEW_LINE>return endpointList.get(0).getEndpoint();<NEW_LINE>}).<MASK><NEW_LINE>return Mono.just(Endpoints.of(result));<NEW_LINE>}
collect(Collectors.toList());
757,498
private Mono<Response<Flux<ByteBuffer>>> reimageAllWithResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (vmScaleSetName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (vmInstanceIDs != null) {<NEW_LINE>vmInstanceIDs.validate();<NEW_LINE>}<NEW_LINE>final String apiVersion = "2020-06-01";<NEW_LINE>context = <MASK><NEW_LINE>return service.reimageAll(this.client.getEndpoint(), resourceGroupName, vmScaleSetName, apiVersion, this.client.getSubscriptionId(), vmInstanceIDs, context);<NEW_LINE>}
this.client.mergeContext(context);
1,268,670
public AuthorizationRequest checkForPreApproval(AuthorizationRequest authorizationRequest, Authentication userAuthentication) {<NEW_LINE>String clientId = authorizationRequest.getClientId();<NEW_LINE>Collection<String> requestedScopes = authorizationRequest.getScope();<NEW_LINE>Set<String> approvedScopes = new HashSet<String>();<NEW_LINE>Set<String> validUserApprovedScopes = new HashSet<String>();<NEW_LINE>if (clientDetailsService != null) {<NEW_LINE>try {<NEW_LINE>ClientDetails client = clientDetailsService.loadClientByClientId(clientId);<NEW_LINE>for (String scope : requestedScopes) {<NEW_LINE>if (client.isAutoApprove(scope)) {<NEW_LINE>approvedScopes.add(scope);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (approvedScopes.containsAll(requestedScopes)) {<NEW_LINE>// gh-877 - if all scopes are auto approved, approvals still need to be added to the approval store.<NEW_LINE>Set<Approval> approvals = new HashSet<Approval>();<NEW_LINE>Date expiry = computeExpiry();<NEW_LINE>for (String approvedScope : approvedScopes) {<NEW_LINE>approvals.add(new Approval(userAuthentication.getName(), authorizationRequest.getClientId(), approvedScope, expiry, ApprovalStatus.APPROVED));<NEW_LINE>}<NEW_LINE>approvalStore.addApprovals(approvals);<NEW_LINE>authorizationRequest.setApproved(true);<NEW_LINE>return authorizationRequest;<NEW_LINE>}<NEW_LINE>} catch (ClientRegistrationException e) {<NEW_LINE>logger.warn("Client registration problem prevent autoapproval check for client");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>StringBuilder builder = new StringBuilder("Looking up user approved authorizations for ");<NEW_LINE>builder.append("client_id=" + clientId);<NEW_LINE>builder.append(" and username=" + userAuthentication.getName());<NEW_LINE>logger.<MASK><NEW_LINE>}<NEW_LINE>// Find the stored approvals for that user and client<NEW_LINE>Collection<Approval> userApprovals = approvalStore.getApprovals(userAuthentication.getName(), clientId);<NEW_LINE>// Look at the scopes and see if they have expired<NEW_LINE>Date today = new Date();<NEW_LINE>for (Approval approval : userApprovals) {<NEW_LINE>if (approval.getExpiresAt().after(today)) {<NEW_LINE>if (approval.getStatus() == ApprovalStatus.APPROVED) {<NEW_LINE>validUserApprovedScopes.add(approval.getScope());<NEW_LINE>approvedScopes.add(approval.getScope());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Valid user approved/denied scopes are " + validUserApprovedScopes);<NEW_LINE>}<NEW_LINE>// If the requested scopes have already been acted upon by the user,<NEW_LINE>// this request is approved<NEW_LINE>if (validUserApprovedScopes.containsAll(requestedScopes)) {<NEW_LINE>approvedScopes.retainAll(requestedScopes);<NEW_LINE>// Set only the scopes that have been approved by the user<NEW_LINE>authorizationRequest.setScope(approvedScopes);<NEW_LINE>authorizationRequest.setApproved(true);<NEW_LINE>}<NEW_LINE>return authorizationRequest;<NEW_LINE>}
debug(builder.toString());
742,035
static InstallException create(RepositoryException e, Collection<String> featureNames, boolean installingAsset, RestRepositoryConnectionProxy proxy, boolean defaultRepo, boolean isOpenLiberty) {<NEW_LINE>Throwable cause = e;<NEW_LINE>Throwable rootCause = e;<NEW_LINE>// Check the list of causes of the exception for connection issues<NEW_LINE>while ((rootCause = cause.getCause()) != null && cause != rootCause) {<NEW_LINE>if (rootCause instanceof UnknownHostException || rootCause instanceof FileNotFoundException || rootCause instanceof ConnectException) {<NEW_LINE>return create(e, rootCause, proxy, defaultRepo);<NEW_LINE>}<NEW_LINE>cause = rootCause;<NEW_LINE>}<NEW_LINE>if (featureNames != null) {<NEW_LINE>if (isCertPathBuilderException(cause))<NEW_LINE>return createByKey(InstallException.CONNECTION_FAILED, e, defaultRepo ? "ERROR_FAILED_TO_CONNECT_CAUSED_BY_CERT" : "ERROR_FAILED_TO_CONNECT_REPOS_CAUSED_BY_CERT");<NEW_LINE>String <MASK><NEW_LINE>InstallException ie;<NEW_LINE>if (isOpenLiberty) {<NEW_LINE>ie = create(Messages.INSTALL_KERNEL_MESSAGES.getLogMessage(installingAsset ? "ERROR_FAILED_TO_RESOLVE_ASSETS" : "ERROR_FAILED_TO_RESOLVE_FEATURES_FOR_OPEN_LIBERTY", featuresListStr), e);<NEW_LINE>} else {<NEW_LINE>ie = create(Messages.INSTALL_KERNEL_MESSAGES.getLogMessage(installingAsset ? "ERROR_FAILED_TO_RESOLVE_ASSETS" : "ERROR_FAILED_TO_RESOLVE_FEATURES", featuresListStr), e);<NEW_LINE>}<NEW_LINE>ie.setData(featuresListStr);<NEW_LINE>return ie;<NEW_LINE>} else<NEW_LINE>return create(e);<NEW_LINE>}
featuresListStr = InstallUtils.getFeatureListOutput(featureNames);
1,405,103
private Mono<Response<Void>> stopContinuousWebJobWithResponseAsync(String resourceGroupName, String name, String webJobName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (name == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (webJobName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.stopContinuousWebJob(this.client.getEndpoint(), resourceGroupName, name, webJobName, this.client.getSubscriptionId(), this.client.getApiVersion(), context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter name is required and cannot be null."));
1,484,984
public static void execute(ManagerConnection c, String stmt) {<NEW_LINE>Map<String, String> paramster = parse(stmt);<NEW_LINE>int retryTime = 1;<NEW_LINE>long intervalTime = 200;<NEW_LINE>// "show @@CKECK_GLOBAL -SCHEMA=TESTDB -TABLE=E_ACCOUNT_SUBJECT -retrytime=2"<NEW_LINE>// + " -intervaltime=20"<NEW_LINE>String tableName = paramster.get("table");<NEW_LINE>String schemaName = paramster.get("schema");<NEW_LINE>String retryTimeStr = paramster.get("retry");<NEW_LINE>String intervalTimeStr = paramster.get("interval");<NEW_LINE>MycatConfig config = MycatServer.getInstance().getConfig();<NEW_LINE>TableConfig table;<NEW_LINE>SchemaConfig schemaConfig = null;<NEW_LINE>if (StringUtil.isEmpty(schemaName)) {<NEW_LINE>c.writeErrMessage(ErrorCode.ER_UNKNOWN_ERROR, "schemaName is null, please add paramster -schema=schemaname ");<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>schemaConfig = config.getSchemas().get(schemaName);<NEW_LINE>if (schemaConfig == null) {<NEW_LINE>c.writeErrMessage(ErrorCode.ER_UNKNOWN_ERROR, "schemaName is null, please add paramster -schema=schemaname ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (StringUtil.isEmpty(tableName)) {<NEW_LINE>c.writeErrMessage(ErrorCode.ER_UNKNOWN_ERROR, "tableName is null, please add paramster -table=tablename ");<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>table = schemaConfig.getTables().get(tableName.toUpperCase());<NEW_LINE>}<NEW_LINE>if (StringUtil.isEmpty(retryTimeStr)) {<NEW_LINE>c.<MASK><NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>retryTime = Integer.valueOf(retryTimeStr);<NEW_LINE>}<NEW_LINE>if (StringUtil.isEmpty(intervalTimeStr)) {<NEW_LINE>c.writeErrMessage(ErrorCode.ER_BAD_TABLE_ERROR, "intervalTime is null, please add paramster -interval= ");<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>intervalTime = Long.valueOf(intervalTimeStr);<NEW_LINE>}<NEW_LINE>// tableName = "e_account_subject";<NEW_LINE>// schemaName = "TESTDB";<NEW_LINE>List<String> dataNodeList = table.getDataNodes();<NEW_LINE>ConsistenCollectHandler cHandler = new ConsistenCollectHandler(c, tableName, schemaName, dataNodeList.size(), retryTime, intervalTime);<NEW_LINE>cHandler.startDetector();<NEW_LINE>// c.writeErrMessage(ErrorCode.ER_BAD_TABLE_ERROR, "XXX");<NEW_LINE>}
writeErrMessage(ErrorCode.ER_UNKNOWN_ERROR, "retryTime is null, please add paramster -retry= ");
357,115
private void convertUnopInsn(InsnNode insn) {<NEW_LINE>int op = insn.getOpcode();<NEW_LINE>boolean dword = op == LNEG || op == DNEG;<NEW_LINE>StackFrame frame = getFrame(insn);<NEW_LINE>Operand[] out = frame.out();<NEW_LINE>Operand opr;<NEW_LINE>if (out == null) {<NEW_LINE>Operand op1 = dword ? popImmediateDual() : popImmediate();<NEW_LINE>Value v1 = op1.stackOrValue();<NEW_LINE>UnopExpr unop;<NEW_LINE>if (op >= INEG && op <= DNEG) {<NEW_LINE>unop = Jimple.v().newNegExpr(v1);<NEW_LINE>} else if (op == ARRAYLENGTH) {<NEW_LINE>unop = Jimple.v().newLengthExpr(v1);<NEW_LINE>} else {<NEW_LINE>throw new AssertionError("Unknown unop: " + op);<NEW_LINE>}<NEW_LINE>op1.addBox(unop.getOpBox());<NEW_LINE>opr <MASK><NEW_LINE>frame.in(op1);<NEW_LINE>frame.boxes(unop.getOpBox());<NEW_LINE>frame.out(opr);<NEW_LINE>} else {<NEW_LINE>opr = out[0];<NEW_LINE>frame.mergeIn(dword ? popDual() : pop());<NEW_LINE>}<NEW_LINE>if (dword) {<NEW_LINE>pushDual(opr);<NEW_LINE>} else {<NEW_LINE>push(opr);<NEW_LINE>}<NEW_LINE>}
= new Operand(insn, unop);
218,195
public static boolean isMediaInGutenbergPostBody(@NonNull String postContent, String localMediaId) {<NEW_LINE>List<String> <MASK><NEW_LINE>// Regex for Image, Video, Audio and File blocks<NEW_LINE>patterns.add("<!-- wp:(?:image|video|audio|file){1} \\{[^\\}]*\"id\":%s([^\\d\\}][^\\}]*)*\\} -->");<NEW_LINE>// Regex for Media&Text block<NEW_LINE>patterns.add("<!-- wp:media-text \\{[^\\}]*\"mediaId\":%s([^\\d\\}][^\\}]*)*\\} -->");<NEW_LINE>// Regex for Gallery block<NEW_LINE>patterns.add("<!-- wp:gallery \\{[^\\}]*\"ids\":\\[(?:\\d*,)*%s(?:,\\d*)*\\][^\\}]*\\} -->");<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>// Merge the patterns into one so we don't need to go over the post content multiple times<NEW_LINE>for (int i = 0; i < patterns.size(); i++) {<NEW_LINE>// insert the media id<NEW_LINE>sb.append("(?:").append(String.format(patterns.get(i), localMediaId)).append(")");<NEW_LINE>boolean notLast = i != patterns.size() - 1;<NEW_LINE>if (notLast) {<NEW_LINE>sb.append("|");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Matcher matcher = Pattern.compile(sb.toString()).matcher(postContent);<NEW_LINE>return matcher.find();<NEW_LINE>}
patterns = new ArrayList<>();
1,644,970
public Response revoke() {<NEW_LINE>event.event(EventType.REVOKE_GRANT);<NEW_LINE>cors = Cors.add(request).auth().allowedMethods("POST").auth().exposedHeaders(Cors.ACCESS_CONTROL_ALLOW_METHODS);<NEW_LINE>checkSsl();<NEW_LINE>checkRealm();<NEW_LINE>checkClient();<NEW_LINE>formParams = request.getDecodedFormParameters();<NEW_LINE>checkParameterDuplicated(formParams);<NEW_LINE>try {<NEW_LINE>session.clientPolicy().triggerOnEvent(new TokenRevokeContext(formParams));<NEW_LINE>} catch (ClientPolicyException cpe) {<NEW_LINE>event.error(cpe.getError());<NEW_LINE>throw new CorsErrorResponseException(cors, cpe.getError(), cpe.getErrorDetail(<MASK><NEW_LINE>}<NEW_LINE>checkToken();<NEW_LINE>checkIssuedFor();<NEW_LINE>checkUser();<NEW_LINE>if (TokenUtil.TOKEN_TYPE_REFRESH.equals(token.getType()) || TokenUtil.TOKEN_TYPE_OFFLINE.equals(token.getType())) {<NEW_LINE>revokeClient();<NEW_LINE>event.detail(Details.REVOKED_CLIENT, client.getClientId());<NEW_LINE>} else {<NEW_LINE>revokeAccessToken();<NEW_LINE>event.detail(Details.TOKEN_ID, token.getId());<NEW_LINE>}<NEW_LINE>event.success();<NEW_LINE>session.getProvider(SecurityHeadersProvider.class).options().allowEmptyContentType();<NEW_LINE>return cors.builder(Response.ok()).build();<NEW_LINE>}
), cpe.getErrorStatus());
978,372
public static void main(final String[] args) {<NEW_LINE>final Option<Integer> o1 = some(7);<NEW_LINE>final Option<Integer> o2 = some(8);<NEW_LINE>final Option<Integer> o3 = none();<NEW_LINE>F<Integer, Option<Integer>> f = i -> i % 2 == 0 ? some(i * 3) : none();<NEW_LINE>final Option<Integer> o4 = o1.bind(f);<NEW_LINE>final Option<Integer> o5 = o2.bind(f);<NEW_LINE>final Option<Integer> o6 = o3.bind(f);<NEW_LINE>final Option<Integer> p1 = o1.bind(i -> i % 2 == 0 ? some(i * 3) : Option.none());<NEW_LINE>final Option<Integer> p2 = o2.bind(i -> i % 2 == 0 ? some(i * 3) : Option.none());<NEW_LINE>final Option<Integer> p3 = o3.bind(i -> i % 2 == 0 ? some(i * 3) : Option.none());<NEW_LINE>// None<NEW_LINE>optionShow<MASK><NEW_LINE>// Some(24)<NEW_LINE>optionShow(intShow).println(o5);<NEW_LINE>// None<NEW_LINE>optionShow(intShow).println(o6);<NEW_LINE>}
(intShow).println(o4);
1,683,114
public static void doPartitionTableCutOver(final String schemaName, final String sourceTableName, final String targetTableName, final TableInfoManager tableInfoManager, final GsiMetaManager.TableType primaryTableType) {<NEW_LINE>String random = UUID.randomUUID().toString();<NEW_LINE>List<TablePartitionRecord> sourceTablePartition = tableInfoManager.queryTablePartitions(schemaName, sourceTableName, false);<NEW_LINE>if (sourceTablePartition == null || sourceTablePartition.isEmpty()) {<NEW_LINE>String msgContent = String.<MASK><NEW_LINE>throw new TddlNestableRuntimeException(msgContent);<NEW_LINE>}<NEW_LINE>List<TablePartitionRecord> targetTablePartition = tableInfoManager.queryTablePartitions(schemaName, targetTableName, false);<NEW_LINE>if (targetTablePartition == null || targetTablePartition.isEmpty()) {<NEW_LINE>String msgContent = String.format("Table '%s.%s' doesn't exist", schemaName, targetTableName);<NEW_LINE>throw new TddlNestableRuntimeException(msgContent);<NEW_LINE>}<NEW_LINE>long newVersion = Math.max(sourceTablePartition.get(0).metaVersion, targetTablePartition.get(0).metaVersion) + 1;<NEW_LINE>tableInfoManager.alterTablePartitionsCurOver(schemaName, sourceTableName, random, PartitionTableType.GSI_TABLE.getTableTypeIntValue());<NEW_LINE>switch(primaryTableType) {<NEW_LINE>case SINGLE:<NEW_LINE>tableInfoManager.alterTablePartitionsCurOver(schemaName, targetTableName, sourceTableName, PartitionTableType.SINGLE_TABLE.getTableTypeIntValue());<NEW_LINE>break;<NEW_LINE>case BROADCAST:<NEW_LINE>tableInfoManager.alterTablePartitionsCurOver(schemaName, targetTableName, sourceTableName, PartitionTableType.BROADCAST_TABLE.getTableTypeIntValue());<NEW_LINE>break;<NEW_LINE>case GSI:<NEW_LINE>tableInfoManager.alterTablePartitionsCurOver(schemaName, targetTableName, sourceTableName, PartitionTableType.GSI_TABLE.getTableTypeIntValue());<NEW_LINE>break;<NEW_LINE>case SHARDING:<NEW_LINE>tableInfoManager.alterTablePartitionsCurOver(schemaName, targetTableName, sourceTableName, PartitionTableType.PARTITION_TABLE.getTableTypeIntValue());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new TddlNestableRuntimeException("unknown primary table type");<NEW_LINE>}<NEW_LINE>tableInfoManager.alterTablePartitionsCurOver(schemaName, random, targetTableName, PartitionTableType.GSI_TABLE.getTableTypeIntValue());<NEW_LINE>tableInfoManager.updateTablePartitionsVersion(schemaName, sourceTableName, newVersion);<NEW_LINE>tableInfoManager.updateTablePartitionsVersion(schemaName, targetTableName, newVersion);<NEW_LINE>}
format("Table '%s.%s' doesn't exist", schemaName, sourceTableName);
671,154
public StorageLensDataExport unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>StorageLensDataExport storageLensDataExport = new StorageLensDataExport();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE><MASK><NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return storageLensDataExport;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("S3BucketDestination", targetDepth)) {<NEW_LINE>storageLensDataExport.setS3BucketDestination(S3BucketDestinationStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("CloudWatchMetrics", targetDepth)) {<NEW_LINE>storageLensDataExport.setCloudWatchMetrics(CloudWatchMetricsStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return storageLensDataExport;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
XMLEvent xmlEvent = context.nextEvent();
159,477
// implement RexToSqlNodeConverter<NEW_LINE>public SqlNode convertLiteral(RexLiteral literal) {<NEW_LINE>// Numeric<NEW_LINE>if (SqlTypeFamily.EXACT_NUMERIC.getTypeNames().contains(literal.getTypeName())) {<NEW_LINE>return SqlLiteral.createExactNumeric(literal.getValue().<MASK><NEW_LINE>}<NEW_LINE>if (SqlTypeFamily.APPROXIMATE_NUMERIC.getTypeNames().contains(literal.getTypeName())) {<NEW_LINE>return SqlLiteral.createApproxNumeric(literal.getValue().toString(), SqlParserPos.ZERO);<NEW_LINE>}<NEW_LINE>// Timestamp<NEW_LINE>if (SqlTypeFamily.TIMESTAMP.getTypeNames().contains(literal.getTypeName())) {<NEW_LINE>return SqlLiteral.createTimestamp(literal.getValueAs(TimestampString.class), 0, SqlParserPos.ZERO);<NEW_LINE>}<NEW_LINE>// Date<NEW_LINE>if (SqlTypeFamily.DATE.getTypeNames().contains(literal.getTypeName())) {<NEW_LINE>return SqlLiteral.createDate(literal.getValueAs(DateString.class), SqlParserPos.ZERO);<NEW_LINE>}<NEW_LINE>// Time<NEW_LINE>if (SqlTypeFamily.TIME.getTypeNames().contains(literal.getTypeName())) {<NEW_LINE>return SqlLiteral.createTime(literal.getValueAs(TimeString.class), 0, SqlParserPos.ZERO);<NEW_LINE>}<NEW_LINE>// String<NEW_LINE>if (SqlTypeFamily.CHARACTER.getTypeNames().contains(literal.getTypeName())) {<NEW_LINE>return SqlLiteral.createCharString(((NlsString) (literal.getValue())).getValue(), SqlParserPos.ZERO);<NEW_LINE>}<NEW_LINE>// Boolean<NEW_LINE>if (SqlTypeFamily.BOOLEAN.getTypeNames().contains(literal.getTypeName())) {<NEW_LINE>return SqlLiteral.createBoolean((Boolean) literal.getValue(), SqlParserPos.ZERO);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
toString(), SqlParserPos.ZERO);
387,452
public void testAnnotationJavamailSessionCreated() throws Throwable {<NEW_LINE>if (jm2 != null) {<NEW_LINE>Properties props = jm2.getProperties();<NEW_LINE>System.out.println("JavamailFATServlet.testAnnotationJavamailSessionCreated properties : " + props.toString());<NEW_LINE>// Validate we got the session we expected<NEW_LINE>String userValue = jm2.getProperty("mail.user");<NEW_LINE>if (!("jm2test").equals(userValue)) {<NEW_LINE>throw new Exception("Did not find the user for mail session jm2 defined as an annotation");<NEW_LINE>}<NEW_LINE>String fromValue = jm2.getProperty("mail.from");<NEW_LINE>if (!("jm2From").equals(fromValue)) {<NEW_LINE>throw new Exception("Did not find the from value for mail session jm2 defined as an annotation");<NEW_LINE>}<NEW_LINE>String descValue = jm2.getProperty("description");<NEW_LINE>if (!("jm2Desc").equals(descValue)) {<NEW_LINE>throw new Exception("Did not find the description for mail session jm2 defined as an annotation");<NEW_LINE>}<NEW_LINE>String spValue = jm2.getProperty("mail.store.protocol");<NEW_LINE>if (!("jm2StoreProtocol").equals(spValue)) {<NEW_LINE>throw new Exception("Did not find the store.protocol for mail session jm2 defined as an annotation");<NEW_LINE>}<NEW_LINE>String tpValue = jm2.getProperty("mail.transport.protocol");<NEW_LINE>if (!("jm2TransportProtocol").equals(tpValue)) {<NEW_LINE>throw new Exception("Did not find the transport.protocol for mail session jm2 defined as an annotation");<NEW_LINE>}<NEW_LINE>// Vaidate the property "test" returns the value added with the annotation<NEW_LINE>String <MASK><NEW_LINE>if (testValue == null || !testValue.equals("jm2Def_MailSession")) {<NEW_LINE>throw new Exception("Did not find the test property for mail session mergeMS defined as an annotation, instead found: " + testValue);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>throw new Exception("Annotated jm2 MailSession was null");<NEW_LINE>}
testValue = jm2.getProperty("test");
1,364,137
public void initWithNiwsConfig(IClientConfig clientConfig) {<NEW_LINE>super.initWithNiwsConfig(clientConfig);<NEW_LINE>this.ncc = clientConfig;<NEW_LINE>this<MASK><NEW_LINE>this.isSecure = ncc.get(CommonClientConfigKey.IsSecure, this.isSecure);<NEW_LINE>this.isHostnameValidationRequired = ncc.get(CommonClientConfigKey.IsHostnameValidationRequired, this.isHostnameValidationRequired);<NEW_LINE>this.isClientAuthRequired = ncc.get(CommonClientConfigKey.IsClientAuthRequired, this.isClientAuthRequired);<NEW_LINE>this.bFollowRedirects = ncc.get(CommonClientConfigKey.FollowRedirects, true);<NEW_LINE>this.ignoreUserToken = ncc.get(CommonClientConfigKey.IgnoreUserTokenInConnectionPoolForSecureClient, this.ignoreUserToken);<NEW_LINE>this.config = new DefaultApacheHttpClient4Config();<NEW_LINE>this.config.getProperties().put(ApacheHttpClient4Config.PROPERTY_CONNECT_TIMEOUT, ncc.get(CommonClientConfigKey.ConnectTimeout));<NEW_LINE>this.config.getProperties().put(ApacheHttpClient4Config.PROPERTY_READ_TIMEOUT, ncc.get(CommonClientConfigKey.ReadTimeout));<NEW_LINE>this.restClient = apacheHttpClientSpecificInitialization();<NEW_LINE>this.setRetryHandler(new HttpClientLoadBalancerErrorHandler(ncc));<NEW_LINE>}
.restClientName = ncc.getClientName();
1,098,034
protected <T extends com.x.base.core.project.organization.Group> T convert(Business business, Group group, Class<T> clz) throws Exception {<NEW_LINE>T t = clz.newInstance();<NEW_LINE>t.setId(group.getId());<NEW_LINE>t.setName(group.getName());<NEW_LINE>t.<MASK><NEW_LINE>t.setUnique(group.getUnique());<NEW_LINE>t.setDistinguishedName(group.getDistinguishedName());<NEW_LINE>t.setOrderNumber(group.getOrderNumber());<NEW_LINE>if (ListTools.isNotEmpty(group.getPersonList())) {<NEW_LINE>for (String str : group.getPersonList()) {<NEW_LINE>Person o = business.person().pick(str);<NEW_LINE>if (o != null) {<NEW_LINE>t.getPersonList().add(o.getDistinguishedName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>t.setSubDirectPersonCount((long) t.getPersonList().size());<NEW_LINE>}<NEW_LINE>if (ListTools.isNotEmpty(group.getGroupList())) {<NEW_LINE>for (String str : group.getGroupList()) {<NEW_LINE>Group o = business.group().pick(str);<NEW_LINE>if (o != null) {<NEW_LINE>t.getGroupList().add(o.getDistinguishedName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>t.setSubDirectGroupCount((long) t.getGroupList().size());<NEW_LINE>}<NEW_LINE>if (ListTools.isNotEmpty(group.getUnitList())) {<NEW_LINE>for (String str : group.getUnitList()) {<NEW_LINE>Unit o = business.unit().pick(str);<NEW_LINE>if (o != null) {<NEW_LINE>t.getUnitList().add(o.getDistinguishedName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>t.setSubDirectOrgCount((long) t.getUnitList().size());<NEW_LINE>}<NEW_LINE>if (ListTools.isNotEmpty(group.getIdentityList())) {<NEW_LINE>for (String str : group.getIdentityList()) {<NEW_LINE>Identity o = business.identity().pick(str);<NEW_LINE>if (o != null) {<NEW_LINE>t.getIdentityList().add(o.getDistinguishedName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>t.setSubDirectIdentityCount((long) t.getIdentityList().size());<NEW_LINE>}<NEW_LINE>return t;<NEW_LINE>}
setDescription(group.getDescription());
348,301
public void onRoutingSuccess(List<Route> route, int shortestRouteIndex) {<NEW_LINE>progressDialog.dismiss();<NEW_LINE>CameraUpdate center = CameraUpdateFactory.newLatLng(start);<NEW_LINE>CameraUpdate <MASK><NEW_LINE>map.moveCamera(center);<NEW_LINE>if (polylines.size() > 0) {<NEW_LINE>for (Polyline poly : polylines) {<NEW_LINE>poly.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>polylines = new ArrayList<>();<NEW_LINE>// add route(s) to the map.<NEW_LINE>for (int i = 0; i < route.size(); i++) {<NEW_LINE>// In case of more than 5 alternative routes<NEW_LINE>int colorIndex = i % COLORS.length;<NEW_LINE>PolylineOptions polyOptions = new PolylineOptions();<NEW_LINE>polyOptions.color(getResources().getColor(COLORS[colorIndex]));<NEW_LINE>polyOptions.width(10 + i * 3);<NEW_LINE>polyOptions.addAll(route.get(i).getPoints());<NEW_LINE>Polyline polyline = map.addPolyline(polyOptions);<NEW_LINE>polylines.add(polyline);<NEW_LINE>Toast.makeText(getApplicationContext(), "Route " + (i + 1) + ": distance - " + route.get(i).getDistanceValue() + ": duration - " + route.get(i).getDurationValue(), Toast.LENGTH_SHORT).show();<NEW_LINE>}<NEW_LINE>// Start marker<NEW_LINE>MarkerOptions options = new MarkerOptions();<NEW_LINE>options.position(start);<NEW_LINE>options.icon(BitmapDescriptorFactory.fromResource(R.drawable.start_blue));<NEW_LINE>map.addMarker(options);<NEW_LINE>// End marker<NEW_LINE>options = new MarkerOptions();<NEW_LINE>options.position(end);<NEW_LINE>options.icon(BitmapDescriptorFactory.fromResource(R.drawable.end_green));<NEW_LINE>map.addMarker(options);<NEW_LINE>}
zoom = CameraUpdateFactory.zoomTo(16);
1,268,370
public boolean applyTo(DomainObject obj) {<NEW_LINE>EquateTable equateTable = ((Program) obj).getEquateTable();<NEW_LINE>equate = equateTable.getEquate(equateName);<NEW_LINE>if (existsWithDifferentValue(equate)) {<NEW_LINE>msg = "Equate named " + equateName + " already exists with value of " + equate.getValue() + ".";<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (equate == null) {<NEW_LINE>// Create new equate<NEW_LINE>try {<NEW_LINE>equate = <MASK><NEW_LINE>} catch (DuplicateNameException e) {<NEW_LINE>msg = "Equate named " + equateName + " already exists";<NEW_LINE>return false;<NEW_LINE>} catch (InvalidInputException e) {<NEW_LINE>msg = "Invalid equate name: " + equateName;<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Add reference to existing equate<NEW_LINE>equate.addReference(addr, opIndex);<NEW_LINE>return true;<NEW_LINE>}
equateTable.createEquate(equateName, equateValue);
661,776
public void marshall(CreateReplicationConfigurationTemplateRequest createReplicationConfigurationTemplateRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createReplicationConfigurationTemplateRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getAssociateDefaultSecurityGroup(), ASSOCIATEDEFAULTSECURITYGROUP_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getBandwidthThrottling(), BANDWIDTHTHROTTLING_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getCreatePublicIP(), CREATEPUBLICIP_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getDataPlaneRouting(), DATAPLANEROUTING_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getDefaultLargeStagingDiskType(), DEFAULTLARGESTAGINGDISKTYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getEbsEncryption(), EBSENCRYPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getEbsEncryptionKeyArn(), EBSENCRYPTIONKEYARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getPitPolicy(), PITPOLICY_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getReplicationServerInstanceType(), REPLICATIONSERVERINSTANCETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getReplicationServersSecurityGroupsIDs(), REPLICATIONSERVERSSECURITYGROUPSIDS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getStagingAreaSubnetId(), STAGINGAREASUBNETID_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getStagingAreaTags(), STAGINGAREATAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getTags(), TAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createReplicationConfigurationTemplateRequest.getUseDedicatedReplicationServer(), USEDEDICATEDREPLICATIONSERVER_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
125,899
private void validateIncomingRequest(Request request) throws BadRequestException {<NEW_LINE>// check mandatory headers per RFC3261 8.1.1<NEW_LINE>if (request.getCallIdHeader() == null) {<NEW_LINE>throw new BadRequestException("Missing Call-ID header field", Response.BAD_REQUEST);<NEW_LINE>}<NEW_LINE>if (request.getCSeqHeader() == null) {<NEW_LINE>throw new BadRequestException("Missing CSeq header field", Response.BAD_REQUEST);<NEW_LINE>}<NEW_LINE>if (request.getFromHeader() == null) {<NEW_LINE>throw new BadRequestException("Missing From header field", Response.BAD_REQUEST);<NEW_LINE>}<NEW_LINE>if (request.getToHeader() == null) {<NEW_LINE>throw new BadRequestException("Missing To header field", Response.BAD_REQUEST);<NEW_LINE>}<NEW_LINE>if (!request.hasViaHeaders()) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>// check max-forwards header<NEW_LINE>// todo this should be moved to the proxy code, per rfc 3261 16.3<NEW_LINE>MaxForwardsHeader maxForwardsHeader;<NEW_LINE>try {<NEW_LINE>maxForwardsHeader = request.getMaxForwardsHeader();<NEW_LINE>} catch (HeaderParseException e) {<NEW_LINE>throw new BadRequestException("Bad Request, Malformed Max-Forwards header", Response.BAD_REQUEST);<NEW_LINE>}<NEW_LINE>if (maxForwardsHeader != null && maxForwardsHeader.getMaxForwards() < 0) {<NEW_LINE>throw new BadRequestException(SipResponseCodes.getResponseCodeText(Response.TOO_MANY_HOPS), Response.TOO_MANY_HOPS);<NEW_LINE>}<NEW_LINE>}
BadRequestException("Missing Via header field", Response.BAD_REQUEST);
1,481,795
private boolean validateScheme(byte[] handshake, int scheme) {<NEW_LINE>int digestOffset = -1;<NEW_LINE>switch(scheme) {<NEW_LINE>case 0:<NEW_LINE>digestOffset = getDigestOffset1(handshake, 0);<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>digestOffset = getDigestOffset2(handshake, 0);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>log.debug("Algorithm: {} digest offset: {}", scheme, digestOffset);<NEW_LINE>byte[] tempBuffer = new byte[Constants.HANDSHAKE_SIZE - DIGEST_LENGTH];<NEW_LINE>System.arraycopy(handshake, 0, tempBuffer, 0, digestOffset);<NEW_LINE>System.arraycopy(handshake, digestOffset + DIGEST_LENGTH, tempBuffer, digestOffset, Constants.HANDSHAKE_SIZE - digestOffset - DIGEST_LENGTH);<NEW_LINE>byte[] tempHash = new byte[DIGEST_LENGTH];<NEW_LINE>calculateHMAC_SHA256(tempBuffer, 0, tempBuffer.length, GENUINE_FP_KEY, 30, tempHash, 0);<NEW_LINE>log.debug("Hash: {}", Hex.encodeHexString(tempHash));<NEW_LINE>boolean result = true;<NEW_LINE>for (int i = 0; i < DIGEST_LENGTH; i++) {<NEW_LINE>if (handshake[digestOffset + i] != tempHash[i]) {<NEW_LINE>result = false;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
log.error("Unknown algorithm: {}", scheme);
1,458,004
private static double[] genotypeLikelihoods(final PileupSummary site, final double c, final double errorRate, double maf) {<NEW_LINE>final double f = site.getAlleleFrequency();<NEW_LINE>final int k = site.getAltCount();<NEW_LINE>final int n = k + site.getRefCount();<NEW_LINE>// sample genotypes in order hom ref, alt minor, alt major, hom alt<NEW_LINE>final double[] samplePriors = new double[] { (1 - f) * (1 - f), f * (1 - f), f * (1 - f), f * f };<NEW_LINE>final double[] sampleAFs = new double[] { errorRate / 3, maf, <MASK><NEW_LINE>return new IndexRange(0, 4).mapToDouble(sg -> samplePriors[sg] * MathUtils.binomialProbability(n, k, (1 - c) * sampleAFs[sg] + c * f));<NEW_LINE>}
1 - maf, 1 - errorRate };
311,159
public static void main(String[] args) {<NEW_LINE>Exercise28_SoftwareCaching softwareCaching = new Exercise28_SoftwareCaching();<NEW_LINE>BinarySearchTree<Integer, String> binarySearchTree = <MASK><NEW_LINE>for (int i = 0; i < 10; i++) {<NEW_LINE>binarySearchTree.put(i, "Value " + i);<NEW_LINE>}<NEW_LINE>// Cache on get operation<NEW_LINE>StdOut.println("\nGet key 2:");<NEW_LINE>binarySearchTree.get(2);<NEW_LINE>StdOut.println("Expected: cache miss");<NEW_LINE>StdOut.println("\nGet key 2:");<NEW_LINE>binarySearchTree.get(2);<NEW_LINE>StdOut.println("Expected: cache hit");<NEW_LINE>StdOut.println("\nDelete key 4:");<NEW_LINE>binarySearchTree.delete(4);<NEW_LINE>StdOut.println("\nGet key 7:");<NEW_LINE>binarySearchTree.get(7);<NEW_LINE>StdOut.println("Expected: cache miss");<NEW_LINE>StdOut.println("\nGet key 7:");<NEW_LINE>binarySearchTree.get(7);<NEW_LINE>StdOut.println("Expected: cache hit");<NEW_LINE>StdOut.println("\nDelete key 7:");<NEW_LINE>binarySearchTree.delete(7);<NEW_LINE>binarySearchTree.min();<NEW_LINE>StdOut.println("\nGet key 0:");<NEW_LINE>binarySearchTree.get(0);<NEW_LINE>StdOut.println("Expected: cache hit");<NEW_LINE>StdOut.println("\nGet key 9:");<NEW_LINE>binarySearchTree.get(9);<NEW_LINE>StdOut.println("Expected: cache miss");<NEW_LINE>binarySearchTree.select(3);<NEW_LINE>StdOut.println("\nGet key 3:");<NEW_LINE>binarySearchTree.get(3);<NEW_LINE>StdOut.println("Expected: cache hit");<NEW_LINE>binarySearchTree.max();<NEW_LINE>StdOut.println("\nGet key 9:");<NEW_LINE>binarySearchTree.get(9);<NEW_LINE>StdOut.println("Expected: cache hit");<NEW_LINE>}
softwareCaching.new BinarySearchTree<>();
1,617,144
private static MysqlDateTime handleTimeInterval(MysqlDateTime src, MySQLInterval interval) {<NEW_LINE>long sign = interval.isNeg() ? -1 : 1;<NEW_LINE>MysqlDateTime ret = new MysqlDateTime();<NEW_LINE>ret.setSqlType(Types.TIMESTAMP);<NEW_LINE>long nano = src.getSecondPart() + sign * interval.getSecondPart();<NEW_LINE><MASK><NEW_LINE>nano = nano % MySQLTimeTypeUtil.SEC_TO_NANO;<NEW_LINE>long srcSec = (src.getDay() - 1) * 3600 * 24 + src.getHour() * 3600 + src.getMinute() * 60 + src.getSecond();<NEW_LINE>long intervalSec = interval.getDay() * 3600 * 24 + interval.getHour() * 3600 + interval.getMinute() * 60 + interval.getSecond();<NEW_LINE>intervalSec *= sign;<NEW_LINE>long sec = srcSec + intervalSec + extraSec;<NEW_LINE>if (nano < 0) {<NEW_LINE>nano += MySQLTimeTypeUtil.SEC_TO_NANO;<NEW_LINE>sec--;<NEW_LINE>}<NEW_LINE>long day = sec / (3600 * 24);<NEW_LINE>sec -= day * 3600 * 24;<NEW_LINE>if (sec < 0) {<NEW_LINE>day--;<NEW_LINE>sec += 3600 * 24;<NEW_LINE>}<NEW_LINE>ret.setSecondPart(Math.abs(nano));<NEW_LINE>ret.setSecond(Math.abs(sec % 60));<NEW_LINE>ret.setMinute(Math.abs((sec / 60) % 60));<NEW_LINE>ret.setHour(Math.abs(sec / 3600));<NEW_LINE>long dayNumber = calDayNumber(src.getYear(), src.getMonth(), 1) + day;<NEW_LINE>if (dayNumber < 0 || dayNumber > MySQLTimeTypeUtil.MAX_DAY_NUMBER) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>getDateFromDayNumber(dayNumber, ret);<NEW_LINE>return ret;<NEW_LINE>}
long extraSec = nano / MySQLTimeTypeUtil.SEC_TO_NANO;
875,220
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_bit_idauthentication);<NEW_LINE>request = (BitIDSignRequest) getIntent().getSerializableExtra(REQUEST);<NEW_LINE>signInButton = (Button) <MASK><NEW_LINE>errorView = (TextView) findViewById(R.id.tvBitidError);<NEW_LINE>question = (TextView) findViewById(R.id.tvBitIdWebsite);<NEW_LINE>question.setText(getString(R.string.bitid_question, request.getHost()));<NEW_LINE>TextView warning = (TextView) findViewById(R.id.tvInsecureWarning);<NEW_LINE>if (request.isSecure()) {<NEW_LINE>warning.setVisibility(View.GONE);<NEW_LINE>} else {<NEW_LINE>warning.setVisibility(View.VISIBLE);<NEW_LINE>}<NEW_LINE>progress = new ProgressDialog(this);<NEW_LINE>if (savedInstanceState != null) {<NEW_LINE>errorView.setText(savedInstanceState.getString(ERROR_TEXT));<NEW_LINE>question.setText(savedInstanceState.getString(QUESTION_TEXT));<NEW_LINE>if (savedInstanceState.getBoolean(SIGNBUTTON_VISIBLE)) {<NEW_LINE>signInButton.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>signInButton.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>if (savedInstanceState.getBoolean(ERRORVIEW_VISIBLE)) {<NEW_LINE>errorView.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>errorView.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
findViewById(R.id.btSignUp);
16,702
final CreateServiceTemplateVersionResult executeCreateServiceTemplateVersion(CreateServiceTemplateVersionRequest createServiceTemplateVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createServiceTemplateVersionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateServiceTemplateVersionRequest> request = null;<NEW_LINE>Response<CreateServiceTemplateVersionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateServiceTemplateVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createServiceTemplateVersionRequest));<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, "Proton");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateServiceTemplateVersion");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateServiceTemplateVersionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateServiceTemplateVersionResultJsonUnmarshaller());<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);
856,627
protected SegmentGenerationTaskSpec generateTaskSpec(Map<String, String> taskConfigs, File localTempDir) throws Exception {<NEW_LINE>SegmentGenerationTaskSpec taskSpec = new SegmentGenerationTaskSpec();<NEW_LINE>URI inputFileURI = URI.create(taskConfigs.get(BatchConfigProperties.INPUT_DATA_FILE_URI_KEY));<NEW_LINE>PinotFS inputFileFS = SegmentGenerationAndPushTaskUtils.getInputPinotFS(taskConfigs, inputFileURI);<NEW_LINE>File localInputTempDir = new File(localTempDir, "input");<NEW_LINE>FileUtils.forceMkdir(localInputTempDir);<NEW_LINE>File localOutputTempDir = new File(localTempDir, "output");<NEW_LINE>FileUtils.forceMkdir(localOutputTempDir);<NEW_LINE>taskSpec.setOutputDirectoryPath(localOutputTempDir.getAbsolutePath());<NEW_LINE>// copy input path to local<NEW_LINE>File localInputDataFile = new File(localInputTempDir, new File(inputFileURI.getPath()).getName());<NEW_LINE>inputFileFS.copyToLocalFile(inputFileURI, localInputDataFile);<NEW_LINE>taskSpec.setInputFilePath(localInputDataFile.getAbsolutePath());<NEW_LINE>RecordReaderSpec recordReaderSpec = new RecordReaderSpec();<NEW_LINE>recordReaderSpec.setDataFormat(taskConfigs<MASK><NEW_LINE>recordReaderSpec.setClassName(taskConfigs.get(BatchConfigProperties.RECORD_READER_CLASS));<NEW_LINE>recordReaderSpec.setConfigClassName(taskConfigs.get(BatchConfigProperties.RECORD_READER_CONFIG_CLASS));<NEW_LINE>taskSpec.setRecordReaderSpec(recordReaderSpec);<NEW_LINE>String authToken = taskConfigs.get(BatchConfigProperties.AUTH_TOKEN);<NEW_LINE>String tableNameWithType = taskConfigs.get(BatchConfigProperties.TABLE_NAME);<NEW_LINE>Schema schema;<NEW_LINE>if (taskConfigs.containsKey(BatchConfigProperties.SCHEMA)) {<NEW_LINE>schema = JsonUtils.stringToObject(JsonUtils.objectToString(taskConfigs.get(BatchConfigProperties.SCHEMA)), Schema.class);<NEW_LINE>} else if (taskConfigs.containsKey(BatchConfigProperties.SCHEMA_URI)) {<NEW_LINE>schema = SegmentGenerationUtils.getSchema(taskConfigs.get(BatchConfigProperties.SCHEMA_URI), authToken);<NEW_LINE>} else {<NEW_LINE>schema = getSchema(tableNameWithType);<NEW_LINE>}<NEW_LINE>taskSpec.setSchema(schema);<NEW_LINE>TableConfig tableConfig;<NEW_LINE>if (taskConfigs.containsKey(BatchConfigProperties.TABLE_CONFIGS)) {<NEW_LINE>tableConfig = JsonUtils.stringToObject(taskConfigs.get(BatchConfigProperties.TABLE_CONFIGS), TableConfig.class);<NEW_LINE>} else if (taskConfigs.containsKey(BatchConfigProperties.TABLE_CONFIGS_URI)) {<NEW_LINE>tableConfig = SegmentGenerationUtils.getTableConfig(taskConfigs.get(BatchConfigProperties.TABLE_CONFIGS_URI), authToken);<NEW_LINE>} else {<NEW_LINE>tableConfig = getTableConfig(tableNameWithType);<NEW_LINE>}<NEW_LINE>taskSpec.setTableConfig(tableConfig);<NEW_LINE>taskSpec.setSequenceId(Integer.parseInt(taskConfigs.get(BatchConfigProperties.SEQUENCE_ID)));<NEW_LINE>if (taskConfigs.containsKey(BatchConfigProperties.FAIL_ON_EMPTY_SEGMENT)) {<NEW_LINE>taskSpec.setFailOnEmptySegment(Boolean.parseBoolean(taskConfigs.get(BatchConfigProperties.FAIL_ON_EMPTY_SEGMENT)));<NEW_LINE>}<NEW_LINE>SegmentNameGeneratorSpec segmentNameGeneratorSpec = new SegmentNameGeneratorSpec();<NEW_LINE>segmentNameGeneratorSpec.setType(taskConfigs.get(BatchConfigProperties.SEGMENT_NAME_GENERATOR_TYPE));<NEW_LINE>segmentNameGeneratorSpec.setConfigs(IngestionConfigUtils.getConfigMapWithPrefix(taskConfigs, BatchConfigProperties.SEGMENT_NAME_GENERATOR_PROP_PREFIX));<NEW_LINE>taskSpec.setSegmentNameGeneratorSpec(segmentNameGeneratorSpec);<NEW_LINE>taskSpec.setCustomProperty(BatchConfigProperties.INPUT_DATA_FILE_URI_KEY, inputFileURI.toString());<NEW_LINE>return taskSpec;<NEW_LINE>}
.get(BatchConfigProperties.INPUT_FORMAT));
1,737,060
public ListenableFuture<Triple<byte[], byte[], String>> encryptAsync(final byte[] plaintext, final byte[] iv, final byte[] authenticationData, final String algorithm) throws NoSuchAlgorithmException {<NEW_LINE>if (plaintext == null) {<NEW_LINE>throw new IllegalArgumentException("plaintext");<NEW_LINE>}<NEW_LINE>if (iv == null) {<NEW_LINE>throw new IllegalArgumentException("iv");<NEW_LINE>}<NEW_LINE>// Interpret the algorithm<NEW_LINE>String algorithmName = (Strings.isNullOrWhiteSpace(algorithm)) ? getDefaultEncryptionAlgorithm() : algorithm;<NEW_LINE>Algorithm baseAlgorithm = <MASK><NEW_LINE>if (baseAlgorithm == null || !(baseAlgorithm instanceof SymmetricEncryptionAlgorithm)) {<NEW_LINE>throw new NoSuchAlgorithmException(algorithm);<NEW_LINE>}<NEW_LINE>SymmetricEncryptionAlgorithm algo = (SymmetricEncryptionAlgorithm) baseAlgorithm;<NEW_LINE>ICryptoTransform transform = null;<NEW_LINE>try {<NEW_LINE>transform = algo.CreateEncryptor(key, iv, authenticationData, provider);<NEW_LINE>} catch (Exception e) {<NEW_LINE>return Futures.immediateFailedFuture(e);<NEW_LINE>}<NEW_LINE>byte[] cipherText = null;<NEW_LINE>try {<NEW_LINE>cipherText = transform.doFinal(plaintext);<NEW_LINE>} catch (Exception e) {<NEW_LINE>return Futures.immediateFailedFuture(e);<NEW_LINE>}<NEW_LINE>byte[] authenticationTag = null;<NEW_LINE>if (transform instanceof IAuthenticatedCryptoTransform) {<NEW_LINE>IAuthenticatedCryptoTransform authenticatedTransform = (IAuthenticatedCryptoTransform) transform;<NEW_LINE>authenticationTag = authenticatedTransform.getTag().clone();<NEW_LINE>}<NEW_LINE>return Futures.immediateFuture(Triple.of(cipherText, authenticationTag, algorithm));<NEW_LINE>}
AlgorithmResolver.Default.get(algorithmName);
1,304,076
private void passThrough(HostMessage msg) {<NEW_LINE>HostVO vo = dbf.findByUuid(msg.getHostUuid(), HostVO.class);<NEW_LINE>if (vo == null && allowedMessageAfterSoftDeletion.contains(msg.getClass())) {<NEW_LINE>HostEO eo = dbf.findByUuid(msg.<MASK><NEW_LINE>vo = ObjectUtils.newAndCopy(eo, HostVO.class);<NEW_LINE>}<NEW_LINE>if (vo == null) {<NEW_LINE>ErrorCode err = Platform.err(SysErrors.RESOURCE_NOT_FOUND, "cannot find host[uuid:%s], it may have been deleted", msg.getHostUuid());<NEW_LINE>throw new OperationFailureException(err);<NEW_LINE>}<NEW_LINE>HypervisorFactory factory = this.getHypervisorFactory(HypervisorType.valueOf(vo.getHypervisorType()));<NEW_LINE>Host host = factory.getHost(vo);<NEW_LINE>host.handleMessage((Message) msg);<NEW_LINE>}
getHostUuid(), HostEO.class);
1,601,352
protected ActionResult<List<Wo>> execute(HttpServletRequest request, EffectivePerson effectivePerson, String id, Integer count, String appId, JsonElement jsonElement) {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>EqualsTerms equals = new EqualsTerms();<NEW_LINE>LikeTerms likes = new LikeTerms();<NEW_LINE>Wi wrapIn = null;<NEW_LINE>Boolean check = true;<NEW_LINE>WrapCopier<Form, Wo> copier = WrapCopierFactory.wo(Form.class, Wo.class, null, Wo.excludes);<NEW_LINE>try {<NEW_LINE>wrapIn = this.<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>check = false;<NEW_LINE>Exception exception = new ExceptionWrapInConvert(e, jsonElement);<NEW_LINE>result.error(exception);<NEW_LINE>logger.error(e, effectivePerson, request, null);<NEW_LINE>}<NEW_LINE>if (check) {<NEW_LINE>try {<NEW_LINE>equals.put("appId", appId);<NEW_LINE>if ((null != wrapIn.getCategoryIdList()) && (!wrapIn.getCategoryIdList().isEmpty())) {<NEW_LINE>equals.put("categoryId", wrapIn.getCategoryIdList().get(0));<NEW_LINE>}<NEW_LINE>if ((null != wrapIn.getCreatorList()) && (!wrapIn.getCreatorList().isEmpty())) {<NEW_LINE>equals.put("creatorUid", wrapIn.getCreatorList().get(0));<NEW_LINE>}<NEW_LINE>if ((null != wrapIn.getStatusList()) && (!wrapIn.getStatusList().isEmpty())) {<NEW_LINE>equals.put("docStatus", wrapIn.getStatusList().get(0));<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(wrapIn.getKey())) {<NEW_LINE>String key = StringUtils.trim(StringUtils.replace(wrapIn.getKey(), "\u3000", " "));<NEW_LINE>if (StringUtils.isNotEmpty(key)) {<NEW_LINE>likes.put("title", key);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result = this.standardListNext(copier, id, count, "sequence", equals, null, likes, null, null, null, null, null, true, DESC);<NEW_LINE>} catch (Throwable th) {<NEW_LINE>th.printStackTrace();<NEW_LINE>result.error(th);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
convertToWrapIn(jsonElement, Wi.class);
1,426,839
protected InstanceProperties updateOMRSAttributes(Classification omasClassification) {<NEW_LINE>InstanceProperties instanceProperties = new InstanceProperties();<NEW_LINE>Criticality criticality = (Criticality) omasClassification;<NEW_LINE>if (criticality.getSteward() != null) {<NEW_LINE>repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(), instanceProperties, "steward", criticality.getSteward(), "updateOMRSAttributes");<NEW_LINE>}<NEW_LINE>if (criticality.getSource() != null) {<NEW_LINE>repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(), instanceProperties, "source", criticality.getSource(), "updateOMRSAttributes");<NEW_LINE>}<NEW_LINE>if (criticality.getNotes() != null) {<NEW_LINE>repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(), instanceProperties, "notes", criticality.getNotes(), "updateOMRSAttributes");<NEW_LINE>}<NEW_LINE>if (criticality.getConfidence() != null) {<NEW_LINE>PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue();<NEW_LINE>primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_INT);<NEW_LINE>primitivePropertyValue.<MASK><NEW_LINE>instanceProperties.setProperty("confidence", primitivePropertyValue);<NEW_LINE>}<NEW_LINE>if (criticality.getLevel() != null) {<NEW_LINE>EnumPropertyValue enumPropertyValue = new EnumPropertyValue();<NEW_LINE>enumPropertyValue.setOrdinal(criticality.getLevel().getOrdinal());<NEW_LINE>enumPropertyValue.setSymbolicName(criticality.getLevel().getName());<NEW_LINE>instanceProperties.setProperty("level", enumPropertyValue);<NEW_LINE>}<NEW_LINE>return instanceProperties;<NEW_LINE>}
setPrimitiveValue(criticality.getConfidence());
114,257
public void didOpen(DidOpenTextDocumentParams params) {<NEW_LINE>String fileUri = params.getTextDocument().getUri();<NEW_LINE>try {<NEW_LINE>DocumentServiceContext context = ContextBuilder.buildDocumentServiceContext(CommonUtil.convertUriSchemeFromBala(fileUri), this.workspaceManagerProxy.get(fileUri), LSContextOperation.TXT_DID_OPEN, this.serverContext);<NEW_LINE>this.workspaceManagerProxy.didOpen(params);<NEW_LINE>this.clientLogger.logTrace("Operation '" + LSContextOperation.TXT_DID_OPEN.getName() + "' {fileUri: '" + fileUri + "'} opened");<NEW_LINE>DiagnosticsHelper diagnosticsHelper = DiagnosticsHelper.getInstance(this.serverContext);<NEW_LINE>diagnosticsHelper.schedulePublishDiagnostics(this.languageServer.getClient(), context);<NEW_LINE>LSClientUtil.chekAndRegisterCommands(context);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>String msg = "Operation 'text/didOpen' failed!";<NEW_LINE>TextDocumentIdentifier identifier = new TextDocumentIdentifier(params.getTextDocument().getUri());<NEW_LINE>this.clientLogger.logError(LSContextOperation.TXT_DID_OPEN, msg, e<MASK><NEW_LINE>}<NEW_LINE>}
, identifier, (Position) null);
577,743
private void handleColumn(TopLevelClass topLevelClass, InnerClass innerClass, IntrospectedColumn column, String tableFieldName) {<NEW_LINE>topLevelClass.<MASK><NEW_LINE>FullyQualifiedJavaType javaType;<NEW_LINE>if (column.getFullyQualifiedJavaType().isPrimitive()) {<NEW_LINE>javaType = column.getFullyQualifiedJavaType().getPrimitiveTypeWrapper();<NEW_LINE>} else {<NEW_LINE>javaType = column.getFullyQualifiedJavaType();<NEW_LINE>}<NEW_LINE>FullyQualifiedJavaType fieldType = calculateFieldType(javaType);<NEW_LINE>String fieldName = column.getJavaProperty();<NEW_LINE>if (fieldName.equals(tableFieldName)) {<NEW_LINE>// name collision, skip the shortcut field<NEW_LINE>// $NON-NLS-1$<NEW_LINE>warnings.// $NON-NLS-1$<NEW_LINE>add(// $NON-NLS-1$<NEW_LINE>Messages.// $NON-NLS-1$<NEW_LINE>getString("Warning.29", fieldName, topLevelClass.getType().getFullyQualifiedName()));<NEW_LINE>} else {<NEW_LINE>// shortcut field<NEW_LINE>Field field = new Field(fieldName, fieldType);<NEW_LINE>field.setVisibility(JavaVisibility.PUBLIC);<NEW_LINE>field.setStatic(true);<NEW_LINE>field.setFinal(true);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>field.setInitializationString(tableFieldName + "." + fieldName);<NEW_LINE>commentGenerator.addFieldAnnotation(field, introspectedTable, column, topLevelClass.getImportedTypes());<NEW_LINE>topLevelClass.addField(field);<NEW_LINE>}<NEW_LINE>// inner class field<NEW_LINE>Field field = new Field(fieldName, fieldType);<NEW_LINE>field.setVisibility(JavaVisibility.PUBLIC);<NEW_LINE>field.setFinal(true);<NEW_LINE>field.setInitializationString(calculateInnerInitializationString(column, javaType));<NEW_LINE>innerClass.addField(field);<NEW_LINE>}
addImportedType(column.getFullyQualifiedJavaType());
379,862
final AssociateHostedConnectionResult executeAssociateHostedConnection(AssociateHostedConnectionRequest associateHostedConnectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateHostedConnectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AssociateHostedConnectionRequest> request = null;<NEW_LINE>Response<AssociateHostedConnectionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new AssociateHostedConnectionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(associateHostedConnectionRequest));<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, "Direct Connect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateHostedConnection");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<AssociateHostedConnectionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new AssociateHostedConnectionResultJsonUnmarshaller());
1,661,752
public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.<MASK><NEW_LINE>env.compileDeploy("@name('s0') select " + "varaggESC.keys()," + "varaggESC[p00].theEvents," + "varaggESC[p00]," + "varaggESC[p00].theEvents.last(*)," + "varaggESC[p00].theEvents.window(*).take(1) from SupportBean_S0", path);<NEW_LINE>Object[][] expectedAggType = new Object[][] { { "varaggESC.keys()", Object[].class }, { "varaggESC[p00].theEvents", SupportBean[].class }, { "varaggESC[p00]", Map.class }, { "varaggESC[p00].theEvents.last(*)", SupportBean.class }, { "varaggESC[p00].theEvents.window(*).take(1)", Collection.class } };<NEW_LINE>env.assertStatement("s0", statement -> {<NEW_LINE>EventType eventType = statement.getEventType();<NEW_LINE>SupportEventTypeAssertionUtil.assertEventTypeProperties(expectedAggType, eventType, SupportEventTypeAssertionEnum.NAME, SupportEventTypeAssertionEnum.TYPE);<NEW_LINE>});<NEW_LINE>env.undeployAll();<NEW_LINE>}
compileDeploy("@public create table varaggESC (" + "key string primary key, theEvents window(*) @type(SupportBean))", path);
1,465,647
public int sendMessageAsync(Message message) {<NEW_LINE>OtrChatManager cm = OtrChatManager.getInstance();<NEW_LINE>SessionID sId = cm.getSessionId(message.getFrom().getAddress(), mParticipant.getAddress().getAddress());<NEW_LINE>SessionStatus otrStatus = cm.getSessionStatus(sId);<NEW_LINE>message.setTo(new XmppAddress(sId.getRemoteUserId()));<NEW_LINE>if (otrStatus == SessionStatus.ENCRYPTED) {<NEW_LINE>boolean verified = cm.getKeyManager().isVerified(sId);<NEW_LINE>if (verified) {<NEW_LINE>message.setType(Imps.MessageType.OUTGOING_ENCRYPTED_VERIFIED);<NEW_LINE>} else {<NEW_LINE>message.setType(Imps.MessageType.OUTGOING_ENCRYPTED);<NEW_LINE>}<NEW_LINE>} else if (otrStatus == SessionStatus.FINISHED) {<NEW_LINE>message.<MASK><NEW_LINE>// onSendMessageError(message, new ImErrorInfo(ImErrorInfo.INVALID_SESSION_CONTEXT,"error - session finished"));<NEW_LINE>return message.getType();<NEW_LINE>} else {<NEW_LINE>// not encrypted, send to all<NEW_LINE>// message.setTo(new XmppAddress(XmppAddress.stripResource(sId.getRemoteUserId())));<NEW_LINE>message.setType(Imps.MessageType.OUTGOING);<NEW_LINE>}<NEW_LINE>mHistoryMessages.add(message);<NEW_LINE>boolean canSend = cm.transformSending(message);<NEW_LINE>if (canSend) {<NEW_LINE>mManager.sendMessageAsync(this, message);<NEW_LINE>} else {<NEW_LINE>// can't be sent due to OTR state<NEW_LINE>message.setType(Imps.MessageType.POSTPONED);<NEW_LINE>}<NEW_LINE>return message.getType();<NEW_LINE>}
setType(Imps.MessageType.POSTPONED);
1,058,270
void constructA678() {<NEW_LINE>final int N = X1.numRows;<NEW_LINE>// Pseudo-inverse of hat(p)<NEW_LINE>computePseudo(X1, P_plus);<NEW_LINE>DMatrixRMaj PPpXP = new DMatrixRMaj(1, 1);<NEW_LINE>DMatrixRMaj PPpYP = new DMatrixRMaj(1, 1);<NEW_LINE>computePPXP(X1, P_plus, X2, 0, PPpXP);<NEW_LINE>computePPXP(X1, P_plus, X2, 1, PPpYP);<NEW_LINE>DMatrixRMaj PPpX = new DMatrixRMaj(1, 1);<NEW_LINE>DMatrixRMaj PPpY = new DMatrixRMaj(1, 1);<NEW_LINE>computePPpX(X1, P_plus, X2, 0, PPpX);<NEW_LINE>computePPpX(X1, P_plus, X2, 1, PPpY);<NEW_LINE>// ============ Equations 20<NEW_LINE>computeEq20(X2, X1, XP_bar);<NEW_LINE>// ============ Equation 21<NEW_LINE>A.reshape(N * 2, 3);<NEW_LINE>double XP_bar_x = XP_bar[0];<NEW_LINE>double XP_bar_y = XP_bar[1];<NEW_LINE>double YP_bar_x = XP_bar[2];<NEW_LINE>double YP_bar_y = XP_bar[3];<NEW_LINE>// Compute the top half of A<NEW_LINE>for (int i = 0, index = 0, indexA = 0; i < N; i++, index += 2) {<NEW_LINE>// X'<NEW_LINE>double x = -X2.data[i * 2];<NEW_LINE>// hat{P}[0]<NEW_LINE>double P_hat_x = X1.data[index];<NEW_LINE>// hat{P}[1]<NEW_LINE>double P_hat_y = X1.data[index + 1];<NEW_LINE>// x'*hat{p} - bar{X*P} - PPpXP<NEW_LINE>A.data[indexA++] = x * P_hat_x - <MASK><NEW_LINE>A.data[indexA++] = x * P_hat_y - XP_bar_y - PPpXP.data[index + 1];<NEW_LINE>// X'*1 - PPx1<NEW_LINE>A.data[indexA++] = x - PPpX.data[i];<NEW_LINE>}<NEW_LINE>// Compute the bottom half of A<NEW_LINE>for (int i = 0, index = 0, indexA = N * 3; i < N; i++, index += 2) {<NEW_LINE>double x = -X2.data[i * 2 + 1];<NEW_LINE>double P_hat_x = X1.data[index];<NEW_LINE>double P_hat_y = X1.data[index + 1];<NEW_LINE>// x'*hat{p} - bar{X*P} - PPpXP<NEW_LINE>A.data[indexA++] = x * P_hat_x - YP_bar_x - PPpYP.data[index];<NEW_LINE>A.data[indexA++] = x * P_hat_y - YP_bar_y - PPpYP.data[index + 1];<NEW_LINE>// X'*1 - PPx1<NEW_LINE>A.data[indexA++] = x - PPpY.data[i];<NEW_LINE>}<NEW_LINE>}
XP_bar_x - PPpXP.data[index];
526,312
private static void generateCodeCtor(StringBuilder builder, String className, boolean isInnerClass, CodegenCtor optionalCtor, Map<Class, String> imports, int additionalIndent) {<NEW_LINE>if (optionalCtor == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean hasAssignments = false;<NEW_LINE>for (CodegenTypedParam param : optionalCtor.getCtorParams()) {<NEW_LINE>if (param.isMemberWhenCtorParam()) {<NEW_LINE>hasAssignments = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (optionalCtor.getBlock().isEmpty() && !hasAssignments && optionalCtor.getCtorParams().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>INDENT.indent(builder, 1 + additionalIndent);<NEW_LINE>builder.append("public ").append(className).append("(");<NEW_LINE>String delimiter = "";<NEW_LINE>// parameters<NEW_LINE>if (optionalCtor != null) {<NEW_LINE>for (CodegenTypedParam param : optionalCtor.getCtorParams()) {<NEW_LINE>builder.append(delimiter);<NEW_LINE>param.renderAsParameter(builder, imports);<NEW_LINE>delimiter = ",";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>builder.append("){\n");<NEW_LINE>// code assigning parameters<NEW_LINE>if (optionalCtor != null) {<NEW_LINE>for (CodegenTypedParam param : optionalCtor.getCtorParams()) {<NEW_LINE>if (param.isMemberWhenCtorParam()) {<NEW_LINE>INDENT.<MASK><NEW_LINE>builder.append("this.").append(param.getName()).append("=").append(param.getName()).append(";\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (optionalCtor != null) {<NEW_LINE>optionalCtor.getBlock().render(builder, imports, isInnerClass, 2 + additionalIndent, INDENT);<NEW_LINE>}<NEW_LINE>INDENT.indent(builder, 1 + additionalIndent);<NEW_LINE>builder.append("}\n");<NEW_LINE>builder.append("\n");<NEW_LINE>}
indent(builder, 2 + additionalIndent);
923,761
protected PackageTree generatePackageTree() throws IOException {<NEW_LINE>PrintOptions options = getParameters().getPrintOptions().get();<NEW_LINE>Deobfuscator deobfuscator = Deobfuscator.create(getParameters().getMappingFile().<MASK><NEW_LINE>File inputFile = getParameters().getInputFile().getAsFile().get();<NEW_LINE>String fileName = inputFile.getName();<NEW_LINE>boolean isApk = fileName.endsWith(".apk");<NEW_LINE>boolean isAar = fileName.endsWith(".aar");<NEW_LINE>boolean isJar = fileName.endsWith(".jar");<NEW_LINE>boolean isAndroid = isApk || isAar;<NEW_LINE>if (!isApk && !isAar && !isJar) {<NEW_LINE>throw new IllegalStateException("File type is unclear: " + fileName);<NEW_LINE>}<NEW_LINE>PackageTree tree = new PackageTree(deobfuscator);<NEW_LINE>if (isAndroid) {<NEW_LINE>List<SourceFile> sourceFiles = SourceFiles.extractDexData(inputFile);<NEW_LINE>try {<NEW_LINE>sourceFiles.stream().flatMap(f -> f.getMethodRefs().stream()).forEach(tree::addMethodRef);<NEW_LINE>sourceFiles.stream().flatMap(f -> f.getFieldRefs().stream()).forEach(tree::addFieldRef);<NEW_LINE>} finally {<NEW_LINE>IOUtils.closeQuietly(sourceFiles.toArray(new SourceFile[0]));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>SourceFile jar = null;<NEW_LINE>if (isAar && options.getPrintDeclarations()) {<NEW_LINE>jar = SourceFiles.extractJarFromAar(inputFile);<NEW_LINE>} else if (isJar && options.getPrintDeclarations()) {<NEW_LINE>jar = SourceFiles.extractJarFromJar(inputFile);<NEW_LINE>}<NEW_LINE>if (jar != null) {<NEW_LINE>try {<NEW_LINE>jar.getMethodRefs().forEach(tree::addDeclaredMethodRef);<NEW_LINE>jar.getFieldRefs().forEach(tree::addDeclaredFieldRef);<NEW_LINE>} finally {<NEW_LINE>IOUtils.closeQuietly(jar);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return tree;<NEW_LINE>}
getAsFile().getOrNull());
1,619,399
public static DescribeSitePairsResponse unmarshall(DescribeSitePairsResponse describeSitePairsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSitePairsResponse.setRequestId(_ctx.stringValue("DescribeSitePairsResponse.RequestId"));<NEW_LINE>describeSitePairsResponse.setSuccess(_ctx.booleanValue("DescribeSitePairsResponse.Success"));<NEW_LINE>describeSitePairsResponse.setCode(_ctx.stringValue("DescribeSitePairsResponse.Code"));<NEW_LINE>describeSitePairsResponse.setMessage(_ctx.stringValue("DescribeSitePairsResponse.Message"));<NEW_LINE>describeSitePairsResponse.setTotalCount(_ctx.integerValue("DescribeSitePairsResponse.TotalCount"));<NEW_LINE>describeSitePairsResponse.setPageNumber(_ctx.integerValue("DescribeSitePairsResponse.PageNumber"));<NEW_LINE>describeSitePairsResponse.setPageSize(_ctx.integerValue("DescribeSitePairsResponse.PageSize"));<NEW_LINE>List<SitePair> sitePairs = new ArrayList<SitePair>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeSitePairsResponse.SitePairs.Length"); i++) {<NEW_LINE>SitePair sitePair = new SitePair();<NEW_LINE>sitePair.setSitePairId(_ctx.stringValue<MASK><NEW_LINE>sitePair.setSitePairType(_ctx.stringValue("DescribeSitePairsResponse.SitePairs[" + i + "].SitePairType"));<NEW_LINE>sitePair.setLocalSiteName(_ctx.stringValue("DescribeSitePairsResponse.SitePairs[" + i + "].LocalSiteName"));<NEW_LINE>sitePair.setCloudSiteName(_ctx.stringValue("DescribeSitePairsResponse.SitePairs[" + i + "].CloudSiteName"));<NEW_LINE>sitePair.setPrimarySiteId(_ctx.stringValue("DescribeSitePairsResponse.SitePairs[" + i + "].PrimarySiteId"));<NEW_LINE>sitePair.setSecondarySiteId(_ctx.stringValue("DescribeSitePairsResponse.SitePairs[" + i + "].SecondarySiteId"));<NEW_LINE>sitePair.setPrimarySiteName(_ctx.stringValue("DescribeSitePairsResponse.SitePairs[" + i + "].PrimarySiteName"));<NEW_LINE>sitePair.setSecondarySiteName(_ctx.stringValue("DescribeSitePairsResponse.SitePairs[" + i + "].SecondarySiteName"));<NEW_LINE>sitePair.setBucketName(_ctx.stringValue("DescribeSitePairsResponse.SitePairs[" + i + "].BucketName"));<NEW_LINE>sitePair.setCreatedTime(_ctx.longValue("DescribeSitePairsResponse.SitePairs[" + i + "].CreatedTime"));<NEW_LINE>sitePair.setBucketSize(_ctx.longValue("DescribeSitePairsResponse.SitePairs[" + i + "].BucketSize"));<NEW_LINE>sitePair.setUpgradeStatus(_ctx.stringValue("DescribeSitePairsResponse.SitePairs[" + i + "].UpgradeStatus"));<NEW_LINE>sitePair.setServerCount(_ctx.integerValue("DescribeSitePairsResponse.SitePairs[" + i + "].ServerCount"));<NEW_LINE>sitePairs.add(sitePair);<NEW_LINE>}<NEW_LINE>describeSitePairsResponse.setSitePairs(sitePairs);<NEW_LINE>return describeSitePairsResponse;<NEW_LINE>}
("DescribeSitePairsResponse.SitePairs[" + i + "].SitePairId"));
174,510
protected Control createDialogArea(Composite parent) {<NEW_LINE><MASK><NEW_LINE>Composite group = (Composite) super.createDialogArea(parent);<NEW_LINE>GridData gd = new GridData(GridData.FILL_BOTH);<NEW_LINE>group.setLayoutData(gd);<NEW_LINE>Label infoLabel = new Label(group, SWT.NONE);<NEW_LINE>infoLabel.setText("Content was modified in mutliple editors. Choose correct one:");<NEW_LINE>gd = new GridData(GridData.FILL_HORIZONTAL);<NEW_LINE>infoLabel.setLayoutData(gd);<NEW_LINE>final Combo combo = new Combo(group, SWT.READ_ONLY | SWT.DROP_DOWN);<NEW_LINE>gd = new GridData(GridData.FILL_HORIZONTAL);<NEW_LINE>combo.setLayoutData(gd);<NEW_LINE>combo.add("");<NEW_LINE>for (IEditorPart part : dirtyParts) {<NEW_LINE>combo.add(part.getTitle());<NEW_LINE>}<NEW_LINE>combo.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>if (combo.getSelectionIndex() >= 1) {<NEW_LINE>selectedPart = dirtyParts.get(combo.getSelectionIndex() - 1);<NEW_LINE>} else {<NEW_LINE>selectedPart = null;<NEW_LINE>}<NEW_LINE>getButton(IDialogConstants.OK_ID).setEnabled(selectedPart != null);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return group;<NEW_LINE>}
getShell().setText("Choose content editor");
536,498
final GetQueueAttributesResult executeGetQueueAttributes(GetQueueAttributesRequest getQueueAttributesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getQueueAttributesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetQueueAttributesRequest> request = null;<NEW_LINE>Response<GetQueueAttributesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetQueueAttributesRequestMarshaller().marshall(super.beforeMarshalling(getQueueAttributesRequest));<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, "SQS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetQueueAttributes");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<GetQueueAttributesResult> responseHandler = new StaxResponseHandler<GetQueueAttributesResult>(new GetQueueAttributesResultStaxUnmarshaller());<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);
889,906
public void marshall(Branch branch, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (branch == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(branch.getBranchArn(), BRANCHARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(branch.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getTags(), TAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getStage(), STAGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getDisplayName(), DISPLAYNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnableNotification(), ENABLENOTIFICATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getCreateTime(), CREATETIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getUpdateTime(), UPDATETIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnvironmentVariables(), ENVIRONMENTVARIABLES_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnableAutoBuild(), ENABLEAUTOBUILD_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getCustomDomains(), CUSTOMDOMAINS_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getFramework(), FRAMEWORK_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getActiveJobId(), ACTIVEJOBID_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getTotalNumberOfJobs(), TOTALNUMBEROFJOBS_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnableBasicAuth(), ENABLEBASICAUTH_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnablePerformanceMode(), ENABLEPERFORMANCEMODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getThumbnailUrl(), THUMBNAILURL_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getBasicAuthCredentials(), BASICAUTHCREDENTIALS_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getBuildSpec(), BUILDSPEC_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getTtl(), TTL_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getAssociatedResources(), ASSOCIATEDRESOURCES_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnablePullRequestPreview(), ENABLEPULLREQUESTPREVIEW_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getPullRequestEnvironmentName(), PULLREQUESTENVIRONMENTNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getDestinationBranch(), DESTINATIONBRANCH_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getSourceBranch(), SOURCEBRANCH_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getBackendEnvironmentArn(), BACKENDENVIRONMENTARN_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
branch.getBranchName(), BRANCHNAME_BINDING);
550,403
ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>FormVersion formVersion = emc.find(id, FormVersion.class);<NEW_LINE>if (null == formVersion) {<NEW_LINE>throw new ExceptionEntityNotExist(id, FormVersion.class);<NEW_LINE>}<NEW_LINE>Form form = emc.find(formVersion.getForm(), Form.class);<NEW_LINE>if (null == form) {<NEW_LINE>throw new ExceptionEntityNotExist(formVersion.getForm(), Form.class);<NEW_LINE>}<NEW_LINE>Application application = emc.find(form.getApplication(), Application.class);<NEW_LINE>if (null == application) {<NEW_LINE>throw new ExceptionEntityNotExist(form.<MASK><NEW_LINE>}<NEW_LINE>if (!business.editable(effectivePerson, application)) {<NEW_LINE>throw new ExceptionAccessDenied(effectivePerson);<NEW_LINE>}<NEW_LINE>Wo wo = Wo.copier.copy(formVersion);<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
getApplication(), Application.class);
1,501,527
public static synchronized void handleMetadataModelException(Class<?> clazz, DatabaseConnection connection, MetadataModelException e, boolean closeConnectionIfBroken) {<NEW_LINE>Logger.getLogger(clazz.getName()).log(Level.FINE, <MASK><NEW_LINE>if (connection == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!connection.isVitalConnection()) {<NEW_LINE>try {<NEW_LINE>if (connection.isConnected() && closeConnectionIfBroken) {<NEW_LINE>String msg = e.getCause().getLocalizedMessage();<NEW_LINE>if (msg.length() > 280) {<NEW_LINE>// NOI18N<NEW_LINE>msg = msg.substring(0, 280) + NbBundle.getMessage(NodeRegistry.class, "NodeRegistry_CloseBrokenConnectionMore");<NEW_LINE>}<NEW_LINE>DialogDisplayer.getDefault().notifyLater(new // NOI18N<NEW_LINE>NotifyDescriptor.Message(// NOI18N<NEW_LINE>NbBundle.// NOI18N<NEW_LINE>getMessage(// NOI18N<NEW_LINE>NodeRegistry.class, "NodeRegistry_CloseBrokenConnection", connection.getName(), msg)));<NEW_LINE>connection.disconnect();<NEW_LINE>}<NEW_LINE>} catch (DatabaseException ex) {<NEW_LINE>Logger.getLogger(clazz.getName()).log(Level.INFO, "While disconnecting a broken connection: " + connection + " was thrown " + ex.getLocalizedMessage(), ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
e.getLocalizedMessage(), e);
1,140,378
protected static AggregationClassAssignmentPerLevel makeRow(boolean isGenerateTableEnter, AggregationCodegenRowLevelDesc rowLevelDesc, Class forgeClass, Consumer<AggregationRowCtorDesc> rowCtorConsumer, CodegenClassScope classScope, List<CodegenInnerClass> innerClasses, AggregationClassNames classNames) {<NEW_LINE>AggregationClassAssignment[] topAssignments = null;<NEW_LINE>if (rowLevelDesc.getOptionalTopRow() != null) {<NEW_LINE>topAssignments = makeRowForLevel(isGenerateTableEnter, classNames.getRowTop(), rowLevelDesc.getOptionalTopRow(), forgeClass, rowCtorConsumer, classScope, innerClasses);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (rowLevelDesc.getOptionalAdditionalRows() != null) {<NEW_LINE>leafAssignments = new AggregationClassAssignment[rowLevelDesc.getOptionalAdditionalRows().length][];<NEW_LINE>for (int i = 0; i < rowLevelDesc.getOptionalAdditionalRows().length; i++) {<NEW_LINE>String className = classNames.getRowPerLevel(i);<NEW_LINE>leafAssignments[i] = makeRowForLevel(isGenerateTableEnter, className, rowLevelDesc.getOptionalAdditionalRows()[i], forgeClass, rowCtorConsumer, classScope, innerClasses);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new AggregationClassAssignmentPerLevel(topAssignments, leafAssignments);<NEW_LINE>}
AggregationClassAssignment[][] leafAssignments = null;
850,014
private void printLabel(final DeliveryOrder deliveryOrder, final PackageLabel packageLabel, @NonNull final DeliveryOrderRepository deliveryOrderRepo, @Nullable final AsyncBatchId asyncBatchId) {<NEW_LINE>final IArchiveStorageFactory archiveStorageFactory = Services.get(IArchiveStorageFactory.class);<NEW_LINE>final String fileExtWithDot = MimeType.getExtensionByType(packageLabel.getContentType());<NEW_LINE>final String fileName = CoalesceUtil.firstNotEmptyTrimmed(packageLabel.getFileName(), packageLabel.getType().toString()) + fileExtWithDot;<NEW_LINE>final byte[] labelData = packageLabel.getLabelData();<NEW_LINE>final <MASK><NEW_LINE>final IArchiveStorage archiveStorage = archiveStorageFactory.getArchiveStorage(ctx);<NEW_LINE>final I_AD_Archive archive = InterfaceWrapperHelper.create(archiveStorage.newArchive(ctx, ITrx.TRXNAME_ThreadInherited), I_AD_Archive.class);<NEW_LINE>final ITableRecordReference deliveryOrderRef = deliveryOrderRepo.toTableRecordReference(deliveryOrder);<NEW_LINE>archive.setAD_Table_ID(deliveryOrderRef.getAD_Table_ID());<NEW_LINE>archive.setRecord_ID(deliveryOrderRef.getRecord_ID());<NEW_LINE>archive.setC_BPartner_ID(deliveryOrder.getDeliveryAddress().getBpartnerId());<NEW_LINE>// archive.setAD_Org_ID(); // TODO: do we need to orgId too?<NEW_LINE>archive.setName(fileName);<NEW_LINE>archiveStorage.setBinaryData(archive, labelData);<NEW_LINE>archive.setIsReport(false);<NEW_LINE>archive.setIsDirectEnqueue(true);<NEW_LINE>archive.setIsDirectProcessQueueItem(true);<NEW_LINE>archive.setC_Async_Batch_ID(AsyncBatchId.toRepoId(asyncBatchId));<NEW_LINE>InterfaceWrapperHelper.save(archive);<NEW_LINE>}
Properties ctx = Env.getCtx();
165,061
public void parseJsonQuery(String json, FeatureHandler<String> featureHandler, FeatureHandler<Long> rangeFeatureHandler) throws IllegalArgumentException {<NEW_LINE>try (JsonParser parser = factory.createParser(json)) {<NEW_LINE><MASK><NEW_LINE>while (parser.nextToken() != JsonToken.END_OBJECT) {<NEW_LINE>String fieldName = parser.getCurrentName();<NEW_LINE>switch(fieldName) {<NEW_LINE>case "features":<NEW_LINE>parseFeatures(parser, JsonParser::getText, featureHandler);<NEW_LINE>break;<NEW_LINE>case "rangeFeatures":<NEW_LINE>parseFeatures(parser, JsonParser::getLongValue, rangeFeatureHandler);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException("Invalid field name: " + fieldName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new AssertionError("This should never happen when parsing from a String", e);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IllegalArgumentException(String.format("Parsing query from JSON failed: '%s'", json), e);<NEW_LINE>}<NEW_LINE>}
skipToken(parser, JsonToken.START_OBJECT);
889,906
public void marshall(Branch branch, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (branch == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(branch.getBranchArn(), BRANCHARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getBranchName(), BRANCHNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getTags(), TAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getStage(), STAGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getDisplayName(), DISPLAYNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnableNotification(), ENABLENOTIFICATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getCreateTime(), CREATETIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getUpdateTime(), UPDATETIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnvironmentVariables(), ENVIRONMENTVARIABLES_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnableAutoBuild(), ENABLEAUTOBUILD_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getCustomDomains(), CUSTOMDOMAINS_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getFramework(), FRAMEWORK_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getActiveJobId(), ACTIVEJOBID_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getTotalNumberOfJobs(), TOTALNUMBEROFJOBS_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnableBasicAuth(), ENABLEBASICAUTH_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnablePerformanceMode(), ENABLEPERFORMANCEMODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getThumbnailUrl(), THUMBNAILURL_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getBasicAuthCredentials(), BASICAUTHCREDENTIALS_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getBuildSpec(), BUILDSPEC_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getTtl(), TTL_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getAssociatedResources(), ASSOCIATEDRESOURCES_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getEnablePullRequestPreview(), ENABLEPULLREQUESTPREVIEW_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(branch.getDestinationBranch(), DESTINATIONBRANCH_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getSourceBranch(), SOURCEBRANCH_BINDING);<NEW_LINE>protocolMarshaller.marshall(branch.getBackendEnvironmentArn(), BACKENDENVIRONMENTARN_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
branch.getPullRequestEnvironmentName(), PULLREQUESTENVIRONMENTNAME_BINDING);
371,181
static FileObject copyBuildScript(@NonNull final Project project) throws IOException {<NEW_LINE>final FileObject projDir = project.getProjectDirectory();<NEW_LINE>FileObject rpBuildScript = projDir.getFileObject(BUILD_SCRIPT_PATH);<NEW_LINE>if (rpBuildScript != null && !isBuildScriptUpToDate(project)) {<NEW_LINE>// try to close the file just in case the file is already opened in editor<NEW_LINE>DataObject dobj = DataObject.find(rpBuildScript);<NEW_LINE>CloseCookie closeCookie = dobj.getLookup().lookup(CloseCookie.class);<NEW_LINE>if (closeCookie != null) {<NEW_LINE>closeCookie.close();<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>final FileObject <MASK><NEW_LINE>// NOI18N<NEW_LINE>final FileObject backupFile = nbproject.getFileObject(BUILD_SCRIPT_BACK_UP, "xml");<NEW_LINE>if (backupFile != null) {<NEW_LINE>backupFile.delete();<NEW_LINE>}<NEW_LINE>FileUtil.moveFile(rpBuildScript, nbproject, BUILD_SCRIPT_BACK_UP);<NEW_LINE>rpBuildScript = null;<NEW_LINE>}<NEW_LINE>if (rpBuildScript == null) {<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.// NOI18N<NEW_LINE>log(// NOI18N<NEW_LINE>Level.FINE, "Updating remote build script in project {0} ({1})", new Object[] { ProjectUtils.getInformation(project).getDisplayName(), FileUtil.getFileDisplayName(projDir) });<NEW_LINE>}<NEW_LINE>rpBuildScript = FileUtil.createData(project.getProjectDirectory(), BUILD_SCRIPT_PATH);<NEW_LINE>try (final InputStream in = new BufferedInputStream(RemotePlatformProjectSaver.class.getResourceAsStream(BUILD_SCRIPT_PROTOTYPE));<NEW_LINE>final OutputStream out = new BufferedOutputStream(rpBuildScript.getOutputStream())) {<NEW_LINE>FileUtil.copy(in, out);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return rpBuildScript;<NEW_LINE>}
nbproject = projDir.getFileObject("nbproject");
596,316
public void addRootPropertiesToBundle(String theId, @Nonnull BundleLinks theBundleLinks, Integer theTotalResults, IPrimitiveType<Date> theLastUpdated) {<NEW_LINE>ensureBundle();<NEW_LINE>if (myBundle.getIdElement().isEmpty()) {<NEW_LINE>myBundle.setId(theId);<NEW_LINE>}<NEW_LINE>if (myBundle.getMeta().getLastUpdated() == null && theLastUpdated != null) {<NEW_LINE>InstantType instantType = new InstantType();<NEW_LINE>instantType.setValueAsString(theLastUpdated.getValueAsString());<NEW_LINE>myBundle.getMeta().setLastUpdatedElement(instantType);<NEW_LINE>}<NEW_LINE>if (!hasLink(Constants.LINK_SELF, myBundle) && isNotBlank(theBundleLinks.getSelf())) {<NEW_LINE>myBundle.addLink().setRelation(Constants.LINK_SELF).setUrl(theBundleLinks.getSelf());<NEW_LINE>}<NEW_LINE>if (!hasLink(Constants.LINK_NEXT, myBundle) && isNotBlank(theBundleLinks.getNext())) {<NEW_LINE>myBundle.addLink().setRelation(Constants.LINK_NEXT).setUrl(theBundleLinks.getNext());<NEW_LINE>}<NEW_LINE>if (!hasLink(Constants.LINK_SELF, myBundle) && isNotBlank(theBundleLinks.getPrev())) {<NEW_LINE>myBundle.addLink().setRelation(Constants.LINK_PREVIOUS).setUrl(theBundleLinks.getPrev());<NEW_LINE>}<NEW_LINE>myBase = theBundleLinks.serverBase;<NEW_LINE><MASK><NEW_LINE>}
addTotalResultsToBundle(theTotalResults, theBundleLinks.bundleType);
477,425
static Component onCreateLayout(ComponentContext c, @State boolean shown) {<NEW_LINE>return Row.create(c).heightPercent(100).child(Row.create(c).child(SolidColor.create(c).widthDip(90).heightDip(40).transitionKey(YELLOW_KEY).color(Color.YELLOW)).child(SolidColor.create(c).widthDip(90).heightDip(40).transitionKey(BLUE_KEY).color(Color.BLUE)).child(SolidColor.create(c).widthDip(90).heightDip(40).transitionKey(PURPLE_KEY).color(PURPLE_COLOR))).clickHandler(StaggerTransitionWithDelayComponent.onClickEvent(c)).alignItems(shown ? YogaAlign.FLEX_END : <MASK><NEW_LINE>}
YogaAlign.FLEX_START).build();
1,798,530
private static double apply(CompLongIntVector v1, LongIntVector v2) {<NEW_LINE>double dotValue = 0.0;<NEW_LINE>if (v2.isSparse() && v1.size() > v2.size()) {<NEW_LINE>ObjectIterator<Long2IntMap.Entry> iter = v2.getStorage().entryIterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Long2IntMap.<MASK><NEW_LINE>long idx = entry.getLongKey();<NEW_LINE>dotValue += v1.get(idx) * entry.getIntValue();<NEW_LINE>}<NEW_LINE>} else if (v2.isSorted() && v1.size() > v2.size()) {<NEW_LINE>// v2 is sorted<NEW_LINE>long[] v2Indices = v2.getStorage().getIndices();<NEW_LINE>int[] v2Values = v2.getStorage().getValues();<NEW_LINE>for (int i = 0; i < v2Indices.length; i++) {<NEW_LINE>long idx = v2Indices[i];<NEW_LINE>dotValue += v1.get(idx) * v2Values[i];<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>long base = 0;<NEW_LINE>for (LongIntVector part : v1.getPartitions()) {<NEW_LINE>if (part.isDense()) {<NEW_LINE>int[] partValues = part.getStorage().getValues();<NEW_LINE>for (int i = 0; i < partValues.length; i++) {<NEW_LINE>long idx = base + i;<NEW_LINE>dotValue += partValues[i] * v2.get(idx);<NEW_LINE>}<NEW_LINE>} else if (part.isSparse()) {<NEW_LINE>ObjectIterator<Long2IntMap.Entry> iter = part.getStorage().entryIterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Long2IntMap.Entry entry = iter.next();<NEW_LINE>long idx = base + entry.getLongKey();<NEW_LINE>dotValue += entry.getIntValue() * v2.get(idx);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// isSorted<NEW_LINE>long[] partIndices = part.getStorage().getIndices();<NEW_LINE>int[] partValues = part.getStorage().getValues();<NEW_LINE>for (int i = 0; i < partIndices.length; i++) {<NEW_LINE>long idx = base + partIndices[i];<NEW_LINE>dotValue += partValues[i] * v2.get(idx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>base += part.getDim();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return dotValue;<NEW_LINE>}
Entry entry = iter.next();
964,500
private void registerEndpoint(ClassLoader loader) throws Exception {<NEW_LINE>//<NEW_LINE>// Convert J2EE deployment descriptor information into<NEW_LINE>// JAXRPC endpoint data structure<NEW_LINE>//<NEW_LINE>RuntimeEndpointInfo endpointInfo = rpcFactory_.createRuntimeEndpointInfo();<NEW_LINE>Class serviceEndpointInterfaceClass = loader.loadClass(endpoint_.getServiceEndpointInterface());<NEW_LINE>Class implementationClass = loader.<MASK><NEW_LINE>String tieClassName = endpoint_.getTieClassName();<NEW_LINE>if (tieClassName != null) {<NEW_LINE>Class tieClass = loader.loadClass(tieClassName);<NEW_LINE>endpointInfo.setTieClass(tieClass);<NEW_LINE>}<NEW_LINE>endpointInfo.setRemoteInterface(serviceEndpointInterfaceClass);<NEW_LINE>endpointInfo.setImplementationClass(implementationClass);<NEW_LINE>endpointInfo.setName(endpoint_.getEndpointName());<NEW_LINE>// No need to set model file name or wsdl file, since we override<NEW_LINE>// the code that serves up the final WSDL.<NEW_LINE>// endpointInfo.setModelFileName()<NEW_LINE>// endpointInfo.setWSDLFileName()<NEW_LINE>endpointInfo.setDeployed(true);<NEW_LINE>endpointInfo.setPortName(endpoint_.getWsdlPort());<NEW_LINE>endpointInfo.setServiceName(endpoint_.getServiceName());<NEW_LINE>// For web components, this will be relative to the web app<NEW_LINE>// context root. Make sure there is a leading slash.<NEW_LINE>String uri = endpoint_.getEndpointAddressUri();<NEW_LINE>uri = uri.startsWith("/") ? uri : "/" + uri;<NEW_LINE>endpointInfo.setUrlPattern(uri);<NEW_LINE>rpcDelegate_.registerEndpointUrlPattern(endpointInfo);<NEW_LINE>}
loadClass(endpoint_.getServletImplClass());
421,529
public Function<ContainerRequest, ?> createValueProvider(Parameter parameter) {<NEW_LINE>String parameterName = parameter.getSourceName();<NEW_LINE>if (parameterName == null || parameterName.length() == 0) {<NEW_LINE>// Invalid URI parameter name<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final Class<?> rawParameterType = parameter.getRawType();<NEW_LINE>if (rawParameterType == PathSegment.class) {<NEW_LINE>return new PathParamPathSegmentValueSupplier(parameterName<MASK><NEW_LINE>} else if (rawParameterType == List.class && parameter.getType() instanceof ParameterizedType) {<NEW_LINE>ParameterizedType pt = (ParameterizedType) parameter.getType();<NEW_LINE>Type[] targs = pt.getActualTypeArguments();<NEW_LINE>if (targs.length == 1 && targs[0] == PathSegment.class) {<NEW_LINE>return new PathParamListPathSegmentValueSupplier(parameterName, !parameter.isEncoded());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>MultivaluedParameterExtractor<?> e = get(parameter);<NEW_LINE>if (e == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return new PathParamValueProvider(e, !parameter.isEncoded());<NEW_LINE>}
, !parameter.isEncoded());
1,533,114
protected ControlRequestFlush createControlRequestFlush(SIBUuid8 target, long ID, SIBUuid12 stream) throws SIResourceException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "createControlRequestFlush");<NEW_LINE>ControlRequestFlush rflushMsg;<NEW_LINE>// Create new message and send it<NEW_LINE>try {<NEW_LINE>rflushMsg = _cmf.createNewControlRequestFlush();<NEW_LINE>} catch (MessageCreateFailedException e) {<NEW_LINE>// FFDC<NEW_LINE>FFDCFilter.processException(e, "com.ibm.ws.sib.processor.impl.AbstractInputHandler.createControlRequestFlush", "1:667:1.170", this);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>SibTr.exception(tc, e);<NEW_LINE>SibTr.exit(tc, "createControlRequestFlush", e);<NEW_LINE>}<NEW_LINE>SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] { "com.ibm.ws.sib.processor.impl.AbstractInputHandler", "1:679:1.170", e });<NEW_LINE>throw new SIResourceException(nls.getFormattedMessage("INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] { "com.ibm.ws.sib.processor.impl.AbstractInputHandler", "1:687:1.170", e }, null), e);<NEW_LINE>}<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(rflushMsg, _messageProcessor.getMessagingEngineUuid(), target, stream, null, _destination.getUuid(), null, GDConfig.PROTOCOL_VERSION);<NEW_LINE>if (_destination.isPubSub()) {<NEW_LINE>rflushMsg.setGuaranteedProtocolType(ProtocolType.PUBSUBOUTPUT);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>rflushMsg.setRequestID(ID);<NEW_LINE>rflushMsg.setPriority(SIMPConstants.CTRL_MSG_PRIORITY);<NEW_LINE>rflushMsg.setReliability(SIMPConstants.CONTROL_MESSAGE_RELIABILITY);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "createControlRequestFlush", rflushMsg);<NEW_LINE>return rflushMsg;<NEW_LINE>}
rflushMsg.setGuaranteedProtocolType(ProtocolType.UNICASTOUTPUT);
1,662,244
public List<InvoiceLine> populate(Invoice invoice, InvoicingProject folder) throws AxelorException {<NEW_LINE>List<SaleOrderLine> saleOrderLineList = new ArrayList<SaleOrderLine>(folder.getSaleOrderLineSet());<NEW_LINE>List<PurchaseOrderLine> purchaseOrderLineList = new ArrayList<PurchaseOrderLine>(folder.getPurchaseOrderLineSet());<NEW_LINE>List<TimesheetLine> timesheetLineList = new ArrayList<TimesheetLine>(folder.getLogTimesSet());<NEW_LINE>List<ExpenseLine> expenseLineList = new ArrayList<ExpenseLine>(folder.getExpenseLineSet());<NEW_LINE>List<ProjectTask> projectTaskList = new ArrayList<ProjectTask<MASK><NEW_LINE>List<InvoiceLine> invoiceLineList = new ArrayList<InvoiceLine>();<NEW_LINE>invoiceLineList.addAll(this.createSaleOrderInvoiceLines(invoice, saleOrderLineList, folder.getSaleOrderLineSetPrioritySelect()));<NEW_LINE>invoiceLineList.addAll(this.createPurchaseOrderInvoiceLines(invoice, purchaseOrderLineList, folder.getPurchaseOrderLineSetPrioritySelect()));<NEW_LINE>invoiceLineList.addAll(timesheetService.createInvoiceLines(invoice, timesheetLineList, folder.getLogTimesSetPrioritySelect()));<NEW_LINE>invoiceLineList.addAll(expenseService.createInvoiceLines(invoice, expenseLineList, folder.getExpenseLineSetPrioritySelect()));<NEW_LINE>invoiceLineList.addAll(projectTaskBusinessProjectService.createInvoiceLines(invoice, projectTaskList, folder.getProjectTaskSetPrioritySelect()));<NEW_LINE>Collections.sort(invoiceLineList, new InvoiceLineComparator());<NEW_LINE>for (InvoiceLine invoiceLine : invoiceLineList) {<NEW_LINE>invoiceLine.setSequence(sequence);<NEW_LINE>sequence++;<NEW_LINE>}<NEW_LINE>return invoiceLineList;<NEW_LINE>}
>(folder.getProjectTaskSet());
1,381,894
private void drawText(String text, RectF rect, float textHeight, Canvas canvas) {<NEW_LINE>// If the image is flipped, the left will be translated to right, and the right to left.<NEW_LINE>float x0 = translateX(rect.left);<NEW_LINE>float x1 = translateX(rect.right);<NEW_LINE>rect.left = min(x0, x1);<NEW_LINE>rect.right = max(x0, x1);<NEW_LINE>rect.top = translateY(rect.top);<NEW_LINE>rect.<MASK><NEW_LINE>canvas.drawRect(rect, rectPaint);<NEW_LINE>float textWidth = textPaint.measureText(text);<NEW_LINE>canvas.drawRect(rect.left - STROKE_WIDTH, rect.top - textHeight, rect.left + textWidth + 2 * STROKE_WIDTH, rect.top, labelPaint);<NEW_LINE>// Renders the text at the bottom of the box.<NEW_LINE>canvas.drawText(text, rect.left, rect.top - STROKE_WIDTH, textPaint);<NEW_LINE>}
bottom = translateY(rect.bottom);
613,260
// CSI: Sponge<NEW_LINE>private void checkFingerprint() {<NEW_LINE>final Certificate[] certificates = this.getClass().getProtectionDomain().getCodeSource().getCertificates();<NEW_LINE>final List<String> fingerprints = CertificateHelper.getFingerprints(certificates);<NEW_LINE>if (((Boolean) Launch.blackboard.getOrDefault("fml.deobfuscatedEnvironment", false))) {<NEW_LINE>SpongeImpl.getLogger().debug("Skipping certificate fingerprint check - we're in a deobfuscated environment");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!EXPECTED_CERTIFICATE_FINGERPRINT.isEmpty()) {<NEW_LINE>if (!fingerprints.contains(EXPECTED_CERTIFICATE_FINGERPRINT)) {<NEW_LINE>final PrettyPrinter pp = new PrettyPrinter(60).wrapTo(60);<NEW_LINE>pp.add("Uh oh! Something's fishy here.").centre().hr();<NEW_LINE>pp.addWrapped("It looks like we didn't find the certificate fingerprint we were expecting.");<NEW_LINE>pp.add();<NEW_LINE>pp.add("%s: %s", "Expected Fingerprint", EXPECTED_CERTIFICATE_FINGERPRINT);<NEW_LINE>if (fingerprints.size() > 1) {<NEW_LINE>pp.add("Actual Fingerprints:");<NEW_LINE>for (final String fingerprint : fingerprints) {<NEW_LINE>pp.add(" - %s", fingerprint);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>pp.add("%s: %s", "Actual Fingerprint", fingerprints.get(0));<NEW_LINE>}<NEW_LINE>pp.log(SpongeImpl.getLogger(), Level.ERROR);<NEW_LINE>} else {<NEW_LINE>this.certificate = certificates<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>SpongeImpl.getLogger().warn("There's no certificate fingerprint available");<NEW_LINE>}<NEW_LINE>}
[fingerprints.indexOf(EXPECTED_CERTIFICATE_FINGERPRINT)];
806,252
protected IShape<T> mkShape(@Nonnull BlockFaceShape down, @Nonnull BlockFaceShape up, @Nonnull BlockFaceShape allSides) {<NEW_LINE>return new IShape<T>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>@Nonnull<NEW_LINE>public BlockFaceShape getBlockFaceShape(@Nonnull IBlockAccess worldIn, @Nonnull IBlockState state, @Nonnull BlockPos pos, @Nonnull EnumFacing face, @Nonnull T te) {<NEW_LINE><MASK><NEW_LINE>if (paintSource != null) {<NEW_LINE>try {<NEW_LINE>return paintSource.getBlockFaceShape(worldIn, pos, face);<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return IShape.super.getBlockFaceShape(worldIn, state, pos, face, te);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>@Nonnull<NEW_LINE>public BlockFaceShape getBlockFaceShape(@Nonnull IBlockAccess worldIn, @Nonnull IBlockState state, @Nonnull BlockPos pos, @Nonnull EnumFacing face) {<NEW_LINE>return face == EnumFacing.UP ? up : face == EnumFacing.DOWN ? down : allSides;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
IBlockState paintSource = te.getPaintSource();
761,750
public static RegisterFaceResponse unmarshall(RegisterFaceResponse registerFaceResponse, UnmarshallerContext _ctx) {<NEW_LINE>registerFaceResponse.setRequestId(_ctx.stringValue("RegisterFaceResponse.RequestId"));<NEW_LINE>registerFaceResponse.setGroupId<MASK><NEW_LINE>List<Face> faces = new ArrayList<Face>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("RegisterFaceResponse.Faces.Length"); i++) {<NEW_LINE>Face face = new Face();<NEW_LINE>face.setFaceToken(_ctx.stringValue("RegisterFaceResponse.Faces[" + i + "].FaceToken"));<NEW_LINE>Rect rect = new Rect();<NEW_LINE>rect.setTop(_ctx.integerValue("RegisterFaceResponse.Faces[" + i + "].Rect.Top"));<NEW_LINE>rect.setWidth(_ctx.integerValue("RegisterFaceResponse.Faces[" + i + "].Rect.Width"));<NEW_LINE>rect.setHeight(_ctx.integerValue("RegisterFaceResponse.Faces[" + i + "].Rect.Height"));<NEW_LINE>rect.setLeft(_ctx.integerValue("RegisterFaceResponse.Faces[" + i + "].Rect.Left"));<NEW_LINE>face.setRect(rect);<NEW_LINE>faces.add(face);<NEW_LINE>}<NEW_LINE>registerFaceResponse.setFaces(faces);<NEW_LINE>return registerFaceResponse;<NEW_LINE>}
(_ctx.stringValue("RegisterFaceResponse.GroupId"));
1,796,135
public static Element drawField(ClassDetailVO clazz, Integer expand) {<NEW_LINE>TableElement fieldsTable = new TableElement(1).leftCellPadding(0).rightCellPadding(0);<NEW_LINE>FieldVO[] fields = clazz.getFields();<NEW_LINE>if (fields == null || fields.length == 0) {<NEW_LINE>return fieldsTable;<NEW_LINE>}<NEW_LINE>for (FieldVO field : fields) {<NEW_LINE>TableElement fieldTable = new TableElement().leftCellPadding(0).rightCellPadding(1);<NEW_LINE>fieldTable.row("name", field.getName()).row("type", field.getType()).row("modifier", field.getModifier());<NEW_LINE>String[] annotations = field.getAnnotations();<NEW_LINE>if (annotations != null && annotations.length > 0) {<NEW_LINE>fieldTable.row("annotation", drawAnnotation(annotations));<NEW_LINE>}<NEW_LINE>if (field.isStatic()) {<NEW_LINE>Object o = (expand != null && expand >= 0) ? new ObjectView(field.getValue(), expand).draw<MASK><NEW_LINE>fieldTable.row("value", StringUtils.objectToString(o));<NEW_LINE>}<NEW_LINE>fieldTable.row(label(""));<NEW_LINE>fieldsTable.row(fieldTable);<NEW_LINE>}<NEW_LINE>return fieldsTable;<NEW_LINE>}
() : field.getValue();
1,023,047
protected void processPskSecretResult(PskSecretResult pskSecretResult) throws HandshakeException {<NEW_LINE>if (!pskRequestPending) {<NEW_LINE>throw new IllegalStateException("psk secret not pending!");<NEW_LINE>}<NEW_LINE>pskRequestPending = false;<NEW_LINE>try {<NEW_LINE>ensureUndestroyed();<NEW_LINE>DTLSSession session = getSession();<NEW_LINE>String hostName = sniEnabled <MASK><NEW_LINE>PskPublicInformation pskIdentity = pskSecretResult.getPskPublicInformation();<NEW_LINE>SecretKey newPskSecret = pskSecretResult.getSecret();<NEW_LINE>if (newPskSecret != null) {<NEW_LINE>if (hostName != null) {<NEW_LINE>LOGGER.trace("client [{}] uses PSK identity [{}] for server [{}]", peerToLog, pskIdentity, hostName);<NEW_LINE>} else {<NEW_LINE>LOGGER.trace("client [{}] uses PSK identity [{}]", peerToLog, pskIdentity);<NEW_LINE>}<NEW_LINE>PreSharedKeyIdentity pskPrincipal;<NEW_LINE>if (sniEnabled) {<NEW_LINE>pskPrincipal = new PreSharedKeyIdentity(hostName, pskIdentity.getPublicInfoAsString());<NEW_LINE>} else {<NEW_LINE>pskPrincipal = new PreSharedKeyIdentity(pskIdentity.getPublicInfoAsString());<NEW_LINE>}<NEW_LINE>session.setPeerIdentity(pskPrincipal);<NEW_LINE>if (PskSecretResult.ALGORITHM_PSK.equals(newPskSecret.getAlgorithm())) {<NEW_LINE>Mac hmac = session.getCipherSuite().getThreadLocalPseudoRandomFunctionMac();<NEW_LINE>SecretKey premasterSecret = PseudoRandomFunction.generatePremasterSecretFromPSK(otherSecret, newPskSecret);<NEW_LINE>SecretKey masterSecret = PseudoRandomFunction.generateMasterSecret(hmac, premasterSecret, masterSecretSeed, session.useExtendedMasterSecret());<NEW_LINE>SecretUtil.destroy(premasterSecret);<NEW_LINE>SecretUtil.destroy(newPskSecret);<NEW_LINE>newPskSecret = masterSecret;<NEW_LINE>}<NEW_LINE>setCustomArgument(pskSecretResult);<NEW_LINE>applyMasterSecret(newPskSecret);<NEW_LINE>SecretUtil.destroy(newPskSecret);<NEW_LINE>processMasterSecret();<NEW_LINE>} else {<NEW_LINE>AlertMessage alert = new AlertMessage(AlertLevel.FATAL, AlertDescription.UNKNOWN_PSK_IDENTITY);<NEW_LINE>if (hostName != null) {<NEW_LINE>throw new HandshakeException(String.format("No pre-shared key found for [virtual host: %s, identity: %s]", hostName, pskIdentity), alert);<NEW_LINE>} else {<NEW_LINE>throw new HandshakeException(String.format("No pre-shared key found for [identity: %s]", pskIdentity), alert);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>SecretUtil.destroy(otherSecret);<NEW_LINE>otherSecret = null;<NEW_LINE>}<NEW_LINE>}
? session.getHostName() : null;
1,220,910
public static IRubyObject aliases(ThreadContext context, IRubyObject recv) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>EncodingService service = runtime.getEncodingService();<NEW_LINE>IRubyObject[] list = service.getEncodingList();<NEW_LINE>HashEntryIterator i = service<MASK><NEW_LINE>RubyHash result = RubyHash.newHash(runtime);<NEW_LINE>while (i.hasNext()) {<NEW_LINE>CaseInsensitiveBytesHash.CaseInsensitiveBytesHashEntry<Entry> e = ((CaseInsensitiveBytesHash.CaseInsensitiveBytesHashEntry<Entry>) i.next());<NEW_LINE>IRubyObject alias = RubyString.newUsAsciiStringShared(runtime, e.bytes, e.p, e.end - e.p).freeze(context);<NEW_LINE>IRubyObject name = RubyString.newUsAsciiStringShared(runtime, ((RubyEncoding) list[e.value.getIndex()]).name).freeze(context);<NEW_LINE>result.fastASet(alias, name);<NEW_LINE>}<NEW_LINE>result.fastASet(runtime.newString(EXTERNAL), runtime.newString(new ByteList(runtime.getDefaultExternalEncoding().getName())));<NEW_LINE>result.fastASet(runtime.newString(LOCALE), runtime.newString(new ByteList(service.getLocaleEncoding().getName())));<NEW_LINE>return result;<NEW_LINE>}
.getAliases().entryIterator();
689,448
public void prettyPrint(Appendable appendable) throws IOException {<NEW_LINE>appendable.append("CREATE");<NEW_LINE>if (unique()) {<NEW_LINE>appendable.append(" UNIQUE");<NEW_LINE>}<NEW_LINE>if (nullFiltered()) {<NEW_LINE>appendable.append(" NULL_FILTERED");<NEW_LINE>}<NEW_LINE>appendable.append(" INDEX `").append(name()).append("` ON `").append(table()).append("`");<NEW_LINE>String indexColumnsString = indexColumns().stream().filter(c -> c.order() != IndexColumn.Order.STORING).map(c -> c.prettyPrint()).collect(Collectors.joining(", "));<NEW_LINE>appendable.append("(").append(indexColumnsString).append(")");<NEW_LINE>String storingString = indexColumns().stream().filter(c -> c.order() == IndexColumn.Order.STORING).map(c -> "`" + c.name() + "`").collect(Collectors.joining(", "));<NEW_LINE>if (!storingString.isEmpty()) {<NEW_LINE>appendable.append(" STORING (").append<MASK><NEW_LINE>}<NEW_LINE>if (interleaveIn() != null) {<NEW_LINE>appendable.append(", INTERLEAVE IN ").append(interleaveIn());<NEW_LINE>}<NEW_LINE>}
(storingString).append(")");
76,283
public void onBindViewHolder(@Nonnull FeeViewHolder holder, int position) {<NEW_LINE>super.onBindViewHolder(holder, position);<NEW_LINE>if (getItemViewType(position) == VIEW_TYPE_ITEM) {<NEW_LINE>// - get element from your dataset at this position<NEW_LINE>// - replace the contents of the view with that element<NEW_LINE>FeeItem item = mDataset.get(position);<NEW_LINE>if (item.value != null) {<NEW_LINE>holder.categoryTextView.setText(formatter.getFeeAbsValue(item.value));<NEW_LINE>}<NEW_LINE>if (item.fiatValue != null) {<NEW_LINE>holder.itemTextView.setText(formatter.getAltValue(item.fiatValue));<NEW_LINE>}<NEW_LINE>holder.valueTextView.setText(formatter.getFeePerUnit(item.feePerKb));<NEW_LINE>} else {<NEW_LINE>RecyclerView.LayoutParams layoutParams = (RecyclerView.LayoutParams) holder.itemView.getLayoutParams();<NEW_LINE>layoutParams.width = paddingWidth;<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
holder.itemView.setLayoutParams(layoutParams);
708,851
public void undoScaleToPixelsAndCameraMatrix(SceneStructureProjective structure, SceneObservations observations) {<NEW_LINE>for (int viewIdx = 0; viewIdx < structure.views.size; viewIdx++) {<NEW_LINE>NormalizationPoint2D n = pixelScaling.get(viewIdx);<NEW_LINE>float cx = (float) n.meanX;<NEW_LINE>float cy = (float) n.meanY;<NEW_LINE>float stdX = (float) n.stdX;<NEW_LINE>float stdY = (float) n.stdY;<NEW_LINE>SceneStructureProjective.View v = <MASK><NEW_LINE>SceneObservations.View ov = observations.views.get(viewIdx);<NEW_LINE>for (int pixelIdx = 0; pixelIdx < ov.size(); pixelIdx++) {<NEW_LINE>int i = pixelIdx * 2;<NEW_LINE>float x = ov.observations.data[i];<NEW_LINE>float y = ov.observations.data[i + 1];<NEW_LINE>ov.observations.data[i] = x * stdX + cx;<NEW_LINE>ov.observations.data[i + 1] = y * stdY + cy;<NEW_LINE>}<NEW_LINE>n.remove(v.worldToView, v.worldToView);<NEW_LINE>}<NEW_LINE>}
structure.views.data[viewIdx];
752,124
public void requestReply(T request, StreamObserver<T> responseObserver) {<NEW_LINE>Message<byte[]> message = this.toSpringMessage(request);<NEW_LINE>FunctionInvocationWrapper function = this.resolveFunction(message.getHeaders());<NEW_LINE>if (FunctionTypeUtils.isFlux(function.getOutputType())) {<NEW_LINE>String errorMessage = "Flux reply is not supported for `requestReply` mode";<NEW_LINE>responseObserver.onError(Status.UNKNOWN.withDescription(errorMessage).withCause(new UnsupportedOperationException(errorMessage)).asRuntimeException());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Object replyMessage = function.apply(message);<NEW_LINE>if (replyMessage instanceof Message<?>) {<NEW_LINE>GeneratedMessageV3 reply = this.toGrpcMessage((Message<byte[]>) replyMessage, (Class<T>) request.getClass());<NEW_LINE>responseObserver<MASK><NEW_LINE>responseObserver.onCompleted();<NEW_LINE>} else if (replyMessage instanceof Publisher<?>) {<NEW_LINE>if (replyMessage instanceof Mono<?>) {<NEW_LINE>Mono.from((Publisher<?>) replyMessage).doOnNext(reply -> {<NEW_LINE>GeneratedMessageV3 replyGrps = this.toGrpcMessage((Message<byte[]>) reply, (Class<T>) request.getClass());<NEW_LINE>responseObserver.onNext((T) replyGrps);<NEW_LINE>responseObserver.onCompleted();<NEW_LINE>}).subscribe();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.onNext((T) reply);
1,261,930
public FunctionRunAsConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>FunctionRunAsConfig functionRunAsConfig = new FunctionRunAsConfig();<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("Gid", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>functionRunAsConfig.setGid(context.getUnmarshaller(Integer.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("Uid", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>functionRunAsConfig.setUid(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return functionRunAsConfig;<NEW_LINE>}
class).unmarshall(context));
232,235
public void joinParticleGroups(ParticleGroup groupA, ParticleGroup groupB) {<NEW_LINE>assert (groupA != groupB);<NEW_LINE>RotateBuffer(groupB.m_firstIndex, groupB.m_lastIndex, m_count);<NEW_LINE>assert (groupB.m_lastIndex == m_count);<NEW_LINE>RotateBuffer(groupA.m_firstIndex, groupA.m_lastIndex, groupB.m_firstIndex);<NEW_LINE>assert (groupA.m_lastIndex == groupB.m_firstIndex);<NEW_LINE>int particleFlags = 0;<NEW_LINE>for (int i = groupA.m_firstIndex; i < groupB.m_lastIndex; i++) {<NEW_LINE>particleFlags |= m_flagsBuffer.data[i];<NEW_LINE>}<NEW_LINE>updateContacts(true);<NEW_LINE>if ((particleFlags & k_pairFlags) != 0) {<NEW_LINE>for (int k = 0; k < m_contactCount; k++) {<NEW_LINE>final ParticleContact contact = m_contactBuffer[k];<NEW_LINE>int a = contact.indexA;<NEW_LINE>int b = contact.indexB;<NEW_LINE>if (a > b) {<NEW_LINE>int temp = a;<NEW_LINE>a = b;<NEW_LINE>b = temp;<NEW_LINE>}<NEW_LINE>if (groupA.m_firstIndex <= a && a < groupA.m_lastIndex && groupB.m_firstIndex <= b && b < groupB.m_lastIndex) {<NEW_LINE>if (m_pairCount >= m_pairCapacity) {<NEW_LINE>int oldCapacity = m_pairCapacity;<NEW_LINE>int newCapacity = m_pairCount != 0 <MASK><NEW_LINE>m_pairBuffer = BufferUtils.reallocateBuffer(Pair.class, m_pairBuffer, oldCapacity, newCapacity);<NEW_LINE>m_pairCapacity = newCapacity;<NEW_LINE>}<NEW_LINE>Pair pair = m_pairBuffer[m_pairCount];<NEW_LINE>pair.indexA = a;<NEW_LINE>pair.indexB = b;<NEW_LINE>pair.flags = contact.flags;<NEW_LINE>pair.strength = MathUtils.min(groupA.m_strength, groupB.m_strength);<NEW_LINE>pair.distance = MathUtils.distance(m_positionBuffer.data[a], m_positionBuffer.data[b]);<NEW_LINE>m_pairCount++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if ((particleFlags & k_triadFlags) != 0) {<NEW_LINE>VoronoiDiagram diagram = new VoronoiDiagram(groupB.m_lastIndex - groupA.m_firstIndex);<NEW_LINE>for (int i = groupA.m_firstIndex; i < groupB.m_lastIndex; i++) {<NEW_LINE>if ((m_flagsBuffer.data[i] & ParticleType.b2_zombieParticle) == 0) {<NEW_LINE>diagram.addGenerator(m_positionBuffer.data[i], i);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>diagram.generate(getParticleStride() / 2);<NEW_LINE>JoinParticleGroupsCallback callback = new JoinParticleGroupsCallback();<NEW_LINE>callback.system = this;<NEW_LINE>callback.groupA = groupA;<NEW_LINE>callback.groupB = groupB;<NEW_LINE>diagram.getNodes(callback);<NEW_LINE>}<NEW_LINE>for (int i = groupB.m_firstIndex; i < groupB.m_lastIndex; i++) {<NEW_LINE>m_groupBuffer[i] = groupA;<NEW_LINE>}<NEW_LINE>int groupFlags = groupA.m_groupFlags | groupB.m_groupFlags;<NEW_LINE>groupA.m_groupFlags = groupFlags;<NEW_LINE>groupA.m_lastIndex = groupB.m_lastIndex;<NEW_LINE>groupB.m_firstIndex = groupB.m_lastIndex;<NEW_LINE>destroyParticleGroup(groupB);<NEW_LINE>if ((groupFlags & ParticleGroupType.b2_solidParticleGroup) != 0) {<NEW_LINE>computeDepthForGroup(groupA);<NEW_LINE>}<NEW_LINE>}
? 2 * m_pairCount : Settings.minParticleBufferCapacity;
1,297,680
public void writeImage(JRImage image, String imageName) {<NEW_LINE>if (image != null) {<NEW_LINE>write("JRDesignImage " + imageName + " = new JRDesignImage(jasperDesign);\n");<NEW_LINE>write(imageName + ".setScaleImage({0});\n", image.getOwnScaleImageValue());<NEW_LINE>write(imageName + ".setRotation({0});\n", image.getOwnRotation());<NEW_LINE>write(imageName + ".setHorizontalImageAlign({0});\n", image.getOwnHorizontalImageAlign());<NEW_LINE>write(imageName + ".setVerticalImageAlign({0});\n", image.getOwnVerticalImageAlign());<NEW_LINE>write(imageName + <MASK><NEW_LINE>write(imageName + ".setLazy({0});\n", image.isLazy(), false);<NEW_LINE>write(imageName + ".setOnErrorType({0});\n", image.getOnErrorTypeValue(), OnErrorTypeEnum.ERROR);<NEW_LINE>write(imageName + ".setEvaluationTime({0});\n", image.getEvaluationTimeValue(), EvaluationTimeEnum.NOW);<NEW_LINE>write(imageName + ".setEvaluationGroup({0});\n", getGroupName(image.getEvaluationGroup()));<NEW_LINE>if (image.getLinkType() != null) {<NEW_LINE>write(imageName + ".setLinkType(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(image.getLinkType()), HyperlinkTypeEnum.NONE.getName());<NEW_LINE>}<NEW_LINE>if (image.getLinkTarget() != null) {<NEW_LINE>write(imageName + ".setLinkTarget(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(image.getLinkTarget()), HyperlinkTargetEnum.SELF.getName());<NEW_LINE>}<NEW_LINE>write(imageName + ".setBookmarkLevel({0, number, #});\n", image.getBookmarkLevel(), JRAnchor.NO_BOOKMARK);<NEW_LINE>writeReportElement(image, imageName);<NEW_LINE>writeBox(image.getLineBox(), imageName + ".getLineBox()");<NEW_LINE>writeGraphicElement(image, imageName);<NEW_LINE>writeExpression(image.getExpression(), imageName, "Expression");<NEW_LINE>writeExpression(image.getAnchorNameExpression(), imageName, "AnchorNameExpression");<NEW_LINE>writeExpression(image.getBookmarkLevelExpression(), imageName, "BookmarkLevelExpression");<NEW_LINE>writeExpression(image.getHyperlinkReferenceExpression(), imageName, "HyperlinkReferenceExpression");<NEW_LINE>writeExpression(image.getHyperlinkWhenExpression(), imageName, "HyperlinkWhenExpression");<NEW_LINE>writeExpression(image.getHyperlinkAnchorExpression(), imageName, "HyperlinkAnchorExpression");<NEW_LINE>writeExpression(image.getHyperlinkPageExpression(), imageName, "HyperlinkPageExpression");<NEW_LINE>writeExpression(image.getHyperlinkTooltipExpression(), imageName, "HyperlinkTooltipExpression");<NEW_LINE>writeHyperlinkParameters(image.getHyperlinkParameters(), imageName);<NEW_LINE>flush();<NEW_LINE>}<NEW_LINE>}
".setUsingCache({0});\n", image.getUsingCache());
39,962
public void createCachedEnumeration(LockedMessageEnumeration lme, AsynchDispatchScheduler asynchDispatchScheduler) {<NEW_LINE>final String methodName = "createCachedEnumeration";<NEW_LINE>if (TRACE.isEntryEnabled()) {<NEW_LINE>SibTr.entry(this, TRACE, methodName, new Object[] { lme, asynchDispatchScheduler });<NEW_LINE>}<NEW_LINE>_cachedEnumeration = new SibRaLockedMessageEnumeration();<NEW_LINE>_cachedAsynchDispatchScheduler = asynchDispatchScheduler;<NEW_LINE>SIBusMessage message = null;<NEW_LINE>try {<NEW_LINE>// Go through all the messages in the locked message enumeration<NEW_LINE>while ((message = lme.nextLocked()) != null) {<NEW_LINE>// Add the message to the cached enumeration<NEW_LINE>_cachedEnumeration.add(message);<NEW_LINE>// This can be overridden by the derived classes if they need to perform<NEW_LINE>// any work on the message.<NEW_LINE>processCachedMessage(message, lme);<NEW_LINE>}<NEW_LINE>} catch (final Throwable throwable) {<NEW_LINE>FFDCFilter.processException(throwable, CLASS_NAME + "." + methodName, "1:1310:1.68", this);<NEW_LINE>SibTr.error(TRACE, "RETRIEVE_MESSAGES_CWSIV1100", new Object<MASK><NEW_LINE>}<NEW_LINE>if (TRACE.isEntryEnabled()) {<NEW_LINE>SibTr.exit(this, TRACE, methodName);<NEW_LINE>}<NEW_LINE>}
[] { throwable, lme });
728,367
public static ListCampaignsResponse unmarshall(ListCampaignsResponse listCampaignsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCampaignsResponse.setRequestId(_ctx.stringValue("ListCampaignsResponse.RequestId"));<NEW_LINE>listCampaignsResponse.setMessage(_ctx.stringValue("ListCampaignsResponse.Message"));<NEW_LINE>listCampaignsResponse.setHttpStatusCode(_ctx.longValue("ListCampaignsResponse.HttpStatusCode"));<NEW_LINE>listCampaignsResponse.setCode(_ctx.stringValue("ListCampaignsResponse.Code"));<NEW_LINE>listCampaignsResponse.setSuccess(_ctx.booleanValue("ListCampaignsResponse.Success"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setPageNumber(_ctx.longValue("ListCampaignsResponse.Data.PageNumber"));<NEW_LINE>data.setPageSize(_ctx.longValue("ListCampaignsResponse.Data.PageSize"));<NEW_LINE>data.setTotalCount(_ctx.longValue("ListCampaignsResponse.Data.TotalCount"));<NEW_LINE>List<ListItem> list = new ArrayList<ListItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListCampaignsResponse.Data.List.Length"); i++) {<NEW_LINE>ListItem listItem = new ListItem();<NEW_LINE>listItem.setActualEndTime(_ctx.longValue("ListCampaignsResponse.Data.List[" + i + "].ActualEndTime"));<NEW_LINE>listItem.setActualStartTime(_ctx.longValue("ListCampaignsResponse.Data.List[" + i + "].ActualStartTime"));<NEW_LINE>listItem.setCasesAborted(_ctx.longValue("ListCampaignsResponse.Data.List[" + i + "].CasesAborted"));<NEW_LINE>listItem.setCasesUncompleted(_ctx.longValue("ListCampaignsResponse.Data.List[" + i + "].CasesUncompleted"));<NEW_LINE>listItem.setCasesConnected(_ctx.longValue("ListCampaignsResponse.Data.List[" + i + "].CasesConnected"));<NEW_LINE>listItem.setMaxAttemptCount(_ctx.longValue("ListCampaignsResponse.Data.List[" + i + "].MaxAttemptCount"));<NEW_LINE>listItem.setMinAttemptInterval(_ctx.longValue("ListCampaignsResponse.Data.List[" + i + "].MinAttemptInterval"));<NEW_LINE>listItem.setName(_ctx.stringValue("ListCampaignsResponse.Data.List[" + i + "].Name"));<NEW_LINE>listItem.setPlanedEndTime(_ctx.longValue("ListCampaignsResponse.Data.List[" + i + "].PlanedEndTime"));<NEW_LINE>listItem.setPlanedStartTime(_ctx.longValue("ListCampaignsResponse.Data.List[" + i + "].PlanedStartTime"));<NEW_LINE>listItem.setQueueName(_ctx.stringValue("ListCampaignsResponse.Data.List[" + i + "].QueueName"));<NEW_LINE>listItem.setTotalCases(_ctx.longValue("ListCampaignsResponse.Data.List[" + i + "].TotalCases"));<NEW_LINE>listItem.setState(_ctx.stringValue("ListCampaignsResponse.Data.List[" + i + "].State"));<NEW_LINE>listItem.setCampaignId(_ctx.stringValue("ListCampaignsResponse.Data.List[" + i + "].CampaignId"));<NEW_LINE>listItem.setStrategyType(_ctx.stringValue("ListCampaignsResponse.Data.List[" + i + "].StrategyType"));<NEW_LINE>listItem.setStrategyParameters(_ctx.stringValue("ListCampaignsResponse.Data.List[" + i + "].StrategyParameters"));<NEW_LINE>listItem.setQueueId(_ctx.stringValue("ListCampaignsResponse.Data.List[" + i + "].QueueId"));<NEW_LINE>listItem.setSimulation(_ctx.booleanValue<MASK><NEW_LINE>list.add(listItem);<NEW_LINE>}<NEW_LINE>data.setList(list);<NEW_LINE>listCampaignsResponse.setData(data);<NEW_LINE>return listCampaignsResponse;<NEW_LINE>}
("ListCampaignsResponse.Data.List[" + i + "].Simulation"));
1,768,888
final DescribeFleetCapacityResult executeDescribeFleetCapacity(DescribeFleetCapacityRequest describeFleetCapacityRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeFleetCapacityRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeFleetCapacityRequest> request = null;<NEW_LINE>Response<DescribeFleetCapacityResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeFleetCapacityRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeFleetCapacityRequest));<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, "GameLift");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeFleetCapacity");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeFleetCapacityResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new DescribeFleetCapacityResultJsonUnmarshaller());
1,316,136
public List<PurchaseItem> placeRemotePurchaseOrder(@NonNull final Collection<PurchaseCandidate> purchaseCandidates) {<NEW_LINE>final ImmutableMap<PurchaseOrderRequestItem, PurchaseCandidate> //<NEW_LINE>//<NEW_LINE>requestItem2Candidate = Maps.uniqueIndex(purchaseCandidates, RealVendorGatewayInvoker::createPurchaseOrderRequestItem);<NEW_LINE>final PurchaseOrderRequest purchaseOrderRequest = PurchaseOrderRequest.builder().orgId(orgId.getRepoId()).vendorId(vendorId.getRepoId()).items(requestItem2Candidate.keySet()).build();<NEW_LINE>final RemotePurchaseOrderCreated purchaseOrderResponse = vendorGatewayService.placePurchaseOrder(purchaseOrderRequest);<NEW_LINE>final ITableRecordReference transactionReference = TableRecordReference.of(purchaseOrderResponse.getTransactionTableName(<MASK><NEW_LINE>final ImmutableList.Builder<PurchaseItem> result = ImmutableList.builder();<NEW_LINE>if (purchaseOrderResponse.getException() != null) {<NEW_LINE>for (final PurchaseCandidate purchaseCandidate : purchaseCandidates) {<NEW_LINE>final PurchaseErrorItem purchaseErrorItem = purchaseCandidate.createErrorItem().transactionReference(transactionReference).throwable(purchaseOrderResponse.getException()).buildAndAdd();<NEW_LINE>result.add(purchaseErrorItem);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final ImmutableMap.Builder<PurchaseOrderItem, RemotePurchaseOrderCreatedItem> mapBuilder = ImmutableMap.builder();<NEW_LINE>final List<RemotePurchaseOrderCreatedItem> purchaseOrderResponseItems = purchaseOrderResponse.getPurchaseOrderResponseItems();<NEW_LINE>if (!purchaseOrderResponseItems.isEmpty()) {<NEW_LINE>final Map<Integer, I_C_UOM> uomsById = extractUOMsMap(purchaseCandidates);<NEW_LINE>for (final RemotePurchaseOrderCreatedItem remotePurchaseOrderCreatedItem : purchaseOrderResponseItems) {<NEW_LINE>final PurchaseOrderRequestItem correspondingRequestItem = remotePurchaseOrderCreatedItem.getCorrespondingRequestItem();<NEW_LINE>final PurchaseCandidate correspondingRequestCandidate = requestItem2Candidate.get(correspondingRequestItem);<NEW_LINE>final I_C_UOM uom = uomsById.get(remotePurchaseOrderCreatedItem.getUomId());<NEW_LINE>ZonedDateTime confirmedDeliveryDate = remotePurchaseOrderCreatedItem.getConfirmedDeliveryDateOrNull();<NEW_LINE>if (confirmedDeliveryDate == null) {<NEW_LINE>Loggables.get().addLog("The current remotePurchaseOrderCreatedItem has no confirmedDeliveryDate; " + "falling back to the purchase candidate's purchaseDatePromised={}; remotePurchaseOrderCreatedItem={}", correspondingRequestCandidate.getPurchaseDatePromised(), remotePurchaseOrderCreatedItem);<NEW_LINE>confirmedDeliveryDate = correspondingRequestCandidate.getPurchaseDatePromised();<NEW_LINE>}<NEW_LINE>final PurchaseOrderItem purchaseOrderItem = correspondingRequestCandidate.createOrderItem().datePromised(confirmedDeliveryDate).purchasedQty(Quantity.of(remotePurchaseOrderCreatedItem.getConfirmedOrderQuantity(), uom)).remotePurchaseOrderId(remotePurchaseOrderCreatedItem.getRemotePurchaseOrderId()).transactionReference(transactionReference).dimension(correspondingRequestCandidate.getDimension()).buildAndAddToParent();<NEW_LINE>result.add(purchaseOrderItem);<NEW_LINE>mapBuilder.put(purchaseOrderItem, remotePurchaseOrderCreatedItem);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>map = mapBuilder.build();<NEW_LINE>return result.build();<NEW_LINE>}
), purchaseOrderResponse.getTransactionRecordId());
1,415,330
protected Object _deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {<NEW_LINE>final TreeNode treeNode = p.readValueAsTree();<NEW_LINE>final TreeNode typeNode = treeNode.path("type");<NEW_LINE>if (!typeNode.isObject()) {<NEW_LINE>ctxt.reportWrongTokenException(typeNode.traverse(), JsonToken.START_OBJECT, "expected START_OBJECT before the type information and deserialized value");<NEW_LINE>}<NEW_LINE>final TreeNode valueNode = typeNode.path("@value");<NEW_LINE>if (!valueNode.isValueNode()) {<NEW_LINE>ctxt.reportWrongTokenException(typeNode.traverse(), JsonToken.VALUE_STRING, "expected VALUE_STRING as type information and deserialized value");<NEW_LINE>}<NEW_LINE>final JsonParser jsonParser = valueNode.traverse();<NEW_LINE>final String typeId = jsonParser.nextTextValue();<NEW_LINE>final JsonDeserializer<Object> deser = _findDeserializer(ctxt, typeId);<NEW_LINE>final JsonParser newParser = treeNode.traverse();<NEW_LINE>if (newParser.nextToken() != JsonToken.START_OBJECT) {<NEW_LINE>ctxt.reportWrongTokenException(newParser, JsonToken.START_OBJECT, "expected START_OBJECT");<NEW_LINE>}<NEW_LINE>return <MASK><NEW_LINE>}
deser.deserialize(newParser, ctxt);
685,041
public void enterSs_server(A10Parser.Ss_serverContext ctx) {<NEW_LINE>Optional<String> maybeName = toString(ctx, ctx.slb_server_name());<NEW_LINE>if (!maybeName.isPresent()) {<NEW_LINE>// dummy<NEW_LINE>_currentServer = new Server(ctx.slb_server_name().getText(), new ServerTargetAddress(Ip.ZERO));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (ctx.slb_server_target() == null) {<NEW_LINE>_currentServer = _c.getServers().get(name);<NEW_LINE>// No match<NEW_LINE>if (_currentServer == null) {<NEW_LINE>warn(ctx, "Server target must be specified for a new server");<NEW_LINE>// dummy<NEW_LINE>_currentServer = new Server(ctx.slb_server_name().getText(), new ServerTargetAddress(Ip.ZERO));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Updating existing server<NEW_LINE>_c.defineStructure(SERVER, name, ctx);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// TODO enforce no target reuse<NEW_LINE>Optional<ServerTarget> target = toServerTarget(ctx.slb_server_target());<NEW_LINE>_c.defineStructure(SERVER, name, ctx);<NEW_LINE>if (target.isPresent()) {<NEW_LINE>_currentServer = _c.getServers().computeIfAbsent(name, n -> new Server(n, target.get()));<NEW_LINE>// Make sure target is up-to-date<NEW_LINE>_currentServer.setTarget(target.get());<NEW_LINE>} else {<NEW_LINE>// dummy for internal fields<NEW_LINE>_currentServer = new Server("~dummy~", new ServerTargetAddress(Ip.ZERO));<NEW_LINE>}<NEW_LINE>}
String name = maybeName.get();
913,685
public void marshall(ListProcessingJobsRequest listProcessingJobsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listProcessingJobsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(listProcessingJobsRequest.getCreationTimeAfter(), CREATIONTIMEAFTER_BINDING);<NEW_LINE>protocolMarshaller.marshall(listProcessingJobsRequest.getCreationTimeBefore(), CREATIONTIMEBEFORE_BINDING);<NEW_LINE>protocolMarshaller.marshall(listProcessingJobsRequest.getLastModifiedTimeAfter(), LASTMODIFIEDTIMEAFTER_BINDING);<NEW_LINE>protocolMarshaller.marshall(listProcessingJobsRequest.getLastModifiedTimeBefore(), LASTMODIFIEDTIMEBEFORE_BINDING);<NEW_LINE>protocolMarshaller.marshall(listProcessingJobsRequest.getNameContains(), NAMECONTAINS_BINDING);<NEW_LINE>protocolMarshaller.marshall(listProcessingJobsRequest.getStatusEquals(), STATUSEQUALS_BINDING);<NEW_LINE>protocolMarshaller.marshall(listProcessingJobsRequest.getSortBy(), SORTBY_BINDING);<NEW_LINE>protocolMarshaller.marshall(listProcessingJobsRequest.getSortOrder(), SORTORDER_BINDING);<NEW_LINE>protocolMarshaller.marshall(listProcessingJobsRequest.getNextToken(), NEXTTOKEN_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
listProcessingJobsRequest.getMaxResults(), MAXRESULTS_BINDING);
1,775,926
private Map<Path, List<KeyExtent>> assignMapFiles(Map<Path, List<AssignmentInfo>> assignments, Map<KeyExtent, String> locations, int numThreads) {<NEW_LINE>// group assignments by tablet<NEW_LINE>Map<KeyExtent, List<PathSize>> assignmentsPerTablet = new TreeMap<>();<NEW_LINE>assignments.forEach((mapFile, tabletsToAssignMapFileTo) -> tabletsToAssignMapFileTo.forEach(assignmentInfo -> assignmentsPerTablet.computeIfAbsent(assignmentInfo.ke, k -> new ArrayList<>()).add(new PathSize(mapFile, assignmentInfo.estSize))));<NEW_LINE>// group assignments by tabletserver<NEW_LINE>Map<Path, List<KeyExtent>> assignmentFailures = Collections.synchronizedMap(new TreeMap<>());<NEW_LINE>TreeMap<String, Map<KeyExtent, List<PathSize>>> assignmentsPerTabletServer = new TreeMap<>();<NEW_LINE>assignmentsPerTablet.forEach((ke, pathSizes) -> {<NEW_LINE>String location = locations.get(ke);<NEW_LINE>if (location == null) {<NEW_LINE>synchronized (assignmentFailures) {<NEW_LINE>pathSizes.forEach(pathSize -> assignmentFailures.computeIfAbsent(pathSize.path, k -> new ArrayList<>()).add(ke));<NEW_LINE>}<NEW_LINE>log.warn("Could not assign {} map files to tablet {} because it had no location, will retry ...", pathSizes.size(), ke);<NEW_LINE>} else {<NEW_LINE>assignmentsPerTabletServer.computeIfAbsent(location, k -> new TreeMap<>()<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>ExecutorService threadPool = ThreadPools.getServerThreadPools().createFixedThreadPool(numThreads, "submit", false);<NEW_LINE>for (Entry<String, Map<KeyExtent, List<PathSize>>> entry : assignmentsPerTabletServer.entrySet()) {<NEW_LINE>String location = entry.getKey();<NEW_LINE>threadPool.execute(new AssignmentTask(assignmentFailures, location, entry.getValue()));<NEW_LINE>}<NEW_LINE>threadPool.shutdown();<NEW_LINE>while (!threadPool.isTerminated()) {<NEW_LINE>try {<NEW_LINE>threadPool.awaitTermination(60, TimeUnit.SECONDS);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>log.error("Encountered InterruptedException while waiting for the thread pool to terminate.", e);<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return assignmentFailures;<NEW_LINE>}
).put(ke, pathSizes);
1,504,922
final CreateStoreImageTaskResult executeCreateStoreImageTask(CreateStoreImageTaskRequest createStoreImageTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createStoreImageTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateStoreImageTaskRequest> request = null;<NEW_LINE>Response<CreateStoreImageTaskResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateStoreImageTaskRequestMarshaller().marshall(super.beforeMarshalling(createStoreImageTaskRequest));<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, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateStoreImageTask");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>StaxResponseHandler<CreateStoreImageTaskResult> responseHandler = new StaxResponseHandler<CreateStoreImageTaskResult>(new CreateStoreImageTaskResultStaxUnmarshaller());<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.endEvent(Field.RequestMarshallTime);
1,186,638
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.<MASK><NEW_LINE>Card card = game.getCard(this.getTargetPointer().getFirst(game, source));<NEW_LINE>if (controller != null && card != null) {<NEW_LINE>if (controller.chooseUse(outcome, "Cast " + card.getLogName() + '?', source, game)) {<NEW_LINE>game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE);<NEW_LINE>boolean cardWasCast = controller.cast(controller.chooseAbilityForCast(card, game, true), game, true, new ApprovingObject(source, game));<NEW_LINE>game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), null);<NEW_LINE>if (cardWasCast) {<NEW_LINE>ContinuousEffect effect = new TorrentialGearhulkReplacementEffect(card.getId());<NEW_LINE>effect.setTargetPointer(new FixedTarget(card.getId(), game.getState().getZoneChangeCounter(card.getId())));<NEW_LINE>game.addEffect(effect, source);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
getPlayer(source.getControllerId());