idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
466,796
final PutSchemaVersionMetadataResult executePutSchemaVersionMetadata(PutSchemaVersionMetadataRequest putSchemaVersionMetadataRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putSchemaVersionMetadataRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutSchemaVersionMetadataRequest> request = null;<NEW_LINE>Response<PutSchemaVersionMetadataResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new PutSchemaVersionMetadataRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putSchemaVersionMetadataRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Glue");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutSchemaVersionMetadata");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutSchemaVersionMetadataResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutSchemaVersionMetadataResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
74,337
public static DescribePriceResponse unmarshall(DescribePriceResponse describePriceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describePriceResponse.setRequestId(_ctx.stringValue("DescribePriceResponse.RequestId"));<NEW_LINE>describePriceResponse.setOrderParams(_ctx.stringValue("DescribePriceResponse.OrderParams"));<NEW_LINE>Order order = new Order();<NEW_LINE>order.setOriginalAmount(_ctx.stringValue("DescribePriceResponse.Order.OriginalAmount"));<NEW_LINE>order.setHandlingFeeAmount(_ctx.stringValue("DescribePriceResponse.Order.HandlingFeeAmount"));<NEW_LINE>order.setCurrency(_ctx.stringValue("DescribePriceResponse.Order.Currency"));<NEW_LINE>order.setDiscountAmount(_ctx.stringValue("DescribePriceResponse.Order.DiscountAmount"));<NEW_LINE>order.setTradeAmount(_ctx.stringValue("DescribePriceResponse.Order.TradeAmount"));<NEW_LINE>List<String> ruleIds1 <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribePriceResponse.Order.RuleIds.Length"); i++) {<NEW_LINE>ruleIds1.add(_ctx.stringValue("DescribePriceResponse.Order.RuleIds[" + i + "]"));<NEW_LINE>}<NEW_LINE>order.setRuleIds1(ruleIds1);<NEW_LINE>List<Coupon> coupons = new ArrayList<Coupon>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribePriceResponse.Order.Coupons.Length"); i++) {<NEW_LINE>Coupon coupon = new Coupon();<NEW_LINE>coupon.setIsSelected(_ctx.stringValue("DescribePriceResponse.Order.Coupons[" + i + "].IsSelected"));<NEW_LINE>coupon.setCouponNo(_ctx.stringValue("DescribePriceResponse.Order.Coupons[" + i + "].CouponNo"));<NEW_LINE>coupon.setName(_ctx.stringValue("DescribePriceResponse.Order.Coupons[" + i + "].Name"));<NEW_LINE>coupon.setDescription(_ctx.stringValue("DescribePriceResponse.Order.Coupons[" + i + "].Description"));<NEW_LINE>coupons.add(coupon);<NEW_LINE>}<NEW_LINE>order.setCoupons(coupons);<NEW_LINE>describePriceResponse.setOrder(order);<NEW_LINE>List<Rule> rules = new ArrayList<Rule>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribePriceResponse.Rules.Length"); i++) {<NEW_LINE>Rule rule = new Rule();<NEW_LINE>rule.setRuleDescId(_ctx.longValue("DescribePriceResponse.Rules[" + i + "].RuleDescId"));<NEW_LINE>rule.setTitle(_ctx.stringValue("DescribePriceResponse.Rules[" + i + "].Title"));<NEW_LINE>rule.setName(_ctx.stringValue("DescribePriceResponse.Rules[" + i + "].Name"));<NEW_LINE>rules.add(rule);<NEW_LINE>}<NEW_LINE>describePriceResponse.setRules(rules);<NEW_LINE>List<SubOrder> subOrders = new ArrayList<SubOrder>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribePriceResponse.SubOrders.Length"); i++) {<NEW_LINE>SubOrder subOrder = new SubOrder();<NEW_LINE>subOrder.setOriginalAmount(_ctx.stringValue("DescribePriceResponse.SubOrders[" + i + "].OriginalAmount"));<NEW_LINE>subOrder.setInstanceId(_ctx.stringValue("DescribePriceResponse.SubOrders[" + i + "].InstanceId"));<NEW_LINE>subOrder.setDiscountAmount(_ctx.stringValue("DescribePriceResponse.SubOrders[" + i + "].DiscountAmount"));<NEW_LINE>subOrder.setTradeAmount(_ctx.stringValue("DescribePriceResponse.SubOrders[" + i + "].TradeAmount"));<NEW_LINE>List<String> ruleIds = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribePriceResponse.SubOrders[" + i + "].RuleIds.Length"); j++) {<NEW_LINE>ruleIds.add(_ctx.stringValue("DescribePriceResponse.SubOrders[" + i + "].RuleIds[" + j + "]"));<NEW_LINE>}<NEW_LINE>subOrder.setRuleIds(ruleIds);<NEW_LINE>subOrders.add(subOrder);<NEW_LINE>}<NEW_LINE>describePriceResponse.setSubOrders(subOrders);<NEW_LINE>return describePriceResponse;<NEW_LINE>}
= new ArrayList<String>();
1,319,994
public static Map<String, Map<String, MkGrouper>> outbound_components(TopologyContext topology_context, WorkerData workerData) {<NEW_LINE>Map<String, Map<String, MkGrouper>> rr = new HashMap<>();<NEW_LINE>// <Stream_id,<component,Grouping>><NEW_LINE>Map<String, Map<String, Grouping>> output_groupings = topology_context.getThisTargets();<NEW_LINE>for (Entry<String, Map<String, Grouping>> entry : output_groupings.entrySet()) {<NEW_LINE>String stream_id = entry.getKey();<NEW_LINE>Map<String, Grouping> component_grouping = entry.getValue();<NEW_LINE>Fields out_fields = topology_context.getThisOutputFields(stream_id);<NEW_LINE>Map<String, MkGrouper> componentGrouper = new HashMap<>();<NEW_LINE>for (Entry<String, Grouping> cg : component_grouping.entrySet()) {<NEW_LINE><MASK><NEW_LINE>Grouping tgrouping = cg.getValue();<NEW_LINE>List<Integer> outTasks = topology_context.getComponentTasks(component);<NEW_LINE>// ATTENTION: If topology set one component parallelism as 0<NEW_LINE>// so we don't need send tuple to it<NEW_LINE>if (outTasks.size() > 0) {<NEW_LINE>MkGrouper grouper = new MkGrouper(topology_context, out_fields, tgrouping, component, stream_id, workerData);<NEW_LINE>componentGrouper.put(component, grouper);<NEW_LINE>}<NEW_LINE>LOG.info("outbound_components, {}-{} for task-{} on {}", component, outTasks, topology_context.getThisTaskId(), stream_id);<NEW_LINE>}<NEW_LINE>if (componentGrouper.size() > 0) {<NEW_LINE>rr.put(stream_id, componentGrouper);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return rr;<NEW_LINE>}
String component = cg.getKey();
776,448
private void updateOptionsButtons() {<NEW_LINE>MapActivity mapActivity = getMapActivity();<NEW_LINE>final View mainView = getMainView();<NEW_LINE>if (mapActivity == null || mainView == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final OsmandApplication app = mapActivity.getMyApplication();<NEW_LINE>RoutingHelper routingHelper = app.getRoutingHelper();<NEW_LINE>final ApplicationMode applicationMode = routingHelper.getAppMode();<NEW_LINE>final RouteMenuAppModes mode = app.getRoutingOptionsHelper().getRouteMenuAppMode(applicationMode);<NEW_LINE>boolean isLayoutRTL = AndroidUtils.isLayoutRtl(app);<NEW_LINE>updateControlButtons(mapActivity, mainView);<NEW_LINE>LinearLayout optionsButton = mainView.findViewById(R.id.map_options_route_button);<NEW_LINE>OsmAndAppCustomization customization = app.getAppCustomization();<NEW_LINE>AndroidUiHelper.updateVisibility(optionsButton, customization.isFeatureEnabled(NAVIGATION_OPTIONS_MENU_ID));<NEW_LINE>TextView optionsTitle = mainView.findViewById(R.id.map_options_route_button_title);<NEW_LINE>ImageView optionsIcon = mainView.findViewById(R.id.map_options_route_button_icon);<NEW_LINE>setupButtonIcon(optionsIcon, R.drawable.ic_action_settings);<NEW_LINE>optionsButton.setOnClickListener(v -> clickRouteParams());<NEW_LINE>AndroidUtils.setBackground(app, optionsButton, nightMode, isLayoutRTL ? R.drawable.route_info_trans_gradient_left_light : R.drawable.route_info_trans_gradient_light, isLayoutRTL ? R.drawable.route_info_trans_gradient_left_dark : R.drawable.route_info_trans_gradient_dark);<NEW_LINE>HorizontalScrollView scrollView = mainView.findViewById(R.id.route_options_scroll_container);<NEW_LINE>scrollView.setVerticalScrollBarEnabled(false);<NEW_LINE>scrollView.setHorizontalScrollBarEnabled(false);<NEW_LINE>LinearLayout optionsContainer = mainView.findViewById(R.id.route_options_container);<NEW_LINE>optionsContainer.removeAllViews();<NEW_LINE>if (mode == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>createRoutingParametersButtons(mapActivity, mode, optionsContainer);<NEW_LINE>int endPadding = mapActivity.getResources().getDimensionPixelSize(R.dimen.action_bar_image_side_margin);<NEW_LINE>if (mode.parameters.size() > 2) {<NEW_LINE>optionsTitle.setVisibility(View.GONE);<NEW_LINE>} else {<NEW_LINE>optionsTitle.setVisibility(View.VISIBLE);<NEW_LINE>endPadding += AndroidUtils.getTextWidth(app.getResources().getDimensionPixelSize(R.dimen.text_button_text_size), app.getString(R.string.shared_string_options));<NEW_LINE>}<NEW_LINE>if (AndroidUtils.isLayoutRtl(app)) {<NEW_LINE>optionsContainer.setPadding(endPadding, optionsContainer.getPaddingTop(), optionsContainer.getPaddingRight(<MASK><NEW_LINE>} else {<NEW_LINE>// LTR<NEW_LINE>optionsContainer.setPadding(optionsContainer.getPaddingLeft(), optionsContainer.getPaddingTop(), endPadding, optionsContainer.getPaddingBottom());<NEW_LINE>}<NEW_LINE>}
), optionsContainer.getPaddingBottom());
686,558
final VoteOnProposalResult executeVoteOnProposal(VoteOnProposalRequest voteOnProposalRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(voteOnProposalRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<VoteOnProposalRequest> request = null;<NEW_LINE>Response<VoteOnProposalResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new VoteOnProposalRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(voteOnProposalRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ManagedBlockchain");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "VoteOnProposal");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<VoteOnProposalResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new VoteOnProposalResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
1,786,487
public static Primitive unaryOperation(Primitive val, int kind) throws UtilEvalError {<NEW_LINE>if (val == Primitive.NULL)<NEW_LINE>throw new UtilEvalError("illegal use of null object or 'null' literal");<NEW_LINE>if (val == Primitive.VOID)<NEW_LINE>throw new UtilEvalError("illegal use of undefined object or 'void' literal");<NEW_LINE>Class<?> operandType = val.getType();<NEW_LINE>if (operandType == Boolean.TYPE)<NEW_LINE>return booleanUnaryOperation((Boolean) val.getValue(), kind) ? Primitive.TRUE : Primitive.FALSE;<NEW_LINE>Number operand = promoteToInteger(val.getValue());<NEW_LINE>if (operand instanceof Integer) {<NEW_LINE>int result = intUnaryOperation((Integer) operand, kind);<NEW_LINE>// ++ and -- must be cast back the original type<NEW_LINE>if (kind == INCR || kind == DECR) {<NEW_LINE>if (operandType == Byte.TYPE)<NEW_LINE>return new Primitive((byte) result);<NEW_LINE>if (operandType == Short.TYPE)<NEW_LINE>return new Primitive((short) result);<NEW_LINE>if (operandType == Character.TYPE)<NEW_LINE>return new Primitive((char) result);<NEW_LINE>}<NEW_LINE>return new Primitive(result);<NEW_LINE>}<NEW_LINE>if (operand instanceof Long)<NEW_LINE>return new Primitive(longUnaryOperation(operand<MASK><NEW_LINE>if (operand instanceof Float)<NEW_LINE>return new Primitive(floatUnaryOperation(operand.floatValue(), kind));<NEW_LINE>if (operand instanceof Double)<NEW_LINE>return new Primitive(doubleUnaryOperation(operand.doubleValue(), kind));<NEW_LINE>if (operand instanceof BigInteger)<NEW_LINE>return new Primitive(bigIntegerUnaryOperation((BigInteger) operand, kind));<NEW_LINE>if (operand instanceof BigDecimal)<NEW_LINE>return new Primitive(bigDecimalUnaryOperation((BigDecimal) operand, kind));<NEW_LINE>throw new InterpreterError("An error occurred. Please call technical support.");<NEW_LINE>}
.longValue(), kind));
199,321
private void applySslConfigOverrides() {<NEW_LINE>ServerSslConfig sslConfig = tcpConfig.sslConfig();<NEW_LINE>if (sslConfig != null) {<NEW_LINE>sslConfig = new DelegatingHttpServerSslConfig(sslConfig, httpAlpnProtocols(sslConfig.alpnProtocols(), httpConfig.supportedAlpnProtocols()));<NEW_LINE>Map<String, ServerSslConfig> sniMap = tcpConfig.sniConfig();<NEW_LINE>if (sniMap == null) {<NEW_LINE>tcpConfig.sslConfig(sslConfig);<NEW_LINE>} else {<NEW_LINE>// Make a copy in case the original map is unmodifiable. Use LinkedHashMap to preserve iteration order<NEW_LINE>// in case there is order precedence in the matching algorithm.<NEW_LINE>Map<String, ServerSslConfig> sniMapOverrides = new LinkedHashMap<>(sniMap.size());<NEW_LINE>for (Entry<String, ServerSslConfig> sniConfigEntry : sniMap.entrySet()) {<NEW_LINE>ServerSslConfig sniConfig = sniConfigEntry.getValue();<NEW_LINE>sniMapOverrides.put(sniConfigEntry.getKey(), new DelegatingHttpServerSslConfig(sniConfig, httpAlpnProtocols(sniConfig.alpnProtocols(), httpConfig.supportedAlpnProtocols())));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
tcpConfig.sslConfig(sslConfig, sniMapOverrides);
1,310,272
private void createContent() {<NEW_LINE>setLayout(new BorderLayout());<NEW_LINE>setIconImage(Toolkit.getDefaultToolkit().getImage(MainFrame.class.getResource(ICON)));<NEW_LINE>textArea = new JTextArea(20, 15);<NEW_LINE>textArea.setEditable(false);<NEW_LINE>final JScrollPane textAreaScrollPane = new JScrollPane(textArea);<NEW_LINE>final JPanel textAreaPanel = new JPanel();<NEW_LINE>textAreaPanel.setLayout(new BorderLayout());<NEW_LINE>textAreaPanel.add(textAreaScrollPane);<NEW_LINE>textAreaPanel.add(createButtonsPanel(), BorderLayout.PAGE_END);<NEW_LINE>treeTable = new TreeTable(model.getParseTreeTableModel());<NEW_LINE>treeTable.setEditor(textArea);<NEW_LINE>treeTable.setLinePositionList(model.getLinesToPosition());<NEW_LINE>final JScrollPane treeTableScrollPane = new JScrollPane(treeTable);<NEW_LINE>final JSplitPane splitPane = new JSplitPane(<MASK><NEW_LINE>add(splitPane, BorderLayout.CENTER);<NEW_LINE>splitPane.setResizeWeight(0.7);<NEW_LINE>xpathTextArea = new JTextArea("Xpath", 7, 0);<NEW_LINE>xpathTextArea.setName("xpathTextArea");<NEW_LINE>xpathTextArea.setVisible(false);<NEW_LINE>final JPanel xpathAreaPanel = new JPanel();<NEW_LINE>xpathAreaPanel.setLayout(new BorderLayout());<NEW_LINE>xpathAreaPanel.add(xpathTextArea);<NEW_LINE>xpathAreaPanel.add(createXpathButtonsPanel(), BorderLayout.PAGE_END);<NEW_LINE>treeTable.setXpathEditor(xpathTextArea);<NEW_LINE>final Border title = BorderFactory.createTitledBorder("Xpath Query");<NEW_LINE>xpathAreaPanel.setBorder(title);<NEW_LINE>add(xpathAreaPanel, BorderLayout.PAGE_END);<NEW_LINE>}
JSplitPane.HORIZONTAL_SPLIT, treeTableScrollPane, textAreaPanel);
385,528
protected LIRInstruction assignLocations(LIRInstruction inputOp) {<NEW_LINE>assert inputOp != null;<NEW_LINE>LIRInstruction op = inputOp;<NEW_LINE>// remove useless moves<NEW_LINE>if (MoveOp.isMoveOp(op)) {<NEW_LINE>AllocatableValue result = MoveOp.asMoveOp(op).getResult();<NEW_LINE>if (isVariable(result) && allocator.isMaterialized(result, op.id(), OperandMode.DEF)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (ValueMoveOp.isValueMoveOp(op)) {<NEW_LINE>ValueMoveOp valueMoveOp = ValueMoveOp.asValueMoveOp(op);<NEW_LINE>AllocatableValue input = valueMoveOp.getInput();<NEW_LINE>if (isVariable(input)) {<NEW_LINE>Value inputOperand = colorLirOperand(op, asVariable<MASK><NEW_LINE>if (inputOperand instanceof ConstantValue) {<NEW_LINE>// Replace the ValueMoveOp with a constant materialization<NEW_LINE>op = allocator.getSpillMoveFactory().createLoad(valueMoveOp.getResult(), ((ConstantValue) inputOperand).getConstant());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>op.forEachInput(assignProc);<NEW_LINE>op.forEachAlive(assignProc);<NEW_LINE>op.forEachTemp(assignProc);<NEW_LINE>op.forEachOutput(assignProc);<NEW_LINE>// compute reference map and debug information<NEW_LINE>op.forEachState(debugInfoProc);<NEW_LINE>// remove useless moves<NEW_LINE>if (ValueMoveOp.isValueMoveOp(op)) {<NEW_LINE>ValueMoveOp move = ValueMoveOp.asValueMoveOp(op);<NEW_LINE>if (move.getInput().equals(move.getResult())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return op;<NEW_LINE>}
(input), OperandMode.USE);
437,404
private void readLuma8x8CABAC(MBlock mBlock, int mbX, int mbY) {<NEW_LINE>for (int i = 0; i < 4; i++) {<NEW_LINE>int blkOffLeft = (i & 1) << 1;<NEW_LINE>int blkOffTop = i & 2;<NEW_LINE>int blkX = (mbX << 2) + blkOffLeft;<NEW_LINE>int blkY = (mbY << 2) + blkOffTop;<NEW_LINE>if ((mBlock.cbpLuma() & (1 << i)) == 0) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int nCoeff = readLumaAC8x8(blkX, blkY, mBlock.ac[0][i]);<NEW_LINE>int blk4x4Offset = i << 2;<NEW_LINE>mBlock.nCoeff[blk4x4Offset] = mBlock.nCoeff[blk4x4Offset + 1] = mBlock.nCoeff[blk4x4Offset + 2] = mBlock.<MASK><NEW_LINE>}<NEW_LINE>savePrevCBP(mBlock._cbp);<NEW_LINE>}
nCoeff[blk4x4Offset + 3] = nCoeff;
1,159,438
// Finds one-to-many matches in functions from addressSet A and Address Set B<NEW_LINE>public static List<MatchedFunctions> matchFunctions(Program aProgram, AddressSetView setA, Program bProgram, AddressSetView setB, int minimumFunctionSize, boolean includeOneToOne, boolean includeNonOneToOne, FunctionHasher hasher, TaskMonitor monitor) throws CancelledException {<NEW_LINE>Map<Long, Match> functionHashes = new HashMap<>();<NEW_LINE>List<MatchedFunctions> functionMatches = new ArrayList<MatchedFunctions>();<NEW_LINE>FunctionIterator aProgfIter = aProgram.getFunctionManager().getFunctions(setA, true);<NEW_LINE>FunctionIterator bProgfIter = bProgram.getFunctionManager().getFunctions(setB, true);<NEW_LINE>monitor.setIndeterminate(false);<NEW_LINE>monitor.initialize(2 * (aProgram.getFunctionManager().getFunctionCount() + bProgram.getFunctionManager().getFunctionCount()));<NEW_LINE>monitor.setMessage("Hashing functions in " + aProgram.getName());<NEW_LINE>// Hash functions in program A<NEW_LINE>while (!monitor.isCancelled() && aProgfIter.hasNext()) {<NEW_LINE>monitor.incrementProgress(1);<NEW_LINE>Function func = aProgfIter.next();<NEW_LINE>if (!func.isThunk() && func.getBody().getNumAddresses() >= minimumFunctionSize) {<NEW_LINE>hashFunction(monitor, functionHashes, func, hasher, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>monitor.setMessage("Hashing functions in " + bProgram.getName());<NEW_LINE>// Hash functions in Program B<NEW_LINE>while (!monitor.isCancelled() && bProgfIter.hasNext()) {<NEW_LINE>monitor.incrementProgress(1);<NEW_LINE>Function func = bProgfIter.next();<NEW_LINE>if (!func.isThunk() && func.getBody().getNumAddresses() >= minimumFunctionSize) {<NEW_LINE>hashFunction(monitor, functionHashes, func, hasher, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Find the remaining hash matches ---> unique code match left and THERE is no symbol that matches<NEW_LINE>// in the other program.<NEW_LINE>final long progress = monitor.getProgress();<NEW_LINE>monitor.setMaximum(progress + functionHashes.size());<NEW_LINE>monitor.setProgress(progress);<NEW_LINE>monitor.setMessage("Finding function matches");<NEW_LINE>for (Match match : functionHashes.values()) {<NEW_LINE>monitor.incrementProgress(1);<NEW_LINE>if (monitor.isCancelled()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>ArrayList<MASK><NEW_LINE>ArrayList<Address> bProgAddrs = match.bAddresses;<NEW_LINE>if ((includeOneToOne && aProgAddrs.size() == 1 && bProgAddrs.size() == 1) || (includeNonOneToOne && !(aProgAddrs.size() == 1 && bProgAddrs.size() == 1))) {<NEW_LINE>for (Address aAddr : aProgAddrs) {<NEW_LINE>for (Address bAddr : bProgAddrs) {<NEW_LINE>MatchedFunctions functionMatch = new MatchedFunctions(aProgram, bProgram, aAddr, bAddr, aProgAddrs.size(), bProgAddrs.size(), "Code Only Match");<NEW_LINE>functionMatches.add(functionMatch);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return functionMatches;<NEW_LINE>}
<Address> aProgAddrs = match.aAddresses;
64,657
private void postToSubscription(Subscription subscription, Object event, boolean isMainThread) {<NEW_LINE>switch(subscription.subscriberMethod.threadMode) {<NEW_LINE>case POSTING:<NEW_LINE>invokeSubscriber(subscription, event);<NEW_LINE>break;<NEW_LINE>case MAIN:<NEW_LINE>if (isMainThread) {<NEW_LINE>invokeSubscriber(subscription, event);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case MAIN_ORDERED:<NEW_LINE>if (mainThreadPoster != null) {<NEW_LINE>mainThreadPoster.enqueue(subscription, event);<NEW_LINE>} else {<NEW_LINE>// temporary: technically not correct as poster not decoupled from subscriber<NEW_LINE>invokeSubscriber(subscription, event);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case BACKGROUND:<NEW_LINE>if (isMainThread) {<NEW_LINE>backgroundPoster.enqueue(subscription, event);<NEW_LINE>} else {<NEW_LINE>invokeSubscriber(subscription, event);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case ASYNC:<NEW_LINE>asyncPoster.enqueue(subscription, event);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalStateException("Unknown thread mode: " + subscription.subscriberMethod.threadMode);<NEW_LINE>}<NEW_LINE>}
mainThreadPoster.enqueue(subscription, event);
407,502
public ShippingInfoForm prePopulateShippingInfoForm(ShippingInfoForm shippingInfoForm, Order cart) {<NEW_LINE>FulfillmentGroup firstShippableFulfillmentGroup = fulfillmentGroupService.getFirstShippableFulfillmentGroup(cart);<NEW_LINE>if (firstShippableFulfillmentGroup != null) {<NEW_LINE>// if the cart has already has fulfillment information<NEW_LINE>if (firstShippableFulfillmentGroup.getAddress() != null) {<NEW_LINE>shippingInfoForm.setAddress(firstShippableFulfillmentGroup.getAddress());<NEW_LINE>} else {<NEW_LINE>// check for a default address for the customer<NEW_LINE>CustomerAddress defaultAddress = customerAddressService.findDefaultCustomerAddress(CustomerState.getCustomer().getId());<NEW_LINE>if (defaultAddress != null) {<NEW_LINE>shippingInfoForm.setAddress(defaultAddress.getAddress());<NEW_LINE>shippingInfoForm.setAddressName(defaultAddress.getAddressName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>FulfillmentOption fulfillmentOption = firstShippableFulfillmentGroup.getFulfillmentOption();<NEW_LINE>if (fulfillmentOption != null) {<NEW_LINE>shippingInfoForm.setFulfillmentOption(fulfillmentOption);<NEW_LINE>shippingInfoForm.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return shippingInfoForm;<NEW_LINE>}
setFulfillmentOptionId(fulfillmentOption.getId());
1,848,752
private DaemonClientConnection connectToCanceledDaemon(Collection<DaemonInfo> busyDaemons, ExplainingSpec<DaemonContext> constraint) {<NEW_LINE>DaemonClientConnection connection = null;<NEW_LINE>final Pair<Collection<DaemonInfo>, Collection<DaemonInfo>> canceledBusy = partitionByState(busyDaemons, Canceled);<NEW_LINE>final Collection<DaemonInfo> compatibleCanceledDaemons = getCompatibleDaemons(canceledBusy.getLeft(), constraint);<NEW_LINE>if (!compatibleCanceledDaemons.isEmpty()) {<NEW_LINE>LOGGER.info(DaemonMessages.WAITING_ON_CANCELED);<NEW_LINE>CountdownTimer <MASK><NEW_LINE>while (connection == null && !timer.hasExpired()) {<NEW_LINE>try {<NEW_LINE>sleep(200);<NEW_LINE>connection = connectToIdleDaemon(daemonRegistry.getIdle(), constraint);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>throw UncheckedException.throwAsUncheckedException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return connection;<NEW_LINE>}
timer = Time.startCountdownTimer(CANCELED_WAIT_TIMEOUT);
1,072,742
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>mContext = getActivity();<NEW_LINE>// Themes are 'pre-compiled' in themes-list: get all values<NEW_LINE>// and append them to our newly created PreferenceScreen<NEW_LINE>PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(mContext);<NEW_LINE>final String[] entries = getResources().getStringArray(R.array.theme_entries);<NEW_LINE>final String[] values = getResources().<MASK><NEW_LINE>final String[] ids = getResources().getStringArray(R.array.theme_ids);<NEW_LINE>for (int i = 0; i < entries.length; i++) {<NEW_LINE>int[] attrs = decodeValue(values[i]);<NEW_LINE>final Preference pref = new Preference(mContext);<NEW_LINE>pref.setPersistent(false);<NEW_LINE>pref.setOnPreferenceClickListener(this);<NEW_LINE>pref.setTitle(entries[i]);<NEW_LINE>// preference value of this theme<NEW_LINE>pref.setKey(ids[i]);<NEW_LINE>pref.setIcon(generateThemePreview(attrs));<NEW_LINE>screen.addPreference(pref);<NEW_LINE>}<NEW_LINE>setPreferenceScreen(screen);<NEW_LINE>}
getStringArray(R.array.theme_values);
172,966
private void notifySubscription(Event event, CustomerName name, String email, Locale userLanguage, WaitingQueueSubscription.Type subscriptionType) {<NEW_LINE>var messageSource = messageSourceManager.getMessageSourceFor(event);<NEW_LINE>Organization organization = organizationRepository.getById(event.getOrganizationId());<NEW_LINE>Map<String, Object> model = TemplateResource.<MASK><NEW_LINE>notificationManager.sendSimpleEmail(event, null, email, messageSource.getMessage("email-waiting-queue.subscribed.subject", new Object[] { event.getDisplayName() }, userLanguage), () -> templateManager.renderTemplate(event, TemplateResource.WAITING_QUEUE_JOINED, model, userLanguage));<NEW_LINE>if (configurationManager.getFor(ENABLE_WAITING_QUEUE_NOTIFICATION, ConfigurationLevel.event(event)).getValueAsBooleanOrDefault()) {<NEW_LINE>String adminTemplate = messageSource.getMessage("email-waiting-queue.subscribed.admin.text", new Object[] { subscriptionType, event.getDisplayName() }, Locale.ENGLISH);<NEW_LINE>notificationManager.sendSimpleEmail(event, null, organization.getEmail(), messageSource.getMessage("email-waiting-queue.subscribed.admin.subject", new Object[] { event.getDisplayName() }, Locale.ENGLISH), () -> RenderedTemplate.plaintext(templateManager.renderString(event, adminTemplate, model, Locale.ENGLISH, TemplateManager.TemplateOutput.TEXT), model));<NEW_LINE>}<NEW_LINE>}
buildModelForWaitingQueueJoined(organization, event, name);
602,989
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {<NEW_LINE>String type = req.getParameter("type");<NEW_LINE>if ("api".equals(type)) {<NEW_LINE>String format = req.getParameter("format");<NEW_LINE>String <MASK><NEW_LINE>String dereference = req.getParameter("dereference");<NEW_LINE>String url = generateHubApiUrl(req);<NEW_LINE>if (url.endsWith("/")) {<NEW_LINE>url = url.substring(0, url.length() - 1);<NEW_LINE>}<NEW_LINE>url += "/designs/{designId}/content?format={format}".replace("{designId}", designId).replace("{format}", format);<NEW_LINE>if (dereference != null) {<NEW_LINE>url += "&dereference=" + dereference;<NEW_LINE>}<NEW_LINE>disableHttpCaching(resp);<NEW_LINE>proxyUrlTo(url, req, resp);<NEW_LINE>} else if ("codegen".equals(type)) {<NEW_LINE>String designId = req.getParameter("designId");<NEW_LINE>String projectId = req.getParameter("projectId");<NEW_LINE>String url = generateHubApiUrl(req);<NEW_LINE>if (url.endsWith("/")) {<NEW_LINE>url = url.substring(0, url.length() - 1);<NEW_LINE>}<NEW_LINE>url += "/designs/{designId}/codegen/projects/{projectId}/zip".replace("{designId}", designId).replace("{projectId}", projectId);<NEW_LINE>disableHttpCaching(resp);<NEW_LINE>proxyUrlTo(url, req, resp);<NEW_LINE>} else {<NEW_LINE>resp.sendError(404);<NEW_LINE>}<NEW_LINE>}
designId = req.getParameter("id");
1,475,598
public static DescribeDcdnDomainCertificateInfoResponse unmarshall(DescribeDcdnDomainCertificateInfoResponse describeDcdnDomainCertificateInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDcdnDomainCertificateInfoResponse.setRequestId(_ctx.stringValue("DescribeDcdnDomainCertificateInfoResponse.RequestId"));<NEW_LINE>List<CertInfo> certInfos <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDcdnDomainCertificateInfoResponse.CertInfos.Length"); i++) {<NEW_LINE>CertInfo certInfo = new CertInfo();<NEW_LINE>certInfo.setDomainName(_ctx.stringValue("DescribeDcdnDomainCertificateInfoResponse.CertInfos[" + i + "].DomainName"));<NEW_LINE>certInfo.setCertName(_ctx.stringValue("DescribeDcdnDomainCertificateInfoResponse.CertInfos[" + i + "].CertName"));<NEW_LINE>certInfo.setCertDomainName(_ctx.stringValue("DescribeDcdnDomainCertificateInfoResponse.CertInfos[" + i + "].CertDomainName"));<NEW_LINE>certInfo.setCertExpireTime(_ctx.stringValue("DescribeDcdnDomainCertificateInfoResponse.CertInfos[" + i + "].CertExpireTime"));<NEW_LINE>certInfo.setCertLife(_ctx.stringValue("DescribeDcdnDomainCertificateInfoResponse.CertInfos[" + i + "].CertLife"));<NEW_LINE>certInfo.setCertOrg(_ctx.stringValue("DescribeDcdnDomainCertificateInfoResponse.CertInfos[" + i + "].CertOrg"));<NEW_LINE>certInfo.setCertType(_ctx.stringValue("DescribeDcdnDomainCertificateInfoResponse.CertInfos[" + i + "].CertType"));<NEW_LINE>certInfo.setSSLProtocol(_ctx.stringValue("DescribeDcdnDomainCertificateInfoResponse.CertInfos[" + i + "].SSLProtocol"));<NEW_LINE>certInfo.setStatus(_ctx.stringValue("DescribeDcdnDomainCertificateInfoResponse.CertInfos[" + i + "].Status"));<NEW_LINE>certInfo.setSSLPub(_ctx.stringValue("DescribeDcdnDomainCertificateInfoResponse.CertInfos[" + i + "].SSLPub"));<NEW_LINE>certInfos.add(certInfo);<NEW_LINE>}<NEW_LINE>describeDcdnDomainCertificateInfoResponse.setCertInfos(certInfos);<NEW_LINE>return describeDcdnDomainCertificateInfoResponse;<NEW_LINE>}
= new ArrayList<CertInfo>();
616,283
private List<Wo> list(Business business, Wi wi) throws Exception {<NEW_LINE>List<Wo> wos = new ArrayList<>();<NEW_LINE>List<Person> people = business.person().pick(wi.getPersonList());<NEW_LINE>List<String> personIds = ListTools.extractProperty(people, JpaObject.id_FIELDNAME, String.class, true, true);<NEW_LINE>EntityManager em = business.entityManagerContainer().get(Identity.class);<NEW_LINE><MASK><NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(String.class);<NEW_LINE>Root<Identity> root = cq.from(Identity.class);<NEW_LINE>Predicate p = root.get(Identity_.person).in(personIds);<NEW_LINE>List<String> os = em.createQuery(cq.select(root.get(Identity_.unit)).where(p)).getResultList().stream().distinct().collect(Collectors.toList());<NEW_LINE>List<String> unitIds = new ArrayList<>(os);<NEW_LINE>for (String str : os) {<NEW_LINE>unitIds.addAll(business.unit().listSupNested(str));<NEW_LINE>}<NEW_LINE>unitIds = ListTools.trim(unitIds, true, true);<NEW_LINE>List<Unit> units = business.unit().pick(unitIds);<NEW_LINE>units = business.unit().sort(units);<NEW_LINE>for (Unit o : units) {<NEW_LINE>wos.add(this.convert(business, o, Wo.class));<NEW_LINE>}<NEW_LINE>return wos;<NEW_LINE>}
CriteriaBuilder cb = em.getCriteriaBuilder();
341,220
public void updateAlarm(SonosAlarm alarm) {<NEW_LINE>if (alarm != null) {<NEW_LINE>Map<String, String> inputs = new HashMap<String, String>();<NEW_LINE>try {<NEW_LINE>inputs.put("ID", Integer.toString(alarm.getID()));<NEW_LINE>inputs.put("StartLocalTime", alarm.getStartTime());<NEW_LINE>inputs.put("Duration", alarm.getDuration());<NEW_LINE>inputs.put(<MASK><NEW_LINE>inputs.put("RoomUUID", alarm.getRoomUUID());<NEW_LINE>inputs.put("ProgramURI", alarm.getProgramURI());<NEW_LINE>inputs.put("ProgramMetaData", alarm.getProgramMetaData());<NEW_LINE>inputs.put("PlayMode", alarm.getPlayMode());<NEW_LINE>inputs.put("Volume", Integer.toString(alarm.getVolume()));<NEW_LINE>if (alarm.getIncludeLinkedZones()) {<NEW_LINE>inputs.put("IncludeLinkedZones", "1");<NEW_LINE>} else {<NEW_LINE>inputs.put("IncludeLinkedZones", "0");<NEW_LINE>}<NEW_LINE>if (alarm.getEnabled()) {<NEW_LINE>inputs.put("Enabled", "1");<NEW_LINE>} else {<NEW_LINE>inputs.put("Enabled", "0");<NEW_LINE>}<NEW_LINE>} catch (NumberFormatException ex) {<NEW_LINE>logger.debug("Action Invalid Value Format Exception {}", ex.getMessage());<NEW_LINE>}<NEW_LINE>Map<String, String> result = service.invokeAction(this, "AlarmClock", "UpdateAlarm", inputs);<NEW_LINE>for (String variable : result.keySet()) {<NEW_LINE>this.onValueReceived(variable, result.get(variable), "AlarmClock");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
"Recurrence", alarm.getRecurrence());
1,325,545
public static void main(String[] args) {<NEW_LINE>final String resultsFolder = "target" + File.separatorChar + "results";<NEW_LINE>final String reportsFolder <MASK><NEW_LINE>final String htmlReportFilename = reportsFolder + File.separatorChar + "sql-statement-log-report.html";<NEW_LINE>final String jsonReportFilename = "sql-statement-log-report.json";<NEW_LINE>final String jsonReportPath = reportsFolder + File.separatorChar + jsonReportFilename;<NEW_LINE>final String csvReportFilename = "sql-statement-log-report.csv";<NEW_LINE>final String csvReportPath = reportsFolder + File.separatorChar + csvReportFilename;<NEW_LINE>// make sure reports folder exists<NEW_LINE>File reportsFolderFile = new File(reportsFolder);<NEW_LINE>if (!reportsFolderFile.exists()) {<NEW_LINE>reportsFolderFile.mkdir();<NEW_LINE>}<NEW_LINE>SqlStatementCountAggregator aggregator = new SqlStatementCountAggregator(resultsFolder);<NEW_LINE>TabularResultSet aggregatedResults = aggregator.execute();<NEW_LINE>// write Json report<NEW_LINE>JsonUtil.writeObjectToFile(jsonReportPath, aggregatedResults);<NEW_LINE>// write CSV Report<NEW_LINE>CsvUtil.saveResultSetToFile(csvReportPath, aggregatedResults);<NEW_LINE>// format HTML report<NEW_LINE>HtmlReportBuilder reportWriter = new HtmlReportBuilder(aggregatedResults).name("Sql Statement Log Report").resultDetailsFolder(".." + File.separatorChar + "results" + File.separatorChar).createImageLinks(true).jsonSource(jsonReportFilename).csvSource(csvReportFilename);<NEW_LINE>String report = reportWriter.execute();<NEW_LINE>FileUtil.writeStringToFile(report, htmlReportFilename);<NEW_LINE>}
= "target" + File.separatorChar + "reports";
1,135,925
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_drawer);<NEW_LINE>// set up an authentication handler to take credentials for access to arcgis.com<NEW_LINE>AuthenticationChallengeHandler handler = new DefaultAuthenticationChallengeHandler(this);<NEW_LINE>AuthenticationManager.setAuthenticationChallengeHandler(handler);<NEW_LINE>mDrawerTitle = getTitle();<NEW_LINE>// inflate MapView from layout<NEW_LINE>mMapView = findViewById(R.id.mapView);<NEW_LINE>// create a map with Topographic Basemap<NEW_LINE>Basemap streetsBasemap = new Basemap(BasemapStyle.ARCGIS_STREETS);<NEW_LINE>ArcGISMap map = new ArcGISMap(streetsBasemap);<NEW_LINE>map.addDoneLoadingListener(() -> {<NEW_LINE>if (map.getLoadStatus() != LoadStatus.LOADED) {<NEW_LINE>String error = "Error loading map: " + map.getLoadError().getCause().getMessage();<NEW_LINE>Toast.makeText(this, error, Toast.LENGTH_SHORT).show();<NEW_LINE>Log.e(TAG, error);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// set the map to be displayed in this view<NEW_LINE>mMapView.setMap(map);<NEW_LINE>mMapView.setViewpoint(new Viewpoint(48.354388, -99.998245, 100000000));<NEW_LINE>// inflate the Basemap and Layer list views<NEW_LINE>mBasemapListView = findViewById(R.id.basemap_list);<NEW_LINE>mLayerListView = findViewById(R.id.layer_list);<NEW_LINE>mDrawerLayout = findViewById(R.id.drawer_layout);<NEW_LINE>ArcGISTiledLayer tiledLayer = new ArcGISTiledLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer");<NEW_LINE>ArcGISMapImageLayer mapImageLayer = new ArcGISMapImageLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer");<NEW_LINE>// setting the scales at which the map image layer layer can be viewed<NEW_LINE>mapImageLayer.setMinScale(MIN_SCALE);<NEW_LINE>mapImageLayer.setMaxScale(MIN_SCALE / 100);<NEW_LINE>// create base map array and set it to a list view adapter<NEW_LINE>String[] basemapTiles = getResources().getStringArray(R.array.basemap_array);<NEW_LINE>mBasemapListView.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_single_choice, basemapTiles));<NEW_LINE>mBasemapListView.setItemChecked(0, true);<NEW_LINE>// create operation layers array and set it to a list view adapter<NEW_LINE>String[] operationalLayerTiles = getResources().getStringArray(R.array.operational_layer_array);<NEW_LINE>mLayerListView.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_multiple_choice, operationalLayerTiles));<NEW_LINE>// creates a drawer to handle display of layers on the map<NEW_LINE>createDrawer(tiledLayer, mapImageLayer);<NEW_LINE><MASK><NEW_LINE>getSupportActionBar().setHomeButtonEnabled(true);<NEW_LINE>}
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
1,712,648
public static DateraObject.AppInstance cloneAppInstanceFromSnapshot(DateraObject.DateraConnection conn, String newAppInstanceName, String snapshotName, String ipPool) throws DateraObject.DateraError, UnsupportedEncodingException {<NEW_LINE>// split the snapshot name to appInstanceName and the snapshot timestamp<NEW_LINE>String[] tokens = snapshotName.split(":");<NEW_LINE>Preconditions.checkArgument(tokens.length == 2);<NEW_LINE>// A snapshot is stored in Cloudstack as <AppInstanceName>:<SnapshotTime><NEW_LINE>String appInstanceName = tokens[0];<NEW_LINE>String snapshotTime = tokens[1];<NEW_LINE>// get the snapshot from Datera<NEW_LINE>HttpGet getSnasphotReq = new HttpGet(generateApiUrl("app_instances", appInstanceName, "storage_instances", DateraObject.DEFAULT_STORAGE_NAME, "volumes", DateraObject.DEFAULT_VOLUME_NAME, "snapshots", snapshotTime));<NEW_LINE>String resp = executeApiRequest(conn, getSnasphotReq);<NEW_LINE>DateraObject.VolumeSnapshot snapshot = gson.fromJson(resp, DateraObject.VolumeSnapshot.class);<NEW_LINE><MASK><NEW_LINE>DateraObject.AppInstance appInstanceObj = new DateraObject.AppInstance(newAppInstanceName, snapshotPath);<NEW_LINE>StringEntity appInstanceEntity = new StringEntity(gson.toJson(appInstanceObj));<NEW_LINE>DateraObject.AppInstance appInstance = createAppInstance(conn, newAppInstanceName, appInstanceEntity);<NEW_LINE>// Update ipPool<NEW_LINE>updateAppInstanceIpPool(conn, newAppInstanceName, ipPool);<NEW_LINE>// bring it online<NEW_LINE>updateAppInstanceAdminState(conn, newAppInstanceName, DateraObject.AppState.ONLINE);<NEW_LINE>return getAppInstance(conn, newAppInstanceName);<NEW_LINE>}
String snapshotPath = snapshot.getPath();
1,429,385
protected void toggleTooltip(Element elem, String type) {<NEW_LINE>String csscls = <MASK><NEW_LINE>if (SVGConstants.SVG_MOUSEOVER_EVENT_TYPE.equals(type)) {<NEW_LINE>if (TOOLTIP_HIDDEN.equals(csscls)) {<NEW_LINE>SVGUtil.setAtt(elem, SVGConstants.SVG_CLASS_ATTRIBUTE, TOOLTIP_VISIBLE);<NEW_LINE>}<NEW_LINE>} else if (SVGConstants.SVG_MOUSEOUT_EVENT_TYPE.equals(type)) {<NEW_LINE>if (TOOLTIP_VISIBLE.equals(csscls)) {<NEW_LINE>SVGUtil.setAtt(elem, SVGConstants.SVG_CLASS_ATTRIBUTE, TOOLTIP_HIDDEN);<NEW_LINE>}<NEW_LINE>} else if (SVGConstants.SVG_CLICK_EVENT_TYPE.equals(type)) {<NEW_LINE>if (TOOLTIP_STICKY.equals(csscls)) {<NEW_LINE>SVGUtil.setAtt(elem, SVGConstants.SVG_CLASS_ATTRIBUTE, TOOLTIP_HIDDEN);<NEW_LINE>}<NEW_LINE>if (TOOLTIP_HIDDEN.equals(csscls) || TOOLTIP_VISIBLE.equals(csscls)) {<NEW_LINE>SVGUtil.setAtt(elem, SVGConstants.SVG_CLASS_ATTRIBUTE, TOOLTIP_STICKY);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
elem.getAttribute(SVGConstants.SVG_CLASS_ATTRIBUTE);
806,929
final long doWriteOrSendBytes(ByteBuf data, InetSocketAddress remoteAddress, boolean fastOpen) throws IOException {<NEW_LINE>assert !(fastOpen && remoteAddress == null) : "fastOpen requires a remote address";<NEW_LINE>if (data.hasMemoryAddress()) {<NEW_LINE>long memoryAddress = data.memoryAddress();<NEW_LINE>if (remoteAddress == null) {<NEW_LINE>return socket.writeAddress(memoryAddress, data.readerIndex(), data.writerIndex());<NEW_LINE>}<NEW_LINE>return socket.sendToAddress(memoryAddress, data.readerIndex(), data.writerIndex(), remoteAddress.getAddress(), remoteAddress.getPort(), fastOpen);<NEW_LINE>}<NEW_LINE>if (data.nioBufferCount() > 1) {<NEW_LINE>IovArray array = ((EpollEventLoop) eventLoop()).cleanIovArray();<NEW_LINE>array.add(data, data.readerIndex(), data.readableBytes());<NEW_LINE>int cnt = array.count();<NEW_LINE>assert cnt != 0;<NEW_LINE>if (remoteAddress == null) {<NEW_LINE>return socket.writevAddresses(array<MASK><NEW_LINE>}<NEW_LINE>return socket.sendToAddresses(array.memoryAddress(0), cnt, remoteAddress.getAddress(), remoteAddress.getPort(), fastOpen);<NEW_LINE>}<NEW_LINE>ByteBuffer nioData = data.internalNioBuffer(data.readerIndex(), data.readableBytes());<NEW_LINE>if (remoteAddress == null) {<NEW_LINE>return socket.write(nioData, nioData.position(), nioData.limit());<NEW_LINE>}<NEW_LINE>return socket.sendTo(nioData, nioData.position(), nioData.limit(), remoteAddress.getAddress(), remoteAddress.getPort(), fastOpen);<NEW_LINE>}
.memoryAddress(0), cnt);
1,427,855
public void mousePressed(MouseEvent ev) {<NEW_LINE>if (ev.isPopupTrigger()) {<NEW_LINE>int x = ev.getX();<NEW_LINE>int y = ev.getY();<NEW_LINE>TreePath path = view.getClosestPathForLocation(x, y);<NEW_LINE>if (path != null) {<NEW_LINE>LookTreeNode n = (LookTreeNode) path.getLastPathComponent();<NEW_LINE>clicked = new WeakReference<LookTreeNode>(n);<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Action[] actions = n.getLook().getActions(n.getData(), n.getLookup());<NEW_LINE>// XXX handle multiselects...<NEW_LINE>Node selection = makeNode(n);<NEW_LINE>Lookup context = Lookups.fixed(new Object[] { selection, actionMap });<NEW_LINE>JPopupMenu menu = Utilities.actionsToPopup(actions, context);<NEW_LINE>menu.<MASK><NEW_LINE>// XXX selection does not appear to be collected... do we need to<NEW_LINE>// also destroy the popup menu?<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
show(view, x, y);
18,885
protected Object sendSearchRequest(Query query, Object unusedContext) throws IOException {<NEW_LINE>this.query = query;<NEW_LINE>invokers.forEach(invoker -> invoker.setMonitor(this));<NEW_LINE>deadline = currentTime() + query.getTimeLeft();<NEW_LINE>int originalHits = query.getHits();<NEW_LINE>int originalOffset = query.getOffset();<NEW_LINE>int neededHits = originalHits + originalOffset;<NEW_LINE>int q = neededHits;<NEW_LINE>if (group.isBalanced() && !group.isSparse()) {<NEW_LINE>Double topkProbabilityOverrride = query.properties().getDouble(Dispatcher.topKProbability);<NEW_LINE>q = (topkProbabilityOverrride != null) ? searchCluster.estimateHitsToFetch(neededHits, invokers.size(), topkProbabilityOverrride) : searchCluster.estimateHitsToFetch(<MASK><NEW_LINE>}<NEW_LINE>query.setHits(q);<NEW_LINE>query.setOffset(0);<NEW_LINE>Object context = null;<NEW_LINE>for (SearchInvoker invoker : invokers) {<NEW_LINE>context = invoker.sendSearchRequest(query, context);<NEW_LINE>askedNodes++;<NEW_LINE>}<NEW_LINE>query.setHits(originalHits);<NEW_LINE>query.setOffset(originalOffset);<NEW_LINE>return null;<NEW_LINE>}
neededHits, invokers.size());
1,322,841
public void tickFlower() {<NEW_LINE>super.tickFlower();<NEW_LINE>if (getLevel().isClientSide) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int mana = 1800;<NEW_LINE>if (getMaxMana() - this.getMana() >= mana && !getLevel().isClientSide && ticksExisted % 80 == 0) {<NEW_LINE>for (int i = 0; i < RANGE * 2 + 1; i++) {<NEW_LINE>for (int j = 0; j < RANGE * 2 + 1; j++) {<NEW_LINE>for (int k = 0; k < RANGE * 2 + 1; k++) {<NEW_LINE>BlockPos pos = getEffectivePos().offset(i - RANGE, j - RANGE, k - RANGE);<NEW_LINE>BlockState state = getLevel().getBlockState(pos);<NEW_LINE>Block block = state.getBlock();<NEW_LINE>if (block instanceof CakeBlock) {<NEW_LINE>int nextSlicesEaten = state.getValue(CakeBlock.BITES) + 1;<NEW_LINE>if (nextSlicesEaten > 6) {<NEW_LINE>getLevel(<MASK><NEW_LINE>} else {<NEW_LINE>getLevel().setBlockAndUpdate(pos, state.setValue(CakeBlock.BITES, nextSlicesEaten));<NEW_LINE>}<NEW_LINE>getLevel().levelEvent(LevelEvent.PARTICLES_DESTROY_BLOCK, pos, Block.getId(state));<NEW_LINE>// Usage of vanilla sound event: Subtitle is "Eating", generic sounds are meant to be reused.<NEW_LINE>getLevel().playSound(null, getEffectivePos(), SoundEvents.GENERIC_EAT, SoundSource.BLOCKS, 1F, 0.5F + (float) Math.random() * 0.5F);<NEW_LINE>addMana(mana);<NEW_LINE>sync();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).removeBlock(pos, false);
1,388,877
GraphQLEnumType buildEnumType(BuildContext buildCtx, EnumTypeDefinition typeDefinition) {<NEW_LINE>GraphQLEnumType.<MASK><NEW_LINE>builder.definition(typeDefinition);<NEW_LINE>builder.name(typeDefinition.getName());<NEW_LINE>builder.description(buildDescription(typeDefinition, typeDefinition.getDescription()));<NEW_LINE>builder.comparatorRegistry(buildCtx.getComparatorRegistry());<NEW_LINE>List<EnumTypeExtensionDefinition> extensions = enumTypeExtensions(typeDefinition, buildCtx);<NEW_LINE>builder.extensionDefinitions(extensions);<NEW_LINE>EnumValuesProvider enumValuesProvider = buildCtx.getWiring().getEnumValuesProviders().get(typeDefinition.getName());<NEW_LINE>typeDefinition.getEnumValueDefinitions().forEach(evd -> {<NEW_LINE>GraphQLEnumValueDefinition enumValueDefinition = buildEnumValue(buildCtx, typeDefinition, enumValuesProvider, evd);<NEW_LINE>builder.value(enumValueDefinition);<NEW_LINE>});<NEW_LINE>extensions.forEach(extension -> extension.getEnumValueDefinitions().forEach(evd -> {<NEW_LINE>GraphQLEnumValueDefinition enumValueDefinition = buildEnumValue(buildCtx, typeDefinition, enumValuesProvider, evd);<NEW_LINE>if (!builder.hasValue(enumValueDefinition.getName())) {<NEW_LINE>builder.value(enumValueDefinition);<NEW_LINE>}<NEW_LINE>}));<NEW_LINE>builder.withDirectives(buildDirectives(buildCtx, typeDefinition.getDirectives(), directivesOf(extensions), ENUM, buildCtx.getDirectives(), buildCtx.getComparatorRegistry()));<NEW_LINE>return builder.build();<NEW_LINE>}
Builder builder = GraphQLEnumType.newEnum();
34,225
public void handle(GameEvent event) {<NEW_LINE>CPU cpu = (CPU) event.getSource();<NEW_LINE>Cubot cubot = (Cubot) ((<MASK><NEW_LINE>cpu.setHardwareHost(cubot);<NEW_LINE>CubotLeg legHw = new CubotLeg(cubot);<NEW_LINE>legHw.setCpu(cpu);<NEW_LINE>CubotLaser laserHw = new CubotLaser(cubot);<NEW_LINE>laserHw.setCpu(cpu);<NEW_LINE>CubotLidar radarHw = new CubotLidar(cubot);<NEW_LINE>radarHw.setCpu(cpu);<NEW_LINE>CubotKeyboard keyboard = new CubotKeyboard(cubot);<NEW_LINE>keyboard.setCpu(cpu);<NEW_LINE>CubotDrill drillHw = new CubotDrill(cubot);<NEW_LINE>drillHw.setCpu(cpu);<NEW_LINE>CubotInventory invHw = new CubotInventory(cubot);<NEW_LINE>invHw.setCpu(cpu);<NEW_LINE>CubotHologram emoteHw = new CubotHologram(cubot);<NEW_LINE>emoteHw.setCpu(cpu);<NEW_LINE>CubotBattery batteryHw = new CubotBattery(cubot);<NEW_LINE>batteryHw.setCpu(cpu);<NEW_LINE>CubotFloppyDrive floppyHw = new CubotFloppyDrive(cubot);<NEW_LINE>floppyHw.setCpu(cpu);<NEW_LINE>CubotComPort comPortHw = new CubotComPort(cubot);<NEW_LINE>comPortHw.setCpu(cpu);<NEW_LINE>CubotCore coreHw = new CubotCore(cubot);<NEW_LINE>coreHw.setCpu(cpu);<NEW_LINE>CubotShield shieldHw = new CubotShield(cubot);<NEW_LINE>shieldHw.setCpu(cpu);<NEW_LINE>cubot.attachHardware(legHw, CubotLeg.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(laserHw, CubotLaser.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(radarHw, CubotLidar.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(keyboard, CubotKeyboard.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(drillHw, CubotDrill.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(invHw, CubotInventory.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(invHw, CubotInventory.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(emoteHw, CubotHologram.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(batteryHw, CubotBattery.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(floppyHw, CubotFloppyDrive.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(comPortHw, CubotComPort.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(coreHw, CubotCore.DEFAULT_ADDRESS);<NEW_LINE>cubot.attachHardware(shieldHw, CubotShield.DEFAULT_ADDRESS);<NEW_LINE>}
CpuInitialisationEvent) event).getUnit();
1,701,098
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NEW_LINE>Response<UntagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "fis");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UntagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new UntagResourceResultJsonUnmarshaller());
364,651
public Sequence execute(StaticContext sctx, QueryContext ctx, Sequence[] args) {<NEW_LINE>final Sequence sequence = args[0];<NEW_LINE>if (sequence == null) {<NEW_LINE>return Int32.ZERO;<NEW_LINE>}<NEW_LINE>final boolean format = FunUtil.getBoolean(args, 1, "prettyPrint", false, false);<NEW_LINE>final String file = FunUtil.getString(args, 2, "file", null, null, false);<NEW_LINE>final PrintStream buf;<NEW_LINE>if (file == null) {<NEW_LINE>buf = IOUtils.createBuffer();<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>buf = new PrintStream(new FileOutputStream(file));<NEW_LINE>} catch (final FileNotFoundException e) {<NEW_LINE>throw new QueryException(SDBFun.ERR_FILE_NOT_FOUND, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>new StringSerializer(buf).setFormat(format).serialize(sequence);<NEW_LINE>return new <MASK><NEW_LINE>}
Str(buf.toString());
946,293
public void completeQueryWithObject(@NonNull SearchResult sr) {<NEW_LINE>if (sr.object instanceof AbstractPoiType) {<NEW_LINE>SearchHistoryHelper.getInstance(app).addNewItemToHistory((AbstractPoiType) sr.object);<NEW_LINE>} else if (sr.object instanceof PoiUIFilter) {<NEW_LINE>SearchHistoryHelper.getInstance(app).addNewItemToHistory((PoiUIFilter) sr.object);<NEW_LINE>}<NEW_LINE>if (sr.object instanceof PoiType && ((PoiType) sr.object).isAdditional()) {<NEW_LINE>PoiType additional = (PoiType) sr.object;<NEW_LINE>AbstractPoiType parent = additional.getParentType();<NEW_LINE>if (parent != null) {<NEW_LINE>PoiUIFilter custom = app.getPoiFilters().getFilterById(PoiUIFilter.STD_PREFIX + parent.getKeyName());<NEW_LINE>if (custom != null) {<NEW_LINE>custom.clearFilter();<NEW_LINE>custom.updateTypesToAccept(parent);<NEW_LINE>custom.setFilterByName(additional.getKeyName().replace('_', ':').toLowerCase());<NEW_LINE>SearchPhrase phrase = searchUICore.getPhrase();<NEW_LINE>sr = new SearchResult(phrase);<NEW_LINE>sr<MASK><NEW_LINE>sr.object = custom;<NEW_LINE>sr.priority = SEARCH_AMENITY_TYPE_PRIORITY;<NEW_LINE>sr.priorityDistance = 0;<NEW_LINE>sr.objectType = ObjectType.POI_TYPE;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>searchUICore.selectSearchResult(sr);<NEW_LINE>String searchQuery = searchUICore.getPhrase().getText(true);<NEW_LINE>if (searchRadiusLevel != 1) {<NEW_LINE>searchRadiusLevel = 1;<NEW_LINE>}<NEW_LINE>runSearch(searchQuery);<NEW_LINE>}
.localeName = custom.getName();
1,339,662
private static Collection<String> extractedMethod(int index, final int length, final String name) {<NEW_LINE>final Collection<String> array = new ArrayList<>(10);<NEW_LINE>while (index < length) {<NEW_LINE>final int wordStart = index;<NEW_LINE>int upperCaseCount = 0;<NEW_LINE>int lowerCaseCount = 0;<NEW_LINE>int digitCount = 0;<NEW_LINE>int specialCount = 0;<NEW_LINE>while (index < length) {<NEW_LINE>final char <MASK><NEW_LINE>if (Character.isDigit(c)) {<NEW_LINE>if (upperCaseCount > 0 || lowerCaseCount > 0 || specialCount > 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>digitCount++;<NEW_LINE>} else if (Character.isUpperCase(c)) {<NEW_LINE>if (lowerCaseCount > 0 || digitCount > 0 || specialCount > 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>upperCaseCount++;<NEW_LINE>} else if (Character.isLowerCase(c)) {<NEW_LINE>if (digitCount > 0 || specialCount > 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (upperCaseCount > 1) {<NEW_LINE>index--;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>lowerCaseCount++;<NEW_LINE>} else {<NEW_LINE>if (upperCaseCount > 0 || lowerCaseCount > 0 || digitCount > 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>specialCount++;<NEW_LINE>}<NEW_LINE>index++;<NEW_LINE>}<NEW_LINE>final String word = name.substring(wordStart, index);<NEW_LINE>if (!StringUtil.isEmptyOrSpaces(word)) {<NEW_LINE>array.add(word);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return array;<NEW_LINE>}
c = name.charAt(index);
941,375
public void sendNotification(Check check, Subscription subscription, List<Alert> alerts) throws NotificationFailedException {<NEW_LINE>PagerDuty pagerDuty = PagerDuty.create(subscription.getTarget(), new RestAdapter.Builder().setEndpoint(Endpoints.newFixedEndpoint(baseUrl)).build());<NEW_LINE>NotifyResult result = null;<NEW_LINE>try {<NEW_LINE>if (check.getState() == AlertType.ERROR || check.getState() == AlertType.WARN) {<NEW_LINE>Trigger trigger = new Trigger.Builder("Check '" + check.getName() + "' has exceeded its threshold.").withIncidentKey(incidentKey(check)).client("Seyren").clientUrl(url(check)).addDetails(details(check, alerts)).build();<NEW_LINE>result = pagerDuty.notify(trigger);<NEW_LINE>} else if (check.getState() == AlertType.OK) {<NEW_LINE>Resolution resolution = new Resolution.Builder(incidentKey(check)).withDescription("Check '" + check.getName() + "' has been resolved.").addDetails(details(check<MASK><NEW_LINE>result = pagerDuty.notify(resolution);<NEW_LINE>} else {<NEW_LINE>LOGGER.warn("Did not send notification to PagerDuty for check in state: {}", check.getState());<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new NotificationFailedException("Failed to send notification to PagerDuty", e);<NEW_LINE>}<NEW_LINE>if (result != null && !"success".equals(result.status())) {<NEW_LINE>throw new NotificationFailedException("Failed to send notification to PagerDuty: '" + result.status() + "', " + result.message());<NEW_LINE>}<NEW_LINE>}
, alerts)).build();
312,121
public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create variable int queryvar", path);<NEW_LINE>env.compileDeploy("on SupportBean set queryvar=intPrimitive", path);<NEW_LINE>String stmtText = "@name('s0') select myint from " + " sql:MyDBWithRetain ['select myint from mytesttable where ${queryvar} = mytesttable.mybigint'] as s0, " + "SupportBean_A#keepall as s1";<NEW_LINE>env.compileDeploy(stmtText<MASK><NEW_LINE>sendSupportBeanEvent(env, 5);<NEW_LINE>env.sendEventBean(new SupportBean_A("A1"));<NEW_LINE>env.assertEqualsNew("s0", "myint", 50);<NEW_LINE>env.undeployModuleContaining("s0");<NEW_LINE>stmtText = "@name('s0') select myint from " + "SupportBean_A#keepall as s1, " + "sql:MyDBWithRetain ['select myint from mytesttable where ${queryvar} = mytesttable.mybigint'] as s0";<NEW_LINE>env.compileDeploy(stmtText, path).addListener("s0");<NEW_LINE>sendSupportBeanEvent(env, 6);<NEW_LINE>env.sendEventBean(new SupportBean_A("A1"));<NEW_LINE>env.assertEqualsNew("s0", "myint", 60);<NEW_LINE>env.undeployAll();<NEW_LINE>}
, path).addListener("s0");
1,737,713
public Request<ListFacesRequest> marshall(ListFacesRequest listFacesRequest) {<NEW_LINE>if (listFacesRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListFacesRequest)");<NEW_LINE>}<NEW_LINE>Request<ListFacesRequest> request = new DefaultRequest<ListFacesRequest>(listFacesRequest, "AmazonRekognition");<NEW_LINE>String target = "RekognitionService.ListFaces";<NEW_LINE>request.addHeader("X-Amz-Target", target);<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (listFacesRequest.getCollectionId() != null) {<NEW_LINE>String collectionId = listFacesRequest.getCollectionId();<NEW_LINE>jsonWriter.name("CollectionId");<NEW_LINE>jsonWriter.value(collectionId);<NEW_LINE>}<NEW_LINE>if (listFacesRequest.getNextToken() != null) {<NEW_LINE>String nextToken = listFacesRequest.getNextToken();<NEW_LINE>jsonWriter.name("NextToken");<NEW_LINE>jsonWriter.value(nextToken);<NEW_LINE>}<NEW_LINE>if (listFacesRequest.getMaxResults() != null) {<NEW_LINE>Integer maxResults = listFacesRequest.getMaxResults();<NEW_LINE>jsonWriter.name("MaxResults");<NEW_LINE>jsonWriter.value(maxResults);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE>String snippet = stringWriter.toString();<NEW_LINE>byte[] <MASK><NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.1");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
content = snippet.getBytes(UTF8);
1,629,428
public String processRefToExternalLink(String $ref, RefFormat refFormat) {<NEW_LINE>String renamedRef = cache.getRenamedRef($ref);<NEW_LINE>if (renamedRef != null) {<NEW_LINE>return renamedRef;<NEW_LINE>}<NEW_LINE>final Link link = cache.loadRef($ref, refFormat, Link.class);<NEW_LINE>if (link == null) {<NEW_LINE>// stop! There's a problem. retain the original ref<NEW_LINE>LOGGER.warn("unable to load model reference from `" + $ref + "`. It may not be available " + "or the reference isn't a valid model schema");<NEW_LINE>return $ref;<NEW_LINE>}<NEW_LINE>String newRef;<NEW_LINE>if (openAPI.getComponents() == null) {<NEW_LINE>openAPI.setComponents(new Components());<NEW_LINE>}<NEW_LINE>Map<String, Link> links = openAPI.getComponents().getLinks();<NEW_LINE>if (links == null) {<NEW_LINE>links = new LinkedHashMap<>();<NEW_LINE>}<NEW_LINE>final String possiblyConflictingDefinitionName = computeDefinitionName($ref);<NEW_LINE>Link existingLink = links.get(possiblyConflictingDefinitionName);<NEW_LINE>if (existingLink != null) {<NEW_LINE>LOGGER.<MASK><NEW_LINE>if (existingLink.get$ref() != null) {<NEW_LINE>// use the new model<NEW_LINE>existingLink = null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>newRef = possiblyConflictingDefinitionName;<NEW_LINE>cache.putRenamedRef($ref, newRef);<NEW_LINE>if (existingLink == null) {<NEW_LINE>// don't overwrite existing model reference<NEW_LINE>openAPI.getComponents().addLinks(newRef, link);<NEW_LINE>cache.addReferencedKey(newRef);<NEW_LINE>String file = $ref.split("#/")[0];<NEW_LINE>if (link.get$ref() != null) {<NEW_LINE>RefFormat format = computeRefFormat(link.get$ref());<NEW_LINE>if (isAnExternalRefFormat(format)) {<NEW_LINE>link.set$ref(processRefToExternalLink(link.get$ref(), format));<NEW_LINE>} else {<NEW_LINE>processRefToExternalLink(file + link.get$ref(), RefFormat.RELATIVE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return newRef;<NEW_LINE>}
debug("A model for " + existingLink + " already exists");
210,797
protected FieldMetadataOverride constructAdornedTargetCollectionMetadataOverride(AdminPresentationAdornedTargetCollection adornedTargetCollection) {<NEW_LINE>if (adornedTargetCollection != null) {<NEW_LINE>FieldMetadataOverride override = new FieldMetadataOverride();<NEW_LINE>override.setGridVisibleFields(adornedTargetCollection.gridVisibleFields());<NEW_LINE>override.setSelectizeVisibleField(adornedTargetCollection.selectizeVisibleField());<NEW_LINE>override.setIgnoreAdornedProperties(adornedTargetCollection.ignoreAdornedProperties());<NEW_LINE>override.setMaintainedAdornedTargetFields(adornedTargetCollection.maintainedAdornedTargetFields());<NEW_LINE>override.setParentObjectIdProperty(adornedTargetCollection.parentObjectIdProperty());<NEW_LINE>override.setParentObjectProperty(adornedTargetCollection.parentObjectProperty());<NEW_LINE>override.setSortAscending(adornedTargetCollection.sortAscending());<NEW_LINE>override.setSortProperty(adornedTargetCollection.sortProperty());<NEW_LINE>override.setTargetObjectIdProperty(adornedTargetCollection.targetObjectIdProperty());<NEW_LINE>override.setTargetObjectProperty(adornedTargetCollection.targetObjectProperty());<NEW_LINE>override.setJoinEntityClass(adornedTargetCollection.joinEntityClass());<NEW_LINE>override.setCustomCriteria(adornedTargetCollection.customCriteria());<NEW_LINE>override.setUseServerSideInspectionCache(adornedTargetCollection.useServerSideInspectionCache());<NEW_LINE>override.setExcluded(adornedTargetCollection.excluded());<NEW_LINE>override.setFriendlyName(adornedTargetCollection.friendlyName());<NEW_LINE>override.setReadOnly(adornedTargetCollection.readOnly());<NEW_LINE>override.setOrder(adornedTargetCollection.order());<NEW_LINE>override.setTab(adornedTargetCollection.tab());<NEW_LINE>override.setTabOrder(adornedTargetCollection.tabOrder());<NEW_LINE>override.setGroup(adornedTargetCollection.group());<NEW_LINE>override.setSecurityLevel(adornedTargetCollection.securityLevel());<NEW_LINE>override.setAddType(adornedTargetCollection.<MASK><NEW_LINE>override.setFetchType(adornedTargetCollection.operationTypes().fetchType());<NEW_LINE>override.setRemoveType(adornedTargetCollection.operationTypes().removeType());<NEW_LINE>override.setUpdateType(adornedTargetCollection.operationTypes().updateType());<NEW_LINE>override.setInspectType(adornedTargetCollection.operationTypes().inspectType());<NEW_LINE>override.setShowIfProperty(adornedTargetCollection.showIfProperty());<NEW_LINE>override.setCurrencyCodeField(adornedTargetCollection.currencyCodeField());<NEW_LINE>override.setAdornedTargetAddMethodType(adornedTargetCollection.addType());<NEW_LINE>override.setLazyFetch(adornedTargetCollection.lazyFetch());<NEW_LINE>override.setManualFetch(adornedTargetCollection.manualFetch());<NEW_LINE>if (adornedTargetCollection.showIfFieldEquals().length != 0) {<NEW_LINE>processShowIfFieldEqualsAnnotations(adornedTargetCollection.showIfFieldEquals(), override);<NEW_LINE>}<NEW_LINE>return override;<NEW_LINE>}<NEW_LINE>throw new IllegalArgumentException("AdminPresentationAdornedTargetCollection annotation not found on field.");<NEW_LINE>}
operationTypes().addType());
45,719
public String encode() throws IOException {<NEW_LINE>try (FastStringWriter fsw = new FastStringWriter()) {<NEW_LINE>ChartUtils.writeDataValue(fsw, "enabled", this.enabled, false);<NEW_LINE>ChartUtils.writeDataValue(fsw, "mode", this.mode, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "intersect", this.intersect, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "position", this.position, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "backgroundColor", this.backgroundColor, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "titleColor", this.titleFontColor, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "titleSpacing", this.titleSpacing, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "titleMarginBottom", this.titleMarginBottom, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "bodyColor", this.bodyFontColor, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "bodySpacing", this.bodySpacing, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "footerColor", this.footerFontColor, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "footerSpacing", this.footerSpacing, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "footerMarginTop", this.footerMarginTop, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "xPadding", this.xpadding, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, <MASK><NEW_LINE>ChartUtils.writeDataValue(fsw, "caretPadding", this.caretPadding, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "caretSize", this.caretSize, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "cornerRadius", this.cornerRadius, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "multiKeyBackground", this.multiKeyBackground, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "displayColors", this.displayColors, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "borderColor", this.borderColor, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "borderWidth", this.borderWidth, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "rtl", this.rtl, true);<NEW_LINE>ChartUtils.writeDataValue(fsw, "textDirection", this.textDirection, true);<NEW_LINE>getTitleFont().write(fsw, "titleFont", true);<NEW_LINE>getBodyFont().write(fsw, "bodyFont", true);<NEW_LINE>getFooterFont().write(fsw, "footerFont", true);<NEW_LINE>return fsw.toString();<NEW_LINE>}<NEW_LINE>}
"yPadding", this.ypadding, true);
683,312
protected XContentBuilder doXContentBody(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.<MASK><NEW_LINE>if (count != 0) {<NEW_LINE>builder.field(Fields.MIN, min);<NEW_LINE>builder.field(Fields.MAX, max);<NEW_LINE>builder.field(Fields.AVG, avg);<NEW_LINE>builder.field(Fields.SUM, sum);<NEW_LINE>if (valueAsString.get(Fields.MIN_AS_STRING) != null) {<NEW_LINE>builder.field(Fields.MIN_AS_STRING, getMinAsString());<NEW_LINE>builder.field(Fields.MAX_AS_STRING, getMaxAsString());<NEW_LINE>builder.field(Fields.AVG_AS_STRING, getAvgAsString());<NEW_LINE>builder.field(Fields.SUM_AS_STRING, getSumAsString());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>builder.nullField(Fields.MIN);<NEW_LINE>builder.nullField(Fields.MAX);<NEW_LINE>builder.nullField(Fields.AVG);<NEW_LINE>builder.nullField(Fields.SUM);<NEW_LINE>}<NEW_LINE>otherStatsToXContent(builder, params);<NEW_LINE>return builder;<NEW_LINE>}
field(Fields.COUNT, count);
357,118
private void transformProgram(Program program) {<NEW_LINE>for (BasicBlock block : program.getBasicBlocks()) {<NEW_LINE>for (Instruction insn : block) {<NEW_LINE>if (!(insn instanceof GetFieldInstruction)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>GetFieldInstruction getField = (GetFieldInstruction) insn;<NEW_LINE><MASK><NEW_LINE>if (field.getClassName().equals("java.lang.System")) {<NEW_LINE>switch(field.getFieldName()) {<NEW_LINE>case "err":<NEW_LINE>case "out":<NEW_LINE>case "in":<NEW_LINE>{<NEW_LINE>InvokeInstruction invoke = new InvokeInstruction();<NEW_LINE>invoke.setType(InvocationType.SPECIAL);<NEW_LINE>invoke.setMethod(new MethodReference("java.lang.System", field.getFieldName(), getField.getFieldType()));<NEW_LINE>invoke.setReceiver(getField.getReceiver());<NEW_LINE>invoke.setLocation(insn.getLocation());<NEW_LINE>insn.replace(invoke);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
FieldReference field = getField.getField();
519,434
public String playerEyeHeight(@Sender EntityRef client, @CommandParam("eye-height") float amount) {<NEW_LINE>EntityRef player = client.getComponent(ClientComponent.class).character;<NEW_LINE>try {<NEW_LINE>GazeMountPointComponent gazeMountPointComponent = player.getComponent(GazeMountPointComponent.class);<NEW_LINE>if (gazeMountPointComponent != null) {<NEW_LINE>float prevHeight = gazeMountPointComponent.translate.y;<NEW_LINE>gazeMountPointComponent.translate.y = amount;<NEW_LINE>Location.removeChild(player, gazeMountPointComponent.gazeEntity);<NEW_LINE>Location.attachChild(player, gazeMountPointComponent.gazeEntity, gazeMountPointComponent.translate, new Quaternionf());<NEW_LINE>player.saveComponent(gazeMountPointComponent);<NEW_LINE>return "Eye-height of player set to " <MASK><NEW_LINE>}<NEW_LINE>return "";<NEW_LINE>} catch (NullPointerException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>}
+ amount + " (was " + prevHeight + ")";
1,823,348
private void updateInsertionData(TreeSet<VersionedInsertionData>[] priorityQueues, Collection<VehicleRoute> routes, List<Job> unassignedJobList, int updateRound, boolean firstRun, VehicleRoute lastModified, Map<VehicleRoute, Integer> updates) {<NEW_LINE>for (Job unassignedJob : unassignedJobList) {<NEW_LINE>if (priorityQueues[unassignedJob.getIndex()] == null) {<NEW_LINE>priorityQueues[unassignedJob.getIndex()] = new TreeSet<>(InsertionDataUpdater.getComparator());<NEW_LINE>}<NEW_LINE>if (firstRun) {<NEW_LINE>InsertionDataUpdater.update(switchAllowed, initialVehicleIds, fleetManager, insertionCostsCalculator, priorityQueues[unassignedJob.getIndex()], updateRound, unassignedJob, routes);<NEW_LINE>for (VehicleRoute r : routes) updates.put(r, updateRound);<NEW_LINE>} else {<NEW_LINE>if (dependencyTypes == null || dependencyTypes[unassignedJob.getIndex()] == null) {<NEW_LINE>InsertionDataUpdater.update(switchAllowed, initialVehicleIds, fleetManager, insertionCostsCalculator, priorityQueues[unassignedJob.getIndex()], updateRound, unassignedJob<MASK><NEW_LINE>updates.put(lastModified, updateRound);<NEW_LINE>} else {<NEW_LINE>DependencyType dependencyType = dependencyTypes[unassignedJob.getIndex()];<NEW_LINE>if (dependencyType.equals(DependencyType.INTER_ROUTE) || dependencyType.equals(DependencyType.INTRA_ROUTE)) {<NEW_LINE>InsertionDataUpdater.update(switchAllowed, initialVehicleIds, fleetManager, insertionCostsCalculator, priorityQueues[unassignedJob.getIndex()], updateRound, unassignedJob, routes);<NEW_LINE>for (VehicleRoute r : routes) updates.put(r, updateRound);<NEW_LINE>} else {<NEW_LINE>InsertionDataUpdater.update(switchAllowed, initialVehicleIds, fleetManager, insertionCostsCalculator, priorityQueues[unassignedJob.getIndex()], updateRound, unassignedJob, Arrays.asList(lastModified));<NEW_LINE>updates.put(lastModified, updateRound);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, Arrays.asList(lastModified));
1,545,580
public void marshall(GetAggregateComplianceDetailsByConfigRuleRequest getAggregateComplianceDetailsByConfigRuleRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (getAggregateComplianceDetailsByConfigRuleRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(getAggregateComplianceDetailsByConfigRuleRequest.getConfigurationAggregatorName(), CONFIGURATIONAGGREGATORNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(getAggregateComplianceDetailsByConfigRuleRequest.getConfigRuleName(), CONFIGRULENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(getAggregateComplianceDetailsByConfigRuleRequest.getAccountId(), ACCOUNTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(getAggregateComplianceDetailsByConfigRuleRequest.getComplianceType(), COMPLIANCETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(getAggregateComplianceDetailsByConfigRuleRequest.getLimit(), LIMIT_BINDING);<NEW_LINE>protocolMarshaller.marshall(getAggregateComplianceDetailsByConfigRuleRequest.getNextToken(), NEXTTOKEN_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
getAggregateComplianceDetailsByConfigRuleRequest.getAwsRegion(), AWSREGION_BINDING);
1,027,218
public void onMatch(RelOptRuleCall call) {<NEW_LINE>Aggregate aggRel = call.rel(0);<NEW_LINE>Union union = call.rel(1);<NEW_LINE>if (!union.all) {<NEW_LINE>// This transformation is only valid for UNION ALL.<NEW_LINE>// Consider t1(i) with rows (5), (5) and t2(i) with<NEW_LINE>// rows (5), (10), and the query<NEW_LINE>// select sum(i) from (select i from t1) union (select i from t2).<NEW_LINE>// The correct answer is 15. If we apply the transformation,<NEW_LINE>// we get<NEW_LINE>// select sum(i) from<NEW_LINE>// (select sum(i) as i from t1) union (select sum(i) as i from t2)<NEW_LINE>// which yields 25 (incorrect).<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int groupCount = aggRel.getGroupSet().cardinality();<NEW_LINE>List<AggregateCall> transformedAggCalls = transformAggCalls(aggRel.copy(aggRel.getTraitSet(), aggRel.getInput(), aggRel.getGroupSet(), null, aggRel.getAggCallList()), groupCount, aggRel.getAggCallList());<NEW_LINE>if (transformedAggCalls == null) {<NEW_LINE>// we've detected the presence of something like AVG,<NEW_LINE>// which we can't handle<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// create corresponding aggregates on top of each union child<NEW_LINE>final RelBuilder relBuilder = call.builder();<NEW_LINE>int transformCount = 0;<NEW_LINE>final RelMetadataQuery mq = call.getMetadataQuery();<NEW_LINE>for (RelNode input : union.getInputs()) {<NEW_LINE>boolean alreadyUnique = RelMdUtil.areColumnsDefinitelyUnique(mq, input, aggRel.getGroupSet());<NEW_LINE>relBuilder.push(input);<NEW_LINE>if (!alreadyUnique) {<NEW_LINE>++transformCount;<NEW_LINE>relBuilder.aggregate(relBuilder.groupKey(aggRel.getGroupSet()), aggRel.getAggCallList());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (transformCount == 0) {<NEW_LINE>// none of the children could benefit from the push-down,<NEW_LINE>// so bail out (preventing the infinite loop to which most<NEW_LINE>// planners would succumb)<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// create a new union whose children are the aggregates created above<NEW_LINE>relBuilder.union(true, union.<MASK><NEW_LINE>relBuilder.aggregate(relBuilder.groupKey(aggRel.getGroupSet(), (Iterable<ImmutableBitSet>) aggRel.getGroupSets()), transformedAggCalls);<NEW_LINE>call.transformTo(relBuilder.build());<NEW_LINE>}
getInputs().size());
1,086,846
private double[] computeAVGPathLengthOfRandomKeys(int size) {<NEW_LINE>BinarySearchTreeInternalPathLength<Integer, Integer> binarySearchTreeStandardDelete = new BinarySearchTreeInternalPathLength<>();<NEW_LINE>BinarySearchTreeInternalPathLength<Integer, Integer> binarySearchTreeRandomPromotionDelete = new BinarySearchTreeInternalPathLength<>();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>int random = <MASK><NEW_LINE>binarySearchTreeStandardDelete.put(random, random);<NEW_LINE>binarySearchTreeRandomPromotionDelete.put(random, random);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < size * size; i++) {<NEW_LINE>// Delete random key<NEW_LINE>int randomIndexKeyToDelete = StdRandom.uniform(binarySearchTreeStandardDelete.size());<NEW_LINE>binarySearchTreeStandardDelete.delete(binarySearchTreeStandardDelete.select(randomIndexKeyToDelete));<NEW_LINE>binarySearchTreeRandomPromotionDelete.deleteWithRandomNodePromotion(binarySearchTreeRandomPromotionDelete.select(randomIndexKeyToDelete));<NEW_LINE>// Insert random key<NEW_LINE>int random = StdRandom.uniform(Integer.MAX_VALUE);<NEW_LINE>binarySearchTreeStandardDelete.put(random, random);<NEW_LINE>binarySearchTreeRandomPromotionDelete.put(random, random);<NEW_LINE>}<NEW_LINE>double[] averagePathLengths = new double[2];<NEW_LINE>averagePathLengths[0] = binarySearchTreeStandardDelete.averagePathLength();<NEW_LINE>averagePathLengths[1] = binarySearchTreeRandomPromotionDelete.averagePathLength();<NEW_LINE>return averagePathLengths;<NEW_LINE>}
StdRandom.uniform(Integer.MAX_VALUE);
1,776,728
public <T0, T1, T2, T3, T4, T> Join<T> createJoin(final List<Stage<?>> stages, final Function5<T0, T1, T2, T3, T4, T> constructor, final TableIdentifier<T0> t0, final TableIdentifier<T1> t1, final TableIdentifier<T2> t2, final TableIdentifier<T3> t3, final TableIdentifier<T4> t4) {<NEW_LINE>final SqlFunction<ResultSet, T0> rsMapper0 = rsMapper(stages, 0, t0);<NEW_LINE>final SqlFunction<ResultSet, T1> rsMapper1 = rsMapper(stages, 1, t1);<NEW_LINE>final SqlFunction<ResultSet, T2> rsMapper2 = rsMapper(stages, 2, t2);<NEW_LINE>final SqlFunction<ResultSet, T3> rsMapper3 = rsMapper(stages, 3, t3);<NEW_LINE>final SqlFunction<ResultSet, T4> rsMapper4 = <MASK><NEW_LINE>final SqlFunction<ResultSet, T> rsMapper = rs -> constructor.apply(rsMapper0.apply(rs), rsMapper1.apply(rs), rsMapper2.apply(rs), rsMapper3.apply(rs), rsMapper4.apply(rs));<NEW_LINE>return newJoin(stages, rsMapper);<NEW_LINE>}
rsMapper(stages, 4, t4);
1,134,872
public URL call() throws IOException, InterruptedException {<NEW_LINE>URL initialUrl = HttpRequest.url("https://paste.enginehub.org/signed_paste");<NEW_LINE>HttpRequest requestBuilder = HttpRequest.get(initialUrl);<NEW_LINE>requestBuilder.header("x-paste-meta-from", "EngineHub");<NEW_LINE>if (metadata.name != null) {<NEW_LINE>requestBuilder.header("x-paste-meta-name", metadata.name);<NEW_LINE>}<NEW_LINE>if (metadata.author != null) {<NEW_LINE>requestBuilder.header("x-paste-meta-author", metadata.author);<NEW_LINE>}<NEW_LINE>if (metadata.extension != null) {<NEW_LINE>requestBuilder.header("x-paste-meta-extension", metadata.extension);<NEW_LINE>}<NEW_LINE>SignedPasteResponse response = GSON.fromJson(requestBuilder.execute().expectResponseCode(200).returnContent().asString("UTF-8"), TypeToken.get(SignedPasteResponse.class).getType());<NEW_LINE>HttpRequest.Form form = HttpRequest.Form.create();<NEW_LINE>for (Map.Entry<String, String> entry : response.uploadFields.entrySet()) {<NEW_LINE>form.add(entry.getKey(), entry.getValue());<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>URL url = HttpRequest.url(response.uploadUrl);<NEW_LINE>// If this succeeds, it will not return any data aside from a 204 status.<NEW_LINE>HttpRequest.post(url).bodyMultipartForm(form).execute().expectResponseCode(200, 204);<NEW_LINE>return new URL(response.viewUrl);<NEW_LINE>}
form.add("file", content);
105,257
private boolean handleSend(Uri uri, String mimeType) {<NEW_LINE>try {<NEW_LINE>FileInfo info = SystemServices.getFileInfoFromURI(this, uri);<NEW_LINE>if (mimeType != null)<NEW_LINE>info.type = mimeType;<NEW_LINE>if (info != null && info.path != null && ChatFileStore.exists(info.path)) {<NEW_LINE>IChatSession session = getCurrentChatSession();<NEW_LINE>if (session != null) {<NEW_LINE>if (info.type == null)<NEW_LINE>if (mimeType != null)<NEW_LINE>info.type = mimeType;<NEW_LINE>else<NEW_LINE>info.type = "application/octet-stream";<NEW_LINE>String offerId = UUID.randomUUID().toString();<NEW_LINE>session.offerData(offerId, info.path, info.type);<NEW_LINE>ChatView cView = getCurrentChatView();<NEW_LINE>int type = cView.isOtrSessionVerified() ? Imps.MessageType.OUTGOING_ENCRYPTED_VERIFIED : Imps.MessageType.OUTGOING_ENCRYPTED;<NEW_LINE>Imps.insertMessageInDb(getContentResolver(), false, session.getId(), true, null, uri.toString(), System.currentTimeMillis(), type, 0, offerId, info.type);<NEW_LINE>// sent<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Toast.makeText(this, R.string.sorry_we_cannot_share_that_file_type, <MASK><NEW_LINE>}<NEW_LINE>} catch (RemoteException e) {<NEW_LINE>Log.e(ImApp.LOG_TAG, "error sending file", e);<NEW_LINE>}<NEW_LINE>// was not sent<NEW_LINE>return false;<NEW_LINE>}
Toast.LENGTH_LONG).show();
471,363
public static int minMutation(String start, String end, String[] bank) {<NEW_LINE>if (start.equals(end))<NEW_LINE>return 0;<NEW_LINE>Set<String> <MASK><NEW_LINE>for (String b : bank) bankSet.add(b);<NEW_LINE>char[] chars = new char[] { 'A', 'C', 'G', 'T' };<NEW_LINE>int level = 0;<NEW_LINE>Set<String> visited = new HashSet<>();<NEW_LINE>Queue<String> queue = new LinkedList<>();<NEW_LINE>visited.add(start);<NEW_LINE>queue.offer(start);<NEW_LINE>while (!queue.isEmpty()) {<NEW_LINE>int size = queue.size();<NEW_LINE>while (size-- > 0) {<NEW_LINE>String cur = queue.poll();<NEW_LINE>if (cur.equals(end))<NEW_LINE>return level;<NEW_LINE>char[] charArr = cur.toCharArray();<NEW_LINE>for (int i = 0; i < charArr.length; i++) {<NEW_LINE>char old = charArr[i];<NEW_LINE>for (int c = 0; c < chars.length; c++) {<NEW_LINE>charArr[i] = chars[c];<NEW_LINE>String next = new String(charArr);<NEW_LINE>if (!visited.contains(next) && bankSet.contains(next)) {<NEW_LINE>visited.add(next);<NEW_LINE>queue.offer(next);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>charArr[i] = old;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>level++;<NEW_LINE>}<NEW_LINE>return -1;<NEW_LINE>}
bankSet = new HashSet<>();
663,908
public void completed(HttpClientCallbackResult result) {<NEW_LINE>Map<String, String> groupCache = new HashMap<String, String>();<NEW_LINE>String respStr = result.getReplyDataAsString();<NEW_LINE>respStr = respStr.substring(7, respStr.length() - 2).replaceAll("\\\\", "");<NEW_LINE>Map<String, Object> respMap = JSONHelper.toObject(respStr, Map.class);<NEW_LINE>List<Map<String, String>> respList = (List<Map<String, String>>) respMap.get("data");<NEW_LINE>for (Map<String, String> map : respList) {<NEW_LINE>String groupid = map.get("groupid");<NEW_LINE>String value = map.get("appids");<NEW_LINE>String ldapkey = map.get("ldapkey") == null ? <MASK><NEW_LINE>String key = "groupId:" + groupid + ",ldappKey:" + ldapkey;<NEW_LINE>groupCache.put(key, value);<NEW_LINE>}<NEW_LINE>cm.putHash("apphub.gui.cache", "manage.group", groupCache);<NEW_LINE>}
"" : map.get("ldapkey");
1,456,688
boolean grpc(String model_config_path) {<NEW_LINE>float[] data = { 0.0137f, -0.1136f, 0.2553f, -0.0692f, 0.0582f, -0.0727f, -0.1583f, -0.0584f, 0.6283f, 0.4919f<MASK><NEW_LINE>INDArray npdata = Nd4j.createFromArray(data);<NEW_LINE>long[] batch_shape = { 1, 13 };<NEW_LINE>INDArray batch_npdata = npdata.reshape(batch_shape);<NEW_LINE>HashMap<String, Object> feed_data = new HashMap<String, Object>() {<NEW_LINE><NEW_LINE>{<NEW_LINE>put("x", batch_npdata);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>List<String> fetch = Arrays.asList("price");<NEW_LINE>Client client = new Client();<NEW_LINE>client.setIP("127.0.0.1");<NEW_LINE>client.setPort("9393");<NEW_LINE>client.loadClientConfig(model_config_path);<NEW_LINE>client.set_use_grpc_client(true);<NEW_LINE>String result = client.predict(feed_data, fetch, true, 0);<NEW_LINE>System.out.println(result);<NEW_LINE>return true;<NEW_LINE>}
, 0.1856f, 0.0795f, -0.0332f };
1,209,923
private void updateHighlight(int curIndex) {<NEW_LINE>if (curIndex == lastIndex) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// compute region which needs repaint<NEW_LINE>TabLayoutModel tlm = getLayoutModel();<NEW_LINE>int x, y, w, h;<NEW_LINE>Rectangle repaintRect = null;<NEW_LINE>if (curIndex != -1) {<NEW_LINE>x = tlm.getX(curIndex) - 1;<NEW_LINE>y = tlm.getY(curIndex);<NEW_LINE>w = tlm.getW(curIndex) + 2;<NEW_LINE>h = tlm.getH(curIndex);<NEW_LINE>repaintRect = new Rectangle(x, y, w, h);<NEW_LINE>}<NEW_LINE>// due to model changes, lastIndex may become invalid, so check<NEW_LINE>if ((lastIndex != -1) && (lastIndex < getDataModel().size())) {<NEW_LINE>x = tlm.getX(lastIndex) - 1;<NEW_LINE>y = tlm.getY(lastIndex);<NEW_LINE>w = tlm.getW(lastIndex) + 2;<NEW_LINE><MASK><NEW_LINE>if (repaintRect != null) {<NEW_LINE>repaintRect = repaintRect.union(new Rectangle(x, y, w, h));<NEW_LINE>} else {<NEW_LINE>repaintRect = new Rectangle(x, y, w, h);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// trigger repaint if needed, update index<NEW_LINE>if (repaintRect != null) {<NEW_LINE>getDisplayer().repaint(repaintRect);<NEW_LINE>}<NEW_LINE>lastIndex = curIndex;<NEW_LINE>}
h = tlm.getH(lastIndex);
899,568
public boolean fileExists(String fileFullPath) throws Exception {<NEW_LINE>DatastoreFile file = new DatastoreFile(fileFullPath);<NEW_LINE>DatastoreFile dirFile = new DatastoreFile(file.getDatastoreName(<MASK><NEW_LINE>HostDatastoreBrowserMO browserMo = getHostDatastoreBrowserMO();<NEW_LINE>s_logger.info("Search file " + file.getFileName() + " on " + dirFile.getPath());<NEW_LINE>HostDatastoreBrowserSearchResults results = browserMo.searchDatastore(dirFile.getPath(), file.getFileName(), true);<NEW_LINE>if (results != null) {<NEW_LINE>List<FileInfo> info = results.getFile();<NEW_LINE>if (info != null && info.size() > 0) {<NEW_LINE>s_logger.info("File " + fileFullPath + " exists on datastore");<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>s_logger.info("File " + fileFullPath + " does not exist on datastore");<NEW_LINE>return false;<NEW_LINE>}
), file.getDir());
1,590,830
public void execute(int status, String response) {<NEW_LINE>super.execute(status, response);<NEW_LINE>logger.trace("Received response '{}'", response);<NEW_LINE>if (isValidRequest()) {<NEW_LINE>try {<NEW_LINE>XMLStreamReader xsr = JAXBUtils.XMLINPUTFACTORY.createXMLStreamReader(new StringReader(response));<NEW_LINE>Unmarshaller unmarshaller = JAXBUtils.JAXBCONTEXT_TEMPLATES.createUnmarshaller();<NEW_LINE>TemplateListModel model = unmarshaller.unmarshal(xsr, TemplateListModel.class).getValue();<NEW_LINE>if (model != null) {<NEW_LINE>handler.<MASK><NEW_LINE>} else {<NEW_LINE>logger.debug("no template in response");<NEW_LINE>}<NEW_LINE>} catch (UnmarshalException e) {<NEW_LINE>logger.debug("Failed to unmarshal XML document: {}", e.getMessage());<NEW_LINE>} catch (JAXBException | XMLStreamException e) {<NEW_LINE>logger.error("Exception creating Unmarshaller: {}", e.getLocalizedMessage(), e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.debug("request is invalid: {}", status);<NEW_LINE>}<NEW_LINE>}
addTemplateList(model.getTemplates());
704,014
public void downloadInProgress() {<NEW_LINE>final OsmandApplication app = getMyApplication();<NEW_LINE>if (app == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DownloadIndexesThread downloadThread = app.getDownloadThread();<NEW_LINE><MASK><NEW_LINE>if (downloadIndexItem != null) {<NEW_LINE>for (BaseBottomSheetItem item : items) {<NEW_LINE>if (item instanceof BottomSheetItemWithDescription) {<NEW_LINE>Object tag = item.getTag();<NEW_LINE>if (tag instanceof IndexItem) {<NEW_LINE>IndexItem indexItem = (IndexItem) tag;<NEW_LINE>BottomSheetItemWithDescription mapItem = (BottomSheetItemWithDescription) item;<NEW_LINE>ProgressBar progressBar = mapItem.getView().findViewById(R.id.ProgressBar);<NEW_LINE>if (downloadIndexItem.equals(indexItem)) {<NEW_LINE>progressBar.setProgress(downloadThread.getCurrentDownloadingItemProgress());<NEW_LINE>progressBar.setIndeterminate(false);<NEW_LINE>} else if (indexItem.isDownloaded()) {<NEW_LINE>AndroidUiHelper.updateVisibility(progressBar, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
IndexItem downloadIndexItem = downloadThread.getCurrentDownloadingItem();
1,157,787
/* Initializes sheet of properties. Allow subclasses to<NEW_LINE>* overwrite it.<NEW_LINE>* @return the default sheet to use<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>protected Sheet createSheet() {<NEW_LINE>Sheet s = Sheet.createDefault();<NEW_LINE>Sheet.Set ss = s.get(Sheet.PROPERTIES);<NEW_LINE>Node.Property p;<NEW_LINE>p = createNameProperty(obj);<NEW_LINE>ss.put(p);<NEW_LINE>FileObject fo = getDataObject().getPrimaryFile();<NEW_LINE>if (couldBeTemplate(fo) && fo.canWrite()) {<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>p = new PropertySupport.Reflection<Boolean>(obj, Boolean.TYPE, "isTemplate", "setTemplate");<NEW_LINE>p.setName(DataObject.PROP_TEMPLATE);<NEW_LINE>p.setDisplayName(DataObject.getString("PROP_template"));<NEW_LINE>p.setShortDescription(DataObject.getString("HINT_template"));<NEW_LINE>ss.put(p);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new InternalError();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (fo.isData()) {<NEW_LINE>if (!obj.getPrimaryFile().getNameExt().equals(obj.getName())) {<NEW_LINE>// show extension property only if name differs from getNameExt<NEW_LINE>ss.put(new ExtensionProperty());<NEW_LINE>}<NEW_LINE>ss<MASK><NEW_LINE>ss.put(new LastModifiedProperty());<NEW_LINE>}<NEW_LINE>// #120560, #188315<NEW_LINE>ss.put(new AllFilesProperty());<NEW_LINE>return s;<NEW_LINE>}
.put(new SizeProperty());
1,766,713
final ListConnectPeersResult executeListConnectPeers(ListConnectPeersRequest listConnectPeersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listConnectPeersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListConnectPeersRequest> request = null;<NEW_LINE>Response<ListConnectPeersResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListConnectPeersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listConnectPeersRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "NetworkManager");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListConnectPeers");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListConnectPeersResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListConnectPeersResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
104,971
public boolean shouldReformatPreviouslyLocatedDependentSpacing(WhiteSpace space) {<NEW_LINE>final TextRange changed = space.getTextRange();<NEW_LINE>final SortedMap<TextRange, DependantSpacingImpl> sortedHeadMap = myPreviousDependencies.tailMap(changed);<NEW_LINE>for (final Map.Entry<TextRange, DependantSpacingImpl> entry : sortedHeadMap.entrySet()) {<NEW_LINE>final TextRange textRange = entry.getKey();<NEW_LINE>if (textRange.contains(changed)) {<NEW_LINE>final <MASK><NEW_LINE>if (spacing.isDependentRegionLinefeedStatusChanged()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final boolean containedLineFeeds = spacing.getMinLineFeeds() > 0;<NEW_LINE>final boolean containsLineFeeds = myBlockRangesMap.containsLineFeeds(textRange);<NEW_LINE>if (containedLineFeeds != containsLineFeeds) {<NEW_LINE>spacing.setDependentRegionLinefeedStatusChanged();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
DependantSpacingImpl spacing = entry.getValue();
993,950
public StringBuffer print(int indent, StringBuffer output) {<NEW_LINE>printIndent(indent, output);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>output.append("<CompletionOnMethodName:");<NEW_LINE>printModifiers(this.modifiers, output);<NEW_LINE>printReturnType(0, output);<NEW_LINE>output.append(this.selector).append('(');<NEW_LINE>if (this.arguments != null) {<NEW_LINE>for (int i = 0; i < this.arguments.length; i++) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>if (i > 0)<NEW_LINE>output.append(", ");<NEW_LINE>this.arguments[i].print(0, output);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>output.append(')');<NEW_LINE>if (this.thrownExceptions != null) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>output.append(" throws ");<NEW_LINE>for (int i = 0; i < this.thrownExceptions.length; i++) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>if (i > 0)<NEW_LINE>output.append(", ");<NEW_LINE>this.thrownExceptions[i<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return output.append('>');<NEW_LINE>}
].print(0, output);
933,075
public boolean unban(String ipAddress, boolean block) {<NEW_LINE>boolean hit = false;<NEW_LINE>Object oa = decodeAddress(ipAddress);<NEW_LINE>// only support block bans for v4<NEW_LINE>if (block && oa instanceof Integer) {<NEW_LINE>int address = (Integer) oa;<NEW_LINE>long l_address = address;<NEW_LINE>if (l_address < 0) {<NEW_LINE>l_address += 0x100000000L;<NEW_LINE>}<NEW_LINE>long start = l_address & 0xffffff00;<NEW_LINE>long end = start + 256;<NEW_LINE>try {<NEW_LINE>class_mon.enter();<NEW_LINE>for (long i = start; i < end; i++) {<NEW_LINE>Integer a = <MASK><NEW_LINE>if (bannedIps_v4.remove(a) != null) {<NEW_LINE>hit = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (hit) {<NEW_LINE>saveBannedIPs();<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>class_mon.exit();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>class_mon.enter();<NEW_LINE>if (oa instanceof Integer) {<NEW_LINE>hit = bannedIps_v4.remove((Integer) oa) != null;<NEW_LINE>} else if (oa instanceof InetAddress) {<NEW_LINE>hit = bannedIps_v6.remove((InetAddress) oa) != null;<NEW_LINE>} else {<NEW_LINE>hit = bannedIps_other.remove((String) oa) != null;<NEW_LINE>}<NEW_LINE>if (hit) {<NEW_LINE>hit = true;<NEW_LINE>saveBannedIPs();<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>class_mon.exit();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (hit) {<NEW_LINE>ipFilter.banListChanged();<NEW_LINE>}<NEW_LINE>return (hit);<NEW_LINE>}
new Integer((int) i);
310,005
public List<Integer> spiralOrder(int[][] matrix) {<NEW_LINE>List<Integer> result = new ArrayList<Integer>();<NEW_LINE>if (matrix == null || matrix.length == 0) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>int rowStart = 0;<NEW_LINE>int rowEnd = matrix.length - 1;<NEW_LINE>int colStart = 0;<NEW_LINE>int colEnd = matrix[0].length - 1;<NEW_LINE>while (rowStart <= rowEnd && colStart <= colEnd) {<NEW_LINE>for (int i = colStart; i <= colEnd; i++) {<NEW_LINE>result.add(matrix[rowStart][i]);<NEW_LINE>}<NEW_LINE>rowStart++;<NEW_LINE>for (int i = rowStart; i <= rowEnd; i++) {<NEW_LINE>result.add(matrix[i][colEnd]);<NEW_LINE>}<NEW_LINE>colEnd--;<NEW_LINE>if (rowStart <= rowEnd) {<NEW_LINE>for (int i = colEnd; i >= colStart; i--) {<NEW_LINE>result.add(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>rowEnd--;<NEW_LINE>if (colStart <= colEnd) {<NEW_LINE>for (int i = rowEnd; i >= rowStart; i--) {<NEW_LINE>result.add(matrix[i][colStart]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>colStart++;<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
matrix[rowEnd][i]);
1,243,735
public com.squareup.okhttp.Call schemaWebsocketHelpCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/schema/websocketHelp";<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>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json", "application/xml", "text/xml", "application/javascript", "text/javascript" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null)<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>final String[] localVarContentTypes = { "application/json", "application/x-www-form-urlencoded" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>if (progressListener != null) {<NEW_LINE>apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {<NEW_LINE>com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());<NEW_LINE>return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body()<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);<NEW_LINE>}
, progressListener)).build();
984,309
static // [START securitycenter_list_findings_with_security_marks]<NEW_LINE>ImmutableList<ListFindingsResult> listFindingsWithQueryMarks(SourceName sourceName) {<NEW_LINE>try (SecurityCenterClient client = SecurityCenterClient.create()) {<NEW_LINE>// Start setting up a request for to list all findings filtered by a specific security mark.<NEW_LINE>// SourceName sourceName = SourceName.of(/*organization=*/"123234324",/*source=*/<NEW_LINE>// "423432321");<NEW_LINE>String filter = "NOT security_marks.marks.key_a=\"value_a\"";<NEW_LINE>ListFindingsRequest.Builder request = ListFindingsRequest.newBuilder().setParent(sourceName.toString()).setFilter(filter);<NEW_LINE>// Call the API.<NEW_LINE>ListFindingsPagedResponse response = client.listFindings(request.build());<NEW_LINE>// This creates one list for all findings in the filter.If your organization has a large<NEW_LINE>// number of<NEW_LINE>// findings this can cause out of memory issues. You can process them batches by returning<NEW_LINE>// the Iterable returned response.iterateAll() directly.<NEW_LINE>ImmutableList<ListFindingsResult> results = ImmutableList.copyOf(response.iterateAll());<NEW_LINE><MASK><NEW_LINE>System.out.println(results);<NEW_LINE>return results;<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException("Couldn't create client.", e);<NEW_LINE>}<NEW_LINE>}
System.out.println("Findings with security mark - key_a=value_a:");
1,091,765
protected List<Example<Label>> generate() {<NEW_LINE>List<Example<Label>> list = new ArrayList<>();<NEW_LINE>for (int i = 0; i < numSamples / 2; i++) {<NEW_LINE>double[] values = new double[2];<NEW_LINE>double u = rng.nextDouble();<NEW_LINE>values[0] = Math.cos(Math.PI * u) + rng.nextGaussian() * variance;<NEW_LINE>values[1] = Math.sin(Math.PI * u) + rng.nextGaussian() * variance;<NEW_LINE>list.add(new ArrayExample<>(FIRST_CLASS, FEATURE_NAMES, values));<NEW_LINE>}<NEW_LINE>for (int i = numSamples / 2; i < numSamples; i++) {<NEW_LINE>double[] values = new double[2];<NEW_LINE>double u = rng.nextDouble();<NEW_LINE>values[0] = (1 - Math.cos(Math.PI * u)) <MASK><NEW_LINE>values[1] = (0.5 - Math.sin(Math.PI * u)) + rng.nextGaussian() * variance;<NEW_LINE>list.add(new ArrayExample<>(SECOND_CLASS, FEATURE_NAMES, values));<NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>}
+ rng.nextGaussian() * variance;
387,518
public static CalendarInterval fromDayTimeString(String s) throws IllegalArgumentException {<NEW_LINE>CalendarInterval result = null;<NEW_LINE>if (s == null) {<NEW_LINE>throw new IllegalArgumentException("Interval day-time string was null");<NEW_LINE>}<NEW_LINE>s = s.trim();<NEW_LINE>Matcher m = dayTimePattern.matcher(s);<NEW_LINE>if (!m.matches()) {<NEW_LINE>throw new IllegalArgumentException("Interval string does not match day-time format of 'd h:m:s.n': " + s);<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>int sign = m.group(1) != null && m.group(1).equals("-") ? -1 : 1;<NEW_LINE>long days = toLongWithRange("day", m.group(2), 0, Integer.MAX_VALUE);<NEW_LINE>long hours = toLongWithRange("hour", m.group(3), 0, 23);<NEW_LINE>long minutes = toLongWithRange("minute", m.group(4), 0, 59);<NEW_LINE>long seconds = toLongWithRange("second", m.group(5), 0, 59);<NEW_LINE>// Hive allow nanosecond precision interval<NEW_LINE>long nanos = toLongWithRange("nanosecond", m.group<MASK><NEW_LINE>result = new CalendarInterval(0, sign * (days * MICROS_PER_DAY + hours * MICROS_PER_HOUR + minutes * MICROS_PER_MINUTE + seconds * MICROS_PER_SECOND + nanos / 1000L));<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IllegalArgumentException("Error parsing interval day-time string: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
(7), 0L, 999999999L);
881,641
public void run() {<NEW_LINE>super.run();<NEW_LINE>Looper.prepare();<NEW_LINE>String errorinfo = getErrorInfo(arg1);<NEW_LINE>String[] ss = errorinfo.split("\n\t");<NEW_LINE>String headstring = ss[0] + "\n\t" + ss[1] + "\n\t" + ss[2];<NEW_LINE>if (headstring.length() > 255) {<NEW_LINE>headstring = headstring.substring(0, 255) + "\n\t";<NEW_LINE>} else {<NEW_LINE>headstring = headstring + "\n\t";<NEW_LINE>}<NEW_LINE>stacktrace = headstring + errorinfo;<NEW_LINE>activities = CommonUtil.getActivityName(context);<NEW_LINE>time = DeviceInfo.getDeviceTime();<NEW_LINE>appkey = AppInfo.getAppKey(context);<NEW_LINE>os_version = DeviceInfo.getOsVersion();<NEW_LINE>JSONObject errorInfo = getErrorInfoJSONString(context);<NEW_LINE>CobubLog.i(UmsConstants.LOG_TAG, MyCrashHandler.class, errorinfo);<NEW_LINE>CommonUtil.<MASK><NEW_LINE>android.os.Process.killProcess(android.os.Process.myPid());<NEW_LINE>Looper.loop();<NEW_LINE>}
saveInfoToFile("errorInfo", errorInfo, context);
559,592
public void afterAnalysis(AfterAnalysisAccess access) {<NEW_LINE>FeatureImpl.AfterAnalysisAccessImpl accessImpl = (FeatureImpl.AfterAnalysisAccessImpl) access;<NEW_LINE>AnalysisUniverse universe = accessImpl.getUniverse();<NEW_LINE>Stream<Module> analysisReachableModules = universe.getTypes().stream().filter(t -> t.isReachable() && !t.isArray()).map(t -> t.getJavaClass().getModule()).distinct();<NEW_LINE>Set<Module> analysisReachableNamedModules = analysisReachableModules.filter(Module::isNamed).collect(Collectors.toSet());<NEW_LINE>Set<String> extraModules = new HashSet<>();<NEW_LINE>extraModules.addAll(ImageSingletons.lookup(ResourcesFeature.class).includedResourcesModules);<NEW_LINE>String explicitlyAddedModules = System.<MASK><NEW_LINE>if (!explicitlyAddedModules.isEmpty()) {<NEW_LINE>extraModules.addAll(Arrays.asList(SubstrateUtil.split(explicitlyAddedModules, ",")));<NEW_LINE>}<NEW_LINE>extraModules.forEach(moduleName -> {<NEW_LINE>Optional<?> module = accessImpl.imageClassLoader.findModule(moduleName);<NEW_LINE>if (module.isEmpty()) {<NEW_LINE>VMError.shouldNotReachHere("Explicitly required module " + moduleName + " is not available");<NEW_LINE>}<NEW_LINE>analysisReachableNamedModules.add((Module) module.get());<NEW_LINE>});<NEW_LINE>Set<Module> analysisReachableSyntheticModules = analysisReachableNamedModules.stream().filter(ModuleLayerFeature::isModuleSynthetic).collect(Collectors.toSet());<NEW_LINE>Set<String> allReachableModules = analysisReachableNamedModules.stream().flatMap(ModuleLayerFeature::extractRequiredModuleNames).collect(Collectors.toSet());<NEW_LINE>ModuleLayer runtimeBootLayer = synthesizeRuntimeBootLayer(accessImpl.imageClassLoader, allReachableModules, analysisReachableSyntheticModules);<NEW_LINE>BootModuleLayerSupport.instance().setBootLayer(runtimeBootLayer);<NEW_LINE>replicateVisibilityModifications(runtimeBootLayer, accessImpl.imageClassLoader, analysisReachableNamedModules);<NEW_LINE>}
getProperty(ModuleSupport.PROPERTY_IMAGE_EXPLICITLY_ADDED_MODULES, "");
294,273
protected int doWork() {<NEW_LINE>final ProgressLogger progress = new ProgressLogger(LOG, 10000);<NEW_LINE>IOUtil.assertFileIsReadable(INPUT);<NEW_LINE>IOUtil.assertFileIsWritable(OUTPUT);<NEW_LINE>final VCFFileReader reader = new VCFFileReader(INPUT, REQUIRE_INDEX);<NEW_LINE>final VCFHeader header = new VCFHeader(reader.getFileHeader());<NEW_LINE>final SAMSequenceDictionary sequenceDictionary = header.getSequenceDictionary();<NEW_LINE>if (CREATE_INDEX && sequenceDictionary == null) {<NEW_LINE>throw new PicardException("A sequence dictionary must be available in the input file when creating indexed output.");<NEW_LINE>}<NEW_LINE>final VariantContextWriterBuilder builder = new VariantContextWriterBuilder().setOutputFile<MASK><NEW_LINE>if (CREATE_INDEX)<NEW_LINE>builder.setOption(Options.INDEX_ON_THE_FLY);<NEW_LINE>else<NEW_LINE>builder.unsetOption(Options.INDEX_ON_THE_FLY);<NEW_LINE>final VariantContextWriter writer = builder.build();<NEW_LINE>writer.writeHeader(header);<NEW_LINE>final CloseableIterator<VariantContext> iterator = reader.iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>final VariantContext context = iterator.next();<NEW_LINE>writer.add(context);<NEW_LINE>progress.record(context.getContig(), context.getStart());<NEW_LINE>}<NEW_LINE>CloserUtil.close(iterator);<NEW_LINE>CloserUtil.close(reader);<NEW_LINE>writer.close();<NEW_LINE>return 0;<NEW_LINE>}
(OUTPUT).setReferenceDictionary(sequenceDictionary);
105,091
public SortField sortField(Object missingValue, MultiValueMode sortMode, Nested nested, boolean reverse) {<NEW_LINE>final XFieldComparatorSource source;<NEW_LINE>switch(numericType) {<NEW_LINE>case HALF_FLOAT:<NEW_LINE>case FLOAT:<NEW_LINE>source = new FloatValuesComparatorSource(this, missingValue, sortMode, nested);<NEW_LINE>break;<NEW_LINE>case DOUBLE:<NEW_LINE>source = new DoubleValuesComparatorSource(this, missingValue, sortMode, nested);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>assert !numericType.isFloatingPoint();<NEW_LINE>source = new LongValuesComparatorSource(this, missingValue, sortMode, nested);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (nested != null || (sortMode != MultiValueMode.MAX && sortMode != MultiValueMode.MIN) || numericType == NumericType.HALF_FLOAT) {<NEW_LINE>return new SortField(fieldName, source, reverse);<NEW_LINE>}<NEW_LINE>final SortField sortField;<NEW_LINE>final SortedNumericSelector.Type selectorType = sortMode == MultiValueMode.MAX ? SortedNumericSelector.Type.MAX : SortedNumericSelector.Type.MIN;<NEW_LINE>switch(numericType) {<NEW_LINE>case FLOAT:<NEW_LINE>sortField = new SortedNumericSortField(fieldName, SortField.Type.FLOAT, reverse, selectorType);<NEW_LINE>break;<NEW_LINE>case DOUBLE:<NEW_LINE>sortField = new SortedNumericSortField(fieldName, SortField.Type.DOUBLE, reverse, selectorType);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>assert !numericType.isFloatingPoint();<NEW_LINE>sortField = new SortedNumericSortField(fieldName, SortField.Type.LONG, reverse, selectorType);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>sortField.setMissingValue(source<MASK><NEW_LINE>return sortField;<NEW_LINE>}
.missingObject(missingValue, reverse));
1,800,527
public static BigDecimal numberToBigDecimal(@Nonnull Number number) {<NEW_LINE>BigDecimal bigDecimal = null;<NEW_LINE>if (number instanceof BigDecimal)<NEW_LINE>bigDecimal = (BigDecimal) number;<NEW_LINE>else {<NEW_LINE>if (!(number instanceof BigInteger) && !(number instanceof Byte) && !(number instanceof Short) && !(number instanceof Integer) && !(number instanceof Long))<NEW_LINE>throw new ClassCastException(number.getClass().getName());<NEW_LINE>if (number.intValue() == 0)<NEW_LINE>bigDecimal = BigDecimal.ZERO;<NEW_LINE>else if (number.intValue() == 1)<NEW_LINE>bigDecimal = BigDecimal.ONE;<NEW_LINE>else if (number.intValue() == 10)<NEW_LINE>bigDecimal = BigDecimal.TEN;<NEW_LINE>else if (number instanceof BigInteger)<NEW_LINE>bigDecimal = <MASK><NEW_LINE>else if (number instanceof Byte)<NEW_LINE>bigDecimal = new BigDecimal(number.byteValue());<NEW_LINE>else if (number instanceof Short)<NEW_LINE>bigDecimal = new BigDecimal(number.shortValue());<NEW_LINE>else if (number instanceof Integer)<NEW_LINE>bigDecimal = new BigDecimal(number.intValue());<NEW_LINE>else if (number instanceof Long)<NEW_LINE>bigDecimal = new BigDecimal(number.longValue());<NEW_LINE>}<NEW_LINE>return bigDecimal;<NEW_LINE>}
new BigDecimal((BigInteger) number);
544,832
static CodegenMethod generateOrderKeyCodegen(String methodName, OrderByElementForge[] orderBy, CodegenClassScope classScope, CodegenNamedMethods namedMethods) {<NEW_LINE>Consumer<CodegenMethod> code = methodNode -> {<NEW_LINE>if (orderBy.length == 1) {<NEW_LINE>CodegenMethod expression = CodegenLegoMethodExpression.codegenExpression(orderBy[0].getExprNode().<MASK><NEW_LINE>methodNode.getBlock().methodReturn(localMethod(expression, EnumForgeCodegenNames.REF_EPS, REF_ISNEWDATA, REF_EXPREVALCONTEXT));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>methodNode.getBlock().declareVar(EPTypePremade.OBJECTARRAY.getEPType(), "keys", newArrayByLength(EPTypePremade.OBJECT.getEPType(), constant(orderBy.length)));<NEW_LINE>for (int i = 0; i < orderBy.length; i++) {<NEW_LINE>CodegenMethod expression = CodegenLegoMethodExpression.codegenExpression(orderBy[i].getExprNode().getForge(), methodNode, classScope);<NEW_LINE>methodNode.getBlock().assignArrayElement("keys", constant(i), localMethod(expression, EnumForgeCodegenNames.REF_EPS, REF_ISNEWDATA, REF_EXPREVALCONTEXT));<NEW_LINE>}<NEW_LINE>methodNode.getBlock().methodReturn(newInstance(HashableMultiKey.EPTYPE, ref("keys")));<NEW_LINE>};<NEW_LINE>return namedMethods.addMethod(EPTypePremade.OBJECT.getEPType(), methodName, CodegenNamedParam.from(EventBean.EPTYPEARRAY, NAME_EPS, EPTypePremade.BOOLEANPRIMITIVE.getEPType(), NAME_ISNEWDATA, ExprEvaluatorContext.EPTYPE, NAME_EXPREVALCONTEXT), ResultSetProcessorUtil.class, classScope, code);<NEW_LINE>}
getForge(), methodNode, classScope);
1,646,393
protected void configure() {<NEW_LINE>bind(new TypeLiteral<Amount<Long, Time>>() {<NEW_LINE>}).annotatedWith(ReservationDuration.class).toInstance(DELAY_FOREVER);<NEW_LINE>bind(TaskIdGenerator.class).<MASK><NEW_LINE>bind(new TypeLiteral<Amount<Long, Time>>() {<NEW_LINE>}).annotatedWith(OfferManagerModule.UnavailabilityThreshold.class).toInstance(Amount.of(1L, Time.MINUTES));<NEW_LINE>bind(UpdateAgentReserver.class).to(UpdateAgentReserver.NullAgentReserver.class);<NEW_LINE>bind(UpdateAgentReserver.NullAgentReserver.class).in(Singleton.class);<NEW_LINE>bind(SchedulingFilter.class).to(SchedulingFilterImpl.class);<NEW_LINE>bind(SchedulingFilterImpl.class).in(Singleton.class);<NEW_LINE>bind(ExecutorSettings.class).toInstance(TestExecutorSettings.THERMOS_EXECUTOR);<NEW_LINE>bind(Storage.class).toInstance(storage);<NEW_LINE>bind(Driver.class).toInstance(new FakeDriver());<NEW_LINE>bind(RescheduleCalculator.class).toInstance(new FakeRescheduleCalculator());<NEW_LINE>bind(Clock.class).toInstance(clock);<NEW_LINE>bind(StatsProvider.class).toInstance(new FakeStatsProvider());<NEW_LINE>bind(EventSink.class).toInstance(eventBus::post);<NEW_LINE>bind(IServerInfo.class).toInstance(IServerInfo.build(new ServerInfo("jmh", "")));<NEW_LINE>}
to(TaskIdGenerator.TaskIdGeneratorImpl.class);
127,469
public static int[] dfs(Graph graph) {<NEW_LINE>int[] result = new int[graph.size()];<NEW_LINE>int[] state = new int[graph.size()];<NEW_LINE>int[] stack = new int[graph.size() * 2];<NEW_LINE>int top = 0;<NEW_LINE>stack[top++] = 0;<NEW_LINE>int index = graph.size();<NEW_LINE>while (top > 0) {<NEW_LINE><MASK><NEW_LINE>switch(state[node]) {<NEW_LINE>case 0:<NEW_LINE>state[node] = 1;<NEW_LINE>stack[top++] = node;<NEW_LINE>for (int successor : graph.outgoingEdges(node)) {<NEW_LINE>if (state[successor] == 0) {<NEW_LINE>stack[top++] = successor;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>result[node] = --index;<NEW_LINE>state[node] = 2;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
int node = stack[--top];
1,609,985
private void dumpNspFile(long size) throws Exception {<NEW_LINE>FileOutputStream fos = new FileOutputStream(nspFile.getFile(), true);<NEW_LINE>long nspSize = nspFile.getFullSize();<NEW_LINE>try (BufferedOutputStream bos = new BufferedOutputStream(fos)) {<NEW_LINE>long nspRemainingSize = nspFile.getNspRemainingSize();<NEW_LINE>FileDescriptor fd = fos.getFD();<NEW_LINE>byte[] readBuffer;<NEW_LINE>long received = 0;<NEW_LINE>int bufferSize;<NEW_LINE>while (received + NXDT_FILE_CHUNK_SIZE < size) {<NEW_LINE>// readBuffer = readUsbFile();<NEW_LINE>readBuffer = readUsbFileDebug(NXDT_FILE_CHUNK_SIZE);<NEW_LINE>bos.write(readBuffer);<NEW_LINE>if (isWindows10)<NEW_LINE>fd.sync();<NEW_LINE>bufferSize = readBuffer.length;<NEW_LINE>received += bufferSize;<NEW_LINE>nspRemainingSize -= bufferSize;<NEW_LINE>logPrinter.updateProgress((double) (nspSize - <MASK><NEW_LINE>}<NEW_LINE>int lastChunkSize = (int) (size - received) + 1;<NEW_LINE>readBuffer = readUsbFileDebug(lastChunkSize);<NEW_LINE>bos.write(readBuffer);<NEW_LINE>if (isWindows10)<NEW_LINE>fd.sync();<NEW_LINE>nspRemainingSize -= (lastChunkSize - 1);<NEW_LINE>nspFile.setNspRemainingSize(nspRemainingSize);<NEW_LINE>}<NEW_LINE>}
nspRemainingSize) / (double) nspSize);
1,196,101
private static void readFamily(XmlPullParser parser, ArrayList<FontConfig> fontList) throws XmlPullParserException, IOException {<NEW_LINE>String name = parser.getAttributeValue(null, "name");<NEW_LINE>String lang = parser.getAttributeValue(null, "lang");<NEW_LINE>ArrayList<FontConfig> <MASK><NEW_LINE>while (parser.next() != XmlPullParser.END_TAG) {<NEW_LINE>if (parser.getEventType() != XmlPullParser.START_TAG) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String tag = parser.getName();<NEW_LINE>if (tag.equals("font")) {<NEW_LINE>fonts.add(readFont(parser));<NEW_LINE>} else {<NEW_LINE>skip(parser);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (fonts.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FontConfig regularFont = null;<NEW_LINE>for (FontConfig font : fonts) {<NEW_LINE>if (font.weight == 400) {<NEW_LINE>regularFont = font;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (regularFont == null) {<NEW_LINE>regularFont = fonts.get(0);<NEW_LINE>}<NEW_LINE>if (!regularFont.fileName.isEmpty()) {<NEW_LINE>regularFont.language = lang == null ? "" : lang;<NEW_LINE>fontList.add(regularFont);<NEW_LINE>}<NEW_LINE>}
fonts = new ArrayList<>();
64,043
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.setImmediate8((byte) decoder.readByte());<NEW_LINE>} else if (operandSize == OpSize.SIZE64) {<NEW_LINE>instruction.setOp2Kind(OpKind.IMMEDIATE8TO64);<NEW_LINE>instruction.setImmediate8((byte) decoder.readByte());<NEW_LINE>} else {<NEW_LINE>instruction.setOp2Kind(OpKind.IMMEDIATE8TO16);<NEW_LINE>instruction.setImmediate8((byte) decoder.readByte());<NEW_LINE>}<NEW_LINE>}
instruction.setOp2Kind(OpKind.IMMEDIATE8TO32);
8,802
public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>checkTableClass_result result = new checkTableClass_result();<NEW_LINE>if (e instanceof ThriftSecurityException) {<NEW_LINE>result.sec = (ThriftSecurityException) e;<NEW_LINE>result.setSecIsSet(true);<NEW_LINE>msg = result;<NEW_LINE>} else if (e instanceof ThriftTableOperationException) {<NEW_LINE>result.tope = (ThriftTableOperationException) e;<NEW_LINE>result.setTopeIsSet(true);<NEW_LINE>msg = result;<NEW_LINE>} else if (e instanceof org.apache.thrift.transport.TTransportException) {<NEW_LINE>_LOGGER.error("TTransportException inside handler", e);<NEW_LINE>fb.close();<NEW_LINE>return;<NEW_LINE>} else if (e instanceof org.apache.thrift.TApplicationException) {<NEW_LINE>_LOGGER.error("TApplicationException inside handler", e);<NEW_LINE>msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;<NEW_LINE>msg = (org.apache.thrift.TApplicationException) e;<NEW_LINE>} else {<NEW_LINE>_LOGGER.error("Exception inside handler", e);<NEW_LINE>msgType = org.apache<MASK><NEW_LINE>msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>fcall.sendResponse(fb, msg, msgType, seqid);<NEW_LINE>} catch (java.lang.Exception ex) {<NEW_LINE>_LOGGER.error("Exception writing to internal frame buffer", ex);<NEW_LINE>fb.close();<NEW_LINE>}<NEW_LINE>}
.thrift.protocol.TMessageType.EXCEPTION;
1,324,383
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<TagResourceRequest> request = null;<NEW_LINE>Response<TagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "CodePipeline");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<TagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new TagResourceResultJsonUnmarshaller());
1,238,236
public StartChatContactResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>StartChatContactResult startChatContactResult = new StartChatContactResult();<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 startChatContactResult;<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("ContactId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>startChatContactResult.setContactId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("ParticipantId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>startChatContactResult.setParticipantId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("ParticipantToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>startChatContactResult.setParticipantToken(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 startChatContactResult;<NEW_LINE>}
class).unmarshall(context));
1,604,779
private static // The code below (versions 4+) looks only for fields known to the implementation.<NEW_LINE>List<RegisterResponseEntry> reconstructSchemasList(List<Object> objectsList) {<NEW_LINE>List<RegisterResponseEntry> schemasList = new ArrayList<RegisterResponseEntry>();<NEW_LINE>for (Object obj : objectsList) {<NEW_LINE>// ObjectMapper encodes plain Object as LinkedHashMap (currently); must construct RRE manually<NEW_LINE>boolean ok = false;<NEW_LINE>if (obj instanceof Map) {<NEW_LINE>// just map<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Map<String, Object> map = (<MASK><NEW_LINE>if (map.containsKey("id") && map.containsKey("version") && map.containsKey("schema")) {<NEW_LINE>schemasList.add(new RegisterResponseEntry((Integer) map.get("id"), ((Integer) map.get("version")).shortValue(), (String) map.get("schema")));<NEW_LINE>ok = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!ok) {<NEW_LINE>throw new RuntimeException("/register response v4 schemas deserialization error: object type = " + obj.getClass().getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return schemasList;<NEW_LINE>}
Map<String, Object>) obj;
150,911
final DBCluster executeStartDBCluster(StartDBClusterRequest startDBClusterRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startDBClusterRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StartDBClusterRequest> request = null;<NEW_LINE>Response<DBCluster> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StartDBClusterRequestMarshaller().marshall(super.beforeMarshalling(startDBClusterRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Neptune");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartDBCluster");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>StaxResponseHandler<DBCluster> responseHandler = new StaxResponseHandler<DBCluster>(new DBClusterStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,631,155
protected void updateCellHorizontalSelection(int delta, Runnable defaultAction) {<NEW_LINE>TableViewSpanSelectionModel sm = (TableViewSpanSelectionModel) getSelectionModel();<NEW_LINE>if (sm == null || sm.getSelectionMode() == SelectionMode.SINGLE) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TableFocusModel fm = getFocusModel();<NEW_LINE>if (fm == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final TablePositionBase focusedCell = getFocusedCell();<NEW_LINE>if (focusedCell == null || focusedCell.getTableColumn() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TableColumnBase adjacentColumn = getColumn(<MASK><NEW_LINE>if (adjacentColumn == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int focusedCellRow = focusedCell.getRow();<NEW_LINE>if (isShiftDown && getAnchor() != null) {<NEW_LINE>final SpreadsheetCell cell = (SpreadsheetCell) focusedCell.getTableColumn().getCellData(focusedCell.getRow());<NEW_LINE>sm.direction = new Pair<>(0, delta);<NEW_LINE>// = columnCell + delta;<NEW_LINE>final int newColumn;<NEW_LINE>if (delta < 0) {<NEW_LINE>newColumn = skin.spreadsheetView.getViewColumn(cell.getColumn()) + delta;<NEW_LINE>} else {<NEW_LINE>newColumn = skin.spreadsheetView.getViewColumn(cell.getColumn()) + skin.spreadsheetView.getColumnSpan(cell) - 1 + delta;<NEW_LINE>}<NEW_LINE>final TablePositionBase<?> anchor = getAnchor();<NEW_LINE>int minRow = Math.min(anchor.getRow(), focusedCellRow);<NEW_LINE>int maxRow = Math.max(anchor.getRow(), focusedCellRow);<NEW_LINE>int minColumn = Math.min(anchor.getColumn(), newColumn);<NEW_LINE>int maxColumn = Math.max(anchor.getColumn(), newColumn);<NEW_LINE>sm.clearSelection();<NEW_LINE>if (minColumn != -1 && maxColumn != -1) {<NEW_LINE>sm.selectRange(minRow, getNode().getVisibleLeafColumn(minColumn), maxRow, getNode().getVisibleLeafColumn(maxColumn));<NEW_LINE>}<NEW_LINE>fm.focus(focusedCell.getRow(), getColumn(newColumn));<NEW_LINE>} else {<NEW_LINE>defaultAction.run();<NEW_LINE>}<NEW_LINE>}
focusedCell.getTableColumn(), delta);
215,548
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bltz");<NEW_LINE>final List<? extends IOperandTree> operands = instruction.getOperands();<NEW_LINE>final String rs = operands.get(0).getRootNode().getChildren().get(0).getValue();<NEW_LINE>final IOperandTreeNode target = operands.get(1).getRootNode().getChildren().get(0);<NEW_LINE>final long baseOffset = ReilHelpers.toReilAddress(instruction.getAddress()).toLong();<NEW_LINE>long offset = baseOffset;<NEW_LINE>final OperandSize dw = OperandSize.DWORD;<NEW_LINE>final String isolatedSign = environment.getNextVariableString();<NEW_LINE>instructions.add(ReilHelpers.createAnd(offset++, dw, rs, dw, String.valueOf(<MASK><NEW_LINE>Helpers.generateDelayBranch(instructions, offset, dw, isolatedSign, dw, target);<NEW_LINE>}
0x80000000L), dw, isolatedSign));
414,276
public void decrementDispatchQueueRefCount() {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "decrementDispatchQueueRefCount");<NEW_LINE>--dispatchQueueReferenceCount;<NEW_LINE>if (dispatchQueueReferenceCount < 0) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "dispatchQueueReferneceCount=" + dispatchQueueReferenceCount);<NEW_LINE>// D226223<NEW_LINE>throw new SIErrorException(nls.getFormattedMessage("CONVERSATIONIMPL_INTERNAL_SICJ0046", null, "CONVERSATIONIMPL_INTERNAL_SICJ0046"));<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "dispatchQueueReferenceCount = " + Integer.valueOf(dispatchQueueReferenceCount));<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.<MASK><NEW_LINE>}
exit(this, tc, "decrementDispatchQueueRefCount");
1,677,780
protected List<? extends JComponent> createPreviewElements() {<NEW_LINE>final JButton basic = new JButton();<NEW_LINE>basic.putClientProperty(StyleId.STYLE_PROPERTY, getStyleId());<NEW_LINE>UILanguageManager.registerComponent(basic, getExampleLanguageKey("styled.text.basic"));<NEW_LINE>final JButton group1 = new JButton();<NEW_LINE>group1.putClientProperty(StyleId.STYLE_PROPERTY, getStyleId());<NEW_LINE>UILanguageManager.registerComponent(group1, getExampleLanguageKey("styled.text.group1"));<NEW_LINE>final JButton group2 = new JButton();<NEW_LINE>group2.putClientProperty(StyleId.STYLE_PROPERTY, getStyleId());<NEW_LINE>UILanguageManager.registerComponent<MASK><NEW_LINE>final JButton group3 = new JButton();<NEW_LINE>group3.putClientProperty(StyleId.STYLE_PROPERTY, getStyleId());<NEW_LINE>UILanguageManager.registerComponent(group3, getExampleLanguageKey("styled.text.group3"));<NEW_LINE>final JButton icon = new JButton(WebLookAndFeel.getIcon(16));<NEW_LINE>icon.putClientProperty(StyleId.STYLE_PROPERTY, getStyleId());<NEW_LINE>UILanguageManager.registerComponent(icon, getExampleLanguageKey("styled.text.icon"));<NEW_LINE>return CollectionUtils.asList(basic, new GroupPane(group1, group2, group3), icon);<NEW_LINE>}
(group2, getExampleLanguageKey("styled.text.group2"));
180,965
ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String appInfoFlag) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = null;<NEW_LINE>Cache.CacheKey cacheKey = new Cache.CacheKey(this.getClass(), flag, appInfoFlag);<NEW_LINE>Optional<?> optional = CacheManager.get(cacheCategory, cacheKey);<NEW_LINE>if (optional.isPresent()) {<NEW_LINE>wo = ((Wo) optional.get());<NEW_LINE>} else {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>AppInfo appInfo = business.getAppInfoFactory().pick(appInfoFlag);<NEW_LINE>if (null == appInfo) {<NEW_LINE>throw new ExceptionEntityNotExist(appInfoFlag, AppInfo.class);<NEW_LINE>}<NEW_LINE>String id = this.get(business, appInfo, flag);<NEW_LINE>if (StringUtils.isEmpty(id)) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>File file = business.fileFactory().pick(id);<NEW_LINE>byte[] bs = new byte[] {};<NEW_LINE>if (StringUtils.isNotEmpty(file.getData())) {<NEW_LINE>bs = Base64.decodeBase64(file.getData());<NEW_LINE>}<NEW_LINE>wo = new Wo(bs, this.contentType(true, file.getFileName()), this.contentDisposition(true, file.getFileName()));<NEW_LINE>CacheManager.put(cacheCategory, cacheKey, wo);<NEW_LINE>}<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
ExceptionEntityNotExist(flag, File.class);
648,844
void cachePackage(String packageName, String module) {<NEW_LINE>packageName = packageName.intern();<NEW_LINE>module = module.intern();<NEW_LINE>packageName = packageName.replace('.', '/');<NEW_LINE>Object current = this.packageToModule.get(packageName);<NEW_LINE>if (current == null) {<NEW_LINE>this.packageToModule.put(packageName, module);<NEW_LINE>} else if (current == module || current.equals(module)) {<NEW_LINE>return;<NEW_LINE>} else if (current == JRTUtil.MULTIPLE) {<NEW_LINE>List<String> list = this.packageToModules.get(packageName);<NEW_LINE>if (!list.contains(module)) {<NEW_LINE>if (JRTUtil.JAVA_BASE == module || JRTUtil.JAVA_BASE.equals(module)) {<NEW_LINE>list.<MASK><NEW_LINE>} else {<NEW_LINE>list.add(module);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String first = (String) current;<NEW_LINE>this.packageToModule.put(packageName, JRTUtil.MULTIPLE);<NEW_LINE>List<String> list = new ArrayList<String>();<NEW_LINE>// Just do this as comparator might be overkill<NEW_LINE>if (JRTUtil.JAVA_BASE == current || JRTUtil.JAVA_BASE.equals(current)) {<NEW_LINE>list.add(first);<NEW_LINE>list.add(module);<NEW_LINE>} else {<NEW_LINE>list.add(module);<NEW_LINE>list.add(first);<NEW_LINE>}<NEW_LINE>this.packageToModules.put(packageName, list);<NEW_LINE>}<NEW_LINE>}
add(0, JRTUtil.JAVA_BASE);
131,668
private void wrapWithTraceOnReturn(CodeExecutableElement method) {<NEW_LINE>if (node.isGenerateTraceOnReturn()) {<NEW_LINE>CodeTypeElement enclosingClass = (CodeTypeElement) method.getEnclosingElement();<NEW_LINE>CodeExecutableElement traceMethod = CodeExecutableElement.cloneNoAnnotations(method);<NEW_LINE>method.setSimpleName(CodeNames.of(method.getSimpleName()<MASK><NEW_LINE>method.setVisibility(PRIVATE);<NEW_LINE>CodeTreeBuilder builder = CodeTreeBuilder.createBuilder();<NEW_LINE>builder.startCall(method.getSimpleName().toString());<NEW_LINE>for (VariableElement param : traceMethod.getParameters()) {<NEW_LINE>builder.string(param.getSimpleName().toString());<NEW_LINE>}<NEW_LINE>builder.end();<NEW_LINE>CodeTree initExpression = builder.build();<NEW_LINE>builder = traceMethod.createBuilder();<NEW_LINE>if (isVoid(method.getReturnType())) {<NEW_LINE>builder.startStatement().tree(initExpression).end();<NEW_LINE>builder.startIf().startCall("isTracingEnabled").end(2);<NEW_LINE>builder.startBlock().startStatement().startCall("traceOnReturn").string("null").end(3);<NEW_LINE>} else {<NEW_LINE>builder.declaration(method.getReturnType(), "traceValue", initExpression);<NEW_LINE>builder.startIf().startCall("isTracingEnabled").end(2);<NEW_LINE>builder.startBlock().startStatement().startCall("traceOnReturn").string("traceValue").end(3);<NEW_LINE>builder.startReturn().string("traceValue").end();<NEW_LINE>}<NEW_LINE>enclosingClass.add(traceMethod);<NEW_LINE>}<NEW_LINE>}
.toString() + "Traced"));
651,118
public void controlResized(ControlEvent e) {<NEW_LINE>Rectangle area = comp.getClientArea();<NEW_LINE>Point size = tref.computeSize(SWT.DEFAULT, SWT.DEFAULT);<NEW_LINE>ScrollBar vBar = tref.getVerticalBar();<NEW_LINE>int width = area.width - tref.computeTrim(0, 0, 0, 0).width - 2;<NEW_LINE>if (size.y > area.height + tref.getHeaderHeight()) {<NEW_LINE>Point vBarSize = vBar.getSize();<NEW_LINE>width -= vBarSize.x;<NEW_LINE>}<NEW_LINE>Point oldSize = tref.getSize();<NEW_LINE>if (oldSize.x > area.width) {<NEW_LINE>tc1.setWidth(width / 2 - 1);<NEW_LINE>tc2.setWidth(width - tc1.getWidth());<NEW_LINE>tref.setSize(area.width, area.height);<NEW_LINE>} else {<NEW_LINE>tref.setSize(area.width, area.height);<NEW_LINE>tc1.setWidth(width / 2 - 1);<NEW_LINE>tc2.setWidth(<MASK><NEW_LINE>}<NEW_LINE>}
width - tc1.getWidth());
537,665
// comes here<NEW_LINE>@Override<NEW_LINE>protected void prepare() {<NEW_LINE>ProcessInfoParameter[] para = getParametersAsArray();<NEW_LINE>for (ProcessInfoParameter element : para) {<NEW_LINE>String name = element.getParameterName();<NEW_LINE>if (element.getParameter() == null) {<NEW_LINE>} else if (name.equals("R_InterestArea_ID")) {<NEW_LINE>m_R_InterestArea_ID = element.getParameterAsInt();<NEW_LINE>} else if (name.equals("R_MailText_ID")) {<NEW_LINE>mailTemplateId = MailTemplateId.<MASK><NEW_LINE>} else if (name.equals("C_BP_Group_ID")) {<NEW_LINE>m_C_BP_Group_ID = element.getParameterAsInt();<NEW_LINE>} else if (name.equals("AD_User_ID")) {<NEW_LINE>m_AD_User_ID = element.getParameterAsRepoId(UserId::ofRepoIdOrNull);<NEW_LINE>} else {<NEW_LINE>log.error("Unknown Parameter: " + name);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ofRepoId(element.getParameterAsInt());
1,334,248
public void marshall(Device device, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (device == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(device.getArn(), ARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getManufacturer(), MANUFACTURER_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(device.getModelId(), MODELID_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getFormFactor(), FORMFACTOR_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getPlatform(), PLATFORM_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getOs(), OS_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getCpu(), CPU_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getResolution(), RESOLUTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getHeapSize(), HEAPSIZE_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getMemory(), MEMORY_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getImage(), IMAGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getCarrier(), CARRIER_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getRadio(), RADIO_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getRemoteAccessEnabled(), REMOTEACCESSENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getRemoteDebugEnabled(), REMOTEDEBUGENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getFleetType(), FLEETTYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getFleetName(), FLEETNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getInstances(), INSTANCES_BINDING);<NEW_LINE>protocolMarshaller.marshall(device.getAvailability(), AVAILABILITY_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
device.getModel(), MODEL_BINDING);
1,353,214
public Object calculate(Context ctx) {<NEW_LINE>int count = 1;<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ptop" + mm.getMessage("function.missingParam"));<NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>Object obj = param.<MASK><NEW_LINE>if (obj instanceof Number) {<NEW_LINE>count = ((Number) obj).intValue();<NEW_LINE>} else if (obj != null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ptop" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>return srcSequence.ptop(count, (Expression) null, option, ctx);<NEW_LINE>} else if (param.getSubSize() == 2) {<NEW_LINE>IParam sub0 = param.getSub(0);<NEW_LINE>IParam sub1 = param.getSub(1);<NEW_LINE>if (sub0 == null || sub1 == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ptop" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>Object obj = sub0.getLeafExpression().calculate(ctx);<NEW_LINE>if (obj instanceof Number) {<NEW_LINE>count = ((Number) obj).intValue();<NEW_LINE>} else if (obj != null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ptop" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>Expression exp = sub1.getLeafExpression();<NEW_LINE>return srcSequence.ptop(count, exp, option, ctx);<NEW_LINE>} else {<NEW_LINE>IParam sub0 = param.getSub(0);<NEW_LINE>if (sub0 == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ptop" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>Object obj = sub0.getLeafExpression().calculate(ctx);<NEW_LINE>if (obj instanceof Number) {<NEW_LINE>count = ((Number) obj).intValue();<NEW_LINE>} else if (obj != null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ptop" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>int size = param.getSubSize();<NEW_LINE>Expression[] exps = new Expression[size - 1];<NEW_LINE>for (int i = 1; i < size; ++i) {<NEW_LINE>IParam sub = param.getSub(i);<NEW_LINE>if (sub == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ptop" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>exps[i - 1] = sub.getLeafExpression();<NEW_LINE>}<NEW_LINE>return srcSequence.top(count, exps, option, ctx, true);<NEW_LINE>}<NEW_LINE>}
getLeafExpression().calculate(ctx);
1,229,522
static String readName(ByteBuf buf) {<NEW_LINE>int position = -1;<NEW_LINE>StringBuilder name = new StringBuilder();<NEW_LINE>for (int len = buf.readUnsignedByte(); buf.isReadable() && len != 0; len = buf.readUnsignedByte()) {<NEW_LINE>boolean pointer = (len & 0xc0) == 0xc0;<NEW_LINE>if (pointer) {<NEW_LINE>if (position == -1) {<NEW_LINE>position = buf.readerIndex() + 1;<NEW_LINE>}<NEW_LINE>buf.readerIndex((len & 0x3f) << 8 | buf.readUnsignedByte());<NEW_LINE>} else {<NEW_LINE>name.append(buf.toString(buf.readerIndex(), len, CharsetUtil.<MASK><NEW_LINE>buf.skipBytes(len);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (position != -1) {<NEW_LINE>buf.readerIndex(position);<NEW_LINE>}<NEW_LINE>if (name.length() == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return name.substring(0, name.length() - 1);<NEW_LINE>}
UTF_8)).append(".");
673,284
final DescribeJobExecutionResult executeDescribeJobExecution(DescribeJobExecutionRequest describeJobExecutionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeJobExecutionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeJobExecutionRequest> request = null;<NEW_LINE>Response<DescribeJobExecutionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeJobExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeJobExecutionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeJobExecution");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeJobExecutionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeJobExecutionResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,422,755
public void marshall(SampledHTTPRequest sampledHTTPRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (sampledHTTPRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(sampledHTTPRequest.getRequest(), REQUEST_BINDING);<NEW_LINE>protocolMarshaller.marshall(sampledHTTPRequest.getWeight(), WEIGHT_BINDING);<NEW_LINE>protocolMarshaller.marshall(sampledHTTPRequest.getTimestamp(), TIMESTAMP_BINDING);<NEW_LINE>protocolMarshaller.marshall(sampledHTTPRequest.getAction(), ACTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(sampledHTTPRequest.getRuleNameWithinRuleGroup(), RULENAMEWITHINRULEGROUP_BINDING);<NEW_LINE>protocolMarshaller.marshall(sampledHTTPRequest.getRequestHeadersInserted(), REQUESTHEADERSINSERTED_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(sampledHTTPRequest.getLabels(), LABELS_BINDING);<NEW_LINE>protocolMarshaller.marshall(sampledHTTPRequest.getCaptchaResponse(), CAPTCHARESPONSE_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
sampledHTTPRequest.getResponseCodeSent(), RESPONSECODESENT_BINDING);
1,482,267
private void handleFilterLoincCopyright(SearchPredicateFactory theF, BooleanPredicateClausesStep<?> theB, ValueSet.ConceptSetFilterComponent theFilter) {<NEW_LINE>if (theFilter.getOp() == ValueSet.FilterOperator.EQUAL) {<NEW_LINE>String copyrightFilterValue = defaultString(theFilter.getValue()).toLowerCase();<NEW_LINE>switch(copyrightFilterValue) {<NEW_LINE>case "3rdparty":<NEW_LINE>logFilteringValueOnProperty(theFilter.getValue(), theFilter.getProperty());<NEW_LINE>addFilterLoincCopyright3rdParty(theF, theB, theFilter);<NEW_LINE>break;<NEW_LINE>case "loinc":<NEW_LINE>logFilteringValueOnProperty(theFilter.getValue(<MASK><NEW_LINE>addFilterLoincCopyrightLoinc(theF, theB, theFilter);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throwInvalidRequestForValueOnProperty(theFilter.getValue(), theFilter.getProperty());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throwInvalidRequestForOpOnProperty(theFilter.getOp(), theFilter.getProperty());<NEW_LINE>}<NEW_LINE>}
), theFilter.getProperty());
160,837
public Variant withManager(String identity) {<NEW_LINE>Map<String, Configuration> variants = new HashMap<>();<NEW_LINE>Config current = <MASK><NEW_LINE>if (current instanceof VariantConfig) {<NEW_LINE>variants.putAll(((VariantConfig) current).configs);<NEW_LINE>} else if (current != null) {<NEW_LINE>throw new IllegalStateException("Existing non-variant configuration cannot be replaced - it must be removed first.");<NEW_LINE>}<NEW_LINE>return new Variant() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Variant withoutVariant(String variant) {<NEW_LINE>variants.remove(variant);<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Variant variant(String variant, Configuration configuration) {<NEW_LINE>variants.put(variant, configuration);<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Builder withoutManager(String identity) {<NEW_LINE>return from(build()).withoutManager(identity);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Builder withManager(String identity, Configuration configuration) {<NEW_LINE>return from(build()).withManager(identity, configuration);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Variant withManager(String identity) {<NEW_LINE>return from(build()).withManager(identity);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public XmlMultiConfiguration build() {<NEW_LINE>Map<String, Config> configurations = new HashMap<>(config.configurations);<NEW_LINE>configurations.put(identity, new VariantConfig(variants));<NEW_LINE>return new XmlMultiConfiguration(configurations);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
config.configurations.get(identity);
421,374
public static GuiButtonBoolean buildColorButton(GuiButtonBoolean[] buttons, int posX, int posY, boolean active, DyeColor color, Consumer<GuiButtonBoolean> onClick) {<NEW_LINE>return new GuiButtonBoolean(posX, posY, 12, 12, "", active, TEXTURE, 194, 0, 1, btn -> {<NEW_LINE>if (btn.getNextState())<NEW_LINE>onClick.accept((GuiButtonBoolean) btn);<NEW_LINE>for (int j = 0; j < buttons.length; j++) if (j != color.ordinal())<NEW_LINE>buttons<MASK><NEW_LINE>}) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected boolean isValidClickButton(int button) {<NEW_LINE>return button == 0 && !getState();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void render(PoseStack transform, int mouseX, int mouseY, float partialTicks) {<NEW_LINE>super.render(transform, mouseX, mouseY, partialTicks);<NEW_LINE>if (this.visible) {<NEW_LINE>int col = color.getColorValue();<NEW_LINE>if (!getState())<NEW_LINE>col = ClientUtils.getDarkenedTextColour(col);<NEW_LINE>col = 0xff000000 | col;<NEW_LINE>this.fillGradient(transform, x + 3, y + 3, x + 9, y + 9, col, col);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
[j].setStateByInt(0);