idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
28,700
private RemotingCommand processReplyMessageRequest(final ChannelHandlerContext ctx, final RemotingCommand request, final SendMessageContext sendMessageContext, final SendMessageRequestHeader requestHeader) {<NEW_LINE>final RemotingCommand response = RemotingCommand.createResponseCommand(SendMessageResponseHeader.class);<NEW_LINE>final SendMessageResponseHeader responseHeader = (SendMessageResponseHeader) response.readCustomHeader();<NEW_LINE>response.setOpaque(request.getOpaque());<NEW_LINE>response.addExtField(MessageConst.PROPERTY_MSG_REGION, this.brokerController.getBrokerConfig().getRegionId());<NEW_LINE>response.addExtField(MessageConst.PROPERTY_TRACE_SWITCH, String.valueOf(this.brokerController.getBrokerConfig().isTraceOn()));<NEW_LINE>log.debug("receive SendReplyMessage request command, {}", request);<NEW_LINE>final long startTimstamp = this.brokerController.getBrokerConfig().getStartAcceptSendRequestTimeStamp();<NEW_LINE>if (this.brokerController.getMessageStore().now() < startTimstamp) {<NEW_LINE>response.setCode(ResponseCode.SYSTEM_ERROR);<NEW_LINE>response.setRemark(String.format("broker unable to service, until %s", <MASK><NEW_LINE>return response;<NEW_LINE>}<NEW_LINE>response.setCode(-1);<NEW_LINE>super.msgCheck(ctx, requestHeader, response);<NEW_LINE>if (response.getCode() != -1) {<NEW_LINE>return response;<NEW_LINE>}<NEW_LINE>final byte[] body = request.getBody();<NEW_LINE>int queueIdInt = requestHeader.getQueueId();<NEW_LINE>TopicConfig topicConfig = this.brokerController.getTopicConfigManager().selectTopicConfig(requestHeader.getTopic());<NEW_LINE>if (queueIdInt < 0) {<NEW_LINE>queueIdInt = ThreadLocalRandom.current().nextInt(99999999) % topicConfig.getWriteQueueNums();<NEW_LINE>}<NEW_LINE>MessageExtBrokerInner msgInner = new MessageExtBrokerInner();<NEW_LINE>msgInner.setTopic(requestHeader.getTopic());<NEW_LINE>msgInner.setQueueId(queueIdInt);<NEW_LINE>msgInner.setBody(body);<NEW_LINE>msgInner.setFlag(requestHeader.getFlag());<NEW_LINE>MessageAccessor.setProperties(msgInner, MessageDecoder.string2messageProperties(requestHeader.getProperties()));<NEW_LINE>msgInner.setPropertiesString(requestHeader.getProperties());<NEW_LINE>msgInner.setBornTimestamp(requestHeader.getBornTimestamp());<NEW_LINE>msgInner.setBornHost(ctx.channel().remoteAddress());<NEW_LINE>msgInner.setStoreHost(this.getStoreHost());<NEW_LINE>msgInner.setReconsumeTimes(requestHeader.getReconsumeTimes() == null ? 0 : requestHeader.getReconsumeTimes());<NEW_LINE>PushReplyResult pushReplyResult = this.pushReplyMessage(ctx, requestHeader, msgInner);<NEW_LINE>this.handlePushReplyResult(pushReplyResult, response, responseHeader, queueIdInt);<NEW_LINE>if (this.brokerController.getBrokerConfig().isStoreReplyMessageEnable()) {<NEW_LINE>PutMessageResult putMessageResult = this.brokerController.getMessageStore().putMessage(msgInner);<NEW_LINE>this.handlePutMessageResult(putMessageResult, request, msgInner, responseHeader, sendMessageContext, queueIdInt);<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
UtilAll.timeMillisToHumanString2(startTimstamp)));
267,044
private static void solve() {<NEW_LINE>int base = 10;<NEW_LINE>Solver solver = new Solver("SendMoreMoney");<NEW_LINE>IntVar s = solver.makeIntVar(0, base - 1, "s");<NEW_LINE>IntVar e = solver.makeIntVar(0, base - 1, "e");<NEW_LINE>IntVar n = solver.makeIntVar(0, base - 1, "n");<NEW_LINE>IntVar d = solver.makeIntVar(0, base - 1, "d");<NEW_LINE>IntVar m = solver.makeIntVar(0, base - 1, "m");<NEW_LINE>IntVar o = solver.makeIntVar(0, base - 1, "o");<NEW_LINE>IntVar r = solver.makeIntVar(0, base - 1, "r");<NEW_LINE>IntVar y = solver.makeIntVar(0, base - 1, "y");<NEW_LINE>IntVar[] x = { s, e, n, d, m, o, r, y };<NEW_LINE>IntVar[] eq = { s, e, n, d, m, o, r, e, m, o, n, e, y };<NEW_LINE>int[] coeffs = { // S E N D +<NEW_LINE>1000, // S E N D +<NEW_LINE>100, // S E N D +<NEW_LINE>10, // M O R E<NEW_LINE>1, // M O R E<NEW_LINE>1000, // M O R E<NEW_LINE>100, // M O R E<NEW_LINE>10, // == M O N E Y<NEW_LINE>1, // == M O N E Y<NEW_LINE>-10000, // == M O N E Y<NEW_LINE>-1000, // == M O N E Y<NEW_LINE>-100, // == M O N E Y<NEW_LINE>-10, -1 };<NEW_LINE>solver.addConstraint(solver.makeScalProdEquality(eq, coeffs, 0));<NEW_LINE>// alternative:<NEW_LINE>solver.addConstraint(solver.makeScalProdEquality(new IntVar[] { s, e, n, d, m, o, r, e, m, o, n, e, <MASK><NEW_LINE>// s > 0<NEW_LINE>solver.addConstraint(solver.makeGreater(s, 0));<NEW_LINE>// m > 0<NEW_LINE>solver.addConstraint(solver.makeGreater(m, 0));<NEW_LINE>solver.addConstraint(solver.makeAllDifferent(x));<NEW_LINE>DecisionBuilder db = solver.makePhase(x, solver.INT_VAR_DEFAULT, solver.INT_VALUE_DEFAULT);<NEW_LINE>solver.newSearch(db);<NEW_LINE>while (solver.nextSolution()) {<NEW_LINE>for (int i = 0; i < 8; i++) {<NEW_LINE>System.out.print(x[i].toString() + " ");<NEW_LINE>}<NEW_LINE>System.out.println();<NEW_LINE>}<NEW_LINE>solver.endSearch();<NEW_LINE>// Statistics<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("Solutions: " + solver.solutions());<NEW_LINE>System.out.println("Failures: " + solver.failures());<NEW_LINE>System.out.println("Branches: " + solver.branches());<NEW_LINE>System.out.println("Wall time: " + solver.wallTime() + "ms");<NEW_LINE>}
y }, coeffs, 0));
1,452,816
private void loadNode1174() throws IOException, SAXException {<NEW_LINE>DataTypeDescriptionTypeNode node = new DataTypeDescriptionTypeNode(this.context, Identifiers.OpcUa_BinarySchema_FilterOperand, new QualifiedName(0, "FilterOperand"), new LocalizedText("en", "FilterOperand"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.String, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.OpcUa_BinarySchema_FilterOperand, Identifiers.HasTypeDefinition, Identifiers.DataTypeDescriptionType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.OpcUa_BinarySchema_FilterOperand, Identifiers.HasComponent, Identifiers.OpcUa_BinarySchema<MASK><NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<String xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\">FilterOperand</String>");<NEW_LINE>String xml = sb.toString();<NEW_LINE>OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).setInput(new StringReader(xml));<NEW_LINE>Object o = decoder.readVariantValue();<NEW_LINE>DataValue value = new DataValue(new Variant(o));<NEW_LINE>node.setValue(value);<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), false));
114,549
public AlgorithmSpecification unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AlgorithmSpecification algorithmSpecification = new AlgorithmSpecification();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("containerImage", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>algorithmSpecification.setContainerImage(ContainerImageJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("scriptModeConfig", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>algorithmSpecification.setScriptModeConfig(ScriptModeConfigJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return algorithmSpecification;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,476,540
ReferenceBinding resolve() {<NEW_LINE>if ((this.tagBits & TagBits.HasUnresolvedTypeVariables) == 0)<NEW_LINE>return this;<NEW_LINE>// can be recursive so only want to call once<NEW_LINE><MASK><NEW_LINE>// still part of parameterized type ref<NEW_LINE>ReferenceBinding resolvedType = (ReferenceBinding) BinaryTypeBinding.resolveType(this.type, this.environment, false);<NEW_LINE>this.tagBits |= resolvedType.tagBits & TagBits.ContainsNestedTypeReferences;<NEW_LINE>if (this.arguments != null) {<NEW_LINE>int argLength = this.arguments.length;<NEW_LINE>if ((this.type.tagBits & TagBits.HasMissingType) == 0) {<NEW_LINE>// start from fresh and collect information anew<NEW_LINE>this.tagBits &= ~TagBits.HasMissingType;<NEW_LINE>if (this.enclosingType != null)<NEW_LINE>this.tagBits |= this.enclosingType.tagBits & TagBits.HasMissingType;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < argLength; i++) {<NEW_LINE>TypeBinding resolveType = BinaryTypeBinding.resolveType(this.arguments[i], this.environment, true);<NEW_LINE>this.arguments[i] = resolveType;<NEW_LINE>this.tagBits |= resolvedType.tagBits & (TagBits.ContainsNestedTypeReferences | TagBits.HasMissingType);<NEW_LINE>}<NEW_LINE>// // arity check<NEW_LINE>// TypeVariableBinding[] refTypeVariables = resolvedType.typeVariables();<NEW_LINE>// if (refTypeVariables == Binding.NO_TYPE_VARIABLES) { // check generic<NEW_LINE>// // Below 1.5, we should have already complained about the use of type parameters.<NEW_LINE>// boolean isCompliant15 = this.environment.globalOptions.originalSourceLevel >= ClassFileConstants.JDK1_5;<NEW_LINE>// if (isCompliant15 && (resolvedType.tagBits & TagBits.HasMissingType) == 0) {<NEW_LINE>// this.environment.problemReporter.nonGenericTypeCannotBeParameterized(0, null, resolvedType, this.arguments);<NEW_LINE>// }<NEW_LINE>// return this;<NEW_LINE>// } else if (argLength != refTypeVariables.length) { // check arity<NEW_LINE>// this.environment.problemReporter.incorrectArityForParameterizedType(null, resolvedType, this.arguments);<NEW_LINE>// return this; // cannot reach here as AbortCompilation is thrown<NEW_LINE>// }<NEW_LINE>// check argument type compatibility... REMOVED for now since incremental build will propagate change & detect in source<NEW_LINE>// for (int i = 0; i < argLength; i++) {<NEW_LINE>// TypeBinding resolvedArgument = this.arguments[i];<NEW_LINE>// if (refTypeVariables[i].boundCheck(this, resolvedArgument) != TypeConstants.OK) {<NEW_LINE>// this.environment.problemReporter.typeMismatchError(resolvedArgument, refTypeVariables[i], resolvedType, null);<NEW_LINE>// }<NEW_LINE>// }<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
this.tagBits &= ~TagBits.HasUnresolvedTypeVariables;
1,411,636
private void uiInit() throws Exception {<NEW_LINE>setSize(250, 250);<NEW_LINE>setLayout(new BoxLayout(this, BoxLayout.X_AXIS));<NEW_LINE>setBackground(AppColors.BACKGROUND);<NEW_LINE>// setOpaque(true);<NEW_LINE>setAlignmentX(Component.LEFT_ALIGNMENT);<NEW_LINE>setBorder(BORDER_CONTROL);<NEW_LINE>checkbox = new JCheckBox();<NEW_LINE>add(checkbox);<NEW_LINE>checkbox.setAlignmentX(Component.LEFT_ALIGNMENT);<NEW_LINE>checkbox.addActionListener(new java.awt.event.ActionListener() {<NEW_LINE><NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>layerVisAction();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>checkbox.setSelected(layer.isEnabled());<NEW_LINE>checkbox.setOpaque(false);<NEW_LINE>lblName = new LayerName(layer);<NEW_LINE>lblName.setAlignmentX(Component.LEFT_ALIGNMENT);<NEW_LINE>lblName.setMinimumSize(new Dimension(100, 12));<NEW_LINE>lblName.setPreferredSize(new Dimension(100, 12));<NEW_LINE>lblName.setMaximumSize(new Dimension(100, 12));<NEW_LINE>lblName.setFont(FONT_NORMAL);<NEW_LINE>lblName.<MASK><NEW_LINE>lblName.addMouseListener(new MouseAdapter() {<NEW_LINE><NEW_LINE>public void mouseClicked(MouseEvent e) {<NEW_LINE>lyrListPanel.setLayerFocus(self);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>swatch = LayerStyleSwatchControl.create(layer);<NEW_LINE>add(swatch);<NEW_LINE>add(Box.createRigidArea(new Dimension(4, 0)));<NEW_LINE>namePanel = new JPanel();<NEW_LINE>add(namePanel);<NEW_LINE>namePanel.setLayout(new BoxLayout(namePanel, BoxLayout.X_AXIS));<NEW_LINE>// namePanel.setBackground(CLR_CONTROL);<NEW_LINE>namePanel.setOpaque(false);<NEW_LINE>namePanel.setAlignmentX(Component.LEFT_ALIGNMENT);<NEW_LINE>namePanel.setMinimumSize(new Dimension(100, 14));<NEW_LINE>namePanel.setPreferredSize(new Dimension(100, 14));<NEW_LINE>namePanel.setMaximumSize(new Dimension(100, 14));<NEW_LINE>// namePanel.setBorder(BORDER_HIGHLIGHT);;<NEW_LINE>namePanel.addMouseListener(new HighlightMouseListener(this));<NEW_LINE>namePanel.add(lblName);<NEW_LINE>}
addMouseListener(new HighlightMouseListener(this));
1,139,090
private void processAckInputStream() {<NEW_LINE>Preconditions.checkNotNull(stream);<NEW_LINE>final byte[] buffer = new byte[FOUR_KB];<NEW_LINE>int bytesRead;<NEW_LINE>log.info("Starting ACK processing");<NEW_LINE>try {<NEW_LINE>while (!closed) {<NEW_LINE>// This is a blocking operation<NEW_LINE>bytesRead = ackStream.read(buffer);<NEW_LINE>String bytesString = null;<NEW_LINE>if (bytesRead > 0) {<NEW_LINE>bytesString = new String(buffer, 0, bytesRead, Charset.forName("UTF-8"));<NEW_LINE>}<NEW_LINE>// Check for end-of-stream and 0 before processing<NEW_LINE>if (bytesRead == -1 || END_OF_STREAM_MSG.equals(bytesString)) {<NEW_LINE>// End-of-stream<NEW_LINE>log.debug("Received end-of-stream for ACKs.");<NEW_LINE>closed = true;<NEW_LINE>} else if (bytesRead != 0) {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>stream.parseFragmentAck(uploadHandle, bytesString);<NEW_LINE>} catch (final ProducerException e) {<NEW_LINE>// Log the exception<NEW_LINE>log.exception(e, "Processing ACK threw an exception. Logging and continuing. ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>log.debug("Finished reading ACKs stream");<NEW_LINE>} catch (final IOException e) {<NEW_LINE>// Log and exit<NEW_LINE>log.exception(e);<NEW_LINE>} finally {<NEW_LINE>stoppedLatch.countDown();<NEW_LINE>}<NEW_LINE>}
log.debug("Received ACK bits: " + bytesString);
707,905
private ClassLoadContext createDeclarationContext(Collection<VariableDeclarationSnippet> variableDeclarations, Collection<Identifier> variableNames, Map<Identifier, ModuleMemberDeclarationSnippet> moduleDeclarations) {<NEW_LINE>// Load current declarations<NEW_LINE>Map<Identifier, VariableContext> oldVarDclns = globalVariableContexts();<NEW_LINE>Map<Identifier, String> moduleDclnStringsMap = new HashMap<>(moduleDclns);<NEW_LINE>StringJoiner lastVarDclns = new StringJoiner("\n");<NEW_LINE>Set<String> importStrings = new HashSet<>();<NEW_LINE>// Remove old declarations and add new declarations<NEW_LINE>for (Map.Entry<Identifier, ModuleMemberDeclarationSnippet> dcln : moduleDeclarations.entrySet()) {<NEW_LINE>importStrings.addAll(getRequiredImportStatements(dcln.getValue()));<NEW_LINE>moduleDclnStringsMap.put(dcln.getKey(), dcln.getValue().toString());<NEW_LINE>}<NEW_LINE>// Remove old variable names and process new variable dclns<NEW_LINE>variableNames.forEach(oldVarDclns::remove);<NEW_LINE>for (VariableDeclarationSnippet varSnippet : variableDeclarations) {<NEW_LINE>lastVarDclns.add(varSnippet.toString());<NEW_LINE>importStrings.addAll(getRequiredImportStatements(varSnippet));<NEW_LINE>}<NEW_LINE>Collection<String> variableNameStrs = variableNames.stream().map(Identifier::getName).collect(Collectors.toSet());<NEW_LINE>return new ClassLoadContext(this.contextId, importStrings, moduleDclnStringsMap.values(), oldVarDclns.values(), <MASK><NEW_LINE>}
variableNameStrs, lastVarDclns.toString());
508,719
public static void quickSort(long[] array, float[] values, int low, int high) {<NEW_LINE>if (low < high) {<NEW_LINE>int mid = (low + high) / 2;<NEW_LINE>long tmp = array[mid];<NEW_LINE>float tmpValue = values[mid];<NEW_LINE>array[mid] = array[low];<NEW_LINE>values[mid] = values[low];<NEW_LINE>array[low] = tmp;<NEW_LINE>values[low] = tmpValue;<NEW_LINE>int ii = low, jj = high;<NEW_LINE>while (ii < jj) {<NEW_LINE>while (ii < jj && array[jj] >= tmp) {<NEW_LINE>jj--;<NEW_LINE>}<NEW_LINE>array[ii] = array[jj];<NEW_LINE>values[ii] = values[jj];<NEW_LINE>while (ii < jj && array[ii] <= tmp) {<NEW_LINE>ii++;<NEW_LINE>}<NEW_LINE>array[jj] = array[ii];<NEW_LINE>values[jj] = values[ii];<NEW_LINE>}<NEW_LINE>array[ii] = tmp;<NEW_LINE>values[ii] = tmpValue;<NEW_LINE>quickSort(array, <MASK><NEW_LINE>quickSort(array, values, ii + 1, high);<NEW_LINE>}<NEW_LINE>}
values, low, ii - 1);
1,201,461
private void applyTypeValues(Destination dest, Name type) {<NEW_LINE>if (Destination.TYPE_XYZ.equals(type)) {<NEW_LINE>leftTextField.setText(getDestCoordinate(dest.getLeft()));<NEW_LINE>topTextField.setText(getDestCoordinate(dest.getTop()));<NEW_LINE>zoomTextField.setText(getDestCoordinate(dest.getZoom()));<NEW_LINE>} else if (Destination.TYPE_FIT.equals(type)) {<NEW_LINE>// nothing to do<NEW_LINE>} else if (Destination.TYPE_FITH.equals(type)) {<NEW_LINE>// get top value<NEW_LINE>topTextField.setText(getDestCoordinate(dest.getTop()));<NEW_LINE>} else if (Destination.TYPE_FITV.equals(type)) {<NEW_LINE>// get left value<NEW_LINE>leftTextField.setText(getDestCoordinate(dest.getLeft()));<NEW_LINE>} else if (Destination.TYPE_FITR.equals(type)) {<NEW_LINE>// left, bottom right and top.<NEW_LINE>leftTextField.setText(getDestCoordinate(dest.getLeft()));<NEW_LINE>rightTextField.setText(getDestCoordinate<MASK><NEW_LINE>topTextField.setText(getDestCoordinate(dest.getTop()));<NEW_LINE>bottomTextField.setText(getDestCoordinate(dest.getBottom()));<NEW_LINE>} else if (Destination.TYPE_FITB.equals(type)) {<NEW_LINE>// nothing to do.<NEW_LINE>} else if (Destination.TYPE_FITH.equals(type)) {<NEW_LINE>// get the top<NEW_LINE>topTextField.setText(getDestCoordinate(dest.getTop()));<NEW_LINE>} else if (Destination.TYPE_FITBV.equals(type)) {<NEW_LINE>// get the left<NEW_LINE>leftTextField.setText(getDestCoordinate(dest.getLeft()));<NEW_LINE>}<NEW_LINE>}
(dest.getRight()));
243,768
final ListResolverEndpointIpAddressesResult executeListResolverEndpointIpAddresses(ListResolverEndpointIpAddressesRequest listResolverEndpointIpAddressesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listResolverEndpointIpAddressesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListResolverEndpointIpAddressesRequest> request = null;<NEW_LINE>Response<ListResolverEndpointIpAddressesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListResolverEndpointIpAddressesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listResolverEndpointIpAddressesRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Route53Resolver");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListResolverEndpointIpAddresses");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListResolverEndpointIpAddressesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListResolverEndpointIpAddressesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
854,581
final GetWirelessGatewayTaskResult executeGetWirelessGatewayTask(GetWirelessGatewayTaskRequest getWirelessGatewayTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getWirelessGatewayTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetWirelessGatewayTaskRequest> request = null;<NEW_LINE>Response<GetWirelessGatewayTaskResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetWirelessGatewayTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getWirelessGatewayTaskRequest));<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.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetWirelessGatewayTask");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetWirelessGatewayTaskResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetWirelessGatewayTaskResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT Wireless");
1,529,621
protected void lowerLoadHubOrNullNode(LoadHubOrNullNode loadHubOrNullNode, LoweringTool tool) {<NEW_LINE>StructuredGraph graph = loadHubOrNullNode.graph();<NEW_LINE>if (tool.getLoweringStage() != LoweringTool.StandardLoweringStage.LOW_TIER) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (graph.getGuardsStage().allowsFloatingGuards()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ValueNode object = loadHubOrNullNode.getValue();<NEW_LINE>if (object.isConstant() && !object.asJavaConstant().isNull()) {<NEW_LINE>ValueNode synonym = LoadHubNode.findSynonym(object, loadHubOrNullNode.stamp(NodeView.DEFAULT), tool.getMetaAccess(), tool.getConstantReflection());<NEW_LINE>if (synonym != null) {<NEW_LINE>loadHubOrNullNode.replaceAtUsagesAndDelete(graph.addOrUnique(synonym));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LINE>final ValueNode value = loadHubOrNullNode.getValue();<NEW_LINE>AbstractPointerStamp stamp = (AbstractPointerStamp) value.stamp(NodeView.DEFAULT);<NEW_LINE>final LogicNode isNull = graph.addOrUniqueWithInputs(IsNullNode.create(value));<NEW_LINE>final EndNode trueEnd = graph.add(new EndNode());<NEW_LINE>final EndNode falseEnd = graph.add(new EndNode());<NEW_LINE>final IfNode ifNode = graph.add(new IfNode(isNull, trueEnd, falseEnd, BranchProbabilityData.unknown()));<NEW_LINE>final MergeNode merge = graph.add(new MergeNode());<NEW_LINE>merge.addForwardEnd(trueEnd);<NEW_LINE>merge.addForwardEnd(falseEnd);<NEW_LINE>final AbstractPointerStamp hubStamp = (AbstractPointerStamp) loadHubOrNullNode.stamp(NodeView.DEFAULT);<NEW_LINE>ValueNode nullHub = ConstantNode.forConstant(hubStamp.asAlwaysNull(), JavaConstant.NULL_POINTER, tool.getMetaAccess(), graph);<NEW_LINE>final ValueNode nonNullValue = graph.addOrUniqueWithInputs(PiNode.create(value, stamp.asNonNull(), ifNode.falseSuccessor()));<NEW_LINE>ValueNode hub = createReadHub(graph, nonNullValue, tool);<NEW_LINE>ValueNode[] values = new ValueNode[] { nullHub, hub };<NEW_LINE>final PhiNode hubPhi = graph.unique(new ValuePhiNode(hubStamp, merge, values));<NEW_LINE>final FixedNode oldNext = predecessor.next();<NEW_LINE>predecessor.setNext(ifNode);<NEW_LINE>merge.setNext(oldNext);<NEW_LINE>loadHubOrNullNode.replaceAtUsagesAndDelete(hubPhi);<NEW_LINE>}
FixedWithNextNode predecessor = tool.lastFixedNode();
1,650,705
private static Cigar createNewCigarIfMapsOffEndOfReference(SAMFileHeader header, boolean isUnmapped, int referenceIndex, int alignmentEnd, int readLength, Cigar oldCigar) {<NEW_LINE>Cigar newCigar = null;<NEW_LINE>if (!isUnmapped) {<NEW_LINE>final SAMSequenceRecord refseq = header.getSequence(referenceIndex);<NEW_LINE>final int overhang = alignmentEnd - refseq.getSequenceLength();<NEW_LINE>if (overhang > 0) {<NEW_LINE>// 1-based index of first base in read to clip.<NEW_LINE>int clipFrom = readLength - overhang + 1;<NEW_LINE>// we have to check if the last element is soft-clipping, so we can subtract that from clipFrom<NEW_LINE>final CigarElement cigarElement = oldCigar.getCigarElement(<MASK><NEW_LINE>if (CigarOperator.SOFT_CLIP == cigarElement.getOperator())<NEW_LINE>clipFrom -= cigarElement.getLength();<NEW_LINE>final List<CigarElement> newCigarElements = CigarUtil.softClipEndOfRead(clipFrom, oldCigar.getCigarElements());<NEW_LINE>newCigar = new Cigar(newCigarElements);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return newCigar;<NEW_LINE>}
oldCigar.numCigarElements() - 1);
1,015,522
static Bundle jsonFromGoogleUser(@NonNull GoogleSignInAccount acct) {<NEW_LINE>Bundle auth = new Bundle();<NEW_LINE>auth.putString("accessToken", null);<NEW_LINE>auth.putString("accessTokenExpirationDate", null);<NEW_LINE>auth.putString("refreshToken", null);<NEW_LINE>auth.putString("idToken", acct.getIdToken());<NEW_LINE>// auth.putDouble("idTokenExpirationDate", acct.getExpirationTimeSecs());<NEW_LINE><MASK><NEW_LINE>Bundle user = new Bundle();<NEW_LINE>user.putString("uid", acct.getId());<NEW_LINE>user.putString("displayName", acct.getDisplayName());<NEW_LINE>user.putString("firstName", acct.getGivenName());<NEW_LINE>user.putString("lastName", acct.getFamilyName());<NEW_LINE>user.putString("email", acct.getEmail());<NEW_LINE>user.putString("photoURL", photoUrl != null ? photoUrl.toString() : null);<NEW_LINE>user.putString("serverAuthCode", acct.getServerAuthCode());<NEW_LINE>user.putBundle("auth", auth);<NEW_LINE>// TODO: Bacon: If google ever surfaces this value, we should add it for parity with iOS<NEW_LINE>user.putString("domain", null);<NEW_LINE>ArrayList scopes = new ArrayList();<NEW_LINE>for (Scope scope : acct.getGrantedScopes()) {<NEW_LINE>String scopeString = scope.toString();<NEW_LINE>if (scopeString.startsWith("http")) {<NEW_LINE>scopes.add(scopeString);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>user.putStringArrayList("scopes", scopes);<NEW_LINE>return user;<NEW_LINE>}
Uri photoUrl = acct.getPhotoUrl();
56,122
private void saveSettings(Client client, PClient.Builder newClient) {<NEW_LINE>PSettings.Builder newSettings = PSettings.newBuilder();<NEW_LINE>ClientSettings settings = client.getSettings();<NEW_LINE>settings.getBookmarks().forEach(b -> {<NEW_LINE>PBookmark.Builder newBookmark = PBookmark.newBuilder();<NEW_LINE>newBookmark.setLabel(b.getLabel());<NEW_LINE>newBookmark.setPattern(b.getPattern());<NEW_LINE>newSettings.addBookmarks(newBookmark);<NEW_LINE>});<NEW_LINE>settings.getAttributeTypes().forEach(t -> {<NEW_LINE>PAttributeType.Builder newAttributeType = PAttributeType.newBuilder();<NEW_LINE>newAttributeType.setId(t.getId());<NEW_LINE>newAttributeType.setName(t.getName());<NEW_LINE>newAttributeType.setColumnLabel(t.getColumnLabel());<NEW_LINE>if (t.getSource() != null)<NEW_LINE>newAttributeType.setSource(t.getSource());<NEW_LINE>newAttributeType.setTarget(t.getTarget().getName());<NEW_LINE>newAttributeType.setType(t.getType().getName());<NEW_LINE>newAttributeType.setConverterClass(t.getConverter().getClass().getName());<NEW_LINE>newAttributeType.setProperties(t.getProperties().toProto());<NEW_LINE>newSettings.addAttributeTypes(newAttributeType);<NEW_LINE>});<NEW_LINE>for (Map.Entry<String, ConfigurationSet> entry : settings.getConfigurationSets()) {<NEW_LINE>entry.getValue().getConfigurations().forEach(config -> {<NEW_LINE>// configuration data can be null if the file is empty with no<NEW_LINE>// securities<NEW_LINE>if (config.getData() != null) {<NEW_LINE>PConfigurationSet.Builder newConfigurationSet = PConfigurationSet.newBuilder();<NEW_LINE>newConfigurationSet.setKey(entry.getKey());<NEW_LINE>newConfigurationSet.setUuid(config.getUUID());<NEW_LINE>newConfigurationSet.setName(config.getName());<NEW_LINE>newConfigurationSet.<MASK><NEW_LINE>newSettings.addConfigurationSets(newConfigurationSet);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>newClient.setSettings(newSettings);<NEW_LINE>}
setData(config.getData());
1,734,169
public ListShardsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListShardsResult listShardsResult = new ListShardsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return listShardsResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Shards", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listShardsResult.setShards(new ListUnmarshaller<Shard>(ShardJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listShardsResult.setNextToken(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return listShardsResult;<NEW_LINE>}
class).unmarshall(context));
569,899
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>refreshLabel = new javax.swing.JLabel();<NEW_LINE>refreshButton = new javax.swing.JButton();<NEW_LINE>closeButton = new javax.swing.JButton();<NEW_LINE>setBackground(new java.awt.Color(0, 51, 51));<NEW_LINE>setLayout(new java.awt.GridBagLayout());<NEW_LINE>refreshLabel.setForeground(new java.awt.Color(255, 255, 255));<NEW_LINE>// NOI18N<NEW_LINE>refreshLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/warning16.png")));<NEW_LINE>// NOI18N<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(refreshLabel, org.openide.util.NbBundle.getMessage(RefreshPanel.class, "RefreshPanel.refreshLabel.text"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 0;<NEW_LINE>gridBagConstraints.gridy = 0;<NEW_LINE>gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;<NEW_LINE>gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;<NEW_LINE>gridBagConstraints.weightx = 1.0;<NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(15, 10, 15, 10);<NEW_LINE>add(refreshLabel, gridBagConstraints);<NEW_LINE>// NOI18N<NEW_LINE>refreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/arrow-circle-double-135.png")));<NEW_LINE>// NOI18N<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(refreshButton, org.openide.util.NbBundle.getMessage(RefreshPanel.class, "RefreshPanel.refreshButton.text"));<NEW_LINE>refreshButton.setMargin(new java.awt.Insets(2, 5, 2, 5));<NEW_LINE>add(refreshButton, new <MASK><NEW_LINE>closeButton.setBackground(new java.awt.Color(0, 0, 0));<NEW_LINE>// NOI18N<NEW_LINE>closeButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/close-icon.png")));<NEW_LINE>// NOI18N<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(closeButton, org.openide.util.NbBundle.getMessage(RefreshPanel.class, "RefreshPanel.closeButton.text"));<NEW_LINE>closeButton.setMargin(new java.awt.Insets(0, 0, 0, 0));<NEW_LINE>closeButton.setOpaque(false);<NEW_LINE>closeButton.addActionListener(new java.awt.event.ActionListener() {<NEW_LINE><NEW_LINE>public void actionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>closeButtonActionPerformed(evt);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);<NEW_LINE>add(closeButton, gridBagConstraints);<NEW_LINE>}
java.awt.GridBagConstraints());
652,223
private void init() {<NEW_LINE>final AESemaphore sem = new AESemaphore("shell:create");<NEW_LINE>Utils.execSWTThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>shell = new Shell(display, SWT.SHELL_TRIM);<NEW_LINE>UIFunctionsManagerSWT.setUIFunctions(delayed_uif);<NEW_LINE>boolean <MASK><NEW_LINE>if (bEnableTray) {<NEW_LINE>swt_tray = SystemTraySWT.getTray();<NEW_LINE>}<NEW_LINE>MainHelpers.initTransferBar();<NEW_LINE>if (initialiser != null) {<NEW_LINE>initialiser.initializationComplete();<NEW_LINE>initialiser.abortProgress();<NEW_LINE>}<NEW_LINE>AERunStateHandler.addListener(new AERunStateHandler.RunStateChangeListener() {<NEW_LINE><NEW_LINE>private boolean handled = false;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void runStateChanged(long run_state) {<NEW_LINE>if (AERunStateHandler.isDelayedUI() || handled) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>handled = true;<NEW_LINE>checkMainWindow();<NEW_LINE>}<NEW_LINE>}, false);<NEW_LINE>UIManager ui_manager = PluginInitializer.getDefaultInterface().getUIManager();<NEW_LINE>ui_manager.addUIEventListener(ui_listener);<NEW_LINE>} finally {<NEW_LINE>sem.release();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>sem.reserve();<NEW_LINE>}
bEnableTray = COConfigurationManager.getBooleanParameter("Enable System Tray");
1,743,533
protected void buildBodyDeclarations(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration enumDeclaration2, EnumDeclaration enumDeclaration) {<NEW_LINE>// add body declaration in the lexical order<NEW_LINE>org.eclipse.jdt.internal.compiler.ast.TypeDeclaration[] members = enumDeclaration2.memberTypes;<NEW_LINE>org.eclipse.jdt.internal.compiler.ast.FieldDeclaration[] fields = enumDeclaration2.fields;<NEW_LINE>org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration[] methods = enumDeclaration2.methods;<NEW_LINE>int fieldsLength = fields == null ? 0 : fields.length;<NEW_LINE>int methodsLength = methods == null ? 0 : methods.length;<NEW_LINE>int membersLength = members == null ? 0 : members.length;<NEW_LINE>int fieldsIndex = 0;<NEW_LINE>int methodsIndex = 0;<NEW_LINE>int membersIndex = 0;<NEW_LINE>while ((fieldsIndex < fieldsLength) || (membersIndex < membersLength) || (methodsIndex < methodsLength)) {<NEW_LINE>org.eclipse.jdt.internal.<MASK><NEW_LINE>org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration nextMethodDeclaration = null;<NEW_LINE>org.eclipse.jdt.internal.compiler.ast.TypeDeclaration nextMemberDeclaration = null;<NEW_LINE>int position = Integer.MAX_VALUE;<NEW_LINE>int nextDeclarationType = -1;<NEW_LINE>if (fieldsIndex < fieldsLength) {<NEW_LINE>nextFieldDeclaration = fields[fieldsIndex];<NEW_LINE>if (nextFieldDeclaration.declarationSourceStart < position) {<NEW_LINE>position = nextFieldDeclaration.declarationSourceStart;<NEW_LINE>// FIELD<NEW_LINE>nextDeclarationType = 0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (methodsIndex < methodsLength) {<NEW_LINE>nextMethodDeclaration = methods[methodsIndex];<NEW_LINE>if (nextMethodDeclaration.declarationSourceStart < position) {<NEW_LINE>position = nextMethodDeclaration.declarationSourceStart;<NEW_LINE>// METHOD<NEW_LINE>nextDeclarationType = 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (membersIndex < membersLength) {<NEW_LINE>nextMemberDeclaration = members[membersIndex];<NEW_LINE>if (nextMemberDeclaration.declarationSourceStart < position) {<NEW_LINE>position = nextMemberDeclaration.declarationSourceStart;<NEW_LINE>// MEMBER<NEW_LINE>nextDeclarationType = 2;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>switch(nextDeclarationType) {<NEW_LINE>case 0:<NEW_LINE>if (nextFieldDeclaration.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT) {<NEW_LINE>enumDeclaration.enumConstants().add(convert(nextFieldDeclaration));<NEW_LINE>} else {<NEW_LINE>checkAndAddMultipleFieldDeclaration(fields, fieldsIndex, enumDeclaration.bodyDeclarations());<NEW_LINE>}<NEW_LINE>fieldsIndex++;<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>methodsIndex++;<NEW_LINE>if (!nextMethodDeclaration.isDefaultConstructor() && !nextMethodDeclaration.isClinit()) {<NEW_LINE>enumDeclaration.bodyDeclarations().add(convert(false, nextMethodDeclaration));<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>membersIndex++;<NEW_LINE>enumDeclaration.bodyDeclarations().add(convert(nextMemberDeclaration));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>convert(enumDeclaration2.javadoc, enumDeclaration);<NEW_LINE>}
compiler.ast.FieldDeclaration nextFieldDeclaration = null;
1,007,592
public String restore(FlinkInfo flinkInfo) {<NEW_LINE>RestClusterClient<StandaloneClusterId> client = null;<NEW_LINE>String localJarPath = flinkInfo.getLocalJarPath();<NEW_LINE>String[] programArgs = genProgramArgs(flinkInfo);<NEW_LINE>String jobId = "";<NEW_LINE>try {<NEW_LINE>client = getFlinkClient();<NEW_LINE>Configuration configuration = initConfiguration();<NEW_LINE>File jarFile = new File(localJarPath);<NEW_LINE>if (StringUtils.isNotEmpty(flinkInfo.getSavepointPath())) {<NEW_LINE>SavepointRestoreSettings savepointRestoreSettings = SavepointRestoreSettings.forPath(savepointDirectory, false);<NEW_LINE>PackagedProgram program = PackagedProgram.newBuilder().setConfiguration(configuration).setEntryPointClassName(Constants.ENTRYPOINT_CLASS).setJarFile(jarFile).setArguments(programArgs).<MASK><NEW_LINE>JobGraph jobGraph = PackagedProgramUtils.createJobGraph(program, configuration, parallelism, false);<NEW_LINE>CompletableFuture<JobID> result = client.submitJob(jobGraph);<NEW_LINE>jobId = result.get().toString();<NEW_LINE>return jobId;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("submit job error", e);<NEW_LINE>}<NEW_LINE>return jobId;<NEW_LINE>}
setSavepointRestoreSettings(savepointRestoreSettings).build();
1,146,243
public static SqlNode buildSqlLiteral(RexLiteral literal) {<NEW_LINE>switch(literal.getTypeName().getFamily()) {<NEW_LINE>case CHARACTER:<NEW_LINE>return SqlLiteral.createCharString((String) literal.getValue2(), POS);<NEW_LINE>case EXACT_INTEGER:<NEW_LINE>return SqlLiteral.createExactNumeric(literal.getValueAs(Integer.class<MASK><NEW_LINE>case NUMERIC:<NEW_LINE>case EXACT_NUMERIC:<NEW_LINE>return SqlLiteral.createExactNumeric(literal.getValue().toString(), POS);<NEW_LINE>case APPROXIMATE_NUMERIC:<NEW_LINE>return SqlLiteral.createApproxNumeric(literal.getValueAs(BigDecimal.class).toString(), POS);<NEW_LINE>case BOOLEAN:<NEW_LINE>return SqlLiteral.createBoolean(literal.getValueAs(Boolean.class), POS);<NEW_LINE>case INTERVAL_YEAR_MONTH:<NEW_LINE>case INTERVAL_DAY_TIME:<NEW_LINE>IntervalString intervalStr = (IntervalString) (literal.getValue());<NEW_LINE>return SqlLiteral.createInterval(intervalStr.getSign(), intervalStr.getIntervalStr(), literal.getType().getIntervalQualifier(), POS);<NEW_LINE>case DATE:<NEW_LINE>return SqlLiteral.createDate(literal.getValueAs(DateString.class), POS);<NEW_LINE>case TIME:<NEW_LINE>return SqlLiteral.createTime(literal.getValueAs(TimeString.class), literal.getType().getPrecision(), POS);<NEW_LINE>case TIMESTAMP:<NEW_LINE>return SqlLiteral.createTimestamp(literal.getValueAs(TimestampString.class), literal.getType().getPrecision(), POS);<NEW_LINE>case ANY:<NEW_LINE>case NULL:<NEW_LINE>switch(literal.getTypeName()) {<NEW_LINE>case NULL:<NEW_LINE>return SqlLiteral.createNull(POS);<NEW_LINE>}<NEW_LINE>case DATETIME_INTERVAL:<NEW_LINE>BigDecimal value = (BigDecimal) literal.getValue();<NEW_LINE>BigDecimal multiplier = literal.getType().getIntervalQualifier().getStartUnit().multiplier;<NEW_LINE>return SqlLiteral.createInterval(value.signum(), value.divide(multiplier).toString(), literal.getType().getIntervalQualifier(), POS);<NEW_LINE>case BINARY:<NEW_LINE>return SqlLiteral.createBinaryString(literal.getValue().toString(), POS);<NEW_LINE>default:<NEW_LINE>throw new AssertionError(literal + ": " + literal.getTypeName());<NEW_LINE>}<NEW_LINE>}
).toString(), POS);
1,516,879
public static BucketOrder readOrder(StreamInput in) throws IOException {<NEW_LINE>byte id = in.readByte();<NEW_LINE>switch(id) {<NEW_LINE>case COUNT_DESC_ID:<NEW_LINE>return COUNT_DESC;<NEW_LINE>case COUNT_ASC_ID:<NEW_LINE>return COUNT_ASC;<NEW_LINE>case KEY_DESC_ID:<NEW_LINE>return KEY_DESC;<NEW_LINE>case KEY_ASC_ID:<NEW_LINE>return KEY_ASC;<NEW_LINE>case Aggregation.ID:<NEW_LINE>boolean asc = in.readBoolean();<NEW_LINE>String key = in.readString();<NEW_LINE>return new Aggregation(key, asc);<NEW_LINE>case CompoundOrder.ID:<NEW_LINE><MASK><NEW_LINE>List<BucketOrder> compoundOrder = new ArrayList<>(size);<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>compoundOrder.add(Streams.readOrder(in));<NEW_LINE>}<NEW_LINE>return new CompoundOrder(compoundOrder, false);<NEW_LINE>default:<NEW_LINE>throw new RuntimeException("unknown order id [" + id + "]");<NEW_LINE>}<NEW_LINE>}
int size = in.readVInt();
184,702
public long executeLargeUpdate(String sql, String[] columnNames) throws SQLException {<NEW_LINE>// KEEP CODE IN SYNC: This method is duplicated in WSJdbc42Statement, WSJdbc42PreparedStatement,<NEW_LINE>// and WSJdbc42CallableStatement because multiple inheritance isn't allowed.<NEW_LINE>final <MASK><NEW_LINE>if (isTraceOn && tc.isEntryEnabled())<NEW_LINE>Tr.entry(this, tc, "executeLargeUpdate", sql, Arrays.toString(columnNames));<NEW_LINE>long numUpdates;<NEW_LINE>try {<NEW_LINE>if (childWrapper != null)<NEW_LINE>closeAndRemoveResultSet();<NEW_LINE>if (childWrappers != null && !childWrappers.isEmpty())<NEW_LINE>closeAndRemoveResultSets();<NEW_LINE>parentWrapper.beginTransactionIfNecessary();<NEW_LINE>enforceStatementProperties();<NEW_LINE>numUpdates = stmtImpl.executeLargeUpdate(sql, columnNames);<NEW_LINE>} catch (SQLException ex) {<NEW_LINE>// No FFDC code needed. Might be an application error.<NEW_LINE>if (isTraceOn && tc.isEntryEnabled())<NEW_LINE>Tr.exit(this, tc, "executeLargeUpdate", ex);<NEW_LINE>throw WSJdbcUtil.mapException(this, ex);<NEW_LINE>} catch (NullPointerException nullX) {<NEW_LINE>// No FFDC code needed; we might be closed.<NEW_LINE>if (isTraceOn && tc.isEntryEnabled())<NEW_LINE>Tr.exit(this, tc, "executeLargeUpdate", nullX);<NEW_LINE>throw runtimeXIfNotClosed(nullX);<NEW_LINE>}<NEW_LINE>if (isTraceOn && tc.isEntryEnabled())<NEW_LINE>Tr.exit(this, tc, "executeLargeUpdate", numUpdates);<NEW_LINE>return numUpdates;<NEW_LINE>}
boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
1,853,176
private void prepareMount(LayoutState layoutState, @Nullable PerfEvent perfEvent) {<NEW_LINE>final boolean isTracing = RenderCoreSystrace.isEnabled();<NEW_LINE>if (isTracing) {<NEW_LINE>RenderCoreSystrace.beginSection("MountState.prepareMount");<NEW_LINE>}<NEW_LINE>final PrepareMountStats stats = unmountOrMoveOldItems(layoutState);<NEW_LINE>if (perfEvent != null) {<NEW_LINE>perfEvent.markerAnnotate(PARAM_UNMOUNTED_COUNT, stats.unmountedCount);<NEW_LINE>perfEvent.markerAnnotate(PARAM_MOVED_COUNT, stats.movedCount);<NEW_LINE>perfEvent.<MASK><NEW_LINE>}<NEW_LINE>if (mIndexToItemMap.get(ROOT_HOST_ID) == null || mHostsByMarker.get(ROOT_HOST_ID) == null) {<NEW_LINE>// Mounting always starts with the root host.<NEW_LINE>registerHost(ROOT_HOST_ID, mLithoView);<NEW_LINE>// Root host is implicitly marked as mounted.<NEW_LINE>mIndexToItemMap.put(ROOT_HOST_ID, mRootHostMountItem);<NEW_LINE>}<NEW_LINE>final int outputCount = layoutState.getMountableOutputCount();<NEW_LINE>if (mLayoutOutputsIds == null || outputCount != mLayoutOutputsIds.length) {<NEW_LINE>mLayoutOutputsIds = new long[outputCount];<NEW_LINE>}<NEW_LINE>for (int i = 0; i < outputCount; i++) {<NEW_LINE>mLayoutOutputsIds[i] = layoutState.getMountableOutputAt(i).getRenderUnit().getId();<NEW_LINE>}<NEW_LINE>if (isTracing) {<NEW_LINE>RenderCoreSystrace.endSection();<NEW_LINE>}<NEW_LINE>}
markerAnnotate(PARAM_UNCHANGED_COUNT, stats.unchangedCount);
1,518,809
public void deleteRepositoryTags(MetadataDAO metadataDAO, RepositoryIdentification repositoryIdentification, List<String> tagsList, boolean deleteAll, boolean canNotOperateOnProtected, RepositoryEnums.RepositoryTypeEnum repositoryType) throws ModelDBException {<NEW_LINE>try (var session = modelDBHibernateUtil.getSessionFactory().openSession()) {<NEW_LINE>session.beginTransaction();<NEW_LINE>var repositoryEntity = getRepositoryById(session, repositoryIdentification, true, canNotOperateOnProtected, repositoryType);<NEW_LINE>session.lock(repositoryEntity, LockMode.PESSIMISTIC_WRITE);<NEW_LINE>repositoryEntity.update();<NEW_LINE>metadataDAO.deleteLabels(IdentificationType.newBuilder().setIdType(VERSIONING_REPOSITORY).setIntId(repositoryIdentification.getRepoId()).<MASK><NEW_LINE>session.update(repositoryEntity);<NEW_LINE>session.getTransaction().commit();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>if (ModelDBUtils.needToRetry(ex)) {<NEW_LINE>deleteRepositoryTags(metadataDAO, repositoryIdentification, tagsList, deleteAll, canNotOperateOnProtected, repositoryType);<NEW_LINE>} else {<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
build(), tagsList, deleteAll);
894,035
private void printTerseNodeProperty(ConsoleView console, String indent, DiagnosticsNode property) {<NEW_LINE>boolean skip = true;<NEW_LINE>if (property.getLevel() == DiagnosticLevel.summary) {<NEW_LINE>skip = false;<NEW_LINE>} else if (property.hasChildren()) {<NEW_LINE>final CompletableFuture<ArrayList<DiagnosticsNode>> future = property.getChildren();<NEW_LINE>final ArrayList<DiagnosticsNode> children = future.getNow(emptyList);<NEW_LINE>if (children.stream().noneMatch(DiagnosticsNode::hasChildren)) {<NEW_LINE>skip = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (skip) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ConsoleViewContentType contentType = <MASK><NEW_LINE>console.print(indent, contentType);<NEW_LINE>if (property.getShowName()) {<NEW_LINE>console.print(property.getName(), contentType);<NEW_LINE>if (property.getShowSeparator()) {<NEW_LINE>console.print(property.getSeparator() + " ", contentType);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final String description = property.getDescription() == null ? "" : property.getDescription();<NEW_LINE>console.print(description + "\n", contentType);<NEW_LINE>final String childIndent = getChildIndent(indent, property);<NEW_LINE>if (property.hasInlineProperties()) {<NEW_LINE>for (DiagnosticsNode childProperty : property.getInlineProperties()) {<NEW_LINE>printDiagnosticsNodeProperty(console, childIndent, childProperty, contentType, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (property.hasChildren()) {<NEW_LINE>final CompletableFuture<ArrayList<DiagnosticsNode>> future = property.getChildren();<NEW_LINE>final ArrayList<DiagnosticsNode> children = future.getNow(emptyList);<NEW_LINE>for (DiagnosticsNode child : children) {<NEW_LINE>printDiagnosticsNodeProperty(console, childIndent, child, contentType, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getContentTypeFor(property.getLevel());
798,888
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED })<NEW_LINE>@Operation(operationId = "deleteSession", summary = "Delete the session associated with a refresh token.", responses = { @ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "User is not authenticated"), @ApiResponse(responseCode = "404", description = "User or refresh token not found") })<NEW_LINE>public Response deleteSession(@Nullable @FormParam("refresh_token") String refreshToken, @Nullable @FormParam("id") String id, @Nullable @CookieParam(SESSIONID_COOKIE_NAME) Cookie sessionCookie, @Context SecurityContext securityContext) {<NEW_LINE>if (securityContext.getUserPrincipal() == null) {<NEW_LINE>return JSONResponse.createErrorResponse(Status.UNAUTHORIZED, "User is not authenticated");<NEW_LINE>}<NEW_LINE>ManagedUser user = (ManagedUser) userRegistry.get(securityContext.getUserPrincipal().getName());<NEW_LINE>if (user == null) {<NEW_LINE>return JSONResponse.createErrorResponse(Status.NOT_FOUND, "User not found");<NEW_LINE>}<NEW_LINE>Optional<UserSession> session;<NEW_LINE>if (refreshToken != null) {<NEW_LINE>session = user.getSessions().stream().filter(s -> s.getRefreshToken().equals(refreshToken)).findAny();<NEW_LINE>} else if (id != null) {<NEW_LINE>session = user.getSessions().stream().filter(s -> s.getSessionId().startsWith(id <MASK><NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("no refresh_token or id specified");<NEW_LINE>}<NEW_LINE>if (session.isEmpty()) {<NEW_LINE>return JSONResponse.createErrorResponse(Status.NOT_FOUND, "Session not found");<NEW_LINE>}<NEW_LINE>ResponseBuilder response = Response.ok();<NEW_LINE>if (sessionCookie != null && sessionCookie.getValue().equals(session.get().getSessionId())) {<NEW_LINE>try {<NEW_LINE>URI domainUri = new URI(session.get().getRedirectUri());<NEW_LINE>NewCookie newCookie = new NewCookie(SESSIONID_COOKIE_NAME, null, "/", domainUri.getHost(), null, 0, false, true);<NEW_LINE>response.cookie(newCookie);<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>userRegistry.removeUserSession(user, session.get());<NEW_LINE>return response.build();<NEW_LINE>}
+ "-")).findAny();
1,350,704
public boolean handleAttribute(DDParser parser, String nsURI, String localName, int index) throws DDParser.ParseException {<NEW_LINE>if (nsURI == null) {<NEW_LINE>if ("type".equals(localName)) {<NEW_LINE>this.type = parser.parseEnumAttributeValue(index, com.ibm.ws.javaee.dd.webext.CacheVariable.TypeEnum.class);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if ("identifier".equals(localName)) {<NEW_LINE>this.<MASK><NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if ("method".equals(localName)) {<NEW_LINE>this.method = parser.parseStringAttributeValue(index);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if ("required".equals(localName)) {<NEW_LINE>this.required = parser.parseBooleanAttributeValue(index);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if ("data-id".equals(localName)) {<NEW_LINE>this.data_id = parser.parseStringAttributeValue(index);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if ("invalidate".equals(localName)) {<NEW_LINE>this.invalidate = parser.parseStringAttributeValue(index);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
identifier = parser.parseStringAttributeValue(index);
233,790
public FXFormNode call(Void param) {<NEW_LINE>tableView.setEditable(true);<NEW_LINE>tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);<NEW_LINE>tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);<NEW_LINE>return new FXFormNodeWrapper(new VBox(3, tableView, new HBox(5, addButton, removeButton)), tableView.itemsProperty()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void init(Element element, AbstractFXForm fxForm) {<NEW_LINE>super.init(element, fxForm);<NEW_LINE>Class wrappedType = element.getWrappedType();<NEW_LINE>List<Field> fields = ReflectionUtils.listFields(wrappedType);<NEW_LINE>for (Field field : fields) {<NEW_LINE>TableColumn col = new TableColumn(field.getName());<NEW_LINE>col.setCellValueFactory(new PropertyValueFactory<MASK><NEW_LINE>col.setCellFactory(list -> new TextFieldTableCell(new DefaultStringConverter()));<NEW_LINE>tableView.getColumns().add(col);<NEW_LINE>}<NEW_LINE>addButton.setOnAction(event -> {<NEW_LINE>try {<NEW_LINE>tableView.getItems().add(element.getWrappedType().getDeclaredConstructor().newInstance());<NEW_LINE>tableView.edit(tableView.getItems().size() - 1, (TableColumn) tableView.getColumns().get(0));<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>removeButton.setOnAction(event -> {<NEW_LINE>tableView.getItems().removeAll(tableView.getSelectionModel().getSelectedItems());<NEW_LINE>});<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
(field.getName()));
1,221,065
public void actionPerformed(ActionEvent e) {<NEW_LINE>NotifyDescriptor nd = new NotifyDescriptor.Confirmation(MSG_Remove_Module(), NotifyDescriptor.YES_NO_OPTION);<NEW_LINE>Object ret = DialogDisplayer.<MASK><NEW_LINE>if (ret == NotifyDescriptor.YES_OPTION) {<NEW_LINE>FileObject fo = FileUtil.toFileObject(parent.getPOMFile());<NEW_LINE>ModelOperation<POMModel> operation = new ModelOperation<POMModel>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void performOperation(POMModel model) {<NEW_LINE>List<String> modules = model.getProject().getModules();<NEW_LINE>if (modules != null) {<NEW_LINE>for (String path : modules) {<NEW_LINE>File rel = new File(parent.getPOMFile().getParent(), path);<NEW_LINE>File norm = FileUtil.normalizeFile(rel);<NEW_LINE>FileObject folder = FileUtil.toFileObject(norm);<NEW_LINE>if (folder != null && folder.equals(project.getProjectDirectory())) {<NEW_LINE>model.getProject().removeModule(path);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>org.netbeans.modules.maven.model.Utilities.performPOMModelOperations(fo, Collections.singletonList(operation));<NEW_LINE>// TODO is the manual reload necessary if pom.xml file is being saved?<NEW_LINE>NbMavenProject.fireMavenProjectReload(project);<NEW_LINE>}<NEW_LINE>}
getDefault().notify(nd);
1,072,569
private String issueProjectLine(MProject project) {<NEW_LINE>MProjectLine projectLine = new MProjectLine(getCtx(), getProjectLineId(), get_TrxName());<NEW_LINE>if (projectLine.getM_Product_ID() == 0)<NEW_LINE>throw new IllegalArgumentException("Projet Line has no Product");<NEW_LINE>if (projectLine.getC_ProjectIssue_ID() != 0)<NEW_LINE>throw new IllegalArgumentException("Projet Line already been issued");<NEW_LINE>if (getLocatorId() == 0)<NEW_LINE>throw new IllegalArgumentException("No Locator");<NEW_LINE>// Set to Qty 1<NEW_LINE>if (projectLine.getPlannedQty() == null || projectLine.getPlannedQty().signum() == 0)<NEW_LINE>projectLine.setPlannedQty(Env.ONE);<NEW_LINE>//<NEW_LINE>MProjectIssue projectIssue = new MProjectIssue(project);<NEW_LINE>projectIssue.setMandatory(getLocatorId(), projectLine.getM_Product_ID(), projectLine.getPlannedQty());<NEW_LINE>if (// default today<NEW_LINE>getMovementDate() != null)<NEW_LINE>projectIssue.setMovementDate(getMovementDate());<NEW_LINE>if (getDescription() != null && getDescription().length() > 0)<NEW_LINE>projectIssue.setDescription(getDescription());<NEW_LINE>else if (projectLine.getDescription() != null)<NEW_LINE>projectIssue.setDescription(projectLine.getDescription());<NEW_LINE>projectIssue.process();<NEW_LINE>// Update Line<NEW_LINE>projectLine.setMProjectIssue(projectIssue);<NEW_LINE>projectLine.saveEx();<NEW_LINE>addLog(projectIssue.getLine(), projectIssue.getMovementDate(), <MASK><NEW_LINE>return "@Created@ 1";<NEW_LINE>}
projectIssue.getMovementQty(), null);
1,791,617
public void hook(ExtensionHook extensionHook) {<NEW_LINE>super.hook(extensionHook);<NEW_LINE>// Register the parameters<NEW_LINE>extensionHook.addOptionsParamSet(getParam());<NEW_LINE>extensionHook.addSessionListener(this);<NEW_LINE>extensionHook.addSiteMapListener(this);<NEW_LINE>extensionHook.addHttpSenderListener(this);<NEW_LINE>if (getView() != null) {<NEW_LINE>// Hook the panels<NEW_LINE>extensionHook.getHookView().addStatusPanel(getHttpSessionsPanel());<NEW_LINE>extensionHook.getHookView().addOptionPanel(getOptionsHttpSessionsPanel());<NEW_LINE>// Hook the popup menus<NEW_LINE>extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuSetActiveSession());<NEW_LINE>extensionHook.getHookMenu(<MASK><NEW_LINE>extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuRemoveSession());<NEW_LINE>extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuAddUserFromSession());<NEW_LINE>extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuItemCopySessionToken());<NEW_LINE>if (Control.getSingleton().getExtensionLoader().getExtension(ExtensionSearch.class) != null) {<NEW_LINE>extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuItemFindRelatedMessages());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Register as an API implementor<NEW_LINE>extensionHook.addApiImplementor(new HttpSessionsAPI(this));<NEW_LINE>}
).addPopupMenuItem(getPopupMenuUnsetActiveSession());
441,915
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>if (System.getProperty(WebKeys.OSGI_ENABLED) == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String cmd = request.getParameter("cmd");<NEW_LINE>java.lang.reflect.Method meth = null;<NEW_LINE>Class[] partypes = new Class[] { HttpServletRequest.class, HttpServletResponse.class };<NEW_LINE>Object[] arglist = new Object[] { request, response };<NEW_LINE>try {<NEW_LINE>if (getUser() == null || !APILocator.getLayoutAPI().doesUserHaveAccessToPortlet("dynamic-plugins", getUser())) {<NEW_LINE>response.sendError(401);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>meth = this.getClass().getMethod(cmd, partypes);<NEW_LINE>} catch (Exception e) {<NEW_LINE>try {<NEW_LINE>cmd = "action";<NEW_LINE>meth = this.getClass().getMethod(cmd, partypes);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>Logger.error(this.getClass(), "Trying to run method:" + cmd);<NEW_LINE>Logger.error(this.getClass(), e.getMessage(<MASK><NEW_LINE>writeError(response, e.getCause().getMessage());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>meth.invoke(this, arglist);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.error(this, "Trying to run method:" + cmd);<NEW_LINE>Logger.error(this, e.getMessage(), e.getCause());<NEW_LINE>writeError(response, e.getCause().getMessage());<NEW_LINE>}<NEW_LINE>}
), e.getCause());
1,698,077
private void make(File baseFeatureApk, File apkFile, File bundleFile, CoreSigningConfig signingConfig) throws IOException, SigningException {<NEW_LINE>ZipFile zipFile = new ZipFile(apkFile);<NEW_LINE>Enumeration entries = zipFile.entries();<NEW_LINE>ZipOutputStream zipOutputStream = new ZipOutputStream(new FileOutputStream(bundleFile));<NEW_LINE>ZipOutputStream baseFeatureStream = new ZipOutputStream(new FileOutputStream(baseFeatureApk));<NEW_LINE>while (entries.hasMoreElements()) {<NEW_LINE>ZipEntry zipEntry = (ZipEntry) entries.nextElement();<NEW_LINE>if (excludePattern.matcher(zipEntry.getName()).find()) {<NEW_LINE>continue;<NEW_LINE>} else if (apkPattern.matcher(zipEntry.getName()).find()) {<NEW_LINE>byte[] inputBuffer = IOUtils.toByteArray(zipFile.getInputStream(zipEntry));<NEW_LINE>zipOutputStream.putNextEntry(new ZipEntry(zipEntry.getName().substring(zipEntry.getName().lastIndexOf("/") + 1).replace(".so", DOT_ANDROID_PACKAGE)));<NEW_LINE>zipOutputStream.write(inputBuffer, 0, inputBuffer.length);<NEW_LINE>zipOutputStream.closeEntry();<NEW_LINE>} else {<NEW_LINE>byte[] inputBuffer = IOUtils.toByteArray(zipFile.getInputStream(zipEntry));<NEW_LINE>if (zipEntry.getMethod() == ZipEntry.STORED) {<NEW_LINE>baseFeatureStream.putNextEntry(new ZipEntry(zipEntry));<NEW_LINE>} else {<NEW_LINE>baseFeatureStream.putNextEntry(new ZipEntry<MASK><NEW_LINE>}<NEW_LINE>baseFeatureStream.write(inputBuffer, 0, inputBuffer.length);<NEW_LINE>baseFeatureStream.closeEntry();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>baseFeatureStream.close();<NEW_LINE>zipOutputStream.close();<NEW_LINE>AndroidSigner androidSigner = new AndroidSigner();<NEW_LINE>File signedApk = new File(baseFeatureApk.getParentFile(), "baseFeature-signed.apk");<NEW_LINE>androidSigner.signFile(baseFeatureApk, signedApk, (DefaultSigningConfig) signingConfig);<NEW_LINE>BetterZip.addFile(bundleFile, "baseFeature.apk", signedApk);<NEW_LINE>FileUtils.deleteIfExists(signedApk);<NEW_LINE>FileUtils.deleteIfExists(baseFeatureApk);<NEW_LINE>}
(zipEntry.getName()));
61,044
public static UserPostListingURL parse(final Uri uri) {<NEW_LINE>Integer limit = null;<NEW_LINE>String before = null;<NEW_LINE>String after = null;<NEW_LINE>for (final String parameterKey : General.getUriQueryParameterNames(uri)) {<NEW_LINE>if (parameterKey.equalsIgnoreCase("after")) {<NEW_LINE>after = uri.getQueryParameter(parameterKey);<NEW_LINE>} else if (parameterKey.equalsIgnoreCase("before")) {<NEW_LINE>before = uri.getQueryParameter(parameterKey);<NEW_LINE>} else if (parameterKey.equalsIgnoreCase("limit")) {<NEW_LINE>try {<NEW_LINE>limit = Integer.parseInt(uri.getQueryParameter(parameterKey));<NEW_LINE>} catch (final Throwable ignored) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final String[] pathSegments;<NEW_LINE>{<NEW_LINE>final List<String> pathSegmentsList = uri.getPathSegments();<NEW_LINE>final ArrayList<String> pathSegmentsFiltered = new ArrayList<<MASK><NEW_LINE>for (String segment : pathSegmentsList) {<NEW_LINE>while (StringUtils.asciiLowercase(segment).endsWith(".json") || StringUtils.asciiLowercase(segment).endsWith(".xml")) {<NEW_LINE>segment = segment.substring(0, segment.lastIndexOf('.'));<NEW_LINE>}<NEW_LINE>if (!segment.isEmpty()) {<NEW_LINE>pathSegmentsFiltered.add(segment);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>pathSegments = pathSegmentsFiltered.toArray(new String[0]);<NEW_LINE>}<NEW_LINE>final PostSort order;<NEW_LINE>if (pathSegments.length > 0) {<NEW_LINE>order = PostSort.parse(uri.getQueryParameter("sort"), uri.getQueryParameter("t"));<NEW_LINE>} else {<NEW_LINE>order = null;<NEW_LINE>}<NEW_LINE>if (pathSegments.length < 3) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!pathSegments[0].equalsIgnoreCase("user") && !pathSegments[0].equalsIgnoreCase("u")) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// TODO validate username with regex<NEW_LINE>final String username = pathSegments[1];<NEW_LINE>final String typeName = StringUtils.asciiUppercase(pathSegments[2]);<NEW_LINE>final Type type;<NEW_LINE>try {<NEW_LINE>type = Type.valueOf(typeName);<NEW_LINE>} catch (final Throwable t) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return new UserPostListingURL(type, username, order, limit, before, after);<NEW_LINE>}
>(pathSegmentsList.size());
1,218,960
private void testCodeFirstTestFormHighway(RestTemplate template, String cseUrlPrefix) {<NEW_LINE>HttpHeaders formHeaders = new HttpHeaders();<NEW_LINE>formHeaders.setContentType(MediaType.APPLICATION_FORM_URLENCODED);<NEW_LINE>Map<String, String> map = new HashMap<>();<NEW_LINE>String code = "servicecomb%2bwelcome%40%23%24%25%5e%26*()%3d%3d";<NEW_LINE>map.put("form1", code);<NEW_LINE>map.put("form2", "");<NEW_LINE>HttpEntity<Map<String, String>> formEntiry = new HttpEntity<>(map, formHeaders);<NEW_LINE>TestMgr.check(code + "", template.postForEntity(cseUrlPrefix + "/testform", formEntiry, String.class).getBody());<NEW_LINE>map = new HashMap<>();<NEW_LINE>code = "servicecomb%2bwelcome%40%23%24%25%5e%26*()%3d%3d";<NEW_LINE>map.put("form1", code);<NEW_LINE>map.put("form2", null);<NEW_LINE>formEntiry = new HttpEntity<>(map, formHeaders);<NEW_LINE>TestMgr.check(code + "null", template.postForEntity(cseUrlPrefix + "/testform", formEntiry, String<MASK><NEW_LINE>}
.class).getBody());
1,116,328
public void marshall(SendVoiceMessageRequest sendVoiceMessageRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (sendVoiceMessageRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(sendVoiceMessageRequest.getDestinationPhoneNumber(), DESTINATIONPHONENUMBER_BINDING);<NEW_LINE>protocolMarshaller.marshall(sendVoiceMessageRequest.getOriginationIdentity(), ORIGINATIONIDENTITY_BINDING);<NEW_LINE>protocolMarshaller.marshall(sendVoiceMessageRequest.getMessageBody(), MESSAGEBODY_BINDING);<NEW_LINE>protocolMarshaller.marshall(sendVoiceMessageRequest.getMessageBodyTextType(), MESSAGEBODYTEXTTYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(sendVoiceMessageRequest.getVoiceId(), VOICEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(sendVoiceMessageRequest.getConfigurationSetName(), CONFIGURATIONSETNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(sendVoiceMessageRequest.getMaxPricePerMinute(), MAXPRICEPERMINUTE_BINDING);<NEW_LINE>protocolMarshaller.marshall(sendVoiceMessageRequest.getTimeToLive(), TIMETOLIVE_BINDING);<NEW_LINE>protocolMarshaller.marshall(sendVoiceMessageRequest.getContext(), CONTEXT_BINDING);<NEW_LINE>protocolMarshaller.marshall(sendVoiceMessageRequest.getDryRun(), DRYRUN_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);
620,685
final GetConfigurationProfileResult executeGetConfigurationProfile(GetConfigurationProfileRequest getConfigurationProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getConfigurationProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetConfigurationProfileRequest> request = null;<NEW_LINE>Response<GetConfigurationProfileResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetConfigurationProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getConfigurationProfileRequest));<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.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetConfigurationProfile");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetConfigurationProfileResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetConfigurationProfileResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.SERVICE_ID, "AppConfig");
1,537,197
public UtilizationMetric unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UtilizationMetric utilizationMetric = new UtilizationMetric();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>utilizationMetric.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("statistic", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>utilizationMetric.setStatistic(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("value", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>utilizationMetric.setValue(context.getUnmarshaller(Double.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return utilizationMetric;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,701,281
public int compareTo(getMetrics_args other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = Boolean.valueOf(is_set_topologyId()).<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (is_set_topologyId()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.topologyId, other.topologyId);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = Boolean.valueOf(is_set_type()).compareTo(other.is_set_type());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (is_set_type()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
compareTo(other.is_set_topologyId());
277,936
public boolean userDefinedFunctionCoercion(SqlValidatorScope scope, SqlCall call, SqlFunction function) {<NEW_LINE>final List<RelDataType> paramTypes = function.getParamTypes();<NEW_LINE>assert paramTypes != null;<NEW_LINE>boolean coerced = false;<NEW_LINE>for (int i = 0; i < call.operandCount(); i++) {<NEW_LINE>SqlNode operand = call.operand(i);<NEW_LINE>if (operand.getKind() == SqlKind.ARGUMENT_ASSIGNMENT) {<NEW_LINE>final List<SqlNode> operandList = ((SqlCall) operand).getOperandList();<NEW_LINE>String name = ((SqlIdentifier) operandList.get(1)).getSimple();<NEW_LINE>int formalIndex = function.getParamNames().indexOf(name);<NEW_LINE>if (formalIndex < 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Column list operand type is not supported now.<NEW_LINE>coerced = coerceOperandType(scope, (SqlCall) operand, 0, paramTypes<MASK><NEW_LINE>} else {<NEW_LINE>coerced = coerceOperandType(scope, call, i, paramTypes.get(i)) || coerced;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return coerced;<NEW_LINE>}
.get(formalIndex)) || coerced;
1,180,126
private RefactoringStatus initialize(JavaRefactoringArguments extended) {<NEW_LINE>final String handle = extended.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT);<NEW_LINE>if (handle != null) {<NEW_LINE>final IJavaElement element = JavaRefactoringDescriptorUtil.handleToElement(extended.getProject(), handle, false);<NEW_LINE>if (element == null || !element.exists() || element.getElementType() != IJavaElement.TYPE) {<NEW_LINE>return JavaRefactoringDescriptorUtil.createInputFatalStatus(element, getProcessorName(), IJavaRefactorings.RENAME_TYPE);<NEW_LINE>} else {<NEW_LINE>fType = (IType) element;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT));<NEW_LINE>}<NEW_LINE>final String name = extended.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_NAME);<NEW_LINE>if (name != null && !"".equals(name)) {<NEW_LINE>setNewElementName(name);<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptorUtil.ATTRIBUTE_NAME));<NEW_LINE>}<NEW_LINE>final String patterns = extended.getAttribute(ATTRIBUTE_PATTERNS);<NEW_LINE>if (patterns != null && !"".equals(patterns)) {<NEW_LINE>fFilePatterns = patterns;<NEW_LINE>}<NEW_LINE>final String references = extended.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_REFERENCES);<NEW_LINE>if (references != null) {<NEW_LINE>fUpdateReferences = Boolean.valueOf(references).booleanValue();<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages<MASK><NEW_LINE>}<NEW_LINE>final String matches = extended.getAttribute(ATTRIBUTE_TEXTUAL_MATCHES);<NEW_LINE>if (matches != null) {<NEW_LINE>fUpdateTextualMatches = Boolean.valueOf(matches).booleanValue();<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, ATTRIBUTE_TEXTUAL_MATCHES));<NEW_LINE>}<NEW_LINE>final String qualified = extended.getAttribute(ATTRIBUTE_QUALIFIED);<NEW_LINE>if (qualified != null) {<NEW_LINE>fUpdateQualifiedNames = Boolean.valueOf(qualified).booleanValue();<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, ATTRIBUTE_QUALIFIED));<NEW_LINE>}<NEW_LINE>final String similarDeclarations = extended.getAttribute(ATTRIBUTE_SIMILAR_DECLARATIONS);<NEW_LINE>if (similarDeclarations != null) {<NEW_LINE>fUpdateSimilarElements = Boolean.valueOf(similarDeclarations).booleanValue();<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, ATTRIBUTE_SIMILAR_DECLARATIONS));<NEW_LINE>}<NEW_LINE>final String similarDeclarationsMatchingStrategy = extended.getAttribute(ATTRIBUTE_MATCHING_STRATEGY);<NEW_LINE>if (similarDeclarationsMatchingStrategy != null) {<NEW_LINE>try {<NEW_LINE>fRenamingStrategy = Integer.valueOf(similarDeclarationsMatchingStrategy).intValue();<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_illegal_argument, new String[] { similarDeclarationsMatchingStrategy, ATTRIBUTE_QUALIFIED }));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, ATTRIBUTE_MATCHING_STRATEGY));<NEW_LINE>}<NEW_LINE>return new RefactoringStatus();<NEW_LINE>}
.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptorUtil.ATTRIBUTE_REFERENCES));
1,307,037
private static short seghelper(Compressor cpi, Macroblock x, BestSegInfo bsi, BlockEnum bekind) {<NEW_LINE>int mvp1, mvp2;<NEW_LINE>if (bekind == BlockEnum.BLOCK_8X16) {<NEW_LINE>mvp1 = 2;<NEW_LINE>mvp2 = 1;<NEW_LINE>} else {<NEW_LINE>mvp1 = 1;<NEW_LINE>mvp2 = 2;<NEW_LINE>}<NEW_LINE>short sr = (short) Math.max((Math.abs(bsi.sv_mvp[0].row - bsi.sv_mvp[mvp1].row)) >> 3, (Math.abs(bsi.sv_mvp[0].col - bsi.sv_mvp[mvp1].col)) >> 3);<NEW_LINE>vp8_cal_step_param(sr, bsi.sv_istep);<NEW_LINE>bsi.sv_istep.inc();<NEW_LINE>sr = (short) Math.max((Math.abs(bsi.sv_mvp[mvp2].row - bsi.sv_mvp[3].row)) >> 3, (Math.abs(bsi.sv_mvp[mvp2].col - bsi.sv_mvp[3].col)) >> 3);<NEW_LINE><MASK><NEW_LINE>bsi.sv_istep.dec();<NEW_LINE>rd_check_segment(cpi, x, bsi, bekind);<NEW_LINE>return sr;<NEW_LINE>}
vp8_cal_step_param(sr, bsi.sv_istep);
1,569,485
public void onDismiss(@NonNull DialogInterface dialog) {<NEW_LINE>boolean checked = false;<NEW_LINE>int selected = 0;<NEW_LINE>for (int i = 0; i < preferences.size(); i++) {<NEW_LINE>boolean active = preferences.<MASK><NEW_LINE>checked |= active;<NEW_LINE>if (active) {<NEW_LINE>selected++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (adapter != null) {<NEW_LINE>adapter.getItem(position).setSelected(checked);<NEW_LINE>adapter.getItem(position).setColor(app, checked ? R.color.osmand_orange : ContextMenuItem.INVALID_ID);<NEW_LINE>adapter.getItem(position).setDescription(getString(R.string.ltr_or_rtl_combine_via_slash, String.valueOf(selected), String.valueOf(preferences.size())));<NEW_LINE>}<NEW_LINE>if (arrayAdapter != null) {<NEW_LINE>arrayAdapter.notifyDataSetInvalidated();<NEW_LINE>}<NEW_LINE>Activity activity = getActivity();<NEW_LINE>if (activity instanceof MapActivity) {<NEW_LINE>MapActivity mapActivity = (MapActivity) activity;<NEW_LINE>mapActivity.refreshMapComplete();<NEW_LINE>mapActivity.getMapLayers().updateLayers(mapActivity);<NEW_LINE>}<NEW_LINE>super.onDismiss(dialog);<NEW_LINE>}
get(i).get();
1,779,905
private BufferedImage scale(BufferedImage image, PageFormat pageFormat) {<NEW_LINE>// scale up to print density (using less of a stretch if image is already larger than page)<NEW_LINE>double upScale = dpiScale * Math.min((pageFormat.getImageableWidth() / image.getWidth()), (pageFormat.getImageableHeight() / image.getHeight()));<NEW_LINE>if (upScale > dpiScale) {<NEW_LINE>upScale = dpiScale;<NEW_LINE>} else if (upScale < 1) {<NEW_LINE>upScale = 1;<NEW_LINE>}<NEW_LINE>if (upScale > 1) {<NEW_LINE>log.debug("Scaling image up by x{}", upScale);<NEW_LINE>BufferedImage scaled = new BufferedImage((int) (image.getWidth() * upScale), (int) (image.getHeight() * upScale), BufferedImage.TYPE_INT_ARGB);<NEW_LINE>Graphics2D g2d = scaled.createGraphics();<NEW_LINE>g2d.setRenderingHints(buildRenderingHints(dithering, interpolation));<NEW_LINE>g2d.drawImage(image, 0, 0, (int) (image.getWidth() * upScale), (int) (image.getHeight<MASK><NEW_LINE>g2d.dispose();<NEW_LINE>return scaled;<NEW_LINE>} else {<NEW_LINE>log.debug("No need to upscale image");<NEW_LINE>return image;<NEW_LINE>}<NEW_LINE>}
() * upScale), null);
624,813
private void emitParticles(ItemStack stack, IManaSpreader spreader) {<NEW_LINE>float rotationYaw = -(spreader.getRotationX() + 90F);<NEW_LINE>float rotationPitch = spreader.getRotationY();<NEW_LINE>// Lots of EntityThrowable copypasta<NEW_LINE>float f = 0.3F;<NEW_LINE>float mx = (float) (Mth.sin(rotationYaw / 180.0F * (float) Math.PI) * Mth.cos(rotationPitch / 180.0F * (float) Math.PI) * f / 2D);<NEW_LINE>float mz = (float) (-(Mth.cos(rotationYaw / 180.0F * (float) Math.PI) * Mth.cos(rotationPitch / 180.0F * (float) Math.PI) * f) / 2D);<NEW_LINE>float my = (float) (Mth.sin(rotationPitch / 180.0F * (float) Math.PI) * f / 2D);<NEW_LINE>int storedColor = ItemLens.getStoredColor(stack);<NEW_LINE>int hex = -1;<NEW_LINE>var level = spreader.getManaReceiverLevel();<NEW_LINE>if (storedColor == 16) {<NEW_LINE>hex = Mth.hsvToRgb(level.getGameTime() * 2 % 360 / 360F, 1F, 1F);<NEW_LINE>} else if (storedColor >= 0) {<NEW_LINE>hex = ColorHelper.getColorValue(DyeColor.byId(storedColor));<NEW_LINE>}<NEW_LINE>float r = ((hex & <MASK><NEW_LINE>float g = ((hex & 0xFF00) >> 8) / 255F;<NEW_LINE>float b = (hex & 0xFF) / 255F;<NEW_LINE>WispParticleData data = WispParticleData.wisp(0.4F, r, g, b);<NEW_LINE>// The start position is set a bit away from the spreader (along the burst's motion vector), as to not<NEW_LINE>// collide with the spreader itself.<NEW_LINE>var pos = spreader.getManaReceiverPos();<NEW_LINE>level.addParticle(data, pos.getX() + 0.5 + mx * 4.5, pos.getY() + 0.5 + my * 4.5, pos.getZ() + 0.5 + mz * 4.5, mx, my, mz);<NEW_LINE>}
0xFF0000) >> 16) / 255F;
1,067,690
private void waitForLoadJobs(Map<String, ListenableFuture<?>> loadJobs) throws Exception {<NEW_LINE>final long startTime = System.currentTimeMillis();<NEW_LINE>System.err.println("Waiting for load jobs...");<NEW_LINE>// Add callbacks to each load job that print information on successful completion or failure.<NEW_LINE>for (final String jobId : loadJobs.keySet()) {<NEW_LINE>final String jobName = "load-" + jobId;<NEW_LINE>addCallback(loadJobs.get(jobId), new FutureCallback<Object>() {<NEW_LINE><NEW_LINE>private double elapsedSeconds() {<NEW_LINE>return (System.currentTimeMillis() - startTime) / 1000.0;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess(Object unused) {<NEW_LINE>System.err.printf(<MASK><NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFailure(Throwable error) {<NEW_LINE>System.err.printf("Job %s failed (%.3fs): %s\n", jobName, elapsedSeconds(), error.getMessage());<NEW_LINE>}<NEW_LINE>}, directExecutor());<NEW_LINE>}<NEW_LINE>// Block on the completion of all the load jobs.<NEW_LINE>List<?> results = Futures.successfulAsList(loadJobs.values()).get();<NEW_LINE>int numSucceeded = (int) results.stream().filter(Objects::nonNull).count();<NEW_LINE>System.err.printf("All load jobs have terminated: %d/%d successful.\n", numSucceeded, loadJobs.size());<NEW_LINE>}
"Job %s succeeded (%.3fs)\n", jobName, elapsedSeconds());
307,545
public static void openXlog() {<NEW_LINE>int pid = android<MASK><NEW_LINE>String processName = null;<NEW_LINE>ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);<NEW_LINE>for (ActivityManager.RunningAppProcessInfo appProcess : am.getRunningAppProcesses()) {<NEW_LINE>if (appProcess.pid == pid) {<NEW_LINE>processName = appProcess.processName;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (processName == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final String SDCARD = Environment.getExternalStorageDirectory().getAbsolutePath();<NEW_LINE>final String logPath = SDCARD + "/marssample/log";<NEW_LINE>String logFileName = processName.indexOf(":") == -1 ? "MarsSample" : ("MarsSample_" + processName.substring(processName.indexOf(":") + 1));<NEW_LINE>int level;<NEW_LINE>Xlog xlog = new Xlog();<NEW_LINE>if (BuildConfig.DEBUG) {<NEW_LINE>level = Xlog.LEVEL_VERBOSE;<NEW_LINE>xlog.setConsoleLogOpen(0, true);<NEW_LINE>} else {<NEW_LINE>level = Xlog.LEVEL_INFO;<NEW_LINE>xlog.setConsoleLogOpen(0, false);<NEW_LINE>}<NEW_LINE>xlog.appenderOpen(level, Xlog.AppednerModeAsync, "", logPath, logFileName, 0);<NEW_LINE>Log.setLogImp(xlog);<NEW_LINE>}
.os.Process.myPid();
1,209,788
public static DetectVehicleIllegalParkingResponse unmarshall(DetectVehicleIllegalParkingResponse detectVehicleIllegalParkingResponse, UnmarshallerContext _ctx) {<NEW_LINE>detectVehicleIllegalParkingResponse.setRequestId(_ctx.stringValue("DetectVehicleIllegalParkingResponse.RequestId"));<NEW_LINE>detectVehicleIllegalParkingResponse.setCode(_ctx.stringValue("DetectVehicleIllegalParkingResponse.Code"));<NEW_LINE>detectVehicleIllegalParkingResponse.setMessage(_ctx.stringValue("DetectVehicleIllegalParkingResponse.Message"));<NEW_LINE>Data data = new Data();<NEW_LINE>List<Element> elements = new ArrayList<Element>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DetectVehicleIllegalParkingResponse.Data.Elements.Length"); i++) {<NEW_LINE>Element element = new Element();<NEW_LINE>element.setScore(_ctx.floatValue("DetectVehicleIllegalParkingResponse.Data.Elements[" + i + "].Score"));<NEW_LINE>element.setTypeName(_ctx.stringValue("DetectVehicleIllegalParkingResponse.Data.Elements[" + i + "].TypeName"));<NEW_LINE>element.setId(_ctx.longValue("DetectVehicleIllegalParkingResponse.Data.Elements[" + i + "].Id"));<NEW_LINE>List<BoxesItem> boxes = new ArrayList<BoxesItem>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DetectVehicleIllegalParkingResponse.Data.Elements[" + i + "].Boxes.Length"); j++) {<NEW_LINE>BoxesItem boxesItem = new BoxesItem();<NEW_LINE>boxesItem.setLeft(_ctx.longValue("DetectVehicleIllegalParkingResponse.Data.Elements[" + i <MASK><NEW_LINE>boxesItem.setTop(_ctx.longValue("DetectVehicleIllegalParkingResponse.Data.Elements[" + i + "].Boxes[" + j + "].Top"));<NEW_LINE>boxesItem.setRight(_ctx.longValue("DetectVehicleIllegalParkingResponse.Data.Elements[" + i + "].Boxes[" + j + "].Right"));<NEW_LINE>boxesItem.setBottom(_ctx.longValue("DetectVehicleIllegalParkingResponse.Data.Elements[" + i + "].Boxes[" + j + "].Bottom"));<NEW_LINE>boxes.add(boxesItem);<NEW_LINE>}<NEW_LINE>element.setBoxes(boxes);<NEW_LINE>elements.add(element);<NEW_LINE>}<NEW_LINE>data.setElements(elements);<NEW_LINE>List<RegionIntersect> regionIntersects = new ArrayList<RegionIntersect>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DetectVehicleIllegalParkingResponse.Data.RegionIntersects.Length"); i++) {<NEW_LINE>RegionIntersect regionIntersect = new RegionIntersect();<NEW_LINE>List<Long> ids = new ArrayList<Long>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DetectVehicleIllegalParkingResponse.Data.RegionIntersects[" + i + "].Ids.Length"); j++) {<NEW_LINE>ids.add(_ctx.longValue("DetectVehicleIllegalParkingResponse.Data.RegionIntersects[" + i + "].Ids[" + j + "]"));<NEW_LINE>}<NEW_LINE>regionIntersect.setIds(ids);<NEW_LINE>regionIntersects.add(regionIntersect);<NEW_LINE>}<NEW_LINE>data.setRegionIntersects(regionIntersects);<NEW_LINE>detectVehicleIllegalParkingResponse.setData(data);<NEW_LINE>return detectVehicleIllegalParkingResponse;<NEW_LINE>}
+ "].Boxes[" + j + "].Left"));
655,182
private boolean runReadyJob(final ExecutableNode node) throws IOException {<NEW_LINE>if (Status.isStatusFinished(node.getStatus()) || Status.isStatusRunning(node.getStatus())) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final Status nextNodeStatus = getImpliedStatus(node);<NEW_LINE>if (nextNodeStatus == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (nextNodeStatus == Status.CANCELLED) {<NEW_LINE>// if node is root flow<NEW_LINE>if (node instanceof ExecutableFlow && node.getParentFlow() == null) {<NEW_LINE>this.logger.info(String.format("Flow '%s' was cancelled before execution had started.", node.getId()));<NEW_LINE>finalizeFlow((ExecutableFlow) node);<NEW_LINE>} else {<NEW_LINE>this.logger.info(String.format("Cancelling '%s' due to prior errors.", node.getNestedId()));<NEW_LINE>node.cancelNode(System.currentTimeMillis());<NEW_LINE>finishExecutableNode(node);<NEW_LINE>}<NEW_LINE>} else if (nextNodeStatus == Status.SKIPPED) {<NEW_LINE>this.logger.info("Skipping disabled job '" + node.getId() + "'.");<NEW_LINE>node.skipNode(System.currentTimeMillis());<NEW_LINE>finishExecutableNode(node);<NEW_LINE>} else if (nextNodeStatus == Status.READY) {<NEW_LINE>if (node instanceof ExecutableFlowBase) {<NEW_LINE>final ExecutableFlowBase flow = ((ExecutableFlowBase) node);<NEW_LINE>this.logger.info("Running flow '" + flow.getNestedId() + "'.");<NEW_LINE>flow.setStatus(Status.RUNNING);<NEW_LINE>// don't overwrite start time of root flows<NEW_LINE>if (flow.getStartTime() <= 0) {<NEW_LINE>flow.setStartTime(System.currentTimeMillis());<NEW_LINE>}<NEW_LINE>prepareJobProperties(flow);<NEW_LINE>for (final String startNodeId : ((ExecutableFlowBase) node).getStartNodes()) {<NEW_LINE>final ExecutableNode <MASK><NEW_LINE>runReadyJob(startNode);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>runExecutableNode(node);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
startNode = flow.getExecutableNode(startNodeId);
805,620
public Oql visit(Call call) {<NEW_LINE>final Operator op = call.operator();<NEW_LINE>final List<Expression> args = call.arguments();<NEW_LINE>if (op == Operators.NOT_IN || op == IterableOperators.NOT_EMPTY) {<NEW_LINE>// geode doesn't understand syntax foo not in [1, 2, 3]<NEW_LINE>// convert "foo not in [1, 2, 3]" into "not (foo in [1, 2, 3])"<NEW_LINE>return visit(Expressions.not(Expressions.call(inverseOp(op), call.arguments())));<NEW_LINE>}<NEW_LINE>if (op == Operators.AND || op == Operators.OR) {<NEW_LINE>Preconditions.checkArgument(!args.isEmpty(), "Size should be >=1 for %s but was %s", op, args.size());<NEW_LINE>final String join = ") " + op.name() + " (";<NEW_LINE>final String newOql = "(" + args.stream().map(a -> a.accept(this)).map(Oql::oql).collect(Collectors<MASK><NEW_LINE>return new Oql(variables, newOql);<NEW_LINE>}<NEW_LINE>if (op.arity() == Operator.Arity.BINARY) {<NEW_LINE>return binaryOperator(call);<NEW_LINE>}<NEW_LINE>if (op.arity() == Operator.Arity.UNARY) {<NEW_LINE>return unaryOperator(call);<NEW_LINE>}<NEW_LINE>throw new UnsupportedOperationException("Don't know how to handle " + call);<NEW_LINE>}
.joining(join)) + ")";
821,253
private boolean sendAck(ConnectionDescriptor descriptor, MqttConnectMessage msg, final String clientId) {<NEW_LINE>LOG.info("Sending connect ACK. CId={}", clientId);<NEW_LINE>final boolean success = descriptor.assignState(DISCONNECTED, SENDACK);<NEW_LINE>if (!success) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>MqttConnAckMessage okResp;<NEW_LINE>ClientSession clientSession = m_sessionsStore.sessionForClient(clientId);<NEW_LINE>boolean isSessionAlreadyStored = clientSession != null;<NEW_LINE>String user = msg.payload().userName();<NEW_LINE>long messageHead = m_messagesStore.getMessageHead(user);<NEW_LINE>long friendHead = m_messagesStore.getFriendHead(user);<NEW_LINE>long friendRqHead = m_messagesStore.getFriendRqHead(user);<NEW_LINE>long settingHead = m_messagesStore.getSettingHead(user);<NEW_LINE>WFCMessage.ConnectAckPayload payload = WFCMessage.ConnectAckPayload.newBuilder().setMsgHead(messageHead).setFriendHead(friendHead).setFriendRqHead(friendRqHead).setSettingHead(settingHead).setServerTime(System.currentTimeMillis()).build();<NEW_LINE>if (!msg.variableHeader().isCleanSession() && isSessionAlreadyStored) {<NEW_LINE>okResp = connAckWithSessionPresent(<MASK><NEW_LINE>} else {<NEW_LINE>okResp = connAck(CONNECTION_ACCEPTED, payload.toByteArray());<NEW_LINE>}<NEW_LINE>descriptor.writeAndFlush(okResp);<NEW_LINE>LOG.info("The connect ACK has been sent. CId={}", clientId);<NEW_LINE>return true;<NEW_LINE>}
CONNECTION_ACCEPTED, payload.toByteArray());
320,296
public static List<ClassElement> typesToClasses(Collection<TypeElement> types) {<NEW_LINE>List<ClassElement> classes = new ArrayList<ClassElement>();<NEW_LINE>if (types != null) {<NEW_LINE>Map<String, ClassElement> classesByName = new HashMap<String, ClassElement>();<NEW_LINE>for (TypeElement type : types) {<NEW_LINE>String typeName = type.getName();<NEW_LINE>boolean isClassType = isClassType(typeName);<NEW_LINE>String baseName = isClassType ? getClassType(<MASK><NEW_LINE>if (!classesByName.containsKey(baseName)) {<NEW_LINE>ClassElement clss = new ClassElement();<NEW_LINE>clss.setName(baseName);<NEW_LINE>classesByName.put(baseName, clss);<NEW_LINE>}<NEW_LINE>ClassElement clss = classesByName.get(baseName);<NEW_LINE>if (isClassType) {<NEW_LINE>clss.addClassType(type);<NEW_LINE>} else {<NEW_LINE>clss.addInstanceType(type);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>classes = new ArrayList<ClassElement>(classesByName.values());<NEW_LINE>}<NEW_LINE>return classes;<NEW_LINE>}
type.getName()) : typeName;
786,296
private static void doRenderOverlay(RenderGameOverlayEvent event, @Nonnull ItemStack equippedProbe) {<NEW_LINE>IconEIO icon1, icon2;<NEW_LINE>if (equippedProbe.getItemDamage() == 0) {<NEW_LINE>icon1 = IconEIO.PROBE_OVERLAY_PROBE;<NEW_LINE>icon2 = IconEIO.PROBE_OVERLAY_COPY_OFF;<NEW_LINE>} else {<NEW_LINE>icon1 = IconEIO.PROBE_OVERLAY_PROBE_OFF;<NEW_LINE>icon2 = IconEIO.PROBE_OVERLAY_COPY;<NEW_LINE>}<NEW_LINE>ScaledResolution res = event.getResolution();<NEW_LINE>double offsetX = res.getScaledWidth() - 48;<NEW_LINE>double offsetY = res.getScaledHeight() - 16;<NEW_LINE>GL11.glColor4f(1, 1, 1, 0.75f);<NEW_LINE>icon1.getMap().render(icon1, offsetX - 32, offsetY - 32, 32, 32, 0, true);<NEW_LINE>icon2.getMap().render(icon2, offsetX, offsetY - 32, <MASK><NEW_LINE>}
32, 32, 0, true);
1,838,550
private static void handleClientCommand(ServerPlayer player, CompoundTag commandData) {<NEW_LINE>String <MASK><NEW_LINE>String id = commandData.getString("id");<NEW_LINE>List<Component> output = new ArrayList<>();<NEW_LINE>Component[] error = { null };<NEW_LINE>int resultCode = -1;<NEW_LINE>if (player.getServer() == null) {<NEW_LINE>error[0] = new TextComponent("No Server");<NEW_LINE>} else {<NEW_LINE>resultCode = player.getServer().getCommands().performCommand(new SnoopyCommandSource(player, error, output), command);<NEW_LINE>}<NEW_LINE>CompoundTag result = new CompoundTag();<NEW_LINE>result.putString("id", id);<NEW_LINE>result.putInt("code", resultCode);<NEW_LINE>if (error[0] != null)<NEW_LINE>result.putString("error", error[0].getContents());<NEW_LINE>ListTag outputResult = new ListTag();<NEW_LINE>for (Component line : output) outputResult.add(StringTag.valueOf(Component.Serializer.toJson(line)));<NEW_LINE>if (!output.isEmpty())<NEW_LINE>result.put("output", outputResult);<NEW_LINE>player.connection.send(new ClientboundCustomPayloadPacket(CarpetClient.CARPET_CHANNEL, DataBuilder.create().withCustomNbt("clientCommand", result).build()));<NEW_LINE>// run command plug to command output,<NEW_LINE>}
command = commandData.getString("command");
1,617,641
// SamlMetadataDescriptorUpdater interface<NEW_LINE>@Override<NEW_LINE>public void updateMetadata(IdentityProviderMapperModel mapperModel, EntityDescriptorType entityDescriptor) {<NEW_LINE>String attributeName = mapperModel.getConfig().get(UserAttributeMapper.ATTRIBUTE_NAME);<NEW_LINE>String attributeFriendlyName = mapperModel.getConfig(<MASK><NEW_LINE>RequestedAttributeType requestedAttribute = new RequestedAttributeType(attributeName);<NEW_LINE>requestedAttribute.setIsRequired(null);<NEW_LINE>requestedAttribute.setNameFormat(mapperModel.getConfig().get(UserAttributeMapper.ATTRIBUTE_NAME_FORMAT) != null ? JBossSAMLURIConstants.valueOf(mapperModel.getConfig().get(UserAttributeMapper.ATTRIBUTE_NAME_FORMAT)).get() : ATTRIBUTE_FORMAT_BASIC.get());<NEW_LINE>if (attributeFriendlyName != null && attributeFriendlyName.length() > 0)<NEW_LINE>requestedAttribute.setFriendlyName(attributeFriendlyName);<NEW_LINE>// Add the requestedAttribute item to any AttributeConsumingServices<NEW_LINE>for (EntityDescriptorType.EDTChoiceType choiceType : entityDescriptor.getChoiceType()) {<NEW_LINE>List<EntityDescriptorType.EDTDescriptorChoiceType> descriptors = choiceType.getDescriptors();<NEW_LINE>for (EntityDescriptorType.EDTDescriptorChoiceType descriptor : descriptors) {<NEW_LINE>for (AttributeConsumingServiceType attributeConsumingService : descriptor.getSpDescriptor().getAttributeConsumingService()) {<NEW_LINE>boolean alreadyPresent = attributeConsumingService.getRequestedAttribute().stream().anyMatch(t -> (attributeName == null || attributeName.equalsIgnoreCase(t.getName())) && (attributeFriendlyName == null || attributeFriendlyName.equalsIgnoreCase(t.getFriendlyName())));<NEW_LINE>if (!alreadyPresent)<NEW_LINE>attributeConsumingService.addRequestedAttribute(requestedAttribute);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).get(UserAttributeMapper.ATTRIBUTE_FRIENDLY_NAME);
567,612
private AlertResult checkSendDingTalkSendMsgResult(String result) {<NEW_LINE>AlertResult alertResult = new AlertResult();<NEW_LINE>alertResult.setStatus("false");<NEW_LINE>if (null == result) {<NEW_LINE>alertResult.setMessage("send ding talk msg error");<NEW_LINE>logger.info("send ding talk msg error,ding talk server resp is null");<NEW_LINE>return alertResult;<NEW_LINE>}<NEW_LINE>DingTalkSendMsgResponse sendMsgResponse = JSONUtils.parseObject(result, DingTalkSendMsgResponse.class);<NEW_LINE>if (null == sendMsgResponse) {<NEW_LINE>alertResult.setMessage("send ding talk msg fail");<NEW_LINE>logger.info("send ding talk msg error,resp error");<NEW_LINE>return alertResult;<NEW_LINE>}<NEW_LINE>if (sendMsgResponse.errcode == 0) {<NEW_LINE>alertResult.setStatus("true");<NEW_LINE>alertResult.setMessage("send ding talk msg success");<NEW_LINE>return alertResult;<NEW_LINE>}<NEW_LINE>alertResult.setMessage(String.format("alert send ding talk msg error : %s", sendMsgResponse.getErrmsg()));<NEW_LINE>logger.info(<MASK><NEW_LINE>return alertResult;<NEW_LINE>}
"alert send ding talk msg error : {}", sendMsgResponse.getErrmsg());
1,106,870
private static Map<String, AliasOrIndex> suffixWildcard(Context context, MetaData metaData, String expression) {<NEW_LINE>assert expression.length() >= 2 : "expression [" + expression + "] should have at least a length of 2";<NEW_LINE>String fromPrefix = expression.substring(0, expression.length() - 1);<NEW_LINE>char[] toPrefixCharArr = fromPrefix.toCharArray();<NEW_LINE>toPrefixCharArr[toPrefixCharArr.length - 1]++;<NEW_LINE><MASK><NEW_LINE>SortedMap<String, AliasOrIndex> subMap = metaData.getAliasAndIndexLookup().subMap(fromPrefix, toPrefix);<NEW_LINE>if (context.getOptions().ignoreAliases()) {<NEW_LINE>return subMap.entrySet().stream().filter(entry -> entry.getValue().isAlias() == false).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));<NEW_LINE>}<NEW_LINE>return subMap;<NEW_LINE>}
String toPrefix = new String(toPrefixCharArr);
791,748
final GetActionResult executeGetAction(GetActionRequest getActionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getActionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetActionRequest> request = null;<NEW_LINE>Response<GetActionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetActionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getActionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "fis");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAction");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetActionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetActionResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
329,979
private void runCustomWorker(String consumerClassName) {<NEW_LINE>LOG.info(String.format("Starting Kinesis Worker %s with %s", consumerClassName, this.getClass().getSimpleName()));<NEW_LINE>try {<NEW_LINE>final Class consumerClass = (Class) Class.forName(consumerClassName);<NEW_LINE>final Method runMethod = consumerClass.getMethod("run", null);<NEW_LINE>runMethod.setAccessible(true);<NEW_LINE>final Object consumer = consumerClass.newInstance();<NEW_LINE>final class ConsumerRunner implements Runnable {<NEW_LINE><NEW_LINE>final Method m;<NEW_LINE><NEW_LINE>final Object o;<NEW_LINE><NEW_LINE>public ConsumerRunner(Method m, Object o) {<NEW_LINE>this.m = m;<NEW_LINE>this.o = o;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>m.invoke(o, null);<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>LOG.error(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Thread t = new Thread(<MASK><NEW_LINE>t.start();<NEW_LINE>} catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InstantiationException e) {<NEW_LINE>LOG.error(e);<NEW_LINE>}<NEW_LINE>}
new ConsumerRunner(runMethod, consumer));
971,532
public static boolean isClassLoderStarted(ClassLoader classLoader) {<NEW_LINE>String classLoaderClassName = (classLoader != null) ? classLoader.getClass().getName() : null;<NEW_LINE>// TODO: use interface instead of this hack<NEW_LINE>if ("org.glassfish.web.loader.WebappClassLoader".equals(classLoaderClassName) || "org.apache.catalina.loader.WebappClassLoader".equals(classLoaderClassName) || "org.apache.catalina.loader.ParallelWebappClassLoader".equals(classLoaderClassName) || "org.apache.tomee.catalina.TomEEWebappClassLoader".equals(classLoaderClassName) || "org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader".equals(classLoaderClassName)) {<NEW_LINE>try {<NEW_LINE>Class<?> clazz = classLoader.getClass();<NEW_LINE>boolean isStarted;<NEW_LINE>if ("org.apache.catalina.loader.WebappClassLoaderBase".equals(clazz.getSuperclass().getName())) {<NEW_LINE>clazz = clazz.getSuperclass();<NEW_LINE>isStarted = "STARTED".equals((String) ReflectionHelper.invoke(classLoader, clazz, "getStateName", new Class[] {}, null));<NEW_LINE>} else {<NEW_LINE>isStarted = (boolean) ReflectionHelper.invoke(classLoader, clazz, "isStarted", new Class[] {}, null);<NEW_LINE>}<NEW_LINE>return isStarted;<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.warning(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
"isClassLoderStarted() : {}", e.getMessage());
636,069
private void addSections(JTransactionMatcher transaction, PDFParser.Transaction<JTransaction> tx) {<NEW_LINE>for (JSection section : transaction.getSections()) {<NEW_LINE>List<String> attributes = new ArrayList<>();<NEW_LINE>for (String regexp : section.getPattern()) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>Pattern p = Pattern.compile("\\(\\?\\<([A-Za-z0-9]*)\\>");<NEW_LINE>Matcher matcher = p.matcher(regexp);<NEW_LINE>while (matcher.find()) attributes.add(matcher.group(1));<NEW_LINE>}<NEW_LINE>PDFParser.Section<JTransaction> sec = tx.section(attributes.toArray(new String[0]));<NEW_LINE>if (section.isOptional())<NEW_LINE>sec.optional();<NEW_LINE>for (String regexp : section.getPattern(<MASK><NEW_LINE>sec.assign((t, v) -> {<NEW_LINE>// merge static attributes into extracted values<NEW_LINE>Map<String, String> values = new HashMap<>();<NEW_LINE>if (section.getAttributes() != null)<NEW_LINE>values.putAll(section.getAttributes());<NEW_LINE>values.putAll(v);<NEW_LINE>if (section.getContext() == JSectionContext.SECURITY)<NEW_LINE>setValuesToSecurity(t, values);<NEW_LINE>else if (section.getContext() == JSectionContext.UNIT)<NEW_LINE>setValuesToUnit(t, values);<NEW_LINE>else<NEW_LINE>setValues(t, values);<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
)) sec.match(regexp);
112,436
private boolean upload(User loginUser, String fullName, MultipartFile file, ResourceType type) {<NEW_LINE>// save to local<NEW_LINE>String fileSuffix = Files.getFileExtension(file.getOriginalFilename());<NEW_LINE>String nameSuffix = Files.getFileExtension(fullName);<NEW_LINE>// determine file suffix<NEW_LINE>if (!(StringUtils.isNotEmpty(fileSuffix) && fileSuffix.equalsIgnoreCase(nameSuffix))) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// query tenant<NEW_LINE>String tenantCode = tenantMapper.queryById(loginUser.getTenantId()).getTenantCode();<NEW_LINE>// random file name<NEW_LINE>String localFilename = FileUtils.getUploadFilename(tenantCode, UUID.randomUUID().toString());<NEW_LINE>// save file to hdfs, and delete original file<NEW_LINE>String fileName = storageOperate.getFileName(type, tenantCode, fullName);<NEW_LINE>String resourcePath = storageOperate.getDir(type, tenantCode);<NEW_LINE>try {<NEW_LINE>// if tenant dir not exists<NEW_LINE>if (!storageOperate.exists(tenantCode, resourcePath)) {<NEW_LINE>storageOperate.createTenantDirIfNotExists(tenantCode);<NEW_LINE>}<NEW_LINE>org.apache.dolphinscheduler.api.utils.FileUtils.copyInputStreamToFile(file, localFilename);<NEW_LINE>storageOperate.upload(tenantCode, localFilename, fileName, true, true);<NEW_LINE>} catch (Exception e) {<NEW_LINE>FileUtils.deleteFile(localFilename);<NEW_LINE>logger.error(<MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
e.getMessage(), e);
1,469,261
public static void main(String[] args) {<NEW_LINE>Options options = ConfigManager.Arguments.getOptions();<NEW_LINE>try {<NEW_LINE>DefaultParser parser = new DefaultParser();<NEW_LINE>CommandLine cmd = parser.parse(options, args, null, false);<NEW_LINE>ConfigManager.Arguments arguments = new ConfigManager.Arguments(cmd);<NEW_LINE>ConfigManager.init(arguments);<NEW_LINE>ConfigManager configManager = ConfigManager.getInstance();<NEW_LINE>PluginsManager.getInstance().initialize();<NEW_LINE>InternalLoggerFactory.setDefaultFactory(Slf4JLoggerFactory.INSTANCE);<NEW_LINE>new ModelServer(configManager).startAndWait();<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>// NOPMD<NEW_LINE>System.out.println("Invalid configuration: " + e.getMessage());<NEW_LINE>} catch (ParseException e) {<NEW_LINE>HelpFormatter formatter = new HelpFormatter();<NEW_LINE>formatter.setLeftPadding(1);<NEW_LINE>formatter.setWidth(120);<NEW_LINE>formatter.printHelp(<MASK><NEW_LINE>} catch (Throwable t) {<NEW_LINE>// NOPMD<NEW_LINE>t.printStackTrace();<NEW_LINE>} finally {<NEW_LINE>// NOPMD<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>}
e.getMessage(), options);
66,051
public void onMatch(RelOptRuleCall call) {<NEW_LINE>final Project project = call.rel(0);<NEW_LINE>final DruidQuery query = call.rel(1);<NEW_LINE>final RelOptCluster cluster = project.getCluster();<NEW_LINE>final RexBuilder rexBuilder = cluster.getRexBuilder();<NEW_LINE>if (!DruidQuery.isValidSignature(query.signature() + 'p')) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (canProjectAll(project.getProjects())) {<NEW_LINE>// All expressions can be pushed to Druid in their entirety.<NEW_LINE>final RelNode newProject = project.copy(project.getTraitSet(), ImmutableList.of(Util.last(query.rels)));<NEW_LINE>RelNode newNode = DruidQuery.extendQuery(query, newProject);<NEW_LINE>call.transformTo(newNode);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Pair<List<RexNode>, List<RexNode>> pair = splitProjects(rexBuilder, query, project.getProjects());<NEW_LINE>if (pair == null) {<NEW_LINE>// We can't push anything useful to Druid.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final List<RexNode> above = pair.left;<NEW_LINE>final List<RexNode> below = pair.right;<NEW_LINE>final RelDataTypeFactory.Builder builder = cluster<MASK><NEW_LINE>final RelNode input = Util.last(query.rels);<NEW_LINE>for (RexNode e : below) {<NEW_LINE>final String name;<NEW_LINE>if (e instanceof RexInputRef) {<NEW_LINE>name = input.getRowType().getFieldNames().get(((RexInputRef) e).getIndex());<NEW_LINE>} else {<NEW_LINE>name = null;<NEW_LINE>}<NEW_LINE>builder.add(name, e.getType());<NEW_LINE>}<NEW_LINE>final RelNode newProject = project.copy(project.getTraitSet(), input, below, builder.build());<NEW_LINE>final DruidQuery newQuery = DruidQuery.extendQuery(query, newProject);<NEW_LINE>final RelNode newProject2 = project.copy(project.getTraitSet(), newQuery, above, project.getRowType());<NEW_LINE>call.transformTo(newProject2);<NEW_LINE>}
.getTypeFactory().builder();
342,936
public void marshall(CreateDeploymentRequest createDeploymentRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createDeploymentRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createDeploymentRequest.getApplicationName(), APPLICATIONNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createDeploymentRequest.getRevision(), REVISION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDeploymentRequest.getDeploymentConfigName(), DEPLOYMENTCONFIGNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDeploymentRequest.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDeploymentRequest.getIgnoreApplicationStopFailures(), IGNOREAPPLICATIONSTOPFAILURES_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDeploymentRequest.getTargetInstances(), TARGETINSTANCES_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDeploymentRequest.getAutoRollbackConfiguration(), AUTOROLLBACKCONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDeploymentRequest.getUpdateOutdatedInstancesOnly(), UPDATEOUTDATEDINSTANCESONLY_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDeploymentRequest.getFileExistsBehavior(), FILEEXISTSBEHAVIOR_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createDeploymentRequest.getDeploymentGroupName(), DEPLOYMENTGROUPNAME_BINDING);
1,365,590
public Object resolve(String key) {<NEW_LINE>switch(key) {<NEW_LINE>case "title":<NEW_LINE>return TaskFieldAdapters.TITLE.get(mContentSet);<NEW_LINE>case "description":<NEW_LINE>return TaskFieldAdapters.DESCRIPTION.get(mContentSet);<NEW_LINE>case "checklist":<NEW_LINE>return TaskFieldAdapters.CHECKLIST.get(mContentSet);<NEW_LINE>case "location":<NEW_LINE>return TaskFieldAdapters.LOCATION.get(mContentSet);<NEW_LINE>case "start":<NEW_LINE>return TaskFieldAdapters.DTSTART.get(mContentSet);<NEW_LINE>case "due":<NEW_LINE>return TaskFieldAdapters.DUE.get(mContentSet);<NEW_LINE>case "completed":<NEW_LINE>return TaskFieldAdapters.COMPLETED.get(mContentSet);<NEW_LINE>case "priority":<NEW_LINE>Integer priority = TaskFieldAdapters.PRIORITY.get(mContentSet);<NEW_LINE>return priority == null ? null : mModel.getField(R.id.task_field_priority).getChoices().getTitle(priority);<NEW_LINE>case "privacy":<NEW_LINE>Integer classification = TaskFieldAdapters.CLASSIFICATION.get(mContentSet);<NEW_LINE>return classification == null ? null : mModel.getField(R.id.task_field_classification).getChoices().getTitle(classification);<NEW_LINE>case "status":<NEW_LINE>Integer status = TaskFieldAdapters.STATUS.get(mContentSet);<NEW_LINE>return status == null ? null : mModel.getField(R.id.task_field_status).<MASK><NEW_LINE>case "url":<NEW_LINE>return TaskFieldAdapters.URL.get(mContentSet);<NEW_LINE>default:<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
getChoices().getTitle(status);
1,362,822
public void configure(Parameterization config) {<NEW_LINE>settings = new Settings();<NEW_LINE>//<NEW_LINE>//<NEW_LINE>new IntParameter(K_ID).//<NEW_LINE>addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT).grab(config, x -> settings.k = x);<NEW_LINE>//<NEW_LINE>new ObjectParameter<PCARunner>(PCARunner.Par.PCARUNNER_ID, PCARunner.class, PCARunner.class).grab(config, x -> settings.pca = x);<NEW_LINE>//<NEW_LINE>new ObjectParameter<EigenPairFilter>(EigenPairFilter.PCA_EIGENPAIR_FILTER, EigenPairFilter.class, PercentageEigenPairFilter.class).grab(config, x -> settings.filter = x);<NEW_LINE>//<NEW_LINE>//<NEW_LINE>new DoubleParameter(DBSCAN.Par.EPSILON_ID).//<NEW_LINE>addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_DOUBLE).grab(config, <MASK><NEW_LINE>//<NEW_LINE>//<NEW_LINE>new IntParameter(DBSCAN.Par.MINPTS_ID).//<NEW_LINE>addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT).grab(config, x -> settings.minpts = x);<NEW_LINE>}
x -> settings.epsilon = x);
614,158
void decode(Decoder decoder, Instruction instruction) {<NEW_LINE>int operandSize = decoder.state_operandSize;<NEW_LINE>instruction.setCode(codes[operandSize]);<NEW_LINE>instruction.setOp0Register((operandSize << 4) + decoder.state_reg + decoder.state_zs_extraRegisterBase + Register.AX);<NEW_LINE>if (decoder.state_mod == 3) {<NEW_LINE>instruction.setOp1Register((operandSize << 4) + decoder.state_rm + decoder.state_zs_extraBaseRegisterBase + Register.AX);<NEW_LINE>} else {<NEW_LINE>instruction.setOp1Kind(OpKind.MEMORY);<NEW_LINE>decoder.readOpMem(instruction);<NEW_LINE>}<NEW_LINE>if (operandSize == OpSize.SIZE32) {<NEW_LINE><MASK><NEW_LINE>instruction.setImmediate32(decoder.readUInt32());<NEW_LINE>} else if (operandSize == OpSize.SIZE64) {<NEW_LINE>instruction.setOp2Kind(OpKind.IMMEDIATE32TO64);<NEW_LINE>instruction.setImmediate32(decoder.readUInt32());<NEW_LINE>} else {<NEW_LINE>instruction.setOp2Kind(OpKind.IMMEDIATE16);<NEW_LINE>instruction.setImmediate16((short) decoder.readUInt16());<NEW_LINE>}<NEW_LINE>}
instruction.setOp2Kind(OpKind.IMMEDIATE32);
1,423,846
public void run() {<NEW_LINE>try {<NEW_LINE>while (currentPutCount.get() < totalPutCount) {<NEW_LINE>long startTimeInMs = SystemTime.getInstance().milliseconds();<NEW_LINE>int burstCount = threadLocalRandom.nextInt(maxParallelRequest) + 1;<NEW_LINE>logger.info("PutThread producing {} times ", burstCount);<NEW_LINE>final CountDownLatch countDownLatch = new CountDownLatch(burstCount);<NEW_LINE>final AtomicInteger failureCount = new AtomicInteger(0);<NEW_LINE>for (int j = 0; j < burstCount; j++) {<NEW_LINE>Callback<Pair<String, byte[]>> callback = new Callback<Pair<String, byte[]>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onCompletion(Pair<String, byte[]> result, Exception exception) {<NEW_LINE>if (exception == null) {<NEW_LINE>if (currentPutCount.get() < totalPutCount) {<NEW_LINE>generatedBlobAccessInfos.add(new BlobAccessInfo(result.getFirst(), result.getSecond()));<NEW_LINE>currentPutCount.incrementAndGet();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.error("PutBlob failed with ", exception);<NEW_LINE>failureCount.incrementAndGet();<NEW_LINE>}<NEW_LINE>countDownLatch.countDown();<NEW_LINE>}<NEW_LINE>};<NEW_LINE>putHelper.putBlob(callback, metricsCollector);<NEW_LINE>}<NEW_LINE>countDownLatch.await(5, TimeUnit.MINUTES);<NEW_LINE>metricsCollector.updateTimePassedSoFar(SystemTime.getInstance(<MASK><NEW_LINE>if (failureCount.get() > maxFailuresPerPutBatchToStopPuts) {<NEW_LINE>logger.error("{} failures during this batch, hence exiting the Put Thread", failureCount.get());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>Thread.sleep(threadLocalRandom.nextLong(sleepTimeBetweenBatchPutsInMs));<NEW_LINE>}<NEW_LINE>} catch (InterruptedException ex) {<NEW_LINE>logger.error("InterruptedException in putThread ", ex);<NEW_LINE>} finally {<NEW_LINE>putComplete.set(true);<NEW_LINE>metricsCollector.reportMetrics();<NEW_LINE>}<NEW_LINE>logger.info("Exiting Producer. Current Put Count {}, total Put Count {}", currentPutCount.get(), totalPutCount);<NEW_LINE>}
).milliseconds() - startTimeInMs);
5,578
private <T> Function<Class, Boolean> typeMatches(BeanType<T> definition, AnnotationMetadata annotationMetadata) {<NEW_LINE>Class<T> bt;<NEW_LINE>if (definition instanceof ProxyBeanDefinition) {<NEW_LINE>bt = ((ProxyBeanDefinition<T>) definition).getTargetType();<NEW_LINE>} else if (definition instanceof AdvisedBeanType) {<NEW_LINE>// noinspection unchecked<NEW_LINE>bt = (Class<T>) ((AdvisedBeanType<T>) definition).getInterceptedType();<NEW_LINE>} else {<NEW_LINE>bt = definition.getBeanType();<NEW_LINE>if (annotationMetadata.hasStereotype(INTRODUCTION_TYPE)) {<NEW_LINE>Class<? super T> superclass = bt.getSuperclass();<NEW_LINE>if (superclass == Object.class) {<NEW_LINE>// interface introduction<NEW_LINE>return clazz -> clazz.isAssignableFrom(bt);<NEW_LINE>} else {<NEW_LINE>// abstract class introduction<NEW_LINE>return clazz -> clazz == superclass;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (annotationMetadata.hasStereotype(AnnotationUtil.ANN_AROUND)) {<NEW_LINE>Class<? super T> superclass = bt.getSuperclass();<NEW_LINE>return clazz -> clazz == superclass || clazz == bt;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (annotationMetadata.hasAnnotation(DefaultImplementation.class)) {<NEW_LINE>Optional<Class> defaultImpl = annotationMetadata.classValue(DefaultImplementation.class);<NEW_LINE>if (!defaultImpl.isPresent()) {<NEW_LINE>defaultImpl = annotationMetadata.classValue(DefaultImplementation.class, "name");<NEW_LINE>}<NEW_LINE>if (defaultImpl.filter(impl -> impl == bt).isPresent()) {<NEW_LINE>return <MASK><NEW_LINE>} else {<NEW_LINE>return clazz -> clazz == bt;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return clazz -> clazz != Object.class && clazz.isAssignableFrom(bt);<NEW_LINE>}
clazz -> clazz.isAssignableFrom(bt);
1,629,624
public static JsonRequestBPartnerUpsertItem mapHospitalToUpsertRequest(@NonNull final Hospital hospital, @Nullable final String orgCode) {<NEW_LINE>final String hospitalExternalIdentifier = formatExternalId(hospital.getId());<NEW_LINE>final JsonRequestBPartner jsonRequestBPartner = new JsonRequestBPartner();<NEW_LINE>jsonRequestBPartner.setCompanyName(hospital.getCompanyName());<NEW_LINE>jsonRequestBPartner.setName(hospital.getName());<NEW_LINE>jsonRequestBPartner.setName2(hospital.getCompany());<NEW_LINE>jsonRequestBPartner.setName3(hospital.getAdditionalCompanyName());<NEW_LINE>jsonRequestBPartner.setCustomer(true);<NEW_LINE>jsonRequestBPartner.setPhone(hospital.getPhone());<NEW_LINE>jsonRequestBPartner.setCode(hospitalExternalIdentifier);<NEW_LINE>jsonRequestBPartner.setUrl(hospital.getWebsite());<NEW_LINE>final JsonRequestLocationUpsert upsertLocationsRequest;<NEW_LINE>{<NEW_LINE>// location<NEW_LINE>final JsonRequestLocation requestLocation = new JsonRequestLocation();<NEW_LINE>requestLocation.setCountryCode(GetPatientsRouteConstants.COUNTRY_CODE_DE);<NEW_LINE>requestLocation.setCity(hospital.getCity());<NEW_LINE>requestLocation.setPostal(hospital.getPostalCode());<NEW_LINE>requestLocation.<MASK><NEW_LINE>requestLocation.setBillTo(true);<NEW_LINE>requestLocation.setBillToDefault(true);<NEW_LINE>requestLocation.setShipTo(true);<NEW_LINE>requestLocation.setShipToDefault(true);<NEW_LINE>upsertLocationsRequest = toJsonRequestLocationUpsert(hospital.getId(), requestLocation);<NEW_LINE>}<NEW_LINE>final JsonRequestContactUpsert requestContactUpsert;<NEW_LINE>{<NEW_LINE>// contact<NEW_LINE>final JsonRequestContact contact = new JsonRequestContact();<NEW_LINE>contact.setName(hospital.getName());<NEW_LINE>contact.setPhone(hospital.getPhone());<NEW_LINE>contact.setEmail(hospital.getEmail());<NEW_LINE>contact.setFax(hospital.getFax());<NEW_LINE>// contact.setLocationIdentifier(hospitalExternalIdentifier); todo<NEW_LINE>final JsonRequestContactUpsertItem contactUpsertItem = JsonRequestContactUpsertItem.builder().contactIdentifier(hospitalExternalIdentifier).contact(contact).build();<NEW_LINE>requestContactUpsert = JsonRequestContactUpsert.builder().requestItem(contactUpsertItem).build();<NEW_LINE>}<NEW_LINE>final JsonCompositeAlbertaBPartner compositeAlbertaBPartner;<NEW_LINE>{<NEW_LINE>// alberta composite<NEW_LINE>final JsonAlbertaBPartner albertaBPartner = new JsonAlbertaBPartner();<NEW_LINE>albertaBPartner.setTimestamp(asInstant(hospital.getTimestamp()));<NEW_LINE>compositeAlbertaBPartner = JsonCompositeAlbertaBPartner.builder().jsonAlbertaBPartner(albertaBPartner).role(JsonBPartnerRole.Hospital).build();<NEW_LINE>}<NEW_LINE>final JsonRequestComposite compositeUpsertItem = JsonRequestComposite.builder().orgCode(orgCode).bpartner(jsonRequestBPartner).locations(upsertLocationsRequest).contacts(requestContactUpsert).compositeAlbertaBPartner(compositeAlbertaBPartner).build();<NEW_LINE>return JsonRequestBPartnerUpsertItem.builder().bpartnerIdentifier(hospitalExternalIdentifier).bpartnerComposite(compositeUpsertItem).build();<NEW_LINE>}
setAddress1(hospital.getAddress());
277,135
private void loadNode740() {<NEW_LINE>ProgramDiagnosticTypeNode node = new ProgramDiagnosticTypeNode(this.context, Identifiers.ProgramStateMachineType_ProgramDiagnostics, new QualifiedName(0, "ProgramDiagnostics"), new LocalizedText("en", "ProgramDiagnostics"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.ProgramDiagnosticDataType, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasProperty, Identifiers.ProgramStateMachineType_ProgramDiagnostics_CreateSessionId.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasProperty, Identifiers.ProgramStateMachineType_ProgramDiagnostics_CreateClientName.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasProperty, Identifiers.ProgramStateMachineType_ProgramDiagnostics_InvocationCreationTime<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasProperty, Identifiers.ProgramStateMachineType_ProgramDiagnostics_LastTransitionTime.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasProperty, Identifiers.ProgramStateMachineType_ProgramDiagnostics_LastMethodCall.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasProperty, Identifiers.ProgramStateMachineType_ProgramDiagnostics_LastMethodSessionId.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasProperty, Identifiers.ProgramStateMachineType_ProgramDiagnostics_LastMethodInputArguments.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasProperty, Identifiers.ProgramStateMachineType_ProgramDiagnostics_LastMethodOutputArguments.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasProperty, Identifiers.ProgramStateMachineType_ProgramDiagnostics_LastMethodCallTime.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasProperty, Identifiers.ProgramStateMachineType_ProgramDiagnostics_LastMethodReturnStatus.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasTypeDefinition, Identifiers.ProgramDiagnosticType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasModellingRule, Identifiers.ModellingRule_Optional.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramStateMachineType_ProgramDiagnostics, Identifiers.HasComponent, Identifiers.ProgramStateMachineType.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
1,135,428
private Optional<TimelineEvent> addOtherEventDesc(BlackboardArtifact artifact) throws TskCoreException, DuplicateException {<NEW_LINE>if (artifact == null) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>Long timeVal = artifact.getAttributes().stream().filter((attr) -> attr.getAttributeType().getValueType() == BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME).map(attr -> attr.getValueLong()).findFirst().orElse(null);<NEW_LINE>if (timeVal == null) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>String description = String.format("%s: %d", artifact.getDisplayName(), artifact.getId());<NEW_LINE>TimelineEventDescriptionWithTime evtWDesc = new TimelineEventDescriptionWithTime(timeVal, description, description, description);<NEW_LINE>TimelineEventType evtType = (ARTIFACT_TYPE_IDS.contains(artifact.getArtifactTypeID())) <MASK><NEW_LINE>return addArtifactEvent(evtWDesc, evtType, artifact);<NEW_LINE>}
? TimelineEventType.STANDARD_ARTIFACT_CATCH_ALL : TimelineEventType.CUSTOM_ARTIFACT_CATCH_ALL;
1,100,746
protected Control createDialogArea(Composite parent) {<NEW_LINE>Composite area = (Composite) super.createDialogArea(parent);<NEW_LINE>Composite container = withLayoutData(createComposite(area, new FillLayout()), new GridData(SWT.FILL, SWT.FILL, true, true));<NEW_LINE>Group catGroup = createGroup(container, "Categories", new GridLayout(1, false));<NEW_LINE>categories = createCheckboxTableViewer(catGroup, SWT.NONE);<NEW_LINE>categories.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));<NEW_LINE>categories.<MASK><NEW_LINE>categories.setContentProvider(new ArrayContentProvider());<NEW_LINE>updateCategories();<NEW_LINE>categories.addCheckStateListener(event -> {<NEW_LINE>if (event.getChecked()) {<NEW_LINE>currentCategories.add((String) event.getElement());<NEW_LINE>} else {<NEW_LINE>currentCategories.remove(event.getElement());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>createLink(catGroup, "Select <a>none / default</a> | <a>all</a>", e -> {<NEW_LINE>switch(e.text) {<NEW_LINE>case "none / default":<NEW_LINE>currentCategories.clear();<NEW_LINE>categories.setAllChecked(false);<NEW_LINE>break;<NEW_LINE>case "all":<NEW_LINE>currentCategories.clear();<NEW_LINE>currentCategories.addAll(Arrays.asList(FUCHSIA_CATEGORIES));<NEW_LINE>currentCategories.addAll(additionalCategories);<NEW_LINE>categories.setAllChecked(true);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>Composite custom = withLayoutData(createComposite(catGroup, new GridLayout(3, false)), new GridData(SWT.FILL, SWT.BOTTOM, true, false));<NEW_LINE>withLayoutData(createLabel(custom, "Custom:"), new GridData(SWT.LEFT, SWT.CENTER, false, false));<NEW_LINE>Text customCat = withLayoutData(createTextbox(custom, ""), new GridData(SWT.FILL, SWT.CENTER, true, false));<NEW_LINE>Button customAdd = withLayoutData(Widgets.createButton(custom, "Add", e -> {<NEW_LINE>String cat = customCat.getText().trim();<NEW_LINE>additionalCategories.add(cat);<NEW_LINE>currentCategories.add(cat);<NEW_LINE>categories.add(cat);<NEW_LINE>categories.setChecked(cat, true);<NEW_LINE>categories.reveal(cat);<NEW_LINE>customCat.setText("");<NEW_LINE>((Button) e.widget).setEnabled(false);<NEW_LINE>}), new GridData(SWT.RIGHT, SWT.CENTER, false, false));<NEW_LINE>customAdd.setEnabled(false);<NEW_LINE>customCat.addListener(SWT.Modify, e -> {<NEW_LINE>String cat = customCat.getText().trim();<NEW_LINE>customAdd.setEnabled(!cat.isEmpty() && !cat.contains(","));<NEW_LINE>});<NEW_LINE>return area;<NEW_LINE>}
getTable().setHeaderVisible(false);
1,174,099
public ImmutableSortedMap<DocumentKey, Document> applyBundledDocuments(ImmutableSortedMap<DocumentKey, MutableDocument> documents, String bundleId) {<NEW_LINE>// Allocates a target to hold all document keys from the bundle, such that<NEW_LINE>// they will not get garbage collected right away.<NEW_LINE>TargetData umbrellaTargetData = allocateTarget(newUmbrellaTarget(bundleId));<NEW_LINE>return persistence.runTransaction("Apply bundle documents", () -> {<NEW_LINE>ImmutableSortedSet<DocumentKey> documentKeys = DocumentKey.emptyKeySet();<NEW_LINE>Map<DocumentKey, MutableDocument> <MASK><NEW_LINE>for (Entry<DocumentKey, MutableDocument> entry : documents) {<NEW_LINE>DocumentKey documentKey = entry.getKey();<NEW_LINE>MutableDocument document = entry.getValue();<NEW_LINE>if (document.isFoundDocument()) {<NEW_LINE>documentKeys = documentKeys.insert(documentKey);<NEW_LINE>}<NEW_LINE>documentMap.put(documentKey, document);<NEW_LINE>}<NEW_LINE>targetCache.removeMatchingKeysForTargetId(umbrellaTargetData.getTargetId());<NEW_LINE>targetCache.addMatchingKeys(documentKeys, umbrellaTargetData.getTargetId());<NEW_LINE>DocumentChangeResult result = populateDocumentChanges(documentMap);<NEW_LINE>Map<DocumentKey, MutableDocument> changedDocs = result.changedDocuments;<NEW_LINE>return localDocuments.getLocalViewOfDocuments(changedDocs, result.existenceChangedKeys);<NEW_LINE>});<NEW_LINE>}
documentMap = new HashMap<>();
1,840,450
private List<Address> processSegmentPointerChain(DyldChainedFixupHeader chainHeader, DyldChainedStartsInSegment chainStart) throws MemoryAccessException, CancelledException {<NEW_LINE>List<Address> fixedAddresses = new ArrayList<Address>();<NEW_LINE>long fixedAddressCount = 0;<NEW_LINE>if (chainStart.getPointerFormat() == 0) {<NEW_LINE>return fixedAddresses;<NEW_LINE>}<NEW_LINE>long dataPageStart = chainStart.getSegmentOffset();<NEW_LINE>dataPageStart = dataPageStart + program.getImageBase().getOffset();<NEW_LINE>long pageSize = chainStart.getPageSize();<NEW_LINE>long pageStartsCount = chainStart.getPageCount();<NEW_LINE>long authValueAdd = 0;<NEW_LINE>short[] pageStarts = chainStart.getPage_starts();<NEW_LINE>short ptrFormatValue = chainStart.getPointerFormat();<NEW_LINE>DyldChainType ptrFormat = DyldChainType.lookupChainPtr(ptrFormatValue);<NEW_LINE>monitor.setMessage("Fixing " + ptrFormat.getName() + " chained pointers...");<NEW_LINE>monitor.setMaximum(pageStartsCount);<NEW_LINE>for (int index = 0; index < pageStartsCount; index++) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>long page = dataPageStart + (pageSize * index);<NEW_LINE>monitor.setProgress(index);<NEW_LINE>int pageEntry = pageStarts[index] & 0xffff;<NEW_LINE>if (pageEntry == DYLD_CHAINED_PTR_START_NONE) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>List<Address> unchainedLocList = new ArrayList<>(1024);<NEW_LINE>// first entry is byte based<NEW_LINE>long pageOffset = pageEntry;<NEW_LINE>switch(ptrFormat) {<NEW_LINE>case DYLD_CHAINED_PTR_ARM64E:<NEW_LINE>case DYLD_CHAINED_PTR_ARM64E_KERNEL:<NEW_LINE>case DYLD_CHAINED_PTR_ARM64E_USERLAND:<NEW_LINE>case DYLD_CHAINED_PTR_ARM64E_USERLAND24:<NEW_LINE>processPointerChain(chainHeader, unchainedLocList, <MASK><NEW_LINE>break;<NEW_LINE>// These might work, but have not been fully tested!<NEW_LINE>case DYLD_CHAINED_PTR_64:<NEW_LINE>case DYLD_CHAINED_PTR_64_OFFSET:<NEW_LINE>case DYLD_CHAINED_PTR_64_KERNEL_CACHE:<NEW_LINE>case DYLD_CHAINED_PTR_32:<NEW_LINE>case DYLD_CHAINED_PTR_32_CACHE:<NEW_LINE>case DYLD_CHAINED_PTR_32_FIRMWARE:<NEW_LINE>case DYLD_CHAINED_PTR_X86_64_KERNEL_CACHE:<NEW_LINE>processPointerChain(chainHeader, unchainedLocList, ptrFormat, page, pageOffset, authValueAdd);<NEW_LINE>break;<NEW_LINE>case DYLD_CHAINED_PTR_ARM64E_FIRMWARE:<NEW_LINE>default:<NEW_LINE>log.appendMsg("WARNING: Pointer Chain format " + ptrFormat + " not processed yet!");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>fixedAddressCount += unchainedLocList.size();<NEW_LINE>fixedAddresses.addAll(unchainedLocList);<NEW_LINE>}<NEW_LINE>log.appendMsg("Fixed " + fixedAddressCount + " " + ptrFormat.getName() + " chained pointers.");<NEW_LINE>return fixedAddresses;<NEW_LINE>}
ptrFormat, page, pageOffset, authValueAdd);
1,081,796
protected void paintIcon(Graphics2D g2) {<NEW_LINE>// see HexDigit.getSegs()<NEW_LINE>final var segson = HexDigit.getSegs(isHexDisplay ? 10 : 7);<NEW_LINE>g2.setStroke(new BasicStroke(scale(2)));<NEW_LINE>g2.setColor(Color.WHITE);<NEW_LINE>g2.fillRect(scale(2), 0, scale(10), scale(16));<NEW_LINE>g2.setColor(Color.BLACK);<NEW_LINE>g2.drawRect(scale(2), 0, scale(10), scale(16));<NEW_LINE>g2.setColor((segson & HexDigit.SEG_A_MASK) != 0 ? <MASK><NEW_LINE>g2.drawLine(scale(5), scale(3), scale(8), scale(3));<NEW_LINE>g2.setColor((segson & HexDigit.SEG_B_MASK) != 0 ? Color.RED : Color.LIGHT_GRAY);<NEW_LINE>g2.drawLine(scale(9), scale(4), scale(9), scale(7));<NEW_LINE>g2.setColor((segson & HexDigit.SEG_C_MASK) != 0 ? Color.RED : Color.LIGHT_GRAY);<NEW_LINE>g2.drawLine(scale(9), scale(9), scale(9), scale(12));<NEW_LINE>g2.setColor((segson & HexDigit.SEG_D_MASK) != 0 ? Color.RED : Color.LIGHT_GRAY);<NEW_LINE>g2.drawLine(scale(5), scale(13), scale(8), scale(13));<NEW_LINE>g2.setColor((segson & HexDigit.SEG_F_MASK) != 0 ? Color.RED : Color.LIGHT_GRAY);<NEW_LINE>g2.drawLine(scale(4), scale(4), scale(4), scale(7));<NEW_LINE>g2.setColor((segson & HexDigit.SEG_E_MASK) != 0 ? Color.RED : Color.LIGHT_GRAY);<NEW_LINE>g2.drawLine(scale(4), scale(9), scale(4), scale(12));<NEW_LINE>g2.setColor((segson & HexDigit.SEG_G_MASK) != 0 ? Color.RED : Color.LIGHT_GRAY);<NEW_LINE>g2.drawLine(scale(5), scale(8), scale(8), scale(8));<NEW_LINE>}
Color.RED : Color.LIGHT_GRAY);
1,235,200
private <T extends Statement> int validate(final ServiceContext serviceContext, final ConfiguredStatement<T> configured, final SessionProperties sessionProperties, final KsqlExecutionContext executionContext, final Injector injector) throws KsqlStatementException {<NEW_LINE>final Statement statement = configured.getStatement();<NEW_LINE>final Class<? extends Statement<MASK><NEW_LINE>final StatementValidator<T> customValidator = (StatementValidator<T>) customValidators.get(statementClass);<NEW_LINE>if (customValidator != null) {<NEW_LINE>customValidator.validate(configured, sessionProperties, executionContext, serviceContext);<NEW_LINE>} else if (KsqlEngine.isExecutableStatement(configured.getStatement()) || configured.getStatement() instanceof TerminateQuery) {<NEW_LINE>final ConfiguredStatement<?> statementInjected = injector.inject(configured);<NEW_LINE>distributedStatementValidator.create(statementInjected, serviceContext, executionContext);<NEW_LINE>} else {<NEW_LINE>throw new KsqlStatementException("Do not know how to validate statement of type: " + statementClass + " Known types: " + customValidators.keySet(), configured.getStatementText());<NEW_LINE>}<NEW_LINE>return (statement instanceof CreateAsSelect || statement instanceof InsertInto) ? 1 : 0;<NEW_LINE>}
> statementClass = statement.getClass();
1,220,485
int compare(/* const */<NEW_LINE>Treap treap, int left, int node) {<NEW_LINE>int right = treap.getElement(node);<NEW_LINE>Edge edge1 = m_helper.m_edges.get(left);<NEW_LINE>Edge edge2 = m_helper.m_edges.get(right);<NEW_LINE>boolean bEdge1Reversed = edge1.getReversed();<NEW_LINE>boolean bEdge2Reversed = edge2.getReversed();<NEW_LINE>double x1 = edge1.m_segment.intersectionOfYMonotonicWithAxisX(m_helper.m_yScanline, 0);<NEW_LINE>double x2 = edge2.m_segment.intersectionOfYMonotonicWithAxisX(m_helper.m_yScanline, 0);<NEW_LINE>if (x1 == x2) {<NEW_LINE>// apparently these edges originate from same vertex and the<NEW_LINE>// scanline is on the vertex.move scanline a little.<NEW_LINE>double y1 = bEdge1Reversed ? edge1.m_segment.getStartY() : edge1.m_segment.getEndY();<NEW_LINE>double y2 = bEdge2Reversed ? edge2.m_segment.getStartY() : edge2.m_segment.getEndY();<NEW_LINE>double miny = Math.min(y1, y2);<NEW_LINE>double y = (miny - m_helper.m_yScanline) * 0.5 + m_helper.m_yScanline;<NEW_LINE>if (y == m_helper.m_yScanline) {<NEW_LINE>// assert(0); //ST: not a bug. just curious to see this<NEW_LINE>// happens.<NEW_LINE>// apparently, one of the segments is almost<NEW_LINE>y = miny;<NEW_LINE>// horizontal line.<NEW_LINE>}<NEW_LINE>x1 = edge1.m_segment.intersectionOfYMonotonicWithAxisX(y, 0);<NEW_LINE>x2 = edge2.<MASK><NEW_LINE>assert (x1 != x2);<NEW_LINE>}<NEW_LINE>return x1 < x2 ? -1 : (x1 > x2 ? 1 : 0);<NEW_LINE>}
m_segment.intersectionOfYMonotonicWithAxisX(y, 0);
1,261,634
private void initMaps(File homophoneOccurrenceFile) throws FileNotFoundException {<NEW_LINE>try (Scanner s = new Scanner(homophoneOccurrenceFile)) {<NEW_LINE>while (s.hasNextLine()) {<NEW_LINE>String line = s.nextLine();<NEW_LINE>String[] parts = line.split("\t");<NEW_LINE>if (parts.length != 3) {<NEW_LINE>throw new RuntimeException("Unexpected format: '" + line + "'");<NEW_LINE>}<NEW_LINE>long occurrenceCount = Integer.parseInt(parts[1]);<NEW_LINE>OccurrenceInfo occurrenceInfo = new OccurrenceInfo<MASK><NEW_LINE>List<OccurrenceInfo> list;<NEW_LINE>if (occurrenceInfos.containsKey(parts[0])) {<NEW_LINE>list = occurrenceInfos.get(parts[0]);<NEW_LINE>} else {<NEW_LINE>list = new ArrayList<>();<NEW_LINE>}<NEW_LINE>list.add(occurrenceInfo);<NEW_LINE>occurrenceInfos.put(parts[0], list);<NEW_LINE>ngramToOccurrence.put(parts[2], occurrenceCount);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(parts[2], occurrenceCount);
1,046,184
public okhttp3.Call applicationsApplicationIdMapKeysPostCall(String applicationId, ApplicationKeyMappingRequestDTO applicationKeyMappingRequestDTO, String xWSO2Tenant, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = applicationKeyMappingRequestDTO;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/applications/{applicationId}/map-keys".replaceAll("\\{" + "applicationId" + "\\}", localVarApiClient.escapeString<MASK><NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>if (xWSO2Tenant != null) {<NEW_LINE>localVarHeaderParams.put("X-WSO2-Tenant", localVarApiClient.parameterToString(xWSO2Tenant));<NEW_LINE>}<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null) {<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>}<NEW_LINE>final String[] localVarContentTypes = { "application/json" };<NEW_LINE>final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>String[] localVarAuthNames = new String[] { "OAuth2Security" };<NEW_LINE>return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);<NEW_LINE>}
(applicationId.toString()));
839,371
/*<NEW_LINE>*<NEW_LINE>*/<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>private Object fluxifyInputIfNecessary(Object input) {<NEW_LINE>if (input instanceof Message && !((Message) input).getHeaders().containsKey("user-agent") && this.isConsumer() && !this.isInputTypePublisher()) {<NEW_LINE>return input;<NEW_LINE>}<NEW_LINE>if (FunctionTypeUtils.isMultipleArgumentType(this.inputType)) {<NEW_LINE>return input;<NEW_LINE>}<NEW_LINE>if (!this.isRoutingFunction() && !(input instanceof Publisher)) {<NEW_LINE>Object payload = input;<NEW_LINE>if (input instanceof Message) {<NEW_LINE>payload = ((Message) input).getPayload();<NEW_LINE>}<NEW_LINE>if (JsonMapper.isJsonStringRepresentsCollection(payload) && !FunctionTypeUtils.isTypeCollection(this.inputType) && !FunctionTypeUtils.isTypeArray(this.inputType)) {<NEW_LINE>MessageHeaders headers = ((Message) input).getHeaders();<NEW_LINE>Collection collectionPayload = jsonMapper.fromJson(payload, Collection.class);<NEW_LINE>Class inputClass = FunctionTypeUtils.getRawType(this.inputType);<NEW_LINE>if (this.isInputTypeMessage()) {<NEW_LINE>inputClass = FunctionTypeUtils.getRawType(FunctionTypeUtils.getImmediateGenericType(this.inputType, 0));<NEW_LINE>}<NEW_LINE>if (!inputClass.isAssignableFrom(Object.class) && !inputClass.isAssignableFrom(byte[].class)) {<NEW_LINE>logger.<MASK><NEW_LINE>input = collectionPayload.stream().map(p -> MessageBuilder.withPayload(p).copyHeaders(headers).build()).collect(Collectors.toList());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (this.isTypePublisher(this.inputType) && !(input instanceof Publisher)) {<NEW_LINE>if (input == null) {<NEW_LINE>input = FunctionTypeUtils.isMono(this.inputType) ? Mono.empty() : Flux.empty();<NEW_LINE>} else if (input instanceof Message && ((Message) input).getPayload() instanceof Iterable) {<NEW_LINE>input = FunctionTypeUtils.isMono(this.inputType) ? Mono.just(input) : Flux.just(input).flatMap(v -> {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Creating Flux from Iterable: " + ((Message) v).getPayload());<NEW_LINE>}<NEW_LINE>return Flux.fromIterable((Iterable) ((Message) v).getPayload());<NEW_LINE>});<NEW_LINE>} else if (input instanceof Iterable) {<NEW_LINE>input = FunctionTypeUtils.isMono(this.inputType) ? Mono.just(input) : Flux.fromIterable((Iterable) input);<NEW_LINE>} else {<NEW_LINE>input = FunctionTypeUtils.isMono(this.inputType) ? Mono.just(input) : Flux.just(input);<NEW_LINE>}<NEW_LINE>} else if (!(input instanceof Publisher) && input instanceof Iterable && !FunctionTypeUtils.isTypeCollection(this.inputType)) {<NEW_LINE>input = Flux.fromIterable((Iterable) input);<NEW_LINE>}<NEW_LINE>return input;<NEW_LINE>}
debug("Converting JSON string representing collection to a list of Messages. Function '" + this + "' will be invoked iteratively");
1,000,198
public void start(Container container) throws Exception {<NEW_LINE>if (mapTilesPath == null || mapSettingsPath == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LOG.info("Starting map service with tile data: " + mapTilesPath.toAbsolutePath());<NEW_LINE>Class.forName(org.sqlite.JDBC.class.getName());<NEW_LINE>connection = DriverManager.getConnection("jdbc:sqlite:" + mapTilesPath.toAbsolutePath());<NEW_LINE>metadata = getMetadata(connection);<NEW_LINE>if (metadata.isValid()) {<NEW_LINE>mapConfig = loadMapSettingsJson(mapSettingsPath);<NEW_LINE>if (mapConfig == null) {<NEW_LINE>LOG.warning("Map config could not be loaded from '" + mapSettingsPath.toAbsolutePath() + "', map functionality will not work");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>LOG.warning("Map meta data could not be loaded, map functionality will not work");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ObjectNode options = Optional.ofNullable((ObjectNode) mapConfig.get("options")).orElse(mapConfig.objectNode());<NEW_LINE>ObjectNode defaultOptions = Optional.ofNullable((ObjectNode) options.get("default")).orElse(mapConfig.objectNode());<NEW_LINE>options.replace("default", defaultOptions);<NEW_LINE>mapConfig.replace("options", options);<NEW_LINE>if (!defaultOptions.has("maxZoom")) {<NEW_LINE>defaultOptions.put("maxZoom", metadata.maxZoom);<NEW_LINE>}<NEW_LINE>if (!defaultOptions.has("minZoom")) {<NEW_LINE>defaultOptions.<MASK><NEW_LINE>}<NEW_LINE>if (metadata.getCenter() != null) {<NEW_LINE>if (!defaultOptions.has("center")) {<NEW_LINE>ArrayNode center = metadata.getCenter().deepCopy();<NEW_LINE>center.remove(2);<NEW_LINE>defaultOptions.set("center", center);<NEW_LINE>}<NEW_LINE>if (!defaultOptions.has("zoom")) {<NEW_LINE>defaultOptions.put("zoom", metadata.getCenter().get(2).asDouble(13d));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!defaultOptions.has("bounds") && metadata.getBounds() != null) {<NEW_LINE>defaultOptions.set("bounds", metadata.getBounds());<NEW_LINE>}<NEW_LINE>}
put("minZoom", metadata.minZoom);
1,137,675
public void write(SAML11StatusType status) throws ProcessingException {<NEW_LINE>StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, SAML11Constants.STATUS, namespace);<NEW_LINE>SAML11StatusCodeType statusCode = status.getStatusCode();<NEW_LINE>if (statusCode != null) {<NEW_LINE>write(statusCode);<NEW_LINE>}<NEW_LINE>String statusMsg = status.getStatusMessage();<NEW_LINE>if (StringUtil.isNotNull(statusMsg)) {<NEW_LINE>StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, SAML11Constants.STATUS_MSG, namespace);<NEW_LINE><MASK><NEW_LINE>StaxUtil.writeEndElement(writer);<NEW_LINE>}<NEW_LINE>CommonStatusDetailType details = status.getStatusDetail();<NEW_LINE>if (details != null) {<NEW_LINE>StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, SAML11Constants.STATUS_DETAIL, namespace);<NEW_LINE>List<Object> objs = details.getAny();<NEW_LINE>for (Object theObj : objs) {<NEW_LINE>StaxUtil.writeCharacters(writer, theObj.toString());<NEW_LINE>}<NEW_LINE>StaxUtil.writeEndElement(writer);<NEW_LINE>}<NEW_LINE>StaxUtil.writeEndElement(writer);<NEW_LINE>StaxUtil.flush(writer);<NEW_LINE>}
StaxUtil.writeCharacters(writer, statusMsg);
350,153
public void verifyParams(Universe universe) {<NEW_LINE>UserIntent userIntent = universe.getUniverseDetails().getPrimaryCluster().userIntent;<NEW_LINE>Map<String, String> universeConfig = universe.getConfig();<NEW_LINE>if (upgradeOption == UpgradeOption.ROLLING_UPGRADE && universe.nodesInTransit()) {<NEW_LINE>throw new PlatformServiceException(Status.BAD_REQUEST, "Cannot perform a rolling upgrade on universe " + universe.universeUUID + " as it has nodes in one of " + NodeDetails.IN_TRANSIT_STATES + " states.");<NEW_LINE>}<NEW_LINE>if (isKubernetesUpgradeSupported() && userIntent.providerType.equals(CloudType.kubernetes)) {<NEW_LINE>if (!universeConfig.containsKey(Universe.HELM2_LEGACY)) {<NEW_LINE>throw new PlatformServiceException(Status.BAD_REQUEST, "Cannot perform upgrade on universe. " + universe.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!isKubernetesUpgradeSupported() && userIntent.providerType.equals(CloudType.kubernetes)) {<NEW_LINE>throw new PlatformServiceException(Status.BAD_REQUEST, "Kubernetes Upgrade is not supported.");<NEW_LINE>}<NEW_LINE>}
universeUUID + " as it is not helm 3 compatible. " + "Manually migrate the deployment to helm3 " + "and then mark the universe as helm 3 compatible.");
1,117,539
public String deleteTimeseries(PartialPath pathPattern, boolean isPrefixMatch) throws MetadataException {<NEW_LINE>List<SchemaRegion> schemaRegions = getInvolvedSchemaRegions(pathPattern, isPrefixMatch);<NEW_LINE>if (schemaRegions.isEmpty()) {<NEW_LINE>// In the cluster mode, the deletion of a timeseries will be forwarded to all the nodes. For<NEW_LINE>// nodes that do not have the metadata of the timeseries, the coordinator expects a<NEW_LINE>// PathNotExistException.<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>Set<String> failedNames = new HashSet<>();<NEW_LINE>int deletedNum = 0;<NEW_LINE>Pair<Integer, Set<String>> sgDeletionResult;<NEW_LINE>for (SchemaRegion schemaRegion : schemaRegions) {<NEW_LINE>sgDeletionResult = schemaRegion.deleteTimeseries(pathPattern, isPrefixMatch);<NEW_LINE>deletedNum += sgDeletionResult.left;<NEW_LINE>failedNames.addAll(sgDeletionResult.right);<NEW_LINE>}<NEW_LINE>if (deletedNum == 0 && failedNames.isEmpty()) {<NEW_LINE>// In the cluster mode, the deletion of a timeseries will be forwarded to all the nodes. For<NEW_LINE>// nodes that do not have the metadata of the timeseries, the coordinator expects a<NEW_LINE>// PathNotExistException.<NEW_LINE>throw new PathNotExistException(pathPattern.getFullPath());<NEW_LINE>}<NEW_LINE>return failedNames.isEmpty() ? null : String.join(",", failedNames);<NEW_LINE>}
PathNotExistException(pathPattern.getFullPath());
1,163,976
public CreateSchemaResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateSchemaResult createSchemaResult = new CreateSchemaResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return createSchemaResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("SchemaArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createSchemaResult.setSchemaArn(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return createSchemaResult;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
146,883
private <T extends Trait> SecurityScheme convertAuthScheme(Context<? extends Trait> context, SecuritySchemeConverter<T> converter, AuthorizerDefinition authorizer, String authorizerName) {<NEW_LINE>T authTrait = context.getService().expectTrait(converter.getAuthSchemeType());<NEW_LINE>SecurityScheme createdScheme = converter.createSecurityScheme(context, authTrait);<NEW_LINE>SecurityScheme.Builder schemeBuilder = createdScheme.toBuilder();<NEW_LINE>// Do not default the client extension if there is no "type" property<NEW_LINE>// set on the authorizer definition. This allows setting the<NEW_LINE>// "customAuthType" property without setting the "type".<NEW_LINE>//<NEW_LINE>// This is necessary to enable various API Gateway authentication<NEW_LINE>// schemes and usage plans.<NEW_LINE>Optional<String> authTypeOptional = authorizer.getCustomAuthType();<NEW_LINE>if (authorizer.getType().isPresent() || authTypeOptional.isPresent()) {<NEW_LINE>String authType = authTypeOptional.orElse(DEFAULT_AUTH_TYPE);<NEW_LINE>schemeBuilder.putExtension(CLIENT_EXTENSION_NAME, authType);<NEW_LINE>}<NEW_LINE>ObjectNode authorizerNode = Node.objectNodeBuilder().withOptionalMember("type", authorizer.getType().map(Node::from)).withOptionalMember("authorizerUri", authorizer.getUri().map(Node::from)).withOptionalMember("authorizerCredentials", authorizer.getCredentials().map(Node::from)).withOptionalMember("identityValidationExpression", authorizer.getIdentityValidationExpression().map(Node::from)).withOptionalMember("identitySource", authorizer.getIdentitySource().map(Node::from)).withOptionalMember("authorizerResultTtlInSeconds", authorizer.getResultTtlInSeconds().map(Node<MASK><NEW_LINE>if (authorizerNode.size() != 0) {<NEW_LINE>schemeBuilder.putExtension(EXTENSION_NAME, authorizerNode);<NEW_LINE>}<NEW_LINE>LOGGER.fine(() -> String.format("Adding the `%s` OpenAPI security scheme", authorizerName));<NEW_LINE>return schemeBuilder.build();<NEW_LINE>}
::from)).build();
522,547
private static AbstractBeginNode createInvocationBlock(StructuredGraph graph, Invoke invoke, AbstractMergeNode returnMerge, PhiNode returnValuePhi, AbstractMergeNode exceptionMerge, PhiNode exceptionObjectPhi, boolean useForInlining) {<NEW_LINE>Invoke duplicatedInvoke = duplicateInvokeForInlining(graph, invoke, exceptionMerge, exceptionObjectPhi, useForInlining);<NEW_LINE>AbstractBeginNode calleeEntryNode = graph.add(new BeginNode());<NEW_LINE>calleeEntryNode.setNext(duplicatedInvoke.asFixedNode());<NEW_LINE>EndNode endNode = graph<MASK><NEW_LINE>duplicatedInvoke.setNext(endNode);<NEW_LINE>returnMerge.addForwardEnd(endNode);<NEW_LINE>if (returnValuePhi != null) {<NEW_LINE>returnValuePhi.addInput(duplicatedInvoke.asNode());<NEW_LINE>}<NEW_LINE>return calleeEntryNode;<NEW_LINE>}
.add(new EndNode());
1,141,699
public HTMLDocument createHTMLDocument(final Object titleObj) {<NEW_LINE>if (Undefined.isUndefined(titleObj) && getBrowserVersion().hasFeature(JS_DOMIMPLEMENTATION_CREATE_HTMLDOCOMENT_REQUIRES_TITLE)) {<NEW_LINE>throw Context.reportRuntimeError("Title is required");<NEW_LINE>}<NEW_LINE>// a similar impl is in<NEW_LINE>// com.gargoylesoftware.htmlunit.javascript.host.dom.DOMParser.parseFromString(String, Object)<NEW_LINE>try {<NEW_LINE>final WebWindow webWindow = getWindow().getWebWindow();<NEW_LINE>final String html;<NEW_LINE>if (Undefined.isUndefined(titleObj)) {<NEW_LINE>html = "<html><head></head><body></body></html>";<NEW_LINE>} else {<NEW_LINE>html = "<html><head><title>" + <MASK><NEW_LINE>}<NEW_LINE>final WebResponse webResponse = new StringWebResponse(html, UrlUtils.URL_ABOUT_BLANK);<NEW_LINE>final HtmlPage page = new HtmlPage(webResponse, webWindow);<NEW_LINE>// According to spec and behavior of function in browsers new document<NEW_LINE>// has no location object and is not connected with any window<NEW_LINE>page.setEnclosingWindow(null);<NEW_LINE>// document knows the window but is not the windows document<NEW_LINE>final HTMLDocument document = new HTMLDocument();<NEW_LINE>document.setParentScope(getWindow());<NEW_LINE>document.setPrototype(getPrototype(document.getClass()));<NEW_LINE>// document.setWindow(getWindow());<NEW_LINE>document.setDomNode(page);<NEW_LINE>final HTMLParser htmlParser = webWindow.getWebClient().getPageCreator().getHtmlParser();<NEW_LINE>htmlParser.parse(webResponse, page, false, false);<NEW_LINE>return page.getScriptableObject();<NEW_LINE>} catch (final IOException e) {<NEW_LINE>throw Context.reportRuntimeError("Parsing failed" + e.getMessage());<NEW_LINE>}<NEW_LINE>}
Context.toString(titleObj) + "</title></head><body></body></html>";
1,428,846
// ~ Methods ----------------------------------------------------------------<NEW_LINE>protected void explain_(RelNode rel, List<Pair<String, Object>> values) {<NEW_LINE>List<RelNode> inputs = rel.getInputs();<NEW_LINE>final RelMetadataQuery mq = rel.getCluster().getMetadataQuery();<NEW_LINE>if (!mq.isVisibleInExplain(rel, detailLevel)) {<NEW_LINE>// render children in place of this, at same level<NEW_LINE>explainInputs(inputs);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>StringBuilder s = new StringBuilder();<NEW_LINE>spacer.spaces(s);<NEW_LINE>if (withIdPrefix) {<NEW_LINE>s.append(rel.getId<MASK><NEW_LINE>}<NEW_LINE>s.append(rel.getRelTypeName());<NEW_LINE>if (detailLevel != SqlExplainLevel.NO_ATTRIBUTES) {<NEW_LINE>int j = 0;<NEW_LINE>for (Pair<String, Object> value : values) {<NEW_LINE>if (value.right instanceof RelNode) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (j++ == 0) {<NEW_LINE>s.append("(");<NEW_LINE>} else {<NEW_LINE>s.append(", ");<NEW_LINE>}<NEW_LINE>s.append(value.left).append("=[").append(value.right).append("]");<NEW_LINE>}<NEW_LINE>if (j > 0) {<NEW_LINE>s.append(")");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>switch(detailLevel) {<NEW_LINE>case ALL_ATTRIBUTES:<NEW_LINE>s.append(": rowcount = ").append(mq.getRowCount(rel)).append(", cumulative cost = ").append(mq.getCumulativeCost(rel));<NEW_LINE>}<NEW_LINE>switch(detailLevel) {<NEW_LINE>case NON_COST_ATTRIBUTES:<NEW_LINE>case ALL_ATTRIBUTES:<NEW_LINE>if (!withIdPrefix) {<NEW_LINE>// If we didn't print the rel id at the start of the line, print<NEW_LINE>// it at the end.<NEW_LINE>s.append(", id = ").append(rel.getId());<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>pw.println(s);<NEW_LINE>spacer.add(2);<NEW_LINE>explainInputs(inputs);<NEW_LINE>spacer.subtract(2);<NEW_LINE>}
()).append(":");
188,846
private static boolean decodePointVar(byte[] p, int pOff, boolean negate, PointExt r) {<NEW_LINE>byte[] py = copy(p, pOff, POINT_BYTES);<NEW_LINE>if (!checkPointVar(py)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int x_0 = (py[POINT_BYTES - 1] & 0x80) >>> 7;<NEW_LINE>py[POINT_BYTES - 1] &= 0x7F;<NEW_LINE>F.decode(py, 0, r.y);<NEW_LINE>int[<MASK><NEW_LINE>int[] v = F.create();<NEW_LINE>F.sqr(r.y, u);<NEW_LINE>F.mul(u, -C_d, v);<NEW_LINE>F.negate(u, u);<NEW_LINE>F.addOne(u);<NEW_LINE>F.addOne(v);<NEW_LINE>if (!F.sqrtRatioVar(u, v, r.x)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>F.normalize(r.x);<NEW_LINE>if (x_0 == 1 && F.isZeroVar(r.x)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (negate ^ (x_0 != (r.x[0] & 1))) {<NEW_LINE>F.negate(r.x, r.x);<NEW_LINE>}<NEW_LINE>pointExtendXY(r);<NEW_LINE>return true;<NEW_LINE>}
] u = F.create();
1,731,402
public void marshall(DescribeVaultOutput describeVaultOutput, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (describeVaultOutput == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(describeVaultOutput.getVaultARN(), VAULTARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(describeVaultOutput.getVaultName(), VAULTNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(describeVaultOutput.getCreationDate(), CREATIONDATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(describeVaultOutput.getLastInventoryDate(), LASTINVENTORYDATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(describeVaultOutput.getNumberOfArchives(), NUMBEROFARCHIVES_BINDING);<NEW_LINE>protocolMarshaller.marshall(describeVaultOutput.getSizeInBytes(), SIZEINBYTES_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);
536,275
public void positionStmtsAfterEnumInitStmts(List<Statement> staticFieldStatements) {<NEW_LINE>MethodNode method = getOrAddStaticConstructorNode();<NEW_LINE>Statement statement = method.getCode();<NEW_LINE>if (statement instanceof BlockStatement) {<NEW_LINE>BlockStatement block = (BlockStatement) statement;<NEW_LINE>// add given statements for explicitly declared static fields just after enum-special fields<NEW_LINE>// are found - the $VALUES binary expression marks the end of such fields.<NEW_LINE>List<Statement> blockStatements = block.getStatements();<NEW_LINE>ListIterator<Statement> litr = blockStatements.listIterator();<NEW_LINE>while (litr.hasNext()) {<NEW_LINE>Statement stmt = litr.next();<NEW_LINE>if (stmt instanceof ExpressionStatement && ((ExpressionStatement) stmt).getExpression() instanceof BinaryExpression) {<NEW_LINE>BinaryExpression bExp = (BinaryExpression) ((ExpressionStatement) stmt).getExpression();<NEW_LINE>if (bExp.getLeftExpression() instanceof FieldExpression) {<NEW_LINE>FieldExpression fExp = <MASK><NEW_LINE>if (fExp.getFieldName().equals("$VALUES")) {<NEW_LINE>for (Statement tmpStmt : staticFieldStatements) {<NEW_LINE>litr.add(tmpStmt);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(FieldExpression) bExp.getLeftExpression();
772,456
public void project(double camX, double camY, double camZ, Point2D_F64 output) {<NEW_LINE>// angle between incoming ray and principle axis<NEW_LINE>// Principle Axis = (0,0,z)<NEW_LINE>// Incoming Ray = (x,y,z)<NEW_LINE>// uses dot product<NEW_LINE>double theta = Math.acos(camZ / UtilPoint3D_F64.norm(camX, camY, camZ));<NEW_LINE>// compute symmetric projection function<NEW_LINE>double r = polynomial(model.symmetric, theta);<NEW_LINE>// angle on the image plane of the incoming ray<NEW_LINE>double phi = Math.atan2(camY, camX);<NEW_LINE>// u_r[0] or u_phi[1]<NEW_LINE>double cosphi = Math.cos(phi);<NEW_LINE>// u_r[1] or -u_phi[0]<NEW_LINE>double sinphi = Math.sin(phi);<NEW_LINE>// distorted (normalized) coordinates<NEW_LINE>double distX, distY;<NEW_LINE>if (isAsymmetric) {<NEW_LINE>// distortion terms. radial and tangential<NEW_LINE>double disRad = polynomial(model.radial, theta) * polytrig(model.radialTrig, cosphi, sinphi);<NEW_LINE>double disTan = polynomial(model.tangent, theta) * polytrig(model.tangentTrig, cosphi, sinphi);<NEW_LINE>// put it all together to get normalized image coordinates<NEW_LINE>distX = (r + disRad) * cosphi - disTan * sinphi;<NEW_LINE>distY = (r + disRad) * sinphi + disTan * cosphi;<NEW_LINE>} else {<NEW_LINE>distX = r * cosphi;<NEW_LINE>distY = r * sinphi;<NEW_LINE>}<NEW_LINE>// project into pixels<NEW_LINE>double skew = zeroSkew ? 0.0 : model.skew;<NEW_LINE>output.x = (model.fx * distX + <MASK><NEW_LINE>output.y = (model.fy * distY + model.cy);<NEW_LINE>}
skew * distY + model.cx);
978,025
private static Dependency loadDependencyFromManifest(JarFile jarFile, String path) throws IOException {<NEW_LINE>Manifest manifest = jarFile.getManifest();<NEW_LINE>if (manifest != null) {<NEW_LINE>Attributes attributes = manifest.getMainAttributes();<NEW_LINE>String name = attributes.getValue("implementation-title");<NEW_LINE>String version = attributes.getValue("implementation-version");<NEW_LINE>String vendor = attributes.getValue("implementation-vendor-id");<NEW_LINE>if (vendor == null) {<NEW_LINE>vendor = attributes.getValue("implementation-vendor");<NEW_LINE>}<NEW_LINE>if (name != null && version != null) {<NEW_LINE>return new Dependency(name, version, vendor, path, DEPENDENCY_SOURCE_MANEFEST_IMPL);<NEW_LINE>} else {<NEW_LINE>name = attributes.getValue("specification-title");<NEW_LINE>version = attributes.getValue("specification-version");<NEW_LINE>vendor = attributes.getValue("specification-vendor");<NEW_LINE>if (name != null && version != null) {<NEW_LINE>return new Dependency(name, version, vendor, path, DEPENDENCY_SOURCE_MANEFEST_SPEC);<NEW_LINE>} else {<NEW_LINE>name = attributes.getValue("bundle-symbolicname");<NEW_LINE>version = attributes.getValue("bundle-version");<NEW_LINE>vendor = attributes.getValue("bundle-vendor");<NEW_LINE>if (name != null && version != null) {<NEW_LINE>return new Dependency(name, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
version, vendor, path, DEPENDENCY_SOURCE_MANEFEST_BUNDLE);
1,663,301
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>OsmandApplication app = requireMyApplication();<NEW_LINE>boolean night = <MASK><NEW_LINE>LayoutInflater themedInflater = UiUtilities.getInflater(requireContext(), night);<NEW_LINE>View view = themedInflater.inflate(R.layout.fragment_edit_poi_advanced, container, false);<NEW_LINE>deleteDrawable = app.getUIUtilities().getIcon(R.drawable.ic_action_remove_dark, !night);<NEW_LINE>nameTextView = view.findViewById(R.id.nameTextView);<NEW_LINE>amenityTagTextView = view.findViewById(R.id.amenityTagTextView);<NEW_LINE>amenityTextView = view.findViewById(R.id.amenityTextView);<NEW_LINE>LinearLayout editTagsLineaLayout = view.findViewById(R.id.editTagsList);<NEW_LINE>Set<String> tagKeys = new HashSet<>();<NEW_LINE>Set<String> valueKeys = new HashSet<>();<NEW_LINE>fillKeysValues(tagKeys, valueKeys);<NEW_LINE>mAdapter = new TagAdapterLinearLayoutHack(editTagsLineaLayout, getData());<NEW_LINE>mAdapter.setTagData(tagKeys.toArray(new String[0]));<NEW_LINE>mAdapter.setValueData(valueKeys.toArray(new String[0]));<NEW_LINE>View addTagButton = view.findViewById(R.id.addTagButton);<NEW_LINE>addTagButton.setOnClickListener(v -> {<NEW_LINE>mAdapter.addTagView("", "");<NEW_LINE>scrollToBottom(view);<NEW_LINE>});<NEW_LINE>return view;<NEW_LINE>}
!requireSettings().isLightContent();
785,312
public static void executorServiceExecuted(Object callRunnable) {<NEW_LINE>try {<NEW_LINE>TraceContext ctx = TraceContextManager.getContext(true);<NEW_LINE>if (ctx == null)<NEW_LINE>return;<NEW_LINE>if (callRunnable == null)<NEW_LINE>return;<NEW_LINE>if (callRunnable instanceof WrTaskCallable)<NEW_LINE>return;<NEW_LINE>if (ctx.lastThreadCallPossibleStep != null) {<NEW_LINE>ctx.lastThreadCallPossibleStep = null;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (TransferMap.get(System.identityHashCode(callRunnable)) != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long gxid = ctx.gxid == 0 <MASK><NEW_LINE>ctx.gxid = gxid;<NEW_LINE>long callee = KeyGen.next();<NEW_LINE>ThreadCallPossibleStep threadCallPossibleStep = new ThreadCallPossibleStep();<NEW_LINE>threadCallPossibleStep.txid = callee;<NEW_LINE>threadCallPossibleStep.threaded = 1;<NEW_LINE>threadCallPossibleStep.start_time = (int) (System.currentTimeMillis() - ctx.startTime);<NEW_LINE>String threadCallName = (ctx.lastThreadCallName != null) ? ctx.lastThreadCallName : callRunnable.getClass().getName();<NEW_LINE>threadCallName = StringUtil.removeLastString(threadCallName, '/');<NEW_LINE>threadCallName = threadCallName.replace("$$Lambda", "$$L");<NEW_LINE>threadCallName = AgentCommonConstant.normalizeHashCode(threadCallName);<NEW_LINE>ctx.lastThreadCallName = null;<NEW_LINE>threadCallPossibleStep.hash = DataProxy.sendApicall(threadCallName);<NEW_LINE>threadCallPossibleStep.nameTemp = threadCallName;<NEW_LINE>ctx.profile.add(threadCallPossibleStep);<NEW_LINE>TransferMap.put(System.identityHashCode(callRunnable), gxid, ctx.txid, callee, ctx.xType, Thread.currentThread().getId(), threadCallPossibleStep);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>Logger.println("B1204", "Exception: executorServiceExecuted", t);<NEW_LINE>}<NEW_LINE>}
? ctx.txid : ctx.gxid;