idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
616,071
public static void histogram_U8(Planar<GrayU8> image, Histogram_F64 histogram) {<NEW_LINE>if (image.getNumBands() != histogram.getDimensions())<NEW_LINE>throw new IllegalArgumentException("Number of bands in the image and histogram must be the same");<NEW_LINE>if (!histogram.isRangeSet())<NEW_LINE>throw new IllegalArgumentException("Must specify range along each dimension in histogram");<NEW_LINE>final int D = histogram.getDimensions();<NEW_LINE>int[] coordinate = new int[D];<NEW_LINE>histogram.fill(0);<NEW_LINE>for (int y = 0; y < image.getHeight(); y++) {<NEW_LINE>int imageIndex = image.getStartIndex() + y * image.getStride();<NEW_LINE>for (int x = 0; x < image.getWidth(); x++, imageIndex++) {<NEW_LINE>for (int i = 0; i < D; i++) {<NEW_LINE>coordinate[i] = histogram.getDimensionIndex(i, image.getBand(i).data[imageIndex] & 0xFF);<NEW_LINE>}<NEW_LINE>int <MASK><NEW_LINE>histogram.data[index] += 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
index = histogram.getIndex(coordinate);
665,422
public MultipleObjectsBundle filter(MultipleObjectsBundle objects) {<NEW_LINE>final int size = objects.dataLength();<NEW_LINE>if (size == 0) {<NEW_LINE>return objects;<NEW_LINE>}<NEW_LINE>MultipleObjectsBundle bundle = new MultipleObjectsBundle();<NEW_LINE>for (int r = 0; r < objects.metaLength(); r++) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>SimpleTypeInformation<Object> type = (SimpleTypeInformation<Object>) objects.meta(r);<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final List<Object> column = (List<Object>) objects.getColumn(r);<NEW_LINE>if (!dist.getInputTypeRestriction().isAssignableFromType(type)) {<NEW_LINE>bundle.appendColumn(type, column);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Get the replacement type information<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final List<I> castColumn = (List<I>) column;<NEW_LINE>bundle.appendColumn(new VectorFieldTypeInformation<>(factory, tdim), castColumn);<NEW_LINE>StepProgress prog = LOG.isVerbose() ? new StepProgress("Classic MDS", 2) : null;<NEW_LINE>// Compute distance matrix.<NEW_LINE>LOG.beginStep(prog, 1, "Computing distance matrix");<NEW_LINE>double[][] mat = computeSquaredDistanceMatrix(castColumn, dist);<NEW_LINE>doubleCenterSymmetric(mat);<NEW_LINE>// Find eigenvectors.<NEW_LINE>{<NEW_LINE>LOG.beginStep(prog, 2, "Computing singular value decomposition");<NEW_LINE>SingularValueDecomposition svd = new SingularValueDecomposition(mat);<NEW_LINE>double[][<MASK><NEW_LINE>double[] lambda = svd.getSingularValues();<NEW_LINE>// Undo squared, unless we were given a squared distance function:<NEW_LINE>if (!dist.isSquared()) {<NEW_LINE>for (int i = 0; i < tdim; i++) {<NEW_LINE>lambda[i] = Math.sqrt(Math.abs(lambda[i]));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>double[] buf = new double[tdim];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>double[] row = u[i];<NEW_LINE>for (int x = 0; x < buf.length; x++) {<NEW_LINE>buf[x] = lambda[x] * row[x];<NEW_LINE>}<NEW_LINE>column.set(i, factory.newNumberVector(buf));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOG.setCompleted(prog);<NEW_LINE>}<NEW_LINE>return bundle;<NEW_LINE>}
] u = svd.getU();
729,003
public boolean send(ProfileEvent profileEvent, Transaction tx) throws IOException {<NEW_LINE>String topic = profileEvent.getHeaders().get(Constants.TOPIC);<NEW_LINE>ProducerRecord<String, byte[]> record = handler.parse(sinkContext, profileEvent);<NEW_LINE>long sendTime = System.currentTimeMillis();<NEW_LINE>// check<NEW_LINE>if (record == null) {<NEW_LINE>tx.commit();<NEW_LINE>profileEvent.ack();<NEW_LINE>tx.close();<NEW_LINE>sinkContext.addSendResultMetric(profileEvent, topic, false, sendTime);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>producer.send(record, (metadata, ex) -> {<NEW_LINE>if (ex == null) {<NEW_LINE>tx.commit();<NEW_LINE>sinkContext.addSendResultMetric(profileEvent, topic, true, sendTime);<NEW_LINE>profileEvent.ack();<NEW_LINE>} else {<NEW_LINE>LOG.error(String.format("send failed, topic is %s, partition is %s", metadata.topic(), metadata<MASK><NEW_LINE>tx.rollback();<NEW_LINE>sinkContext.addSendResultMetric(profileEvent, topic, false, sendTime);<NEW_LINE>}<NEW_LINE>tx.close();<NEW_LINE>});<NEW_LINE>return true;<NEW_LINE>} catch (Exception e) {<NEW_LINE>tx.rollback();<NEW_LINE>tx.close();<NEW_LINE>LOG.error(e.getMessage(), e);<NEW_LINE>sinkContext.addSendResultMetric(profileEvent, topic, false, sendTime);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
.partition()), ex);
1,485,944
private void executeReceiveRequest(final TransportRequest transportRequest, final URI url, final HttpHeaders headers, final XhrClientSockJsSession session, final SettableListenableFuture<WebSocketSession> connectFuture) {<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>logger.trace("Starting XHR receive request for " + url);<NEW_LINE>}<NEW_LINE>ClientCallback<ClientConnection> clientCallback = new ClientCallback<>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void completed(ClientConnection connection) {<NEW_LINE>ClientRequest request = new ClientRequest().setMethod(Methods.POST).<MASK><NEW_LINE>HttpString headerName = HttpString.tryFromString(HttpHeaders.HOST);<NEW_LINE>request.getRequestHeaders().add(headerName, url.getHost());<NEW_LINE>addHttpHeaders(request, headers);<NEW_LINE>HttpHeaders httpHeaders = transportRequest.getHttpRequestHeaders();<NEW_LINE>connection.sendRequest(request, createReceiveCallback(transportRequest, url, httpHeaders, session, connectFuture));<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void failed(IOException ex) {<NEW_LINE>throw new SockJsTransportFailureException("Failed to execute request to " + url, ex);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>this.httpClient.connect(clientCallback, url, this.worker, this.bufferPool, this.optionMap);<NEW_LINE>}
setPath(url.getPath());
1,621,670
private RexNode simplifyNot(RexCall call) {<NEW_LINE>final RexNode a = call.getOperands().get(0);<NEW_LINE>switch(a.getKind()) {<NEW_LINE>case NOT:<NEW_LINE>// NOT NOT x ==> x<NEW_LINE>return simplify(((RexCall) a).getOperands().get(0));<NEW_LINE>}<NEW_LINE>final SqlKind negateKind = a.getKind().negate();<NEW_LINE>if (a.getKind() != negateKind) {<NEW_LINE>return simplify(rexBuilder.makeCall(RexUtil.op(negateKind), ((RexCall) a).getOperands()));<NEW_LINE>}<NEW_LINE>final SqlKind negateKind2 = a.getKind().negateNullSafe();<NEW_LINE>if (a.getKind() != negateKind2) {<NEW_LINE>return simplify(rexBuilder.makeCall(RexUtil.op(negateKind2), ((RexCall) a).getOperands()));<NEW_LINE>}<NEW_LINE>if (a.getKind() == SqlKind.AND) {<NEW_LINE>// NOT distributivity for AND<NEW_LINE>final List<RexNode> newOperands = new ArrayList<>();<NEW_LINE>for (RexNode operand : ((RexCall) a).getOperands()) {<NEW_LINE>newOperands.add(simplify(rexBuilder.makeCall(SqlStdOperatorTable.NOT, operand)));<NEW_LINE>}<NEW_LINE>return simplify(rexBuilder.makeCall(SqlStdOperatorTable.OR, newOperands));<NEW_LINE>}<NEW_LINE>if (a.getKind() == SqlKind.OR) {<NEW_LINE>// NOT distributivity for OR<NEW_LINE>final List<RexNode> <MASK><NEW_LINE>for (RexNode operand : ((RexCall) a).getOperands()) {<NEW_LINE>newOperands.add(simplify(rexBuilder.makeCall(SqlStdOperatorTable.NOT, operand)));<NEW_LINE>}<NEW_LINE>return simplify(rexBuilder.makeCall(SqlStdOperatorTable.AND, newOperands));<NEW_LINE>}<NEW_LINE>return call;<NEW_LINE>}
newOperands = new ArrayList<>();
421,541
final PutAccessPointPolicyForObjectLambdaResult executePutAccessPointPolicyForObjectLambda(PutAccessPointPolicyForObjectLambdaRequest putAccessPointPolicyForObjectLambdaRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putAccessPointPolicyForObjectLambdaRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutAccessPointPolicyForObjectLambdaRequest> request = null;<NEW_LINE>Response<PutAccessPointPolicyForObjectLambdaResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutAccessPointPolicyForObjectLambdaRequestMarshaller().marshall(super.beforeMarshalling(putAccessPointPolicyForObjectLambdaRequest));<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, "S3 Control");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutAccessPointPolicyForObjectLambda");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>URI endpointTraitHost = null;<NEW_LINE>if (!clientConfiguration.isDisableHostPrefixInjection()) {<NEW_LINE>ValidationUtils.assertStringNotEmpty(putAccessPointPolicyForObjectLambdaRequest.getAccountId(), "AccountId");<NEW_LINE>HostnameValidator.validateHostnameCompliant(putAccessPointPolicyForObjectLambdaRequest.getAccountId(), "AccountId", "putAccessPointPolicyForObjectLambdaRequest");<NEW_LINE>String hostPrefix = "{AccountId}.";<NEW_LINE>String resolvedHostPrefix = String.format("%s.", putAccessPointPolicyForObjectLambdaRequest.getAccountId());<NEW_LINE>endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<PutAccessPointPolicyForObjectLambdaResult> responseHandler = new com.amazonaws.services.s3control.internal.S3ControlStaxResponseHandler<PutAccessPointPolicyForObjectLambdaResult>(new PutAccessPointPolicyForObjectLambdaResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
213,158
private String computeMethodAnchorPrefixEnd(BinaryMethod method) throws JavaModelException {<NEW_LINE>String typeQualifiedName = null;<NEW_LINE>if (this.type.isMember()) {<NEW_LINE>IType currentType = this.type;<NEW_LINE>StringBuilder buffer = new StringBuilder();<NEW_LINE>while (currentType != null) {<NEW_LINE>buffer.insert(0, currentType.getElementName());<NEW_LINE>currentType = currentType.getDeclaringType();<NEW_LINE>if (currentType != null) {<NEW_LINE>buffer.insert(0, '.');<NEW_LINE>}<NEW_LINE>}<NEW_LINE>typeQualifiedName = buffer.toString();<NEW_LINE>} else {<NEW_LINE>typeQualifiedName = this.type.getElementName();<NEW_LINE>}<NEW_LINE>String methodName = method.getElementName();<NEW_LINE>if (method.isConstructor()) {<NEW_LINE>methodName = typeQualifiedName;<NEW_LINE>}<NEW_LINE>IBinaryMethod info = (IBinaryMethod) method.getElementInfo();<NEW_LINE>char[] genericSignature = info.getGenericSignature();<NEW_LINE>String anchor = null;<NEW_LINE>if (genericSignature != null) {<NEW_LINE>genericSignature = CharOperation.replaceOnCopy(genericSignature, '/', '.');<NEW_LINE>anchor = Util.toAnchor(0, genericSignature, methodName, Flags.isVarargs(method.getFlags()));<NEW_LINE>if (anchor == null)<NEW_LINE>throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, method));<NEW_LINE>} else {<NEW_LINE>anchor = Signature.toString(method.getSignature().replace('/', '.'), methodName, null, true, false, Flags.isVarargs(method.getFlags()));<NEW_LINE>}<NEW_LINE>IType declaringType = this.type;<NEW_LINE>if (declaringType.isMember()) {<NEW_LINE>// might need to remove a part of the signature corresponding to the synthetic argument (only for constructor)<NEW_LINE>if (method.isConstructor() && !Flags.isStatic(declaringType.getFlags())) {<NEW_LINE>int indexOfOpeningParen = anchor.indexOf('(');<NEW_LINE>if (indexOfOpeningParen == -1) {<NEW_LINE>// should not happen as this is a method signature<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>int index = indexOfOpeningParen;<NEW_LINE>indexOfOpeningParen++;<NEW_LINE>int indexOfComma = anchor.indexOf(',', index);<NEW_LINE>if (indexOfComma != -1) {<NEW_LINE>index = indexOfComma + 2;<NEW_LINE>} else {<NEW_LINE>// no argument, but a synthetic argument<NEW_LINE>index = <MASK><NEW_LINE>}<NEW_LINE>anchor = anchor.substring(0, indexOfOpeningParen) + anchor.substring(index);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return anchor + JavadocConstants.ANCHOR_PREFIX_END;<NEW_LINE>}
anchor.indexOf(')', index);
1,522,395
public io.kubernetes.client.proto.V1beta2Apps.DeploymentList buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1beta2Apps.DeploymentList result = new io.kubernetes.client.proto.V1beta2Apps.DeploymentList(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>to_bitField0_ |= 0x00000001;<NEW_LINE>}<NEW_LINE>if (metadataBuilder_ == null) {<NEW_LINE>result.metadata_ = metadata_;<NEW_LINE>} else {<NEW_LINE>result.metadata_ = metadataBuilder_.build();<NEW_LINE>}<NEW_LINE>if (itemsBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>items_ = java.<MASK><NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>}<NEW_LINE>result.items_ = items_;<NEW_LINE>} else {<NEW_LINE>result.items_ = itemsBuilder_.build();<NEW_LINE>}<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
util.Collections.unmodifiableList(items_);
657,319
private void mergeBrowse(MBrowse browse, MBrowseCustom customBrowse) {<NEW_LINE>// Name<NEW_LINE>if (!Util.isEmpty(customBrowse.getName())) {<NEW_LINE>browse.setName(customBrowse.getName());<NEW_LINE>}<NEW_LINE>// Description<NEW_LINE>if (!Util.isEmpty(customBrowse.getDescription())) {<NEW_LINE>browse.setDescription(customBrowse.getDescription());<NEW_LINE>}<NEW_LINE>// Help<NEW_LINE>if (!Util.isEmpty(customBrowse.getHelp())) {<NEW_LINE>browse.setHelp(customBrowse.getHelp());<NEW_LINE>}<NEW_LINE>// Translation<NEW_LINE>if (!Language.isBaseLanguage(language)) {<NEW_LINE>// Name<NEW_LINE>String value = customBrowse.get_Translation(I_AD_Browse.COLUMNNAME_Name, language);<NEW_LINE>if (Util.isEmpty(value)) {<NEW_LINE>value = browse.get_Translation(I_AD_Browse.COLUMNNAME_Name, language);<NEW_LINE>}<NEW_LINE>if (!Util.isEmpty(value)) {<NEW_LINE>browse.setName(value);<NEW_LINE>}<NEW_LINE>// Description<NEW_LINE>value = customBrowse.get_Translation(I_AD_Browse.COLUMNNAME_Description, language);<NEW_LINE>if (Util.isEmpty(value)) {<NEW_LINE>value = browse.get_Translation(I_AD_Browse.COLUMNNAME_Description, language);<NEW_LINE>}<NEW_LINE>if (!Util.isEmpty(value)) {<NEW_LINE>browse.setDescription(value);<NEW_LINE>}<NEW_LINE>// Help<NEW_LINE>value = customBrowse.<MASK><NEW_LINE>if (Util.isEmpty(value)) {<NEW_LINE>value = browse.get_Translation(I_AD_Browse.COLUMNNAME_Help, language);<NEW_LINE>}<NEW_LINE>if (!Util.isEmpty(value)) {<NEW_LINE>browse.setHelp(value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Process<NEW_LINE>if (customBrowse.getAD_Process_ID() > 0) {<NEW_LINE>browse.setAD_Process_ID(customBrowse.getAD_Process_ID());<NEW_LINE>}<NEW_LINE>// Where Clause<NEW_LINE>if (!Util.isEmpty(customBrowse.getWhereClause())) {<NEW_LINE>browse.setWhereClause(customBrowse.getWhereClause());<NEW_LINE>}<NEW_LINE>// Window<NEW_LINE>if (customBrowse.getAD_Window_ID() > 0) {<NEW_LINE>browse.setAD_Window_ID(customBrowse.getAD_Window_ID());<NEW_LINE>}<NEW_LINE>// Table<NEW_LINE>if (customBrowse.getAD_Table_ID() > 0) {<NEW_LINE>browse.setAD_Table_ID(customBrowse.getAD_Table_ID());<NEW_LINE>}<NEW_LINE>// Updateable<NEW_LINE>if (!Util.isEmpty(customBrowse.getIsUpdateable())) {<NEW_LINE>browse.setIsUpdateable(customBrowse.getIsUpdateable().equals("Y"));<NEW_LINE>}<NEW_LINE>// Deleteable<NEW_LINE>if (!Util.isEmpty(customBrowse.getIsDeleteable())) {<NEW_LINE>browse.setIsDeleteable(customBrowse.getIsDeleteable().equals("Y"));<NEW_LINE>}<NEW_LINE>// Is Selected by Default<NEW_LINE>if (!Util.isEmpty(customBrowse.getIsSelectedByDefault())) {<NEW_LINE>browse.setIsSelectedByDefault(customBrowse.getIsSelectedByDefault().equals("Y"));<NEW_LINE>}<NEW_LINE>// Is Collapsible by Default<NEW_LINE>if (!Util.isEmpty(customBrowse.getIsCollapsibleByDefault())) {<NEW_LINE>browse.setIsCollapsibleByDefault(customBrowse.getIsCollapsibleByDefault().equals("Y"));<NEW_LINE>}<NEW_LINE>// Is Executed by Default<NEW_LINE>if (!Util.isEmpty(customBrowse.getIsExecutedQueryByDefault())) {<NEW_LINE>browse.setIsExecutedQueryByDefault(customBrowse.getIsExecutedQueryByDefault().equals("Y"));<NEW_LINE>}<NEW_LINE>// Show Total<NEW_LINE>if (!Util.isEmpty(customBrowse.getIsShowTotal())) {<NEW_LINE>browse.setIsShowTotal(customBrowse.getIsShowTotal().equals("Y"));<NEW_LINE>}<NEW_LINE>}
get_Translation(I_AD_Browse.COLUMNNAME_Help, language);
446,086
private void updateColoredCursor() {<NEW_LINE>if (coloredCursor != null && !coloredCursor.isDisposed()) {<NEW_LINE>coloredCursor.dispose();<NEW_LINE>}<NEW_LINE>ImageData cursorImageData = IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.ICON_FORMAT_PAINTER).getImageData(ImageFactory.getLogicalDeviceZoom());<NEW_LINE>if (pf.getCursorColor() != null) {<NEW_LINE>PaletteData pData = cursorImageData.palette;<NEW_LINE>int whitePixel = pData.getPixel(new RGB(255, 255, 255));<NEW_LINE>int fillColor = pData.<MASK><NEW_LINE>for (int i = 0; i < cursorImageData.width; i++) {<NEW_LINE>for (int j = 0; j < cursorImageData.height; j++) {<NEW_LINE>if (cursorImageData.getPixel(i, j) == whitePixel) {<NEW_LINE>cursorImageData.setPixel(i, j, fillColor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>coloredCursor = new Cursor(null, cursorImageData, 0, cursorImageData.height - 1);<NEW_LINE>}
getPixel(pf.getCursorColor());
1,739,068
public static Path downloadAndInstallEditor() {<NEW_LINE>// https://github.com/VSCodium/vscodium/releases/download/1.52.1/VSCodium-darwin-x64-1.52.1.zip<NEW_LINE>String version = getLatestVSCodiumVersion();<NEW_LINE>Util.infoMsg("Downloading VSCodium " + version + ". Be patient, this can take several minutes...(Ctrl+C if you want to cancel)");<NEW_LINE>String url = getVSCodiumDownloadURL(version);<NEW_LINE>Util.verboseMsg("Downloading " + url);<NEW_LINE>Path editorDir = getVSCodiumPath();<NEW_LINE>Path editorTmpDir = editorDir.getParent().resolve(editorDir.getFileName().toString() + ".tmp");<NEW_LINE>Path editorOldDir = editorDir.getParent().resolve(editorDir.getFileName().toString() + ".old");<NEW_LINE>Util.deletePath(editorTmpDir, false);<NEW_LINE>Util.deletePath(editorOldDir, false);<NEW_LINE>try {<NEW_LINE>Path jdkPkg = Util.downloadAndCacheFile(url);<NEW_LINE>Util.infoMsg("Installing VSCodium " + version + "...");<NEW_LINE>Util.verboseMsg("Unpacking to " + editorDir.toString());<NEW_LINE>UnpackUtil.unpackEditor(jdkPkg, editorTmpDir);<NEW_LINE>if (Files.isDirectory(editorDir)) {<NEW_LINE>Files.move(editorDir, editorOldDir);<NEW_LINE>}<NEW_LINE>Files.move(editorTmpDir, editorDir);<NEW_LINE>Util.deletePath(editorOldDir, false);<NEW_LINE>return editorDir;<NEW_LINE>} catch (Exception e) {<NEW_LINE>Util.deletePath(editorTmpDir, true);<NEW_LINE>if (!Files.isDirectory(editorDir) && Files.isDirectory(editorOldDir)) {<NEW_LINE>try {<NEW_LINE>Files.move(editorOldDir, editorDir);<NEW_LINE>} catch (IOException ex) {<NEW_LINE>// Ignore<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Util.errorMsg("VSCode editor not possible to download or install.");<NEW_LINE>throw new ExitException(<MASK><NEW_LINE>}<NEW_LINE>}
EXIT_UNEXPECTED_STATE, "Unable to download or install VSCodium version " + version, e);
1,828,730
private void generateSlashHyphenFeatures(String word, String fragSuffix, String wordSuffix, FeatureCollector out) {<NEW_LINE>String[] bits = splitSlashHyphenWordsPattern.split(word);<NEW_LINE>for (String bit : bits) {<NEW_LINE>if (flags.slashHyphenTreatment == SeqClassifierFlags.SlashHyphenEnum.WFRAG) {<NEW_LINE>out.build().append(bit).append(fragSuffix).add();<NEW_LINE>} else if (flags.slashHyphenTreatment == SeqClassifierFlags.SlashHyphenEnum.BOTH) {<NEW_LINE>out.build().append(bit).append(fragSuffix).add();<NEW_LINE>out.build().append(bit).append(wordSuffix).add();<NEW_LINE>} else {<NEW_LINE>// option WORD<NEW_LINE>out.build().append(bit).<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
append(wordSuffix).add();
1,198,784
public void filter() {<NEW_LINE>Predicate<S> oldPredicate = getPredicate();<NEW_LINE>final boolean filterExists = getVisibleLeafColumns().stream().filter(FilteredTableColumn.class::isInstance).map(FilteredTableColumn.class::cast).filter(FilteredTableColumn::isFilterable).noneMatch(f -> f.getPredicate() != null);<NEW_LINE>// update the Predicate property<NEW_LINE>setPredicate(filterExists ? null : new FilteredColumnPredicate(getVisibleLeafColumns()));<NEW_LINE>// fire the onFilter event and check if it is consumed, if so, don't run the filtering<NEW_LINE>FilterEvent<TableView<S>> filterEvent = new FilterEvent<>(<MASK><NEW_LINE>fireEvent(filterEvent);<NEW_LINE>if (filterEvent.isConsumed()) {<NEW_LINE>setPredicate(oldPredicate);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// get the filter policy and run it<NEW_LINE>Callback<TableView<S>, Boolean> filterPolicy = getFilterPolicy();<NEW_LINE>if (filterPolicy == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean success = filterPolicy.call(this);<NEW_LINE>if (!success) {<NEW_LINE>setPredicate(oldPredicate);<NEW_LINE>}<NEW_LINE>}
FilteredTableView.this, FilteredTableView.this);
1,655,286
private // SIB0115d.comms start<NEW_LINE>void processAsyncSessionStoppedCallback(CommsByteBuffer buffer, Conversation conversation) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "processAsyncSessionStoppedCallback", new Object[] { buffer, conversation });<NEW_LINE>final short connectionObjectId = buffer.getShort();<NEW_LINE>final short clientSessionId = buffer.getShort();<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "connectionObjectId=" + connectionObjectId);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "clientSessionId=" + clientSessionId);<NEW_LINE>// Obtain the proxy queue group<NEW_LINE>final ClientConversationState convState = <MASK><NEW_LINE>final ProxyQueueConversationGroup pqcg = convState.getProxyQueueConversationGroup();<NEW_LINE>if (pqcg == null) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "ProxyQueueConversationGroup=null");<NEW_LINE>SIErrorException e = new SIErrorException(nls.getFormattedMessage("NULL_PROXY_QUEUE_CONV_GROUP_CWSICO8020", new Object[] {}, null));<NEW_LINE>FFDCFilter.processException(e, CLASS_NAME + ".processAsyncSessionStoppedCallback", CommsConstants.PROXYRECEIVELISTENER_SESSION_STOPPED_01, this);<NEW_LINE>SibTr.error(tc, "NULL_PROXY_QUEUE_CONV_GROUP_CWSICO8020", e);<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>// Obtain the required proxy queue from the proxy queue group and ensure its of the right class (ie not read ahead)<NEW_LINE>final ProxyQueue proxyQueue = pqcg.find(clientSessionId);<NEW_LINE>if (proxyQueue instanceof AsynchConsumerProxyQueue) {<NEW_LINE>final ConsumerSessionProxy consumerSessionProxy = ((AsynchConsumerProxyQueue) proxyQueue).getConsumerSessionProxy();<NEW_LINE>// Drive the ConsumerSessionProxy.stoppableConsumerSessionStopped method on a different thread.<NEW_LINE>ClientAsynchEventThreadPool.getInstance().dispatchStoppableConsumerSessionStopped(consumerSessionProxy);<NEW_LINE>} else {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "proxyQueue not an instance of AsynchConsumerProxyQueue is an instance of " + proxyQueue.getClass().getName());<NEW_LINE>SIErrorException e = new SIErrorException(nls.getFormattedMessage("WRONG_CLASS_CWSICO8021", new Object[] { proxyQueue.getClass().getName() }, null));<NEW_LINE>FFDCFilter.processException(e, CLASS_NAME + ".processAsyncSessionStoppedCallback", CommsConstants.PROXYRECEIVELISTENER_SESSION_STOPPED_02, this);<NEW_LINE>SibTr.error(tc, "WRONG_CLASS_CWSICO8021", e);<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(this, tc, "processAsyncSessionStoppedCallback");<NEW_LINE>}
(ClientConversationState) conversation.getAttachment();
9,506
private Optional<List<Object[]>> onJdbc(String statement) {<NEW_LINE>String datasourceDs = null;<NEW_LINE>if (MetaClusterCurrent.exist(ReplicaSelectorManager.class)) {<NEW_LINE>ReplicaSelectorManager replicaSelectorManager = MetaClusterCurrent.wrapper(ReplicaSelectorManager.class);<NEW_LINE>datasourceDs = replicaSelectorManager.getDatasourceNameByReplicaName(MetadataManager.getPrototype(), true, null);<NEW_LINE>} else {<NEW_LINE>datasourceDs = "prototypeDs";<NEW_LINE>}<NEW_LINE>JdbcConnectionManager jdbcConnectionManager = <MASK><NEW_LINE>Map<String, JdbcDataSource> datasourceInfo = jdbcConnectionManager.getDatasourceInfo();<NEW_LINE>if (datasourceInfo.containsKey(datasourceDs)) {<NEW_LINE>datasourceDs = null;<NEW_LINE>} else {<NEW_LINE>List<DatasourceConfig> configAsList = jdbcConnectionManager.getConfigAsList();<NEW_LINE>if (!configAsList.isEmpty()) {<NEW_LINE>datasourceDs = configAsList.get(0).getName();<NEW_LINE>} else {<NEW_LINE>datasourceDs = null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (datasourceDs == null) {<NEW_LINE>datasourceDs = datasourceInfo.values().stream().filter(i -> i.isMySQLType()).map(i -> i.getName()).findFirst().orElse(null);<NEW_LINE>}<NEW_LINE>if (datasourceDs == null) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>try (DefaultConnection connection = jdbcConnectionManager.getConnection(datasourceDs)) {<NEW_LINE>Connection rawConnection = connection.getRawConnection();<NEW_LINE>Statement jdbcStatement1 = rawConnection.createStatement();<NEW_LINE>ResultSet resultSet = jdbcStatement1.executeQuery(statement);<NEW_LINE>int columnCount = resultSet.getMetaData().getColumnCount();<NEW_LINE>List<Object[]> res = new ArrayList<>();<NEW_LINE>while (resultSet.next()) {<NEW_LINE>Object[] objects = new Object[columnCount];<NEW_LINE>for (int i = 0; i < columnCount; i++) {<NEW_LINE>objects[i] = resultSet.getObject(i + 1);<NEW_LINE>}<NEW_LINE>res.add(objects);<NEW_LINE>}<NEW_LINE>return Optional.of(res);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.warn("", e);<NEW_LINE>}<NEW_LINE>return Optional.empty();<NEW_LINE>}
MetaClusterCurrent.wrapper(JdbcConnectionManager.class);
1,093,078
private static void runAssertionSingleRowFunc(RegressionEnvironment env, RegressionPath path, Object[] rowValues) {<NEW_LINE>// try join passing of params<NEW_LINE>String eplJoin = "@name('s0') select " + InfraTableSelect.class.getName() + ".myServiceEventBean(mt) as c0, " + InfraTableSelect.class.getName() + ".myServiceObjectArray(mt) as c1 " + "from SupportBean_S2, MyTable as mt";<NEW_LINE>env.compileDeploy(eplJoin, path).addListener("s0");<NEW_LINE>env.<MASK><NEW_LINE>env.assertEventNew("s0", result -> {<NEW_LINE>assertEventUnd(result.get("c0"), rowValues);<NEW_LINE>assertEventUnd(result.get("c1"), rowValues);<NEW_LINE>});<NEW_LINE>env.undeployModuleContaining("s0");<NEW_LINE>// try subquery<NEW_LINE>String eplSubquery = "@name('s0') select (select pluginServiceEventBean(mt) from MyTable as mt) as c0 " + "from SupportBean_S2";<NEW_LINE>env.compileDeploy(eplSubquery, path).addListener("s0");<NEW_LINE>env.sendEventBean(new SupportBean_S2(0));<NEW_LINE>env.assertEventNew("s0", event -> assertEventUnd(event.get("c0"), rowValues));<NEW_LINE>env.undeployModuleContaining("s0");<NEW_LINE>}
sendEventBean(new SupportBean_S2(0));
56,283
static <Request extends AbstractBulkByScrollRequest<Request>> void initTaskState(BulkByScrollTask task, Request request, Client client, ActionListener<Void> listener) {<NEW_LINE><MASK><NEW_LINE>if (configuredSlices == AbstractBulkByScrollRequest.AUTO_SLICES) {<NEW_LINE>ClusterSearchShardsRequest shardsRequest = new ClusterSearchShardsRequest();<NEW_LINE>shardsRequest.indices(request.getSearchRequest().indices());<NEW_LINE>client.admin().cluster().searchShards(shardsRequest, new ActionListener<ClusterSearchShardsResponse>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onResponse(ClusterSearchShardsResponse response) {<NEW_LINE>setWorkerCount(request, task, countSlicesBasedOnShards(response));<NEW_LINE>listener.onResponse(null);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFailure(Exception e) {<NEW_LINE>listener.onFailure(e);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>setWorkerCount(request, task, configuredSlices);<NEW_LINE>listener.onResponse(null);<NEW_LINE>}<NEW_LINE>}
int configuredSlices = request.getSlices();
1,333,999
public <Req, Resp> BlockingStreamingClientCall<Req, Resp> newBlockingStreamingCall(final MethodDescriptor<Req, Resp> methodDescriptor, final BufferDecoderGroup decompressors) {<NEW_LINE>GrpcStreamingSerializer<Req> serializerIdentity = streamingSerializer(methodDescriptor);<NEW_LINE>GrpcStreamingDeserializer<Resp> deserializerIdentity = streamingDeserializer(methodDescriptor);<NEW_LINE>List<GrpcStreamingDeserializer<Resp>> deserializers = streamingDeserializers(methodDescriptor, decompressors.decoders());<NEW_LINE>CharSequence acceptedEncoding = decompressors.advertisedMessageEncoding();<NEW_LINE>CharSequence requestContentType = grpcContentType(methodDescriptor.requestDescriptor().serializerDescriptor().contentType());<NEW_LINE>CharSequence responseContentType = grpcContentType(methodDescriptor.responseDescriptor().serializerDescriptor().contentType());<NEW_LINE>final BlockingStreamingHttpClient client = streamingHttpClient.asBlockingStreamingClient();<NEW_LINE>return (metadata, request) -> {<NEW_LINE>Duration timeout = timeoutForRequest(metadata.timeout());<NEW_LINE>GrpcStreamingSerializer<Req> serializer = streamingSerializer(methodDescriptor, <MASK><NEW_LINE>String mdPath = methodDescriptor.httpPath();<NEW_LINE>BlockingStreamingHttpRequest httpRequest = client.post(UNKNOWN_PATH.equals(mdPath) ? metadata.path() : mdPath);<NEW_LINE>initRequest(httpRequest, requestContentType, serializer.messageEncoding(), acceptedEncoding, timeout);<NEW_LINE>httpRequest.payloadBody(serializer.serialize(request, streamingHttpClient.executionContext().bufferAllocator()));<NEW_LINE>try {<NEW_LINE>assignStrategy(httpRequest, metadata);<NEW_LINE>final BlockingStreamingHttpResponse response = client.request(httpRequest);<NEW_LINE>return validateResponseAndGetPayload(response.toStreamingResponse(), responseContentType, client.executionContext().bufferAllocator(), readGrpcMessageEncodingRaw(response.headers(), deserializerIdentity, deserializers, GrpcStreamingDeserializer::messageEncoding)).toIterable();<NEW_LINE>} catch (Throwable cause) {<NEW_LINE>throw toGrpcException(cause);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
serializerIdentity, metadata.requestCompressor());
234,370
public static QueryWorksByWorkspaceResponse unmarshall(QueryWorksByWorkspaceResponse queryWorksByWorkspaceResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryWorksByWorkspaceResponse.setRequestId(_ctx.stringValue("QueryWorksByWorkspaceResponse.RequestId"));<NEW_LINE>queryWorksByWorkspaceResponse.setSuccess(_ctx.booleanValue("QueryWorksByWorkspaceResponse.Success"));<NEW_LINE>Result result = new Result();<NEW_LINE>result.setTotalPages(_ctx.integerValue("QueryWorksByWorkspaceResponse.Result.TotalPages"));<NEW_LINE>result.setPageNum(_ctx.integerValue("QueryWorksByWorkspaceResponse.Result.PageNum"));<NEW_LINE>result.setPageSize(_ctx.integerValue("QueryWorksByWorkspaceResponse.Result.PageSize"));<NEW_LINE>result.setTotalNum(_ctx.integerValue("QueryWorksByWorkspaceResponse.Result.TotalNum"));<NEW_LINE>List<DataItem> data = new ArrayList<DataItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QueryWorksByWorkspaceResponse.Result.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setStatus(_ctx.integerValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].Status"));<NEW_LINE>dataItem.setGmtModify(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].GmtModify"));<NEW_LINE>dataItem.setAuth3rdFlag(_ctx.integerValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].Auth3rdFlag"));<NEW_LINE>dataItem.setWorksId(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].WorksId"));<NEW_LINE>dataItem.setWorkType(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].WorkType"));<NEW_LINE>dataItem.setOwnerName(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].OwnerName"));<NEW_LINE>dataItem.setWorkspaceName(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].WorkspaceName"));<NEW_LINE>dataItem.setOwnerId(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].OwnerId"));<NEW_LINE>dataItem.setModifyName(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].ModifyName"));<NEW_LINE>dataItem.setWorkspaceId(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].WorkspaceId"));<NEW_LINE>dataItem.setSecurityLevel(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].SecurityLevel"));<NEW_LINE>dataItem.setDescription(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].Description"));<NEW_LINE>dataItem.setWorkName(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].WorkName"));<NEW_LINE>dataItem.setGmtCreate(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].GmtCreate"));<NEW_LINE>Directory directory = new Directory();<NEW_LINE>directory.setPathId(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].Directory.PathId"));<NEW_LINE>directory.setPathName(_ctx.stringValue<MASK><NEW_LINE>directory.setName(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].Directory.Name"));<NEW_LINE>directory.setId(_ctx.stringValue("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].Directory.Id"));<NEW_LINE>dataItem.setDirectory(directory);<NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>result.setData(data);<NEW_LINE>queryWorksByWorkspaceResponse.setResult(result);<NEW_LINE>return queryWorksByWorkspaceResponse;<NEW_LINE>}
("QueryWorksByWorkspaceResponse.Result.Data[" + i + "].Directory.PathName"));
991,595
public void message(final ChatRoomIrcImpl chatroom, final String message) throws OperationFailedException {<NEW_LINE>if (!this.connectionState.isConnected()) {<NEW_LINE>throw new IllegalStateException("Not connected to an IRC server.");<NEW_LINE>}<NEW_LINE>final String target = chatroom.getIdentifier();<NEW_LINE>// message format as forwarded by IRC server to clients:<NEW_LINE>// :<user> PRIVMSG <nick> :<message><NEW_LINE>final int maxMsgSize = calculateMaximumMessageSize(0, target);<NEW_LINE>if (maxMsgSize < message.length()) {<NEW_LINE>LOGGER.warn("Message for " + target + " is too large. At best you can send the message up to: " + message.substring(0, maxMsgSize));<NEW_LINE>throw new OperationFailedException("Message is too large for this IRC server.", OperationFailedException.ILLEGAL_ARGUMENT);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>this.irc.message(target, message);<NEW_LINE>LOGGER.trace("Message delivered to server successfully.");<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>LOGGER.trace("Failed to deliver message: " + <MASK><NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
1,437,811
static boolean equalsImpl(List<?> thisList, @CheckForNull Object other) {<NEW_LINE>if (other == checkNotNull(thisList)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (!(other instanceof List)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>List<?> otherList <MASK><NEW_LINE>int size = thisList.size();<NEW_LINE>if (size != otherList.size()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (thisList instanceof RandomAccess && otherList instanceof RandomAccess) {<NEW_LINE>// avoid allocation and use the faster loop<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>if (!Objects.equal(thisList.get(i), otherList.get(i))) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>return Iterators.elementsEqual(thisList.iterator(), otherList.iterator());<NEW_LINE>}<NEW_LINE>}
= (List<?>) other;
611,862
private static void startLdapServer() throws Exception {<NEW_LINE>DirectoryServiceFactory dsf = new DefaultDirectoryServiceFactory();<NEW_LINE>dsf.init(DIRECTORY_NAME);<NEW_LINE>directoryService = dsf.getDirectoryService();<NEW_LINE>// Required for Kerberos<NEW_LINE>directoryService.addLast(new KeyDerivationInterceptor());<NEW_LINE>directoryService.getChangeLog().setEnabled(false);<NEW_LINE>// directoryService.setAllowAnonymousAccess(true);<NEW_LINE>SchemaManager schemaManager = directoryService.getSchemaManager();<NEW_LINE>createPartition(dsf, schemaManager, "example", BASE_DN);<NEW_LINE>directoryService.startup();<NEW_LINE>LDAP_PORT = getOpenPort(-1);<NEW_LINE>ldapServer = new LdapServer();<NEW_LINE>ldapServer.setServiceName("DefaultLDAP");<NEW_LINE>Transport ldap = new TcpTransport(<MASK><NEW_LINE>ldapServer.addTransports(ldap);<NEW_LINE>ldapServer.setDirectoryService(directoryService);<NEW_LINE>ldapServer.setSearchBaseDn(BASE_DN);<NEW_LINE>ldapServer.setSaslHost(ldapServerHostName);<NEW_LINE>ldapServer.setSaslPrincipal(ldapPrincipal);<NEW_LINE>Map<String, MechanismHandler> saslMechanismHandlers = new HashMap<String, MechanismHandler>();<NEW_LINE>GssapiMechanismHandler gssapiMechanismHandler = new GssapiMechanismHandler();<NEW_LINE>saslMechanismHandlers.put(SupportedSaslMechanisms.GSSAPI, gssapiMechanismHandler);<NEW_LINE>ldapServer.setSaslMechanismHandlers(saslMechanismHandlers);<NEW_LINE>ldapServer.start();<NEW_LINE>}
ldapServerHostName, LDAP_PORT, 3, 5);
632,082
protected HttpResponse doSendRequest(final HttpRequest request, final HttpClientConnection conn, final HttpContext context) throws IOException, HttpException {<NEW_LINE>synchronized (listener) {<NEW_LINE>listener.log(TranscriptListener.Type.request, request.getRequestLine().toString());<NEW_LINE>for (Header header : request.getAllHeaders()) {<NEW_LINE>switch(header.getName()) {<NEW_LINE>case HttpHeaders.AUTHORIZATION:<NEW_LINE>case HttpHeaders.PROXY_AUTHORIZATION:<NEW_LINE>case "X-Auth-Key":<NEW_LINE>case "X-Auth-Token":<NEW_LINE>case "X-FilesAPI-Key":<NEW_LINE>listener.log(TranscriptListener.Type.request, String.format("%s: %s", header.getName(), StringUtils.repeat("*", Integer.min(8, StringUtils.length(header.<MASK><NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>listener.log(TranscriptListener.Type.request, header.toString());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final HttpResponse response = super.doSendRequest(request, conn, context);<NEW_LINE>if (null != response) {<NEW_LINE>// response received as part of an expect-continue handshake<NEW_LINE>this.log(response);<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
getValue())))));
1,842,992
private static String[] makeRuleNames() {<NEW_LINE>return new String[] { "NumericLiteral", "ExponentPart", "ExponentIndicator", "SignedInteger", "Digits", "Digit", "Sign", "BooleanLiteral", "NULL", "LBRACE", "RBRACE", "PLUS", "AND", "EQ", "LT", "COLON", "LBRACK", "LPAREN", "MINUS", "OR", "NEQ", "GT", "QUESTION", "RBRACK", "RPAREN", "MUL", "NOT", "LEQ", "ASSIGN", "DOT", "DIV", "GEQ", "ARROW", "COMMA", "MOD", "ELLIPSIS", "TILDE", "QUOTE", "FOR", "IF", "IN", "Identifier", "LetterOrDigit", "Letter", "WS", "COMMENT", "LINE_COMMENT", "EscapeSequence", "HexDigit", <MASK><NEW_LINE>}
"TEMPLATE_INTERPOLATION_START", "QuotedString", "QuotedStringChar", "END_QUOTE" };
599,227
public InternalAggregation reduce(InternalAggregation aggregation, ReduceContext reduceContext) {<NEW_LINE>InternalMultiBucketAggregation<? extends InternalMultiBucketAggregation, ? extends InternalMultiBucketAggregation.InternalBucket> histo = (InternalMultiBucketAggregation<? extends InternalMultiBucketAggregation, ? extends InternalMultiBucketAggregation.InternalBucket>) aggregation;<NEW_LINE>List<? extends InternalMultiBucketAggregation.InternalBucket> buckets = histo.getBuckets();<NEW_LINE>HistogramFactory factory = (HistogramFactory) histo;<NEW_LINE>List<Bucket> newBuckets = new ArrayList<>();<NEW_LINE>EvictingQueue<Double> lagWindow = new EvictingQueue<>(lag);<NEW_LINE>int counter = 0;<NEW_LINE>for (InternalMultiBucketAggregation.InternalBucket bucket : buckets) {<NEW_LINE>Double thisBucketValue = resolveBucketValue(histo, bucket, bucketsPaths()[0], gapPolicy);<NEW_LINE>Bucket newBucket = bucket;<NEW_LINE>counter += 1;<NEW_LINE>// Still under the initial lag period, add nothing and move on<NEW_LINE>Double lagValue;<NEW_LINE>if (counter <= lag) {<NEW_LINE>lagValue = Double.NaN;<NEW_LINE>} else {<NEW_LINE>// Peek here, because we rely on add'ing to always move the window<NEW_LINE>lagValue = lagWindow.peek();<NEW_LINE>}<NEW_LINE>// Normalize null's to NaN<NEW_LINE>if (thisBucketValue == null) {<NEW_LINE>thisBucketValue = Double.NaN;<NEW_LINE>}<NEW_LINE>// Both have values, calculate diff and replace the "empty" bucket<NEW_LINE>if (!Double.isNaN(thisBucketValue) && !Double.isNaN(lagValue)) {<NEW_LINE>double diff = thisBucketValue - lagValue;<NEW_LINE>List<InternalAggregation> aggs = StreamSupport.stream(bucket.getAggregations().spliterator(), false).map((p) -> (InternalAggregation) p).collect(Collectors.toList());<NEW_LINE>aggs.add(new InternalSimpleValue(name(), diff, formatter, new ArrayList<>(), metaData()));<NEW_LINE>newBucket = factory.createBucket(factory.getKey(bucket), bucket.getDocCount(<MASK><NEW_LINE>}<NEW_LINE>newBuckets.add(newBucket);<NEW_LINE>lagWindow.add(thisBucketValue);<NEW_LINE>}<NEW_LINE>return factory.createAggregation(newBuckets);<NEW_LINE>}
), new InternalAggregations(aggs));
914,276
final DescribeJobResult executeDescribeJob(DescribeJobRequest describeJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeJobRequest> request = null;<NEW_LINE>Response<DescribeJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeJobRequestMarshaller().marshall(super.beforeMarshalling(describeJobRequest));<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, "S3 Control");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeJob");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>URI endpointTraitHost = null;<NEW_LINE>if (!clientConfiguration.isDisableHostPrefixInjection()) {<NEW_LINE>ValidationUtils.assertStringNotEmpty(describeJobRequest.getAccountId(), "AccountId");<NEW_LINE>HostnameValidator.validateHostnameCompliant(describeJobRequest.getAccountId(), "AccountId", "describeJobRequest");<NEW_LINE>String hostPrefix = "{AccountId}.";<NEW_LINE>String resolvedHostPrefix = String.format("%s.", describeJobRequest.getAccountId());<NEW_LINE>endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeJobResult> responseHandler = new com.amazonaws.services.s3control.internal.S3ControlStaxResponseHandler<DescribeJobResult>(new DescribeJobResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
responseHandler, executionContext, null, endpointTraitHost);
1,512,449
public void commitNicForMigration(final VirtualMachineProfile src, final VirtualMachineProfile dst) {<NEW_LINE>for (final NicProfile nicSrc : src.getNics()) {<NEW_LINE>final NetworkVO network = _networksDao.findById(nicSrc.getNetworkId());<NEW_LINE>final NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName());<NEW_LINE>final NicProfile nicDst = findNicProfileById(dst, nicSrc.getId());<NEW_LINE>final ReservationContext src_context = new ReservationContextImpl(nicSrc.getReservationId(), null, null);<NEW_LINE>final ReservationContext dst_context = new ReservationContextImpl(nicDst.getReservationId(), null, null);<NEW_LINE>if (guru instanceof NetworkMigrationResponder) {<NEW_LINE>((NetworkMigrationResponder) guru).commitMigration(nicSrc, network, src, src_context, dst_context);<NEW_LINE>}<NEW_LINE>if (network.getGuestType() == Network.GuestType.L2 && src.getType() == VirtualMachine.Type.User) {<NEW_LINE>_userVmMgr.setupVmForPvlan(true, src.getVirtualMachine().getHostId(), nicSrc);<NEW_LINE>}<NEW_LINE>final List<Provider> providersToImplement = getNetworkProviders(network.getId());<NEW_LINE>for (final NetworkElement element : networkElements) {<NEW_LINE>if (providersToImplement.contains(element.getProvider())) {<NEW_LINE>if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) {<NEW_LINE>throw new CloudRuntimeException("Service provider " + element.getProvider().getName() + " either doesn't exist or is not enabled in physical network id: " + network.getPhysicalNetworkId());<NEW_LINE>}<NEW_LINE>if (element instanceof NetworkMigrationResponder) {<NEW_LINE>((NetworkMigrationResponder) element).commitMigration(nicSrc, network, src, src_context, dst_context);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// update the reservation id<NEW_LINE>final NicVO nicVo = _nicDao.findById(nicDst.getId());<NEW_LINE>nicVo.<MASK><NEW_LINE>_nicDao.persist(nicVo);<NEW_LINE>}<NEW_LINE>}
setReservationId(nicDst.getReservationId());
294,226
public void draw(Graphics g, int trackPosition) {<NEW_LINE>// only draw spinners shortly before start time<NEW_LINE>int timeDiff = hitObject.getTime() - trackPosition;<NEW_LINE>final int fadeInTime = game.getFadeInTime();<NEW_LINE>if (timeDiff - fadeInTime > 0)<NEW_LINE>return;<NEW_LINE>boolean spinnerComplete = (rotations >= rotationsNeeded);<NEW_LINE>float alpha = Utils.clamp(1 - (float) timeDiff / fadeInTime, 0f, 1f);<NEW_LINE>// darken screen<NEW_LINE>if (Options.getSkin().isSpinnerFadePlayfield()) {<NEW_LINE>float oldAlpha = Colors.BLACK_ALPHA.a;<NEW_LINE>if (timeDiff > 0)<NEW_LINE>Colors.BLACK_ALPHA.a *= alpha;<NEW_LINE>g.setColor(Colors.BLACK_ALPHA);<NEW_LINE>g.fillRect(0, 0, width, height);<NEW_LINE>Colors.BLACK_ALPHA.a = oldAlpha;<NEW_LINE>}<NEW_LINE>// rpm<NEW_LINE>Image rpmImg = GameImage.SPINNER_RPM.getImage();<NEW_LINE>rpmImg.setAlpha(alpha);<NEW_LINE>rpmImg.drawCentered(width / 2f, height - rpmImg.getHeight() / 2f);<NEW_LINE>if (timeDiff < 0)<NEW_LINE>data.drawSymbolString(Integer.toString(drawnRPM), (width + rpmImg.getWidth() * 0.95f) / 2f, height - data.getScoreSymbolImage('0').getHeight() * 1.025f, 1f, 1f, true);<NEW_LINE>// spinner meter (subimage)<NEW_LINE>Image spinnerMetre = GameImage.SPINNER_METRE.getImage();<NEW_LINE>int spinnerMetreY = (spinnerComplete) ? 0 : (int) (spinnerMetre.getHeight() * (1 - (rotations / rotationsNeeded)));<NEW_LINE>Image spinnerMetreSub = spinnerMetre.getSubImage(0, spinnerMetreY, spinnerMetre.getWidth(), spinnerMetre.getHeight() - spinnerMetreY);<NEW_LINE>spinnerMetreSub.setAlpha(alpha);<NEW_LINE>spinnerMetreSub.draw(0, height - spinnerMetreSub.getHeight());<NEW_LINE>// main spinner elements<NEW_LINE>GameImage.SPINNER_CIRCLE.getImage().setAlpha(alpha);<NEW_LINE>GameImage.SPINNER_CIRCLE.getImage().setRotation(drawRotation * 360f);<NEW_LINE>GameImage.SPINNER_CIRCLE.getImage().drawCentered(width / 2, height / 2);<NEW_LINE>if (!GameMod.HIDDEN.isActive()) {<NEW_LINE>float approachScale = 1 - Utils.clamp(((float) timeDiff / (hitObject.getTime() - hitObject.getEndTime())), 0f, 1f);<NEW_LINE>Image approachCircleScaled = GameImage.SPINNER_APPROACHCIRCLE.getImage().getScaledCopy(approachScale);<NEW_LINE>approachCircleScaled.setAlpha(alpha);<NEW_LINE>approachCircleScaled.drawCentered(width / 2, height / 2);<NEW_LINE>}<NEW_LINE>GameImage.SPINNER_SPIN.getImage().setAlpha(alpha);<NEW_LINE>GameImage.SPINNER_SPIN.getImage().drawCentered(width / 2, height * 3 / 4);<NEW_LINE>if (spinnerComplete) {<NEW_LINE>GameImage.SPINNER_CLEAR.getImage().drawCentered(<MASK><NEW_LINE>int extraRotations = (int) (rotations - rotationsNeeded);<NEW_LINE>if (extraRotations > 0)<NEW_LINE>data.drawSymbolNumber(extraRotations * 1000, width / 2, height * 2 / 3, 1f, 1f);<NEW_LINE>}<NEW_LINE>}
width / 2, height / 4);
414,405
public void execute() throws AnalysisException {<NEW_LINE>if (groupExpression.hasApplied(rule)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>GroupExpressionMatching groupExpressionMatching = new GroupExpressionMatching(rule.getPattern(), groupExpression);<NEW_LINE>for (Plan plan : groupExpressionMatching) {<NEW_LINE>context.onInvokeRule(rule.getRuleType());<NEW_LINE>List<Plan> newPlans = rule.transform(plan, context.getCascadesContext());<NEW_LINE>for (Plan newPlan : newPlans) {<NEW_LINE>CopyInResult result = context.getCascadesContext().getMemo().copyIn(newPlan, groupExpression.getOwnerGroup(), false);<NEW_LINE>if (!result.generateNewExpression) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>GroupExpression newGroupExpression = result.correspondingExpression;<NEW_LINE>if (newPlan instanceof LogicalPlan) {<NEW_LINE>if (exploredOnly) {<NEW_LINE>pushJob(<MASK><NEW_LINE>pushJob(new DeriveStatsJob(newGroupExpression, context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>pushJob(new OptimizeGroupExpressionJob(newGroupExpression, context));<NEW_LINE>pushJob(new DeriveStatsJob(newGroupExpression, context));<NEW_LINE>} else {<NEW_LINE>pushJob(new CostAndEnforcerJob(newGroupExpression, context));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>groupExpression.setApplied(rule);<NEW_LINE>}
new ExploreGroupExpressionJob(newGroupExpression, context));
956,267
public void updateUI() {<NEW_LINE>removeAllViews();<NEW_LINE>LayoutInflater inflater = LayoutInflater.from(getContext());<NEW_LINE>// Inflate this data binding layout<NEW_LINE>mBinding = DataBindingUtil.inflate(inflater, R.layout.downloads, this, true);<NEW_LINE>mBinding.setLifecycleOwner((VRBrowserActivity) getContext());<NEW_LINE>mBinding.setCallback(mDownloadsCallback);<NEW_LINE>mBinding.setDownloadsViewModel(mViewModel);<NEW_LINE>mDownloadsAdapter = new DownloadsAdapter(mDownloadItemCallback, getContext());<NEW_LINE>mBinding.downloadsList.setAdapter(mDownloadsAdapter);<NEW_LINE>mBinding.downloadsList.setOnTouchListener((v, event) -> {<NEW_LINE>v.requestFocusFromTouch();<NEW_LINE>return false;<NEW_LINE>});<NEW_LINE>mBinding.downloadsList.addOnScrollListener(mScrollListener);<NEW_LINE>mBinding.downloadsList.setHasFixedSize(true);<NEW_LINE>mBinding.downloadsList.setItemViewCacheSize(20);<NEW_LINE>mBinding.downloadsList.setDrawingCacheEnabled(true);<NEW_LINE>mBinding.<MASK><NEW_LINE>mViewModel.setIsEmpty(true);<NEW_LINE>mViewModel.setIsLoading(true);<NEW_LINE>mViewModel.setIsNarrow(false);<NEW_LINE>onDownloadsUpdate(mDownloadsManager.getDownloads());<NEW_LINE>setOnTouchListener((v, event) -> {<NEW_LINE>v.requestFocusFromTouch();<NEW_LINE>return false;<NEW_LINE>});<NEW_LINE>}
downloadsList.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
1,558,168
private void parseAsrtBox(byte[] asrt, int pos) {<NEW_LINE>System.out.println("parsing asrt");<NEW_LINE>readByte<MASK><NEW_LINE>readInt24(asrt, pos + 1);<NEW_LINE>int qualityEntryCount = readByte(asrt, pos + 4);<NEW_LINE>segTable.clear();<NEW_LINE>pos += 5;<NEW_LINE>BufferPointer bPtr = new BufferPointer();<NEW_LINE>for (int i = 0; i < qualityEntryCount; i++) {<NEW_LINE>bPtr.setBuf(asrt);<NEW_LINE>bPtr.setPos(pos);<NEW_LINE>readString(bPtr);<NEW_LINE>pos = bPtr.getPos();<NEW_LINE>}<NEW_LINE>int segCount = (int) readInt32(asrt, pos);<NEW_LINE>pos += 4;<NEW_LINE>System.out.println("segcount: " + segCount);<NEW_LINE>for (int i = 0; i < segCount; i++) {<NEW_LINE>int firstSegment = (int) readInt32(asrt, pos);<NEW_LINE>Segment segEntry = new Segment();<NEW_LINE>segEntry.firstSegment = firstSegment;<NEW_LINE>segEntry.fragmentsPerSegment = (int) readInt32(asrt, pos + 4);<NEW_LINE>if ((segEntry.fragmentsPerSegment & 0x80000000L) > 0)<NEW_LINE>segEntry.fragmentsPerSegment = 0;<NEW_LINE>pos += 8;<NEW_LINE>segTable.add(segEntry);<NEW_LINE>}<NEW_LINE>}
(asrt, (int) pos);
930,047
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) {<NEW_LINE>if (in.readableBytes() < NUM_HEADER_BYTES) {<NEW_LINE>// Wait for more bytes<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int idx = in.readerIndex();<NEW_LINE>if (match(BINARY_PREFIX, in, idx) || match(TEXT_PREFIX, in, idx)) {<NEW_LINE>// HA proxy protocol header<NEW_LINE>ctx.pipeline().replace(this, NAME, new HAProxyMessageDecoder());<NEW_LINE>ctx.pipeline().addAfter(NAME, "proxyProtocolMessage", new SimpleChannelInboundHandler<HAProxyMessage>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void channelRead0(ChannelHandlerContext ctx, HAProxyMessage msg) {<NEW_LINE>Attribute<ProxyInfo> attrProxy = ctx.channel().attr(ProxyInfo.attributeKey);<NEW_LINE>attrProxy.set(new ProxyInfo(new InetSocketAddress(msg.destinationAddress(), msg.destinationPort()), new InetSocketAddress(msg.sourceAddress(), <MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>ctx.pipeline().remove(this);<NEW_LINE>}<NEW_LINE>}
msg.sourcePort())));
1,748,652
public final void add(long timestamp, EventBean bean) {<NEW_LINE>// Empty window<NEW_LINE>if (window.isEmpty()) {<NEW_LINE>TimeWindowPair pair = new TimeWindowPair(timestamp, bean);<NEW_LINE>window.add(pair);<NEW_LINE>if (reverseIndex != null) {<NEW_LINE>reverseIndex.put(bean, pair);<NEW_LINE>}<NEW_LINE>size = 1;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TimeWindowPair lastPair = window.getLast();<NEW_LINE>// Windows last timestamp matches the one supplied<NEW_LINE>if (lastPair.getTimestamp() == timestamp) {<NEW_LINE>if (lastPair.getEventHolder() instanceof List) {<NEW_LINE>List<EventBean> list = (List<EventBean>) lastPair.getEventHolder();<NEW_LINE>list.add(bean);<NEW_LINE>} else if (lastPair.getEventHolder() == null) {<NEW_LINE>lastPair.setEventHolder(bean);<NEW_LINE>} else {<NEW_LINE>EventBean existing = (EventBean) lastPair.getEventHolder();<NEW_LINE>List<EventBean> list = new ArrayList<EventBean>(4);<NEW_LINE>list.add(existing);<NEW_LINE>list.add(bean);<NEW_LINE>lastPair.setEventHolder(list);<NEW_LINE>}<NEW_LINE>if (reverseIndex != null) {<NEW_LINE>reverseIndex.put(bean, lastPair);<NEW_LINE>}<NEW_LINE>size++;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Append to window<NEW_LINE>TimeWindowPair pair = new TimeWindowPair(timestamp, bean);<NEW_LINE>if (reverseIndex != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>window.add(pair);<NEW_LINE>size++;<NEW_LINE>}
reverseIndex.put(bean, pair);
1,842,463
protected void writeForInLoop(final ForStatement loop) {<NEW_LINE>controller.getAcg().onLineNumber(loop, "visitForLoop");<NEW_LINE>writeStatementLabel(loop);<NEW_LINE><MASK><NEW_LINE>MethodVisitor mv = controller.getMethodVisitor();<NEW_LINE>OperandStack operandStack = controller.getOperandStack();<NEW_LINE>compileStack.pushLoop(loop.getVariableScope(), loop.getStatementLabels());<NEW_LINE>// Identify type of collection<NEW_LINE>TypeChooser typeChooser = controller.getTypeChooser();<NEW_LINE>Expression collectionExpression = loop.getCollectionExpression();<NEW_LINE>ClassNode collectionType = typeChooser.resolveType(collectionExpression, controller.getClassNode());<NEW_LINE>Parameter loopVariable = loop.getVariable();<NEW_LINE>int size = operandStack.getStackLength();<NEW_LINE>if (collectionType.isArray() && loopVariable.getType().equals(collectionType.getComponentType())) {<NEW_LINE>writeOptimizedForEachLoop(compileStack, operandStack, mv, loop, collectionExpression, collectionType, loopVariable);<NEW_LINE>} else if (ENUMERATION_CLASSNODE.equals(collectionType)) {<NEW_LINE>writeEnumerationBasedForEachLoop(loop, collectionExpression, collectionType);<NEW_LINE>} else {<NEW_LINE>writeIteratorBasedForEachLoop(loop, collectionExpression, collectionType);<NEW_LINE>}<NEW_LINE>operandStack.popDownTo(size);<NEW_LINE>compileStack.pop();<NEW_LINE>}
CompileStack compileStack = controller.getCompileStack();
520,371
private static ArrayList<WizardPage<RSConnectPublishInput, RSConnectPublishResult>> createPages(RSConnectPublishInput input) {<NEW_LINE>ArrayList<WizardPage<RSConnectPublishInput, RSConnectPublishResult>> pages = new ArrayList<>();<NEW_LINE>String singleTitle = constants_.publishMultiplePagSingleTitle();<NEW_LINE>String singleSubtitle = constants_.publishMultiplePagSingleSubtitle(input.getSourceRmd().getName());<NEW_LINE>String multipleTitle = constants_.publishMultiplePageTitle();<NEW_LINE>String multipleSubtitle = constants_.publishMultiplePageSubtitle(input.<MASK><NEW_LINE>if (input.isShiny() || !input.hasDocOutput()) {<NEW_LINE>pages.add(new PublishFilesPage(singleTitle, singleSubtitle, new ImageResource2x(RSConnectResources.INSTANCE.publishSingleRmd2x()), input, false, false));<NEW_LINE>pages.add(new PublishFilesPage(multipleTitle, multipleSubtitle, new ImageResource2x(RSConnectResources.INSTANCE.publishMultipleRmd2x()), input, true, false));<NEW_LINE>} else if (input.isStaticDocInput()) {<NEW_LINE>pages.add(new PublishFilesPage(singleTitle, singleSubtitle, new ImageResource2x(RSConnectResources.INSTANCE.publishSingleRmd2x()), input, false, true));<NEW_LINE>pages.add(new PublishFilesPage(multipleTitle, multipleSubtitle, new ImageResource2x(RSConnectResources.INSTANCE.publishMultipleRmd2x()), input, true, true));<NEW_LINE>} else {<NEW_LINE>pages.add(new PublishReportSourcePage(singleTitle, singleSubtitle, new ImageResource2x(RSConnectResources.INSTANCE.publishSingleRmd2x()), input, false));<NEW_LINE>pages.add(new PublishReportSourcePage(multipleTitle, multipleSubtitle, new ImageResource2x(RSConnectResources.INSTANCE.publishMultipleRmd2x()), input, true));<NEW_LINE>}<NEW_LINE>return pages;<NEW_LINE>}
getSourceRmd().getParentPathString());
1,564,139
public com.squareup.okhttp.Call instrumentGetActiveAsync(final ApiCallback<List<Instrument>> callback) throws ApiException {<NEW_LINE>ProgressResponseBody.ProgressListener progressListener = null;<NEW_LINE>ProgressRequestBody.ProgressRequestListener progressRequestListener = null;<NEW_LINE>if (callback != null) {<NEW_LINE>progressListener = new ProgressResponseBody.ProgressListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void update(long bytesRead, long contentLength, boolean done) {<NEW_LINE>callback.onDownloadProgress(bytesRead, contentLength, done);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {<NEW_LINE>callback.onUploadProgress(bytesWritten, contentLength, done);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}<NEW_LINE>com.squareup.okhttp.Call <MASK><NEW_LINE>Type localVarReturnType = new TypeToken<List<Instrument>>() {<NEW_LINE>}.getType();<NEW_LINE>apiClient.executeAsync(call, localVarReturnType, callback);<NEW_LINE>return call;<NEW_LINE>}
call = instrumentGetActiveValidateBeforeCall(progressListener, progressRequestListener);
1,841,534
private void addKeywordsForClassBody(Env env) {<NEW_LINE>String prefix = env.getPrefix();<NEW_LINE>for (String kw : CLASS_BODY_KEYWORDS) {<NEW_LINE>if (Utilities.startsWith(kw, prefix)) {<NEW_LINE>results.add(itemFactory.createKeywordItem(kw<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (isSealedSupported(env)) {<NEW_LINE>if (Utilities.startsWith(SEALED_KEYWORD, prefix)) {<NEW_LINE>results.add(itemFactory.createKeywordItem(SEALED_KEYWORD, SPACE, anchorOffset, false));<NEW_LINE>}<NEW_LINE>if (Utilities.startsWith(NON_SEALED_KEYWORD, prefix)) {<NEW_LINE>results.add(itemFactory.createKeywordItem(NON_SEALED_KEYWORD, SPACE, anchorOffset, false));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (env.getController().getSourceVersion().compareTo(SourceVersion.RELEASE_8) >= 0 && Utilities.startsWith(DEFAULT_KEYWORD, prefix) && env.getController().getTreeUtilities().getPathElementOfKind(Tree.Kind.INTERFACE, env.getPath()) != null) {<NEW_LINE>results.add(itemFactory.createKeywordItem(DEFAULT_KEYWORD, SPACE, anchorOffset, false));<NEW_LINE>}<NEW_LINE>if (isRecordSupported(env) && Utilities.startsWith(RECORD_KEYWORD, prefix)) {<NEW_LINE>results.add(itemFactory.createKeywordItem(RECORD_KEYWORD, SPACE, anchorOffset, false));<NEW_LINE>}<NEW_LINE>addPrimitiveTypeKeywords(env);<NEW_LINE>}
, SPACE, anchorOffset, false));
450,786
private void generatePrimitiveFieldMetaMethod(final StringBuilder sb, final String propertyName, final Token token, final String indent) {<NEW_LINE>final PrimitiveType primitiveType = token.encoding().primitiveType();<NEW_LINE>final String javaTypeName = javaTypeName(primitiveType);<NEW_LINE>final String formattedPropertyName = formatPropertyName(propertyName);<NEW_LINE>final String nullValue = generateLiteral(primitiveType, token.encoding().applicableNullValue().toString());<NEW_LINE>generatePrimitiveFieldMetaMethod(sb, indent, javaTypeName, formattedPropertyName, "Null", nullValue);<NEW_LINE>final String minValue = generateLiteral(primitiveType, token.encoding().applicableMinValue().toString());<NEW_LINE>generatePrimitiveFieldMetaMethod(sb, indent, <MASK><NEW_LINE>final String maxValue = generateLiteral(primitiveType, token.encoding().applicableMaxValue().toString());<NEW_LINE>generatePrimitiveFieldMetaMethod(sb, indent, javaTypeName, formattedPropertyName, "Max", maxValue);<NEW_LINE>}
javaTypeName, formattedPropertyName, "Min", minValue);
635,087
private void loadNode106() {<NEW_LINE>UaMethodNode node = new UaMethodNode(this.context, Identifiers.ServerConfiguration_CertificateGroups_DefaultUserTokenGroup_TrustList_Read, new QualifiedName(0, "Read"), new LocalizedText("en", "Read"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), true, true);<NEW_LINE>node.addReference(new Reference(Identifiers.ServerConfiguration_CertificateGroups_DefaultUserTokenGroup_TrustList_Read, Identifiers.HasProperty, Identifiers.ServerConfiguration_CertificateGroups_DefaultUserTokenGroup_TrustList_Read_InputArguments.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ServerConfiguration_CertificateGroups_DefaultUserTokenGroup_TrustList_Read, Identifiers.HasProperty, Identifiers.ServerConfiguration_CertificateGroups_DefaultUserTokenGroup_TrustList_Read_OutputArguments<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.ServerConfiguration_CertificateGroups_DefaultUserTokenGroup_TrustList_Read, Identifiers.HasComponent, Identifiers.ServerConfiguration_CertificateGroups_DefaultUserTokenGroup_TrustList.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
1,356,666
private // / </remarks><NEW_LINE>BoolExpr commAxiom(Context ctx, FuncDecl f) throws Exception {<NEW_LINE>Sort t = f.getRange();<NEW_LINE>Sort[] dom = f.getDomain();<NEW_LINE>if (dom.length != 2 || !t.equals(dom[0]) || !t.equals(dom[1])) {<NEW_LINE>System.out.println(Integer.toString(dom.length) + " " + dom[0].toString() + " " + dom[1].toString() + " " + t.toString());<NEW_LINE>throw new Exception("function must be binary, and argument types must be equal to return type");<NEW_LINE>}<NEW_LINE>String bench = "(assert (forall (x " + t.getName() + ") (y " + t.getName() + ") (= (" + f.getName() + " x y) (" <MASK><NEW_LINE>return ctx.parseSMTLIB2String(bench, new Symbol[] { t.getName() }, new Sort[] { t }, new Symbol[] { f.getName() }, new FuncDecl[] { f })[0];<NEW_LINE>}
+ f.getName() + " y x))))";
1,554,058
// getC_SalesRegion_ID<NEW_LINE>@Override<NEW_LINE>protected boolean beforeSave(final boolean newRecord) {<NEW_LINE>if (newRecord) {<NEW_LINE>log.debug(toString());<NEW_LINE>//<NEW_LINE>getAD_Org_ID();<NEW_LINE>getC_SalesRegion_ID();<NEW_LINE>// Set Default Account Info<NEW_LINE>if (getM_Product_ID() == 0) {<NEW_LINE>setM_Product_ID(m_acct.getM_Product_ID());<NEW_LINE>}<NEW_LINE>if (getC_LocFrom_ID() == 0) {<NEW_LINE>setC_LocFrom_ID(m_acct.getC_LocFrom_ID());<NEW_LINE>}<NEW_LINE>if (getC_LocTo_ID() == 0) {<NEW_LINE>setC_LocTo_ID(m_acct.getC_LocTo_ID());<NEW_LINE>}<NEW_LINE>if (getC_BPartner_ID() == 0) {<NEW_LINE>setC_BPartner_ID(m_acct.getC_BPartner_ID());<NEW_LINE>}<NEW_LINE>if (getAD_OrgTrx_ID() == 0) {<NEW_LINE>setAD_OrgTrx_ID(m_acct.getAD_OrgTrx_ID());<NEW_LINE>}<NEW_LINE>if (getC_Project_ID() == 0) {<NEW_LINE>setC_Project_ID(m_acct.getC_Project_ID());<NEW_LINE>}<NEW_LINE>if (getC_Campaign_ID() == 0) {<NEW_LINE>setC_Campaign_ID(m_acct.getC_Campaign_ID());<NEW_LINE>}<NEW_LINE>if (getC_Activity_ID() == 0) {<NEW_LINE>setC_Activity_ID(m_acct.getC_Activity_ID());<NEW_LINE>}<NEW_LINE>if (getUser1_ID() == 0) {<NEW_LINE>setUser1_ID(m_acct.getUser1_ID());<NEW_LINE>}<NEW_LINE>if (getUser2_ID() == 0) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>setVATCodeIfApplies();<NEW_LINE>//<NEW_LINE>// Revenue Recognition for AR Invoices<NEW_LINE>if (m_doc.getDocumentType().equals(Doc.DOCTYPE_ARInvoice) && m_docLine != null && m_docLine.getC_RevenueRecognition_ID() > 0) {<NEW_LINE>setAccount_ID(createRevenueRecognition(m_docLine.getC_RevenueRecognition_ID(), m_docLine.get_ID(), toAccountDimension()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
setUser2_ID(m_acct.getUser2_ID());
1,171,478
public String apply(String o) {<NEW_LINE>StringWriter taggedResults = new StringWriter();<NEW_LINE>List<List<HasWord>> sentences;<NEW_LINE>if (tokenize) {<NEW_LINE>sentences = tokenizeText(new StringReader(o), tokenizerFactory);<NEW_LINE>} else {<NEW_LINE>sentences = Generics.newArrayList();<NEW_LINE>sentences.add(SentenceUtils.toWordList(o.split("\\s+")));<NEW_LINE>}<NEW_LINE>// TODO: there is another almost identical block of code elsewhere. Refactor<NEW_LINE>if (config.getNThreads() != 1) {<NEW_LINE>MulticoreWrapper<List<? extends HasWord>, List<? extends HasWord>> wrapper = new MulticoreWrapper<>(config.getNThreads(), <MASK><NEW_LINE>for (List<? extends HasWord> sentence : sentences) {<NEW_LINE>wrapper.put(sentence);<NEW_LINE>while (wrapper.peek()) {<NEW_LINE>List<? extends HasWord> taggedSentence = wrapper.poll();<NEW_LINE>tagger.outputTaggedSentence(taggedSentence, outputLemmas, outputStyle, outputVerbosity, sentNum++, " ", taggedResults);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>wrapper.join();<NEW_LINE>while (wrapper.peek()) {<NEW_LINE>List<? extends HasWord> taggedSentence = wrapper.poll();<NEW_LINE>tagger.outputTaggedSentence(taggedSentence, outputLemmas, outputStyle, outputVerbosity, sentNum++, " ", taggedResults);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// there is only one thread<NEW_LINE>for (List<? extends HasWord> sent : sentences) {<NEW_LINE>// Morphology morpha = (outputLemmas) ? new Morphology() : null;<NEW_LINE>sent = tagger.tagCoreLabelsOrHasWords(sent, morpha, outputLemmas);<NEW_LINE>tagger.outputTaggedSentence(sent, outputLemmas, outputStyle, outputVerbosity, sentNum++, " ", taggedResults);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return taggedResults.toString();<NEW_LINE>}
new SentenceTaggingProcessor(tagger, outputLemmas));
1,261,676
protected boolean load(ResultSet rs) {<NEW_LINE>int size = get_ColumnCount();<NEW_LINE>boolean success = true;<NEW_LINE>int index = 0;<NEW_LINE>log.finest("(rs)");<NEW_LINE>// load column values<NEW_LINE>for (index = 0; index < size; index++) {<NEW_LINE>String columnName = p_info.getColumnName(index);<NEW_LINE>Class<?> clazz = p_info.getColumnClass(index);<NEW_LINE>int dt = p_info.getColumnDisplayType(index);<NEW_LINE>// ADEMPIERE-100<NEW_LINE>if (p_info.isVirtualColumn(index))<NEW_LINE>continue;<NEW_LINE>try {<NEW_LINE>if (clazz == Integer.class)<NEW_LINE>m_oldValues[index] = decrypt(index, new Integer(rs.getInt(columnName)));<NEW_LINE>else if (clazz == BigDecimal.class)<NEW_LINE>m_oldValues[index] = decrypt(index, rs.getBigDecimal(columnName));<NEW_LINE>else if (clazz == Boolean.class)<NEW_LINE>m_oldValues[index] = new Boolean("Y".equals(decrypt(index, rs.getString(columnName))));<NEW_LINE>else if (clazz == Timestamp.class)<NEW_LINE>m_oldValues[index] = decrypt(index, rs.getTimestamp(columnName));<NEW_LINE>else if (DisplayType.isLOB(dt) || (DisplayType.isText(dt) && p_info.getFieldLength(index) > 4000))<NEW_LINE>m_oldValues[index] = get_LOB(rs.getObject(columnName));<NEW_LINE>else if (clazz == String.class)<NEW_LINE>m_oldValues[index] = decrypt(index, rs.getString(columnName));<NEW_LINE>else<NEW_LINE>m_oldValues[index] = loadSpecial(rs, index);<NEW_LINE>// NULL<NEW_LINE>if (rs.wasNull() && m_oldValues[index] != null)<NEW_LINE>m_oldValues[index] = null;<NEW_LINE>//<NEW_LINE>if (CLogMgt.isLevelAll())<NEW_LINE>log.finest(String.valueOf(index) + ": " + p_info.getColumnName(index) + "(" + p_info.getColumnClass(index) + ") = " + m_oldValues[index]);<NEW_LINE>} catch (SQLException e) {<NEW_LINE>// @Trifon - MySQL Port<NEW_LINE>e.printStackTrace();<NEW_LINE>if (// if rs constructor used<NEW_LINE>p_info.isVirtualColumn(index))<NEW_LINE>log.log(<MASK><NEW_LINE>else {<NEW_LINE>log.log(Level.SEVERE, "(rs) - " + String.valueOf(index) + ": " + p_info.getTableName() + "." + p_info.getColumnName(index) + " (" + p_info.getColumnClass(index) + ") - " + e);<NEW_LINE>success = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>m_createNew = false;<NEW_LINE>setKeyInfo();<NEW_LINE>loadComplete(success);<NEW_LINE>return success;<NEW_LINE>}
Level.FINER, "Virtual Column not loaded: " + columnName);
1,660,478
static Object shapeItemWithJson(JSONObject json, LottieComposition composition) {<NEW_LINE>String type = json.optString("ty");<NEW_LINE>switch(type) {<NEW_LINE>case "gr":<NEW_LINE>return ShapeGroup.Factory.newInstance(json, composition);<NEW_LINE>case "st":<NEW_LINE>return ShapeStroke.Factory.newInstance(json, composition);<NEW_LINE>case "fl":<NEW_LINE>return ShapeFill.Factory.newInstance(json, composition);<NEW_LINE>case "tr":<NEW_LINE>return AnimatableTransform.Factory.newInstance(json, composition);<NEW_LINE>case "sh":<NEW_LINE>return ShapePath.Factory.newInstance(json, composition);<NEW_LINE>case "el":<NEW_LINE>return CircleShape.Factory.newInstance(json, composition);<NEW_LINE>case "rc":<NEW_LINE>return RectangleShape.Factory.newInstance(json, composition);<NEW_LINE>case "tm":<NEW_LINE>return ShapeTrimPath.Factory.newInstance(json, composition);<NEW_LINE>case "sr":<NEW_LINE>return PolystarShape.<MASK><NEW_LINE>case "mm":<NEW_LINE>return MergePaths.Factory.newInstance(json);<NEW_LINE>default:<NEW_LINE>Log.w(L.TAG, "Unknown shape type " + type);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
Factory.newInstance(json, composition);
1,113,459
static Collection<EmbeddableDescription> findEmbeddables(ResourceResolver resourceResolver) {<NEW_LINE>String[] searchPaths = resourceResolver.getSearchPath();<NEW_LINE>for (int i = 0; i < searchPaths.length; i++) {<NEW_LINE>searchPaths[i] = searchPaths[i].substring(0, searchPaths[i].length() - 1);<NEW_LINE>}<NEW_LINE>final Map<String, EmbeddableDescription> map = new HashMap<>();<NEW_LINE>final List<String> disabledComponents = new ArrayList<>();<NEW_LINE>for (final String path : searchPaths) {<NEW_LINE>final StringBuilder queryStringBuilder = new StringBuilder("/jcr:root");<NEW_LINE>queryStringBuilder.append(path);<NEW_LINE>queryStringBuilder.append("//* [@");<NEW_LINE>queryStringBuilder.append(JcrResourceConstants.SLING_RESOURCE_SUPER_TYPE_PROPERTY);<NEW_LINE>queryStringBuilder.append("='");<NEW_LINE>queryStringBuilder.append(Embed.RT_EMBEDDABLE_V1);<NEW_LINE>queryStringBuilder.append("']");<NEW_LINE>final Iterator<Resource> resourceIterator = resourceResolver.findResources(queryStringBuilder.toString(), "xpath");<NEW_LINE>while (resourceIterator.hasNext()) {<NEW_LINE>final Resource embeddableResource = resourceIterator.next();<NEW_LINE>final ValueMap properties = ResourceUtil.getValueMap(embeddableResource);<NEW_LINE>final String resourceType = embeddableResource.getPath().substring(path.length() + 1);<NEW_LINE>if (properties.get(COMPONENT_PROPERTY_ENABLED, Boolean.TRUE)) {<NEW_LINE>if (!map.containsKey(resourceType) && !disabledComponents.contains(resourceType)) {<NEW_LINE>map.put(resourceType, new EmbeddableDescription(resourceType, embeddableResource<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>disabledComponents.add(resourceType);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final List<EmbeddableDescription> entries = new ArrayList<>(map.values());<NEW_LINE>Collections.sort(entries);<NEW_LINE>return entries;<NEW_LINE>}
.getName(), properties));
1,036,473
public static GetSlrConfigurationResponse unmarshall(GetSlrConfigurationResponse getSlrConfigurationResponse, UnmarshallerContext _ctx) {<NEW_LINE>getSlrConfigurationResponse.setRequestId(_ctx.stringValue("GetSlrConfigurationResponse.RequestId"));<NEW_LINE>getSlrConfigurationResponse.setCode(_ctx.stringValue("GetSlrConfigurationResponse.Code"));<NEW_LINE>getSlrConfigurationResponse.setMessage(_ctx.stringValue("GetSlrConfigurationResponse.Message"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setMqSubscribe(_ctx.booleanValue("GetSlrConfigurationResponse.Data.MqSubscribe"));<NEW_LINE>data.setMqEndpoint(_ctx.stringValue("GetSlrConfigurationResponse.Data.MqEndpoint"));<NEW_LINE>data.setMqInstanceId(_ctx.stringValue("GetSlrConfigurationResponse.Data.MqInstanceId"));<NEW_LINE>data.setMqTopic(_ctx.stringValue("GetSlrConfigurationResponse.Data.MqTopic"));<NEW_LINE>data.setMqGroupId<MASK><NEW_LINE>List<String> mqEventList = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetSlrConfigurationResponse.Data.MqEventList.Length"); i++) {<NEW_LINE>mqEventList.add(_ctx.stringValue("GetSlrConfigurationResponse.Data.MqEventList[" + i + "]"));<NEW_LINE>}<NEW_LINE>data.setMqEventList(mqEventList);<NEW_LINE>getSlrConfigurationResponse.setData(data);<NEW_LINE>return getSlrConfigurationResponse;<NEW_LINE>}
(_ctx.stringValue("GetSlrConfigurationResponse.Data.MqGroupId"));
277,697
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {<NEW_LINE>if (handler instanceof HandlerMethod) {<NEW_LINE>HandlerMethod method = ((HandlerMethod) handler);<NEW_LINE>TwoFactor factor = method.getMethodAnnotation(TwoFactor.class);<NEW_LINE>if (factor == null || factor.ignore()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>String userId = Authentication.current().map(Authentication::getUser).map(User::getId).orElse(null);<NEW_LINE>TwoFactorValidator validator = validatorManager.getValidator(userId, factor.value(), factor.provider());<NEW_LINE>if (!validator.expired()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>String code = request.getParameter(factor.parameter());<NEW_LINE>if (code == null) {<NEW_LINE>code = request.<MASK><NEW_LINE>}<NEW_LINE>if (StringUtils.isEmpty(code)) {<NEW_LINE>throw new NeedTwoFactorException("validation.need_two_factor_verify", factor.provider());<NEW_LINE>} else if (!validator.verify(code, factor.timeout())) {<NEW_LINE>throw new NeedTwoFactorException(factor.message(), factor.provider());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return super.preHandle(request, response, handler);<NEW_LINE>}
getHeader(factor.parameter());
426,780
private void checkForOntologyIDChange(OWLOntologyChange change) {<NEW_LINE>if (!(change instanceof SetOntologyID)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SetOntologyID setID = (SetOntologyID) change;<NEW_LINE>OWLOntology existingOntology = ontologiesByID.get(setID.getNewOntologyID());<NEW_LINE>OWLOntology o = setID.getOntology();<NEW_LINE>if (existingOntology != null && !o.equals(existingOntology) && !o.equalAxioms(existingOntology)) {<NEW_LINE>String location = "OWLOntologyManagerImpl.checkForOntologyIDChange()";<NEW_LINE>LOGGER.<MASK><NEW_LINE>LOGGER.error(location + " new:{}", o);<NEW_LINE>Set<OWLLogicalAxiom> diff1 = asUnorderedSet(o.logicalAxioms());<NEW_LINE>Set<OWLLogicalAxiom> diff2 = asUnorderedSet(existingOntology.logicalAxioms());<NEW_LINE>existingOntology.logicalAxioms().forEach(diff1::remove);<NEW_LINE>o.logicalAxioms().forEach(diff2::remove);<NEW_LINE>LOGGER.error(location + " only in existing:{}", diff2);<NEW_LINE>LOGGER.error(location + " only in new:{}", diff1);<NEW_LINE>throw new OWLOntologyRenameException(setID.getChangeData(), setID.getNewOntologyID());<NEW_LINE>}<NEW_LINE>renameOntology(setID.getOriginalOntologyID(), setID.getNewOntologyID());<NEW_LINE>resetImportsClosureCache();<NEW_LINE>}
error(location + " existing:{}", existingOntology);
92,410
private EPStatement compileDeploy(String epl) {<NEW_LINE>try {<NEW_LINE>Configuration configuration = new Configuration();<NEW_LINE>// add sample import for compile-time use<NEW_LINE>configuration.getCommon().addImport(RuntimeConfigMain.class);<NEW_LINE>// add sample single-row median function provided by this class<NEW_LINE>configuration.getCompiler().addPlugInSingleRowFunction("mymedian", this.getClass().getName(), "computeDoubleMedian");<NEW_LINE>// add sample append-string aggregation function provided by another class<NEW_LINE>configuration.getCompiler().addPlugInAggregationFunctionForge("concat", MyConcatAggregationFunctionForge.class.getName());<NEW_LINE>// types and variables shall be available for other statements<NEW_LINE>configuration.getCompiler().getByteCode().setAccessModifierEventType(NameAccessModifier.PUBLIC);<NEW_LINE>configuration.getCompiler().getByteCode().setAccessModifierVariable(NameAccessModifier.PUBLIC);<NEW_LINE>// types shall be available for "sendEvent" use<NEW_LINE>configuration.getCompiler().getByteCode().setBusModifierEventType(EventTypeBusModifier.BUS);<NEW_LINE>// allow the runtimetypes etc. to be visible to the compiler<NEW_LINE>CompilerArguments args = new CompilerArguments(configuration);<NEW_LINE>args.getPath().add(runtime.getRuntimePath());<NEW_LINE>EPCompiled compiled = EPCompilerProvider.getCompiler().compile(epl, args);<NEW_LINE>return runtime.getDeploymentService().deploy(compiled<MASK><NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new RuntimeException(ex);<NEW_LINE>}<NEW_LINE>}
).getStatements()[0];
1,433,440
public void marshall(ResultConfigurationUpdates resultConfigurationUpdates, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (resultConfigurationUpdates == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(resultConfigurationUpdates.getOutputLocation(), OUTPUTLOCATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(resultConfigurationUpdates.getRemoveOutputLocation(), REMOVEOUTPUTLOCATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(resultConfigurationUpdates.getEncryptionConfiguration(), ENCRYPTIONCONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(resultConfigurationUpdates.getRemoveEncryptionConfiguration(), REMOVEENCRYPTIONCONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(resultConfigurationUpdates.getExpectedBucketOwner(), EXPECTEDBUCKETOWNER_BINDING);<NEW_LINE>protocolMarshaller.marshall(resultConfigurationUpdates.getRemoveExpectedBucketOwner(), REMOVEEXPECTEDBUCKETOWNER_BINDING);<NEW_LINE>protocolMarshaller.marshall(resultConfigurationUpdates.getAclConfiguration(), ACLCONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(resultConfigurationUpdates.getRemoveAclConfiguration(), REMOVEACLCONFIGURATION_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
1,680,842
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>labelPattern = new javax.swing.JLabel();<NEW_LINE>textField = new javax.swing.JTextField();<NEW_LINE>regexCheckbox = new javax.swing.JCheckBox();<NEW_LINE>okButton = new javax.swing.JButton();<NEW_LINE>setOpaque(false);<NEW_LINE>setLayout(new java.awt.GridBagLayout());<NEW_LINE>labelPattern.setText(// NOI18N<NEW_LINE>org.openide.util.NbBundle.// NOI18N<NEW_LINE>getMessage(// NOI18N<NEW_LINE>EqualStringPanel.class, "EqualStringPanel.labelPattern.text"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 0;<NEW_LINE>gridBagConstraints.gridy = 0;<NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);<NEW_LINE>add(labelPattern, gridBagConstraints);<NEW_LINE>// NOI18N<NEW_LINE>textField.// NOI18N<NEW_LINE>setText(org.openide.util.NbBundle.getMessage(EqualStringPanel.class, "EqualStringPanel.textField.text"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 1;<NEW_LINE>gridBagConstraints.gridy = 0;<NEW_LINE>gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;<NEW_LINE>gridBagConstraints.weightx = 1.0;<NEW_LINE>add(textField, gridBagConstraints);<NEW_LINE>regexCheckbox.setText(// NOI18N<NEW_LINE>org.openide.util.NbBundle.// NOI18N<NEW_LINE>getMessage(// NOI18N<NEW_LINE>EqualStringPanel.class, "EqualStringPanel.regexCheckbox.text"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 1;<NEW_LINE>gridBagConstraints.gridy = 1;<NEW_LINE>gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;<NEW_LINE>add(regexCheckbox, gridBagConstraints);<NEW_LINE>// NOI18N<NEW_LINE>okButton.// NOI18N<NEW_LINE>setText(org.openide.util.NbBundle.getMessage(EqualStringPanel.class, "EqualStringPanel.okButton.text"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 2;<NEW_LINE>gridBagConstraints.gridy = 0;<NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(<MASK><NEW_LINE>add(okButton, gridBagConstraints);<NEW_LINE>}
0, 3, 0, 3);
480,591
public Optional<ProcessResult> execute(String command, String processInput) throws IOException {<NEW_LINE>ByteArrayOutputStream processErr = new ByteArrayOutputStream();<NEW_LINE>ByteArrayOutputStream processOut = new ByteArrayOutputStream();<NEW_LINE>DefaultExecutor executor = new DefaultExecutor();<NEW_LINE>executor.setStreamHandler(createStreamHandler(processOut, processErr, processInput));<NEW_LINE>ExecuteWatchdog watchDog = new ExecuteWatchdog(TimeUnit.SECONDS.toMillis(timeoutSeconds));<NEW_LINE>executor.setWatchdog(watchDog);<NEW_LINE>executor.setExitValues(successExitCodes);<NEW_LINE>int exitCode;<NEW_LINE>try {<NEW_LINE>exitCode = executor.execute<MASK><NEW_LINE>} catch (ExecuteException e) {<NEW_LINE>exitCode = e.getExitValue();<NEW_LINE>}<NEW_LINE>return (watchDog.killedProcess()) ? Optional.empty() : Optional.of(new ProcessResult(exitCode, processOut.toString(), processErr.toString()));<NEW_LINE>}
(CommandLine.parse(command));
1,818,407
protected void partialFinish(ManufOrder manufOrder, int inOrOut) throws AxelorException {<NEW_LINE>if (inOrOut != PART_FINISH_IN && inOrOut != PART_FINISH_OUT) {<NEW_LINE>throw new IllegalArgumentException(I18n.get(IExceptionMessage.IN_OR_OUT_INVALID_ARG));<NEW_LINE>}<NEW_LINE>Company company = manufOrder.getCompany();<NEW_LINE>StockConfigProductionService stockConfigService = Beans.get(StockConfigProductionService.class);<NEW_LINE>StockConfig stockConfig = stockConfigService.getStockConfig(company);<NEW_LINE>StockLocation fromStockLocation;<NEW_LINE>StockLocation toStockLocation;<NEW_LINE>List<StockMove> stockMoveList;<NEW_LINE>if (inOrOut == PART_FINISH_IN) {<NEW_LINE>stockMoveList = manufOrder.getInStockMoveList();<NEW_LINE>fromStockLocation = getDefaultStockLocation(manufOrder, company, STOCK_LOCATION_IN);<NEW_LINE>toStockLocation = stockConfigService.getProductionVirtualStockLocation(stockConfig, manufOrder.getProdProcess().getOutsourcing());<NEW_LINE>} else {<NEW_LINE>stockMoveList = manufOrder.getOutStockMoveList();<NEW_LINE>fromStockLocation = stockConfigService.getProductionVirtualStockLocation(stockConfig, manufOrder.getProdProcess().getOutsourcing());<NEW_LINE>toStockLocation = <MASK><NEW_LINE>}<NEW_LINE>// realize current stock move and update the price<NEW_LINE>Optional<StockMove> stockMoveToRealize = getPlannedStockMove(stockMoveList);<NEW_LINE>if (stockMoveToRealize.isPresent()) {<NEW_LINE>updateRealPrice(manufOrder, stockMoveToRealize.get());<NEW_LINE>finishStockMove(stockMoveToRealize.get());<NEW_LINE>}<NEW_LINE>// generate new stock move<NEW_LINE>StockMove newStockMove = stockMoveService.createStockMove(null, null, company, fromStockLocation, toStockLocation, null, manufOrder.getPlannedStartDateT().toLocalDate(), null, StockMoveRepository.TYPE_INTERNAL);<NEW_LINE>newStockMove.setStockMoveLineList(new ArrayList<>());<NEW_LINE>newStockMove.setOrigin(manufOrder.getManufOrderSeq());<NEW_LINE>newStockMove.setOriginId(manufOrder.getId());<NEW_LINE>newStockMove.setOriginTypeSelect(StockMoveRepository.ORIGIN_MANUF_ORDER);<NEW_LINE>createNewStockMoveLines(manufOrder, newStockMove, inOrOut);<NEW_LINE>if (!newStockMove.getStockMoveLineList().isEmpty()) {<NEW_LINE>// plan the stockmove<NEW_LINE>stockMoveService.plan(newStockMove);<NEW_LINE>if (inOrOut == PART_FINISH_IN) {<NEW_LINE>manufOrder.addInStockMoveListItem(newStockMove);<NEW_LINE>newStockMove.getStockMoveLineList().forEach(manufOrder::addConsumedStockMoveLineListItem);<NEW_LINE>manufOrder.clearDiffConsumeProdProductList();<NEW_LINE>} else {<NEW_LINE>manufOrder.addOutStockMoveListItem(newStockMove);<NEW_LINE>newStockMove.getStockMoveLineList().forEach(manufOrder::addProducedStockMoveLineListItem);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getDefaultStockLocation(manufOrder, company, STOCK_LOCATION_OUT);
573,077
public PrimaryStorageCapacityVO call(PrimaryStorageCapacityVO cap) {<NEW_LINE>String beforeCapacity = String.format("[totalCapacity: %s, availableCapacity: %s, totalPhysicalCapacity: %s, " + "availablePhysicalCapacity: %s]", cap.getTotalCapacity(), cap.getAvailableCapacity(), cap.getTotalPhysicalCapacity(), cap.getAvailablePhysicalCapacity());<NEW_LINE>if (total != null) {<NEW_LINE>long t = cap.getTotalCapacity() - total;<NEW_LINE>cap.setTotalCapacity(t < 0 ? 0 : t);<NEW_LINE>}<NEW_LINE>if (avail != null) {<NEW_LINE>// for over-provisioning scenarios, minus value of available capacity is permitted<NEW_LINE>long a = cap.getAvailableCapacity() - avail;<NEW_LINE>cap.setAvailableCapacity(a);<NEW_LINE>}<NEW_LINE>if (totalPhysical != null) {<NEW_LINE>long tp = cap.getTotalPhysicalCapacity() - totalPhysical;<NEW_LINE>cap.setTotalPhysicalCapacity(tp < 0 ? 0 : tp);<NEW_LINE>}<NEW_LINE>if (availPhysical != null) {<NEW_LINE>long ap = cap.getAvailablePhysicalCapacity() - availPhysical;<NEW_LINE>cap.setAvailablePhysicalCapacity(ap < 0 ? 0 : ap);<NEW_LINE>}<NEW_LINE>if (systemUsed != null) {<NEW_LINE>long su = cap.getSystemUsedCapacity() - systemUsed;<NEW_LINE>cap.setSystemUsedCapacity(su < 0 ? 0 : su);<NEW_LINE>}<NEW_LINE>String nowCapacity = String.format("[totalCapacity: %s, availableCapacity: %s, totalPhysicalCapacity: %s, " + "availablePhysicalCapacity: %s]", cap.getTotalCapacity(), cap.getAvailableCapacity(), cap.getTotalPhysicalCapacity(), cap.getAvailablePhysicalCapacity());<NEW_LINE>logger.info(String.format("decrease local primary storage[uuid: %s] capacity, changed capacity from %s to %s", cap.getUuid<MASK><NEW_LINE>return cap;<NEW_LINE>}
(), beforeCapacity, nowCapacity));
443,172
// Initializes all anomaly errors.<NEW_LINE>public HashMap<String, ArrayList<Float>> initAnomalyErrors(DataSequence observedSeries, DataSequence expectedSeries) {<NEW_LINE><MASK><NEW_LINE>// init MASE.<NEW_LINE>for (int i = 1; i < n; i++) {<NEW_LINE>maseDenom += Math.abs(observedSeries.get(i).value - observedSeries.get(i - 1).value);<NEW_LINE>}<NEW_LINE>maseDenom = maseDenom / (n - 1);<NEW_LINE>HashMap<String, ArrayList<Float>> allErrors = new HashMap<String, ArrayList<Float>>();<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>Float[] errors = computeErrorMetrics(expectedSeries.get(i).value, observedSeries.get(i).value);<NEW_LINE>for (int j = 0; j < errors.length; j++) {<NEW_LINE>if (!allErrors.containsKey(indexToError.get(j))) {<NEW_LINE>allErrors.put(indexToError.get(j), new ArrayList<Float>());<NEW_LINE>}<NEW_LINE>ArrayList<Float> tmp = allErrors.get(indexToError.get(j));<NEW_LINE>tmp.add(errors[j]);<NEW_LINE>allErrors.put(indexToError.get(j), tmp);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>isInit = true;<NEW_LINE>return allErrors;<NEW_LINE>}
int n = observedSeries.size();
1,099,356
public boolean validateHeader(final BlockHeader header, final BlockHeader parent, final ProtocolContext protocolContext, final HeaderValidationMode mode) {<NEW_LINE>switch(mode) {<NEW_LINE>case NONE:<NEW_LINE>return true;<NEW_LINE>case LIGHT_DETACHED_ONLY:<NEW_LINE>return applyRules(header, parent, protocolContext, rule -> rule.includeInLightValidation() && rule.isDetachedSupported());<NEW_LINE>case LIGHT_SKIP_DETACHED:<NEW_LINE>return applyRules(header, parent, protocolContext, rule -> rule.includeInLightValidation() && !rule.isDetachedSupported());<NEW_LINE>case LIGHT:<NEW_LINE>return applyRules(header, <MASK><NEW_LINE>case DETACHED_ONLY:<NEW_LINE>return applyRules(header, parent, protocolContext, Rule::isDetachedSupported);<NEW_LINE>case SKIP_DETACHED:<NEW_LINE>return applyRules(header, parent, protocolContext, rule -> !rule.isDetachedSupported());<NEW_LINE>case FULL:<NEW_LINE>return applyRules(header, parent, protocolContext, rule -> true);<NEW_LINE>}<NEW_LINE>throw new IllegalArgumentException("Unknown HeaderValidationMode: " + mode);<NEW_LINE>}
parent, protocolContext, Rule::includeInLightValidation);
1,516,760
private void askUserToFixPath(DefaultListModel<BasePathSupport.Item> includePathListModel, BasePathSupport.Item item) {<NEW_LINE>PhpProject currentProject = uiProps.getProject();<NEW_LINE>FileObject fileObject = item.getFileObject(currentProject.getProjectDirectory());<NEW_LINE>assert fileObject != null;<NEW_LINE>PhpProject owningProject = PhpProjectUtils.getPhpProject(fileObject);<NEW_LINE>assert owningProject != null;<NEW_LINE>String owningProjectDisplayName = ProjectUtils.getInformation(owningProject).getDisplayName();<NEW_LINE>NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation(Bundle.CustomizerPhpIncludePath_error_anotherProjectSubFile(item.getAbsoluteFilePath(currentProject.getProjectDirectory())<MASK><NEW_LINE>if (DialogDisplayer.getDefault().notify(descriptor) != NotifyDescriptor.YES_OPTION) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// fix path<NEW_LINE>FileObject sourcesDirectory = ProjectPropertiesSupport.getSourcesDirectory(owningProject);<NEW_LINE>if (sourcesDirectory == null) {<NEW_LINE>// #245388<NEW_LINE>LOGGER.log(Level.INFO, "Source files of project {0} not found, Include Path cannot be fixed", owningProject.getName());<NEW_LINE>DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(Bundle.CustomizerPhpIncludePath_error_brokenProject(owningProjectDisplayName), NotifyDescriptor.WARNING_MESSAGE));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int index = includePathListModel.indexOf(item);<NEW_LINE>assert index != -1;<NEW_LINE>includePathListModel.set(index, BasePathSupport.Item.create(FileUtil.toFile(sourcesDirectory).getAbsolutePath(), null));<NEW_LINE>}
, owningProjectDisplayName), NotifyDescriptor.YES_NO_OPTION);
915,476
public void renderWireFrame(PoseStack matrix, VertexConsumer vertexBuilder, double angle, float red, float green, float blue, float alpha) {<NEW_LINE>float baseRotation = getAbsoluteRotation(angle);<NEW_LINE>setRotation(blade1a, 0F, 0F, baseRotation);<NEW_LINE>setRotation(blade1b, 0F, 0F, 0.0349066F + baseRotation);<NEW_LINE>float blade2Rotation = getAbsoluteRotation(angle - 60);<NEW_LINE>setRotation(blade2a, 0F, 0F, blade2Rotation);<NEW_LINE>setRotation(blade2b, 0F, 0F, 0.0349066F + blade2Rotation);<NEW_LINE>float blade3Rotation = getAbsoluteRotation(angle + 60);<NEW_LINE>setRotation(<MASK><NEW_LINE>setRotation(blade3b, 0F, 0F, 0.0349066F + blade3Rotation);<NEW_LINE>setRotation(bladeCap, 0F, 0F, baseRotation);<NEW_LINE>setRotation(bladeCenter, 0F, 0F, baseRotation);<NEW_LINE>renderPartsAsWireFrame(parts, matrix, vertexBuilder, red, green, blue, alpha);<NEW_LINE>}
blade3a, 0F, 0F, blade3Rotation);
1,128,199
protected IBindingSet[] nextChunk() throws InterruptedException {<NEW_LINE>if (log.isDebugEnabled())<NEW_LINE>log.debug("joinOp=" + joinOp);<NEW_LINE>// while (!source.isExhausted()) {<NEW_LINE>//<NEW_LINE>// halted();<NEW_LINE>//<NEW_LINE>// // note: uses timeout to avoid blocking w/o testing [halt].<NEW_LINE>// if (source.hasNext(10, TimeUnit.MILLISECONDS)) {<NEW_LINE>//<NEW_LINE>// // read the chunk.<NEW_LINE>// final IBindingSet[] chunk = source.next();<NEW_LINE>//<NEW_LINE>// stats.chunksIn.increment();<NEW_LINE>// stats.unitsIn.add(chunk.length);<NEW_LINE>//<NEW_LINE>// if (log.isDebugEnabled())<NEW_LINE>// log.debug("Read chunk from source: chunkSize="<NEW_LINE>// + chunk.length + ", joinOp=" + joinOp);<NEW_LINE>//<NEW_LINE>// return chunk;<NEW_LINE>//<NEW_LINE>// }<NEW_LINE>//<NEW_LINE>// }<NEW_LINE>while (source.hasNext()) {<NEW_LINE>halted();<NEW_LINE>// read the chunk.<NEW_LINE>final IBindingSet[] chunk = source.next();<NEW_LINE>stats.chunksIn.increment();<NEW_LINE>stats.<MASK><NEW_LINE>if (log.isDebugEnabled())<NEW_LINE>log.debug("Read chunk from source: chunkSize=" + chunk.length + ", joinOp=" + joinOp);<NEW_LINE>return chunk;<NEW_LINE>}<NEW_LINE>if (log.isDebugEnabled())<NEW_LINE>log.debug("Source exhausted: joinOp=" + joinOp);<NEW_LINE>return null;<NEW_LINE>}
unitsIn.add(chunk.length);
245,988
public void apply(Skeleton skeleton, float lastTime, float time, @Null Array<Event> events, float alpha, MixBlend blend, MixDirection direction) {<NEW_LINE>Bone bone = skeleton.bones.get(boneIndex);<NEW_LINE>if (!bone.active)<NEW_LINE>return;<NEW_LINE>float[] frames = this.frames;<NEW_LINE>if (time < frames[0]) {<NEW_LINE>// Time is before first frame.<NEW_LINE>switch(blend) {<NEW_LINE>case setup:<NEW_LINE>bone.x = bone.data.x;<NEW_LINE>bone.y = bone.data.y;<NEW_LINE>return;<NEW_LINE>case first:<NEW_LINE>bone.x += (bone.data.x - bone.x) * alpha;<NEW_LINE>bone.y += (bone.data.y - bone.y) * alpha;<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>float x, y;<NEW_LINE>int i = search(frames, time, ENTRIES), curveType = (int) curves[i / ENTRIES];<NEW_LINE>switch(curveType) {<NEW_LINE>case LINEAR:<NEW_LINE>float before = frames[i];<NEW_LINE>x = frames[i + VALUE1];<NEW_LINE>y = frames[i + VALUE2];<NEW_LINE>float t = (time - before) / (frames<MASK><NEW_LINE>x += (frames[i + ENTRIES + VALUE1] - x) * t;<NEW_LINE>y += (frames[i + ENTRIES + VALUE2] - y) * t;<NEW_LINE>break;<NEW_LINE>case STEPPED:<NEW_LINE>x = frames[i + VALUE1];<NEW_LINE>y = frames[i + VALUE2];<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>x = getBezierValue(time, i, VALUE1, curveType - BEZIER);<NEW_LINE>y = getBezierValue(time, i, VALUE2, curveType + BEZIER_SIZE - BEZIER);<NEW_LINE>}<NEW_LINE>switch(blend) {<NEW_LINE>case setup:<NEW_LINE>bone.x = bone.data.x + x * alpha;<NEW_LINE>bone.y = bone.data.y + y * alpha;<NEW_LINE>break;<NEW_LINE>case first:<NEW_LINE>case replace:<NEW_LINE>bone.x += (bone.data.x + x - bone.x) * alpha;<NEW_LINE>bone.y += (bone.data.y + y - bone.y) * alpha;<NEW_LINE>break;<NEW_LINE>case add:<NEW_LINE>bone.x += x * alpha;<NEW_LINE>bone.y += y * alpha;<NEW_LINE>}<NEW_LINE>}
[i + ENTRIES] - before);
91,558
public static VariantContext swapAlleles(final VariantContext originalVc, final Allele oldAllele, final Allele newAllele) throws IllegalArgumentException {<NEW_LINE>if (!originalVc.getAlleles().contains(oldAllele))<NEW_LINE>throw new IllegalArgumentException("Couldn't find allele " + oldAllele + " in VariantContext " + originalVc);<NEW_LINE>final List<Allele> alleles = new ArrayList<>(originalVc.getAlleles());<NEW_LINE>alleles.set(alleles.indexOf(oldAllele), newAllele);<NEW_LINE>VariantContextBuilder vcBuilder = new VariantContextBuilder(originalVc).alleles(alleles);<NEW_LINE>GenotypesContext newGTs = GenotypesContext.create(originalVc.<MASK><NEW_LINE>for (final Genotype g : originalVc.getGenotypes()) {<NEW_LINE>if (!g.getAlleles().contains(oldAllele)) {<NEW_LINE>newGTs.add(g);<NEW_LINE>} else {<NEW_LINE>final GenotypeBuilder gb = new GenotypeBuilder(g);<NEW_LINE>gb.alleles(g.getAlleles().stream().map(a -> a.equals(oldAllele) ? newAllele : a).collect(Collectors.toList()));<NEW_LINE>newGTs.add(gb.make());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>vcBuilder.genotypes(newGTs);<NEW_LINE>return vcBuilder.make();<NEW_LINE>}
getGenotypes().size());
354,742
private GridPane createEditor(TableRowExpanderColumn.TableRowDataFeatures<Customer> param) {<NEW_LINE>GridPane editor = new GridPane();<NEW_LINE>editor.setPadding(new Insets(10));<NEW_LINE>editor.setHgap(10);<NEW_LINE>editor.setVgap(5);<NEW_LINE>Customer customer = param.getValue();<NEW_LINE>TextField nameField = new TextField(customer.getName());<NEW_LINE>TextField emailField = new TextField(customer.getEmail());<NEW_LINE>editor.addRow(0, new Label("Name"), nameField);<NEW_LINE>editor.addRow(1, new Label("Email"), emailField);<NEW_LINE>Button saveButton = new Button("Save");<NEW_LINE>saveButton.setOnAction(event -> {<NEW_LINE>customer.setName(nameField.getText());<NEW_LINE>customer.setEmail(emailField.getText());<NEW_LINE>param.toggleExpanded();<NEW_LINE>});<NEW_LINE>Button cancelButton = new Button("Cancel");<NEW_LINE>cancelButton.setOnAction(<MASK><NEW_LINE>editor.addRow(2, saveButton, cancelButton);<NEW_LINE>return editor;<NEW_LINE>}
event -> param.toggleExpanded());
129,276
public ApiResponse<Void> permissionsPutWithHttpInfo(String id, UpdatePermissionRequest permissionRequest) throws ApiException {<NEW_LINE>Object localVarPostBody = permissionRequest;<NEW_LINE>// verify the required parameter 'id' is set<NEW_LINE>if (id == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'id' when calling permissionsPut");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'permissionRequest' is set<NEW_LINE>if (permissionRequest == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'permissionRequest' when calling permissionsPut");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/permissions/{id}".replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new <MASK><NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = {};<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "application/json", "text/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);<NEW_LINE>}
HashMap<String, String>();
1,684,400
public //<NEW_LINE>boolean updateTargetsWithPartiallyInferredType(final Equalities equalities, ConstraintMap constraintMap, AnnotatedTypeFactory typeFactory) {<NEW_LINE>boolean updated = false;<NEW_LINE>if (!equalities.types.isEmpty()) {<NEW_LINE>if (equalities.types.size() != 1) {<NEW_LINE>throw new BugInCF("Equalities should have at most 1 constraint.");<NEW_LINE>}<NEW_LINE>Map.Entry<AnnotatedTypeMirror, AnnotationMirrorSet> remainingTypeEquality;<NEW_LINE>remainingTypeEquality = equalities.types.entrySet()<MASK><NEW_LINE>final AnnotatedTypeMirror remainingType = remainingTypeEquality.getKey();<NEW_LINE>final AnnotationMirrorSet remainingHierarchies = remainingTypeEquality.getValue();<NEW_LINE>// update targets<NEW_LINE>for (Map.Entry<TypeVariable, AnnotationMirrorSet> targetToHierarchies : equalities.targets.entrySet()) {<NEW_LINE>final TypeVariable equalTarget = targetToHierarchies.getKey();<NEW_LINE>final AnnotationMirrorSet hierarchies = targetToHierarchies.getValue();<NEW_LINE>final AnnotationMirrorSet equalTypeHierarchies = new AnnotationMirrorSet(remainingHierarchies);<NEW_LINE>equalTypeHierarchies.retainAll(hierarchies);<NEW_LINE>final Map<AnnotatedTypeMirror, AnnotationMirrorSet> otherTargetsEqualTypes = constraintMap.getConstraints(equalTarget).equalities.types;<NEW_LINE>AnnotationMirrorSet equalHierarchies = otherTargetsEqualTypes.get(remainingType);<NEW_LINE>if (equalHierarchies == null) {<NEW_LINE>equalHierarchies = new AnnotationMirrorSet(equalTypeHierarchies);<NEW_LINE>otherTargetsEqualTypes.put(remainingType, equalHierarchies);<NEW_LINE>updated = true;<NEW_LINE>} else {<NEW_LINE>final int size = equalHierarchies.size();<NEW_LINE>equalHierarchies.addAll(equalTypeHierarchies);<NEW_LINE>updated = size == equalHierarchies.size();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return updated;<NEW_LINE>}
.iterator().next();
1,167,059
public static int romanToArabic(String input) {<NEW_LINE>String romanNumeral = input.toUpperCase();<NEW_LINE>int result = 0;<NEW_LINE>List<RomanNumeral> romanNumerals = RomanNumeral.getReverseSortedValues();<NEW_LINE>int i = 0;<NEW_LINE>while ((romanNumeral.length() > 0) && (i < romanNumerals.size())) {<NEW_LINE>RomanNumeral <MASK><NEW_LINE>if (romanNumeral.startsWith(symbol.name())) {<NEW_LINE>result += symbol.getValue();<NEW_LINE>romanNumeral = romanNumeral.substring(symbol.name().length());<NEW_LINE>} else {<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (romanNumeral.length() > 0) {<NEW_LINE>throw new IllegalArgumentException(input + " cannot be converted to a Roman Numeral");<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
symbol = romanNumerals.get(i);
1,805,008
void emailSpec11Reports(LocalDate date, SoyTemplateInfo soyTemplateInfo, String subject, ImmutableSet<RegistrarThreatMatches> registrarThreatMatchesSet) {<NEW_LINE>ImmutableMap.Builder<RegistrarThreatMatches, Throwable> failedMatchesBuilder = ImmutableMap.builder();<NEW_LINE>for (RegistrarThreatMatches registrarThreatMatches : registrarThreatMatchesSet) {<NEW_LINE>RegistrarThreatMatches filteredMatches = filterOutNonPublishedMatches(registrarThreatMatches);<NEW_LINE>if (!filteredMatches.threatMatches().isEmpty()) {<NEW_LINE>try {<NEW_LINE>// Handle exceptions individually per registrar so that one failed email doesn't prevent<NEW_LINE>// the rest from being sent.<NEW_LINE>emailRegistrar(date, soyTemplateInfo, subject, filteredMatches);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>failedMatchesBuilder.put(registrarThreatMatches, getRootCause(e));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ImmutableMap<RegistrarThreatMatches, Throwable> failedMatches = failedMatchesBuilder.build();<NEW_LINE>if (!failedMatches.isEmpty()) {<NEW_LINE>ImmutableList<Map.Entry<RegistrarThreatMatches, Throwable>> failedMatchesList = failedMatches.entrySet().asList();<NEW_LINE>// Send an alert email and throw a RuntimeException with the first failure as the cause,<NEW_LINE>// but log the rest so that we have that information.<NEW_LINE>Throwable firstThrowable = failedMatchesList.<MASK><NEW_LINE>sendAlertEmail(String.format("Spec11 Emailing Failure %s", date), String.format("Emailing Spec11 reports failed due to %s", firstThrowable.getMessage()));<NEW_LINE>for (int i = 1; i < failedMatches.size(); i++) {<NEW_LINE>logger.atSevere().withCause(failedMatchesList.get(i).getValue()).log("Additional exception thrown when sending email to registrar %s, in addition to the" + " re-thrown exception.", failedMatchesList.get(i).getKey().clientId());<NEW_LINE>}<NEW_LINE>throw new RuntimeException("Emailing Spec11 reports failed, first exception:", firstThrowable);<NEW_LINE>}<NEW_LINE>sendAlertEmail(String.format("Spec11 Pipeline Success %s", date), "Spec11 reporting completed successfully.");<NEW_LINE>}
get(0).getValue();
1,784,272
public List<ViewManager> createViewManagers(ReactApplicationContext reactApplicationContext) {<NEW_LINE>List<ViewManager> managers = new ArrayList<>();<NEW_LINE>// components<NEW_LINE>managers.<MASK><NEW_LINE>managers.add(new RCTMGLAndroidTextureMapViewManager(reactApplicationContext));<NEW_LINE>managers.add(new RCTMGLLightManager());<NEW_LINE>managers.add(new RCTMGLPointAnnotationManager(reactApplicationContext));<NEW_LINE>managers.add(new RCTMGLCalloutManager());<NEW_LINE>// sources<NEW_LINE>managers.add(new RCTMGLVectorSourceManager(reactApplicationContext));<NEW_LINE>managers.add(new RCTMGLShapeSourceManager(reactApplicationContext));<NEW_LINE>managers.add(new RCTMGLRasterSourceManager());<NEW_LINE>managers.add(new RCTMGLImageSourceManager());<NEW_LINE>// layers<NEW_LINE>managers.add(new RCTMGLFillLayerManager());<NEW_LINE>managers.add(new RCTMGLFillExtrusionLayerManager());<NEW_LINE>managers.add(new RCTMGLLineLayerManager());<NEW_LINE>managers.add(new RCTMGLCircleLayerManager());<NEW_LINE>managers.add(new RCTMGLSymbolLayerManager());<NEW_LINE>managers.add(new RCTMGLRasterLayerManager());<NEW_LINE>managers.add(new RCTMGLBackgroundLayerManager());<NEW_LINE>return managers;<NEW_LINE>}
add(new RCTMGLMapViewManager(reactApplicationContext));
63,421
public void generatesAtLeast(Object... expected) {<NEW_LINE>LinkedHashSet<Object> expectedSet = new LinkedHashSet<>();<NEW_LINE>Collections.addAll(expectedSet, expected);<NEW_LINE>LinkedHashSet<Object> missingSet = new LinkedHashSet<>(expectedSet);<NEW_LINE>LinkedHashSet<Object> <MASK><NEW_LINE>LinkedHashSet<Object> extraSet = new LinkedHashSet<>();<NEW_LINE>int i = 0;<NEW_LINE>for (; i < MAX_GENERATION_COUNT; i++) {<NEW_LINE>if (missingSet.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Object v = this.source.generate(i);<NEW_LINE>if (expectedSet.contains(v)) {<NEW_LINE>foundSet.add(v);<NEW_LINE>missingSet.remove(v);<NEW_LINE>} else {<NEW_LINE>extraSet.add(v);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>failWithoutActual(Fact.fact("total generation count", i + 1), Fact.fact("found expected", renderSet(foundSet)), Fact.fact("still missing", renderSet(missingSet)), Fact.fact("found extras", renderSet(extraSet)));<NEW_LINE>}
foundSet = new LinkedHashSet<>();
174,749
private void addEdge(DependencyEdge edge) {<NEW_LINE>edge.getSrc().addOutgoing(edge);<NEW_LINE>edge.getDst().addIncoming(edge);<NEW_LINE>PriorityQueue<Node> queue = new PriorityQueue<DependencyGraph.Node>(11, new Comparator<Node>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int compare(Node o1, Node o2) {<NEW_LINE>return o1.getLevel() - o2.getLevel();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>queue.add(edge.getDst());<NEW_LINE>Map<Task, DependencyEdge> queuedTasks = Maps.newHashMap();<NEW_LINE>Map<Task, DependencyEdge> pastTasks = Maps.newHashMap();<NEW_LINE>pastTasks.put(edge.getSrc().getTask(), null);<NEW_LINE>queuedTasks.put(edge.getDst().getTask(), edge);<NEW_LINE>while (!queue.isEmpty()) {<NEW_LINE>Node node = queue.poll();<NEW_LINE>pastTasks.put(node.getTask(), queuedTasks.remove(node.getTask()));<NEW_LINE>if (node.promoteLayer(myData = myData.withTransaction())) {<NEW_LINE>for (DependencyEdge outEdge : node.getOutgoing()) {<NEW_LINE>if (!queuedTasks.containsKey(outEdge.getDst().getTask())) {<NEW_LINE>if (pastTasks.containsKey(outEdge.getDst().getTask())) {<NEW_LINE>myLogger.logDependencyLoop("Dependency loop detected", buildLoop<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>queue.add(outEdge.getDst());<NEW_LINE>queuedTasks.put(outEdge.getDst().getTask(), outEdge);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(pastTasks, outEdge) + "\n\nLast dependency has been ignored");
1,805,811
private boolean packageAll(String exportPath) {<NEW_LINE>if (!exportPath.endsWith(".zip")) {<NEW_LINE>exportPath = exportPath + ".zip";<NEW_LINE>}<NEW_LINE>BufferedInputStream origin = null;<NEW_LINE>ZipOutputStream out;<NEW_LINE>boolean result = true;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>out = new ZipOutputStream(new BufferedOutputStream(dest));<NEW_LINE>byte[] data = new byte[BUFFER];<NEW_LINE>// get a list of files from current directory<NEW_LINE>String[] files = tmpDir.list();<NEW_LINE>for (int i = 0; i < files.length; i++) {<NEW_LINE>// System.out.println( "Adding: " + files[i] );<NEW_LINE>FileInputStream fi = new FileInputStream(new File(tmpDir, files[i]));<NEW_LINE>origin = new BufferedInputStream(fi, BUFFER);<NEW_LINE>ZipEntry entry = new ZipEntry(files[i]);<NEW_LINE>out.putNextEntry(entry);<NEW_LINE>int count;<NEW_LINE>while ((count = origin.read(data, 0, BUFFER)) != -1) {<NEW_LINE>out.write(data, 0, count);<NEW_LINE>}<NEW_LINE>origin.close();<NEW_LINE>}<NEW_LINE>out.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>// TODO: handle exception<NEW_LINE>result = false;<NEW_LINE>SoapUI.logError(e, "Error packaging export");<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
FileOutputStream dest = new FileOutputStream(exportPath);
1,386,428
private void restoreState(Bundle b) {<NEW_LINE>mSavedState = b;<NEW_LINE>if (mSavedState == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Restore the internal state even if the WebView fails to restore.<NEW_LINE>// This will maintain the app id, original url and close-on-exit values.<NEW_LINE>mId = b.getLong(ID);<NEW_LINE><MASK><NEW_LINE>mCloseOnBack = b.getBoolean(CLOSEFLAG);<NEW_LINE>restoreUserAgent();<NEW_LINE>String url = b.getString(CURRURL);<NEW_LINE>String title = b.getString(CURRTITLE);<NEW_LINE>boolean incognito = b.getBoolean(INCOGNITO);<NEW_LINE>mCurrentState = new PageState(mContext, incognito, url, null);<NEW_LINE>mCurrentState.mTitle = title;<NEW_LINE>synchronized (Tab.this) {<NEW_LINE>if (mCapture != null) {<NEW_LINE>DataController.getInstance(mContext).loadThumbnail(this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
mAppId = b.getString(APPID);
1,213,032
public static BlobItemProperties populateBlobItemProperties(BlobItemPropertiesInternal blobItemPropertiesInternal) {<NEW_LINE>BlobItemProperties blobItemProperties = new BlobItemProperties();<NEW_LINE>blobItemProperties.setCreationTime(blobItemPropertiesInternal.getCreationTime());<NEW_LINE>blobItemProperties.setLastModified(blobItemPropertiesInternal.getLastModified());<NEW_LINE>blobItemProperties.setETag(blobItemPropertiesInternal.getETag());<NEW_LINE>blobItemProperties.setContentLength(blobItemPropertiesInternal.getContentLength());<NEW_LINE>blobItemProperties.setContentType(blobItemPropertiesInternal.getContentType());<NEW_LINE>blobItemProperties.setContentEncoding(blobItemPropertiesInternal.getContentEncoding());<NEW_LINE>blobItemProperties.setContentLanguage(blobItemPropertiesInternal.getContentLanguage());<NEW_LINE>blobItemProperties.setContentMd5(blobItemPropertiesInternal.getContentMd5());<NEW_LINE>blobItemProperties.setContentDisposition(blobItemPropertiesInternal.getContentDisposition());<NEW_LINE>blobItemProperties.setCacheControl(blobItemPropertiesInternal.getCacheControl());<NEW_LINE>blobItemProperties.setBlobSequenceNumber(blobItemPropertiesInternal.getBlobSequenceNumber());<NEW_LINE>blobItemProperties.setBlobType(blobItemPropertiesInternal.getBlobType());<NEW_LINE>blobItemProperties.setLeaseStatus(blobItemPropertiesInternal.getLeaseStatus());<NEW_LINE>blobItemProperties.setLeaseState(blobItemPropertiesInternal.getLeaseState());<NEW_LINE>blobItemProperties.setLeaseDuration(blobItemPropertiesInternal.getLeaseDuration());<NEW_LINE>blobItemProperties.setCopyId(blobItemPropertiesInternal.getCopyId());<NEW_LINE>blobItemProperties.<MASK><NEW_LINE>blobItemProperties.setCopySource(blobItemPropertiesInternal.getCopySource());<NEW_LINE>blobItemProperties.setCopyProgress(blobItemPropertiesInternal.getCopyProgress());<NEW_LINE>blobItemProperties.setCopyCompletionTime(blobItemPropertiesInternal.getCopyCompletionTime());<NEW_LINE>blobItemProperties.setCopyStatusDescription(blobItemPropertiesInternal.getCopyStatusDescription());<NEW_LINE>blobItemProperties.setServerEncrypted(blobItemPropertiesInternal.isServerEncrypted());<NEW_LINE>blobItemProperties.setIncrementalCopy(blobItemPropertiesInternal.isIncrementalCopy());<NEW_LINE>blobItemProperties.setDestinationSnapshot(blobItemPropertiesInternal.getDestinationSnapshot());<NEW_LINE>blobItemProperties.setDeletedTime(blobItemPropertiesInternal.getDeletedTime());<NEW_LINE>blobItemProperties.setRemainingRetentionDays(blobItemPropertiesInternal.getRemainingRetentionDays());<NEW_LINE>blobItemProperties.setAccessTier(blobItemPropertiesInternal.getAccessTier());<NEW_LINE>blobItemProperties.setAccessTierInferred(blobItemPropertiesInternal.isAccessTierInferred());<NEW_LINE>blobItemProperties.setArchiveStatus(blobItemPropertiesInternal.getArchiveStatus());<NEW_LINE>blobItemProperties.setCustomerProvidedKeySha256(blobItemPropertiesInternal.getCustomerProvidedKeySha256());<NEW_LINE>blobItemProperties.setEncryptionScope(blobItemPropertiesInternal.getEncryptionScope());<NEW_LINE>blobItemProperties.setAccessTierChangeTime(blobItemPropertiesInternal.getAccessTierChangeTime());<NEW_LINE>blobItemProperties.setTagCount(blobItemPropertiesInternal.getTagCount());<NEW_LINE>blobItemProperties.setRehydratePriority(blobItemPropertiesInternal.getRehydratePriority());<NEW_LINE>blobItemProperties.setSealed(blobItemPropertiesInternal.isSealed());<NEW_LINE>blobItemProperties.setLastAccessedTime(blobItemPropertiesInternal.getLastAccessedOn());<NEW_LINE>blobItemProperties.setExpiryTime(blobItemPropertiesInternal.getExpiresOn());<NEW_LINE>blobItemProperties.setImmutabilityPolicy(new BlobImmutabilityPolicy().setExpiryTime(blobItemPropertiesInternal.getImmutabilityPolicyExpiresOn()).setPolicyMode(blobItemPropertiesInternal.getImmutabilityPolicyMode()));<NEW_LINE>blobItemProperties.setHasLegalHold(blobItemPropertiesInternal.isLegalHold());<NEW_LINE>return blobItemProperties;<NEW_LINE>}
setCopyStatus(blobItemPropertiesInternal.getCopyStatus());
1,618,420
public boolean enableBatchRead() {<NEW_LINE>if (readUsingBatch == null) {<NEW_LINE>boolean allParquetFileScanTasks = tasks().stream().allMatch(combinedScanTask -> !combinedScanTask.isDataTask() && combinedScanTask.files().stream().allMatch(fileScanTask -> fileScanTask.file().format().equals(FileFormat.PARQUET)));<NEW_LINE>boolean allOrcFileScanTasks = tasks().stream().allMatch(combinedScanTask -> !combinedScanTask.isDataTask() && combinedScanTask.files().stream().allMatch(fileScanTask -> fileScanTask.file().format().<MASK><NEW_LINE>boolean atLeastOneColumn = lazySchema().columns().size() > 0;<NEW_LINE>boolean onlyPrimitives = lazySchema().columns().stream().allMatch(c -> c.type().isPrimitiveType());<NEW_LINE>boolean hasNoDeleteFiles = tasks().stream().noneMatch(TableScanUtil::hasDeletes);<NEW_LINE>boolean batchReadsEnabled = batchReadsEnabled(allParquetFileScanTasks, allOrcFileScanTasks);<NEW_LINE>this.readUsingBatch = batchReadsEnabled && hasNoDeleteFiles && (allOrcFileScanTasks || (allParquetFileScanTasks && atLeastOneColumn && onlyPrimitives));<NEW_LINE>if (readUsingBatch) {<NEW_LINE>this.batchSize = batchSize(allParquetFileScanTasks, allOrcFileScanTasks);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return readUsingBatch;<NEW_LINE>}
equals(FileFormat.ORC)));
1,499,641
public List<Component> showMenuBarMenu(final String menuName, final String... submenuNames) {<NEW_LINE>waitForSwing();<NEW_LINE>final List<Component> list = new ArrayList<>();<NEW_LINE>runSwing(() -> {<NEW_LINE>JMenuBar menuBar = tool<MASK><NEW_LINE>list.add(menuBar);<NEW_LINE>JMenuItem item = findMenu(menuBar, menuName);<NEW_LINE>JMenu menu = (JMenu) item;<NEW_LINE>JPopupMenu popupMenu = menu.getPopupMenu();<NEW_LINE>Rectangle bounds = item.getBounds();<NEW_LINE>popupMenu.show(menu.getParent(), bounds.x, bounds.y + bounds.height);<NEW_LINE>list.add(popupMenu);<NEW_LINE>for (String string : submenuNames) {<NEW_LINE>menu = (JMenu) findMenuElement(menu, string);<NEW_LINE>popupMenu = menu.getPopupMenu();<NEW_LINE>bounds = menu.getBounds();<NEW_LINE>popupMenu.show(menu, bounds.x + bounds.width, 0);<NEW_LINE>list.add(popupMenu);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>waitForSwing();<NEW_LINE>// sleep(5000);<NEW_LINE>return list;<NEW_LINE>}
.getToolFrame().getJMenuBar();
658,966
public void parse(ParseContext context) throws IOException {<NEW_LINE>try {<NEW_LINE>Shape shape = context.parseExternalValue(Shape.class);<NEW_LINE>if (shape == null) {<NEW_LINE>ShapeBuilder shapeBuilder = ShapeParser.parse(<MASK><NEW_LINE>if (shapeBuilder == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>shape = shapeBuilder.buildS4J();<NEW_LINE>}<NEW_LINE>if (fieldType().pointsOnly() == true) {<NEW_LINE>// index configured for pointsOnly<NEW_LINE>if (shape instanceof XShapeCollection && XShapeCollection.class.cast(shape).pointsOnly()) {<NEW_LINE>// MULTIPOINT data: index each point separately<NEW_LINE>List<Shape> shapes = ((XShapeCollection) shape).getShapes();<NEW_LINE>for (Shape s : shapes) {<NEW_LINE>indexShape(context, s);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>} else if (shape instanceof Point == false) {<NEW_LINE>throw new MapperParsingException("[{" + fieldType().name() + "}] is configured for points only but a " + ((shape instanceof JtsGeometry) ? ((JtsGeometry) shape).getGeom().getGeometryType() : shape.getClass()) + " was found");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>indexShape(context, shape);<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (ignoreMalformed.value() == false) {<NEW_LINE>throw new MapperParsingException("failed to parse field [{}] of type [{}]", e, fieldType().name(), fieldType().typeName());<NEW_LINE>}<NEW_LINE>context.addIgnoredField(fieldType.name());<NEW_LINE>}<NEW_LINE>}
context.parser(), this);
994,800
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String routeTableName, String routeName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (routeTableName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter routeTableName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (routeName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter routeName 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-05-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = <MASK><NEW_LINE>return service.delete(this.client.getEndpoint(), resourceGroupName, routeTableName, routeName, apiVersion, this.client.getSubscriptionId(), accept, context);<NEW_LINE>}
this.client.mergeContext(context);
763,919
private static void initializeServer() throws Exception {<NEW_LINE>URLClassLoader urlClassLoader = getSeleniumServerClassLoader();<NEW_LINE>// NOI18N<NEW_LINE>Class seleniumServer = urlClassLoader.loadClass("org.openqa.selenium.server.SeleniumServer");<NEW_LINE>Class remoteControlConfiguration = // NOI18N<NEW_LINE>urlClassLoader.// NOI18N<NEW_LINE>loadClass("org.openqa.selenium.server.RemoteControlConfiguration");<NEW_LINE>Object remoteControlConfigurationInstance = remoteControlConfiguration.newInstance();<NEW_LINE>int port = getPrefs().getInt(PORT, PORT_DEFAULT);<NEW_LINE>// NOI18N<NEW_LINE>remoteControlConfiguration.getMethod("setPort", int.class).// NOI18N<NEW_LINE>invoke(// NOI18N<NEW_LINE>remoteControlConfigurationInstance, port);<NEW_LINE>boolean runInSingleWindow = getPrefs().getBoolean(SINGLE_WINDOW, SINGLE_WINDOW_DEFAULT);<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>remoteControlConfiguration.getMethod("setSingleWindow", Boolean.TYPE).invoke(remoteControlConfigurationInstance, runInSingleWindow);<NEW_LINE>// NOI18N<NEW_LINE>String firefoxProfileDir = getPrefs().get(FIREFOX_PROFILE_TEMPLATE_DIR, "");<NEW_LINE>if (!firefoxProfileDir.isEmpty()) {<NEW_LINE>File ffProfileDir = new File(firefoxProfileDir);<NEW_LINE>if (ffProfileDir.exists()) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>remoteControlConfiguration.getMethod("setFirefoxProfileTemplate", File.class).invoke(remoteControlConfigurationInstance, ffProfileDir);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>String userExtensionsString = getPrefs(<MASK><NEW_LINE>if (!userExtensionsString.isEmpty()) {<NEW_LINE>File userExtensionFile = new File(userExtensionsString);<NEW_LINE>if (userExtensionFile.exists()) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>remoteControlConfiguration.getMethod("setUserExtensions", File.class).invoke(remoteControlConfigurationInstance, userExtensionFile);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>server = seleniumServer.getConstructor(remoteControlConfiguration).newInstance(remoteControlConfigurationInstance);<NEW_LINE>}
).get(USER_EXTENSION_FILE, "");
503,130
protected static int overflowDistanceSub(float op1, float op2) {<NEW_LINE>float result = op1 - op2;<NEW_LINE>if (op1 >= 0 && op2 <= 0) {<NEW_LINE>// result has to be < 0 for overflow<NEW_LINE>return result == Float.POSITIVE_INFINITY ? -1 : HALFWAY + 1 - scaleTo(result, HALFWAY);<NEW_LINE>} else if (op1 < 0 && op2 > 0) {<NEW_LINE>// if both are negative then an overflow will be difficult<NEW_LINE>return result == Float.NEGATIVE_INFINITY ? Integer.MAX_VALUE : HALFWAY + scaleTo(Math.abs((double) op1) + Math.abs(<MASK><NEW_LINE>} else if (op1 >= 0 && op2 > 0) {<NEW_LINE>// In this case we can't have an overflow yet<NEW_LINE>return HALFWAY + scaleTo(op2, HALFWAY);<NEW_LINE>} else if (op1 < 0 && op2 <= 0) {<NEW_LINE>return HALFWAY + scaleTo(Math.abs((double) op1), HALFWAY);<NEW_LINE>} else {<NEW_LINE>// At least one of them is zero, and the sum is larger or equals than 0<NEW_LINE>return 1 + HALFWAY - scaleTo(result, HALFWAY);<NEW_LINE>}<NEW_LINE>}
(double) op2), HALFWAY);
281,842
final DeleteLensShareResult executeDeleteLensShare(DeleteLensShareRequest deleteLensShareRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteLensShareRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteLensShareRequest> request = null;<NEW_LINE>Response<DeleteLensShareResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new DeleteLensShareRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteLensShareRequest));<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, "WellArchitected");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteLensShare");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteLensShareResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteLensShareResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
683,353
private Blob cipheredBlob(String container, Blob blob, InputStream payload, long contentLength, boolean addEncryptedMetadata) {<NEW_LINE>// make a copy of the blob with the new payload stream<NEW_LINE>BlobMetadata blobMeta = blob.getMetadata();<NEW_LINE>ContentMetadata contentMeta = blob<MASK><NEW_LINE>Map<String, String> userMetadata = blobMeta.getUserMetadata();<NEW_LINE>String contentType = contentMeta.getContentType();<NEW_LINE>// suffix the content type with -s3enc if we need to encrypt<NEW_LINE>if (addEncryptedMetadata) {<NEW_LINE>blobMeta = setEncryptedSuffix(blobMeta);<NEW_LINE>} else {<NEW_LINE>// remove the -s3enc suffix while decrypting<NEW_LINE>// but not if it contains a multipart meta<NEW_LINE>if (!blobMeta.getUserMetadata().containsKey(Constants.METADATA_IS_ENCRYPTED_MULTIPART)) {<NEW_LINE>blobMeta = removeEncryptedSuffix(blobMeta);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// we do not set contentMD5 as it will not match due to the encryption<NEW_LINE>Blob cipheredBlob = blobBuilder(container).name(blobMeta.getName()).type(blobMeta.getType()).tier(blobMeta.getTier()).userMetadata(userMetadata).payload(payload).cacheControl(contentMeta.getCacheControl()).contentDisposition(contentMeta.getContentDisposition()).contentEncoding(contentMeta.getContentEncoding()).contentLanguage(contentMeta.getContentLanguage()).contentLength(contentLength).contentType(contentType).build();<NEW_LINE>cipheredBlob.getMetadata().setUri(blobMeta.getUri());<NEW_LINE>cipheredBlob.getMetadata().setETag(blobMeta.getETag());<NEW_LINE>cipheredBlob.getMetadata().setLastModified(blobMeta.getLastModified());<NEW_LINE>cipheredBlob.getMetadata().setSize(blobMeta.getSize());<NEW_LINE>cipheredBlob.getMetadata().setPublicUri(blobMeta.getPublicUri());<NEW_LINE>cipheredBlob.getMetadata().setContainer(blobMeta.getContainer());<NEW_LINE>return cipheredBlob;<NEW_LINE>}
.getMetadata().getContentMetadata();
650,404
public ListJobExecutionsForThingResult listJobExecutionsForThing(ListJobExecutionsForThingRequest listJobExecutionsForThingRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listJobExecutionsForThingRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListJobExecutionsForThingRequest> request = null;<NEW_LINE>Response<ListJobExecutionsForThingResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListJobExecutionsForThingRequestMarshaller().marshall(listJobExecutionsForThingRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>Unmarshaller<ListJobExecutionsForThingResult, JsonUnmarshallerContext> unmarshaller = new ListJobExecutionsForThingResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<ListJobExecutionsForThingResult> responseHandler = new JsonResponseHandler<ListJobExecutionsForThingResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,474,751
public void collapse() {<NEW_LINE>if (!_isShowing)<NEW_LINE>return;<NEW_LINE>if (_folderAnimator == null || _folderAnimator.isRunning())<NEW_LINE>return;<NEW_LINE>long animDuration = Setup.appSettings().getAnimationSpeed() * 10;<NEW_LINE>Tool.invisibleViews(animDuration, _cellContainer);<NEW_LINE>int startRadius = Tool.dp2px(Setup.appSettings().getDesktopIconSize() / 2);<NEW_LINE>int finalRadius = Math.max(_popupCard.getWidth(<MASK><NEW_LINE>_folderAnimator = ViewAnimationUtils.createCircularReveal(_popupCard, _cx, _cy, finalRadius, startRadius);<NEW_LINE>_folderAnimator.setStartDelay(1 + animDuration / 2);<NEW_LINE>_folderAnimator.setInterpolator(new AccelerateDecelerateInterpolator());<NEW_LINE>_folderAnimator.setDuration(animDuration);<NEW_LINE>_folderAnimator.addListener(new Animator.AnimatorListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationStart(Animator p1) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationEnd(Animator p1) {<NEW_LINE>_popupCard.setVisibility(View.INVISIBLE);<NEW_LINE>_isShowing = false;<NEW_LINE>if (_dismissListener != null) {<NEW_LINE>_dismissListener.onDismiss();<NEW_LINE>}<NEW_LINE>_cellContainer.removeAllViews();<NEW_LINE>setVisibility(View.INVISIBLE);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationCancel(Animator p1) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationRepeat(Animator p1) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>_folderAnimator.start();<NEW_LINE>}
), _popupCard.getHeight());
578,654
protected AddressSetView findLocations(Program program, AddressSetView set, Set<Address> locations, TaskMonitor monitor) throws CancelledException {<NEW_LINE>monitor.setMessage("Finding function locations...");<NEW_LINE>long total = set.getNumAddresses();<NEW_LINE>monitor.initialize(total);<NEW_LINE>// iterate over functions in program<NEW_LINE>// add each defined function start to the list<NEW_LINE>// return the address set that is minus the bodies of each function<NEW_LINE>AddressSet inBodySet = new AddressSet();<NEW_LINE>Iterator<Function> fiter = program.getFunctionManager().getFunctionsOverlapping(set);<NEW_LINE>while (fiter.hasNext()) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>Function function = fiter.next();<NEW_LINE>locations.add(function.getEntryPoint());<NEW_LINE>inBodySet.add(function.getBody());<NEW_LINE>}<NEW_LINE>monitor.setProgress(total - inBodySet.getNumAddresses());<NEW_LINE>set = set.subtract(inBodySet);<NEW_LINE>// set now has Stuff in it that isn't in a recorded function body<NEW_LINE>ReferenceManager referenceManager = program.getReferenceManager();<NEW_LINE>AddressIterator referenceDestinationIterator = <MASK><NEW_LINE>AddressSet outOfBodySet = new AddressSet();<NEW_LINE>while (referenceDestinationIterator.hasNext()) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>Address address = referenceDestinationIterator.next();<NEW_LINE>ReferenceIterator referencesTo = referenceManager.getReferencesTo(address);<NEW_LINE>while (referencesTo.hasNext()) {<NEW_LINE>Reference reference = referencesTo.next();<NEW_LINE>if (reference.getReferenceType().isCall()) {<NEW_LINE>locations.add(address);<NEW_LINE>outOfBodySet.add(address);<NEW_LINE>// could subtract all local non-call flows from the set, but<NEW_LINE>// might be extra work...<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>monitor.incrementProgress(outOfBodySet.getNumAddresses());<NEW_LINE>set = set.subtract(outOfBodySet);<NEW_LINE>// now iterate over individual address ranges, and use first address as a start<NEW_LINE>outOfBodySet = new AddressSet();<NEW_LINE>AddressRangeIterator addressRanges = set.getAddressRanges();<NEW_LINE>while (addressRanges.hasNext()) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>AddressRange addressRange = addressRanges.next();<NEW_LINE>locations.add(addressRange.getMinAddress());<NEW_LINE>outOfBodySet.add(addressRange.getMinAddress());<NEW_LINE>}<NEW_LINE>monitor.incrementProgress(outOfBodySet.getNumAddresses());<NEW_LINE>set = set.subtract(outOfBodySet);<NEW_LINE>return set;<NEW_LINE>}
referenceManager.getReferenceDestinationIterator(set, true);
800,465
public void execute(DelegateExecution execution) throws Exception {<NEW_LINE>Date now = new Date();<NEW_LINE>List<String> serializable = new ArrayList<String>();<NEW_LINE>serializable.add("seven");<NEW_LINE>serializable.add("eight");<NEW_LINE>serializable.add("nine");<NEW_LINE>List<Date> dateList = new ArrayList<Date>();<NEW_LINE>dateList.add(new Date());<NEW_LINE>dateList.add(new Date());<NEW_LINE>dateList.add(new Date());<NEW_LINE>List<CockpitVariable> cockpitVariableList = new ArrayList<CockpitVariable>();<NEW_LINE>cockpitVariableList.add(new CockpitVariable("foo", "bar"));<NEW_LINE>cockpitVariableList.add(new CockpitVariable("foo2", "bar"));<NEW_LINE>cockpitVariableList.add(new CockpitVariable("foo3", "bar"));<NEW_LINE>byte[] bytes = "someAnotherBytes".getBytes();<NEW_LINE>FailingSerializable failingSerializable = new FailingSerializable();<NEW_LINE>Map<String, Integer> mapVariable = new HashMap<String, Integer>();<NEW_LINE>Map<String, Object> variables = new HashMap<String, Object>();<NEW_LINE>variables.put("shortVar", (short) 789);<NEW_LINE>variables.put("longVar", 555555L);<NEW_LINE>variables.put("integerVar", 963852);<NEW_LINE>variables.put("floatVar", 55.55);<NEW_LINE>variables.put("doubleVar", 6123.2025);<NEW_LINE>variables.put("trueBooleanVar", true);<NEW_LINE>variables.put("falseBooleanVar", false);<NEW_LINE>variables.put("stringVar", "fanta");<NEW_LINE>variables.put("dateVar", now);<NEW_LINE>variables.put("serializableCollection", serializable);<NEW_LINE>variables.put("bytesVar", bytes);<NEW_LINE>variables.put("value1", "blub");<NEW_LINE>int random = (int) (Math.random() * 100);<NEW_LINE>variables.put("random", random);<NEW_LINE>variables.put("failingSerializable", failingSerializable);<NEW_LINE>variables.put("mapVariable", mapVariable);<NEW_LINE>variables.put("dateList", dateList);<NEW_LINE>variables.put("cockpitVariableList", cockpitVariableList);<NEW_LINE>execution.setVariablesLocal(variables);<NEW_LINE>// set JSON variable<NEW_LINE>JsonSerialized jsonSerialized = new JsonSerialized();<NEW_LINE>jsonSerialized.setFoo("bar");<NEW_LINE>execution.setVariable("jsonSerializable", objectValue(jsonSerialized).serializationDataFormat("application/json"));<NEW_LINE>// set JAXB variable<NEW_LINE>JaxBSerialized jaxBSerialized = new JaxBSerialized();<NEW_LINE>jaxBSerialized.setFoo("bar");<NEW_LINE>execution.setVariable("xmlSerializable", objectValue(<MASK><NEW_LINE>}
jaxBSerialized).serializationDataFormat("application/xml"));
749,654
public static ListQuotaReviewTasksResponse unmarshall(ListQuotaReviewTasksResponse listQuotaReviewTasksResponse, UnmarshallerContext _ctx) {<NEW_LINE>listQuotaReviewTasksResponse.setRequestId(_ctx.stringValue("ListQuotaReviewTasksResponse.requestId"));<NEW_LINE>listQuotaReviewTasksResponse.setTotalCount(_ctx.integerValue("ListQuotaReviewTasksResponse.totalCount"));<NEW_LINE>List<ResultItem> result = new ArrayList<ResultItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListQuotaReviewTasksResponse.result.Length"); i++) {<NEW_LINE>ResultItem resultItem = new ResultItem();<NEW_LINE>resultItem.setId(_ctx.integerValue("ListQuotaReviewTasksResponse.result[" + i + "].id"));<NEW_LINE>resultItem.setAppGroupId(_ctx.integerValue("ListQuotaReviewTasksResponse.result[" + i + "].appGroupId"));<NEW_LINE>resultItem.setAppGroupName(_ctx.stringValue("ListQuotaReviewTasksResponse.result[" + i + "].appGroupName"));<NEW_LINE>resultItem.setAppGroupType(_ctx.stringValue("ListQuotaReviewTasksResponse.result[" + i + "].appGroupType"));<NEW_LINE>resultItem.setOldSpec(_ctx.stringValue("ListQuotaReviewTasksResponse.result[" + i + "].oldSpec"));<NEW_LINE>resultItem.setOldComputeResource(_ctx.integerValue("ListQuotaReviewTasksResponse.result[" + i + "].oldComputeResource"));<NEW_LINE>resultItem.setOldDocSize(_ctx.integerValue("ListQuotaReviewTasksResponse.result[" + i + "].oldDocSize"));<NEW_LINE>resultItem.setNewSpec(_ctx.stringValue("ListQuotaReviewTasksResponse.result[" + i + "].newSpec"));<NEW_LINE>resultItem.setNewComputeResource(_ctx.integerValue("ListQuotaReviewTasksResponse.result[" + i + "].newComputeResource"));<NEW_LINE>resultItem.setNewSocSize(_ctx.integerValue("ListQuotaReviewTasksResponse.result[" + i + "].newSocSize"));<NEW_LINE>resultItem.setMemo(_ctx.stringValue("ListQuotaReviewTasksResponse.result[" + i + "].memo"));<NEW_LINE>resultItem.setAvailable(_ctx.booleanValue("ListQuotaReviewTasksResponse.result[" + i + "].available"));<NEW_LINE>resultItem.setPending(_ctx.booleanValue("ListQuotaReviewTasksResponse.result[" + i + "].pending"));<NEW_LINE>resultItem.setApproved(_ctx.booleanValue("ListQuotaReviewTasksResponse.result[" + i + "].approved"));<NEW_LINE>resultItem.setGmtCreate(_ctx.stringValue<MASK><NEW_LINE>resultItem.setGmtModified(_ctx.stringValue("ListQuotaReviewTasksResponse.result[" + i + "].gmtModified"));<NEW_LINE>result.add(resultItem);<NEW_LINE>}<NEW_LINE>listQuotaReviewTasksResponse.setResult(result);<NEW_LINE>return listQuotaReviewTasksResponse;<NEW_LINE>}
("ListQuotaReviewTasksResponse.result[" + i + "].gmtCreate"));
525,167
public final void findMaxSeparation(EdgeResults results, final PolygonShape poly1, final Transform xf1, final PolygonShape poly2, final Transform xf2) {<NEW_LINE>int count1 = poly1.m_count;<NEW_LINE>int count2 = poly2.m_count;<NEW_LINE>Vec2[] n1s = poly1.m_normals;<NEW_LINE><MASK><NEW_LINE>Vec2[] v2s = poly2.m_vertices;<NEW_LINE>Transform.mulTransToOutUnsafe(xf2, xf1, xf);<NEW_LINE>final Rot xfq = xf.q;<NEW_LINE>int bestIndex = 0;<NEW_LINE>float maxSeparation = -Float.MAX_VALUE;<NEW_LINE>for (int i = 0; i < count1; i++) {<NEW_LINE>// Get poly1 normal in frame2.<NEW_LINE>Rot.mulToOutUnsafe(xfq, n1s[i], n);<NEW_LINE>Transform.mulToOutUnsafe(xf, v1s[i], v1);<NEW_LINE>// Find deepest point for normal i.<NEW_LINE>float si = Float.MAX_VALUE;<NEW_LINE>for (int j = 0; j < count2; ++j) {<NEW_LINE>Vec2 v2sj = v2s[j];<NEW_LINE>float sij = n.x * (v2sj.x - v1.x) + n.y * (v2sj.y - v1.y);<NEW_LINE>if (sij < si) {<NEW_LINE>si = sij;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (si > maxSeparation) {<NEW_LINE>maxSeparation = si;<NEW_LINE>bestIndex = i;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>results.edgeIndex = bestIndex;<NEW_LINE>results.separation = maxSeparation;<NEW_LINE>}
Vec2[] v1s = poly1.m_vertices;
1,370,071
public void visit(BLangResourceFunction funcNode) {<NEW_LINE>boolean validAttachedFunc = validateFuncReceiver(funcNode);<NEW_LINE>if (PackageID.isLangLibPackageID(env.enclPkg.symbol.pkgID)) {<NEW_LINE>funcNode.flagSet.add(Flag.LANG_LIB);<NEW_LINE>}<NEW_LINE>BInvokableSymbol funcSymbol = Symbols.createFunctionSymbol(Flags.asMask(funcNode.flagSet), getFuncSymbolName(funcNode), getFuncSymbolOriginalName(funcNode), env.enclPkg.symbol.pkgID, null, env.scope.owner, funcNode.hasBody(), funcNode.name.pos, SOURCE);<NEW_LINE>funcSymbol.source = funcNode.pos.lineRange().filePath();<NEW_LINE>funcSymbol.<MASK><NEW_LINE>SymbolEnv invokableEnv = SymbolEnv.createFunctionEnv(funcNode, funcSymbol.scope, env);<NEW_LINE>defineInvokableSymbol(funcNode, funcSymbol, invokableEnv);<NEW_LINE>funcNode.setBType(funcSymbol.type);<NEW_LINE>if (isDeprecated(funcNode.annAttachments)) {<NEW_LINE>funcSymbol.flags |= Flags.DEPRECATED;<NEW_LINE>}<NEW_LINE>// Define function receiver if any.<NEW_LINE>if (funcNode.receiver != null) {<NEW_LINE>defineAttachedFunctions(funcNode, funcSymbol, invokableEnv, validAttachedFunc);<NEW_LINE>}<NEW_LINE>}
markdownDocumentation = getMarkdownDocAttachment(funcNode.markdownDocumentationAttachment);
87,424
public Request<DescribeScalingActivitiesRequest> marshall(DescribeScalingActivitiesRequest describeScalingActivitiesRequest) {<NEW_LINE>if (describeScalingActivitiesRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeScalingActivitiesRequest> request = new DefaultRequest<MASK><NEW_LINE>request.addParameter("Action", "DescribeScalingActivities");<NEW_LINE>request.addParameter("Version", "2011-01-01");<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>if (!describeScalingActivitiesRequest.getActivityIds().isEmpty() || !((com.amazonaws.internal.SdkInternalList<String>) describeScalingActivitiesRequest.getActivityIds()).isAutoConstruct()) {<NEW_LINE>com.amazonaws.internal.SdkInternalList<String> activityIdsList = (com.amazonaws.internal.SdkInternalList<String>) describeScalingActivitiesRequest.getActivityIds();<NEW_LINE>int activityIdsListIndex = 1;<NEW_LINE>for (String activityIdsListValue : activityIdsList) {<NEW_LINE>if (activityIdsListValue != null) {<NEW_LINE>request.addParameter("ActivityIds.member." + activityIdsListIndex, StringUtils.fromString(activityIdsListValue));<NEW_LINE>}<NEW_LINE>activityIdsListIndex++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (describeScalingActivitiesRequest.getAutoScalingGroupName() != null) {<NEW_LINE>request.addParameter("AutoScalingGroupName", StringUtils.fromString(describeScalingActivitiesRequest.getAutoScalingGroupName()));<NEW_LINE>}<NEW_LINE>if (describeScalingActivitiesRequest.getIncludeDeletedGroups() != null) {<NEW_LINE>request.addParameter("IncludeDeletedGroups", StringUtils.fromBoolean(describeScalingActivitiesRequest.getIncludeDeletedGroups()));<NEW_LINE>}<NEW_LINE>if (describeScalingActivitiesRequest.getMaxRecords() != null) {<NEW_LINE>request.addParameter("MaxRecords", StringUtils.fromInteger(describeScalingActivitiesRequest.getMaxRecords()));<NEW_LINE>}<NEW_LINE>if (describeScalingActivitiesRequest.getNextToken() != null) {<NEW_LINE>request.addParameter("NextToken", StringUtils.fromString(describeScalingActivitiesRequest.getNextToken()));<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
<DescribeScalingActivitiesRequest>(describeScalingActivitiesRequest, "AmazonAutoScaling");
399,246
public <T extends JpaObject, W extends Object> List<T> listEqualAndInAndNotEqual(Class<T> cls, String firstAttribute, Object firstValue, String secondAttribute, Collection<W> secondValues, String thirdAttribute, Object thirdValue) throws Exception {<NEW_LINE>EntityManager em = this.get(cls);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<T> cq = cb.createQuery(cls);<NEW_LINE>Root<T> root = cq.from(cls);<NEW_LINE>Predicate p = cb.equal(root.get(firstAttribute), firstValue);<NEW_LINE>p = cb.and(p, cb.isMember(root.get(secondAttribute), cb.literal(secondValues)));<NEW_LINE>p = cb.and(p, cb.notEqual(root.<MASK><NEW_LINE>List<T> os = em.createQuery(cq.select(root).where(p)).getResultList();<NEW_LINE>List<T> list = new ArrayList<>(os);<NEW_LINE>return list;<NEW_LINE>}
get(thirdAttribute), thirdValue));
1,446,045
public static final String[] generateSubsets(String inputString) {<NEW_LINE>final <MASK><NEW_LINE>final int size = (int) Math.pow(2, length);<NEW_LINE>final BitSet[] sets = new BitSet[size];<NEW_LINE>final String[] output = new String[size];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>final BitSet set = new BitSet(size);<NEW_LINE>final StringBuilder builder = new StringBuilder();<NEW_LINE>if (i > 0) {<NEW_LINE>for (int j = length - 1; j >= 0; j--) {<NEW_LINE>if (j == length - 1) {<NEW_LINE>if (i % 2 != 0)<NEW_LINE>set.set(j, true);<NEW_LINE>} else {<NEW_LINE>boolean prev = sets[i - 1].get(j);<NEW_LINE>boolean next = true;<NEW_LINE>for (int k = j + 1; k < length; k++) {<NEW_LINE>next = next && sets[i - 1].get(k);<NEW_LINE>}<NEW_LINE>if (next)<NEW_LINE>prev = !prev;<NEW_LINE>set.set(j, prev);<NEW_LINE>}<NEW_LINE>if (set.get(j))<NEW_LINE>builder.append(inputString.charAt(j));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sets[i] = set;<NEW_LINE>output[i] = builder.toString();<NEW_LINE>}<NEW_LINE>return output;<NEW_LINE>}
int length = inputString.length();
500,219
public void available() {<NEW_LINE>// run initializers in a new thread<NEW_LINE>// we need to wait until apoc procs are registered<NEW_LINE>// unfortunately an AvailabilityListener is triggered before that<NEW_LINE>Util.newDaemonThread(() -> {<NEW_LINE>try {<NEW_LINE>final boolean isSystemDatabase = db.databaseName(<MASK><NEW_LINE>if (!isSystemDatabase) {<NEW_LINE>awaitApocProceduresRegistered();<NEW_LINE>}<NEW_LINE>Configuration config = dependencyResolver.resolveDependency(ApocConfig.class).getConfig();<NEW_LINE>for (String query : collectInitializers(isSystemDatabase, config)) {<NEW_LINE>try {<NEW_LINE>// we need to apply a retry strategy here since in systemdb we potentially conflict with<NEW_LINE>// creating constraints which could cause our query to fail with a transient error.<NEW_LINE>Util.retryInTx(userLog, db, tx -> Iterators.count(tx.execute(query)), 0, 5, retries -> {<NEW_LINE>});<NEW_LINE>userLog.info("successfully initialized: " + query);<NEW_LINE>} catch (Exception e) {<NEW_LINE>userLog.error("error upon initialization, running: " + query, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>finished = true;<NEW_LINE>}<NEW_LINE>}).start();<NEW_LINE>}
).equals(GraphDatabaseSettings.SYSTEM_DATABASE_NAME);
93,004
public static DescribeSecurityGroupAttributeResponse unmarshall(DescribeSecurityGroupAttributeResponse describeSecurityGroupAttributeResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSecurityGroupAttributeResponse.setRequestId(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.RequestId"));<NEW_LINE>describeSecurityGroupAttributeResponse.setVpcId(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.VpcId"));<NEW_LINE>describeSecurityGroupAttributeResponse.setInnerAccessPolicy(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.InnerAccessPolicy"));<NEW_LINE>describeSecurityGroupAttributeResponse.setDescription(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Description"));<NEW_LINE>describeSecurityGroupAttributeResponse.setSecurityGroupId(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.SecurityGroupId"));<NEW_LINE>describeSecurityGroupAttributeResponse.setSecurityGroupName(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.SecurityGroupName"));<NEW_LINE>describeSecurityGroupAttributeResponse.setRegionId(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.RegionId"));<NEW_LINE>List<Permission> permissions = new ArrayList<Permission>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeSecurityGroupAttributeResponse.Permissions.Length"); i++) {<NEW_LINE>Permission permission = new Permission();<NEW_LINE>permission.setDirection(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].Direction"));<NEW_LINE>permission.setSourceGroupId(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].SourceGroupId"));<NEW_LINE>permission.setDestGroupOwnerAccount(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].DestGroupOwnerAccount"));<NEW_LINE>permission.setDestPrefixListId(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].DestPrefixListId"));<NEW_LINE>permission.setDestPrefixListName(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].DestPrefixListName"));<NEW_LINE>permission.setSourceCidrIp(_ctx.stringValue<MASK><NEW_LINE>permission.setIpv6DestCidrIp(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].Ipv6DestCidrIp"));<NEW_LINE>permission.setCreateTime(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].CreateTime"));<NEW_LINE>permission.setIpv6SourceCidrIp(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].Ipv6SourceCidrIp"));<NEW_LINE>permission.setDestGroupId(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].DestGroupId"));<NEW_LINE>permission.setDestCidrIp(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].DestCidrIp"));<NEW_LINE>permission.setIpProtocol(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].IpProtocol"));<NEW_LINE>permission.setPriority(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].Priority"));<NEW_LINE>permission.setDestGroupName(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].DestGroupName"));<NEW_LINE>permission.setNicType(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].NicType"));<NEW_LINE>permission.setPolicy(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].Policy"));<NEW_LINE>permission.setDescription(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].Description"));<NEW_LINE>permission.setPortRange(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].PortRange"));<NEW_LINE>permission.setSourcePrefixListName(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].SourcePrefixListName"));<NEW_LINE>permission.setSourcePrefixListId(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].SourcePrefixListId"));<NEW_LINE>permission.setSourceGroupOwnerAccount(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].SourceGroupOwnerAccount"));<NEW_LINE>permission.setSourceGroupName(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].SourceGroupName"));<NEW_LINE>permission.setSourcePortRange(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].SourcePortRange"));<NEW_LINE>permissions.add(permission);<NEW_LINE>}<NEW_LINE>describeSecurityGroupAttributeResponse.setPermissions(permissions);<NEW_LINE>return describeSecurityGroupAttributeResponse;<NEW_LINE>}
("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].SourceCidrIp"));
1,639,524
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {<NEW_LINE>Permanent permanent = affectedObjectList.get(0).getPermanent(game);<NEW_LINE>if (permanent != null) {<NEW_LINE>switch(layer) {<NEW_LINE>case TypeChangingEffects_4:<NEW_LINE>permanent.removeAllCardTypes(game);<NEW_LINE>permanent.<MASK><NEW_LINE>permanent.removeAllSubTypes(game);<NEW_LINE>permanent.addSubType(game, SubType.GIANT);<NEW_LINE>break;<NEW_LINE>case AbilityAddingRemovingEffects_6:<NEW_LINE>if (game.getState().getValue("opalTitanColor" + source.getSourceId()) != null) {<NEW_LINE>for (ObjectColor color : ((ObjectColor) game.getState().getValue("opalTitanColor" + source.getSourceId())).getColors()) {<NEW_LINE>if (!permanent.getAbilities().contains(ProtectionAbility.from(color))) {<NEW_LINE>permanent.addAbility(ProtectionAbility.from(color), source.getSourceId(), game);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case PTChangingEffects_7:<NEW_LINE>if (sublayer == SubLayer.SetPT_7b) {<NEW_LINE>permanent.getPower().setValue(4);<NEW_LINE>permanent.getToughness().setValue(4);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>this.discard();<NEW_LINE>return false;<NEW_LINE>}
addCardType(game, CardType.CREATURE);
851,418
private static KafkaSourceRequest createKafkaSourceRequest(KafkaSource kafkaSource, InlongStreamInfo stream) {<NEW_LINE>KafkaSourceRequest sourceRequest = new KafkaSourceRequest();<NEW_LINE>sourceRequest.setSourceName(kafkaSource.getSourceName());<NEW_LINE>sourceRequest.setInlongGroupId(stream.getInlongGroupId());<NEW_LINE>sourceRequest.setInlongStreamId(stream.getInlongStreamId());<NEW_LINE>sourceRequest.setSourceType(kafkaSource.getSourceType().name());<NEW_LINE>sourceRequest.<MASK><NEW_LINE>sourceRequest.setBootstrapServers(kafkaSource.getBootstrapServers());<NEW_LINE>sourceRequest.setTopic(kafkaSource.getTopic());<NEW_LINE>sourceRequest.setRecordSpeedLimit(kafkaSource.getRecordSpeedLimit());<NEW_LINE>sourceRequest.setByteSpeedLimit(kafkaSource.getByteSpeedLimit());<NEW_LINE>sourceRequest.setTopicPartitionOffset(kafkaSource.getTopicPartitionOffset());<NEW_LINE>sourceRequest.setAutoOffsetReset(kafkaSource.getAutoOffsetReset().getName());<NEW_LINE>sourceRequest.setGroupId(kafkaSource.getConsumerGroup());<NEW_LINE>sourceRequest.setSerializationType(kafkaSource.getDataFormat().getName());<NEW_LINE>sourceRequest.setDatabasePattern(kafkaSource.getDatabasePattern());<NEW_LINE>sourceRequest.setTablePattern(kafkaSource.getTablePattern());<NEW_LINE>sourceRequest.setIgnoreParseErrors(kafkaSource.isIgnoreParseErrors());<NEW_LINE>sourceRequest.setTimestampFormatStandard(kafkaSource.getTimestampFormatStandard());<NEW_LINE>return sourceRequest;<NEW_LINE>}
setAgentIp(kafkaSource.getAgentIp());
853,558
static void addBasicStatistics(final SimpleImage img, final MeasurementList measurementList, final String name) {<NEW_LINE>RunningStatistics stats = StatisticsHelper.computeRunningStatistics(img);<NEW_LINE>measurementList.addMeasurement(name + <MASK><NEW_LINE>measurementList.addMeasurement(name + " Min", stats.getMin());<NEW_LINE>measurementList.addMeasurement(name + " Max", stats.getMax());<NEW_LINE>measurementList.addMeasurement(name + " Range", stats.getRange());<NEW_LINE>measurementList.addMeasurement(name + " Std.dev.", stats.getStdDev());<NEW_LINE>// measurementList.addMeasurement(String.format("%s Mean", name), stats.getMean());<NEW_LINE>// measurementList.addMeasurement(String.format("%s Min", name), stats.getMin());<NEW_LINE>// measurementList.addMeasurement(String.format("%s Max", name), stats.getMax());<NEW_LINE>// measurementList.addMeasurement(String.format("%s Range", name), stats.getRange());<NEW_LINE>// measurementList.addMeasurement(String.format("%s Std.dev.", name), stats.getStdDev());<NEW_LINE>}
" Mean", stats.getMean());
1,253,821
private static ImmutableList<Input> readInputs(JsonReader reader) throws IOException {<NEW_LINE>reader.beginArray();<NEW_LINE>ImmutableList.Builder<Input> inputsBuilder = ImmutableList.builder();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String digest = null;<NEW_LINE>String path = null;<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String name = reader.nextName();<NEW_LINE>switch(name) {<NEW_LINE>case "digest":<NEW_LINE>if (digest != null) {<NEW_LINE>throw new IOException("Input cannot have more than one digest");<NEW_LINE>}<NEW_LINE>digest = reader.nextString();<NEW_LINE>break;<NEW_LINE>case "path":<NEW_LINE>if (path != null) {<NEW_LINE>throw new IOException("Input cannot have more than one path");<NEW_LINE>}<NEW_LINE>path = reader.nextString();<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>// As per https://bazel.build/docs/creating-workers#work-responses,<NEW_LINE>// unknown fields are ignored.<NEW_LINE>reader.skipValue();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reader.endObject();<NEW_LINE>Input.Builder inputBuilder = Input.newBuilder();<NEW_LINE>if (digest != null) {<NEW_LINE>inputBuilder.setDigest(ByteString.copyFromUtf8(digest));<NEW_LINE>}<NEW_LINE>if (path != null) {<NEW_LINE>inputBuilder.setPath(path);<NEW_LINE>}<NEW_LINE>inputsBuilder.<MASK><NEW_LINE>}<NEW_LINE>reader.endArray();<NEW_LINE>return inputsBuilder.build();<NEW_LINE>}
add(inputBuilder.build());
547,983
public static ClientMessage encodeRequest(java.lang.String name, long startSequence, int minSize, int maxSize, @Nullable com.hazelcast.internal.serialization.Data predicate, @Nullable com.hazelcast.internal.serialization.Data projection) {<NEW_LINE>ClientMessage clientMessage = ClientMessage.createForEncode();<NEW_LINE>clientMessage.setRetryable(true);<NEW_LINE>clientMessage.setOperationName("Map.EventJournalRead");<NEW_LINE>ClientMessage.Frame initialFrame = new ClientMessage.Frame(new byte[REQUEST_INITIAL_FRAME_SIZE], UNFRAGMENTED_MESSAGE);<NEW_LINE>encodeInt(initialFrame.content, TYPE_FIELD_OFFSET, REQUEST_MESSAGE_TYPE);<NEW_LINE>encodeInt(initialFrame.content, PARTITION_ID_FIELD_OFFSET, -1);<NEW_LINE>encodeLong(initialFrame.content, REQUEST_START_SEQUENCE_FIELD_OFFSET, startSequence);<NEW_LINE>encodeInt(<MASK><NEW_LINE>encodeInt(initialFrame.content, REQUEST_MAX_SIZE_FIELD_OFFSET, maxSize);<NEW_LINE>clientMessage.add(initialFrame);<NEW_LINE>StringCodec.encode(clientMessage, name);<NEW_LINE>CodecUtil.encodeNullable(clientMessage, predicate, DataCodec::encode);<NEW_LINE>CodecUtil.encodeNullable(clientMessage, projection, DataCodec::encode);<NEW_LINE>return clientMessage;<NEW_LINE>}
initialFrame.content, REQUEST_MIN_SIZE_FIELD_OFFSET, minSize);
199,026
private RoutingAlgorithm createAlgo(GraphHopper hopper) {<NEW_LINE>Profile profile = hopper.getProfiles().iterator().next();<NEW_LINE>if (useCH) {<NEW_LINE>RoutingCHGraph chGraph = hopper.getCHGraphs().get(profile.getName());<NEW_LINE>logger.info(<MASK><NEW_LINE>QueryGraph qGraph = QueryGraph.create(hopper.getGraphHopperStorage(), fromRes, toRes);<NEW_LINE>QueryRoutingCHGraph queryRoutingCHGraph = new QueryRoutingCHGraph(chGraph, qGraph);<NEW_LINE>return new CHDebugAlgo(queryRoutingCHGraph, mg);<NEW_LINE>} else {<NEW_LINE>LandmarkStorage landmarks = hopper.getLandmarks().get(profile.getName());<NEW_LINE>RoutingAlgorithmFactory algoFactory = (g, w, opts) -> {<NEW_LINE>RoutingAlgorithm algo = new LMRoutingAlgorithmFactory(landmarks).createAlgo(g, w, opts);<NEW_LINE>if (algo instanceof AStarBidirection) {<NEW_LINE>return new DebugAStarBi(g, w, opts.getTraversalMode(), mg).setApproximation(((AStarBidirection) algo).getApproximation());<NEW_LINE>} else if (algo instanceof AStar) {<NEW_LINE>return new DebugAStar(g, w, opts.getTraversalMode(), mg);<NEW_LINE>} else if (algo instanceof DijkstraBidirectionRef) {<NEW_LINE>return new DebugDijkstraBidirection(g, w, opts.getTraversalMode(), mg);<NEW_LINE>} else if (algo instanceof Dijkstra) {<NEW_LINE>return new DebugDijkstraSimple(g, w, opts.getTraversalMode(), mg);<NEW_LINE>}<NEW_LINE>return algo;<NEW_LINE>};<NEW_LINE>AlgorithmOptions algoOpts = new AlgorithmOptions().setAlgorithm(Algorithms.ASTAR_BI);<NEW_LINE>logger.info("algoOpts:" + algoOpts + ", weighting: " + landmarks.getWeighting() + ", profile: " + profile.getName());<NEW_LINE>QueryGraph qGraph = QueryGraph.create(graph, fromRes, toRes);<NEW_LINE>return algoFactory.createAlgo(qGraph, landmarks.getWeighting(), algoOpts);<NEW_LINE>}<NEW_LINE>}
"CH algo, profile: " + profile.getName());
1,781,980
public EntityData.GlobalStore deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {<NEW_LINE>EntityData.GlobalStore.Builder world = EntityData.GlobalStore.newBuilder();<NEW_LINE>if (json.isJsonObject()) {<NEW_LINE>JsonObject jsonObject = json.getAsJsonObject();<NEW_LINE>JsonArray <MASK><NEW_LINE>if (prefabArray != null) {<NEW_LINE>for (JsonElement prefabElem : prefabArray) {<NEW_LINE>world.addPrefab((EntityData.Prefab) context.deserialize(prefabElem, EntityData.Prefab.class));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>JsonArray entityArray = jsonObject.getAsJsonArray("entity");<NEW_LINE>if (entityArray != null) {<NEW_LINE>for (JsonElement entityElem : entityArray) {<NEW_LINE>world.addEntity((EntityData.Entity) context.deserialize(entityElem, EntityData.Entity.class));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>JsonPrimitive nextId = jsonObject.getAsJsonPrimitive("next_entity_id");<NEW_LINE>if (nextId != null) {<NEW_LINE>world.setNextEntityId(nextId.getAsInt());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return world.build();<NEW_LINE>}
prefabArray = jsonObject.getAsJsonArray("prefab");
202,609
protected void updateStats(PageHeader pageHeader, String op, long start, long time, long bytesin, long bytesout) {<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>logger.trace("ParquetTrace,{},{},{},{},{},{},{},{}", op, pageHeader.type == PageType.DICTIONARY_PAGE ? "Dictionary Page" : "Data Page", this.parentColumnReader.parentReader.getHadoopPath(), this.columnDescriptor.toString(), start, bytesin, bytesout, time);<NEW_LINE>}<NEW_LINE>if (pageHeader.type == PageType.DICTIONARY_PAGE) {<NEW_LINE>if (bytesin == bytesout) {<NEW_LINE>this.stats.timeDictPageLoads.addAndGet(time);<NEW_LINE>this.stats.numDictPageLoads.incrementAndGet();<NEW_LINE>this.stats.totalDictPageReadBytes.addAndGet(bytesin);<NEW_LINE>} else {<NEW_LINE>this.stats.timeDictPagesDecompressed.addAndGet(time);<NEW_LINE>this.stats.numDictPagesDecompressed.incrementAndGet();<NEW_LINE>this.stats.totalDictDecompressedBytes.addAndGet(bytesin);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (bytesin == bytesout) {<NEW_LINE>this.stats.timeDataPageLoads.addAndGet(time);<NEW_LINE>this<MASK><NEW_LINE>this.stats.totalDataPageReadBytes.addAndGet(bytesin);<NEW_LINE>} else {<NEW_LINE>this.stats.timeDataPagesDecompressed.addAndGet(time);<NEW_LINE>this.stats.numDataPagesDecompressed.incrementAndGet();<NEW_LINE>this.stats.totalDataDecompressedBytes.addAndGet(bytesin);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.stats.numDataPageLoads.incrementAndGet();