idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
636,250
public Node createNode(Label... labels) {<NEW_LINE>var ktx = kernelTransaction();<NEW_LINE>try {<NEW_LINE>TokenWrite tokenWrite = ktx.tokenWrite();<NEW_LINE>int[] labelIds = new int[labels.length];<NEW_LINE>String[] labelNames = new String[labels.length];<NEW_LINE>for (int i = 0; i < labelNames.length; i++) {<NEW_LINE>labelNames[i] = labels[i].name();<NEW_LINE>}<NEW_LINE>tokenWrite.labelGetOrCreateForNames(labelNames, labelIds);<NEW_LINE>Write write = ktx.dataWrite();<NEW_LINE>long nodeId = write.nodeCreateWithLabels(labelIds);<NEW_LINE>return newNodeEntity(nodeId);<NEW_LINE>} catch (ConstraintValidationException e) {<NEW_LINE><MASK><NEW_LINE>} catch (SchemaKernelException e) {<NEW_LINE>throw new IllegalArgumentException(e);<NEW_LINE>} catch (KernelException e) {<NEW_LINE>throw new ConstraintViolationException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
throw new ConstraintViolationException("Unable to add label.", e);
1,417,113
public ASTNode visitCreateDefaultShardingStrategy(final CreateDefaultShardingStrategyContext ctx) {<NEW_LINE><MASK><NEW_LINE>String shardingAlgorithmName = null;<NEW_LINE>if (null != shardingStrategyContext.shardingAlgorithm().existingAlgorithm()) {<NEW_LINE>shardingAlgorithmName = getIdentifierValue(shardingStrategyContext.shardingAlgorithm().existingAlgorithm().shardingAlgorithmName()).toLowerCase();<NEW_LINE>}<NEW_LINE>AlgorithmSegment algorithmSegment = null;<NEW_LINE>if (null != shardingStrategyContext.shardingAlgorithm().autoCreativeAlgorithm()) {<NEW_LINE>algorithmSegment = (AlgorithmSegment) visitAlgorithmDefinition(shardingStrategyContext.shardingAlgorithm().autoCreativeAlgorithm().algorithmDefinition());<NEW_LINE>}<NEW_LINE>String defaultType = new IdentifierValue(ctx.type.getText()).getValue();<NEW_LINE>String strategyType = getIdentifierValue(shardingStrategyContext.strategyType());<NEW_LINE>String shardingColumn = buildShardingColumn(ctx.shardingStrategy().shardingColumnDefinition());<NEW_LINE>return new CreateDefaultShardingStrategyStatement(defaultType, strategyType, shardingColumn, shardingAlgorithmName, algorithmSegment);<NEW_LINE>}
ShardingStrategyContext shardingStrategyContext = ctx.shardingStrategy();
1,593,304
protected ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag) throws Exception {<NEW_LINE>logger.debug(effectivePerson, "flag:{}.", flag);<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = null;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>GeneralFile generalFile = emc.find(flag, GeneralFile.class);<NEW_LINE>if (generalFile != null) {<NEW_LINE>if (!StringUtils.equals(effectivePerson.getDistinguishedName(), generalFile.getPerson())) {<NEW_LINE>throw new ExceptionAccessDenied(effectivePerson);<NEW_LINE>}<NEW_LINE>StorageMapping gfMapping = ThisApplication.context().storageMappings().get(GeneralFile.<MASK><NEW_LINE>wo = new Wo(generalFile.readContent(gfMapping), this.contentType(true, generalFile.getName()), this.contentDisposition(true, generalFile.getName()));<NEW_LINE>result.setData(wo);<NEW_LINE>generalFile.deleteContent(gfMapping);<NEW_LINE>emc.beginTransaction(GeneralFile.class);<NEW_LINE>emc.delete(GeneralFile.class, generalFile.getId());<NEW_LINE>emc.commit();<NEW_LINE>} else {<NEW_LINE>throw new ExceptionInputResultObject(flag);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}
class, generalFile.getStorage());
749,622
private X509Certificate[] openCaReply() {<NEW_LINE>X509Certificate[] certs = null;<NEW_LINE>try {<NEW_LINE>// get clip board contents, but only string types, not files<NEW_LINE>Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();<NEW_LINE>Transferable <MASK><NEW_LINE>if (t.isDataFlavorSupported(DataFlavor.stringFlavor)) {<NEW_LINE>String data;<NEW_LINE>data = (String) t.getTransferData(DataFlavor.stringFlavor);<NEW_LINE>// try to extract certs from clip board data<NEW_LINE>certs = X509CertUtil.loadCertificates(data.getBytes());<NEW_LINE>if (certs.length == 0) {<NEW_LINE>JOptionPane.showMessageDialog(frame, MessageFormat.format(res.getString("ImportCaReplyFromClipboardAction.NoCertsFound.message"), "Clipboard"), res.getString("ImportCaReplyFromClipboardAction.OpenCaReply.Title"), JOptionPane.WARNING_MESSAGE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return certs;<NEW_LINE>} catch (Exception ex) {<NEW_LINE>String problemStr = MessageFormat.format(res.getString("ImportCaReplyFromClipboardAction.NoOpenCaReply.Problem"), "Clipboard");<NEW_LINE>String[] causes = new String[] { res.getString("ImportCaReplyFromClipboardAction.NotCaReply.Cause"), res.getString("ImportCaReplyFromClipboardAction.CorruptedCaReply.Cause") };<NEW_LINE>Problem problem = new Problem(problemStr, causes, ex);<NEW_LINE>DProblem dProblem = new DProblem(frame, res.getString("ImportCaReplyFromClipboardAction.ProblemOpeningCaReply.Title"), problem);<NEW_LINE>dProblem.setLocationRelativeTo(frame);<NEW_LINE>dProblem.setVisible(true);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
t = clipboard.getContents(null);
6,352
private static void log(Connector c, Map<String, Argument> args) {<NEW_LINE>LogRecord record = new LogRecord(Level.INFO, "USG_DEBUG_ATTACH_JPDA");<NEW_LINE>record.setResourceBundle(NbBundle.getBundle(ConnectPanel.class));<NEW_LINE>// NOI18N<NEW_LINE>record.setResourceBundleName(ConnectPanel.class.getPackage().getName() + ".Bundle");<NEW_LINE>record.setLoggerName(USG_LOGGER.getName());<NEW_LINE>List<Object> params = new ArrayList<Object>();<NEW_LINE>params.add(c.name());<NEW_LINE>StringBuilder arguments = new StringBuilder();<NEW_LINE>for (Map.Entry argEntry : args.entrySet()) {<NEW_LINE>// arguments.append(argEntry.getKey());<NEW_LINE>// arguments.append("=");<NEW_LINE>arguments.append(argEntry.getValue());<NEW_LINE>arguments.append(", ");<NEW_LINE>}<NEW_LINE>if (arguments.length() > 2) {<NEW_LINE>arguments.delete(arguments.length() - 2, arguments.length());<NEW_LINE>}<NEW_LINE>params.add(arguments);<NEW_LINE>record.setParameters(params.toArray(new Object[<MASK><NEW_LINE>USG_LOGGER.log(record);<NEW_LINE>}
params.size()]));
1,836,967
public File postFilesId(String fileId, FilesFileIdBody1 body, List<String> fields) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'fileId' is set<NEW_LINE>if (fileId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'fileId' when calling postFilesId");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/files/{file_id}".replaceAll("\\{" + "file_id" + "\\}", apiClient.escapeString(fileId.toString()));<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "fields", fields));<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final <MASK><NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>GenericType<File> localVarReturnType = new GenericType<File>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
String[] localVarContentTypes = { "application/json" };
1,630,102
public void marshall(AwsElbLoadBalancerDetails awsElbLoadBalancerDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (awsElbLoadBalancerDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getAvailabilityZones(), AVAILABILITYZONES_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getBackendServerDescriptions(), BACKENDSERVERDESCRIPTIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getCanonicalHostedZoneName(), CANONICALHOSTEDZONENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getCanonicalHostedZoneNameID(), CANONICALHOSTEDZONENAMEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getCreatedTime(), CREATEDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getDnsName(), DNSNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getHealthCheck(), HEALTHCHECK_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getInstances(), INSTANCES_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getListenerDescriptions(), LISTENERDESCRIPTIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getLoadBalancerAttributes(), LOADBALANCERATTRIBUTES_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getLoadBalancerName(), LOADBALANCERNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getPolicies(), POLICIES_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getScheme(), SCHEME_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getSecurityGroups(), SECURITYGROUPS_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getSourceSecurityGroup(), SOURCESECURITYGROUP_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(awsElbLoadBalancerDetails.getVpcId(), VPCID_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
awsElbLoadBalancerDetails.getSubnets(), SUBNETS_BINDING);
1,248,257
private void generateBridgeMethod(Type[] actualGenericTypes, soot.Type[] unboxedTypes, String[][] targetMethodAnnotations, ClassWriter cw) {<NEW_LINE>List<Type> genericParamTypes = new ArrayList<>();<NEW_LINE>genericParamTypes.add(new SootTypeType<MASK><NEW_LINE>genericParamTypes.add(new SootTypeType(org_robovm_objc_ObjCBlock.getType()));<NEW_LINE>for (int i = 1; i < unboxedTypes.length; i++) {<NEW_LINE>Type t = unboxedTypes[i] instanceof PrimType ? new SootTypeType(unboxedTypes[i]) : actualGenericTypes[i];<NEW_LINE>genericParamTypes.add(t);<NEW_LINE>}<NEW_LINE>Type genericReturnType = unboxedTypes[0] instanceof PrimType ? new SootTypeType(unboxedTypes[0]) : actualGenericTypes[0];<NEW_LINE>List<soot.Type> rawParamTypes = new ArrayList<>();<NEW_LINE>rawParamTypes.add(LongType.v());<NEW_LINE>rawParamTypes.add(org_robovm_objc_ObjCBlock.getType());<NEW_LINE>rawParamTypes.addAll(Arrays.asList(unboxedTypes).subList(1, unboxedTypes.length));<NEW_LINE>String name = "invoke";<NEW_LINE>String signature = getGenericSignature(genericParamTypes, genericReturnType);<NEW_LINE>String desc = getDescriptor(rawParamTypes, unboxedTypes[0]);<NEW_LINE>MethodVisitor mv = cw.visitMethod(ACC_PRIVATE | ACC_STATIC | ACC_NATIVE, name, desc, signature, null);<NEW_LINE>AnnotationVisitor av = mv.visitAnnotation(BRIDGE, true);<NEW_LINE>av.visit("dynamic", true);<NEW_LINE>av.visitEnd();<NEW_LINE>for (String s : targetMethodAnnotations[0]) {<NEW_LINE>mv.visitAnnotation(s, true).visitEnd();<NEW_LINE>}<NEW_LINE>for (int i = 1; i < targetMethodAnnotations.length; i++) {<NEW_LINE>for (String s : targetMethodAnnotations[i]) {<NEW_LINE>// We add 2 parameters first so annotations for the first<NEW_LINE>// parameter must be added at index 2.<NEW_LINE>mv.visitParameterAnnotation(i + 1, s, true).visitEnd();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mv.visitParameterAnnotation(0, POINTER, true).visitEnd();<NEW_LINE>mv.visitEnd();<NEW_LINE>}
(LongType.v()));
907,536
public void decodeTerm(DataInput in, FieldInfo fieldInfo, BlockTermState _termState, boolean absolute) throws IOException {<NEW_LINE>final IntBlockTermState termState = (IntBlockTermState) _termState;<NEW_LINE>final boolean fieldHasPositions = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;<NEW_LINE>final boolean fieldHasOffsets = fieldInfo.getIndexOptions().<MASK><NEW_LINE>final boolean fieldHasPayloads = fieldInfo.hasPayloads();<NEW_LINE>if (absolute) {<NEW_LINE>termState.docStartFP = 0;<NEW_LINE>termState.posStartFP = 0;<NEW_LINE>termState.payStartFP = 0;<NEW_LINE>}<NEW_LINE>final long l = in.readVLong();<NEW_LINE>if ((l & 0x01) == 0) {<NEW_LINE>termState.docStartFP += l >>> 1;<NEW_LINE>if (termState.docFreq == 1) {<NEW_LINE>termState.singletonDocID = in.readVInt();<NEW_LINE>} else {<NEW_LINE>termState.singletonDocID = -1;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>assert absolute == false;<NEW_LINE>assert termState.singletonDocID != -1;<NEW_LINE>termState.singletonDocID += BitUtil.zigZagDecode(l >>> 1);<NEW_LINE>}<NEW_LINE>if (fieldHasPositions) {<NEW_LINE>termState.posStartFP += in.readVLong();<NEW_LINE>if (fieldHasOffsets || fieldHasPayloads) {<NEW_LINE>termState.payStartFP += in.readVLong();<NEW_LINE>}<NEW_LINE>if (termState.totalTermFreq > BLOCK_SIZE) {<NEW_LINE>termState.lastPosBlockOffset = in.readVLong();<NEW_LINE>} else {<NEW_LINE>termState.lastPosBlockOffset = -1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (termState.docFreq > BLOCK_SIZE) {<NEW_LINE>termState.skipOffset = in.readVLong();<NEW_LINE>} else {<NEW_LINE>termState.skipOffset = -1;<NEW_LINE>}<NEW_LINE>}
compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
1,659,146
protected void releaseVipOnBackend(Completion completion) {<NEW_LINE>List<String> vrs = proxy.getVrUuidsByNetworkService(VipVO.class.getSimpleName(<MASK><NEW_LINE>if (vrs == null || vrs.isEmpty()) {<NEW_LINE>completion.success();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String vrUuid = vrs.get(0);<NEW_LINE>final VirtualRouterVmVO vrvo = dbf.findByUuid(vrUuid, VirtualRouterVmVO.class);<NEW_LINE>VirtualRouterVmInventory vrInv = VirtualRouterVmInventory.valueOf(vrvo);<NEW_LINE>if (vrvo.getState() != VmInstanceState.Running) {<NEW_LINE>// vr will sync when becomes Running<NEW_LINE>proxy.detachNetworkService(vrUuid, VipVO.class.getSimpleName(), asList(self.getUuid()));<NEW_LINE>releaseVipOnHaHaRouter(vrInv, completion);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>releaseVipOnVirtualRouterVm(vrInv, asList(getSelfInventory()), new Completion(completion) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void success() {<NEW_LINE>logger.debug(String.format("successfully released vip[uuid:%s, name:%s, ip:%s] on virtual router vm[uuid:%s]", self.getUuid(), self.getName(), self.getIp(), vrvo.getUuid()));<NEW_LINE>proxy.detachNetworkService(vrUuid, VipVO.class.getSimpleName(), asList(self.getUuid()));<NEW_LINE>releaseVipOnHaHaRouter(vrInv, completion);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void fail(ErrorCode errorCode) {<NEW_LINE>logger.warn(errorCode.toString());<NEW_LINE>// NOTE: we don't know if the failure happens before or after the VIP deleted on the real device,<NEW_LINE>// for example, a message timeout failure happens after the VIP gets really deleted, but an internal error<NEW_LINE>// may happen before so. In both cases, we delete the database reference here so next time the backend<NEW_LINE>// will try to apply the VIP again. It's virtualrouter/vyos's responsibility to succeed if a VIP is applied<NEW_LINE>// while it exists<NEW_LINE>proxy.detachNetworkService(vrUuid, VipVO.class.getSimpleName(), asList(self.getUuid()));<NEW_LINE>releaseVipOnHaHaRouter(vrInv, new NopeCompletion());<NEW_LINE>completion.fail(errorCode);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
), self.getUuid());
1,676,357
public int compare(MediaItem leftItem, MediaItem rightItem) {<NEW_LINE>if (leftItem.getGlobalSegmentList() != null || rightItem.getGlobalSegmentList() != null) {<NEW_LINE>return 1;<NEW_LINE>}<NEW_LINE>if (mOrderType == ORDER_ASCENDANT) {<NEW_LINE>MediaItem tmpItem = leftItem;<NEW_LINE>leftItem = rightItem;<NEW_LINE>rightItem = tmpItem;<NEW_LINE>}<NEW_LINE>int leftItemBitrate = leftItem.getBitrate() == null ? 0 : parseInt(leftItem.getBitrate());<NEW_LINE>int rightItemBitrate = rightItem.getBitrate() == null ? 0 : <MASK><NEW_LINE>int leftItemHeight = leftItem.getSize() == null ? 0 : parseInt(MediaItemUtils.getHeight(leftItem));<NEW_LINE>int rightItemHeight = rightItem.getSize() == null ? 0 : parseInt(MediaItemUtils.getHeight(rightItem));<NEW_LINE>int delta = rightItemHeight - leftItemHeight;<NEW_LINE>if (delta == 0) {<NEW_LINE>delta = rightItemBitrate - leftItemBitrate;<NEW_LINE>}<NEW_LINE>return delta;<NEW_LINE>}
parseInt(rightItem.getBitrate());
1,741,439
private void updateFooter() {<NEW_LINE>List<ListItem> items = miniTable.getItems();<NEW_LINE>Iterator<ListItem> it = items.iterator();<NEW_LINE>BigDecimal periodActual = new BigDecimal(0.0);<NEW_LINE>BigDecimal periodBudget = new BigDecimal(0.0);<NEW_LINE>BigDecimal periodVariance = new BigDecimal(0.0);<NEW_LINE>BigDecimal totalActual = new BigDecimal(0.0);<NEW_LINE>BigDecimal totalBudget = new BigDecimal(0.0);<NEW_LINE>BigDecimal totalVariance = new BigDecimal(0.0);<NEW_LINE>boolean noneSelected = true;<NEW_LINE>while (it.hasNext()) {<NEW_LINE>ListItem item = it.next();<NEW_LINE>if (item.isSelected())<NEW_LINE>noneSelected = false;<NEW_LINE>}<NEW_LINE>it = items.iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>ListItem item = it.next();<NEW_LINE>if ((noneSelected || item.isSelected()) && item.getChildren().size() > 1) {<NEW_LINE>Listcell cell = (Listcell) item.getChildren().get(4);<NEW_LINE>periodActual = new BigDecimal(cell.getValue().toString()).add(periodActual);<NEW_LINE>cell = (Listcell) item.getChildren().get(5);<NEW_LINE>periodBudget = new BigDecimal(cell.getValue().toString()).add(periodBudget);<NEW_LINE>cell = (Listcell) item.getChildren().get(6);<NEW_LINE>periodVariance = new BigDecimal(cell.getValue().toString()).add(periodVariance);<NEW_LINE>cell = (Listcell) item.getChildren().get(7);<NEW_LINE>totalActual = new BigDecimal(cell.getValue().toString()).add(totalActual);<NEW_LINE>cell = (Listcell) item.getChildren().get(8);<NEW_LINE>totalBudget = new BigDecimal(cell.getValue().toString()).add(totalBudget);<NEW_LINE>cell = (Listcell) item.getChildren().get(9);<NEW_LINE>totalVariance = new BigDecimal(cell.getValue().toString()).add(totalVariance);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Listfoot listfoot = miniTable.getListfoot();<NEW_LINE>Listfooter listfooter = (Listfooter) listfoot.getChildren().get(4);<NEW_LINE>listfooter.setLabel(periodActual.<MASK><NEW_LINE>listfooter = (Listfooter) listfoot.getChildren().get(5);<NEW_LINE>listfooter.setLabel(periodBudget.toString().trim());<NEW_LINE>listfooter = (Listfooter) listfoot.getChildren().get(6);<NEW_LINE>listfooter.setLabel(periodVariance.toString());<NEW_LINE>listfooter = (Listfooter) listfoot.getChildren().get(7);<NEW_LINE>listfooter.setLabel(totalActual.toString());<NEW_LINE>listfooter = (Listfooter) listfoot.getChildren().get(8);<NEW_LINE>listfooter.setLabel(totalBudget.toString());<NEW_LINE>listfooter = (Listfooter) listfoot.getChildren().get(9);<NEW_LINE>listfooter.setLabel(totalVariance.toString());<NEW_LINE>}
toString().trim());
1,310,292
private void copy(Route src, Route it) {<NEW_LINE>Route.Before before = Optional.ofNullable(it.getBefore()).map(filter -> Optional.ofNullable(src.getBefore()).map(filter::then).orElse(filter)).orElseGet(src::getBefore);<NEW_LINE>Route.Decorator decorator = Optional.ofNullable(it.getDecorator()).map(filter -> Optional.ofNullable(src.getDecorator()).map(filter::then).orElse(filter)).orElseGet(src::getDecorator);<NEW_LINE>Route.After after = Optional.ofNullable(it.getAfter()).map(filter -> Optional.ofNullable(src.getAfter()).map(filter::then).orElse(filter)).orElseGet(src::getAfter);<NEW_LINE>it.setBefore(before);<NEW_LINE>it.setDecorator(decorator);<NEW_LINE>it.setAfter(after);<NEW_LINE>it.setConsumes(src.getConsumes());<NEW_LINE>it.<MASK><NEW_LINE>it.setHandle(src.getHandle());<NEW_LINE>it.setReturnType(src.getReturnType());<NEW_LINE>it.setAttributes(src.getAttributes());<NEW_LINE>it.setExecutorKey(src.getExecutorKey());<NEW_LINE>it.setHandle(src.getHandle());<NEW_LINE>}
setProduces(src.getProduces());
950,090
public Bitmap makeIcon() {<NEW_LINE>int measureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);<NEW_LINE>mContainer.measure(measureSpec, measureSpec);<NEW_LINE>int measuredWidth = mContainer.getMeasuredWidth();<NEW_LINE>int measuredHeight = mContainer.getMeasuredHeight();<NEW_LINE>mContainer.layout(0, 0, measuredWidth, measuredHeight);<NEW_LINE>if (mRotation == 1 || mRotation == 3) {<NEW_LINE>measuredHeight = mContainer.getMeasuredWidth();<NEW_LINE>measuredWidth = mContainer.getMeasuredHeight();<NEW_LINE>}<NEW_LINE>Bitmap r = Bitmap.createBitmap(measuredWidth, measuredHeight, Bitmap.Config.ARGB_8888);<NEW_LINE><MASK><NEW_LINE>Canvas canvas = new Canvas(r);<NEW_LINE>switch(mRotation) {<NEW_LINE>case 0:<NEW_LINE>// do nothing<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>canvas.translate(measuredWidth, 0);<NEW_LINE>canvas.rotate(90);<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>canvas.rotate(180, measuredWidth / 2, measuredHeight / 2);<NEW_LINE>break;<NEW_LINE>case 3:<NEW_LINE>canvas.translate(0, measuredHeight);<NEW_LINE>canvas.rotate(270);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>mContainer.draw(canvas);<NEW_LINE>return r;<NEW_LINE>}
r.eraseColor(Color.TRANSPARENT);
683,292
protected void preindex(EditDist editDist) {<NEW_LINE>TYPE editType = edit.getType();<NEW_LINE>if (!(editType == TYPE.DEL || editType == TYPE.DEL_SUBTREE || editType == TYPE.DEL_LEAF))<NEW_LINE>continue;<NEW_LINE>HashMap<Integer, Integer> alignment = editDist.getAlign1to2();<NEW_LINE>for (Integer postOrderIdx : alignment.keySet()) {<NEW_LINE>int <MASK><NEW_LINE>int wordOrderIdx = editDist.id2idxInWordOrder1(postOrderIdx);<NEW_LINE>int questionWOIdx = editDist.id2idxInWordOrder2(questionPOIdx);<NEW_LINE>assert (wordOrderIdx >= 0 && questionWOIdx >= 0);<NEW_LINE>postOrderMapping.put(wordOrderIdx, postOrderIdx);<NEW_LINE>questionPOMapping.put(wordOrderIdx, questionPOIdx);<NEW_LINE>if (wordOrderIdx > maxWOIdx)<NEW_LINE>maxWOIdx = wordOrderIdx;<NEW_LINE>}<NEW_LINE>}
questionPOIdx = alignment.get(postOrderIdx);
1,046,759
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String monitorName, String ruleSetName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (monitorName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (ruleSetName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));
100,792
public void upgradeSchema(CaseDbSchemaVersionNumber dbSchemaVersion, Connection connection) throws CentralRepoException, SQLException {<NEW_LINE>if (dbSchemaVersion.compareTo(new CaseDbSchemaVersionNumber(1, 6)) < 0) {<NEW_LINE>try (Statement statement = connection.createStatement()) {<NEW_LINE>CentralRepoPlatforms selectedPlatform = CentralRepoDbManager<MASK><NEW_LINE>for (CorrelationAttributeInstance.Type type : CorrelationAttributeInstance.getDefaultCorrelationTypes()) {<NEW_LINE>String instance_type_dbname = CentralRepoDbUtil.correlationTypeToInstanceTableName(type);<NEW_LINE>if ((type.getId() == CorrelationAttributeInstance.INSTALLED_PROGS_TYPE_ID) || (type.getId() == CorrelationAttributeInstance.OSACCOUNT_TYPE_ID)) {<NEW_LINE>// these are new Correlation types - new tables need to be created<NEW_LINE>statement.execute(String.format(RdbmsCentralRepoFactory.getCreateAccountInstancesTableTemplate(selectedPlatform), instance_type_dbname, instance_type_dbname));<NEW_LINE>statement.execute(String.format(RdbmsCentralRepoFactory.getAddCaseIdIndexTemplate(), instance_type_dbname, instance_type_dbname));<NEW_LINE>statement.execute(String.format(RdbmsCentralRepoFactory.getAddDataSourceIdIndexTemplate(), instance_type_dbname, instance_type_dbname));<NEW_LINE>statement.execute(String.format(RdbmsCentralRepoFactory.getAddValueIndexTemplate(), instance_type_dbname, instance_type_dbname));<NEW_LINE>statement.execute(String.format(RdbmsCentralRepoFactory.getAddKnownStatusIndexTemplate(), instance_type_dbname, instance_type_dbname));<NEW_LINE>statement.execute(String.format(RdbmsCentralRepoFactory.getAddObjectIdIndexTemplate(), instance_type_dbname, instance_type_dbname));<NEW_LINE>// add new correlation type<NEW_LINE>CentralRepoDbUtil.insertCorrelationType(connection, type);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getSavedDbChoice().getDbPlatform();
527,463
public List<PropertyDeclaration> buildDeclarations(CSSName cssName, List<PropertyValue> values, int origin, boolean important, boolean inheritAllowed) {<NEW_LINE>checkValueCount(cssName, 1, values.size());<NEW_LINE>CSSPrimitiveValue value = values.get(0);<NEW_LINE>checkInheritAllowed(value, inheritAllowed);<NEW_LINE>if (value.getCssValueType() == CSSValue.CSS_INHERIT) {<NEW_LINE>return Collections.singletonList(new PropertyDeclaration(cssName, value, important, origin));<NEW_LINE>}<NEW_LINE>if (value.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) {<NEW_LINE>IdentValue ident = checkIdent(cssName, value);<NEW_LINE>checkValidity(cssName, ALLOWED, ident);<NEW_LINE>if (ident == IdentValue.TOP) {<NEW_LINE>return Collections.singletonList(new PropertyDeclaration(cssName, new PropertyValue(CSSPrimitiveValue.CSS_PERCENTAGE, 0f, <MASK><NEW_LINE>} else if (ident == IdentValue.CENTER) {<NEW_LINE>return Collections.singletonList(new PropertyDeclaration(cssName, new PropertyValue(CSSPrimitiveValue.CSS_PERCENTAGE, 50f, "50%"), important, origin));<NEW_LINE>} else {<NEW_LINE>// if (ident == IdentValue.BOTTOM)<NEW_LINE>return Collections.singletonList(new PropertyDeclaration(cssName, new PropertyValue(CSSPrimitiveValue.CSS_PERCENTAGE, 100f, "100%"), important, origin));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>checkLengthOrPercentType(cssName, value);<NEW_LINE>return Collections.singletonList(new PropertyDeclaration(cssName, value, important, origin));<NEW_LINE>}<NEW_LINE>}
"0%"), important, origin));
103,107
protected double expectedAndEmpiricalCountsAndValueForADoc(double[][] E, double[][] Ehat, int docIndex) {<NEW_LINE>int[][][] docData = data[docIndex];<NEW_LINE>double[][][] featureVal3DArr = null;<NEW_LINE>if (featureVal != null) {<NEW_LINE>featureVal3DArr = featureVal[docIndex];<NEW_LINE>}<NEW_LINE>// make a clique tree for this document<NEW_LINE>CRFCliqueTree<String> cliqueTreeNoisyLabel = CRFCliqueTree.getCalibratedCliqueTree(docData, labelIndices, numClasses, classIndex, backgroundSymbol, getFunc(docIndex), featureVal3DArr);<NEW_LINE>CRFCliqueTree<String> cliqueTree = CRFCliqueTree.getCalibratedCliqueTree(docData, labelIndices, numClasses, classIndex, backgroundSymbol, cliquePotentialFunc, featureVal3DArr);<NEW_LINE>double prob = cliqueTreeNoisyLabel.totalMass() - cliqueTree.totalMass();<NEW_LINE>documentExpectedCounts(E, docData, featureVal3DArr, cliqueTree);<NEW_LINE>documentExpectedCounts(<MASK><NEW_LINE>return prob;<NEW_LINE>}
Ehat, docData, featureVal3DArr, cliqueTreeNoisyLabel);
765,924
public void run(RegressionEnvironment env) {<NEW_LINE>String[] <MASK><NEW_LINE>String text = "@name('s0') select * from SupportRecogBean " + "match_recognize (" + " measures A.theString as string, A.value as value" + " all matches pattern (A) " + " define " + " A as PREV(A.theString, 1) = theString" + ")";<NEW_LINE>env.compileDeploy(text).addListener("s0");<NEW_LINE>env.sendEventBean(new SupportRecogBean("s1", 1));<NEW_LINE>env.milestone(0);<NEW_LINE>env.sendEventBean(new SupportRecogBean("s2", 2));<NEW_LINE>env.sendEventBean(new SupportRecogBean("s1", 3));<NEW_LINE>env.sendEventBean(new SupportRecogBean("s3", 4));<NEW_LINE>env.milestone(1);<NEW_LINE>env.sendEventBean(new SupportRecogBean("s2", 5));<NEW_LINE>env.sendEventBean(new SupportRecogBean("s1", 6));<NEW_LINE>env.assertIterator("s0", it -> assertFalse(it.hasNext()));<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.sendEventBean(new SupportRecogBean("s1", 7));<NEW_LINE>env.assertPropsPerRowLastNew("s0", fields, new Object[][] { { "s1", 7 } });<NEW_LINE>env.assertIterator("s0", it -> assertFalse(it.hasNext()));<NEW_LINE>env.undeployAll();<NEW_LINE>}
fields = "string,value".split(",");
303,171
public static DescribeIpControlPolicyItemsResponse unmarshall(DescribeIpControlPolicyItemsResponse describeIpControlPolicyItemsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeIpControlPolicyItemsResponse.setRequestId(_ctx.stringValue("DescribeIpControlPolicyItemsResponse.RequestId"));<NEW_LINE>describeIpControlPolicyItemsResponse.setTotalCount(_ctx.integerValue("DescribeIpControlPolicyItemsResponse.TotalCount"));<NEW_LINE>describeIpControlPolicyItemsResponse.setPageSize(_ctx.integerValue("DescribeIpControlPolicyItemsResponse.PageSize"));<NEW_LINE>describeIpControlPolicyItemsResponse.setPageNumber(_ctx.integerValue("DescribeIpControlPolicyItemsResponse.PageNumber"));<NEW_LINE>List<IpControlPolicyItem> ipControlPolicyItems = new ArrayList<IpControlPolicyItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeIpControlPolicyItemsResponse.IpControlPolicyItems.Length"); i++) {<NEW_LINE>IpControlPolicyItem ipControlPolicyItem = new IpControlPolicyItem();<NEW_LINE>ipControlPolicyItem.setAppId(_ctx.stringValue("DescribeIpControlPolicyItemsResponse.IpControlPolicyItems[" + i + "].AppId"));<NEW_LINE>ipControlPolicyItem.setCidrIp(_ctx.stringValue("DescribeIpControlPolicyItemsResponse.IpControlPolicyItems[" + i + "].CidrIp"));<NEW_LINE>ipControlPolicyItem.setPolicyItemId(_ctx.stringValue("DescribeIpControlPolicyItemsResponse.IpControlPolicyItems[" + i + "].PolicyItemId"));<NEW_LINE>ipControlPolicyItem.setCreateTime(_ctx.stringValue("DescribeIpControlPolicyItemsResponse.IpControlPolicyItems[" + i + "].CreateTime"));<NEW_LINE>ipControlPolicyItem.setModifiedTime(_ctx.stringValue<MASK><NEW_LINE>ipControlPolicyItems.add(ipControlPolicyItem);<NEW_LINE>}<NEW_LINE>describeIpControlPolicyItemsResponse.setIpControlPolicyItems(ipControlPolicyItems);<NEW_LINE>return describeIpControlPolicyItemsResponse;<NEW_LINE>}
("DescribeIpControlPolicyItemsResponse.IpControlPolicyItems[" + i + "].ModifiedTime"));
179,521
String build(String projectId) {<NEW_LINE>String token;<NEW_LINE>Algorithm algorithm;<NEW_LINE>try {<NEW_LINE>Security.addProvider(new BouncyCastleProvider());<NEW_LINE>Reader reader = new InputStreamReader(ClassLoader.getSystemResourceAsStream("ec_private.pem"));<NEW_LINE>PEMParser pemParser = new PEMParser(reader);<NEW_LINE>PEMKeyPair pemKeyPair = (PEMKeyPair) pemParser.readObject();<NEW_LINE>KeyPair keyPair = new JcaPEMKeyConverter().getKeyPair(pemKeyPair);<NEW_LINE>ECPrivateKey privateKey = (ECPrivateKey) keyPair.getPrivate();<NEW_LINE>ECPublicKey publicKey = (ECPublicKey) keyPair.getPublic();<NEW_LINE>algorithm = Algorithm.ECDSA256(publicKey, privateKey);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException("Unable to retrieve the EC private key.", e);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Date now = new Date();<NEW_LINE>Calendar cal = Calendar.getInstance();<NEW_LINE>cal.setTime(now);<NEW_LINE>cal.add(Calendar.HOUR_OF_DAY, 1);<NEW_LINE><MASK><NEW_LINE>token = JWT.create().withIssuer("auth0").withAudience(projectId).withIssuedAt(now).withExpiresAt(oneHourFromNow).sign(algorithm);<NEW_LINE>} catch (JWTCreationException e) {<NEW_LINE>throw new RuntimeException("Unable to create and sign JWT.", e);<NEW_LINE>}<NEW_LINE>return token;<NEW_LINE>}
Date oneHourFromNow = cal.getTime();
1,457,384
public MethodInfo addMethodInfo(short accessFlags, String methodName, MethodDescriptor methodMd) {<NEW_LINE>int parameterCount = Mod.isStatic(accessFlags) ? 0 : 1;<NEW_LINE>for (String fd : methodMd.parameterFds) parameterCount += Descriptor.size(fd);<NEW_LINE>// JVMS8 4.3.3<NEW_LINE>// See https://github.com/janino-compiler/janino/pull/46<NEW_LINE>if (parameterCount > 255) {<NEW_LINE>throw new ClassFileException(("Method \"" + methodName + "\" has too many parameters (" + parameterCount + ")"));<NEW_LINE>}<NEW_LINE>MethodInfo mi = new // accessFlags<NEW_LINE>MethodInfo(// nameIndex<NEW_LINE>accessFlags, // desriptorIndex<NEW_LINE>this.addConstantUtf8Info(methodName), // attributes<NEW_LINE>this.addConstantUtf8Info(methodMd.toString()), new ArrayList<AttributeInfo>());<NEW_LINE><MASK><NEW_LINE>return mi;<NEW_LINE>}
this.methodInfos.add(mi);
432,712
private void addMatches(Matcher matcher, int fieldIndex, int hashCode, IntList results) {<NEW_LINE>int hashIntCode = HashCodes.hashInt(hashCode);<NEW_LINE>int bucket = hashIntCode & (hashedFieldKeys[fieldIndex].length - 1);<NEW_LINE>while (hashedFieldKeys[fieldIndex][bucket] != ORDINAL_NONE) {<NEW_LINE>int chainIndex = hashedFieldKeys[fieldIndex][bucket];<NEW_LINE>int representativeOrdinal = (int) hashedFieldKeyChains.get(chainIndex);<NEW_LINE>if (matcher.foundMatch(representativeOrdinal)) {<NEW_LINE>while (representativeOrdinal != ORDINAL_NONE) {<NEW_LINE>results.add(representativeOrdinal);<NEW_LINE>chainIndex = (int) (hashedFieldKeyChains.get(chainIndex) >> 32);<NEW_LINE>representativeOrdinal = (chainIndex == Integer.MAX_VALUE) ? ORDINAL_NONE : (<MASK><NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>bucket++;<NEW_LINE>bucket &= hashedFieldKeys[fieldIndex].length - 1;<NEW_LINE>}<NEW_LINE>}
int) hashedFieldKeyChains.get(chainIndex);
1,211,404
public static RecognizeLabelResponse unmarshall(RecognizeLabelResponse recognizeLabelResponse, UnmarshallerContext _ctx) {<NEW_LINE>recognizeLabelResponse.setCode(_ctx.stringValue("RecognizeLabelResponse.Code"));<NEW_LINE>recognizeLabelResponse.setSuccess(_ctx.booleanValue("RecognizeLabelResponse.Success"));<NEW_LINE>recognizeLabelResponse.setMessage(_ctx.stringValue("RecognizeLabelResponse.Message"));<NEW_LINE>Response response = new Response();<NEW_LINE>response.setSuccess(_ctx.booleanValue("RecognizeLabelResponse.Response.Success"));<NEW_LINE>response.setUrl<MASK><NEW_LINE>response.setRequestId(_ctx.stringValue("RecognizeLabelResponse.Response.RequestId"));<NEW_LINE>response.setErrorCode(_ctx.stringValue("RecognizeLabelResponse.Response.ErrorCode"));<NEW_LINE>response.setErrorMessage(_ctx.stringValue("RecognizeLabelResponse.Response.ErrorMessage"));<NEW_LINE>Data data = new Data();<NEW_LINE>List<Node> objects = new ArrayList<Node>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("RecognizeLabelResponse.Response.Data.Objects.Length"); i++) {<NEW_LINE>Node node = new Node();<NEW_LINE>PropertiesResults propertiesResults = new PropertiesResults();<NEW_LINE>propertiesResults.setPropertyId(_ctx.stringValue("RecognizeLabelResponse.Response.Data.Objects[" + i + "].PropertiesResults.PropertyId"));<NEW_LINE>propertiesResults.setPropertyName(_ctx.stringValue("RecognizeLabelResponse.Response.Data.Objects[" + i + "].PropertiesResults.PropertyName"));<NEW_LINE>List<SubNode> values = new ArrayList<SubNode>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("RecognizeLabelResponse.Response.Data.Objects[" + i + "].PropertiesResults.Values.Length"); j++) {<NEW_LINE>SubNode subNode = new SubNode();<NEW_LINE>subNode.setProbability(_ctx.integerValue("RecognizeLabelResponse.Response.Data.Objects[" + i + "].PropertiesResults.Values[" + j + "].Probability"));<NEW_LINE>subNode.setValueId(_ctx.stringValue("RecognizeLabelResponse.Response.Data.Objects[" + i + "].PropertiesResults.Values[" + j + "].ValueId"));<NEW_LINE>subNode.setValueName(_ctx.stringValue("RecognizeLabelResponse.Response.Data.Objects[" + i + "].PropertiesResults.Values[" + j + "].ValueName"));<NEW_LINE>values.add(subNode);<NEW_LINE>}<NEW_LINE>propertiesResults.setValues(values);<NEW_LINE>node.setPropertiesResults(propertiesResults);<NEW_LINE>objects.add(node);<NEW_LINE>}<NEW_LINE>data.setObjects(objects);<NEW_LINE>response.setData(data);<NEW_LINE>recognizeLabelResponse.setResponse(response);<NEW_LINE>return recognizeLabelResponse;<NEW_LINE>}
(_ctx.stringValue("RecognizeLabelResponse.Response.Url"));
1,315,099
protected Lock obtainFSLock(FSDirectory dir, String lockName) throws IOException {<NEW_LINE>Path lockDir = dir.getDirectory();<NEW_LINE>// Ensure that lockDir exists and is a directory.<NEW_LINE>// note: this will fail if lockDir is a symlink<NEW_LINE>Files.createDirectories(lockDir);<NEW_LINE>Path lockFile = lockDir.resolve(lockName);<NEW_LINE>IOException creationException = null;<NEW_LINE>try {<NEW_LINE>Files.createFile(lockFile);<NEW_LINE>} catch (IOException ignore) {<NEW_LINE>// we must create the file to have a truly canonical path.<NEW_LINE>// if it's already created, we don't care. if it cant be created, it will fail below.<NEW_LINE>creationException = ignore;<NEW_LINE>}<NEW_LINE>// fails if the lock file does not exist<NEW_LINE>final Path realPath;<NEW_LINE>try {<NEW_LINE>realPath = lockFile.toRealPath();<NEW_LINE>} catch (IOException e) {<NEW_LINE>// if we couldn't resolve the lock file, it might be because we couldn't create it.<NEW_LINE>// so append any exception from createFile as a suppressed exception, in case its useful<NEW_LINE>if (creationException != null) {<NEW_LINE>e.addSuppressed(creationException);<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>// used as a best-effort check, to see if the underlying file has changed<NEW_LINE>final FileTime creationTime = Files.readAttributes(realPath, BasicFileAttributes.class).creationTime();<NEW_LINE>if (LOCK_HELD.add(realPath.toString())) {<NEW_LINE>FileChannel channel = null;<NEW_LINE>FileLock lock = null;<NEW_LINE>try {<NEW_LINE>channel = FileChannel.open(realPath, StandardOpenOption.CREATE, StandardOpenOption.WRITE);<NEW_LINE>lock = channel.tryLock();<NEW_LINE>if (lock != null) {<NEW_LINE>return new NativeFSLock(lock, channel, realPath, creationTime);<NEW_LINE>} else {<NEW_LINE>throw new LockObtainFailedException("Lock held by another program: " + realPath);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (lock == null) {<NEW_LINE>// not successful - clear up and move out<NEW_LINE>// TODO: addSuppressed<NEW_LINE>IOUtils.closeWhileHandlingException(channel);<NEW_LINE>// clear LOCK_HELD last<NEW_LINE>clearLockHeld(realPath);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
throw new LockObtainFailedException("Lock held by this virtual machine: " + realPath);
281,662
public void draw(Canvas canvas) {<NEW_LINE>if (_minkoWebViewRenderer == null) {<NEW_LINE>super.draw(canvas);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Returns canvas attached to OpenGL texture to draw on<NEW_LINE>Canvas glAttachedCanvas = _minkoWebViewRenderer.onDrawViewBegin();<NEW_LINE>if (glAttachedCanvas != null) {<NEW_LINE>// Translate canvas to reflect view scrolling<NEW_LINE>float xScale = glAttachedCanvas.getWidth() / (float) canvas.getWidth();<NEW_LINE>glAttachedCanvas.scale(xScale, xScale);<NEW_LINE>glAttachedCanvas.translate(-getScrollX<MASK><NEW_LINE>// Log.i(TAG, "[MinkoWebView] Draw on the OpenGL ES attached canvas.");<NEW_LINE>// Don't forget to clear the canvas before to write<NEW_LINE>glAttachedCanvas.drawColor(Color.TRANSPARENT, Mode.MULTIPLY);<NEW_LINE>// Draw the view to provided canvas<NEW_LINE>super.draw(glAttachedCanvas);<NEW_LINE>// Notice the native code<NEW_LINE>minkoNativeOnWebViewUpdate();<NEW_LINE>} else {<NEW_LINE>// Log.w(TAG, "[MinkoWebView] Attached canvas is null.");<NEW_LINE>super.draw(canvas);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Notify the canvas is updated<NEW_LINE>_minkoWebViewRenderer.onDrawViewEnd();<NEW_LINE>}
(), -getScrollY());
1,794,674
protected void convertAgg(Blackboard bb, SqlSelect select, List<SqlNode> orderExprList) {<NEW_LINE>final boolean distinct = select.isDistinct();<NEW_LINE>assert bb.root != null : "precondition: child != null";<NEW_LINE>SqlNodeList groupList = select.getGroup();<NEW_LINE>SqlNodeList selectList = select.getSelectList();<NEW_LINE>SqlNode having = select.getHaving();<NEW_LINE>final AggConverter aggConverter = new AggConverter(bb, select);<NEW_LINE>if (this.validator instanceof SqlValidatorImpl) {<NEW_LINE>SqlValidatorImpl sqlValidator = (SqlValidatorImpl) this.validator;<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>List<SqlIdentifier> firstValueForSubquery = Lists.newArrayList();<NEW_LINE>RelNode input = bb.root;<NEW_LINE>int count = 0;<NEW_LINE>while (true) {<NEW_LINE>try {<NEW_LINE>bb.setRoot(input, false);<NEW_LINE>createAggImpl(bb, aggConverter, selectList, groupList, having, orderExprList, firstValueForSubquery);<NEW_LINE>break;<NEW_LINE>} catch (ValidationFirstValueException e) {<NEW_LINE>if (count++ > CORRELATE_LOOP_UPPER_BAND) {<NEW_LINE>throw new AssertionError(e.getMessage() + ", DEAD LOOP DETECTED:" + firstValueForSubquery.subList(0, 10).toString());<NEW_LINE>}<NEW_LINE>firstValueForSubquery.add(e.getSqlIdentifier());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (distinct) {<NEW_LINE>distinctify(bb, null, null, true);<NEW_LINE>}<NEW_LINE>}
having = sqlValidator.validatedExpandingHaving(select);
1,559,119
protected void onEvent(String path, Trigger c) {<NEW_LINE>eventCallbacks.put(path, new EventCallback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>@AsyncThread<NEW_LINE>protected void run(Map tokens, Object data) {<NEW_LINE>GarbageCollectorVO vo = dbf.findByUuid(uuid, GarbageCollectorVO.class);<NEW_LINE>if (vo == null) {<NEW_LINE>logger.warn(String.format("[GC] cannot find a job[name:%s, id:%s], assume it's deleted", NAME, uuid));<NEW_LINE>cancel();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!c.trigger(tokens, data)) {<NEW_LINE>// don't trigger it<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!lock()) {<NEW_LINE>logger.debug(String.format("[GC] the job[name:%s, id:%s] is being executed by another trigger," + "skip this event[%s]"<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>logger.debug(String.format("[GC] the job[name:%s, id:%s] is triggered by an event[%s]", NAME, uuid, path));<NEW_LINE>vo.setStatus(GCStatus.Processing);<NEW_LINE>dbf.update(vo);<NEW_LINE>runTrigger();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
, NAME, uuid, path));
311,416
public Page[] sliceAndRetainPagesTo(long to) {<NEW_LINE>if (to > capacity) {<NEW_LINE>throw new IndexOutOfBoundsException("can't slice a channel buffer with capacity [" + capacity + "], with slice parameters to [" + to + "]");<NEW_LINE>} else if (to == 0) {<NEW_LINE>return EMPTY_BYTE_PAGE_ARRAY;<NEW_LINE>}<NEW_LINE>long indexWithOffset = to + offset;<NEW_LINE>int pageCount = pageIndex(indexWithOffset);<NEW_LINE>int finalLimit = indexInPage(indexWithOffset);<NEW_LINE>if (finalLimit != 0) {<NEW_LINE>pageCount += 1;<NEW_LINE>}<NEW_LINE>Page[] duplicatePages = new Page[pageCount];<NEW_LINE>Iterator<Page> pageIterator = this.pages.iterator();<NEW_LINE>Page firstPage = pageIterator.next().duplicate();<NEW_LINE><MASK><NEW_LINE>firstBuffer.position(firstBuffer.position() + offset);<NEW_LINE>duplicatePages[0] = firstPage;<NEW_LINE>for (int i = 1; i < duplicatePages.length; i++) {<NEW_LINE>duplicatePages[i] = pageIterator.next().duplicate();<NEW_LINE>}<NEW_LINE>if (finalLimit != 0) {<NEW_LINE>duplicatePages[duplicatePages.length - 1].byteBuffer().limit(finalLimit);<NEW_LINE>}<NEW_LINE>return duplicatePages;<NEW_LINE>}
ByteBuffer firstBuffer = firstPage.byteBuffer();
961,576
private void createCacheDirectoryField(Composite container) {<NEW_LINE>Label label = new Label(container, SWT.NONE);<NEW_LINE>label.setText("Cac&he directory:");<NEW_LINE>cacheDirectoryField = new Text(container, SWT.SINGLE | <MASK><NEW_LINE>cacheDirectoryField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));<NEW_LINE>cacheDirectoryWorkspaceButton = new Button(container, SWT.PUSH);<NEW_LINE>cacheDirectoryWorkspaceButton.setText("Workspace...");<NEW_LINE>cacheDirectoryWorkspaceButton.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>String dir = chooseWorkspaceDirectory("Please, select a directory for the incremental cache");<NEW_LINE>if (dir != null) {<NEW_LINE>cacheDirectoryField.setText(dir);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>cacheDirectoryFileSystemButton = new Button(container, SWT.PUSH);<NEW_LINE>cacheDirectoryFileSystemButton.setText("External...");<NEW_LINE>cacheDirectoryFileSystemButton.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>String dir = chooseFileSystemDirectory("Please, select a directory for the incremental cache");<NEW_LINE>if (dir != null) {<NEW_LINE>cacheDirectoryField.setText(dir);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>updateCacheFieldsEnabled();<NEW_LINE>}
SWT.BORDER | SWT.READ_ONLY);
948,082
private Map<String, Object> processErrors(ExecutionResult result, List<GraphQLError> errors) {<NEW_LINE>Map<String, Object> resultMap = new HashMap<>();<NEW_LINE>resultMap.put(DATA, result.getData());<NEW_LINE>boolean hasErrors = false;<NEW_LINE>for (GraphQLError error : errors) {<NEW_LINE>if (error instanceof ExceptionWhileDataFetching) {<NEW_LINE>ExceptionWhileDataFetching e = (ExceptionWhileDataFetching) error;<NEW_LINE>Throwable cause = e.getException().getCause();<NEW_LINE>if (cause instanceof Error) {<NEW_LINE>// re-throw the error as this should result in 500 from graphQL endpoint<NEW_LINE>throw (Error) cause;<NEW_LINE>}<NEW_LINE>hasErrors = true;<NEW_LINE><MASK><NEW_LINE>} else if (error instanceof ValidationError) {<NEW_LINE>addError(resultMap, error);<NEW_LINE>// the spec tests for empty "data" node on validation errors<NEW_LINE>if (result.getData() == null) {<NEW_LINE>resultMap.put(DATA, null);<NEW_LINE>}<NEW_LINE>hasErrors = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (hasErrors) {<NEW_LINE>return resultMap;<NEW_LINE>} else {<NEW_LINE>return result.toSpecification();<NEW_LINE>}<NEW_LINE>}
addError(resultMap, error, cause);
1,052,178
protected String executorCommand(Config config, Config runtime, int containerIndex) {<NEW_LINE>Map<ExecutorPort, String> ports = new HashMap<>();<NEW_LINE>ports.put(ExecutorPort.SERVER_PORT, String.valueOf(freePorts.get(0)));<NEW_LINE>ports.put(ExecutorPort.TMANAGER_CONTROLLER_PORT, String.valueOf(freePorts.get(1)));<NEW_LINE>ports.put(ExecutorPort.TMANAGER_STATS_PORT, String.valueOf(freePorts.get(2)));<NEW_LINE>ports.put(ExecutorPort.SHELL_PORT, String.valueOf(freePorts.get(3)));<NEW_LINE>ports.put(ExecutorPort.METRICS_MANAGER_PORT, String.valueOf(freePorts.get(4)));<NEW_LINE>ports.put(ExecutorPort.SCHEDULER_PORT, String.valueOf(<MASK><NEW_LINE>ports.put(ExecutorPort.METRICS_CACHE_SERVER_PORT, String.valueOf(freePorts.get(6)));<NEW_LINE>ports.put(ExecutorPort.METRICS_CACHE_STATS_PORT, String.valueOf(freePorts.get(7)));<NEW_LINE>ports.put(ExecutorPort.CHECKPOINT_MANAGER_PORT, String.valueOf(freePorts.get(8)));<NEW_LINE>String[] executorCmd = SchedulerUtils.getExecutorCommand(config, runtime, containerIndex, ports);<NEW_LINE>return join(executorCmd, " ");<NEW_LINE>}
freePorts.get(5)));
1,009,086
private void copyDataCAVLC(ByteBuffer is, ByteBuffer os, BitReader reader, BitWriter writer) {<NEW_LINE>int wLeft = 8 - writer.curBit();<NEW_LINE>if (wLeft != 0)<NEW_LINE>writer.writeNBit(reader.readNBit(wLeft), wLeft);<NEW_LINE>writer.flush();<NEW_LINE>// Copy with shift<NEW_LINE>int shift = reader.curBit();<NEW_LINE>if (shift != 0) {<NEW_LINE>int mShift = 8 - shift;<NEW_LINE>int <MASK><NEW_LINE>reader.stop();<NEW_LINE>while (is.hasRemaining()) {<NEW_LINE>int out = inp << shift;<NEW_LINE>inp = is.get() & 0xff;<NEW_LINE>out |= inp >> mShift;<NEW_LINE>os.put((byte) out);<NEW_LINE>}<NEW_LINE>os.put((byte) (inp << shift));<NEW_LINE>} else {<NEW_LINE>reader.stop();<NEW_LINE>os.put(is);<NEW_LINE>}<NEW_LINE>}
inp = reader.readNBit(mShift);
922,247
public boolean open(SchemaNegotiator negotiator) {<NEW_LINE>// Result set loader setup<NEW_LINE>String tempDirPath = negotiator.drillConfig().getString(ExecConstants.DRILL_TMP_DIR);<NEW_LINE>HttpUrl url = buildUrl();<NEW_LINE>logger.debug("Final URL: {}", url);<NEW_LINE>CustomErrorContext errorContext = new ChildErrorContext(negotiator.parentErrorContext()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void addContext(UserException.Builder builder) {<NEW_LINE>super.addContext(builder);<NEW_LINE>builder.addContext("URL", url.toString());<NEW_LINE>}<NEW_LINE>};<NEW_LINE>negotiator.setErrorContext(errorContext);<NEW_LINE>// Http client setup<NEW_LINE>SimpleHttp http = SimpleHttp.builder().scanDefn(subScan).url(url).tempDir(new File(tempDirPath)).proxyConfig(proxySettings(negotiator.drillConfig(), url)).errorContext(errorContext).build();<NEW_LINE>// JSON loader setup<NEW_LINE>resultSetLoader = negotiator.build();<NEW_LINE>if (implicitColumnsAreProjected()) {<NEW_LINE>implicitColumns = new <MASK><NEW_LINE>buildImplicitColumns();<NEW_LINE>}<NEW_LINE>InputStream inStream = http.getInputStream();<NEW_LINE>populateImplicitFieldMap(http);<NEW_LINE>try {<NEW_LINE>JsonLoaderBuilder jsonBuilder = new JsonLoaderBuilder().implicitFields(implicitColumns).resultSetLoader(resultSetLoader).standardOptions(negotiator.queryOptions()).maxRows(maxRecords).dataPath(subScan.tableSpec().connectionConfig().dataPath()).errorContext(errorContext).fromStream(inStream);<NEW_LINE>if (subScan.tableSpec().connectionConfig().jsonOptions() != null) {<NEW_LINE>JsonLoaderOptions jsonOptions = subScan.tableSpec().connectionConfig().jsonOptions().getJsonOptions(negotiator.queryOptions());<NEW_LINE>jsonBuilder.options(jsonOptions);<NEW_LINE>} else {<NEW_LINE>jsonBuilder.standardOptions(negotiator.queryOptions());<NEW_LINE>}<NEW_LINE>jsonLoader = jsonBuilder.build();<NEW_LINE>} catch (Throwable t) {<NEW_LINE>// Paranoia: ensure stream is closed if anything goes wrong.<NEW_LINE>// After this, the JSON loader will close the stream.<NEW_LINE>AutoCloseables.closeSilently(inStream);<NEW_LINE>throw t;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
ImplicitColumns(resultSetLoader.writer());
645,862
private static void retrieveMultipleItemsBatchGet() {<NEW_LINE>try {<NEW_LINE>TableKeysAndAttributes forumTableKeysAndAttributes = new TableKeysAndAttributes(forumTableName);<NEW_LINE>// Add a partition key<NEW_LINE>forumTableKeysAndAttributes.addHashOnlyPrimaryKeys("Name", "Amazon S3", "Amazon DynamoDB");<NEW_LINE>TableKeysAndAttributes threadTableKeysAndAttributes = new TableKeysAndAttributes(threadTableName);<NEW_LINE>// Add a partition key and a sort key<NEW_LINE>threadTableKeysAndAttributes.addHashAndRangePrimaryKeys("ForumName", "Subject", "Amazon DynamoDB", "DynamoDB Thread 1", "Amazon DynamoDB", "DynamoDB Thread 2", "Amazon S3", "S3 Thread 1");<NEW_LINE>System.out.println("Making the request.");<NEW_LINE>BatchGetItemOutcome outcome = dynamoDB.batchGetItem(forumTableKeysAndAttributes, threadTableKeysAndAttributes);<NEW_LINE>Map<String, KeysAndAttributes> unprocessed = null;<NEW_LINE>do {<NEW_LINE>for (String tableName : outcome.getTableItems().keySet()) {<NEW_LINE>System.out.println("Items in table " + tableName);<NEW_LINE>List<Item> items = outcome.getTableItems().get(tableName);<NEW_LINE>for (Item item : items) {<NEW_LINE>System.out.println(item.toJSONPretty());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Check for unprocessed keys which could happen if you exceed<NEW_LINE>// provisioned<NEW_LINE>// throughput or reach the limit on response size.<NEW_LINE>unprocessed = outcome.getUnprocessedKeys();<NEW_LINE>if (unprocessed.isEmpty()) {<NEW_LINE>System.out.println("No unprocessed keys found");<NEW_LINE>} else {<NEW_LINE>System.out.println("Retrieving the unprocessed keys");<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} while (!unprocessed.isEmpty());<NEW_LINE>} catch (Exception e) {<NEW_LINE>System.err.println("Failed to retrieve items.");<NEW_LINE>System.err.println(e.getMessage());<NEW_LINE>}<NEW_LINE>}
outcome = dynamoDB.batchGetItemUnprocessed(unprocessed);
524,950
public static InputStream openInputStream(URI object, String userName, PasswordProvider passwordProvider, long offset) throws IOException {<NEW_LINE>final URLConnection urlConnection = object.toURL().openConnection();<NEW_LINE>if (!Strings.isNullOrEmpty(userName) && passwordProvider != null) {<NEW_LINE>String userPass = userName + ":" + passwordProvider.getPassword();<NEW_LINE>String basicAuthString = "Basic " + Base64.getEncoder().encodeToString<MASK><NEW_LINE>urlConnection.setRequestProperty("Authorization", basicAuthString);<NEW_LINE>}<NEW_LINE>// Set header for range request.<NEW_LINE>// Since we need to set only the start offset, the header is "bytes=<range-start>-".<NEW_LINE>// See https://tools.ietf.org/html/rfc7233#section-2.1<NEW_LINE>urlConnection.addRequestProperty(HttpHeaders.RANGE, StringUtils.format("bytes=%d-", offset));<NEW_LINE>final String contentRange = urlConnection.getHeaderField(HttpHeaders.CONTENT_RANGE);<NEW_LINE>final boolean withContentRange = contentRange != null && contentRange.startsWith("bytes ");<NEW_LINE>if (withContentRange && offset > 0) {<NEW_LINE>return urlConnection.getInputStream();<NEW_LINE>} else {<NEW_LINE>if (!withContentRange && offset > 0) {<NEW_LINE>LOG.warn("Since the input source doesn't support range requests, the object input stream is opened from the start and " + "then skipped. This may make the ingestion speed slower. Consider enabling prefetch if you see this message" + " a lot.");<NEW_LINE>}<NEW_LINE>InputStream in = urlConnection.getInputStream();<NEW_LINE>try {<NEW_LINE>final long skipped = in.skip(offset);<NEW_LINE>if (skipped != offset) {<NEW_LINE>in.close();<NEW_LINE>throw new ISE("Requested to skip [%s] bytes, but actual number of bytes skipped is [%s]", offset, skipped);<NEW_LINE>} else {<NEW_LINE>return in;<NEW_LINE>}<NEW_LINE>} catch (IOException ex) {<NEW_LINE>in.close();<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(StringUtils.toUtf8(userPass));
1,810,254
public static void loadPropertiesFromResources(String path) throws IOException {<NEW_LINE>if (instance == null) {<NEW_LINE>instance = getConfigInstance();<NEW_LINE>}<NEW_LINE>ClassLoader loader = Thread.currentThread().getContextClassLoader();<NEW_LINE>Enumeration<URL> <MASK><NEW_LINE>if (!resources.hasMoreElements()) {<NEW_LINE>// non-existent config path. Throw an exception. Issue #150<NEW_LINE>throw new IOException("Cannot locate " + path + " as a classpath resource.");<NEW_LINE>}<NEW_LINE>while (resources.hasMoreElements()) {<NEW_LINE>URL url = resources.nextElement();<NEW_LINE>InputStream fin = url.openStream();<NEW_LINE>Properties props = ConfigurationUtils.loadPropertiesFromInputStream(fin);<NEW_LINE>if (instance instanceof AggregatedConfiguration) {<NEW_LINE>String name = getConfigName(url);<NEW_LINE>ConcurrentMapConfiguration config = new ConcurrentMapConfiguration();<NEW_LINE>config.loadProperties(props);<NEW_LINE>((AggregatedConfiguration) instance).addConfiguration(config, name);<NEW_LINE>} else {<NEW_LINE>ConfigurationUtils.loadProperties(props, instance);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
resources = loader.getResources(path);
1,707,240
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>String test = request.getParameter("testMethod");<NEW_LINE><MASK><NEW_LINE>out.println("Starting " + test + "<br>");<NEW_LINE>System.out.println("-----> " + test + " starting");<NEW_LINE>try {<NEW_LINE>getClass().getMethod(test, HttpServletRequest.class, PrintWriter.class).invoke(this, request, out);<NEW_LINE>System.out.println("<----- " + test + " successful");<NEW_LINE>out.println(test + " " + SUCCESS_MESSAGE);<NEW_LINE>} catch (Throwable x) {<NEW_LINE>if (x instanceof InvocationTargetException)<NEW_LINE>x = x.getCause();<NEW_LINE>System.out.println("<----- " + test + " failed:");<NEW_LINE>x.printStackTrace(System.out);<NEW_LINE>out.println("<pre>ERROR in " + test + ":");<NEW_LINE>x.printStackTrace(out);<NEW_LINE>out.println("</pre>");<NEW_LINE>}<NEW_LINE>}
PrintWriter out = response.getWriter();
57,898
private void createNewFiltersAndCursors(ItemStream itemStream) throws SIResourceException, MessageStoreException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "createNewFiltersAndCursors", itemStream);<NEW_LINE>LockingCursor cursor = null;<NEW_LINE>// Instantiate a new array of Filters and associated cursors. If there is<NEW_LINE>// no message classification, then we'll instantiate a single filter and<NEW_LINE>// cursor pair.<NEW_LINE>if (classifyingMessages) {<NEW_LINE>// Classifying messages for XD.<NEW_LINE>// this work should be done under the classifications readlock acquired higher<NEW_LINE>// up in the stack<NEW_LINE>JSConsumerClassifications classifications = consumerSet.getClassifications();<NEW_LINE>int numClasses = classifications.getNumberOfClasses();<NEW_LINE>consumerKeyFilter = new LocalQPConsumerKeyFilter[numClasses + 1];<NEW_LINE>for (int i = 0; i < numClasses + 1; i++) {<NEW_LINE>String classificationName = null;<NEW_LINE>// The zeroth filter belongs to the default classification, which has a<NEW_LINE>// null classification name<NEW_LINE>if (i > 0)<NEW_LINE>classificationName = classifications.getClassification(i);<NEW_LINE>consumerKeyFilter[i] = new LocalQPConsumerKeyFilter(this, i, classificationName);<NEW_LINE>cursor = itemStream.newLockingItemCursor(consumerKeyFilter[i], !forwardScanning);<NEW_LINE>consumerKeyFilter<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// No message classification<NEW_LINE>consumerKeyFilter = new LocalQPConsumerKeyFilter[1];<NEW_LINE>consumerKeyFilter[0] = new LocalQPConsumerKeyFilter(this, 0, null);<NEW_LINE>cursor = itemStream.newLockingItemCursor(consumerKeyFilter[0], !forwardScanning);<NEW_LINE>consumerKeyFilter[0].setLockingCursor(cursor);<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "createNewFiltersAndCursors");<NEW_LINE>}
[i].setLockingCursor(cursor);
1,670,344
// CHECKSTYLE:OFF<NEW_LINE>private List<MavenArtifact> parseDependenciesNode(Node dependenciesNode) {<NEW_LINE>// CHECKSTYLE:ON<NEW_LINE>final List<MavenArtifact> deps = new ArrayList<>();<NEW_LINE>final NodeList dependencyNodes = dependenciesNode.getChildNodes();<NEW_LINE>for (int j = 0; j < dependencyNodes.getLength(); j++) {<NEW_LINE>final Node dependencyNode = dependencyNodes.item(j);<NEW_LINE>if ("dependency".equals(dependencyNode.getNodeName())) {<NEW_LINE>final NodeList childDependencyNodes = dependencyNode.getChildNodes();<NEW_LINE>final MavenArtifact dependency = new MavenArtifact();<NEW_LINE>String scope = null;<NEW_LINE>String optional = null;<NEW_LINE>for (int k = 0; k < childDependencyNodes.getLength(); k++) {<NEW_LINE>final Node childDependencyNode = childDependencyNodes.item(k);<NEW_LINE>final <MASK><NEW_LINE>if ("groupId".equals(nodeName)) {<NEW_LINE>dependency.groupId = childDependencyNode.getTextContent();<NEW_LINE>} else if ("artifactId".equals(nodeName)) {<NEW_LINE>dependency.artifactId = childDependencyNode.getTextContent();<NEW_LINE>} else if ("version".equals(nodeName)) {<NEW_LINE>dependency.version = childDependencyNode.getTextContent();<NEW_LINE>} else if ("scope".equals(nodeName)) {<NEW_LINE>scope = childDependencyNode.getTextContent();<NEW_LINE>} else if ("optional".equals(nodeName)) {<NEW_LINE>optional = childDependencyNode.getTextContent();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if ((scope == null || "compile".equals(scope)) && !"true".equals(optional)) {<NEW_LINE>deps.add(dependency);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return deps;<NEW_LINE>}
String nodeName = childDependencyNode.getNodeName();
1,704,460
public Message request(Message msg, long timeout) throws RequestTimeoutException, MQClientException, RemotingException, MQBrokerException, InterruptedException {<NEW_LINE>long beginTimestamp = System.currentTimeMillis();<NEW_LINE>prepareSendRequest(msg, timeout);<NEW_LINE>final String correlationId = msg.getProperty(MessageConst.PROPERTY_CORRELATION_ID);<NEW_LINE>try {<NEW_LINE>final RequestResponseFuture requestResponseFuture = new RequestResponseFuture(correlationId, timeout, null);<NEW_LINE>RequestFutureHolder.getInstance().getRequestFutureTable().put(correlationId, requestResponseFuture);<NEW_LINE>long cost <MASK><NEW_LINE>this.sendDefaultImpl(msg, CommunicationMode.ASYNC, new SendCallback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess(SendResult sendResult) {<NEW_LINE>requestResponseFuture.setSendRequestOk(true);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onException(Throwable e) {<NEW_LINE>requestResponseFuture.setSendRequestOk(false);<NEW_LINE>requestResponseFuture.putResponseMessage(null);<NEW_LINE>requestResponseFuture.setCause(e);<NEW_LINE>}<NEW_LINE>}, timeout - cost);<NEW_LINE>return waitResponse(msg, timeout, requestResponseFuture, cost);<NEW_LINE>} finally {<NEW_LINE>RequestFutureHolder.getInstance().getRequestFutureTable().remove(correlationId);<NEW_LINE>}<NEW_LINE>}
= System.currentTimeMillis() - beginTimestamp;
791,615
private void loadNode1250() {<NEW_LINE>BaseDataVariableTypeNode node = new BaseDataVariableTypeNode(this.context, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_SessionId, new QualifiedName(0, "SessionId"), new LocalizedText("en", "SessionId"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.NodeId, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_SessionId, Identifiers.HasTypeDefinition, Identifiers.BaseDataVariableType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_SessionId, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_SessionId, Identifiers.HasComponent, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics.expanded(), false));<NEW_LINE><MASK><NEW_LINE>}
this.nodeManager.addNode(node);
973,191
// -------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public Trade parseTrade(FpmlDocument document, XmlElement tradeEl) {<NEW_LINE>// supported elements:<NEW_LINE>// 'buyerPartyReference'<NEW_LINE>// 'sellerPartyReference'<NEW_LINE>// 'adjustedTerminationDate'<NEW_LINE>// 'paymentDate'<NEW_LINE>// 'fixingDateOffset'<NEW_LINE>// 'dayCountFraction'<NEW_LINE>// 'notional'<NEW_LINE>// 'fixedRate'<NEW_LINE>// 'floatingRateIndex'<NEW_LINE>// 'indexTenor+'<NEW_LINE>// 'fraDiscounting'<NEW_LINE>// ignored elements:<NEW_LINE>// 'Product.model?'<NEW_LINE>// 'buyerAccountReference?'<NEW_LINE>// 'sellerAccountReference?'<NEW_LINE>// 'calculationPeriodNumberOfDays'<NEW_LINE>// 'additionalPayment*'<NEW_LINE>TradeInfoBuilder tradeInfoBuilder = document.parseTradeInfo(tradeEl);<NEW_LINE>XmlElement fraEl = tradeEl.getChild("fra");<NEW_LINE>Fra.Builder fraBuilder = Fra.builder();<NEW_LINE>// buy/sell and counterparty<NEW_LINE>fraBuilder.buySell(document.parseBuyerSeller(fraEl, tradeInfoBuilder));<NEW_LINE>// start date<NEW_LINE>fraBuilder.startDate(document.parseDate(fraEl.getChild("adjustedEffectiveDate")));<NEW_LINE>// end date<NEW_LINE>fraBuilder.endDate(document.parseDate(fraEl.getChild("adjustedTerminationDate")));<NEW_LINE>// payment date<NEW_LINE>fraBuilder.paymentDate(document.parseAdjustableDate(fraEl.getChild("paymentDate")));<NEW_LINE>// fixing offset<NEW_LINE>fraBuilder.fixingDateOffset(document.parseRelativeDateOffsetDays(fraEl.getChild("fixingDateOffset")));<NEW_LINE>// dateRelativeTo required to refer to adjustedEffectiveDate, so ignored here<NEW_LINE>// day count<NEW_LINE>fraBuilder.dayCount(document.parseDayCountFraction(fraEl.getChild("dayCountFraction")));<NEW_LINE>// notional<NEW_LINE>CurrencyAmount notional = document.parseCurrencyAmount(fraEl.getChild("notional"));<NEW_LINE>fraBuilder.currency(notional.getCurrency());<NEW_LINE>fraBuilder.notional(notional.getAmount());<NEW_LINE>// fixed rate<NEW_LINE>fraBuilder.fixedRate(document.parseDecimal(fraEl.getChild("fixedRate")));<NEW_LINE>// index<NEW_LINE>List<Index> indexes = document.parseIndexes(fraEl);<NEW_LINE>switch(indexes.size()) {<NEW_LINE>case 1:<NEW_LINE>fraBuilder.index((IborIndex) indexes.get(0));<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>fraBuilder.index((IborIndex<MASK><NEW_LINE>fraBuilder.indexInterpolated((IborIndex) indexes.get(1));<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new FpmlParseException("Expected one or two indexes, but found " + indexes.size());<NEW_LINE>}<NEW_LINE>// discounting<NEW_LINE>fraBuilder.discounting(FraDiscountingMethod.of(fraEl.getChild("fraDiscounting").getContent()));<NEW_LINE>return FraTrade.builder().info(tradeInfoBuilder.build()).product(fraBuilder.build()).build();<NEW_LINE>}
) indexes.get(0));
380,586
public static IntegrationFlowBuilder from(IntegrationFlow other) {<NEW_LINE>Map<Object, String> integrationComponents = other.getIntegrationComponents();<NEW_LINE>Assert.notNull(integrationComponents, () -> "The provided integration flow to compose from '" + other + "' must be declared as a bean in the application context");<NEW_LINE>Object lastIntegrationComponentFromOther = integrationComponents.keySet().stream().reduce((prev, next) -> next).orElse(null);<NEW_LINE>if (lastIntegrationComponentFromOther instanceof MessageChannel) {<NEW_LINE>return from((MessageChannel) lastIntegrationComponentFromOther);<NEW_LINE>} else if (lastIntegrationComponentFromOther instanceof ConsumerEndpointFactoryBean) {<NEW_LINE>MessageHandler handler = ((<MASK><NEW_LINE>handler = extractProxyTarget(handler);<NEW_LINE>if (handler instanceof AbstractMessageProducingHandler) {<NEW_LINE>return buildFlowFromOutputChannel((AbstractMessageProducingHandler) handler);<NEW_LINE>}<NEW_LINE>// for the exception message below<NEW_LINE>lastIntegrationComponentFromOther = handler;<NEW_LINE>}<NEW_LINE>throw new BeanCreationException("The 'IntegrationFlow' to start from must end with " + "a 'MessageChannel' or reply-producing endpoint to let the result from that flow to be " + "processed in this instance. The provided flow ends with: " + lastIntegrationComponentFromOther);<NEW_LINE>}
ConsumerEndpointFactoryBean) lastIntegrationComponentFromOther).getHandler();
748,655
public static CLCapabilities createPlatformCapabilities(long cl_platform_id) {<NEW_LINE>Set<String> supportedExtensions = new HashSet<>(32);<NEW_LINE>// Parse PLATFORM_EXTENSIONS string<NEW_LINE>CL.addExtensions(getPlatformInfoStringASCII(cl_platform_id, CL_PLATFORM_EXTENSIONS), supportedExtensions);<NEW_LINE>// Enumerate devices<NEW_LINE>try (MemoryStack stack = stackPush()) {<NEW_LINE>IntBuffer pi = stack.mallocInt(1);<NEW_LINE>checkCLError(nclGetDeviceIDs(cl_platform_id, CL_DEVICE_TYPE_ALL, 0, NULL, memAddress(pi)));<NEW_LINE>int num_devices = pi.get(0);<NEW_LINE>if (num_devices != 0) {<NEW_LINE>PointerBuffer pp = stack.mallocPointer(num_devices);<NEW_LINE>checkCLError(nclGetDeviceIDs(cl_platform_id, CL_DEVICE_TYPE_ALL, num_devices, memAddress(pp), NULL));<NEW_LINE>// Add device extensions to the set<NEW_LINE>for (int i = 0; i < num_devices; i++) {<NEW_LINE>String extensionsString = getDeviceInfoStringASCII(pp.get(i), CL_DEVICE_EXTENSIONS);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Parse PLATFORM_VERSION string<NEW_LINE>APIVersion version = apiParseVersion(getPlatformInfoStringASCII(cl_platform_id, CL_PLATFORM_VERSION));<NEW_LINE>CL.addCLVersions(version.major, version.minor, supportedExtensions);<NEW_LINE>apiFilterExtensions(supportedExtensions, Configuration.OPENCL_EXTENSION_FILTER);<NEW_LINE>return new CLCapabilities(functionName -> getFunctionProvider().getFunctionAddress(cl_platform_id, functionName), supportedExtensions);<NEW_LINE>}
CL.addExtensions(extensionsString, supportedExtensions);
753,068
protected AstNode visitQuery(final Query node, final C context) {<NEW_LINE>final Optional<AstNode> result = plugin.apply(node, new Context<>(context, this));<NEW_LINE>if (result.isPresent()) {<NEW_LINE>return result.get();<NEW_LINE>}<NEW_LINE>final Select select = (Select) rewriter.apply(node.getSelect(), context);<NEW_LINE>final Relation from = (Relation) rewriter.apply(node.getFrom(), context);<NEW_LINE>final Optional<WindowExpression> windowExpression = node.getWindow().map(exp -> ((WindowExpression) rewriter.apply(exp, context)));<NEW_LINE>final Optional<Expression> where = node.getWhere().map(exp -> (processExpression(exp, context)));<NEW_LINE>final Optional<GroupBy> groupBy = node.getGroupBy().map(exp -> ((GroupBy) rewriter.<MASK><NEW_LINE>final Optional<PartitionBy> partitionBy = node.getPartitionBy().map(exp -> ((PartitionBy) rewriter.apply(exp, context)));<NEW_LINE>final Optional<Expression> having = node.getHaving().map(exp -> (processExpression(exp, context)));<NEW_LINE>return new Query(node.getLocation(), select, from, windowExpression, where, groupBy, partitionBy, having, node.getRefinement(), node.isPullQuery(), node.getLimit());<NEW_LINE>}
apply(exp, context)));
722,023
public void initialize(WizardDescriptor wizard) {<NEW_LINE>wiz = wizard;<NEW_LINE>delegateIterator.initialize(wizard);<NEW_LINE>superclassPanelCurrent = false;<NEW_LINE>if (superclassPanel == null && specifySuperclass) {<NEW_LINE>superclassPanel = new SuperclassWizardPanel();<NEW_LINE>ResourceBundle bundle = NbBundle.getBundle(TemplateWizardIterator.class);<NEW_LINE>JComponent comp = (JComponent) delegateIterator.current().getComponent();<NEW_LINE>// NOI18N<NEW_LINE>String[] contentData = (String[]) comp.getClientProperty(WizardDescriptor.PROP_CONTENT_DATA);<NEW_LINE>String[] newContentData = new String[contentData.length + 1];<NEW_LINE>System.arraycopy(contentData, 0, <MASK><NEW_LINE>// NOI18N<NEW_LINE>newContentData[contentData.length] = bundle.getString("CTL_SuperclassTitle");<NEW_LINE>// NOI18N<NEW_LINE>comp.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, newContentData);<NEW_LINE>}<NEW_LINE>}
newContentData, 0, contentData.length);
1,234,663
public Map<String, Object> toKarateJson() {<NEW_LINE>Map<String, Object> map = new HashMap();<NEW_LINE>// these first few are only for the ease of reports<NEW_LINE>// note that they are not involved in the reverse fromKarateJson()<NEW_LINE>map.put("durationMillis", getDurationMillis());<NEW_LINE>List<String> tags = scenario.getTagsEffective().getTags();<NEW_LINE>if (tags != null && !tags.isEmpty()) {<NEW_LINE>map.put("tags", tags);<NEW_LINE>}<NEW_LINE>map.put("failed", isFailed());<NEW_LINE>map.put("refId", scenario.getRefId());<NEW_LINE>if (isFailed()) {<NEW_LINE>map.put("error", getErrorMessage());<NEW_LINE>}<NEW_LINE>// ======================================================================<NEW_LINE>map.put("sectionIndex", scenario.getSection().getIndex());<NEW_LINE>map.put("exampleIndex", scenario.getExampleIndex());<NEW_LINE>Map<String, Object> exampleData = scenario.getExampleData();<NEW_LINE>if (exampleData != null) {<NEW_LINE>map.put("exampleData", exampleData);<NEW_LINE>}<NEW_LINE>map.put("name", scenario.getName());<NEW_LINE>map.put("description", scenario.getDescription());<NEW_LINE>map.put("line", scenario.getLine());<NEW_LINE>map.put("executorName", executorName);<NEW_LINE>map.put("startTime", startTime);<NEW_LINE>map.put("endTime", endTime);<NEW_LINE>List<Map<String, Object>> list = new ArrayList(stepResults.size());<NEW_LINE><MASK><NEW_LINE>for (StepResult sr : stepResults) {<NEW_LINE>list.add(sr.toKarateJson());<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>}
map.put("stepResults", list);
1,797,803
public RoleList requestUserRoles(Long userId, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'userId' is set<NEW_LINE>if (userId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'userId' when calling requestUserRoles");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/users/{user_id}/roles".replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString()));<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>if (xSdsAuthToken != null)<NEW_LINE>localVarHeaderParams.put("X-Sds-Auth-Token", apiClient.parameterToString(xSdsAuthToken));<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String <MASK><NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<RoleList> localVarReturnType = new GenericType<RoleList>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
984,681
public Integer localESAInstall() {<NEW_LINE>data.put(ACTION_RESULT, OK);<NEW_LINE>data.put(ACTION_INSTALL_RESULT, null);<NEW_LINE>data.put(ACTION_ERROR_MESSAGE, null);<NEW_LINE>data.put(ACTION_EXCEPTION_STACKTRACE, null);<NEW_LINE>try {<NEW_LINE>InstallKernelImpl installKernel = (InstallKernelImpl) this.installKernel;<NEW_LINE>File esaFile = (File) data.get(ACTION_INSTALL);<NEW_LINE>String toExtension = (<MASK><NEW_LINE>if (toExtension == null) {<NEW_LINE>toExtension = InstallConstants.TO_USER;<NEW_LINE>}<NEW_LINE>Collection<String> installedAssets = installKernel.installLocalFeatureNoResolve(esaFile.getAbsolutePath(), toExtension, true, InstallConstants.ExistsAction.replace);<NEW_LINE>data.put(ACTION_INSTALL_RESULT, installedAssets);<NEW_LINE>} catch (InstallException e) {<NEW_LINE>data.put(ACTION_RESULT, ERROR);<NEW_LINE>data.put(ACTION_ERROR_MESSAGE, e.getMessage());<NEW_LINE>data.put(ACTION_EXCEPTION_STACKTRACE, ExceptionUtils.stacktraceToString(e));<NEW_LINE>return ERROR;<NEW_LINE>}<NEW_LINE>return OK;<NEW_LINE>}
String) data.get(TO_EXTENSION);
1,565,143
public void registerMetrics(MetricsCollector metricsCollector) {<NEW_LINE>SystemConfig systemConfig = (SystemConfig) SingletonRegistry.INSTANCE.getSingleton(SystemConfig.HERON_SYSTEM_CONFIG);<NEW_LINE>int interval = (int) systemConfig.getHeronMetricsExportInterval().getSeconds();<NEW_LINE>metricsCollector.registerMetric("__jvm-gc-collection-time-ms", jvmGCTimeMs, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-gc-collection-count", jvmGCCount, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-gc-time-ms", jvmGCTimeMsPerGCType, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-gc-count", jvmGCCountPerGCType, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-uptime-secs", jvmUpTimeSecs, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-thread-count", jvmThreadCount, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-daemon-thread-count", jvmDaemonThreadCount, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-process-cpu-time-nanos", processCPUTimeNs, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-threads-cpu-time-nanos", threadsCPUTimeNs, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-other-threads-cpu-time-nanos", otherThreadsCPUTimeNs, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-threads-user-cpu-time-nanos", threadsUserCPUTimeNs, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-other-threads-user-cpu-time-nanos", otherThreadsUserCPUTimeNs, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-process-cpu-load", processCPULoad, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-fd-count", fdCount, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-fd-limit", fdLimit, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-memory-free-mb", jvmMemoryFreeMB, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-memory-used-mb", jvmMemoryUsedMB, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-memory-mb-total", jvmMemoryTotalMB, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-memory-heap-mb-used", jvmMemoryHeapUsedMB, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-memory-heap-mb-committed", jvmMemoryHeapCommittedMB, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-memory-heap-mb-max", jvmMemoryHeapMaxMB, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-memory-non-heap-mb-used", jvmMemoryNonHeapUsedMB, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-memory-non-heap-mb-committed", jvmMemoryNonHeapCommittedMB, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-memory-non-heap-mb-max", jvmMemoryNonHeapMaxMB, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-peak-usage", jvmPeakUsagePerMemoryPool, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-collection-usage", jvmCollectionUsagePerMemoryPool, interval);<NEW_LINE>metricsCollector.registerMetric("__jvm-estimated-usage", jvmEstimatedUsagePerMemoryPool, interval);<NEW_LINE>metricsCollector.<MASK><NEW_LINE>}
registerMetric("__jvm-buffer-pool", jvmBufferPoolMemoryUsage, interval);
714,042
public static DescribeAccountListResponse unmarshall(DescribeAccountListResponse describeAccountListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAccountListResponse.setRequestId(_ctx.stringValue("DescribeAccountListResponse.RequestId"));<NEW_LINE>describeAccountListResponse.setMessage<MASK><NEW_LINE>describeAccountListResponse.setSuccess(_ctx.booleanValue("DescribeAccountListResponse.Success"));<NEW_LINE>List<Account> data = new ArrayList<Account>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeAccountListResponse.Data.Length"); i++) {<NEW_LINE>Account account = new Account();<NEW_LINE>account.setAccountDescription(_ctx.stringValue("DescribeAccountListResponse.Data[" + i + "].AccountDescription"));<NEW_LINE>account.setAccountName(_ctx.stringValue("DescribeAccountListResponse.Data[" + i + "].AccountName"));<NEW_LINE>account.setAccountPrivilege(_ctx.stringValue("DescribeAccountListResponse.Data[" + i + "].AccountPrivilege"));<NEW_LINE>account.setAccountType(_ctx.stringValue("DescribeAccountListResponse.Data[" + i + "].AccountType"));<NEW_LINE>account.setDBInstanceName(_ctx.stringValue("DescribeAccountListResponse.Data[" + i + "].DBInstanceName"));<NEW_LINE>account.setDBName(_ctx.stringValue("DescribeAccountListResponse.Data[" + i + "].DBName"));<NEW_LINE>account.setGmtCreated(_ctx.stringValue("DescribeAccountListResponse.Data[" + i + "].GmtCreated"));<NEW_LINE>data.add(account);<NEW_LINE>}<NEW_LINE>describeAccountListResponse.setData(data);<NEW_LINE>return describeAccountListResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeAccountListResponse.Message"));
284,484
private ArrayResultCursor showCreateView(String schemaName, String tableName, SqlShowCreateTable showCreateTable) {<NEW_LINE>ViewManager viewManager;<NEW_LINE>if (InformationSchema.NAME.equalsIgnoreCase(schemaName)) {<NEW_LINE>viewManager = InformationSchemaViewManager.getInstance();<NEW_LINE>} else if (RelUtils.informationSchema(showCreateTable.getTableName())) {<NEW_LINE>viewManager = InformationSchemaViewManager.getInstance();<NEW_LINE>} else if (RelUtils.mysqlSchema(showCreateTable.getTableName())) {<NEW_LINE>viewManager = MysqlSchemaViewManager.getInstance();<NEW_LINE>} else {<NEW_LINE>viewManager = OptimizerContext.getContext(schemaName).getViewManager();<NEW_LINE>}<NEW_LINE>SystemTableView.Row row = viewManager.select(tableName);<NEW_LINE>if (row != null) {<NEW_LINE>ArrayResultCursor resultCursor = new ArrayResultCursor(tableName);<NEW_LINE>// | View | Create View | character_set_client | collation_connection |<NEW_LINE>resultCursor.addColumn("View", DataTypes.StringType);<NEW_LINE>resultCursor.addColumn("Create View", DataTypes.StringType);<NEW_LINE>resultCursor.addColumn("character_set_client", DataTypes.StringType);<NEW_LINE>resultCursor.addColumn("collation_connection", DataTypes.StringType);<NEW_LINE>resultCursor.initMeta();<NEW_LINE>String createView = row.isVirtual() ? "[VIRTUAL_VIEW] " + row.getViewDefinition() : "CREATE VIEW `" + tableName + "` AS " + row.getViewDefinition();<NEW_LINE>resultCursor.addRow(new Object[] { tableName<MASK><NEW_LINE>return resultCursor;<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
, createView, "utf8", "utf8_general_ci" });
1,594,137
protected void playImpl() {<NEW_LINE>if (isVideo) {<NEW_LINE>if (component == null && nativePlayer) {<NEW_LINE>// Mass source of confusion. If getVideoComponent() has been called, then<NEW_LINE>// we can't use the native player.<NEW_LINE>if (uri != null) {<NEW_LINE>moviePlayerPeer = nativeInstance.createNativeVideoComponent(uri, onCompletionCallbackId);<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>long val = getNSData(stream);<NEW_LINE>if (val > 0) {<NEW_LINE>moviePlayerPeer = nativeInstance.createNativeVideoComponentNSData(val, onCompletionCallbackId);<NEW_LINE>Util.cleanup(stream);<NEW_LINE>} else {<NEW_LINE>byte[] data = Util.readInputStream(stream);<NEW_LINE>Util.cleanup(stream);<NEW_LINE>moviePlayerPeer = <MASK><NEW_LINE>}<NEW_LINE>} catch (IOException ex) {<NEW_LINE>fireMediaError(new MediaException(MediaErrorType.Decode, ex));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>nativeInstance.showNativePlayerController(moviePlayerPeer);<NEW_LINE>}<NEW_LINE>if (moviePlayerPeer != 0) {<NEW_LINE>nativeInstance.startVideoComponent(moviePlayerPeer);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>nativeInstance.playAudio(moviePlayerPeer);<NEW_LINE>}<NEW_LINE>markActive();<NEW_LINE>fireMediaStateChange(State.Playing);<NEW_LINE>}
nativeInstance.createNativeVideoComponent(data, onCompletionCallbackId);
730,939
private static List<Object> dataBagToRepeatedField(Builder containingMessageBuilder, FieldDescriptor fieldDescriptor, DataBag bag) {<NEW_LINE>ArrayList<Object> bagContents = new ArrayList<Object>((<MASK><NEW_LINE>Iterator<Tuple> bagIter = bag.iterator();<NEW_LINE>while (bagIter.hasNext()) {<NEW_LINE>Tuple tuple = bagIter.next();<NEW_LINE>if (fieldDescriptor.getType() == FieldDescriptor.Type.MESSAGE) {<NEW_LINE>Builder nestedMessageBuilder = containingMessageBuilder.newBuilderForField(fieldDescriptor);<NEW_LINE>bagContents.add(tupleToMessage((Builder) nestedMessageBuilder, tuple));<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>bagContents.add(tupleFieldToSingleField(fieldDescriptor, tuple.get(0)));<NEW_LINE>} catch (ExecException e) {<NEW_LINE>LOG.warn("Could not add a value for repeated field with descriptor " + fieldDescriptor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return bagContents;<NEW_LINE>}
int) bag.size());
135,953
public void handleInsert(@NotNull InsertionContext context, LookupElement item) {<NEW_LINE>Editor editor = context.getEditor();<NEW_LINE>CharSequence documentText = context.getDocument().getImmutableCharSequence();<NEW_LINE>int offset = skipWhiteSpaces(editor.getCaretModel().getOffset(), documentText);<NEW_LINE>if (documentText.charAt(offset) != '{') {<NEW_LINE>Project project = context.getProject();<NEW_LINE>Template template = TemplateManager.getInstance(project).createTemplate("braces", "go", myOneLine ? "{$END$}" : " {\n$END$\n}");<NEW_LINE>template.setToReformat(true);<NEW_LINE>TemplateManager.getInstance(project).startTemplate(editor, template);<NEW_LINE>} else {<NEW_LINE>editor.<MASK><NEW_LINE>ApplicationManager.getApplication().runWriteAction(() -> {<NEW_LINE>EditorActionHandler enterAction = EditorActionManager.getInstance().getActionHandler(IdeActions.ACTION_EDITOR_START_NEW_LINE);<NEW_LINE>enterAction.execute(editor, editor.getCaretModel().getCurrentCaret(), ((EditorEx) editor).getDataContext());<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
getCaretModel().moveToOffset(offset);
1,347,190
private void startLoadTask() {<NEW_LINE>if (disposable != null) {<NEW_LINE>disposable.dispose();<NEW_LINE>}<NEW_LINE>setListShown(false);<NEW_LINE>disposable = Observable.fromCallable(() -> {<NEW_LINE>GpodnetService service = new GpodnetService(AntennapodHttpClient.getHttpClient(), SynchronizationCredentials.getHosturl(), SynchronizationCredentials.getDeviceID(), SynchronizationCredentials.getUsername(), SynchronizationCredentials.getPassword());<NEW_LINE>return service.getTopTags(COUNT);<NEW_LINE>}).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(tags -> {<NEW_LINE>setListAdapter(new TagListAdapter(getContext(), android.R.layout.simple_list_item_1, tags));<NEW_LINE>setListShown(true);<NEW_LINE>}, error -> {<NEW_LINE>TextView txtvError = new TextView(getActivity());<NEW_LINE>txtvError.setText(error.getMessage());<NEW_LINE><MASK><NEW_LINE>setListShown(true);<NEW_LINE>Log.e(TAG, Log.getStackTraceString(error));<NEW_LINE>});<NEW_LINE>}
getListView().setEmptyView(txtvError);
869,458
static SSLProtocol valueOfString(String value) throws SQLServerException {<NEW_LINE>SSLProtocol protocol = null;<NEW_LINE>if (value.toLowerCase(Locale.ENGLISH).equalsIgnoreCase(SSLProtocol.TLS.toString())) {<NEW_LINE>protocol = SSLProtocol.TLS;<NEW_LINE>} else if (value.toLowerCase(Locale.ENGLISH).equalsIgnoreCase(SSLProtocol.TLS_V10.toString())) {<NEW_LINE>protocol = SSLProtocol.TLS_V10;<NEW_LINE>} else if (value.toLowerCase(Locale.ENGLISH).equalsIgnoreCase(SSLProtocol.TLS_V11.toString())) {<NEW_LINE>protocol = SSLProtocol.TLS_V11;<NEW_LINE>} else if (value.toLowerCase(Locale.ENGLISH).equalsIgnoreCase(SSLProtocol.TLS_V12.toString())) {<NEW_LINE>protocol = SSLProtocol.TLS_V12;<NEW_LINE>} else if (value.toLowerCase(Locale.ENGLISH).equalsIgnoreCase(SSLProtocol.TLS_V13.toString())) {<NEW_LINE>protocol = SSLProtocol.TLS_V13;<NEW_LINE>} else {<NEW_LINE>MessageFormat form = new MessageFormat(SQLServerException.getErrString("R_invalidSSLProtocol"));<NEW_LINE>Object[] msgArgs = { value };<NEW_LINE>throw new SQLServerException(null, form.format(msgArgs<MASK><NEW_LINE>}<NEW_LINE>return protocol;<NEW_LINE>}
), null, 0, false);
1,583,254
public void emitPackagesIndex(APIDiff apiDiff, int indexType) {<NEW_LINE>// Add all the names of packages to a new list, to be sorted later<NEW_LINE>// Index[]<NEW_LINE>packageNames = new ArrayList();<NEW_LINE>boolean hasRemovals = false;<NEW_LINE>if (apiDiff.packagesRemoved.size() != 0)<NEW_LINE>hasRemovals = true;<NEW_LINE>boolean hasAdditions = false;<NEW_LINE>if (apiDiff.packagesAdded.size() != 0)<NEW_LINE>hasAdditions = true;<NEW_LINE>boolean hasChanges = false;<NEW_LINE>if (apiDiff.packagesChanged.size() != 0)<NEW_LINE>hasChanges = true;<NEW_LINE>recordDiffs(hasRemovals, hasAdditions, hasChanges);<NEW_LINE>Iterator iter = apiDiff.packagesRemoved.iterator();<NEW_LINE>while ((indexType == 3 || indexType == 0) && iter.hasNext()) {<NEW_LINE>PackageAPI pkg = (PackageAPI) (iter.next());<NEW_LINE>packageNames.add(new Index(pkg.name_, 0));<NEW_LINE>}<NEW_LINE>iter = apiDiff.packagesAdded.iterator();<NEW_LINE>while ((indexType == 3 || indexType == 1) && iter.hasNext()) {<NEW_LINE>PackageAPI pkg = (PackageAPI) (iter.next());<NEW_LINE>packageNames.add(new Index(pkg.name_, 1));<NEW_LINE>}<NEW_LINE>iter = apiDiff.packagesChanged.iterator();<NEW_LINE>while ((indexType == 3 || indexType == 2) && iter.hasNext()) {<NEW_LINE>PackageDiff pkg = (PackageDiff) (iter.next());<NEW_LINE>packageNames.add(new Index(pkg.name_, 2));<NEW_LINE>}<NEW_LINE>Collections.sort(packageNames);<NEW_LINE>// No letter index needed for packages<NEW_LINE>// Now emit all the package names and links to their respective files<NEW_LINE>emitIndexHeader("Packages", indexType, hasRemovals, hasAdditions, hasChanges);<NEW_LINE>// Extra line because no index is emitted<NEW_LINE>h_.writeText("<br>");<NEW_LINE>// Package names are unique, so no need to check for duplicates.<NEW_LINE>iter = packageNames.iterator();<NEW_LINE>char oldsw = '\0';<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Index pkg = (Index) (iter.next());<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
oldsw = emitPackageIndexEntry(pkg, oldsw);
1,771,412
protected Subtitle decode(byte[] bytes, int length, boolean reset) throws SubtitleDecoderException {<NEW_LINE>parsableByteArray.reset(bytes, length);<NEW_LINE>String cueTextString = readSubtitleText(parsableByteArray);<NEW_LINE>if (cueTextString.isEmpty()) {<NEW_LINE>return Tx3gSubtitle.EMPTY;<NEW_LINE>}<NEW_LINE>// Attach default styles.<NEW_LINE>SpannableStringBuilder cueText = new SpannableStringBuilder(cueTextString);<NEW_LINE>attachFontFace(cueText, defaultFontFace, DEFAULT_FONT_FACE, 0, cueText.length(), SPAN_PRIORITY_LOW);<NEW_LINE>attachColor(cueText, defaultColorRgba, DEFAULT_COLOR, 0, cueText.length(), SPAN_PRIORITY_LOW);<NEW_LINE>attachFontFamily(cueText, defaultFontFamily, DEFAULT_FONT_FAMILY, 0, cueText.length(), SPAN_PRIORITY_LOW);<NEW_LINE>float verticalPlacement = defaultVerticalPlacement;<NEW_LINE>// Find and attach additional styles.<NEW_LINE>while (parsableByteArray.bytesLeft() >= SIZE_ATOM_HEADER) {<NEW_LINE>int position = parsableByteArray.getPosition();<NEW_LINE>int atomSize = parsableByteArray.readInt();<NEW_LINE>int atomType = parsableByteArray.readInt();<NEW_LINE>if (atomType == TYPE_STYL) {<NEW_LINE>assertTrue(parsableByteArray.bytesLeft() >= SIZE_SHORT);<NEW_LINE>int styleRecordCount = parsableByteArray.readUnsignedShort();<NEW_LINE>for (int i = 0; i < styleRecordCount; i++) {<NEW_LINE>applyStyleRecord(parsableByteArray, cueText);<NEW_LINE>}<NEW_LINE>} else if (atomType == TYPE_TBOX && customVerticalPlacement) {<NEW_LINE>assertTrue(parsableByteArray.bytesLeft() >= SIZE_SHORT);<NEW_LINE><MASK><NEW_LINE>verticalPlacement = (float) requestedVerticalPlacement / calculatedVideoTrackHeight;<NEW_LINE>verticalPlacement = Util.constrainValue(verticalPlacement, 0.0f, 0.95f);<NEW_LINE>}<NEW_LINE>parsableByteArray.setPosition(position + atomSize);<NEW_LINE>}<NEW_LINE>return new Tx3gSubtitle(new Cue(cueText, /* textAlignment= */<NEW_LINE>null, verticalPlacement, Cue.LINE_TYPE_FRACTION, Cue.ANCHOR_TYPE_START, Cue.DIMEN_UNSET, Cue.TYPE_UNSET, Cue.DIMEN_UNSET));<NEW_LINE>}
int requestedVerticalPlacement = parsableByteArray.readUnsignedShort();
139,867
private void migrateCountsStore(RecordDatabaseLayout directoryLayout, RecordDatabaseLayout migrationLayout, RecordFormats oldFormat, CursorContext cursorContext, MemoryTracker memoryTracker) throws IOException {<NEW_LINE>// Just read from the old store (nodes, relationships, highLabelId, highRelationshipTypeId). This way we don't have to try and figure<NEW_LINE>// out which stores, if any, have been migrated to the new format. The counts themselves are equivalent in both the old and the migrated stores.<NEW_LINE>StoreFactory oldStoreFactory = createStoreFactory(directoryLayout<MASK><NEW_LINE>try (NeoStores oldStores = oldStoreFactory.openAllNeoStores();<NEW_LINE>var storeCursors = new CachedStoreCursors(oldStores, cursorContext);<NEW_LINE>GBPTreeCountsStore countsStore = new GBPTreeCountsStore(pageCache, migrationLayout.countStore(), fileSystem, immediate(), new CountsComputer(oldStores, pageCache, cacheTracer, directoryLayout, memoryTracker, logService.getInternalLog(getClass())), writable(), cacheTracer, GBPTreeCountsStore.NO_MONITOR, migrationLayout.getDatabaseName(), config.get(counts_store_max_cached_entries), NullLogProvider.getInstance())) {<NEW_LINE>countsStore.start(cursorContext, storeCursors, memoryTracker);<NEW_LINE>countsStore.checkpoint(cursorContext);<NEW_LINE>}<NEW_LINE>}
, oldFormat, new ScanOnOpenReadOnlyIdGeneratorFactory());
878,197
private void addColumnRangePredicateToBuilder(Field field, KuduScannerBuilder scannerBuilder, String columnName, String value, String identifier) {<NEW_LINE>Type type = KuduDBValidationClassMapper.<MASK><NEW_LINE>ColumnSchema column = new ColumnSchema.ColumnSchemaBuilder(columnName, type).build();<NEW_LINE>KuduPredicate predicate;<NEW_LINE>Object valueObject = KuduDBDataHandler.parse(type, value);<NEW_LINE>switch(identifier) {<NEW_LINE>case ">=":<NEW_LINE>predicate = KuduDBDataHandler.getPredicate(column, KuduPredicate.ComparisonOp.GREATER_EQUAL, type, valueObject);<NEW_LINE>break;<NEW_LINE>case ">":<NEW_LINE>predicate = KuduDBDataHandler.getPredicate(column, KuduPredicate.ComparisonOp.GREATER, type, valueObject);<NEW_LINE>break;<NEW_LINE>case "<":<NEW_LINE>predicate = KuduDBDataHandler.getPredicate(column, KuduPredicate.ComparisonOp.LESS, type, valueObject);<NEW_LINE>break;<NEW_LINE>case "<=":<NEW_LINE>predicate = KuduDBDataHandler.getPredicate(column, KuduPredicate.ComparisonOp.LESS_EQUAL, type, valueObject);<NEW_LINE>break;<NEW_LINE>case "=":<NEW_LINE>predicate = KuduDBDataHandler.getPredicate(column, KuduPredicate.ComparisonOp.EQUAL, type, valueObject);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>logger.error("Operation not supported");<NEW_LINE>throw new KunderaException("Operation not supported");<NEW_LINE>}<NEW_LINE>scannerBuilder.addPredicate(predicate);<NEW_LINE>}
getValidTypeForClass(field.getType());
1,282,362
public void dump_object_statistics() {<NEW_LINE>final String methodName = "dump_object_statistics()";<NEW_LINE>try {<NEW_LINE>OutputStreamWriter out = new OutputStreamWriter(System.out);<NEW_LINE>out.write("========================================================================");<NEW_LINE>out.write("------------------ Object File Manager Statistics ---------------\n");<NEW_LINE>object_filemgr.dump_stats(out, true);<NEW_LINE>out.write("------------------ Object HTOD Statistics ---------------\n");<NEW_LINE><MASK><NEW_LINE>out.write("========================================================================");<NEW_LINE>if (!this.disableDependencyId) {<NEW_LINE>out.write("========================================================================");<NEW_LINE>out.write("------------------ Dependency File Manager Statistics ---------------\n");<NEW_LINE>dependency_filemgr.dump_stats(out, true);<NEW_LINE>out.write("------------------ Dependency HTOD Statistics ---------------\n");<NEW_LINE>dependency_cache.dump_htod_stats(out, true);<NEW_LINE>out.write("========================================================================");<NEW_LINE>}<NEW_LINE>if (!this.disableTemplatesSupport) {<NEW_LINE>out.write("========================================================================");<NEW_LINE>out.write("------------------ Template File Manager Statistics ---------------\n");<NEW_LINE>template_filemgr.dump_stats(out, true);<NEW_LINE>out.write("------------------ Template HTOD Statistics ---------------\n");<NEW_LINE>template_cache.dump_htod_stats(out, true);<NEW_LINE>out.write("========================================================================");<NEW_LINE>}<NEW_LINE>out.flush();<NEW_LINE>} catch (Throwable t) {<NEW_LINE>com.ibm.ws.ffdc.FFDCFilter.processException(t, "com.ibm.ws.cache.HTODDynacache.dump_object_statistics", "376", this);<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, methodName, "cacheName=" + this.cacheName + "\nException: " + ExceptionUtility.getStackTrace(t));<NEW_LINE>}<NEW_LINE>}
object_cache.dump_htod_stats(out, true);
518,434
public final void quit() {<NEW_LINE>AgentInstanceContext agentInstanceContext = evalFollowedByNode.getContext().getAgentInstanceContext();<NEW_LINE>agentInstanceContext.getInstrumentationProvider().qPatternFollowedByQuit(evalFollowedByNode.factoryNode);<NEW_LINE>agentInstanceContext.getAuditProvider().patternInstance(false, evalFollowedByNode.factoryNode, agentInstanceContext);<NEW_LINE>for (Map.Entry<EvalStateNode, Integer> entry : nodes.entrySet()) {<NEW_LINE>entry.getKey().quit();<NEW_LINE>if (evalFollowedByNode.isTrackWithPool()) {<NEW_LINE>if (entry.getValue() > 0) {<NEW_LINE>PatternSubexpressionPoolStmtSvc poolSvc = evalFollowedByNode.getContext()<MASK><NEW_LINE>poolSvc.getRuntimeSvc().decreaseCount(evalFollowedByNode, evalFollowedByNode.getContext().getAgentInstanceContext());<NEW_LINE>poolSvc.getStmtHandler().decreaseCount();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>agentInstanceContext.getInstrumentationProvider().aPatternFollowedByQuit();<NEW_LINE>}
.getStatementContext().getPatternSubexpressionPoolSvc();
162,435
protected void addLabel(IParameterEditor editor, Composite parent) {<NEW_LINE>if (editor == null || parent == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>String parameterName = getControlLabelWithKeyboardShortcut(parameter.getName());<NEW_LINE>Label parameterNameLabel = new Label(parent, SWT.READ_ONLY);<NEW_LINE>parameterNameLabel.setText(parameterName + ": ");<NEW_LINE>parameterNameLabel.setToolTipText(parameter.getDescription());<NEW_LINE>GridDataFactory.fillDefaults().grab(false, false).align(SWT.FILL, SWT.CENTER).applyTo(parameterNameLabel);<NEW_LINE>// Set the label dimensions based on the longest label string<NEW_LINE>Point labelSize = getLongestLabelSize();<NEW_LINE>if (labelSize != null) {<NEW_LINE>GridData data = (GridData) parameterNameLabel.getLayoutData();<NEW_LINE>int heightHint = labelSize.y;<NEW_LINE>if (heightHint > 0) {<NEW_LINE>data.heightHint = heightHint;<NEW_LINE>}<NEW_LINE>int widthHint = labelSize.x;<NEW_LINE>if (widthHint > 0) {<NEW_LINE>data.widthHint = widthHint;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ICommandParameterDescriptor parameter = editor.getParameterDescriptor();
200,666
public void write(org.apache.thrift.protocol.TProtocol prot, waitForFlush_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isSetTinfo()) {<NEW_LINE>optionals.set(0);<NEW_LINE>}<NEW_LINE>if (struct.isSetCredentials()) {<NEW_LINE>optionals.set(1);<NEW_LINE>}<NEW_LINE>if (struct.isSetTableName()) {<NEW_LINE>optionals.set(2);<NEW_LINE>}<NEW_LINE>if (struct.isSetStartRow()) {<NEW_LINE>optionals.set(3);<NEW_LINE>}<NEW_LINE>if (struct.isSetEndRow()) {<NEW_LINE>optionals.set(4);<NEW_LINE>}<NEW_LINE>if (struct.isSetFlushID()) {<NEW_LINE>optionals.set(5);<NEW_LINE>}<NEW_LINE>if (struct.isSetMaxLoops()) {<NEW_LINE>optionals.set(6);<NEW_LINE>}<NEW_LINE>oprot.writeBitSet(optionals, 7);<NEW_LINE>if (struct.isSetTinfo()) {<NEW_LINE>struct.tinfo.write(oprot);<NEW_LINE>}<NEW_LINE>if (struct.isSetCredentials()) {<NEW_LINE>struct.credentials.write(oprot);<NEW_LINE>}<NEW_LINE>if (struct.isSetTableName()) {<NEW_LINE>oprot.writeString(struct.tableName);<NEW_LINE>}<NEW_LINE>if (struct.isSetStartRow()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (struct.isSetEndRow()) {<NEW_LINE>oprot.writeBinary(struct.endRow);<NEW_LINE>}<NEW_LINE>if (struct.isSetFlushID()) {<NEW_LINE>oprot.writeI64(struct.flushID);<NEW_LINE>}<NEW_LINE>if (struct.isSetMaxLoops()) {<NEW_LINE>oprot.writeI64(struct.maxLoops);<NEW_LINE>}<NEW_LINE>}
oprot.writeBinary(struct.startRow);
1,088,879
final PredictResult executePredict(PredictRequest predictRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(predictRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PredictRequest> request = null;<NEW_LINE>Response<PredictResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PredictRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Machine Learning");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "Predict");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PredictResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PredictResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(predictRequest));
1,582,809
/*<NEW_LINE>* We use a factory method here because we will not be using the same buffer specified for this method, so we<NEW_LINE>* require a bit of processing before actually calling a constructor (not that this could not be done at the<NEW_LINE>* constructor, but it gives us higher flexibility this way. Maybe in the future we reuse instances or something...<NEW_LINE>*/<NEW_LINE>public static DecoupledInjectedAttribute createAttribute(final char[] buffer, final int nameOffset, final int nameLen, final int operatorOffset, final int operatorLen, final int valueContentOffset, final int valueContentLen, final int valueOuterOffset, final int valueOuterLen) {<NEW_LINE>final char[] newBuffer = new char[nameLen + operatorLen + valueOuterLen];<NEW_LINE>System.arraycopy(buffer, nameOffset, newBuffer, 0, nameLen);<NEW_LINE>System.arraycopy(buffer, <MASK><NEW_LINE>System.arraycopy(buffer, valueOuterOffset, newBuffer, (nameLen + operatorLen), valueOuterLen);<NEW_LINE>return new DecoupledInjectedAttribute(newBuffer, 0, nameLen, (operatorOffset - nameOffset), operatorLen, (valueContentOffset - nameOffset), valueContentLen, (valueOuterOffset - nameOffset), valueOuterLen);<NEW_LINE>}
operatorOffset, newBuffer, nameLen, operatorLen);
577,273
public void deleteMedicalTranscriptionJob(DeleteMedicalTranscriptionJobRequest deleteMedicalTranscriptionJobRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteMedicalTranscriptionJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteMedicalTranscriptionJobRequest> request = null;<NEW_LINE>Response<Void> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new <MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>JsonResponseHandler<Void> responseHandler = new JsonResponseHandler<Void>(null);<NEW_LINE>invoke(request, responseHandler, executionContext);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
DeleteMedicalTranscriptionJobRequestMarshaller().marshall(deleteMedicalTranscriptionJobRequest);
887,622
final ListConnectionsResult executeListConnections(ListConnectionsRequest listConnectionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listConnectionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListConnectionsRequest> request = null;<NEW_LINE>Response<ListConnectionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListConnectionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listConnectionsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "CloudWatch Events");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListConnections");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListConnectionsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListConnectionsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
342,652
final PutJobFailureResultResult executePutJobFailureResult(PutJobFailureResultRequest putJobFailureResultRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putJobFailureResultRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutJobFailureResultRequest> request = null;<NEW_LINE>Response<PutJobFailureResultResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutJobFailureResultRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putJobFailureResultRequest));<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, "CodePipeline");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutJobFailureResult");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutJobFailureResultResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutJobFailureResultResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
710,976
public void checkPackage() {<NEW_LINE>if (epack == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>EPUBVersion version = epack.getVersion();<NEW_LINE>if (version != null && version.equals(EPUBVersion.VERSION_3)) {<NEW_LINE>factory.newInstance(report, ValidationType.<MASK><NEW_LINE>factory.newInstance(report, ValidationType.CFI, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.METADATA_V3, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.NAV, epack).validate();<NEW_LINE>} else if (version != null && EPUBVersion.VERSION_2.equals(version)) {<NEW_LINE>factory.newInstance(report, ValidationType.EPUB3_STRUCTURE, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.METADATA_V2, epack).validate();<NEW_LINE>}<NEW_LINE>factory.newInstance(report, ValidationType.NCX, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.MULTIPLE_CSS, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.HTML_STRUCTURE, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.LINK, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.CSS_SEARCH, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.TOC, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.LANG, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.SPINE, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.TEXT, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.SCRIPT, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.SPAN, epack).validate();<NEW_LINE>factory.newInstance(report, ValidationType.SVG, epack).validate();<NEW_LINE>}
RENDITION, epack).validate();
127,963
private void searchUsages(@Nonnull final AtomicBoolean findStartedBalloonShown) {<NEW_LINE>ProgressIndicator indicator = ProgressWrapper.unwrap(ProgressManager.<MASK><NEW_LINE>assert indicator != null : "must run find usages under progress";<NEW_LINE>TooManyUsagesStatus.createFor(indicator);<NEW_LINE>Alarm findUsagesStartedBalloon = new Alarm();<NEW_LINE>findUsagesStartedBalloon.addRequest(() -> {<NEW_LINE>notifyByFindBalloon(null, MessageType.WARNING, myProcessPresentation, myProject, Collections.singletonList(StringUtil.escapeXml(UsageViewManagerImpl.getProgressTitle(myPresentation))));<NEW_LINE>findStartedBalloonShown.set(true);<NEW_LINE>}, 300, ModalityState.NON_MODAL);<NEW_LINE>UsageSearcher usageSearcher = mySearcherFactory.create();<NEW_LINE>usageSearcher.generate(usage -> {<NEW_LINE>ProgressIndicator indicator1 = ProgressWrapper.unwrap(ProgressManager.getInstance().getProgressIndicator());<NEW_LINE>assert indicator1 != null : "must run find usages under progress";<NEW_LINE>if (indicator1.isCanceled())<NEW_LINE>return false;<NEW_LINE>if (!UsageViewManagerImpl.isInScope(usage, mySearchScopeToWarnOfFallingOutOf)) {<NEW_LINE>myOutOfScopeUsages.incrementAndGet();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>boolean incrementCounter = !UsageViewManager.isSelfUsage(usage, mySearchFor);<NEW_LINE>if (incrementCounter) {<NEW_LINE>final int usageCount = myUsageCountWithoutDefinition.incrementAndGet();<NEW_LINE>if (usageCount == 1 && !myProcessPresentation.isShowPanelIfOnlyOneUsage()) {<NEW_LINE>myFirstUsage.compareAndSet(null, usage);<NEW_LINE>}<NEW_LINE>final UsageViewImpl usageView = getUsageView(indicator1);<NEW_LINE>TooManyUsagesStatus tooManyUsagesStatus = TooManyUsagesStatus.getFrom(indicator1);<NEW_LINE>if (usageCount > UsageLimitUtil.USAGES_LIMIT && tooManyUsagesStatus.switchTooManyUsagesStatus()) {<NEW_LINE>UsageViewManagerImpl.showTooManyUsagesWarningLater(myProject, tooManyUsagesStatus, indicator1, myPresentation, usageCount, usageView);<NEW_LINE>}<NEW_LINE>tooManyUsagesStatus.pauseProcessingIfTooManyUsages();<NEW_LINE>if (usageView != null) {<NEW_LINE>ApplicationManager.getApplication().runReadAction(() -> usageView.appendUsage(usage));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return !indicator1.isCanceled();<NEW_LINE>});<NEW_LINE>if (getUsageView(indicator) != null) {<NEW_LINE>ApplicationManager.getApplication().invokeLater(() -> myUsageViewManager.showToolWindow(true), myProject.getDisposed());<NEW_LINE>}<NEW_LINE>Disposer.dispose(findUsagesStartedBalloon);<NEW_LINE>ApplicationManager.getApplication().invokeLater(() -> {<NEW_LINE>if (findStartedBalloonShown.get()) {<NEW_LINE>Balloon balloon = ToolWindowManager.getInstance(myProject).getToolWindowBalloon(ToolWindowId.FIND);<NEW_LINE>if (balloon != null) {<NEW_LINE>balloon.hide();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}, myProject.getDisposed());<NEW_LINE>}
getInstance().getProgressIndicator());
1,588,289
private JComponent createDragger() {<NEW_LINE>// NOI18N<NEW_LINE>String className = UIManager.getString("Nb.MainWindow.Toolbar.Dragger");<NEW_LINE>if (null != className) {<NEW_LINE>try {<NEW_LINE>Class klzz = Lookup.getDefault().lookup(ClassLoader.class).loadClass(className);<NEW_LINE>Object inst = klzz.newInstance();<NEW_LINE>if (inst instanceof JComponent) {<NEW_LINE>JComponent dragarea = (JComponent) inst;<NEW_LINE>dragarea.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));<NEW_LINE>dragarea.putClientProperty(PROP_DRAGGER, Boolean.TRUE);<NEW_LINE>return dragarea;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.getLogger(ToolbarContainer.class.getName()).log(Level.INFO, null, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String lfID = UIManager.getLookAndFeel().getID();<NEW_LINE>JPanel dragarea = null;<NEW_LINE>// #98888: recognize JGoodies L&F properly<NEW_LINE>if (lfID.endsWith("Windows")) {<NEW_LINE>// NOI18N<NEW_LINE>if (isXPTheme()) {<NEW_LINE>dragarea = (JPanel) new ToolbarXP();<NEW_LINE>} else {<NEW_LINE>dragarea = (JPanel) new ToolbarGrip();<NEW_LINE>}<NEW_LINE>} else if (lfID.equals("Aqua")) {<NEW_LINE>// NOI18N<NEW_LINE>dragarea = (JPanel) new ToolbarAqua();<NEW_LINE>} else if (lfID.equals("GTK")) {<NEW_LINE>// NOI18N<NEW_LINE>dragarea = (JPanel) new ToolbarGtk();<NEW_LINE>// setFloatable(true);<NEW_LINE>} else {<NEW_LINE>// Default for Metal and uknown L&F<NEW_LINE>dragarea = (JPanel) new ToolbarBump();<NEW_LINE>}<NEW_LINE>dragarea.setCursor(Cursor<MASK><NEW_LINE>dragarea.putClientProperty(PROP_DRAGGER, Boolean.TRUE);<NEW_LINE>return dragarea;<NEW_LINE>}
.getPredefinedCursor(Cursor.MOVE_CURSOR));
1,638,958
public static KeyValuePart[] split(MatrixMeta matrixMeta, Vector vector) {<NEW_LINE>switch(vector.getType()) {<NEW_LINE>case T_DOUBLE_SPARSE:<NEW_LINE>case T_DOUBLE_DENSE:<NEW_LINE>return splitIntDoubleVector(matrixMeta, (IntDoubleVector) vector);<NEW_LINE>case T_FLOAT_SPARSE:<NEW_LINE>case T_FLOAT_DENSE:<NEW_LINE>return splitIntFloatVector(matrixMeta, (IntFloatVector) vector);<NEW_LINE>case T_INT_DENSE:<NEW_LINE>case T_INT_SPARSE:<NEW_LINE>return splitIntIntVector(matrixMeta, (IntIntVector) vector);<NEW_LINE>case T_LONG_DENSE:<NEW_LINE>case T_LONG_SPARSE:<NEW_LINE>return splitIntLongVector(matrixMeta, (IntLongVector) vector);<NEW_LINE>case T_DOUBLE_SPARSE_LONGKEY:<NEW_LINE>return splitLongDoubleVector(matrixMeta, (LongDoubleVector) vector);<NEW_LINE>case T_FLOAT_SPARSE_LONGKEY:<NEW_LINE>return splitLongFloatVector(matrixMeta, (LongFloatVector) vector);<NEW_LINE>case T_INT_SPARSE_LONGKEY:<NEW_LINE>return splitLongIntVector(matrixMeta, (LongIntVector) vector);<NEW_LINE>case T_LONG_SPARSE_LONGKEY:<NEW_LINE>return splitLongLongVector(matrixMeta, (LongLongVector) vector);<NEW_LINE>default:<NEW_LINE>throw new UnsupportedOperationException(<MASK><NEW_LINE>}<NEW_LINE>}
"Unsupport vector type " + vector.getType());
1,819,248
public void search() {<NEW_LINE>String query = getQuery().trim();<NEW_LINE>if (StringUtil.isBlank(query)) {<NEW_LINE>dialogService.notify(Localization.lang("Please enter a search string"));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (stateManager.getActiveDatabase().isEmpty()) {<NEW_LINE>dialogService.notify<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SearchBasedFetcher activeFetcher = getSelectedFetcher();<NEW_LINE>Globals.getTelemetryClient().ifPresent(client -> client.trackEvent("search", Map.of("fetcher", activeFetcher.getName()), Map.of()));<NEW_LINE>BackgroundTask<ParserResult> task;<NEW_LINE>task = BackgroundTask.wrap(() -> new ParserResult(activeFetcher.performSearch(query))).withInitialMessage(Localization.lang("Processing %0", query));<NEW_LINE>task.onFailure(dialogService::showErrorDialogAndWait);<NEW_LINE>ImportEntriesDialog dialog = new ImportEntriesDialog(stateManager.getActiveDatabase().get(), task);<NEW_LINE>dialog.setTitle(activeFetcher.getName());<NEW_LINE>dialogService.showCustomDialogAndWait(dialog);<NEW_LINE>}
(Localization.lang("Please open or start a new library before searching"));
448,197
public static int updateFeatures(LiteSession trainSession, String modelName, List<FeatureMap> featureMaps) {<NEW_LINE>if (trainSession == null || featureMaps == null || modelName == null || modelName.isEmpty()) {<NEW_LINE>logger.severe(Common.addTag("trainSession,featureMaps modelName cannot be null"));<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>List<MSTensor> tensors = new ArrayList<MSTensor>(featureMaps.size());<NEW_LINE>for (FeatureMap newFeature : featureMaps) {<NEW_LINE>if (newFeature == null) {<NEW_LINE>logger.severe(Common.addTag("newFeature cannot be null"));<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>ByteBuffer by = newFeature.dataAsByteBuffer();<NEW_LINE>ByteBuffer newData = ByteBuffer.<MASK><NEW_LINE>newData.order(ByteOrder.nativeOrder());<NEW_LINE>newData.put(by);<NEW_LINE>tensors.add(new MSTensor(newFeature.weightFullname(), newData));<NEW_LINE>}<NEW_LINE>boolean isSuccess = trainSession.updateFeatures(tensors);<NEW_LINE>for (MSTensor tensor : tensors) {<NEW_LINE>if (tensor == null) {<NEW_LINE>logger.severe(Common.addTag("tensor cannot be null"));<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>tensor.free();<NEW_LINE>}<NEW_LINE>if (isSuccess) {<NEW_LINE>trainSession.export(modelName, 0, 0);<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>return -1;<NEW_LINE>}
allocateDirect(by.remaining());
26,740
private Mono<Response<Flux<ByteBuffer>>> powerOffWithResponseAsync(String resourceGroupName, String vmName, Boolean skipShutdown, 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.<MASK><NEW_LINE>}<NEW_LINE>if (vmName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter vmName 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>final String apiVersion = "2021-11-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.powerOff(this.client.getEndpoint(), resourceGroupName, vmName, skipShutdown, apiVersion, this.client.getSubscriptionId(), accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
1,304,068
public static void zdemo7(int rows, int columns, boolean print) {<NEW_LINE>// for reliable benchmarks, call this method twice: once with small dummy parameters to "warm up" the jitter, then with your real work-load<NEW_LINE>System.out.println("\n\n");<NEW_LINE>System.out.println("now initializing... ");<NEW_LINE>final cern.jet.math.Functions F = cern<MASK><NEW_LINE>DoubleMatrix2D A = cern.colt.matrix.DoubleFactory2D.dense.make(rows, columns);<NEW_LINE>// initialize randomly<NEW_LINE>A.assign(new cern.jet.random.engine.DRand());<NEW_LINE>DoubleMatrix2D B = A.copy();<NEW_LINE>double[] v1 = A.viewColumn(0).toArray();<NEW_LINE>double[] v2 = A.viewColumn(0).toArray();<NEW_LINE>System.out.print("now quick sorting... ");<NEW_LINE>cern.colt.Timer timer = new cern.colt.Timer().start();<NEW_LINE>quickSort.sort(A, 0);<NEW_LINE>timer.stop().display();<NEW_LINE>System.out.print("now merge sorting... ");<NEW_LINE>timer.reset().start();<NEW_LINE>mergeSort.sort(A, 0);<NEW_LINE>timer.stop().display();<NEW_LINE>System.out.print("now quick sorting with simple aggregation... ");<NEW_LINE>timer.reset().start();<NEW_LINE>quickSort.sort(A, v1);<NEW_LINE>timer.stop().display();<NEW_LINE>System.out.print("now merge sorting with simple aggregation... ");<NEW_LINE>timer.reset().start();<NEW_LINE>mergeSort.sort(A, v2);<NEW_LINE>timer.stop().display();<NEW_LINE>}
.jet.math.Functions.functions;
111,512
protected Object doInBackground(Object... params) {<NEW_LINE>// Get accounts<NEW_LINE>mListAccount = new ArrayList<CharSequence>();<NEW_LINE>AccountManager accountManager = AccountManager.get(ActivityApp.this);<NEW_LINE>mAccounts = accountManager.getAccounts();<NEW_LINE>mSelection = new boolean[mAccounts.length];<NEW_LINE>for (int i = 0; i < mAccounts.length; i++) try {<NEW_LINE>mListAccount.add(String.format("%s (%s)", mAccounts[i].name, <MASK><NEW_LINE>String sha1 = Util.sha1(mAccounts[i].name + mAccounts[i].type);<NEW_LINE>mSelection[i] = PrivacyManager.getSettingBool(-mAppInfo.getUid(), Meta.cTypeAccount, sha1, false);<NEW_LINE>} catch (Throwable ex) {<NEW_LINE>Util.bug(null, ex);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
mAccounts[i].type));
1,159,159
private Tuple2<int[], Order[]> parseOrder(String orderClause, String[] inputColNames) {<NEW_LINE>String[] <MASK><NEW_LINE>int[] orderIndices = new int[orders.length];<NEW_LINE>Order[] orderTypes = new Order[orders.length];<NEW_LINE>for (int i = 0; i < orders.length; i++) {<NEW_LINE>String[] localOrder = orders[i].trim().split(" ");<NEW_LINE>orderIndices[i] = TableUtil.findColIndex(inputColNames, localOrder[0]);<NEW_LINE>if (localOrder.length == 1) {<NEW_LINE>// default is descending<NEW_LINE>orderTypes[i] = Order.ASCENDING;<NEW_LINE>} else {<NEW_LINE>String stringOrder = localOrder[1].trim().toLowerCase();<NEW_LINE>if ("desc".equals(stringOrder) || "descending".equals(stringOrder)) {<NEW_LINE>orderTypes[i] = Order.DESCENDING;<NEW_LINE>} else if ("asc".equals(stringOrder) || "ascending".equals(stringOrder)) {<NEW_LINE>orderTypes[i] = Order.ASCENDING;<NEW_LINE>} else {<NEW_LINE>throw new RuntimeException("Order only support DESCENDING and ASCENDING.");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Tuple2.of(orderIndices, orderTypes);<NEW_LINE>}
orders = orderClause.split(",");
779,950
final CreateBucketAccessKeyResult executeCreateBucketAccessKey(CreateBucketAccessKeyRequest createBucketAccessKeyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createBucketAccessKeyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateBucketAccessKeyRequest> request = null;<NEW_LINE>Response<CreateBucketAccessKeyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateBucketAccessKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBucketAccessKeyRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lightsail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBucketAccessKey");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateBucketAccessKeyResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBucketAccessKeyResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
463,256
final GetRegistrationCodeResult executeGetRegistrationCode(GetRegistrationCodeRequest getRegistrationCodeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRegistrationCodeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<GetRegistrationCodeRequest> request = null;<NEW_LINE>Response<GetRegistrationCodeResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetRegistrationCodeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getRegistrationCodeRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRegistrationCode");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetRegistrationCodeResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetRegistrationCodeResultJsonUnmarshaller());<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.ClientExecuteTime);
1,380,457
// doIt<NEW_LINE>private String createFormat(MTable table) throws Exception {<NEW_LINE>log.info("Table Name:" + table.getTableName());<NEW_LINE>MColumn[] cols = table.getColumns(true);<NEW_LINE>String unique = null;<NEW_LINE>boolean fieldname = false;<NEW_LINE>for (MColumn col : cols) {<NEW_LINE>if (col.isIdentifier() && col.getSeqNo() == 1) {<NEW_LINE>unique = col.getColumnName();<NEW_LINE>if (unique.equals("Name"))<NEW_LINE>fieldname = true;<NEW_LINE>log.info("Unique Key" + unique);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (unique == null)<NEW_LINE>unique = "Name";<NEW_LINE>MEXPFormat format = null;<NEW_LINE>// String formatValue = table.getTableName()+"_"+unique;<NEW_LINE>String formatValue = table.getTableName();<NEW_LINE>log.info("Export Format Value:" + formatValue);<NEW_LINE>format = (MEXPFormat) m_formats.get(formatValue);<NEW_LINE>if (format != null)<NEW_LINE>return format.getValue();<NEW_LINE>String where = " value = ? ";<NEW_LINE>Query sql = new Query(getCtx(), MEXPFormat.Table_Name, where, null).setParameters(new Object[] { formatValue });<NEW_LINE>if (sql.anyMatch()) {<NEW_LINE>format = <MASK><NEW_LINE>m_formats.put(format.getValue(), format);<NEW_LINE>return format.getValue();<NEW_LINE>}<NEW_LINE>format = MEXPFormat.getFormatByValueAD_Client_IDAndVersion(getCtx(), formatValue, getAD_Client_ID(), "1", get_TrxName());<NEW_LINE>if (format == null)<NEW_LINE>format = new MEXPFormat(getCtx(), 0, get_TrxName());<NEW_LINE>format.setValue(formatValue);<NEW_LINE>format.setName(table.getName());<NEW_LINE>format.setAD_Table_ID(table.getAD_Table_ID());<NEW_LINE>format.setDescription(table.getDescription());<NEW_LINE>format.setHelp(table.getHelp());<NEW_LINE>format.setVersion("1");<NEW_LINE>format.save();<NEW_LINE>if (format != null)<NEW_LINE>m_formats.put(format.getValue(), format);<NEW_LINE>int position = 10;<NEW_LINE>for (MColumn col : cols) {<NEW_LINE>if (p_IsMandatory) {<NEW_LINE>if (col.isMandatory())<NEW_LINE>createFormatLine(format, table, col, position, false);<NEW_LINE>} else<NEW_LINE>createFormatLine(format, table, col, position, false);<NEW_LINE>position++;<NEW_LINE>}<NEW_LINE>return format.getValue();<NEW_LINE>}
(MEXPFormat) sql.first();
1,791,061
private void showTestResults(final boolean resultOk, @NonNull final String message, @NonNull final ExampleLocation location) {<NEW_LINE>app.runInUIThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>testResultsContainer.setVisibility(View.VISIBLE);<NEW_LINE>ImageView ivImage = testResultsContainer.findViewById(R.id.icon);<NEW_LINE>TextView tvTitle = testResultsContainer.findViewById(R.id.title);<NEW_LINE>TextView tvDescription = testResultsContainer.findViewById(R.id.description);<NEW_LINE>if (resultOk) {<NEW_LINE>ivImage.setImageDrawable(getContentIcon(R.drawable.ic_action_gdirections_dark));<NEW_LINE>tvTitle.setText(getString(R.string.shared_string_ok));<NEW_LINE>} else {<NEW_LINE>ivImage.setImageDrawable(getContentIcon<MASK><NEW_LINE>tvTitle.setText(String.format(getString(R.string.message_server_error), message));<NEW_LINE>}<NEW_LINE>tvDescription.setText(location.getName());<NEW_LINE>scrollView.post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>scrollView.scrollTo(0, scrollView.getChildAt(0).getBottom());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
(R.drawable.ic_action_alert));
986,180
public void draw(@NonNull Canvas canvas) {<NEW_LINE>if (mNum < 3)<NEW_LINE>return;<NEW_LINE>final Rect rect = getBounds();<NEW_LINE>float r = rect.right / 2;<NEW_LINE>float x = r;<NEW_LINE>float y = r;<NEW_LINE>Path path = new Path();<NEW_LINE>for (int i = 0; i <= mNum; i++) {<NEW_LINE>float alpha = Double.valueOf(((2f / mNum) * i - 0.5) * Math.PI).floatValue();<NEW_LINE>float nextX = x + Double.valueOf(r * Math.cos(alpha)).floatValue();<NEW_LINE>float nextY = y + Double.valueOf(r * Math.sin(alpha)).floatValue();<NEW_LINE>if (i == 0) {<NEW_LINE>path.moveTo(nextX, nextY);<NEW_LINE>} else {<NEW_LINE>path.lineTo(nextX, nextY);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
canvas.drawPath(path, mPaint);
1,118,710
private TenantAddress updateTenantInfoAddress(Inspector insp, TenantAddress oldAddress) {<NEW_LINE>if (!insp.valid())<NEW_LINE>return oldAddress;<NEW_LINE>TenantAddress address = TenantAddress.empty().withCountry(getString(insp.field("country"), oldAddress.country())).withRegion(getString(insp.field("stateRegionProvince"), oldAddress.region())).withCity(getString(insp.field("city"), oldAddress.city())).withCode(getString(insp.field("postalCodeOrZip"), oldAddress.code())).withAddress(getString(insp.field("addressLines")<MASK><NEW_LINE>List<String> fields = List.of(address.address(), address.code(), address.country(), address.city(), address.region());<NEW_LINE>if (fields.stream().allMatch(String::isBlank) || fields.stream().noneMatch(String::isBlank))<NEW_LINE>return address;<NEW_LINE>throw new IllegalArgumentException("All address fields must be set");<NEW_LINE>}
, oldAddress.address()));
72,120
public void complete(VirtualConnection vc, TCPReadRequestContext rsc) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled())<NEW_LINE>c_logger.traceEntry(this, "SipResolverTcpTransport: complete: entry: id=" + hashCode());<NEW_LINE>if (c_logger.isTraceDebugEnabled())<NEW_LINE>c_logger.traceDebug("SipResolverTcpTransport: complete: _readState: " + _readState);<NEW_LINE>// Set this back to 0 so no errors are detected.<NEW_LINE>_readTimeoutCount = 0;<NEW_LINE>_connectionFailedCount = 0;<NEW_LINE>_transportErrorCount = 0;<NEW_LINE>boolean exit = false;<NEW_LINE>while (exit == false) {<NEW_LINE>switch(_readState) {<NEW_LINE>case READ_STATE_READING_LENGTH:<NEW_LINE>_reader.getBuffer().flip();<NEW_LINE>short length = _reader.getBuffer().getShort();<NEW_LINE>_readState = READ_STATE_READING_BODY;<NEW_LINE>_reader.setJITAllocateSize(length);<NEW_LINE>_reader.setBuffer(null);<NEW_LINE>if (c_logger.isTraceDebugEnabled())<NEW_LINE>c_logger.traceDebug("SipResolverTcpTransport: complete: doing read length of: " + length);<NEW_LINE>if (_reader.read(length, this, false, READ_TIMEOUT) == null) {<NEW_LINE>exit = true;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case READ_STATE_READING_BODY:<NEW_LINE>if (_outstandingRequestCount != 0)<NEW_LINE>_outstandingRequestCount--;<NEW_LINE>else {<NEW_LINE>if (c_logger.isTraceDebugEnabled())<NEW_LINE>c_logger.traceDebug("SipResolverTcpTransport: complete: error: outstandingRequestCount can't decrement past 0");<NEW_LINE>}<NEW_LINE>_reader<MASK><NEW_LINE>_transportListener.responseReceived(_reader.getBuffer());<NEW_LINE>_readState = READ_STATE_READING_LENGTH;<NEW_LINE>_reader.setJITAllocateSize(2);<NEW_LINE>_reader.setBuffer(null);<NEW_LINE>if (c_logger.isTraceDebugEnabled())<NEW_LINE>c_logger.traceDebug("SipResolverTcpTransport: complete: doing new read for length");<NEW_LINE>if (_reader.read(2, this, false, READ_TIMEOUT) == null)<NEW_LINE>exit = true;<NEW_LINE>break;<NEW_LINE>case READ_STATE_DISCONNECTED:<NEW_LINE>case READ_STATE_SHUTDOWN:<NEW_LINE>exit = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (c_logger.isTraceEntryExitEnabled())<NEW_LINE>c_logger.traceExit(this, "SipResolverTcpTransport: complete: exit: id=" + hashCode());<NEW_LINE>}
.getBuffer().flip();
1,408,291
public void actionPerformed(ActionEvent arg0) {<NEW_LINE>UiUtils.submitUiMachineTask(() -> {<NEW_LINE>// Need to keep current focus owner so that the space bar can be<NEW_LINE>// used after the initial click. Otherwise, button focus is lost<NEW_LINE>// when table is updated<NEW_LINE>Component comp = MainFrame.get().getFocusOwner();<NEW_LINE>Helpers.selectNextTableRow(table);<NEW_LINE>comp.requestFocus();<NEW_LINE>Location location = Utils2D.calculateBoardPlacementLocation(boardLocation, <MASK><NEW_LINE>Camera camera = MainFrame.get().getMachineControls().getSelectedTool().getHead().getDefaultCamera();<NEW_LINE>MovableUtils.moveToLocationAtSafeZ(camera, location);<NEW_LINE>MovableUtils.fireTargetedUserAction(camera);<NEW_LINE>Map<String, Object> globals = new HashMap<>();<NEW_LINE>globals.put("camera", camera);<NEW_LINE>Configuration.get().getScripting().on("Camera.AfterPosition", globals);<NEW_LINE>});<NEW_LINE>}
getSelection().getLocation());
73,609
private void freeFloatingReferenceRecords(GCLogTrace trace, String line) {<NEW_LINE>if (collectionTypeForwardReference == GarbageCollectionTypes.Young) {<NEW_LINE>forwardReference = new G1Young(timeStampForwardReference, gcCauseForwardReference, trace.getPauseTime());<NEW_LINE>} else if (collectionTypeForwardReference == GarbageCollectionTypes.Mixed) {<NEW_LINE>forwardReference = new G1Mixed(timeStampForwardReference, gcCauseForwardReference, trace.getPauseTime());<NEW_LINE>} else if (collectionTypeForwardReference == GarbageCollectionTypes.G1GCYoungInitialMark) {<NEW_LINE>forwardReference = new G1YoungInitialMark(timeStampForwardReference, gcCauseForwardReference, trace.getPauseTime());<NEW_LINE>}<NEW_LINE>forwardReference<MASK><NEW_LINE>if (trace.contains("to-space")) {<NEW_LINE>// todo: where this shows up in this record is current unknown.<NEW_LINE>((G1Young) forwardReference).toSpaceExhausted();<NEW_LINE>}<NEW_LINE>}
.add(extractPrintReferenceGC(line));
1,314,708
public void run(RegressionEnvironment env) {<NEW_LINE>String stmtText = "@name('s0') select (select id from SupportBean_S0#length(1000) where p00=s1.p10 and p00=s3.p30) as ids0 " + "from SupportBean_S1#keepall as s1, SupportBean_S2#keepall as s2, SupportBean_S3#keepall as s3 where s1.id = s2.id and s2.id = s3.id";<NEW_LINE>env.compileDeployAddListenerMileZero(stmtText, "s0");<NEW_LINE>env.sendEventBean(new SupportBean_S1(10, "s0_1"));<NEW_LINE>env.sendEventBean(new SupportBean_S2(10, "s0_1"));<NEW_LINE>env.sendEventBean(new SupportBean_S3(10, "s0_1"));<NEW_LINE>env.<MASK><NEW_LINE>env.sendEventBean(new SupportBean_S0(99, "s0_1"));<NEW_LINE>env.sendEventBean(new SupportBean_S1(11, "s0_1"));<NEW_LINE>env.sendEventBean(new SupportBean_S2(11, "xxx"));<NEW_LINE>env.sendEventBean(new SupportBean_S3(11, "s0_1"));<NEW_LINE>env.assertEqualsNew("s0", "ids0", 99);<NEW_LINE>env.sendEventBean(new SupportBean_S0(98, "s0_2"));<NEW_LINE>env.sendEventBean(new SupportBean_S1(12, "s0_x"));<NEW_LINE>env.sendEventBean(new SupportBean_S2(12, "s0_2"));<NEW_LINE>env.sendEventBean(new SupportBean_S3(12, "s0_1"));<NEW_LINE>env.assertEqualsNew("s0", "ids0", null);<NEW_LINE>env.sendEventBean(new SupportBean_S1(13, "s0_2"));<NEW_LINE>env.sendEventBean(new SupportBean_S2(13, "s0_2"));<NEW_LINE>env.sendEventBean(new SupportBean_S3(13, "s0_x"));<NEW_LINE>env.assertEqualsNew("s0", "ids0", null);<NEW_LINE>env.sendEventBean(new SupportBean_S1(14, "s0_2"));<NEW_LINE>env.sendEventBean(new SupportBean_S2(14, "xx"));<NEW_LINE>env.sendEventBean(new SupportBean_S3(14, "s0_2"));<NEW_LINE>env.assertEqualsNew("s0", "ids0", 98);<NEW_LINE>env.undeployAll();<NEW_LINE>}
assertEqualsNew("s0", "ids0", null);
588,405
public void initializeState(FunctionInitializationContext context) throws Exception {<NEW_LINE>Preconditions.checkState(this.checkpointedState == null, "The " + getClass().getSimpleName() + " has already been initialized.");<NEW_LINE>this.checkpointedState = context.getOperatorStateStore().getListState(new ListStateDescriptor<>("file-monitoring-state", LongSerializer.INSTANCE));<NEW_LINE>if (context.isRestored()) {<NEW_LINE>LOG.info("Restoring state for the {}.", getClass().getSimpleName());<NEW_LINE>List<Long> retrievedStates = new ArrayList<>();<NEW_LINE>for (Long entry : this.checkpointedState.get()) {<NEW_LINE>retrievedStates.add(entry);<NEW_LINE>}<NEW_LINE>// given that the parallelism of the function is 1, we can only have 1 or 0 retrieved items.<NEW_LINE>// the 0 is for the case that we are migrating from a previous Flink version.<NEW_LINE>Preconditions.checkArgument(retrievedStates.size() <= 1, getClass().getSimpleName() + " retrieved invalid state.");<NEW_LINE>if (retrievedStates.size() == 1 && globalModificationTime != Long.MIN_VALUE) {<NEW_LINE>// this is the case where we have both legacy and new state.<NEW_LINE>// The two should be mutually exclusive for the operator, thus we throw the exception.<NEW_LINE>throw new IllegalArgumentException("The " + getClass().getSimpleName() + " has already restored from a previous Flink version.");<NEW_LINE>} else if (retrievedStates.size() == 1) {<NEW_LINE>this.<MASK><NEW_LINE>if (LOG.isDebugEnabled()) {<NEW_LINE>LOG.debug("{} retrieved a global mod time of {}.", getClass().getSimpleName(), globalModificationTime);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>LOG.info("No state to restore for the {}.", getClass().getSimpleName());<NEW_LINE>}<NEW_LINE>}
globalModificationTime = retrievedStates.get(0);
497,016
private int findOffset(IFile file, int line, int column) {<NEW_LINE>int[] lineOffsets = getResFileToContent().computeIfAbsent(file, f -> {<NEW_LINE>try {<NEW_LINE>String content = getFileContent();<NEW_LINE>ArrayList<Integer> lineOffsetList = new ArrayList<>();<NEW_LINE>lineOffsetList.add(0);<NEW_LINE>for (int index = content.indexOf('\n') + 1; index > 0; index = content.indexOf('\n', index) + 1) {<NEW_LINE>lineOffsetList.add(index);<NEW_LINE>}<NEW_LINE>int[] array = new int[lineOffsetList.size()];<NEW_LINE>for (int i = 0; i < array.length; i++) {<NEW_LINE>array[i<MASK><NEW_LINE>}<NEW_LINE>return array;<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>throw ManExceptionUtil.unchecked(ioe);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>int offset;<NEW_LINE>try {<NEW_LINE>offset = lineOffsets[line - 1] + column - 1;<NEW_LINE>} catch (ArrayIndexOutOfBoundsException ex) {<NEW_LINE>System.err.print("WARNING: ");<NEW_LINE>ex.printStackTrace();<NEW_LINE>offset = 0;<NEW_LINE>}<NEW_LINE>if (file instanceof IFileFragment) {<NEW_LINE>offset += ((IFileFragment) file).getOffset();<NEW_LINE>}<NEW_LINE>return offset;<NEW_LINE>}
] = lineOffsetList.get(i);
168,198
public Map<String, ModelsMap> postProcessAllModels(Map<String, ModelsMap> superobjs) {<NEW_LINE>List<String> <MASK><NEW_LINE>for (Map.Entry<String, ModelsMap> modelEntry : superobjs.entrySet()) {<NEW_LINE>// process enum in models<NEW_LINE>List<ModelMap> models = modelEntry.getValue().getModels();<NEW_LINE>for (ModelMap mo : models) {<NEW_LINE>CodegenModel cm = mo.getModel();<NEW_LINE>// for enum model<NEW_LINE>if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) {<NEW_LINE>toRemove.add(modelEntry.getKey());<NEW_LINE>} else {<NEW_LINE>enrichPropertiesWithEnumDefaultValues(cm.getAllVars());<NEW_LINE>enrichPropertiesWithEnumDefaultValues(cm.getReadOnlyVars());<NEW_LINE>enrichPropertiesWithEnumDefaultValues(cm.getReadWriteVars());<NEW_LINE>enrichPropertiesWithEnumDefaultValues(cm.getRequiredVars());<NEW_LINE>enrichPropertiesWithEnumDefaultValues(cm.getOptionalVars());<NEW_LINE>enrichPropertiesWithEnumDefaultValues(cm.getVars());<NEW_LINE>enrichPropertiesWithEnumDefaultValues(cm.getParentVars());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (String keyToRemove : toRemove) {<NEW_LINE>superobjs.remove(keyToRemove);<NEW_LINE>}<NEW_LINE>return superobjs;<NEW_LINE>}
toRemove = new ArrayList<>();
532,671
@Operation(summary = "List measurement events for multiple assignments", description = "List measurement events for multiple assignments")<NEW_LINE>public Response listMeasurementsForAssignments(@Parameter(description = "Page number", required = false) @QueryParam("page") @DefaultValue("1") int page, @Parameter(description = "Page size", required = false) @QueryParam("pageSize") @DefaultValue("100") int pageSize, @Parameter(description = "Start date", required = false) @QueryParam("startDate") String startDate, @Parameter(description = "End date", required = false) @QueryParam("endDate") String endDate, @RequestBody DeviceAssignmentBulkRequest bulk) throws SiteWhereException {<NEW_LINE>List<<MASK><NEW_LINE>IDateRangeSearchCriteria criteria = createDateRangeSearchCriteria(page, pageSize, startDate, endDate);<NEW_LINE>return Response.ok(getDeviceEventManagement().listDeviceMeasurementsForIndex(DeviceEventIndex.Assignment, ids, criteria)).build();<NEW_LINE>}
UUID> ids = getDeviceAssignmentIds(bulk);
710,440
public void writeTagValuePayload(ByteBuffer buf) {<NEW_LINE>long value = this.value.longValue();<NEW_LINE>if (value < 0xff) {<NEW_LINE>buf.writeByte((int) value);<NEW_LINE>} else if (value <= 0xffFF) {<NEW_LINE>buf.writeShort((int) value);<NEW_LINE>} else if (value <= 0xffFFff) {<NEW_LINE>buf.writeByte((int) (value >> 16));<NEW_LINE>buf.writeShort((int) value);<NEW_LINE>} else if (value <= 0xffFFffFFL) {<NEW_LINE>buf.writeInt((int) value);<NEW_LINE>} else if (value <= 0xffFFffFFffL) {<NEW_LINE>buf.writeByte((int) (value >> 32));<NEW_LINE>buf.writeInt((int) value);<NEW_LINE>} else if (value <= 0xffFFffFFffFFL) {<NEW_LINE>buf.writeShort((int) (value >> 32));<NEW_LINE>buf.writeInt((int) value);<NEW_LINE>} else if (value <= 0xffFFffFFffFFffL) {<NEW_LINE>buf.writeByte((int) (value >> (32 + 16)));<NEW_LINE>buf.writeShort((int) (value >> 32));<NEW_LINE>buf.writeInt((int) value);<NEW_LINE>} else {<NEW_LINE>buf.writeInt((int<MASK><NEW_LINE>buf.writeInt((int) value);<NEW_LINE>}<NEW_LINE>}
) (value >> 32));
136,046
private static void assignInitializer(FieldSpec.Builder fieldBuilder, SpecModel specModel, PropModel prop, PropDefaultModel propDefault) {<NEW_LINE>SpecElementType type = specModel.getSpecElementType();<NEW_LINE>if (isKotlinPropDefaultWithGetterMethod(specModel, propDefault)) {<NEW_LINE>final String propName = prop.getName();<NEW_LINE>final boolean needGetter = !propName.startsWith("is");<NEW_LINE>final String propAccessor = (needGetter ? "get" + propName.substring(0, 1).toUpperCase() : propName.substring(0, 1)) + propName.substring(1) + "()";<NEW_LINE>fieldBuilder.initializer("$L.$L.$L", specModel.getSpecName(), type == SpecElementType.KOTLIN_SINGLETON ? "INSTANCE" : "Companion", propAccessor);<NEW_LINE>} else {<NEW_LINE>fieldBuilder.initializer("$L.$L", specModel.getSpecName(<MASK><NEW_LINE>}<NEW_LINE>}
), prop.getName());
1,413,495
private void unpackAotProxyHint(AnnotationNode typeInfo, HintDeclaration ch) {<NEW_LINE>List<Object> values = typeInfo.values;<NEW_LINE>String targetClassName = "java.lang.Object";<NEW_LINE>List<org.objectweb.asm.Type> interfaces = new ArrayList<>();<NEW_LINE>List<String> interfaceNames = new ArrayList<>();<NEW_LINE>int proxyFeatures = ProxyBits.NONE;<NEW_LINE>boolean typeMissing = false;<NEW_LINE>for (int i = 0; i < values.size(); i += 2) {<NEW_LINE>String key = (String) values.get(i);<NEW_LINE>Object value = values.get(i + 1);<NEW_LINE>if (key.equals("targetClass")) {<NEW_LINE>targetClassName = ((org.objectweb.asm.Type) value).getClassName();<NEW_LINE>} else if (key.equals("targetClassName")) {<NEW_LINE>targetClassName = (String) value;<NEW_LINE>} else if (key.equals("interfaces")) {<NEW_LINE>interfaces = (ArrayList<org.objectweb.asm.Type>) value;<NEW_LINE>} else if (key.equals("interfaceNames")) {<NEW_LINE>interfaceNames = (ArrayList<String>) value;<NEW_LINE>} else if (key.equals("proxyFeatures")) {<NEW_LINE>proxyFeatures = (Integer) value;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Type resolvedType = typeSystem.resolveName(targetClassName, true);<NEW_LINE>if (resolvedType == null) {<NEW_LINE>typeMissing = true;<NEW_LINE>}<NEW_LINE>List<String> proxyInterfaceTypes = new ArrayList<>();<NEW_LINE>for (org.objectweb.asm.Type intface : interfaces) {<NEW_LINE><MASK><NEW_LINE>resolvedType = typeSystem.resolveName(intfaceName, true);<NEW_LINE>if (resolvedType != null) {<NEW_LINE>proxyInterfaceTypes.add(intfaceName);<NEW_LINE>} else {<NEW_LINE>typeMissing = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (String intfaceName : interfaceNames) {<NEW_LINE>resolvedType = typeSystem.resolveName(intfaceName, true);<NEW_LINE>if (resolvedType != null) {<NEW_LINE>proxyInterfaceTypes.add(intfaceName);<NEW_LINE>} else {<NEW_LINE>typeMissing = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!typeMissing) {<NEW_LINE>AotProxyDescriptor cpd = new AotProxyDescriptor(targetClassName, proxyInterfaceTypes, proxyFeatures);<NEW_LINE>ch.addProxyDescriptor(cpd);<NEW_LINE>}<NEW_LINE>}
String intfaceName = intface.getClassName();
1,681,952
public static DetectIPCPedestrianResponse unmarshall(DetectIPCPedestrianResponse detectIPCPedestrianResponse, UnmarshallerContext _ctx) {<NEW_LINE>detectIPCPedestrianResponse.setRequestId(_ctx.stringValue("DetectIPCPedestrianResponse.RequestId"));<NEW_LINE>Data data = new Data();<NEW_LINE>List<ImageInfoListItem> imageInfoList = new ArrayList<ImageInfoListItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DetectIPCPedestrianResponse.Data.ImageInfoList.Length"); i++) {<NEW_LINE>ImageInfoListItem imageInfoListItem = new ImageInfoListItem();<NEW_LINE>imageInfoListItem.setErrorMessage(_ctx.stringValue("DetectIPCPedestrianResponse.Data.ImageInfoList[" + i + "].ErrorMessage"));<NEW_LINE>imageInfoListItem.setErrorCode(_ctx.stringValue("DetectIPCPedestrianResponse.Data.ImageInfoList[" + i + "].ErrorCode"));<NEW_LINE>imageInfoListItem.setDataId(_ctx.stringValue("DetectIPCPedestrianResponse.Data.ImageInfoList[" + i + "].DataId"));<NEW_LINE>List<Element> elements = new ArrayList<Element>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DetectIPCPedestrianResponse.Data.ImageInfoList[" + i + "].Elements.Length"); j++) {<NEW_LINE>Element element = new Element();<NEW_LINE>element.setScore(_ctx.floatValue("DetectIPCPedestrianResponse.Data.ImageInfoList[" + i + "].Elements[" + j + "].Score"));<NEW_LINE>List<Integer> boxes = new ArrayList<Integer>();<NEW_LINE>for (int k = 0; k < _ctx.lengthValue("DetectIPCPedestrianResponse.Data.ImageInfoList[" + i + "].Elements[" + j + "].Boxes.Length"); k++) {<NEW_LINE>boxes.add(_ctx.integerValue("DetectIPCPedestrianResponse.Data.ImageInfoList[" + i + "].Elements[" + j <MASK><NEW_LINE>}<NEW_LINE>element.setBoxes(boxes);<NEW_LINE>elements.add(element);<NEW_LINE>}<NEW_LINE>imageInfoListItem.setElements(elements);<NEW_LINE>imageInfoList.add(imageInfoListItem);<NEW_LINE>}<NEW_LINE>data.setImageInfoList(imageInfoList);<NEW_LINE>detectIPCPedestrianResponse.setData(data);<NEW_LINE>return detectIPCPedestrianResponse;<NEW_LINE>}
+ "].Boxes[" + k + "]"));