idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,426,385
public void customizeCellRenderer(@Nonnull JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {<NEW_LINE>Color foreground = selected ? UIUtil.getTreeSelectionForeground() : UIUtil.getTreeForeground();<NEW_LINE>Color background = selected ? UIUtil.getTreeSelectionBackground() : null;<NEW_LINE>if (value instanceof HierarchyTree.ComponentNode) {<NEW_LINE>HierarchyTree.ComponentNode componentNode = (HierarchyTree.ComponentNode) value;<NEW_LINE>Component component = componentNode.getComponent();<NEW_LINE>if (!selected) {<NEW_LINE>if (!component.isVisible()) {<NEW_LINE>foreground = JBColor.GRAY;<NEW_LINE>} else if (component.getWidth() == 0 || component.getHeight() == 0) {<NEW_LINE>foreground = new JBColor(new Color(128, 10, 0), JBColor.BLUE);<NEW_LINE>} else if (component.getPreferredSize() != null && (component.getSize().width < component.getPreferredSize().width || component.getSize().height < component.getPreferredSize().height)) {<NEW_LINE>foreground = JBColor.BLUE;<NEW_LINE>}<NEW_LINE>if (myInitialSelection == componentNode.getComponent()) {<NEW_LINE>background = new Color(31, 128, 8, 58);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>append(getComponentName(component));<NEW_LINE>append(": " + RectangleRenderer.toString(component.getBounds()), SimpleTextAttributes.GRAYED_ATTRIBUTES);<NEW_LINE>if (component.isOpaque()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (component.isDoubleBuffered()) {<NEW_LINE>append(", double-buffered", SimpleTextAttributes.GRAYED_ATTRIBUTES);<NEW_LINE>}<NEW_LINE>componentNode.setText(toString());<NEW_LINE>setIcon(createColorIcon(component.getForeground(), component.getBackground()));<NEW_LINE>}<NEW_LINE>if (value instanceof HierarchyTree.ClickInfoNode) {<NEW_LINE>append(value.toString());<NEW_LINE>setIcon(AllIcons.Ide.Rating);<NEW_LINE>}<NEW_LINE>setForeground(foreground);<NEW_LINE>setBackground(background);<NEW_LINE>SpeedSearchUtil.applySpeedSearchHighlighting(tree, this, false, selected);<NEW_LINE>}
append(", opaque", SimpleTextAttributes.GRAYED_ATTRIBUTES);
109,330
public void createIfNotExistsCodeSnippets() {<NEW_LINE>// BEGIN: com.azure.storage.file.datalake.DataLakeFileSystemClient.createIfNotExists<NEW_LINE>boolean result = client.createIfNotExists();<NEW_LINE>System.out.println("file system created: " + result);<NEW_LINE>// END: com.azure.storage.file.datalake.DataLakeFileSystemClient.createIfNotExists<NEW_LINE>// BEGIN: com.azure.storage.file.datalake.DataLakeFileSystemClient.createIfNotExistsWithResponse#Map-PublicAccessType-Duration-Context<NEW_LINE>Map<String, String> metadata = Collections.singletonMap("metadata", "value");<NEW_LINE>Context context = new Context("Key", "Value");<NEW_LINE>Response<Void> response = client.createIfNotExistsWithResponse(metadata, PublicAccessType.CONTAINER, timeout, context);<NEW_LINE>if (response.getStatusCode() == 409) {<NEW_LINE>System.out.println("Already existed.");<NEW_LINE>} else {<NEW_LINE>System.out.printf(<MASK><NEW_LINE>}<NEW_LINE>// END: com.azure.storage.file.datalake.DataLakeFileSystemClient.createIfNotExistsWithResponse#Map-PublicAccessType-Duration-Context<NEW_LINE>}
"Create completed with status %d%n", response.getStatusCode());
902,869
public boolean onClick(@Nonnull MouseEvent e, int clickCount) {<NEW_LINE>CachedIntentions cachedIntentions = new CachedIntentions(project, psiFile, editor);<NEW_LINE>IntentionListStep step = new IntentionListStep(null, editor, psiFile, project, cachedIntentions);<NEW_LINE>HighlightInfo.IntentionActionDescriptor descriptor = intentions.get(0).getFirst();<NEW_LINE>IntentionActionWithTextCaching actionWithTextCaching = cachedIntentions.wrapAction(descriptor, psiFile, psiFile, editor);<NEW_LINE>if (step.hasSubstep(actionWithTextCaching)) {<NEW_LINE>step = step.getSubStep(actionWithTextCaching, null);<NEW_LINE>}<NEW_LINE>ListPopup popup = JBPopupFactory.getInstance().createListPopup(step);<NEW_LINE>Dimension dimension = popup.getContent().getPreferredSize();<NEW_LINE>Point at = new Point(-dimension.width + myGearLabel.getWidth(), <MASK><NEW_LINE>popup.show(new RelativePoint(e.getComponent(), at));<NEW_LINE>return true;<NEW_LINE>}
FileLevelIntentionComponent.this.getHeight());
732,711
public HttpSession newHttpSession(HttpServletRequest request) {<NEW_LINE>long created = System.currentTimeMillis();<NEW_LINE>String id = _sessionIdManager.newSessionId(request, created);<NEW_LINE>Session session = _sessionCache.newSession(request, id, created, (_dftMaxIdleSecs > 0 ? _dftMaxIdleSecs * 1000L : -1));<NEW_LINE>session.setExtendedId(_sessionIdManager.getExtendedId(id, request));<NEW_LINE>session.getSessionData().setLastNode(_sessionIdManager.getWorkerName());<NEW_LINE>try {<NEW_LINE>_sessionCache.add(id, session);<NEW_LINE>Request <MASK><NEW_LINE>baseRequest.setSession(session);<NEW_LINE>baseRequest.enterSession(session);<NEW_LINE>_sessionsCreatedStats.increment();<NEW_LINE>if (request != null && request.isSecure())<NEW_LINE>session.setAttribute(Session.SESSION_CREATED_SECURE, Boolean.TRUE);<NEW_LINE>callSessionCreatedListeners(session);<NEW_LINE>return session;<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.warn("Unable to add Session {}", id, e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
baseRequest = Request.getBaseRequest(request);
98,459
// TreeSet implementation is ~70x faster than RankedFeatureVector -DM<NEW_LINE>public void printTopWords(PrintStream out, int numWords, boolean usingNewLines) {<NEW_LINE>for (int topic = 0; topic < numTopics; topic++) {<NEW_LINE>TreeSet<IDSorter> sortedWords = new TreeSet<IDSorter>();<NEW_LINE>for (int type = 0; type < numTypes; type++) {<NEW_LINE>if (typeTopicCounts[type].containsKey(topic)) {<NEW_LINE>sortedWords.add(new IDSorter(type, typeTopicCounts[type].get(topic)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (usingNewLines) {<NEW_LINE>out.println("Topic " + topic);<NEW_LINE>int word = 1;<NEW_LINE>Iterator<IDSorter<MASK><NEW_LINE>while (iterator.hasNext() && word < numWords) {<NEW_LINE>IDSorter info = iterator.next();<NEW_LINE>out.println(alphabet.lookupObject(info.getID()) + "\t" + (int) info.getWeight());<NEW_LINE>word++;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>out.print(topic + "\t" + formatter.format(alpha[topic]) + "\t" + tokensPerTopic[topic] + "\t");<NEW_LINE>int word = 1;<NEW_LINE>Iterator<IDSorter> iterator = sortedWords.iterator();<NEW_LINE>while (iterator.hasNext() && word < numWords) {<NEW_LINE>IDSorter info = iterator.next();<NEW_LINE>out.print(alphabet.lookupObject(info.getID()) + " ");<NEW_LINE>word++;<NEW_LINE>}<NEW_LINE>out.println();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> iterator = sortedWords.iterator();
550,263
private void checkModifyLimitation(LogicalModify logicalModify, ExecutionContext executionContext) {<NEW_LINE>List<RelOptTable> targetTables = logicalModify.getTargetTables();<NEW_LINE>// Currently, we don't support same table name from different schema name<NEW_LINE>boolean existsShardTable = false;<NEW_LINE>Map<String, Set<String>> tableSchemaMap = new TreeMap<>(String::compareToIgnoreCase);<NEW_LINE>for (RelOptTable targetTable : targetTables) {<NEW_LINE>final List<String> qualifiedName = targetTable.getQualifiedName();<NEW_LINE>final String tableName = Util.last(qualifiedName);<NEW_LINE>final String schema = qualifiedName.get(qualifiedName.size() - 2);<NEW_LINE>if (tableSchemaMap.containsKey(tableName) && !tableSchemaMap.get(tableName).contains(schema)) {<NEW_LINE>throw new TddlRuntimeException(ErrorCode.ERR_NOT_SUPPORT, "Duplicate table name in UPDATE/DELETE");<NEW_LINE>}<NEW_LINE>tableSchemaMap.compute(tableName, (k, v) -> {<NEW_LINE>final Set<String> result = Optional.ofNullable(v).orElse(new TreeSet<MASK><NEW_LINE>result.add(schema);<NEW_LINE>return result;<NEW_LINE>});<NEW_LINE>}<NEW_LINE>// update / delete the whole table<NEW_LINE>if (executionContext.getParamManager().getBoolean(ConnectionParams.FORBID_EXECUTE_DML_ALL)) {<NEW_LINE>logicalModify.getInput().accept(new DmlAllChecker());<NEW_LINE>}<NEW_LINE>}
<>(String::compareToIgnoreCase));
244,186
public void deliverIbbPacket(Account account, IqPacket packet) {<NEW_LINE>final String sid;<NEW_LINE>final Element payload;<NEW_LINE>if (packet.hasChild("open", Namespace.IBB)) {<NEW_LINE>payload = packet.findChild("open", Namespace.IBB);<NEW_LINE>sid = payload.getAttribute("sid");<NEW_LINE>} else if (packet.hasChild("data", Namespace.IBB)) {<NEW_LINE>payload = packet.findChild("data", Namespace.IBB);<NEW_LINE>sid = payload.getAttribute("sid");<NEW_LINE>} else if (packet.hasChild("close", Namespace.IBB)) {<NEW_LINE>payload = packet.findChild("close", Namespace.IBB);<NEW_LINE>sid = payload.getAttribute("sid");<NEW_LINE>} else {<NEW_LINE>payload = null;<NEW_LINE>sid = null;<NEW_LINE>}<NEW_LINE>if (sid != null) {<NEW_LINE>for (final AbstractJingleConnection connection : this.connections.values()) {<NEW_LINE>if (connection instanceof JingleFileTransferConnection) {<NEW_LINE>final JingleFileTransferConnection fileTransfer = (JingleFileTransferConnection) connection;<NEW_LINE>final JingleTransport transport = fileTransfer.getTransport();<NEW_LINE>if (transport instanceof JingleInBandTransport) {<NEW_LINE><MASK><NEW_LINE>if (inBandTransport.matches(account, sid)) {<NEW_LINE>inBandTransport.deliverPayload(packet, payload);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Log.d(Config.LOGTAG, "unable to deliver ibb packet: " + packet.toString());<NEW_LINE>account.getXmppConnection().sendIqPacket(packet.generateResponse(IqPacket.TYPE.ERROR), null);<NEW_LINE>}
final JingleInBandTransport inBandTransport = (JingleInBandTransport) transport;
815,051
final GetWirelessDeviceStatisticsResult executeGetWirelessDeviceStatistics(GetWirelessDeviceStatisticsRequest getWirelessDeviceStatisticsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getWirelessDeviceStatisticsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetWirelessDeviceStatisticsRequest> request = null;<NEW_LINE>Response<GetWirelessDeviceStatisticsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetWirelessDeviceStatisticsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getWirelessDeviceStatisticsRequest));<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 Wireless");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetWirelessDeviceStatisticsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetWirelessDeviceStatisticsResultJsonUnmarshaller());<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.OPERATION_NAME, "GetWirelessDeviceStatistics");
45,219
public double dot(SequentialSparseVector thatVector) {<NEW_LINE>double value = 0.0D;<NEW_LINE>Iterator<VectorEntry> thisIterator = this.iterator();<NEW_LINE>Iterator<Vector.VectorEntry> thatIterator = thatVector.iterator();<NEW_LINE>Vector.VectorEntry thisVectorEntry, thatVectorEntry;<NEW_LINE>if (thisIterator.hasNext() && thatIterator.hasNext()) {<NEW_LINE>thisVectorEntry = thisIterator.next();<NEW_LINE>thatVectorEntry = thatIterator.next();<NEW_LINE>while (thisIterator.hasNext() && thatIterator.hasNext()) {<NEW_LINE>int thisIndex = thisVectorEntry.index();<NEW_LINE>int thatIndex = thatVectorEntry.index();<NEW_LINE>if (thisIndex == thatIndex) {<NEW_LINE>value += thisVectorEntry.get<MASK><NEW_LINE>thisVectorEntry = thisIterator.next();<NEW_LINE>thatVectorEntry = thatIterator.next();<NEW_LINE>} else if (thisIndex < thatIndex) {<NEW_LINE>thisVectorEntry = thisIterator.next();<NEW_LINE>} else {<NEW_LINE>thatVectorEntry = thatIterator.next();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return value;<NEW_LINE>}
() * thatVectorEntry.get();
653,468
void debugValues() {<NEW_LINE>// NOI18N<NEW_LINE>LOGGER.finest("nProfiledSelects: " + nProfiledSelects);<NEW_LINE>// NOI18N<NEW_LINE>LOGGER.finest("stacksForSelects.length: " + debugLength(stacksForSelects));<NEW_LINE>LOGGER.finest("invocationsPerSelectId.length: " + debugLength(invocationsPerSelectId));<NEW_LINE>LOGGER.finest("timePerSelectId.length: " + debugLength(timePerSelectId));<NEW_LINE>LOGGER.finest("typeForSelectId.length: " + debugLength(typeForSelectId));<NEW_LINE>LOGGER.finest("commandTypeForSelectId.length: " + debugLength(commandTypeForSelectId));<NEW_LINE>LOGGER.finest("tablesForSelectId.length: " + debugLength(tablesForSelectId));<NEW_LINE>// NOI18N<NEW_LINE>LOGGER.finest("selectNames.length: " + debugLength(selectNames));<NEW_LINE>// NOI18N<NEW_LINE>LOGGER.finest("table: " + ((table == null) ? "null" <MASK><NEW_LINE>}
: table.debug()));
757,307
private void visit(T item, Set<T> visited, List<T> sorted, Comparator<T> comparator) {<NEW_LINE>// If the item has not been visited<NEW_LINE>if (!visited.contains(item)) {<NEW_LINE>// We are visiting it now, so add it to the visited set<NEW_LINE>visited.add(item);<NEW_LINE>// Lookup the items dependencies<NEW_LINE>Set<T> dependencies = _dependencies.get(item);<NEW_LINE>if (dependencies != null) {<NEW_LINE>// Sort the dependencies<NEW_LINE>SortedSet<T> orderedDeps = new TreeSet<>(comparator);<NEW_LINE>orderedDeps.addAll(dependencies);<NEW_LINE>// recursively visit each dependency<NEW_LINE>try {<NEW_LINE>for (T d : orderedDeps) {<NEW_LINE>visit(d, visited, sorted, comparator);<NEW_LINE>}<NEW_LINE>} catch (CyclicException e) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Now that we have visited all our dependencies, they and their<NEW_LINE>// dependencies will have been added to the sorted list. So we can<NEW_LINE>// now add the current item and it will be after its dependencies<NEW_LINE>sorted.add(item);<NEW_LINE>} else if (!sorted.contains(item))<NEW_LINE>// If we have already visited an item, but it has not yet been put in the<NEW_LINE>// sorted list, then we must be in a cycle!<NEW_LINE>throw new CyclicException(item);<NEW_LINE>}
throw new CyclicException(item, e);
67,497
public CreateTrafficMirrorSessionResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>CreateTrafficMirrorSessionResult createTrafficMirrorSessionResult = new CreateTrafficMirrorSessionResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE>XMLEvent xmlEvent = context.nextEvent();<NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return createTrafficMirrorSessionResult;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("trafficMirrorSession", targetDepth)) {<NEW_LINE>createTrafficMirrorSessionResult.setTrafficMirrorSession(TrafficMirrorSessionStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("clientToken", targetDepth)) {<NEW_LINE>createTrafficMirrorSessionResult.setClientToken(StringStaxUnmarshaller.getInstance<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return createTrafficMirrorSessionResult;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
().unmarshall(context));
181,259
protected void buildTreeMap(SqlExecutionContext executionContext) throws SqlException {<NEW_LINE>filter.init(this, executionContext);<NEW_LINE>int keyCount = symbolKeys.size();<NEW_LINE>if (deferredSymbolKeys != null) {<NEW_LINE>keyCount += deferredSymbolKeys.size();<NEW_LINE>}<NEW_LINE>found.clear();<NEW_LINE>DataFrame frame;<NEW_LINE>// frame metadata is based on TableReader, which is "full" metadata<NEW_LINE>// this cursor works with subset of columns, which warrants column index remap<NEW_LINE>int frameColumnIndex = columnIndexes.getQuick(columnIndex);<NEW_LINE>while ((frame = this.dataFrameCursor.next()) != null && found.size() < keyCount) {<NEW_LINE>final int partitionIndex = frame.getPartitionIndex();<NEW_LINE>final BitmapIndexReader indexReader = frame.getBitmapIndexReader(frameColumnIndex, BitmapIndexReader.DIR_BACKWARD);<NEW_LINE>final long rowLo = frame.getRowLo();<NEW_LINE>final long rowHi = frame.getRowHi() - 1;<NEW_LINE>this.<MASK><NEW_LINE>for (int i = 0, n = symbolKeys.size(); i < n; i++) {<NEW_LINE>int symbolKey = symbolKeys.get(i);<NEW_LINE>addFoundKey(symbolKey, indexReader, partitionIndex, rowLo, rowHi);<NEW_LINE>}<NEW_LINE>if (deferredSymbolKeys != null) {<NEW_LINE>for (int i = 0, n = deferredSymbolKeys.size(); i < n; i++) {<NEW_LINE>int symbolKey = deferredSymbolKeys.get(i);<NEW_LINE>if (!symbolKeys.contains(symbolKey)) {<NEW_LINE>addFoundKey(symbolKey, indexReader, partitionIndex, rowLo, rowHi);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>rows.sortAsUnsigned();<NEW_LINE>}
recordA.jumpTo(partitionIndex, 0);
669,688
private Route addRoute(HttpMethod httpMethod, String path, Object controller, Class<?> controllerType, Method method) {<NEW_LINE>// [/** | /*]<NEW_LINE>path = "*".equals(path) ? "/.*" : path;<NEW_LINE>path = path.replace("/**", "/.*").replace("/*", "/.*");<NEW_LINE>String key = path + "#" + httpMethod.toString();<NEW_LINE>// exist<NEW_LINE>if (this.routes.containsKey(key)) {<NEW_LINE>log.warn("\tRoute {} -> {} has exist", path, httpMethod.toString());<NEW_LINE>}<NEW_LINE>Route route = new Route(httpMethod, path, controller, controllerType, method);<NEW_LINE>if (BladeKit.isWebHook(httpMethod)) {<NEW_LINE>Order order = <MASK><NEW_LINE>if (null != order) {<NEW_LINE>route.setSort(order.value());<NEW_LINE>}<NEW_LINE>if (this.hooks.containsKey(key)) {<NEW_LINE>this.hooks.get(key).add(route);<NEW_LINE>} else {<NEW_LINE>List<Route> empty = new ArrayList<>();<NEW_LINE>empty.add(route);<NEW_LINE>this.hooks.put(key, empty);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>this.routes.put(key, route);<NEW_LINE>}<NEW_LINE>return route;<NEW_LINE>}
controllerType.getAnnotation(Order.class);
847,612
public Object execute(Evaluator evaluator, Argument[] arguments) {<NEW_LINE>if (resultDateMember != null) {<NEW_LINE>return resultDateMember;<NEW_LINE>}<NEW_LINE>// determine the current date<NEW_LINE>Object formatArg = arguments[1].evaluateScalar(evaluator);<NEW_LINE>final Locale locale = Locale.getDefault();<NEW_LINE>final Format format = new Format((String) formatArg, locale);<NEW_LINE>String currDateStr = format.format(getDate(evaluator, arguments));<NEW_LINE>// determine the match type<NEW_LINE>MatchType matchType;<NEW_LINE>if (arguments.length == 3) {<NEW_LINE>String matchStr = arguments[2].evaluateScalar(evaluator).toString();<NEW_LINE>matchType = Enum.<MASK><NEW_LINE>} else {<NEW_LINE>matchType = MatchType.EXACT;<NEW_LINE>}<NEW_LINE>List<Id.Segment> uniqueNames = Util.parseIdentifier(currDateStr);<NEW_LINE>resultDateMember = evaluator.getSchemaReader().getMemberByUniqueName(uniqueNames, false, matchType);<NEW_LINE>if (resultDateMember != null) {<NEW_LINE>return resultDateMember;<NEW_LINE>}<NEW_LINE>// if there is no matching member, return the null member for<NEW_LINE>// the specified dimension/hierarchy<NEW_LINE>Object arg0 = arguments[0].evaluate(evaluator);<NEW_LINE>if (arg0 instanceof Hierarchy) {<NEW_LINE>resultDateMember = ((Hierarchy) arg0).getNullMember();<NEW_LINE>} else {<NEW_LINE>resultDateMember = ((Dimension) arg0).getHierarchy().getNullMember();<NEW_LINE>}<NEW_LINE>return resultDateMember;<NEW_LINE>}
valueOf(MatchType.class, matchStr);
1,350,381
public void createDestinationLocalization(BaseDestination config) throws Exception {<NEW_LINE>SibTr.entry(tc, "createDestinationLocalization", this);<NEW_LINE>try {<NEW_LINE>String meName = meConfig<MASK><NEW_LINE>JsDestinationCache dCache = bus.getDestinationCache();<NEW_LINE>BaseDestinationDefinition dd = dCache.addNewDestinationToCache(config);<NEW_LINE>if (!config.isAlias()) {<NEW_LINE>BaseMessagingEngineImpl engine = getMessagingEngine(meName);<NEW_LINE>SIBLocalizationPoint lpConfig = new SIBLocalizationPointImpl();<NEW_LINE>lpConfig.setIdentifier(config.getName() + "@" + meName);<NEW_LINE>SIBDestination d = (SIBDestination) config;<NEW_LINE>lpConfig.setHighMsgThreshold(d.getHighMessageThreshold());<NEW_LINE>engine.addLocalizationPoint(lpConfig, (DestinationDefinition) dd);<NEW_LINE>ArrayList list = new ArrayList();<NEW_LINE>list.add(dd);<NEW_LINE>bus.getDestinationCache().populateUuidCache(list);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>SibTr.exception(tc, e);<NEW_LINE>}<NEW_LINE>SibTr.exit(tc, "createDestinationLocalization for destination: ", config.getName());<NEW_LINE>}
.getMessagingEngine().getName();
435,426
public /* (non-Javadoc)<NEW_LINE>* @see com.ibm.jvm.dtfjview.spi.ISession#run()<NEW_LINE>*/<NEW_LINE>void run() {<NEW_LINE>// first check that we have a context to run against in case there was a fatal error during startup<NEW_LINE>if (currentContext == null) {<NEW_LINE>out.println("No current context - exiting");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (isInteractiveSession) {<NEW_LINE>runInteractive();<NEW_LINE>} else {<NEW_LINE>runBatch();<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>// something has gone wrong outside of one of the commands and so is likely to be a fatal system error<NEW_LINE>out.println("Unexpected system error, terminating application. Run with -verbose for more information");<NEW_LINE>// this exception is logged at fine because we always want it visible with -verbose<NEW_LINE>logger.log(<MASK><NEW_LINE>}<NEW_LINE>// remove all contexts - this will close all open images<NEW_LINE>try {<NEW_LINE>ctxmgr.removeAllContexts();<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.log(Level.FINE, "Error closing contexts: ", e);<NEW_LINE>out.println("Error closing contexts: " + e.getMessage());<NEW_LINE>}<NEW_LINE>}
Level.FINE, "Failed to start the session", e);
1,257,805
final DisconnectSourceServerResult executeDisconnectSourceServer(DisconnectSourceServerRequest disconnectSourceServerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disconnectSourceServerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DisconnectSourceServerRequest> request = null;<NEW_LINE>Response<DisconnectSourceServerResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new DisconnectSourceServerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(disconnectSourceServerRequest));<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, "drs");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisconnectSourceServer");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DisconnectSourceServerResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DisconnectSourceServerResultJsonUnmarshaller());<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);
860,685
public DoubleMatrix solve(DoubleMatrix b) {<NEW_LINE>int nbRow = b.rowCount();<NEW_LINE>int nbCol = b.columnCount();<NEW_LINE>ArgChecker.isTrue(nbRow == _lArray.length, "b array of incorrect size");<NEW_LINE>double[][<MASK><NEW_LINE>// L Y = B (Y stored in x array)<NEW_LINE>for (int loopcol = 0; loopcol < nbCol; loopcol++) {<NEW_LINE>for (int looprow = 0; looprow < nbRow; looprow++) {<NEW_LINE>x[looprow][loopcol] /= _lArray[looprow][looprow];<NEW_LINE>for (int j = looprow + 1; j < nbRow; j++) {<NEW_LINE>x[j][loopcol] -= x[looprow][loopcol] * _lArray[j][looprow];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// L^T X = Y<NEW_LINE>for (int loopcol = 0; loopcol < nbCol; loopcol++) {<NEW_LINE>for (int looprow = nbRow - 1; looprow >= -0; looprow--) {<NEW_LINE>x[looprow][loopcol] /= _lArray[looprow][looprow];<NEW_LINE>for (int j = 0; j < looprow; j++) {<NEW_LINE>x[j][loopcol] -= x[looprow][loopcol] * _lArray[looprow][j];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return DoubleMatrix.copyOf(x);<NEW_LINE>}
] x = b.toArray();
1,103,253
public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String schema = MAP.getAnnotationText() + " @public @buseventtype create schema MyDynoPropSchema as (key string);\n";<NEW_LINE>env.compileDeploy(schema, path);<NEW_LINE>String[] fields = "typeof(prop?),typeof(key)".split(",");<NEW_LINE>SupportEvalBuilder builder = new SupportEvalBuilder("MyDynoPropSchema").withPath(path).expressions(fields, "typeof(prop?)", "typeof(key)");<NEW_LINE>builder.assertion(makeSchemaEvent(1, "E1")).expect(fields, "Integer", "String");<NEW_LINE>builder.assertion(makeSchemaEvent("test", "E2")).expect(fields, "String", "String");<NEW_LINE>builder.assertion(makeSchemaEvent(null, "E3")).expect(fields, null, "String");<NEW_LINE>builder.run(env, true);<NEW_LINE><MASK><NEW_LINE>env.undeployAll();<NEW_LINE>}
builder.run(env, false);
1,166,743
public InitiateBucketWormResult initiateBucketWorm(InitiateBucketWormRequest initiateBucketWormRequest) throws OSSException, ClientException {<NEW_LINE>assertParameterNotNull(initiateBucketWormRequest, "initiateBucketWormRequest");<NEW_LINE>String bucketName = initiateBucketWormRequest.getBucketName();<NEW_LINE>assertParameterNotNull(bucketName, "bucketName");<NEW_LINE>ensureBucketNameValid(bucketName);<NEW_LINE>Map<String, String> params = new HashMap<String, String>();<NEW_LINE>params.put(SUBRESOURCE_WORM, null);<NEW_LINE>byte[] rawContent = initiateBucketWormRequestMarshaller.marshall(initiateBucketWormRequest);<NEW_LINE>Map<String, String> headers = new HashMap<String, String>();<NEW_LINE>addRequestRequiredHeaders(headers, rawContent);<NEW_LINE>RequestMessage request = new OSSRequestMessageBuilder(getInnerClient()).setEndpoint(getEndpoint(initiateBucketWormRequest)).setMethod(HttpMethod.POST).setBucket(bucketName).setParameters(params).setHeaders(headers).setOriginalRequest(initiateBucketWormRequest).setInputSize(rawContent.length).setInputStream(new ByteArrayInputStream<MASK><NEW_LINE>return doOperation(request, initiateBucketWormResponseParser, bucketName, null);<NEW_LINE>}
(rawContent)).build();
173,267
private static List<List<String>> cacheTracingInfo(ResultSet resultSet, List<Integer> maxSizeList) throws Exception {<NEW_LINE>List<List<String>> lists = new ArrayList<>(2);<NEW_LINE>lists.add(0, new ArrayList<>());<NEW_LINE>lists.add(1, new ArrayList<>());<NEW_LINE>String ACTIVITY_STR = "Activity";<NEW_LINE>String ELAPSED_TIME_STR = "Elapsed Time";<NEW_LINE>lists.get(0).add(ACTIVITY_STR);<NEW_LINE>lists.get(1).add(ELAPSED_TIME_STR);<NEW_LINE>maxSizeList.add(0, ACTIVITY_STR.length());<NEW_LINE>maxSizeList.add(<MASK><NEW_LINE>List<String> activityList = ((AbstractIoTDBJDBCResultSet) resultSet).getActivityList();<NEW_LINE>List<Long> elapsedTimeList = ((AbstractIoTDBJDBCResultSet) resultSet).getElapsedTimeList();<NEW_LINE>String[] statisticsInfoList = { "seriesPathNum", "seqFileNum", "unSeqFileNum", "seqChunkInfo", "unSeqChunkInfo", "pageNumInfo" };<NEW_LINE>for (int i = 0; i < activityList.size(); i++) {<NEW_LINE>if (i == activityList.size() - 1) {<NEW_LINE>// cache Statistics<NEW_LINE>for (String infoName : statisticsInfoList) {<NEW_LINE>String info = ((AbstractIoTDBJDBCResultSet) resultSet).getStatisticsInfoByName(infoName);<NEW_LINE>lists.get(0).add(info);<NEW_LINE>lists.get(1).add("");<NEW_LINE>if (info.length() > maxSizeList.get(0)) {<NEW_LINE>maxSizeList.set(0, info.length());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String activity = activityList.get(i);<NEW_LINE>String elapsedTime = elapsedTimeList.get(i).toString();<NEW_LINE>if (activity.length() > maxSizeList.get(0)) {<NEW_LINE>maxSizeList.set(0, activity.length());<NEW_LINE>}<NEW_LINE>if (elapsedTime.length() > maxSizeList.get(1)) {<NEW_LINE>maxSizeList.set(1, elapsedTime.length());<NEW_LINE>}<NEW_LINE>lists.get(0).add(activity);<NEW_LINE>lists.get(1).add(elapsedTime);<NEW_LINE>}<NEW_LINE>return lists;<NEW_LINE>}
1, ELAPSED_TIME_STR.length());
139,416
private static void paintConstantButton(Graphics2D g, int xpos, int ypos, boolean constant, int value, float scale) {<NEW_LINE>int width = AppPreferences.getScaled(BoardManipulator.CONSTANT_BUTTON_WIDTH - 2, scale);<NEW_LINE>int height = AppPreferences.getScaled(BoardManipulator.CONSTANT_BAR_HEIGHT - 2, scale);<NEW_LINE>int ydif2 = height - (height >> 2);<NEW_LINE>g.setColor(Color.BLACK);<NEW_LINE>g.setStroke(new BasicStroke(AppPreferences.getScaled(2, scale)));<NEW_LINE>g.drawRect(xpos, ypos, width, height);<NEW_LINE>String val = constant ? S.get("BoardMapValue") : Integer.toString(value);<NEW_LINE>String txt = S.get("BoardMapConstant", val);<NEW_LINE>g.setFont(AppPreferences.getScaledFont(g.getFont().deriveFont(Font.BOLD), scale));<NEW_LINE>g.setColor(Color.BLUE);<NEW_LINE>g.drawString(txt, xpos + height + (height >> 2), ypos + ydif2);<NEW_LINE>g.setColor(value == 0 ? Value.falseColor : value == 1 ? Value.trueColor : Value.unknownColor);<NEW_LINE>g.fillOval(xpos + (height >> 3), ypos + (height >> 3), height - (height >> 2), height - (height >> 2));<NEW_LINE><MASK><NEW_LINE>if (!constant)<NEW_LINE>GraphicsUtil.drawCenteredText(g, Integer.toString(value), xpos + (height >> 1), ypos + (height >> 1));<NEW_LINE>else<NEW_LINE>GraphicsUtil.drawCenteredText(g, "C", xpos + (height >> 1), ypos + (height >> 1));<NEW_LINE>}
g.setColor(Color.WHITE);
804,686
protected void createBatchPartsForParallelExecution(ProcessEngineConfigurationImpl engineConfiguration, Batch batch, long numberOfBatchParts) {<NEW_LINE>JobService jobService = engineConfiguration.getJobServiceConfiguration().getJobService();<NEW_LINE>ManagementService managementService = engineConfiguration.getManagementService();<NEW_LINE>for (int i = 0; i < numberOfBatchParts; i++) {<NEW_LINE>BatchPart batchPart = managementService.createBatchPartBuilder(batch).type(DeleteProcessInstanceBatchConstants.BATCH_PART_COMPUTE_IDS_TYPE).searchKey(Integer.toString(i)).status(DeleteProcessInstanceBatchConstants.STATUS_WAITING).create();<NEW_LINE>JobEntity job = jobService.createJob();<NEW_LINE>job.setJobHandlerType(ComputeDeleteHistoricProcessInstanceIdsJobHandler.TYPE);<NEW_LINE>job.setJobHandlerConfiguration(batchPart.getId());<NEW_LINE>jobService.createAsyncJob(job, false);<NEW_LINE>jobService.scheduleAsyncJob(job);<NEW_LINE>}<NEW_LINE>TimerJobService timerJobService = engineConfiguration.getJobServiceConfiguration().getTimerJobService();<NEW_LINE>TimerJobEntity timerJob = timerJobService.createTimerJob();<NEW_LINE>timerJob.setJobType(Job.JOB_TYPE_TIMER);<NEW_LINE>timerJob.setRevision(1);<NEW_LINE>timerJob.setJobHandlerType(ComputeDeleteHistoricProcessInstanceStatusJobHandler.TYPE);<NEW_LINE>timerJob.setJobHandlerConfiguration(batch.getId());<NEW_LINE>BusinessCalendar businessCalendar = engineConfiguration.getBusinessCalendarManager(<MASK><NEW_LINE>timerJob.setDuedate(businessCalendar.resolveDuedate(engineConfiguration.getBatchStatusTimeCycleConfig()));<NEW_LINE>timerJob.setRepeat(engineConfiguration.getBatchStatusTimeCycleConfig());<NEW_LINE>timerJobService.scheduleTimerJob(timerJob);<NEW_LINE>}
).getBusinessCalendar(CycleBusinessCalendar.NAME);
1,114,054
public void sendNotification(Customer customer, Alert alert, AlertChannel channel) throws PlatformNotificationException {<NEW_LINE>log.debug("sendNotification {}", alert);<NEW_LINE>AlertChannelEmailParams params = (AlertChannelEmailParams) channel.getParams();<NEW_LINE>String title = getNotificationTitle(alert, channel);<NEW_LINE>String <MASK><NEW_LINE>SmtpData smtpData = params.isDefaultSmtpSettings() ? emailHelper.getSmtpData(customer.uuid) : params.getSmtpData();<NEW_LINE>List<String> recipients = params.isDefaultRecipients() ? emailHelper.getDestinations(customer.uuid) : params.getRecipients();<NEW_LINE>if (CollectionUtils.isEmpty(recipients)) {<NEW_LINE>throw new PlatformNotificationException(String.format("Error sending email for alert %s: No recipients found for channel %s", alert.getName(), channel.getName()));<NEW_LINE>}<NEW_LINE>if (smtpData == null) {<NEW_LINE>throw new PlatformNotificationException(String.format("Error sending email for alert %s: SMTP settings not found for channel %s.", alert.getName(), channel.getName()));<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>emailHelper.sendEmail(customer, title, String.join(", ", recipients), smtpData, Collections.singletonMap("text/plain; charset=\"us-ascii\"", text));<NEW_LINE>} catch (MessagingException e) {<NEW_LINE>throw new PlatformNotificationException(String.format("Error sending email for alert %s: %s", alert.getName(), e.getMessage()), e);<NEW_LINE>}<NEW_LINE>}
text = getNotificationText(alert, channel);
69,325
private /* static */<NEW_LINE>boolean isPushForType(AbstractInsnNode insn, Type type) {<NEW_LINE>int opcode = insn.getOpcode();<NEW_LINE>if (opcode == type.getOpcode(Opcodes.ILOAD)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// b/62060793: AsyncAwait rewrites bytecode to convert java methods into state machine with<NEW_LINE>// support of lambdas. Constant zero values are pushed on stack for all yet uninitialized<NEW_LINE>// local variables. And SIPUSH instruction is used to advance an internal state of a state<NEW_LINE>// machine.<NEW_LINE>switch(type.getSort()) {<NEW_LINE>case Type.BOOLEAN:<NEW_LINE>return opcode == Opcodes.ICONST_0 || opcode == Opcodes.ICONST_1;<NEW_LINE>case Type.BYTE:<NEW_LINE>case Type.CHAR:<NEW_LINE>case Type.SHORT:<NEW_LINE>case Type.INT:<NEW_LINE>return opcode == Opcodes.SIPUSH || opcode == Opcodes.ICONST_0 || opcode == Opcodes.ICONST_1 || opcode == Opcodes.ICONST_2 || opcode == Opcodes.ICONST_3 || opcode == Opcodes.ICONST_4 || opcode == Opcodes.ICONST_5 || opcode == Opcodes.ICONST_M1;<NEW_LINE>case Type.LONG:<NEW_LINE>return opcode == Opcodes<MASK><NEW_LINE>case Type.FLOAT:<NEW_LINE>return opcode == Opcodes.FCONST_0 || opcode == Opcodes.FCONST_1 || opcode == Opcodes.FCONST_2;<NEW_LINE>case Type.DOUBLE:<NEW_LINE>return opcode == Opcodes.DCONST_0 || opcode == Opcodes.DCONST_1;<NEW_LINE>case Type.OBJECT:<NEW_LINE>case Type.ARRAY:<NEW_LINE>return opcode == Opcodes.ACONST_NULL;<NEW_LINE>default:<NEW_LINE>// Support for BIPUSH and LDC* opcodes is not implemented as there is no known use case.<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
.LCONST_0 || opcode == Opcodes.LCONST_1;
182,060
public synchronized Map<String, Object> asMap(boolean withDetails) {<NEW_LINE>E.checkState(this.type != null, "Task type can't be null");<NEW_LINE>E.checkState(this.name != null, "Task name can't be null");<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>map.put(Hidden.unHide(P.ID), this.id);<NEW_LINE>map.put(Hidden.unHide(P.TYPE), this.type);<NEW_LINE>map.put(Hidden.unHide(P.NAME), this.name);<NEW_LINE>map.put(Hidden.unHide(P.STATUS), this.status.string());<NEW_LINE>map.put(Hidden.unHide(P.PROGRESS), this.progress);<NEW_LINE>map.put(Hidden.unHide(P.CREATE), this.create);<NEW_LINE>map.put(Hidden.unHide(P<MASK><NEW_LINE>if (this.description != null) {<NEW_LINE>map.put(Hidden.unHide(P.DESCRIPTION), this.description);<NEW_LINE>}<NEW_LINE>if (this.update != null) {<NEW_LINE>map.put(Hidden.unHide(P.UPDATE), this.update);<NEW_LINE>}<NEW_LINE>if (this.dependencies != null) {<NEW_LINE>Set<Long> value = this.dependencies.stream().map(Id::asLong).collect(toOrderSet());<NEW_LINE>map.put(Hidden.unHide(P.DEPENDENCIES), value);<NEW_LINE>}<NEW_LINE>if (this.server != null) {<NEW_LINE>map.put(Hidden.unHide(P.SERVER), this.server.asString());<NEW_LINE>}<NEW_LINE>if (withDetails) {<NEW_LINE>map.put(Hidden.unHide(P.CALLABLE), this.callable.getClass().getName());<NEW_LINE>if (this.input != null) {<NEW_LINE>map.put(Hidden.unHide(P.INPUT), this.input);<NEW_LINE>}<NEW_LINE>if (this.result != null) {<NEW_LINE>map.put(Hidden.unHide(P.RESULT), this.result);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>}
.RETRIES), this.retries);
1,451,699
public static <T extends CoreMap> T createCoreMap(CoreMap cm, String text, int start, int end, CoreTokenFactory<T> factory) {<NEW_LINE>if (end > start) {<NEW_LINE><MASK><NEW_LINE>Integer cmCharStart = cm.get(CoreAnnotations.CharacterOffsetBeginAnnotation.class);<NEW_LINE>if (cmCharStart == null)<NEW_LINE>cmCharStart = 0;<NEW_LINE>String tokenText = text.substring(start, end);<NEW_LINE>token.set(CoreAnnotations.TextAnnotation.class, tokenText);<NEW_LINE>if (token instanceof CoreLabel) {<NEW_LINE>token.set(CoreAnnotations.ValueAnnotation.class, tokenText);<NEW_LINE>}<NEW_LINE>token.set(CoreAnnotations.CharacterOffsetBeginAnnotation.class, cmCharStart + start);<NEW_LINE>token.set(CoreAnnotations.CharacterOffsetEndAnnotation.class, cmCharStart + end);<NEW_LINE>return token;<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
T token = factory.makeToken();
618,298
private Map<String, Object> createNumbersMap(List<TPS> tpsData) {<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>long dayAgo = now - TimeUnit.DAYS.toMillis(1L);<NEW_LINE>long weekAgo = now - TimeUnit.DAYS.toMillis(7L);<NEW_LINE>Map<String, Object> numbers = new HashMap<>();<NEW_LINE>TPSMutator tpsDataMonth = new TPSMutator(tpsData);<NEW_LINE>TPSMutator tpsDataWeek = tpsDataMonth.filterDataBetween(weekAgo, now);<NEW_LINE>TPSMutator tpsDataDay = tpsDataWeek.filterDataBetween(dayAgo, now);<NEW_LINE>Double tpsThreshold = config.get(DisplaySettings.GRAPH_TPS_THRESHOLD_MED);<NEW_LINE>numbers.put("low_tps_spikes_30d", tpsDataMonth.lowTpsSpikeCount(tpsThreshold));<NEW_LINE>numbers.put("low_tps_spikes_7d", tpsDataWeek.lowTpsSpikeCount(tpsThreshold));<NEW_LINE>numbers.put("low_tps_spikes_24h", tpsDataDay.lowTpsSpikeCount(tpsThreshold));<NEW_LINE>numbers.put("server_downtime_30d", timeAmount.apply(tpsDataMonth.serverDownTime()));<NEW_LINE>numbers.put("server_downtime_7d", timeAmount.apply(tpsDataWeek.serverDownTime()));<NEW_LINE>numbers.put("server_downtime_24h", timeAmount.apply(tpsDataDay.serverDownTime()));<NEW_LINE>numbers.put("tps_30d", format(tpsDataMonth.averageTPS()));<NEW_LINE>numbers.put("tps_7d", format(tpsDataWeek.averageTPS()));<NEW_LINE>numbers.put("tps_24h", format(tpsDataDay.averageTPS()));<NEW_LINE>numbers.put("cpu_30d", formatPercentage<MASK><NEW_LINE>numbers.put("cpu_7d", formatPercentage(tpsDataWeek.averageCPU()));<NEW_LINE>numbers.put("cpu_24h", formatPercentage(tpsDataDay.averageCPU()));<NEW_LINE>numbers.put("ram_30d", formatBytes(tpsDataMonth.averageRAM()));<NEW_LINE>numbers.put("ram_7d", formatBytes(tpsDataWeek.averageRAM()));<NEW_LINE>numbers.put("ram_24h", formatBytes(tpsDataDay.averageRAM()));<NEW_LINE>numbers.put("entities_30d", format((int) tpsDataMonth.averageEntities()));<NEW_LINE>numbers.put("entities_7d", format((int) tpsDataWeek.averageEntities()));<NEW_LINE>numbers.put("entities_24h", format((int) tpsDataDay.averageEntities()));<NEW_LINE>numbers.put("chunks_30d", format((int) tpsDataMonth.averageChunks()));<NEW_LINE>numbers.put("chunks_7d", format((int) tpsDataWeek.averageChunks()));<NEW_LINE>numbers.put("chunks_24h", format((int) tpsDataDay.averageChunks()));<NEW_LINE>numbers.put("max_disk_30d", formatBytes(tpsDataMonth.maxFreeDisk()));<NEW_LINE>numbers.put("max_disk_7d", formatBytes(tpsDataWeek.maxFreeDisk()));<NEW_LINE>numbers.put("max_disk_24h", formatBytes(tpsDataDay.maxFreeDisk()));<NEW_LINE>numbers.put("min_disk_30d", formatBytes(tpsDataMonth.minFreeDisk()));<NEW_LINE>numbers.put("min_disk_7d", formatBytes(tpsDataWeek.minFreeDisk()));<NEW_LINE>numbers.put("min_disk_24h", formatBytes(tpsDataDay.minFreeDisk()));<NEW_LINE>return numbers;<NEW_LINE>}
(tpsDataMonth.averageCPU()));
1,718,474
public void addMessagesToGroup(Object groupId, Message<?>... messages) {<NEW_LINE>Assert.notNull(groupId, "'groupId' must not be null");<NEW_LINE>Assert.notNull(messages, "'messages' must not be null");<NEW_LINE>Lock lock = this.lockRegistry.obtain(groupId);<NEW_LINE>try {<NEW_LINE>lock.lockInterruptibly();<NEW_LINE>boolean unlocked = false;<NEW_LINE>try {<NEW_LINE>UpperBound upperBound;<NEW_LINE>MessageGroup group = this.groupIdToMessageGroup.get(groupId);<NEW_LINE>MessagingException outOfCapacityException = new MessagingException(getClass().getSimpleName() + " was out of capacity (" + this.groupCapacity + ") for group '" + groupId + "', try constructing it with a larger capacity.");<NEW_LINE>if (group == null) {<NEW_LINE>if (this.groupCapacity > 0 && messages.length > this.groupCapacity) {<NEW_LINE>throw outOfCapacityException;<NEW_LINE>}<NEW_LINE>group = getMessageGroupFactory().create(groupId);<NEW_LINE>this.groupIdToMessageGroup.put(groupId, group);<NEW_LINE>upperBound = new UpperBound(this.groupCapacity);<NEW_LINE>for (Message<?> message : messages) {<NEW_LINE>upperBound.tryAcquire(-1);<NEW_LINE>group.add(message);<NEW_LINE>}<NEW_LINE>this.groupToUpperBound.put(groupId, upperBound);<NEW_LINE>} else {<NEW_LINE>upperBound = this.groupToUpperBound.get(groupId);<NEW_LINE>Assert.<MASK><NEW_LINE>for (Message<?> message : messages) {<NEW_LINE>lock.unlock();<NEW_LINE>if (!upperBound.tryAcquire(this.upperBoundTimeout)) {<NEW_LINE>unlocked = true;<NEW_LINE>throw outOfCapacityException;<NEW_LINE>}<NEW_LINE>lock.lockInterruptibly();<NEW_LINE>group.add(message);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>group.setLastModified(System.currentTimeMillis());<NEW_LINE>} finally {<NEW_LINE>if (!unlocked) {<NEW_LINE>lock.unlock();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>throw new MessagingException(INTERRUPTED_WHILE_OBTAINING_LOCK, e);<NEW_LINE>}<NEW_LINE>}
state(upperBound != null, UPPER_BOUND_MUST_NOT_BE_NULL);
27,944
private View buildView(LayoutInflater inflater) {<NEW_LINE>View view = inflater.inflate(R.layout.track_selection_dialog, null);<NEW_LINE>ViewGroup root = view.findViewById(R.id.root);<NEW_LINE>trackViews = new CheckedTextView[trackGroups.length][];<NEW_LINE>for (int groupIndex = 0; groupIndex < trackGroups.length; groupIndex++) {<NEW_LINE>TrackGroup group = trackGroups.get(groupIndex);<NEW_LINE>boolean groupIsAdaptive = trackGroupsAdaptive[groupIndex];<NEW_LINE>trackViews[groupIndex] <MASK><NEW_LINE>for (int trackIndex = 0; trackIndex < group.length; trackIndex++) {<NEW_LINE>if (trackIndex == 0) {<NEW_LINE>root.addView(inflater.inflate(R.layout.list_divider, root, false));<NEW_LINE>}<NEW_LINE>int trackViewLayoutId = groupIsAdaptive ? android.R.layout.simple_list_item_multiple_choice : android.R.layout.simple_list_item_single_choice;<NEW_LINE>CheckedTextView trackView = (CheckedTextView) inflater.inflate(trackViewLayoutId, root, false);<NEW_LINE>trackView.setText(buildTrackName(group.getFormat(trackIndex)));<NEW_LINE>if (trackInfo.getTrackFormatSupport(rendererIndex, groupIndex, trackIndex) == RendererCapabilities.FORMAT_HANDLED) {<NEW_LINE>trackView.setFocusable(true);<NEW_LINE>trackView.setTag(Pair.create(groupIndex, trackIndex));<NEW_LINE>trackView.setOnClickListener(this);<NEW_LINE>} else {<NEW_LINE>trackView.setFocusable(false);<NEW_LINE>trackView.setEnabled(false);<NEW_LINE>}<NEW_LINE>trackViews[groupIndex][trackIndex] = trackView;<NEW_LINE>root.addView(trackView);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>updateViews();<NEW_LINE>return view;<NEW_LINE>}
= new CheckedTextView[group.length];
533,396
public static double[] mean(double[][] x, boolean isAlongRows, int[] indicesOfX) {<NEW_LINE>double[] meanVector = null;<NEW_LINE>int i, j;<NEW_LINE>if (isAlongRows) {<NEW_LINE>meanVector = new double[x[indicesOfX[0]].length];<NEW_LINE>Arrays.fill(meanVector, 0.0);<NEW_LINE>for (i = 0; i < indicesOfX.length; i++) {<NEW_LINE>for (j = 0; j < x[indicesOfX[0]].length; j++) meanVector[j] += x[indicesOfX[i]][j];<NEW_LINE>}<NEW_LINE>for (j = 0; j < meanVector.length; j++) <MASK><NEW_LINE>} else {<NEW_LINE>meanVector = new double[x.length];<NEW_LINE>Arrays.fill(meanVector, 0.0);<NEW_LINE>for (i = 0; i < indicesOfX.length; i++) {<NEW_LINE>for (j = 0; j < x.length; j++) meanVector[j] += x[j][indicesOfX[i]];<NEW_LINE>}<NEW_LINE>for (j = 0; j < meanVector.length; j++) meanVector[j] /= indicesOfX.length;<NEW_LINE>}<NEW_LINE>return meanVector;<NEW_LINE>}
meanVector[j] /= indicesOfX.length;
64,245
public okhttp3.Call exportTenantThemeCall(final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/tenant-theme";<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, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new <MASK><NEW_LINE>final String[] localVarAccepts = { "application/zip", "application/json" };<NEW_LINE>final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null) {<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>}<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>String[] localVarAuthNames = new String[] { "OAuth2Security" };<NEW_LINE>return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);<NEW_LINE>}
HashMap<String, Object>();
1,016,650
public void arc(float x, float y, float radius, float start, float degrees, int segments) {<NEW_LINE>if (segments <= 0)<NEW_LINE>throw new IllegalArgumentException("segments must be > 0.");<NEW_LINE>float colorBits = color.toFloatBits();<NEW_LINE>float theta = (2 * MathUtils.PI * (degrees / 360.0f)) / segments;<NEW_LINE>float cos = MathUtils.cos(theta);<NEW_LINE>float sin = MathUtils.sin(theta);<NEW_LINE>float cx = radius * MathUtils.cos(start * MathUtils.degreesToRadians);<NEW_LINE>float cy = radius * MathUtils.sin(start * MathUtils.degreesToRadians);<NEW_LINE>if (shapeType == ShapeType.Line) {<NEW_LINE>check(ShapeType.Line, ShapeType.Filled, segments * 2 + 2);<NEW_LINE>renderer.color(colorBits);<NEW_LINE>renderer.vertex(x, y, 0);<NEW_LINE>renderer.color(colorBits);<NEW_LINE>renderer.vertex(x + cx, y + cy, 0);<NEW_LINE>for (int i = 0; i < segments; i++) {<NEW_LINE>renderer.color(colorBits);<NEW_LINE>renderer.vertex(x + cx, y + cy, 0);<NEW_LINE>float temp = cx;<NEW_LINE>cx = cos * cx - sin * cy;<NEW_LINE>cy = sin * temp + cos * cy;<NEW_LINE>renderer.color(colorBits);<NEW_LINE>renderer.vertex(x + cx, y + cy, 0);<NEW_LINE>}<NEW_LINE>renderer.color(colorBits);<NEW_LINE>renderer.vertex(x + cx, y + cy, 0);<NEW_LINE>} else {<NEW_LINE>check(ShapeType.Line, ShapeType.Filled, segments * 3 + 3);<NEW_LINE>for (int i = 0; i < segments; i++) {<NEW_LINE>renderer.color(colorBits);<NEW_LINE>renderer.vertex(x, y, 0);<NEW_LINE>renderer.color(colorBits);<NEW_LINE>renderer.vertex(x + cx, y + cy, 0);<NEW_LINE>float temp = cx;<NEW_LINE>cx = cos * cx - sin * cy;<NEW_LINE>cy = sin * temp + cos * cy;<NEW_LINE>renderer.color(colorBits);<NEW_LINE>renderer.vertex(x + cx, y + cy, 0);<NEW_LINE>}<NEW_LINE>renderer.color(colorBits);<NEW_LINE>renderer.<MASK><NEW_LINE>renderer.color(colorBits);<NEW_LINE>renderer.vertex(x + cx, y + cy, 0);<NEW_LINE>}<NEW_LINE>float temp = cx;<NEW_LINE>cx = 0;<NEW_LINE>cy = 0;<NEW_LINE>renderer.color(colorBits);<NEW_LINE>renderer.vertex(x + cx, y + cy, 0);<NEW_LINE>}
vertex(x, y, 0);
1,166,521
public VoidResult deleteBucketInventoryConfiguration(DeleteBucketInventoryConfigurationRequest deleteBucketInventoryConfigurationRequest) throws OSSException, ClientException {<NEW_LINE>assertParameterNotNull(deleteBucketInventoryConfigurationRequest, "deleteBucketInventoryConfigurationRequest");<NEW_LINE>String bucketName = deleteBucketInventoryConfigurationRequest.getBucketName();<NEW_LINE>String inventoryId = deleteBucketInventoryConfigurationRequest.getInventoryId();<NEW_LINE>assertParameterNotNull(inventoryId, "id");<NEW_LINE>assertParameterNotNull(bucketName, "bucketName");<NEW_LINE>ensureBucketNameValid(bucketName);<NEW_LINE>Map<String, String> params = new HashMap<String, String>();<NEW_LINE><MASK><NEW_LINE>params.put(SUBRESOURCE_INVENTORY_ID, inventoryId);<NEW_LINE>RequestMessage request = new OSSRequestMessageBuilder(getInnerClient()).setEndpoint(getEndpoint(deleteBucketInventoryConfigurationRequest)).setMethod(HttpMethod.DELETE).setBucket(bucketName).setParameters(params).setOriginalRequest(deleteBucketInventoryConfigurationRequest).build();<NEW_LINE>return doOperation(request, requestIdResponseParser, bucketName, null);<NEW_LINE>}
params.put(SUBRESOURCE_INVENTORY, null);
802,309
private void startMppServer(SystemConfig system) {<NEW_LINE>if (TddlNode.getNodeId() == 0 && System.getProperty("nodeId") != null) {<NEW_LINE>TddlNode.setNodeId(Integer.parseInt(System.getProperty("nodeId")));<NEW_LINE>logger.warn("mpp set nodeId=" + TddlNode.getNodeId());<NEW_LINE>}<NEW_LINE>TaskResource.setDrdsContextHandler(new DrdsContextHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ExecutionContext makeExecutionContext(String schemaName, Map<String, Object> hintCmds, int txIsolation) {<NEW_LINE>ExecutionContext ec = new ExecutionContext();<NEW_LINE>ec.setSchemaName(schemaName);<NEW_LINE>SchemaConfig schema = config.getSchemas().get(ec.getSchemaName());<NEW_LINE><MASK><NEW_LINE>if (!dataSource.isInited()) {<NEW_LINE>dataSource.init();<NEW_LINE>}<NEW_LINE>ec.getExtraCmds().putAll(dataSource.getConnectionProperties());<NEW_LINE>ec.setStats(dataSource.getStatistics());<NEW_LINE>ec.setPhysicalRecorder(dataSource.getPhysicalRecorder());<NEW_LINE>ec.setRecorder(dataSource.getRecorder());<NEW_LINE>ec.setExecutorService(dataSource.borrowExecutorService());<NEW_LINE>ec.setInternalSystemSql(false);<NEW_LINE>ec.setUsingPhySqlCache(true);<NEW_LINE>ec.setExecuteMode(ExecutorMode.MPP);<NEW_LINE>ec.setPrivilegeContext(new MppPrivilegeContext());<NEW_LINE>ec.setTxIsolation(txIsolation);<NEW_LINE>ec.putAllHintCmds(hintCmds);<NEW_LINE>return ec;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>Server mppServer = new MppServer(TddlNode.getNodeId(), system.isMppServer(), system.isMppWorker(), this.serverHost, system.getRpcPort());<NEW_LINE>ServiceProvider.getInstance().setServer(mppServer);<NEW_LINE>mppServer.run();<NEW_LINE>logger.info("MppServer is started on " + system.getRpcPort());<NEW_LINE>}
TDataSource dataSource = schema.getDataSource();
359,851
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>getActiveTservers_result result = new getActiveTservers_result();<NEW_LINE>if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) {<NEW_LINE>result.sec = (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) e;<NEW_LINE>result.setSecIsSet(true);<NEW_LINE>msg = result;<NEW_LINE>} else if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException) {<NEW_LINE>result.tnase = (org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException) e;<NEW_LINE>result.setTnaseIsSet(true);<NEW_LINE>msg = result;<NEW_LINE>} else if (e instanceof org.apache.thrift.transport.TTransportException) {<NEW_LINE><MASK><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.thrift.protocol.TMessageType.EXCEPTION;<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>}
_LOGGER.error("TTransportException inside handler", e);
436,180
public static ByteBuf serializeSingleMessageInBatchWithPayload(MessageMetadata msg, ByteBuf payload, ByteBuf batchBuffer) {<NEW_LINE>// build single message meta-data<NEW_LINE>SingleMessageMetadata smm = LOCAL_SINGLE_MESSAGE_METADATA.get();<NEW_LINE>smm.clear();<NEW_LINE>if (msg.hasPartitionKey()) {<NEW_LINE>smm.setPartitionKey(msg.getPartitionKey());<NEW_LINE>smm.<MASK><NEW_LINE>}<NEW_LINE>if (msg.hasOrderingKey()) {<NEW_LINE>smm.setOrderingKey(msg.getOrderingKey());<NEW_LINE>}<NEW_LINE>for (int i = 0; i < msg.getPropertiesCount(); i++) {<NEW_LINE>smm.addProperty().setKey(msg.getPropertyAt(i).getKey()).setValue(msg.getPropertyAt(i).getValue());<NEW_LINE>}<NEW_LINE>if (msg.hasEventTime()) {<NEW_LINE>smm.setEventTime(msg.getEventTime());<NEW_LINE>}<NEW_LINE>if (msg.hasSequenceId()) {<NEW_LINE>smm.setSequenceId(msg.getSequenceId());<NEW_LINE>}<NEW_LINE>if (msg.hasNullValue()) {<NEW_LINE>smm.setNullValue(msg.isNullValue());<NEW_LINE>}<NEW_LINE>if (msg.hasNullPartitionKey()) {<NEW_LINE>smm.setNullPartitionKey(msg.isNullPartitionKey());<NEW_LINE>}<NEW_LINE>return serializeSingleMessageInBatchWithPayload(smm, payload, batchBuffer);<NEW_LINE>}
setPartitionKeyB64Encoded(msg.isPartitionKeyB64Encoded());
193,265
private void updateStoreTableSize() throws ConnectionUnavailableException {<NEW_LINE>if (cacheEnabled && !queryStoreWithoutCheckingCache.get()) {<NEW_LINE>readWriteLock.writeLock().lock();<NEW_LINE>try {<NEW_LINE>// check if we need to check the size of store<NEW_LINE>if (storeTableSize == -1 || (!cacheExpiryEnabled && storeSizeLastCheckedTime < siddhiAppContext.getTimestampGenerator().currentTime() - storeSizeCheckInterval)) {<NEW_LINE>StateEvent stateEventForCaching = new StateEvent(1, 0);<NEW_LINE>queryStoreWithoutCheckingCache.set(Boolean.TRUE);<NEW_LINE>try {<NEW_LINE>StreamEvent preLoadedData = query(<MASK><NEW_LINE>storeTableSize = findEventChunkSize(preLoadedData);<NEW_LINE>storeSizeLastCheckedTime = siddhiAppContext.getTimestampGenerator().currentTime();<NEW_LINE>} finally {<NEW_LINE>queryStoreWithoutCheckingCache.set(Boolean.FALSE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>readWriteLock.writeLock().unlock();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
stateEventForCaching, compiledConditionForCaching, compiledSelectionForCaching, outputAttributesForCaching);
1,015,247
private void registerAddMapLayerReceiver(@NonNull MapActivity mapActivity) {<NEW_LINE>final WeakReference<MapActivity> mapActivityRef = new WeakReference<>(mapActivity);<NEW_LINE>BroadcastReceiver addMapLayerReceiver = new BroadcastReceiver() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onReceive(Context context, Intent intent) {<NEW_LINE>MapActivity mapActivity = mapActivityRef.get();<NEW_LINE>String layerId = intent.getStringExtra(AIDL_OBJECT_ID);<NEW_LINE>String packName = intent.getStringExtra(AIDL_PACKAGE_NAME);<NEW_LINE>if (mapActivity != null && layerId != null && packName != null) {<NEW_LINE>ConnectedApp connectedApp = connectedApps.get(packName);<NEW_LINE>if (connectedApp != null) {<NEW_LINE>AidlMapLayerWrapper layer = connectedApp.getLayers().get(layerId);<NEW_LINE>if (layer != null) {<NEW_LINE>OsmandMapLayer mapLayer = connectedApp.getMapLayers().get(layerId);<NEW_LINE>if (mapLayer != null) {<NEW_LINE>mapActivity.getMapView().removeLayer(mapLayer);<NEW_LINE>}<NEW_LINE>mapLayer = new AidlMapLayer(mapActivity, <MASK><NEW_LINE>mapActivity.getMapView().addLayer(mapLayer, layer.getZOrder());<NEW_LINE>connectedApp.getMapLayers().put(layerId, mapLayer);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>registerReceiver(addMapLayerReceiver, mapActivity, AIDL_ADD_MAP_LAYER);<NEW_LINE>}
layer, connectedApp.getPack());
1,627,751
public ComponentDeploymentSpecification unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ComponentDeploymentSpecification componentDeploymentSpecification = new ComponentDeploymentSpecification();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("componentVersion", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>componentDeploymentSpecification.setComponentVersion(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("configurationUpdate", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>componentDeploymentSpecification.setConfigurationUpdate(ComponentConfigurationUpdateJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("runWith", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>componentDeploymentSpecification.setRunWith(ComponentRunWithJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return componentDeploymentSpecification;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
312,419
private static void addContent(WorksheetPart sheet) throws JAXBException, Docx4JException {<NEW_LINE>// Minimal content already present<NEW_LINE>SheetData sheetData = sheet.getContents().getSheetData();<NEW_LINE>// Now add<NEW_LINE>Row row = Context.getsmlObjectFactory().createRow();<NEW_LINE>Cell cell = Context.getsmlObjectFactory().createCell();<NEW_LINE>cell.setV("1234");<NEW_LINE>row.getC().add(cell);<NEW_LINE>row.getC().add(createCell("hello world!"));<NEW_LINE>sheetData.getRow().add(row);<NEW_LINE>// ADD A COMMENT TO CELL A1<NEW_LINE>CommentsPart cp = new CommentsPart();<NEW_LINE>cp.setContents(createComment("A1"));<NEW_LINE>sheet.addTargetPart(cp);<NEW_LINE>// Add <legacyDrawing r:id="rId1"/><NEW_LINE>VMLPart vmlPart = new VMLPart();<NEW_LINE>// corresponds to A1<NEW_LINE>vmlPart.setContents(getVml(0, 0));<NEW_LINE>// you'll need extra VML for each comment<NEW_LINE>Relationship rel = sheet.addTargetPart(vmlPart);<NEW_LINE>CTLegacyDrawing legacyDrawing = Context.getsmlObjectFactory().createCTLegacyDrawing();<NEW_LINE>legacyDrawing.<MASK><NEW_LINE>sheet.getContents().setLegacyDrawing(legacyDrawing);<NEW_LINE>}
setId(rel.getId());
900,394
public RubyValue gsub_danger(RubyArray args, RubyBlock block) {<NEW_LINE>if (null == block) {<NEW_LINE>RubyString result = gsub(this, args);<NEW_LINE>if (result == this) {<NEW_LINE>return RubyConstant.QNIL;<NEW_LINE>} else {<NEW_LINE>return setString(result.toString());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (null == args || args.size() != 1) {<NEW_LINE>int actual_argc = (null == args) ? 0 : args.size();<NEW_LINE>throw new RubyException(RubyRuntime.<MASK><NEW_LINE>}<NEW_LINE>if (!(args.get(0) instanceof RubyRegexp)) {<NEW_LINE>throw new RubyException(RubyRuntime.ArgumentErrorClass, "wrong argument type " + args.get(0).getRubyClass().getName() + " (expected Regexp)");<NEW_LINE>}<NEW_LINE>RubyRegexp r = (RubyRegexp) args.get(0);<NEW_LINE>return setString(r.gsub(this, block).toString());<NEW_LINE>}<NEW_LINE>}
ArgumentErrorClass, "in `gsub!': wrong number of arguments (" + actual_argc + " for 1)");
587,100
private synchronized void doParse(Element element, ParserContext parserContext) {<NEW_LINE>String[] basePackages = StringUtils.tokenizeToStringArray(element.getAttribute("base-package"), ",; \t\n");<NEW_LINE>AopNamespaceUtils.registerAutoProxyCreatorIfNecessary(parserContext, element);<NEW_LINE>if (!parserContext.getRegistry().containsBeanDefinition(CacheAdvisor.CACHE_ADVISOR_BEAN_NAME)) {<NEW_LINE>Object eleSource = parserContext.extractSource(element);<NEW_LINE>RootBeanDefinition configMapDef = new RootBeanDefinition(ConfigMap.class);<NEW_LINE>configMapDef.setSource(eleSource);<NEW_LINE>configMapDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);<NEW_LINE>String configMapName = parserContext.<MASK><NEW_LINE>RootBeanDefinition interceptorDef = new RootBeanDefinition(JetCacheInterceptor.class);<NEW_LINE>interceptorDef.setSource(eleSource);<NEW_LINE>interceptorDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);<NEW_LINE>interceptorDef.getPropertyValues().addPropertyValue(new PropertyValue("cacheConfigMap", new RuntimeBeanReference(configMapName)));<NEW_LINE>String interceptorName = parserContext.getReaderContext().registerWithGeneratedName(interceptorDef);<NEW_LINE>RootBeanDefinition advisorDef = new RootBeanDefinition(CacheAdvisor.class);<NEW_LINE>advisorDef.setSource(eleSource);<NEW_LINE>advisorDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);<NEW_LINE>advisorDef.getPropertyValues().addPropertyValue(new PropertyValue("adviceBeanName", interceptorName));<NEW_LINE>advisorDef.getPropertyValues().addPropertyValue(new PropertyValue("cacheConfigMap", new RuntimeBeanReference(configMapName)));<NEW_LINE>advisorDef.getPropertyValues().addPropertyValue(new PropertyValue("basePackages", basePackages));<NEW_LINE>parserContext.getRegistry().registerBeanDefinition(CacheAdvisor.CACHE_ADVISOR_BEAN_NAME, advisorDef);<NEW_LINE>CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(element.getTagName(), eleSource);<NEW_LINE>compositeDef.addNestedComponent(new BeanComponentDefinition(configMapDef, configMapName));<NEW_LINE>compositeDef.addNestedComponent(new BeanComponentDefinition(interceptorDef, interceptorName));<NEW_LINE>compositeDef.addNestedComponent(new BeanComponentDefinition(advisorDef, CacheAdvisor.CACHE_ADVISOR_BEAN_NAME));<NEW_LINE>parserContext.registerComponent(compositeDef);<NEW_LINE>}<NEW_LINE>}
getReaderContext().registerWithGeneratedName(configMapDef);
685,821
public Object load(BeanProperty prop) {<NEW_LINE>if (!rawSql && !prop.isLoadProperty(ctx.isDraftQuery())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if ((bean == null) || (lazyLoading && ebi.isLoadedProperty(prop.propertyIndex())) || (type != null && !prop.isAssignableFrom(type))) {<NEW_LINE>// ignore this property<NEW_LINE>// ... null: bean already in persistence context<NEW_LINE>// ... lazyLoading: partial bean that is lazy loading<NEW_LINE>// ... type: inheritance and not assignable to this instance<NEW_LINE>prop.loadIgnore(ctx);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return prop.readSet(ctx, bean);<NEW_LINE>} catch (Exception e) {<NEW_LINE>bean._ebean_getIntercept().setLoadError(<MASK><NEW_LINE>ctx.handleLoadError(prop.fullName(), e);<NEW_LINE>return prop.getValue(bean);<NEW_LINE>}<NEW_LINE>}
prop.propertyIndex(), e);
456,236
private void jbInit() throws Exception {<NEW_LINE>setIconImage(Images.getImage2(InfoBuilder.ACTION_InfoSchedule + "16"));<NEW_LINE>mainPanel.setLayout(mainLayout);<NEW_LINE>parameterPanel.setLayout(parameterLayout);<NEW_LINE>labelResourceType.setHorizontalTextPosition(SwingConstants.LEADING);<NEW_LINE>labelResourceType.setText(Msg.translate(Env.getCtx(), "S_ResourceType_ID"));<NEW_LINE>labelResource.setHorizontalTextPosition(SwingConstants.LEADING);<NEW_LINE>labelResource.setText(Msg.translate(Env.getCtx(), "S_Resource_ID"));<NEW_LINE>bPrevious.setMargin(new Insets(0, 0, 0, 0));<NEW_LINE>bPrevious.setText("<");<NEW_LINE>labelDate.setText(Msg.translate(Env.getCtx(), "Date"));<NEW_LINE>bNext.setMargin(new Insets(0, 0, 0, 0));<NEW_LINE>bNext.setText(">");<NEW_LINE>getContentPane().add(mainPanel, BorderLayout.CENTER);<NEW_LINE>mainPanel.add(parameterPanel, BorderLayout.NORTH);<NEW_LINE>parameterPanel.add(labelResourceType, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(8, 8, 0, 0), 0, 0));<NEW_LINE>parameterPanel.add(fieldResourceType, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 8, 8, 4), 0, 0));<NEW_LINE>parameterPanel.add(labelResource, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(8, 4, 0, <MASK><NEW_LINE>parameterPanel.add(fieldResource, new GridBagConstraints(1, 1, 1, 1, 0.5, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 8, 4), 0, 0));<NEW_LINE>parameterPanel.add(bPrevious, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 8, 8, 0), 0, 0));<NEW_LINE>parameterPanel.add(labelDate, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(8, 0, 0, 0), 0, 0));<NEW_LINE>parameterPanel.add(fieldDate, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 8, 0), 0, 0));<NEW_LINE>parameterPanel.add(bNext, new GridBagConstraints(4, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 8, 8), 0, 0));<NEW_LINE>//<NEW_LINE>mainPanel.add(new JScrollPane(timePane), BorderLayout.CENTER);<NEW_LINE>timePane.add(daySchedule, Msg.getMsg(Env.getCtx(), "Day"));<NEW_LINE>timePane.add(weekSchedule, Msg.getMsg(Env.getCtx(), "Week"));<NEW_LINE>timePane.add(monthSchedule, Msg.getMsg(Env.getCtx(), "Month"));<NEW_LINE>// timePane.add(daySchedule, Msg.getMsg(Env.getCtx(), "Day"));<NEW_LINE>// timePane.add(weekSchedule, Msg.getMsg(Env.getCtx(), "Week"));<NEW_LINE>// timePane.add(monthSchedule, Msg.getMsg(Env.getCtx(), "Month"));<NEW_LINE>timePane.addChangeListener(this);<NEW_LINE>//<NEW_LINE>mainPanel.add(confirmPanel, BorderLayout.SOUTH);<NEW_LINE>//<NEW_LINE>this.getContentPane().add(statusBar, BorderLayout.SOUTH);<NEW_LINE>}
4), 0, 0));
1,670,444
protected String doIt() throws Exception {<NEW_LINE>m_C_ProjectPhase_ID = getRecord_ID();<NEW_LINE>log.info("doIt - C_ProjectPhase_ID=" + m_C_ProjectPhase_ID);<NEW_LINE>if (m_C_ProjectPhase_ID == 0)<NEW_LINE>throw new IllegalArgumentException("C_ProjectPhase_ID == 0");<NEW_LINE>MProjectPhase fromPhase = new MProjectPhase(getCtx(), m_C_ProjectPhase_ID, get_TrxName());<NEW_LINE>MProject fromProject = ProjectGenOrder.getProject(getCtx(), fromPhase.getC_Project_ID(), get_TrxName());<NEW_LINE>MOrder order = new MOrder(fromProject, true, MOrder.DocSubType_OnCredit);<NEW_LINE>order.setDescription(order.getDescription() + " - " + fromPhase.getName());<NEW_LINE>if (!order.save())<NEW_LINE>throw new Exception("Could not create Order");<NEW_LINE>// Create an order on Phase Level<NEW_LINE>if (fromPhase.getM_Product_ID() != 0) {<NEW_LINE>MOrderLine ol = new MOrderLine(order);<NEW_LINE>ol.setLine(fromPhase.getSeqNo());<NEW_LINE>StringBuffer sb = new StringBuffer(fromPhase.getName());<NEW_LINE>if (fromPhase.getDescription() != null && fromPhase.getDescription().length() > 0)<NEW_LINE>sb.append(" - ").append(fromPhase.getDescription());<NEW_LINE>ol.setDescription(sb.toString());<NEW_LINE>//<NEW_LINE>ol.setM_Product_ID(<MASK><NEW_LINE>ol.setQty(fromPhase.getQty());<NEW_LINE>ol.setPrice();<NEW_LINE>if (fromPhase.getPriceActual() != null && fromPhase.getPriceActual().compareTo(Env.ZERO) != 0)<NEW_LINE>ol.setPrice(fromPhase.getPriceActual());<NEW_LINE>ol.setTax();<NEW_LINE>if (!ol.save())<NEW_LINE>log.error("doIt - Lines not generated");<NEW_LINE>return "@C_Order_ID@ " + order.getDocumentNo() + " (1)";<NEW_LINE>}<NEW_LINE>// Project Tasks<NEW_LINE>int count = 0;<NEW_LINE>List<I_C_ProjectTask> tasks = fromPhase.getTasks();<NEW_LINE>for (int i = 0; i < tasks.size(); i++) {<NEW_LINE>MOrderLine ol = new MOrderLine(order);<NEW_LINE>ol.setLine(tasks.get(i).getSeqNo());<NEW_LINE>StringBuffer sb = new StringBuffer(tasks.get(i).getName());<NEW_LINE>if (tasks.get(i).getDescription() != null && tasks.get(i).getDescription().length() > 0)<NEW_LINE>sb.append(" - ").append(tasks.get(i).getDescription());<NEW_LINE>ol.setDescription(sb.toString());<NEW_LINE>//<NEW_LINE>ol.setM_Product_ID(tasks.get(i).getM_Product_ID(), true);<NEW_LINE>ol.setQty(tasks.get(i).getQty());<NEW_LINE>ol.setPrice();<NEW_LINE>ol.setTax();<NEW_LINE>if (ol.save())<NEW_LINE>count++;<NEW_LINE>}<NEW_LINE>// for all lines<NEW_LINE>if (tasks.size() != count)<NEW_LINE>log.error("doIt - Lines difference - ProjectTasks=" + tasks.size() + " <> Saved=" + count);<NEW_LINE>return "@C_Order_ID@ " + order.getDocumentNo() + " (" + count + ")";<NEW_LINE>}
fromPhase.getM_Product_ID(), true);
1,083,145
protected void createTrapezium(DXFVertex start, DXFVertex end) {<NEW_LINE>// we start at the start side<NEW_LINE>double c = 0.0;<NEW_LINE>if (start.getStartWidth() > 0.0) {<NEW_LINE>c = start.getStartWidth() / 2;<NEW_LINE>} else {<NEW_LINE>c = this.p.getStartWidth() / 2;<NEW_LINE>}<NEW_LINE>Vector v = this.p.getExtrusion().getNormal();<NEW_LINE>// Vector v = DXFConstants.DEFAULT_Z_AXIS_VECTOR;<NEW_LINE>Vector x = MathUtils.getVector(start.getPoint(), end.getPoint());<NEW_LINE>// calculate the y vector<NEW_LINE>v = MathUtils.crossProduct(v, x);<NEW_LINE><MASK><NEW_LINE>point1 = MathUtils.getPointOfStraightLine(start.getPoint(), v, c);<NEW_LINE>point2 = MathUtils.getPointOfStraightLine(start.getPoint(), v, (-1.0 * c));<NEW_LINE>// on the end side<NEW_LINE>if (start.getEndWidth() > 0.0) {<NEW_LINE>c = start.getEndWidth() / 2;<NEW_LINE>} else {<NEW_LINE>c = this.p.getEndWidth() / 2;<NEW_LINE>}<NEW_LINE>point3 = MathUtils.getPointOfStraightLine(end.getPoint(), v, (-1.0 * c));<NEW_LINE>point4 = MathUtils.getPointOfStraightLine(end.getPoint(), v, c);<NEW_LINE>}
v = MathUtils.normalize(v);
927,686
private MOrder createCounterDoc() {<NEW_LINE>// Is this itself a counter doc ?<NEW_LINE>if (getRef_Order_ID() != 0)<NEW_LINE>return null;<NEW_LINE>// Org Must be linked to BPartner<NEW_LINE>MOrg org = MOrg.get(getCtx(), getAD_Org_ID());<NEW_LINE>int counterC_BPartner_ID = org.getLinkedC_BPartner_ID(get_TrxName());<NEW_LINE>if (counterC_BPartner_ID == 0)<NEW_LINE>return null;<NEW_LINE>// Business Partner needs to be linked to Org<NEW_LINE>MBPartner bp = new MBPartner(getCtx(), getC_BPartner_ID(), get_TrxName());<NEW_LINE>int counterAD_Org_ID = bp.getAD_OrgBP_ID_Int();<NEW_LINE>if (counterAD_Org_ID == 0)<NEW_LINE>return null;<NEW_LINE>MBPartner counterBP = new MBPartner(getCtx(), counterC_BPartner_ID, get_TrxName());<NEW_LINE>MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID, get_TrxName());<NEW_LINE>log.info("Counter BP=" + counterBP.getName());<NEW_LINE>// Document Type<NEW_LINE>int C_DocTypeTarget_ID = 0;<NEW_LINE>MDocTypeCounter counterDT = MDocTypeCounter.getCounterDocType(getCtx(), getC_DocType_ID());<NEW_LINE>if (counterDT != null) {<NEW_LINE>log.fine(counterDT.toString());<NEW_LINE>if (!counterDT.isCreateCounter() || !counterDT.isValid())<NEW_LINE>return null;<NEW_LINE>C_DocTypeTarget_ID = counterDT.getCounter_C_DocType_ID();<NEW_LINE>} else // indirect<NEW_LINE>{<NEW_LINE>C_DocTypeTarget_ID = MDocTypeCounter.getCounterDocType_ID(getCtx(), getC_DocType_ID());<NEW_LINE>log.fine("Indirect C_DocTypeTarget_ID=" + C_DocTypeTarget_ID);<NEW_LINE>if (C_DocTypeTarget_ID <= 0)<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Deep Copy<NEW_LINE>MOrder counter = copyFrom(this, getDateOrdered(), C_DocTypeTarget_ID, !isSOTrx(), true, false, get_TrxName());<NEW_LINE>//<NEW_LINE>counter.setAD_Org_ID(counterAD_Org_ID);<NEW_LINE>counter.setM_Warehouse_ID(counterOrgInfo.getM_Warehouse_ID());<NEW_LINE>//<NEW_LINE>counter.setBPartner(counterBP);<NEW_LINE>// default is date ordered<NEW_LINE>counter.setDatePromised(getDatePromised());<NEW_LINE>// Refernces (Should not be required<NEW_LINE>counter.setSalesRep_ID(getSalesRep_ID());<NEW_LINE>counter.saveEx(get_TrxName());<NEW_LINE>// Update copied lines<NEW_LINE>MOrderLine[] counterLines = counter.getLines(true, null);<NEW_LINE>for (int i = 0; i < counterLines.length; i++) {<NEW_LINE>MOrderLine counterLine = counterLines[i];<NEW_LINE>// copies header values (BP, etc.)<NEW_LINE>counterLine.setOrder(counter);<NEW_LINE>counterLine.setPrice();<NEW_LINE>counterLine.setTax();<NEW_LINE>counterLine.saveEx(get_TrxName());<NEW_LINE>}<NEW_LINE>log.fine(counter.toString());<NEW_LINE>// Document Action<NEW_LINE>if (counterDT != null) {<NEW_LINE>if (counterDT.getDocAction() != null) {<NEW_LINE>counter.<MASK><NEW_LINE>counter.processIt(counterDT.getDocAction());<NEW_LINE>counter.saveEx(get_TrxName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return counter;<NEW_LINE>}
setDocAction(counterDT.getDocAction());
51,711
private Map<String, Object> createResponsesObject(final StructrSchemaDefinition schema, final String tag) {<NEW_LINE>final Map<String, Object> <MASK><NEW_LINE>// 200 OK<NEW_LINE>responses.put("ok", new OpenAPIRequestResponse("The request was executed successfully.", new OpenAPISchemaReference("ok"), new OpenAPIExampleAnyResult(List.of(), false)));<NEW_LINE>// 201 Created<NEW_LINE>responses.put("created", new OpenAPIRequestResponse("Created", new OpenAPISchemaReference("#/components/schemas/CreateResponse"), new OpenAPIExampleAnyResult(Arrays.asList(NodeServiceCommand.getNextUuid()), true)));<NEW_LINE>// 400 Bad Request<NEW_LINE>responses.put("badRequest", new OpenAPIRequestResponse("The request was not valid and should not be repeated without modifications.", new OpenAPISchemaReference("#/components/schemas/RESTResponse"), Map.of("code", "400", "message", "Please specify sync file", "errors", List.of())));<NEW_LINE>// 401 Unauthorized<NEW_LINE>responses.put("unauthorized", new OpenAPIRequestResponse("Access denied or wrong password.\n\nIf the error message is \"Access denied\", you need to configure a resource access grant for this endpoint." + " otherwise the error message is \"Wrong username or password, or user is blocked. Check caps lock. Note: Username is case sensitive!\".", new OpenAPISchemaReference("#/components/schemas/RESTResponse"), Map.of("code", "401", "message", "Access denied", "errors", List.of())));<NEW_LINE>responses.put("loginError", new OpenAPIRequestResponse("Wrong username or password, or user is blocked.", new OpenAPISchemaReference("#/components/schemas/RESTResponse"), Map.of("code", "401", "message", "Wrong username or password, or user is blocked. Check caps lock. Note: Username is case sensitive!")));<NEW_LINE>responses.put("loginResponse", new OpenAPIRequestResponse("Login successful.", new OpenAPISchemaReference("LoginResponse")));<NEW_LINE>responses.put("tokenError", new OpenAPIRequestResponse("The given access token or refresh token is invalid.", new OpenAPISchemaReference("#/components/schemas/RESTResponse"), Map.of("code", "401", "message", "The given access_token or refresh_token is invalid!")));<NEW_LINE>responses.put("tokenResponse", new OpenAPIRequestResponse("The request was executed successfully.", new OpenAPISchemaReference("TokenResponse")));<NEW_LINE>// 403 Forbidden<NEW_LINE>responses.put("forbidden", new OpenAPIRequestResponse("The request was denied due to insufficient access rights to the object.", new OpenAPISchemaReference("#/components/schemas/RESTResponse"), Map.of("code", "403", "message", "Forbidden", "errors", List.of())));<NEW_LINE>// 404 Not Found<NEW_LINE>responses.put("notFound", new OpenAPIRequestResponse("The desired object was not found.", new OpenAPISchemaReference("#/components/schemas/RESTResponse"), Map.of("code", "404", "message", "Not Found", "errors", List.of())));<NEW_LINE>// 422 Unprocessable Entity<NEW_LINE>responses.put("validationError", new OpenAPIRequestResponse("The request entity was not valid, or validation failed.", new OpenAPISchemaReference("#/components/schemas/RESTResponse"), Map.of("code", "422", "message", "Unable to commit transaction, validation failed", "errors", List.of(Map.of("type", "ExampleType", "property", "name", "token", "must_not_be_empty"), Map.of("type", "ExampleType", "property", "name", "token", "must_match", "detail", "[^\\\\/\\\\x00]+")))));<NEW_LINE>final StructrTypeDefinitions definitions = schema.getTypeDefinitionsObject();<NEW_LINE>responses.putAll(definitions.serializeOpenAPIResponses(responses, tag));<NEW_LINE>return responses;<NEW_LINE>}
responses = new LinkedHashMap<>();
1,707,869
public void process(ActionRequest req, ActionResponse res, String path) throws IOException, ServletException {<NEW_LINE>ActionRequestImpl reqImpl = (ActionRequestImpl) req;<NEW_LINE>ActionResponseImpl resImpl = (ActionResponseImpl) res;<NEW_LINE>HttpServletRequest httpReq = reqImpl.getHttpServletRequest();<NEW_LINE>HttpServletResponse httpRes = resImpl.getHttpServletResponse();<NEW_LINE>ActionMapping mapping = processMapping(httpReq, httpRes, path);<NEW_LINE>if (mapping == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!processRoles(httpReq, httpRes, mapping)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ActionForm form = processActionForm(httpReq, httpRes, mapping);<NEW_LINE>processPopulate(httpReq, httpRes, form, mapping);<NEW_LINE>if (!processValidateAction(httpReq, httpRes, form, mapping)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PortletAction action = (PortletAction) processActionCreate(httpReq, httpRes, mapping);<NEW_LINE>if (action == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PortletConfigImpl portletConfig = (PortletConfigImpl) req.getAttribute(WebKeys.JAVAX_PORTLET_CONFIG);<NEW_LINE>try {<NEW_LINE>action.processAction(mapping, form, portletConfig, req, res);<NEW_LINE>} catch (Exception e) {<NEW_LINE>String exceptionId = WebKeys.PORTLET_STRUTS_EXCEPTION + StringPool.PERIOD + portletConfig.getPortletId();<NEW_LINE>req.setAttribute(exceptionId, e);<NEW_LINE>}<NEW_LINE>String forward = (String) req.getAttribute(WebKeys.PORTLET_STRUTS_FORWARD);<NEW_LINE>if (forward != null) {<NEW_LINE>String queryString = StringPool.BLANK;<NEW_LINE>int pos = forward.indexOf("?");<NEW_LINE>if (pos != -1) {<NEW_LINE>queryString = forward.substring(pos + 1, forward.length());<NEW_LINE>forward = forward.substring(0, pos);<NEW_LINE>}<NEW_LINE>ActionForward actionForward = mapping.findForward(forward);<NEW_LINE>if ((actionForward != null) && (actionForward.getRedirect())) {<NEW_LINE>if (forward.startsWith("/")) {<NEW_LINE>PortletURLImpl forwardURL = (PortletURLImpl) resImpl.createRenderURL();<NEW_LINE>forwardURL.setParameter("struts_action", forward);<NEW_LINE>StrutsURLEncoder.setParameters(forwardURL, queryString);<NEW_LINE>forward = forwardURL.toString();<NEW_LINE>}<NEW_LINE>if (forward.contains("?")) {<NEW_LINE>forward = forward + "&r=" + System.currentTimeMillis();<NEW_LINE>} else {<NEW_LINE>forward = forward + "?r=" + System.currentTimeMillis();<NEW_LINE>}<NEW_LINE>res.sendRedirect(SecurityUtils<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.stripReferer(httpReq, forward));
1,774,900
private List<ViewHeaderPropertiesGroup> toViewHeaderProperties(final InvoiceCandidatesAmtSelectionSummary summary) {<NEW_LINE>final ImmutableList.Builder<ViewHeaderPropertiesGroup> result = ImmutableList.<ViewHeaderPropertiesGroup>builder().add(ViewHeaderPropertiesGroup.builder().entry(ViewHeaderProperty.builder().caption(msgBL.translatable("NetIsApprovedForInvoicing")).value(summary.getTotalNetAmtApprovedAsTranslatableString()).build()).entry(ViewHeaderProperty.builder().caption(msgBL.translatable("isTradingUnit")).value(summary.getHUNetAmtApprovedAsTranslatableString()).build()).entry(ViewHeaderProperty.builder().caption(msgBL.translatable("IsGoods")).value(summary.getCUNetAmtApprovedAsTranslatableString()).build()).build()).add(ViewHeaderPropertiesGroup.builder().entry(ViewHeaderProperty.builder().caption(msgBL.translatable("NetIsNotApprovedForInvoicing")).value(summary.getTotalNetAmtNotApprovedAsTranslatableString()).build()).entry(ViewHeaderProperty.builder().caption(msgBL.translatable("isTradingUnit")).value(summary.getHUNetAmtNotApprovedAsTranslatableString()).build()).entry(ViewHeaderProperty.builder().caption(msgBL.translatable("IsGoods")).value(summary.getCUNetAmtNotApprovedAsTranslatableString()).build<MASK><NEW_LINE>if (summary.getCountTotalToRecompute() > 0) {<NEW_LINE>result.add(ViewHeaderPropertiesGroup.builder().entry(ViewHeaderProperty.builder().caption(msgBL.translatable("IsToRecompute")).value(summary.getCountTotalToRecompute()).build()).build());<NEW_LINE>}<NEW_LINE>return result.build();<NEW_LINE>}
()).build());
393,023
public static boolean installEnterprisePolicy(AppAlias.Alias alias, boolean userOnly) {<NEW_LINE>if (SystemUtilities.isWindows()) {<NEW_LINE>String key = String.format("Software\\Policies\\%s\\%s\\Certificates", alias.getVendor(), alias.getName(true));<NEW_LINE>;<NEW_LINE>WindowsUtilities.addRegValue(userOnly ? WinReg.HKEY_CURRENT_USER : WinReg.HKEY_LOCAL_MACHINE, key, "Comment", POLICY_AUDIT_MESSAGE);<NEW_LINE>return WindowsUtilities.addRegValue(userOnly ? WinReg.HKEY_CURRENT_USER : WinReg.<MASK><NEW_LINE>} else if (SystemUtilities.isMac()) {<NEW_LINE>String policyLocation = "/Library/Preferences/";<NEW_LINE>if (userOnly) {<NEW_LINE>policyLocation = System.getProperty("user.home") + policyLocation;<NEW_LINE>}<NEW_LINE>return ShellUtilities.execute(new String[] { "defaults", "write", policyLocation + alias.getBundleId(), "EnterprisePoliciesEnabled", "-bool", "TRUE" }, true) && ShellUtilities.execute(new String[] { "defaults", "write", policyLocation + alias.getBundleId(), "Certificates", "-dict", "ImportEnterpriseRoots", "-bool", "TRUE", "Comment", "-string", POLICY_AUDIT_MESSAGE }, true);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
HKEY_LOCAL_MACHINE, key, "ImportEnterpriseRoots", 1);
642,537
public Event[] execute() {<NEW_LINE>try {<NEW_LINE>StateEvent stateEvent = new StateEvent(1, outputAttributes.length);<NEW_LINE>StreamEvent streamEvent = new StreamEvent(metaStreamEvent.getBeforeWindowData().size(), metaStreamEvent.getOnAfterWindowData().size(), metaStreamEvent.getOutputData().size());<NEW_LINE><MASK><NEW_LINE>ComplexEventChunk complexEventChunk = new ComplexEventChunk(stateEvent, stateEvent);<NEW_LINE>if (eventType == MetaStreamEvent.EventType.TABLE) {<NEW_LINE>selector.process(complexEventChunk);<NEW_LINE>} else {<NEW_LINE>throw new OnDemandQueryRuntimeException("DELETE, INSERT, UPDATE and UPDATE OR INSERT on-demand Query " + "operations consume only stream events of type \"TABLE\".");<NEW_LINE>}<NEW_LINE>return new Event[] {};<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new OnDemandQueryRuntimeException("Error executing '" + queryName + "', " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>}
stateEvent.addEvent(0, streamEvent);
548,671
public static Http.ResponseStatus toHttpResponseStatus(Status status) {<NEW_LINE>Http.ResponseStatus httpStatus;<NEW_LINE>switch(status.getCode()) {<NEW_LINE>case OK:<NEW_LINE>httpStatus = Http.ResponseStatus.create(<MASK><NEW_LINE>break;<NEW_LINE>case INVALID_ARGUMENT:<NEW_LINE>httpStatus = Http.ResponseStatus.create(400, status.getDescription());<NEW_LINE>break;<NEW_LINE>case DEADLINE_EXCEEDED:<NEW_LINE>httpStatus = Http.ResponseStatus.create(408, status.getDescription());<NEW_LINE>break;<NEW_LINE>case NOT_FOUND:<NEW_LINE>httpStatus = Http.ResponseStatus.create(404, status.getDescription());<NEW_LINE>break;<NEW_LINE>case ALREADY_EXISTS:<NEW_LINE>httpStatus = Http.ResponseStatus.create(412, status.getDescription());<NEW_LINE>break;<NEW_LINE>case PERMISSION_DENIED:<NEW_LINE>httpStatus = Http.ResponseStatus.create(403, status.getDescription());<NEW_LINE>break;<NEW_LINE>case FAILED_PRECONDITION:<NEW_LINE>httpStatus = Http.ResponseStatus.create(412, status.getDescription());<NEW_LINE>break;<NEW_LINE>case OUT_OF_RANGE:<NEW_LINE>httpStatus = Http.ResponseStatus.create(400, status.getDescription());<NEW_LINE>break;<NEW_LINE>case UNIMPLEMENTED:<NEW_LINE>httpStatus = Http.ResponseStatus.create(501, status.getDescription());<NEW_LINE>break;<NEW_LINE>case UNAVAILABLE:<NEW_LINE>httpStatus = Http.ResponseStatus.create(503, status.getDescription());<NEW_LINE>break;<NEW_LINE>case UNAUTHENTICATED:<NEW_LINE>httpStatus = Http.ResponseStatus.create(401, status.getDescription());<NEW_LINE>break;<NEW_LINE>case ABORTED:<NEW_LINE>case CANCELLED:<NEW_LINE>case DATA_LOSS:<NEW_LINE>case INTERNAL:<NEW_LINE>case RESOURCE_EXHAUSTED:<NEW_LINE>case UNKNOWN:<NEW_LINE>default:<NEW_LINE>httpStatus = Http.ResponseStatus.create(500, status.getDescription());<NEW_LINE>}<NEW_LINE>return httpStatus;<NEW_LINE>}
200, status.getDescription());
1,153,839
private static Class findInterfaceImplementation(Map<String, Object> properties, Class topClass, ClasspathImportService classpathImportService) throws ExprValidationException {<NEW_LINE>String message = "Failed to find implementation for interface " + topClass.getName();<NEW_LINE>// Allow to populate the special "class" field<NEW_LINE>if (!properties.containsKey(CLASS_PROPERTY_NAME)) {<NEW_LINE>throw new ExprValidationException(<MASK><NEW_LINE>}<NEW_LINE>Class clazz = null;<NEW_LINE>String className = (String) properties.get(CLASS_PROPERTY_NAME);<NEW_LINE>try {<NEW_LINE>clazz = JavaClassHelper.getClassForName(className, classpathImportService.getClassForNameProvider());<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>if (!className.contains(".")) {<NEW_LINE>className = topClass.getPackage().getName() + "." + className;<NEW_LINE>try {<NEW_LINE>clazz = JavaClassHelper.getClassForName(className, classpathImportService.getClassForNameProvider());<NEW_LINE>} catch (ClassNotFoundException ex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (clazz == null) {<NEW_LINE>throw new ExprValidationPropertyException(message + ", could not find class by name '" + className + "'");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!JavaClassHelper.isSubclassOrImplementsInterface(clazz, topClass)) {<NEW_LINE>throw new ExprValidationException(message + ", class " + ClassHelperPrint.getClassNameFullyQualPretty(clazz) + " does not implement the interface");<NEW_LINE>}<NEW_LINE>return clazz;<NEW_LINE>}
message + ", for interfaces please specified the '" + CLASS_PROPERTY_NAME + "' field that provides the class name either as a simple class name or fully qualified");
975,163
public void refresh(final ShardingSphereMetaData schemaMetaData, final FederationDatabaseMetaData database, final Map<String, OptimizerPlannerContext> optimizerPlanners, final Collection<String> logicDataSourceNames, final AlterIndexStatement sqlStatement, final ConfigurationProperties props) throws SQLException {<NEW_LINE>Optional<IndexSegment> renameIndex = AlterIndexStatementHandler.getRenameIndexSegment(sqlStatement);<NEW_LINE>if (!sqlStatement.getIndex().isPresent() || !renameIndex.isPresent()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String indexName = sqlStatement.getIndex().get().getIdentifier().getValue();<NEW_LINE>Optional<String> logicTableName = findLogicTableName(schemaMetaData.getDefaultSchema(), indexName);<NEW_LINE>if (logicTableName.isPresent()) {<NEW_LINE>TableMetaData tableMetaData = schemaMetaData.getDefaultSchema().get(logicTableName.get());<NEW_LINE>Preconditions.checkNotNull(tableMetaData, "Can not get the table '%s' metadata!", logicTableName.get());<NEW_LINE>tableMetaData.getIndexes().remove(indexName);<NEW_LINE>String renameIndexName = renameIndex.get().getIdentifier().getValue();<NEW_LINE>tableMetaData.getIndexes().put(renameIndexName, new IndexMetaData(renameIndexName));<NEW_LINE>SchemaAlteredEvent event = new SchemaAlteredEvent(schemaMetaData.getName());<NEW_LINE>event.<MASK><NEW_LINE>ShardingSphereEventBus.getInstance().post(event);<NEW_LINE>}<NEW_LINE>}
getAlteredTables().add(tableMetaData);
176,124
private SqlAndParamsExtractor<ImpDataLine> createInsertIntoImportTableSql() {<NEW_LINE>final String tableName = importTableDescriptor.getTableName();<NEW_LINE>final String keyColumnName = importTableDescriptor.getKeyColumnName();<NEW_LINE>final StringBuilder sqlColumns = new StringBuilder();<NEW_LINE>final StringBuilder sqlValues = new StringBuilder();<NEW_LINE>final List<ParametersExtractor<ImpDataLine>> sqlParamsExtractors = new ArrayList<>();<NEW_LINE>sqlColumns.append(keyColumnName);<NEW_LINE>sqlValues.append<MASK><NEW_LINE>//<NEW_LINE>// Standard fields<NEW_LINE>sqlColumns.append(", AD_Client_ID");<NEW_LINE>sqlValues.append(", ").append(clientId.getRepoId());<NEW_LINE>//<NEW_LINE>sqlColumns.append(", AD_Org_ID");<NEW_LINE>sqlValues.append(", ").append(orgId.getRepoId());<NEW_LINE>//<NEW_LINE>sqlColumns.append(", Created,CreatedBy,Updated,UpdatedBy,IsActive");<NEW_LINE>sqlValues.append(", now(),").append(userId.getRepoId()).append(",now(),").append(userId.getRepoId()).append(",'Y'");<NEW_LINE>//<NEW_LINE>sqlColumns.append(", Processed, I_IsImported");<NEW_LINE>sqlValues.append(", 'N', 'N'");<NEW_LINE>//<NEW_LINE>// I_LineNo<NEW_LINE>if (importTableDescriptor.getImportLineNoColumnName() != null) {<NEW_LINE>sqlColumns.append(", ").append(importTableDescriptor.getImportLineNoColumnName());<NEW_LINE>sqlValues.append(", ?");<NEW_LINE>sqlParamsExtractors.add(dataLine -> ImmutableList.of(dataLine.getFileLineNo()));<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// I_LineContext<NEW_LINE>if (importTableDescriptor.getImportLineNoColumnName() != null) {<NEW_LINE>sqlColumns.append(", ").append(importTableDescriptor.getImportLineContentColumnName());<NEW_LINE>sqlValues.append(", ?");<NEW_LINE>sqlParamsExtractors.add(dataLine -> Collections.singletonList(dataLine.getLineString()));<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// C_DataImport_Run_ID<NEW_LINE>{<NEW_LINE>Check.assumeNotNull(dataImportRunId, "dataImportRunId is not null");<NEW_LINE>sqlColumns.append(", ").append(ImportTableDescriptor.COLUMNNAME_C_DataImport_Run_ID);<NEW_LINE>sqlValues.append(", ").append(dataImportRunId.getRepoId());<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// C_DataImport_ID<NEW_LINE>if (importTableDescriptor.getDataImportConfigIdColumnName() != null && dataImportConfigId != null) {<NEW_LINE>sqlColumns.append(", ").append(importTableDescriptor.getDataImportConfigIdColumnName());<NEW_LINE>sqlValues.append(", ").append(dataImportConfigId.getRepoId());<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// I_ErrorMsg<NEW_LINE>{<NEW_LINE>final int errorMaxLength = importTableDescriptor.getErrorMsgMaxLength();<NEW_LINE>sqlColumns.append(", ").append(ImportTableDescriptor.COLUMNNAME_I_ErrorMsg);<NEW_LINE>sqlValues.append(", ?");<NEW_LINE>sqlParamsExtractors.add(dataLine -> Collections.singletonList(dataLine.getErrorMessageAsStringOrNull(errorMaxLength)));<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Values<NEW_LINE>{<NEW_LINE>for (final ImpFormatColumn column : columns) {<NEW_LINE>sqlColumns.append(", ").append(column.getColumnName());<NEW_LINE>sqlValues.append(", ?");<NEW_LINE>}<NEW_LINE>sqlParamsExtractors.add(dataLine -> dataLine.getJdbcValues(columns));<NEW_LINE>}<NEW_LINE>return SqlAndParamsExtractor.<ImpDataLine>builder().sql("INSERT INTO " + tableName + "(" + sqlColumns + ") VALUES (" + sqlValues + ")").parametersExtractors(sqlParamsExtractors).build();<NEW_LINE>}
(DB.TO_TABLESEQUENCE_NEXTVAL(tableName));
451,777
private void addListener(MessageListener listener, Collection<? extends Topic> topics) {<NEW_LINE>Assert.notNull(listener, "a valid listener is required");<NEW_LINE>Assert.notEmpty(topics, "at least one topic is required");<NEW_LINE>List<byte[]> channels = new ArrayList<>(topics.size());<NEW_LINE>List<byte[]> patterns = new ArrayList<>(topics.size());<NEW_LINE>boolean trace = logger.isTraceEnabled();<NEW_LINE>// add listener mapping<NEW_LINE>Set<Topic> set = listenerTopics.get(listener);<NEW_LINE>if (set == null) {<NEW_LINE>set = new CopyOnWriteArraySet<>();<NEW_LINE>listenerTopics.put(listener, set);<NEW_LINE>}<NEW_LINE>set.addAll(topics);<NEW_LINE>for (Topic topic : topics) {<NEW_LINE>ByteArrayWrapper holder = new ByteArrayWrapper(serialize(topic));<NEW_LINE>if (topic instanceof ChannelTopic) {<NEW_LINE>Collection<MessageListener> collection = channelMapping.get(holder);<NEW_LINE>if (collection == null) {<NEW_LINE>collection = new CopyOnWriteArraySet<>();<NEW_LINE>channelMapping.put(holder, collection);<NEW_LINE>}<NEW_LINE>collection.add(listener);<NEW_LINE>channels.add(holder.getArray());<NEW_LINE>if (trace)<NEW_LINE>logger.trace("Adding listener '" + listener + "' on channel '" + topic.getTopic() + "'");<NEW_LINE>} else if (topic instanceof PatternTopic) {<NEW_LINE>Collection<MessageListener> collection = patternMapping.get(holder);<NEW_LINE>if (collection == null) {<NEW_LINE>collection = new CopyOnWriteArraySet<>();<NEW_LINE>patternMapping.put(holder, collection);<NEW_LINE>}<NEW_LINE>collection.add(listener);<NEW_LINE>patterns.add(holder.getArray());<NEW_LINE>if (trace)<NEW_LINE>logger.trace("Adding listener '" + listener + "' for pattern '" + topic.getTopic() + "'");<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Unknown topic type '" + topic.getClass() + "'");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean wasListening = isListening();<NEW_LINE>if (isRunning()) {<NEW_LINE>lazyListen();<NEW_LINE>// check the current listening state<NEW_LINE>if (wasListening) {<NEW_LINE>CompletableFuture<Void> future = new CompletableFuture<>();<NEW_LINE>getRequiredSubscriber().addSynchronization(new SynchronizingMessageListener.SubscriptionSynchronizion(patterns, channels, () -> future.complete(null)));<NEW_LINE>getRequiredSubscriber().subscribeChannel(channels.toArray(new byte[channels.<MASK><NEW_LINE>getRequiredSubscriber().subscribePattern(patterns.toArray(new byte[patterns.size()][]));<NEW_LINE>future.join();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
size()][]));
291,322
public void apply(String globalTxId, String localTxId, String parentTxId, String callbackMethod, Object... payloads) {<NEW_LINE>String oldGlobalTxId = omegaContext.globalTxId();<NEW_LINE>String oldLocalTxId = omegaContext.localTxId();<NEW_LINE>try {<NEW_LINE>omegaContext.setGlobalTxId(globalTxId);<NEW_LINE>omegaContext.setLocalTxId(localTxId);<NEW_LINE>if (contexts.containsKey(callbackMethod)) {<NEW_LINE>CallbackContextInternal contextInternal = contexts.get(callbackMethod);<NEW_LINE>contextInternal.callbackMethod.invoke(contextInternal.target, payloads);<NEW_LINE>if (omegaContext.getAlphaMetas().isAkkaEnabled()) {<NEW_LINE>sender.send(new TxCompensateAckSucceedEvent(omegaContext.globalTxId(), omegaContext.localTxId(), parentTxId, callbackMethod));<NEW_LINE>}<NEW_LINE>LOG.<MASK><NEW_LINE>} else {<NEW_LINE>if (omegaContext.getAlphaMetas().isAkkaEnabled()) {<NEW_LINE>String msg = "callback method " + callbackMethod + " not found on CallbackContext, If it is starting, please try again later";<NEW_LINE>sender.send(new TxCompensateAckFailedEvent(omegaContext.globalTxId(), omegaContext.localTxId(), parentTxId, callbackMethod, new Exception(msg)));<NEW_LINE>LOG.error(msg);<NEW_LINE>} else {<NEW_LINE>throw new NullPointerException();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IllegalAccessException | InvocationTargetException e) {<NEW_LINE>if (omegaContext.getAlphaMetas().isAkkaEnabled()) {<NEW_LINE>sender.send(new TxCompensateAckFailedEvent(omegaContext.globalTxId(), omegaContext.localTxId(), parentTxId, callbackMethod, e));<NEW_LINE>}<NEW_LINE>LOG.error("Pre-checking for callback method " + callbackMethod + " was somehow skipped, did you forget to configure callback method checking on service startup?", e);<NEW_LINE>} finally {<NEW_LINE>omegaContext.setGlobalTxId(oldGlobalTxId);<NEW_LINE>omegaContext.setLocalTxId(oldLocalTxId);<NEW_LINE>}<NEW_LINE>}
info("Callback transaction with global tx id [{}], local tx id [{}]", globalTxId, localTxId);
862,289
/* }}} List<Number> genericCompositeToNumber */<NEW_LINE>private void submitTable(List<Object> objects, ValueList vl, /* {{{ */<NEW_LINE>String instancePrefix) {<NEW_LINE>List<CompositeData> cdlist;<NEW_LINE>Set<String> keySet = null;<NEW_LINE>Iterator<String> keyIter;<NEW_LINE>cdlist = new ArrayList<CompositeData>();<NEW_LINE>for (int i = 0; i < objects.size(); i++) {<NEW_LINE>Object obj;<NEW_LINE>obj = objects.get(i);<NEW_LINE>if (obj instanceof CompositeData) {<NEW_LINE>CompositeData cd;<NEW_LINE>cd = (CompositeData) obj;<NEW_LINE>if (i == 0)<NEW_LINE>keySet = cd.getCompositeType().keySet();<NEW_LINE>cdlist.add(cd);<NEW_LINE>} else {<NEW_LINE>Collectd.logError("GenericJMXConfValue: At least one of the " + "attributes was not of type `CompositeData', as required " + "when table is set to `true'.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>assert (keySet != null);<NEW_LINE>keyIter = keySet.iterator();<NEW_LINE>while (keyIter.hasNext()) {<NEW_LINE>String key;<NEW_LINE>List<Number> values;<NEW_LINE>key = keyIter.next();<NEW_LINE><MASK><NEW_LINE>if (values == null) {<NEW_LINE>Collectd.logError("GenericJMXConfValue: Cannot build a list of " + "numbers for key " + key + ". Most likely not all attributes " + "have this key.");<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (instancePrefix == null)<NEW_LINE>vl.setTypeInstance(key);<NEW_LINE>else<NEW_LINE>vl.setTypeInstance(instancePrefix + key);<NEW_LINE>vl.setValues(values);<NEW_LINE>Collectd.dispatchValues(vl);<NEW_LINE>}<NEW_LINE>}
values = genericCompositeToNumber(cdlist, key);
614,808
public void localeChanged() {<NEW_LINE>WorkspaceLabel.setText(S.get("FPGAWorkSpace"));<NEW_LINE>WorkSpaceButton.setText(S.get("Browse"));<NEW_LINE>EditSelectLabel.setText(S.get("EditColSel"));<NEW_LINE>EditHighligtLabel.setText(S.get("EditColHighlight"));<NEW_LINE>EditMoveLabel.setText(S.get("EditColMove"));<NEW_LINE>EditResizeLabel.setText(S.get("EditColResize"));<NEW_LINE>MappedLabel.setText(S.get("MapColor"));<NEW_LINE>SelMapLabel.setText(S.get("SelMapCol"));<NEW_LINE>SelectMapLabel.setText<MASK><NEW_LINE>SelectLabel.setText(S.get("SelectCol"));<NEW_LINE>SupressGated.setText(S.get("SupressGatedClock"));<NEW_LINE>SupressOpen.setText(S.get("SupressOpenInput"));<NEW_LINE>vhdlKeywordUpperCase.setText(S.get("VhdlKeywordUpperCase"));<NEW_LINE>editPan.setBorder(BorderFactory.createTitledBorder(S.get("EditColors")));<NEW_LINE>mapPan.setBorder(BorderFactory.createTitledBorder(S.get("MapColors")));<NEW_LINE>ReportPan.setBorder(BorderFactory.createTitledBorder(S.get("ReporterOptions")));<NEW_LINE>vhdlPan.setBorder(BorderFactory.createTitledBorder(S.get("VhdlOptions")));<NEW_LINE>}
(S.get("SelectMapCol"));
1,250,702
public Builder mergeFrom(name.abuchen.portfolio.model.proto.v1.PPortfolio other) {<NEW_LINE>if (other == name.abuchen.portfolio.model.proto.v1.PPortfolio.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (!other.getUuid().isEmpty()) {<NEW_LINE>uuid_ = other.uuid_;<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>if (!other.getName().isEmpty()) {<NEW_LINE>name_ = other.name_;<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>if (other.hasNote()) {<NEW_LINE>bitField0_ |= 0x00000001;<NEW_LINE>note_ = other.note_;<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>if (other.getIsRetired() != false) {<NEW_LINE>setIsRetired(other.getIsRetired());<NEW_LINE>}<NEW_LINE>if (other.hasReferenceAccount()) {<NEW_LINE>bitField0_ |= 0x00000002;<NEW_LINE>referenceAccount_ = other.referenceAccount_;<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>if (attributesBuilder_ == null) {<NEW_LINE>if (!other.attributes_.isEmpty()) {<NEW_LINE>if (attributes_.isEmpty()) {<NEW_LINE>attributes_ = other.attributes_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000004);<NEW_LINE>} else {<NEW_LINE>ensureAttributesIsMutable();<NEW_LINE>attributes_.addAll(other.attributes_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.attributes_.isEmpty()) {<NEW_LINE>if (attributesBuilder_.isEmpty()) {<NEW_LINE>attributesBuilder_.dispose();<NEW_LINE>attributesBuilder_ = null;<NEW_LINE>attributes_ = other.attributes_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000004);<NEW_LINE>attributesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getAttributesFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (other.hasUpdatedAt()) {<NEW_LINE>mergeUpdatedAt(other.getUpdatedAt());<NEW_LINE>}<NEW_LINE>this.mergeUnknownFields(other.unknownFields);<NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
attributesBuilder_.addAllMessages(other.attributes_);
1,479,147
final UpdateBillingGroupResult executeUpdateBillingGroup(UpdateBillingGroupRequest updateBillingGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateBillingGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateBillingGroupRequest> request = null;<NEW_LINE>Response<UpdateBillingGroupResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateBillingGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBillingGroupRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBillingGroup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateBillingGroupResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBillingGroupResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.SERVICE_ID, "billingconductor");
208,994
private void mapJsonHeaders(Map<String, Object> headers, MessageProperties amqpMessageProperties) {<NEW_LINE>if (!amqpMessageProperties.getHeaders().containsKey(JsonHeaders.TYPE_ID.replaceFirst(JsonHeaders.PREFIX, ""))) {<NEW_LINE>Map<String, String> jsonHeaders = new HashMap<>();<NEW_LINE>for (String jsonHeader : JsonHeaders.HEADERS) {<NEW_LINE>if (!JsonHeaders.RESOLVABLE_TYPE.equals(jsonHeader)) {<NEW_LINE>Object value = getHeaderIfAvailable(headers, jsonHeader, Object.class);<NEW_LINE>if (value != null) {<NEW_LINE>headers.remove(jsonHeader);<NEW_LINE>if (value instanceof Class<?>) {<NEW_LINE>value = ((Class<?>) value).getName();<NEW_LINE>}<NEW_LINE>jsonHeaders.put(jsonHeader.replaceFirst(JsonHeaders.PREFIX, ""<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>amqpMessageProperties.getHeaders().putAll(jsonHeaders);<NEW_LINE>}<NEW_LINE>}
), value.toString());
948,637
public Map.Entry<StubConfiguration, File> downloadAndUnpackStubJar(StubConfiguration stubConfiguration) {<NEW_LINE>try {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Trying to find a contract for [" + stubConfiguration.toColonSeparatedDependencyNotation() + "]");<NEW_LINE>}<NEW_LINE>Resource repo = this.stubRunnerOptions.getStubRepositoryRoot();<NEW_LINE>File clonedRepo = this.gitContractsRepo.clonedRepo(repo);<NEW_LINE>FileWalker walker = new FileWalker(stubConfiguration);<NEW_LINE>Files.walkFileTree(clonedRepo.toPath(), walker);<NEW_LINE>if (walker.foundFile != null) {<NEW_LINE>return new AbstractMap.SimpleEntry<>(stubConfiguration, <MASK><NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new IllegalStateException(e);<NEW_LINE>}<NEW_LINE>if (log.isWarnEnabled()) {<NEW_LINE>log.warn("No matching contracts were found in the repo for [" + stubConfiguration.toColonSeparatedDependencyNotation() + "]");<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
walker.foundFile.toFile());
638,270
public CompletableFuture<OutputT> execute(SdkHttpFullRequest input, RequestExecutionContext context) throws Exception {<NEW_LINE>CompletableFuture<OutputT> future = new CompletableFuture<>();<NEW_LINE>long apiCallTimeoutInMillis = resolveTimeoutInMillis(() -> context.requestConfig().apiCallTimeout(), clientConfig.option(SdkClientOption.API_CALL_TIMEOUT));<NEW_LINE>Supplier<SdkClientException> exceptionSupplier = () -> ApiCallTimeoutException.create(apiCallTimeoutInMillis);<NEW_LINE>TimeoutTracker timeoutTracker = timeAsyncTaskIfNeeded(future, scheduledExecutor, exceptionSupplier, apiCallTimeoutInMillis);<NEW_LINE>context.apiCallTimeoutTracker(timeoutTracker);<NEW_LINE>CompletableFuture<OutputT> executeFuture = <MASK><NEW_LINE>executeFuture.whenComplete((r, t) -> {<NEW_LINE>if (t != null) {<NEW_LINE>future.completeExceptionally(t);<NEW_LINE>} else {<NEW_LINE>future.complete(r);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return CompletableFutureUtils.forwardExceptionTo(future, executeFuture);<NEW_LINE>}
requestPipeline.execute(input, context);
1,816,719
public void store(String agentId, List<GaugeValue> gaugeValues) throws Exception {<NEW_LINE>if (!agentRollupIdsWithV09Data.contains(agentId)) {<NEW_LINE>delegate.store(agentId, gaugeValues);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<GaugeValue> gaugeValuesV09 = new ArrayList<>();<NEW_LINE>List<GaugeValue> <MASK><NEW_LINE>for (GaugeValue gaugeValue : gaugeValues) {<NEW_LINE>if (gaugeValue.getCaptureTime() <= v09LastCaptureTime) {<NEW_LINE>gaugeValuesV09.add(gaugeValue);<NEW_LINE>} else {<NEW_LINE>gaugeValuesPostV09.add(gaugeValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!gaugeValuesV09.isEmpty()) {<NEW_LINE>delegate.store(V09Support.convertToV09(agentId), AgentRollupIds.getAgentRollupIds(agentId), gaugeValuesV09);<NEW_LINE>}<NEW_LINE>if (!gaugeValuesPostV09.isEmpty()) {<NEW_LINE>delegate.store(agentId, gaugeValuesPostV09);<NEW_LINE>}<NEW_LINE>}
gaugeValuesPostV09 = new ArrayList<>();
300,256
public void execute(ActionRequest request, ActionResponse response) {<NEW_LINE>Context context = request.getContext();<NEW_LINE>Map<String, Object> valueMapperMap = (Map<String, Object>) context.get("valueMapper");<NEW_LINE>ValueMapper mapper = Beans.get(ValueMapperRepository.class).find(Long.parseLong(valueMapperMap.get("id").toString()));<NEW_LINE>if (mapper == null || mapper.getScript() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String modelName = (String) context.get("modelName");<NEW_LINE>Model model = null;<NEW_LINE>if (context.get("recordId") != null && modelName != null) {<NEW_LINE>Long recordId = Long.parseLong(context.get("recordId").toString());<NEW_LINE>model = FullContextHelper.getRepository(modelName).find(recordId);<NEW_LINE>}<NEW_LINE>Object result = Beans.get(ValueMapperService.class).execute(mapper, model);<NEW_LINE>if (result != null && result instanceof FullContext && mapper.getScript().startsWith("def rec = $ctx.create(")) {<NEW_LINE>FullContext fullContext = (FullContext) result;<NEW_LINE><MASK><NEW_LINE>String title = object.getClass().getSimpleName();<NEW_LINE>if (object instanceof MetaJsonRecord) {<NEW_LINE>title = ((MetaJsonRecord) object).getJsonModel();<NEW_LINE>}<NEW_LINE>response.setView(ActionView.define(I18n.get(title)).model(object.getClass().getName()).add("form").add("grid").context("_showRecord", fullContext.get("id")).map());<NEW_LINE>}<NEW_LINE>response.setCanClose(true);<NEW_LINE>}
Object object = fullContext.getTarget();
887,656
public String read() throws Exception {<NEW_LINE>if (isCoordinatedBeforeRead()) {<NEW_LINE>coordinateWithMachine(false);<NEW_LINE>}<NEW_LINE>// getDriver().actuate(this, on);<NEW_LINE>URL obj = null;<NEW_LINE>obj = new URL(this.readUrl);<NEW_LINE>HttpURLConnection con = (HttpURLConnection) obj.openConnection();<NEW_LINE>con.setRequestMethod("GET");<NEW_LINE>con.setRequestProperty("User-Agent", "Mozilla/5.0");<NEW_LINE><MASK><NEW_LINE>BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));<NEW_LINE>String inputLine;<NEW_LINE>StringBuffer response = new StringBuffer();<NEW_LINE>Pattern pattern = Pattern.compile(regex);<NEW_LINE>while ((inputLine = in.readLine()) != null) {<NEW_LINE>Matcher matcher = pattern.matcher(inputLine);<NEW_LINE>if (matcher.matches()) {<NEW_LINE>String s = matcher.group("Value");<NEW_LINE>response.append(s);<NEW_LINE>}<NEW_LINE>if (regex.length() == 0) {<NEW_LINE>response.append(inputLine);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>in.close();<NEW_LINE>if (isCoordinatedAfterActuate()) {<NEW_LINE>coordinateWithMachine(true);<NEW_LINE>}<NEW_LINE>getMachine().fireMachineHeadActivity(head);<NEW_LINE>return response.toString();<NEW_LINE>}
int responseCode = con.getResponseCode();
771,194
private void reportIfViolated(ASTComponentReference ref, Object data) {<NEW_LINE>ResolutionResult<ResolvableEntity> resolution = ref.getResolutionCandidates();<NEW_LINE>if (!resolution.isUnresolved()) {<NEW_LINE>// no false positive if not resolved at all<NEW_LINE>ResolvableEntity firstDecl = resolution.getBestCandidates().get(0);<NEW_LINE>if (firstDecl instanceof ModelicaComponentDeclaration) {<NEW_LINE>ModelicaComponentDeclaration componentDecl = (ModelicaComponentDeclaration) firstDecl;<NEW_LINE>ResolutionResult componentTypes = componentDecl.getTypeCandidates();<NEW_LINE>if (!componentTypes.isUnresolved()) {<NEW_LINE>if (componentTypes.getBestCandidates().get(0) instanceof ModelicaClassType) {<NEW_LINE>ModelicaClassType classDecl = (ModelicaClassType) componentTypes.<MASK><NEW_LINE>ModelicaClassSpecialization restriction = classDecl.getSpecialization();<NEW_LINE>if (!classDecl.isConnectorLike()) {<NEW_LINE>addViolation(data, ref, restriction.toString());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>addViolation(data, ref, firstDecl.getDescriptiveName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>addViolation(data, ref, firstDecl.getDescriptiveName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getBestCandidates().get(0);
1,764,314
// GEN-LAST:event_deleteUnusedImagesActionPerformed<NEW_LINE>private void duplicateItemActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_duplicateItemActionPerformed<NEW_LINE>if (selectedResource != null && loadedResources.containsResource(selectedResource)) {<NEW_LINE>Box rename = new Box(BoxLayout.X_AXIS);<NEW_LINE>rename.add(new JLabel("New Name: "));<NEW_LINE>JTextField field = new JTextField(selectedResource, 20);<NEW_LINE>rename.add(Box.createHorizontalStrut(3));<NEW_LINE>rename.add(field);<NEW_LINE>int result = JOptionPane.showConfirmDialog(mainPanel, rename, "Duplicate", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);<NEW_LINE>if (result == JOptionPane.OK_OPTION) {<NEW_LINE><MASK><NEW_LINE>if (loadedResources.containsResource(val)) {<NEW_LINE>JOptionPane.showMessageDialog(mainPanel, "An Element By This Name Already Exists", "Rename", JOptionPane.ERROR_MESSAGE);<NEW_LINE>duplicateItemActionPerformed(evt);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// this effectively creates a new instance of the object<NEW_LINE>ByteArrayOutputStream bo = new ByteArrayOutputStream();<NEW_LINE>boolean m = loadedResources.isModified();<NEW_LINE>loadedResources.save(bo);<NEW_LINE>if (m) {<NEW_LINE>loadedResources.setModified();<NEW_LINE>}<NEW_LINE>bo.close();<NEW_LINE>EditableResources r = new EditableResources();<NEW_LINE>r.openFile(new ByteArrayInputStream(bo.toByteArray()));<NEW_LINE>loadedResources.addResourceObjectDuplicate(selectedResource, val, r.getResourceObject(selectedResource));<NEW_LINE>setSelectedResource(val);<NEW_LINE>} catch (IOException err) {<NEW_LINE>err.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>JOptionPane.showMessageDialog(mainPanel, "An Element Must Be Selected", "Rename", JOptionPane.ERROR_MESSAGE);<NEW_LINE>}<NEW_LINE>}
String val = field.getText();
1,405,272
final GetMapGlyphsResult executeGetMapGlyphs(GetMapGlyphsRequest getMapGlyphsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getMapGlyphsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetMapGlyphsRequest> request = null;<NEW_LINE>Response<GetMapGlyphsResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new GetMapGlyphsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getMapGlyphsRequest));<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, "Location");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetMapGlyphs");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>URI endpointTraitHost = null;<NEW_LINE>if (!clientConfiguration.isDisableHostPrefixInjection()) {<NEW_LINE>String hostPrefix = "maps.";<NEW_LINE>String resolvedHostPrefix = String.format("maps.");<NEW_LINE>endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetMapGlyphsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(false).withHasStreamingSuccessResponse(false), new GetMapGlyphsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,755,679
public ConnectorInsertTableHandle beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle, List<ColumnHandle> columns, RetryMode retryMode) {<NEW_LINE>DeltaLakeTableHandle table = (DeltaLakeTableHandle) tableHandle;<NEW_LINE>if (!allowWrite(session, table)) {<NEW_LINE>String fileSystem = new Path(table.getLocation()).toUri().getScheme();<NEW_LINE>throw new TrinoException(NOT_SUPPORTED, format("Inserts are not supported on the %s filesystem", fileSystem));<NEW_LINE>}<NEW_LINE>checkSupportedWriterVersion(<MASK><NEW_LINE>List<DeltaLakeColumnHandle> inputColumns = columns.stream().map(handle -> (DeltaLakeColumnHandle) handle).collect(toImmutableList());<NEW_LINE>ConnectorTableMetadata tableMetadata = getTableMetadata(session, table);<NEW_LINE>// This check acts as a safeguard in cases where the input columns may differ from the table metadata case-sensitively<NEW_LINE>checkAllColumnsPassedOnInsert(tableMetadata, inputColumns);<NEW_LINE>String tableLocation = getLocation(tableMetadata.getProperties());<NEW_LINE>try {<NEW_LINE>FileSystem fileSystem = hdfsEnvironment.getFileSystem(new HdfsContext(session), new Path(tableLocation));<NEW_LINE>return new DeltaLakeInsertTableHandle(table.getSchemaName(), table.getTableName(), tableLocation, table.getMetadataEntry(), inputColumns, getMandatoryCurrentVersion(fileSystem, new Path(tableLocation)), retryMode != NO_RETRIES);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new TrinoException(GENERIC_INTERNAL_ERROR, e);<NEW_LINE>}<NEW_LINE>}
session, table.getSchemaTableName());
146,562
private void refreshUpdateVersionViews() {<NEW_LINE>if (mPlugin.isInstalled()) {<NEW_LINE>mInstallButton.setVisibility(View.GONE);<NEW_LINE>if (isNotAutoManaged()) {<NEW_LINE>boolean isUpdateAvailable = PluginUtils.isUpdateAvailable(mPlugin);<NEW_LINE>boolean canUpdate = isUpdateAvailable && !mIsUpdatingPlugin;<NEW_LINE>mUpdateButton.setVisibility(canUpdate ? View.VISIBLE : View.GONE);<NEW_LINE>mInstalledText.setVisibility(isUpdateAvailable || mIsUpdatingPlugin ? View.GONE : View.VISIBLE);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>mInstalledText.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>mUpdateButton.setVisibility(View.GONE);<NEW_LINE>mInstalledText.setVisibility(View.GONE);<NEW_LINE>mInstallButton.setVisibility(mIsInstallingPlugin ? View.GONE : View.VISIBLE);<NEW_LINE>}<NEW_LINE>findViewById(R.id.plugin_update_progress_bar).setVisibility(mIsUpdatingPlugin || mIsInstallingPlugin ? View.VISIBLE : View.GONE);<NEW_LINE>}
mUpdateButton.setVisibility(View.GONE);
814,977
public boolean visit(TypeDeclaration node) {<NEW_LINE>Type superclassType = node.getSuperclassType();<NEW_LINE>if (superclassType != null) {<NEW_LINE>this.wrapParentIndex = this.tm.lastIndexIn(node.getName(), -1);<NEW_LINE>this.wrapGroupEnd = this.tm.lastIndexIn(superclassType, -1);<NEW_LINE>this.wrapIndexes.add(this.tm.firstIndexBefore(superclassType, TokenNameextends));<NEW_LINE>this.wrapIndexes.add(this.tm.firstIndexIn(superclassType, -1));<NEW_LINE>handleWrap(this.options.alignment_for_superclass_in_type_declaration, PREFERRED);<NEW_LINE>}<NEW_LINE>List<Type> superInterfaceTypes = node.superInterfaceTypes();<NEW_LINE>if (!superInterfaceTypes.isEmpty()) {<NEW_LINE>int implementsToken = node.isInterface() ? TokenNameextends : TokenNameimplements;<NEW_LINE>this.wrapParentIndex = this.tm.lastIndexIn(node.getName(), -1);<NEW_LINE>this.wrapIndexes.add(this.tm.firstIndexBefore(superInterfaceTypes.get(0), implementsToken));<NEW_LINE>prepareElementsList(superInterfaceTypes, TokenNameCOMMA, -1);<NEW_LINE>handleWrap(this.options.alignment_for_superinterfaces_in_type_declaration, PREFERRED);<NEW_LINE>}<NEW_LINE>prepareElementsList(node.<MASK><NEW_LINE>handleWrap(this.options.alignment_for_type_parameters);<NEW_LINE>this.aligner.handleAlign(node.bodyDeclarations());<NEW_LINE>return true;<NEW_LINE>}
typeParameters(), TokenNameCOMMA, TokenNameLESS);
1,387,849
public void removeUsage(Long accountId, Long vmId, Date eventDate) {<NEW_LINE>TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);<NEW_LINE>try {<NEW_LINE>txn.start();<NEW_LINE>try (PreparedStatement pstmt = txn.prepareStatement(UPDATE_DELETED)) {<NEW_LINE>if (pstmt != null) {<NEW_LINE>pstmt.setString(1, DateUtil.getDateDisplayString(TimeZone.<MASK><NEW_LINE>pstmt.setLong(2, accountId);<NEW_LINE>pstmt.setLong(3, vmId);<NEW_LINE>pstmt.executeUpdate();<NEW_LINE>}<NEW_LINE>} catch (SQLException e) {<NEW_LINE>LOGGER.error("Error removing UsageBackupVO: " + e.getMessage(), e);<NEW_LINE>throw new CloudException("Remove backup usage exception: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>txn.commit();<NEW_LINE>} catch (Exception e) {<NEW_LINE>txn.rollback();<NEW_LINE>LOGGER.error("Exception caught while removing UsageBackupVO: " + e.getMessage(), e);<NEW_LINE>} finally {<NEW_LINE>txn.close();<NEW_LINE>}<NEW_LINE>}
getTimeZone("GMT"), eventDate));
288,960
Changes computeAssignments() {<NEW_LINE>int[] assignments = new <MASK><NEW_LINE>ImmutableList<Parameter> formalsWithChange = formals.stream().filter(f -> assignments[f.index()] != f.index()).collect(toImmutableList());<NEW_LINE>if (formalsWithChange.isEmpty()) {<NEW_LINE>return Changes.empty();<NEW_LINE>}<NEW_LINE>ImmutableList<Double> originalCost = formalsWithChange.stream().map(f2 -> costMatrix[f2.index()][f2.index()]).collect(toImmutableList());<NEW_LINE>ImmutableList<Double> assignmentCost = formalsWithChange.stream().map(f1 -> costMatrix[f1.index()][assignments[f1.index()]]).collect(toImmutableList());<NEW_LINE>ImmutableList<ParameterPair> changes = formalsWithChange.stream().map(f -> ParameterPair.create(f, actuals.get(assignments[f.index()]))).collect(toImmutableList());<NEW_LINE>return Changes.create(originalCost, assignmentCost, changes);<NEW_LINE>}
HungarianAlgorithm(costMatrix).execute();
1,850,567
protected void activate() {<NEW_LINE>filterBox.activate();<NEW_LINE>openOfferManager.getObservableList().addListener(openOfferListChangeListener);<NEW_LINE>tradeManager.getObservableList().addListener(tradeListChangeListener);<NEW_LINE>sortedList.comparatorProperty().bind(tableView.comparatorProperty());<NEW_LINE>tableView.setItems(sortedList);<NEW_LINE>updateList();<NEW_LINE>btcWalletService.addBalanceListener(balanceListener);<NEW_LINE>numItems.setText(Res.get("shared.numItemsLabel", sortedList.size()));<NEW_LINE>exportButton.setOnAction(event -> {<NEW_LINE>ObservableList<TableColumn<ReservedListItem, ?>> tableColumns = tableView.getColumns();<NEW_LINE>int reportColumns = tableColumns.size();<NEW_LINE>CSVEntryConverter<ReservedListItem> headerConverter = item -> {<NEW_LINE>String[] columns = new String[reportColumns];<NEW_LINE>for (int i = 0; i < columns.length; i++) columns[i] = ((AutoTooltipLabel) tableColumns.get(i).getGraphic()).getText();<NEW_LINE>return columns;<NEW_LINE>};<NEW_LINE>CSVEntryConverter<ReservedListItem> contentConverter = item -> {<NEW_LINE>String[] columns = new String[reportColumns];<NEW_LINE>columns[0] = item.getDateAsString();<NEW_LINE>columns[1] = item.getOpenOffer().getId();<NEW_LINE>columns[2] = item.getDetails();<NEW_LINE>columns[3] = item.getAddressString();<NEW_LINE>columns[4] = item.getBalanceString();<NEW_LINE>return columns;<NEW_LINE>};<NEW_LINE>GUIUtil.exportCSV("reservedInOffersFunds.csv", headerConverter, contentConverter, new ReservedListItem(), sortedList, (Stage) root.<MASK><NEW_LINE>});<NEW_LINE>}
getScene().getWindow());
1,162,222
public void fetchAndDisplayAttachable() {<NEW_LINE>AtomicReference<TargetObject> available = new AtomicReference<>();<NEW_LINE>AtomicReference<Map<String, ? extends TargetObject>> procs = new AtomicReference<>();<NEW_LINE>AsyncUtils.sequence(TypeSpec.VOID).then(seq -> {<NEW_LINE>setStatusText("Fetching process list");<NEW_LINE>provider.getModel().fetchModelObject(List.of("Available")<MASK><NEW_LINE>}, available).then(seq -> {<NEW_LINE>available.get().fetchElements().handle(seq::next);<NEW_LINE>}, procs).then(seq -> {<NEW_LINE>List<TargetAttachable> modelData = processes.getModelData();<NEW_LINE>modelData.clear();<NEW_LINE>for (Object p : procs.get().values()) {<NEW_LINE>if (p instanceof TargetAttachable) {<NEW_LINE>modelData.add((TargetAttachable) p);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// This may not be most efficient.<NEW_LINE>processes.fireTableDataChanged();<NEW_LINE>setStatusText("");<NEW_LINE>seq.exit();<NEW_LINE>}).finish().exceptionally(e -> {<NEW_LINE>Msg.showError(this, getComponent(), "Could not fetch process list", e);<NEW_LINE>setStatusText("Could not fetch process list: " + e.getMessage(), MessageType.ERROR);<NEW_LINE>return null;<NEW_LINE>});<NEW_LINE>}
).handle(seq::next);
1,018,848
public RecordingGroup unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RecordingGroup recordingGroup = new RecordingGroup();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("allSupported", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>recordingGroup.setAllSupported(context.getUnmarshaller(Boolean.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("includeGlobalResourceTypes", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>recordingGroup.setIncludeGlobalResourceTypes(context.getUnmarshaller(Boolean.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("resourceTypes", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>recordingGroup.setResourceTypes(new ListUnmarshaller<String>(context.getUnmarshaller(String.class<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 recordingGroup;<NEW_LINE>}
)).unmarshall(context));
1,565,399
public void init() {<NEW_LINE>baseList = new Object[BaseListType.values().length][];<NEW_LINE>collections = new Collection[BaseListType.values().length][CollectionType.values().length];<NEW_LINE>maps = new Map[BaseListType.values().length][CollectionType.values().length];<NEW_LINE>// make an array of linear indices<NEW_LINE>int n = 1000;<NEW_LINE>Object[] list = new Object[n];<NEW_LINE>for (int i = 0; i < n; i++) list[i] = i;<NEW_LINE>baseList[LINEAR.ordinal()] = list;<NEW_LINE>collections[LINEAR.ordinal()][LINKED_LIST.ordinal()] = collectionAdd(new LinkedList(), list);<NEW_LINE>collections[LINEAR.ordinal()][ARRAY_LIST.ordinal()] = collectionAdd(new ArrayList(), list);<NEW_LINE>collections[LINEAR.ordinal()][CONS_P_STACK.ordinal()] = pCollectionPlus(ConsPStack.empty(), list);<NEW_LINE>collections[LINEAR.ordinal()][TREE_P_VECTOR.ordinal()] = pCollectionPlus(TreePVector.empty(), list);<NEW_LINE>collections[LINEAR.ordinal()][HASH_SET.ordinal()] = collectionAdd(new HashSet(), list);<NEW_LINE>collections[LINEAR.ordinal()][HASH_TREE_P_SET.ordinal()] = pCollectionPlus(HashTreePSet.empty(), list);<NEW_LINE>collections[LINEAR.ordinal()][HASH_TREE_P_BAG.ordinal()] = pCollectionPlus(HashTreePBag.empty(), list);<NEW_LINE>maps[LINEAR.ordinal()][HASH_MAP.ordinal()] = mapPut(new HashMap(), list);<NEW_LINE>maps[LINEAR.ordinal()][INT_TREE_P_MAP.ordinal()] = pMapPlus(IntTreePMap.empty(), list);<NEW_LINE>// make an array of random indices<NEW_LINE>Random r = new Random();<NEW_LINE>for (int i = 0; i < n; i++) list[i] = r.nextInt();<NEW_LINE>baseList[RANDOM.ordinal()] = list;<NEW_LINE>collections[RANDOM.ordinal()][LINKED_LIST.ordinal()] = collectionAdd(new LinkedList(), list);<NEW_LINE>collections[RANDOM.ordinal()][ARRAY_LIST.ordinal()] = collectionAdd(new ArrayList(), list);<NEW_LINE>collections[RANDOM.ordinal()][CONS_P_STACK.ordinal()] = pCollectionPlus(<MASK><NEW_LINE>collections[RANDOM.ordinal()][TREE_P_VECTOR.ordinal()] = pCollectionPlus(TreePVector.empty(), list);<NEW_LINE>collections[RANDOM.ordinal()][HASH_SET.ordinal()] = collectionAdd(new HashSet(), list);<NEW_LINE>collections[RANDOM.ordinal()][HASH_TREE_P_SET.ordinal()] = pCollectionPlus(HashTreePSet.empty(), list);<NEW_LINE>collections[RANDOM.ordinal()][HASH_TREE_P_BAG.ordinal()] = pCollectionPlus(HashTreePBag.empty(), list);<NEW_LINE>maps[RANDOM.ordinal()][HASH_MAP.ordinal()] = mapPut(new HashMap(), list);<NEW_LINE>maps[RANDOM.ordinal()][INT_TREE_P_MAP.ordinal()] = pMapPlus(IntTreePMap.empty(), list);<NEW_LINE>}
ConsPStack.empty(), list);
238,700
private void extractAmountAndType(@NonNull final ReportEntry2 ntry, @NonNull final EntryTransaction2 txDtls, @NonNull final ESRTransactionBuilder trxBuilder) {<NEW_LINE>// credit-or-debit indicator<NEW_LINE>final AmountAndCurrencyExchange3 transactionDetailAmt = txDtls.getAmtDtls();<NEW_LINE>final AmountAndCurrencyExchangeDetails3 transactionInstdAmt = transactionDetailAmt.getInstdAmt();<NEW_LINE>final ActiveOrHistoricCurrencyAndAmount amt = transactionInstdAmt.getAmt();<NEW_LINE>final BigDecimal amount = amt.getValue().multiply(getCrdDbtMultiplier(ntry.getCdtDbtInd())).multiply(getRvslMultiplier(ntry));<NEW_LINE>trxBuilder.amount(amount);<NEW_LINE>if (ntry.getCdtDbtInd() == CreditDebitCode.CRDT) {<NEW_LINE>if (isReversal(ntry)) {<NEW_LINE>trxBuilder.trxType(ESRConstants.ESRTRXTYPE_ReverseBooking);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// we get charged; currently not supported<NEW_LINE>trxBuilder.trxType(ESRConstants.ESRTRXTYPE_UNKNOWN).errorMsg(getErrorMsg(ESRDataImporterCamt54.MSG_UNSUPPORTED_CREDIT_DEBIT_CODE_1P, ntry.getCdtDbtInd()));<NEW_LINE>}<NEW_LINE>}
trxBuilder.trxType(ESRConstants.ESRTRXTYPE_CreditMemo);
797,787
public static void verifyJavaCompatibility(String compiledVersion) {<NEW_LINE>String runtimeVersion = System.getProperty(JAVA_VERSION);<NEW_LINE>if (compiledVersion == null || runtimeVersion == null || compiledVersion.equals(runtimeVersion)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String[] compiledVersionParts = compiledVersion.split("\\.|_");<NEW_LINE>String[] runtimeVersionParts = runtimeVersion.split("\\.|_");<NEW_LINE>// check the major version.<NEW_LINE>if (!compiledVersionParts[0].equals(runtimeVersionParts[0])) {<NEW_LINE>String compiledMajorVersion = compiledVersionParts.length > 1 ? compiledVersionParts[1] : VERSION_ZERO;<NEW_LINE>logJavaVersionMismatchError(runtimeVersion, compiledVersionParts[0], compiledMajorVersion);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// if both have only major versions, then stop checking further.<NEW_LINE>if (compiledVersionParts.length == 1 && compiledVersionParts.length == 1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// if only one of them have a minor version, check whether the other one has<NEW_LINE>// minor version as zero.<NEW_LINE>// eg: v9 Vs v9.0.x<NEW_LINE>if (compiledVersionParts.length == 1) {<NEW_LINE>if (!runtimeVersionParts[1].equals(VERSION_ZERO)) {<NEW_LINE>logJavaVersionMismatchError(runtimeVersion, compiledVersionParts[0], VERSION_ZERO);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (runtimeVersionParts.length == 1) {<NEW_LINE>if (!compiledVersionParts[1].equals(VERSION_ZERO)) {<NEW_LINE>logJavaVersionMismatchError(runtimeVersion, compiledVersionParts[0], compiledVersionParts[1]);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// if both have minor versions, check for their equality.<NEW_LINE>if (!compiledVersionParts[1].equals(runtimeVersionParts[1])) {<NEW_LINE>logJavaVersionMismatchError(runtimeVersion, compiledVersionParts[<MASK><NEW_LINE>}<NEW_LINE>// ignore the patch versions.<NEW_LINE>}
0], compiledVersionParts[1]);
1,605,860
public static void toJSON(OutputWriter jsonWriter, AuthConfig authConfig) {<NEW_LINE>ArrayList<String> usersErrors = new ArrayList<>();<NEW_LINE>authConfig.getUsers().forEach(r -> usersErrors.addAll(r.errors().getAllOn("name")));<NEW_LINE>ArrayList<String> <MASK><NEW_LINE>authConfig.getRoles().forEach(r -> rolesErrors.addAll(r.errors().getAllOn("name")));<NEW_LINE>if (!usersErrors.isEmpty() || !rolesErrors.isEmpty()) {<NEW_LINE>jsonWriter.addChild("errors", errorWriter -> {<NEW_LINE>if (!usersErrors.isEmpty()) {<NEW_LINE>errorWriter.addChildList("users", usersErrors);<NEW_LINE>}<NEW_LINE>if (!rolesErrors.isEmpty()) {<NEW_LINE>errorWriter.addChildList("roles", rolesErrors);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>jsonWriter.addChildList("roles", authConfig.getRoles().stream().map(eachItem -> eachItem.getName().toString()).collect(Collectors.toList()));<NEW_LINE>jsonWriter.addChildList("users", authConfig.getUsers().stream().map(eachItem -> eachItem.getName().toString()).collect(Collectors.toList()));<NEW_LINE>}
rolesErrors = new ArrayList<>();
1,232,605
public AccountUsage unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AccountUsage accountUsage = new AccountUsage();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("TotalCodeSize", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>accountUsage.setTotalCodeSize(context.getUnmarshaller(Long.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("FunctionCount", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>accountUsage.setFunctionCount(context.getUnmarshaller(Long.<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 accountUsage;<NEW_LINE>}
class).unmarshall(context));
444,361
public E relaxedPoll() {<NEW_LINE>final long[] sBuffer = sequenceBuffer;<NEW_LINE>final long mask = this.mask;<NEW_LINE>long cIndex;<NEW_LINE>long seqOffset;<NEW_LINE>long seq;<NEW_LINE>long expectedSeq;<NEW_LINE>do {<NEW_LINE>cIndex = lvConsumerIndex();<NEW_LINE><MASK><NEW_LINE>seq = lvLongElement(sBuffer, seqOffset);<NEW_LINE>expectedSeq = cIndex + 1;<NEW_LINE>if (seq < expectedSeq) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>} while (// another consumer beat us to it<NEW_LINE>// failed the CAS<NEW_LINE>seq > expectedSeq || !casConsumerIndex(cIndex, cIndex + 1));<NEW_LINE>final long offset = calcCircularRefElementOffset(cIndex, mask);<NEW_LINE>final E e = lpRefElement(buffer, offset);<NEW_LINE>spRefElement(buffer, offset, null);<NEW_LINE>soLongElement(sBuffer, seqOffset, cIndex + mask + 1);<NEW_LINE>return e;<NEW_LINE>}
seqOffset = calcCircularLongElementOffset(cIndex, mask);
1,632,170
public Builder mergeFrom(io.kubernetes.client.proto.Meta.APIVersions other) {<NEW_LINE>if (other == io.kubernetes.client.proto.Meta.APIVersions.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (!other.versions_.isEmpty()) {<NEW_LINE>if (versions_.isEmpty()) {<NEW_LINE>versions_ = other.versions_;<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>ensureVersionsIsMutable();<NEW_LINE>versions_.addAll(other.versions_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>if (serverAddressByClientCIDRsBuilder_ == null) {<NEW_LINE>if (!other.serverAddressByClientCIDRs_.isEmpty()) {<NEW_LINE>if (serverAddressByClientCIDRs_.isEmpty()) {<NEW_LINE>serverAddressByClientCIDRs_ = other.serverAddressByClientCIDRs_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>} else {<NEW_LINE>ensureServerAddressByClientCIDRsIsMutable();<NEW_LINE>serverAddressByClientCIDRs_.addAll(other.serverAddressByClientCIDRs_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.serverAddressByClientCIDRs_.isEmpty()) {<NEW_LINE>if (serverAddressByClientCIDRsBuilder_.isEmpty()) {<NEW_LINE>serverAddressByClientCIDRsBuilder_.dispose();<NEW_LINE>serverAddressByClientCIDRsBuilder_ = null;<NEW_LINE>serverAddressByClientCIDRs_ = other.serverAddressByClientCIDRs_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>serverAddressByClientCIDRsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServerAddressByClientCIDRsFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>serverAddressByClientCIDRsBuilder_.addAllMessages(other.serverAddressByClientCIDRs_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.mergeUnknownFields(other.unknownFields);<NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
bitField0_ = (bitField0_ & ~0x00000001);
921,272
protected DataViewComponent createComponent() {<NEW_LINE>JFRModel model = getModel();<NEW_LINE>if (model == null) {<NEW_LINE>MasterViewSupport masterView = new MasterViewSupport(model) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>void firstShown() {<NEW_LINE>}<NEW_LINE>};<NEW_LINE>return new DataViewComponent(masterView.getMasterView(), new DataViewComponent.MasterViewConfiguration(true));<NEW_LINE>} else {<NEW_LINE>final OverviewViewSupport.SnapshotsViewSupport snapshotView = new OverviewViewSupport.SnapshotsViewSupport((JFRSnapshot) getDataSource());<NEW_LINE>MasterViewSupport masterView = new MasterViewSupport(model) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>void firstShown() {<NEW_LINE>initialize(snapshotView);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>DataViewComponent dvc = new DataViewComponent(masterView.getMasterView(), new DataViewComponent.MasterViewConfiguration(false));<NEW_LINE>Properties jvmProperties = model.getSystemProperties();<NEW_LINE>String jvmargs = model.getJvmArgs();<NEW_LINE>dvc.configureDetailsView(new DataViewComponent.DetailsViewConfiguration(0.25, 0, -1, -1, -1, -1));<NEW_LINE>// NOI18N<NEW_LINE>dvc.configureDetailsArea(new DataViewComponent.DetailsAreaConfiguration(NbBundle.getMessage(JFRSnapshotOverviewView.class, "LBL_Saved_data"), true), DataViewComponent.TOP_LEFT);<NEW_LINE>dvc.addDetailsView(snapshotView.getDetailsView(), DataViewComponent.TOP_LEFT);<NEW_LINE>// NOI18N<NEW_LINE>dvc.configureDetailsArea(new DataViewComponent.DetailsAreaConfiguration(NbBundle.getMessage(JFRSnapshotOverviewView.class, "LBL_Details"), true), DataViewComponent.TOP_RIGHT);<NEW_LINE>dvc.addDetailsView(new OverviewViewSupport.JVMArgumentsViewSupport(jvmargs).getDetailsView(), DataViewComponent.TOP_RIGHT);<NEW_LINE>dvc.addDetailsView(new OverviewViewSupport.SystemPropertiesViewSupport(jvmProperties).<MASK><NEW_LINE>return dvc;<NEW_LINE>}<NEW_LINE>}
getDetailsView(), DataViewComponent.TOP_RIGHT);
1,111,017
public boolean fetch(@NonNull Context context) {<NEW_LINE>Log.d(TAG, "try to fetch certificate");<NEW_LINE>boolean result = false;<NEW_LINE>CertificatesTrustManager trustManager = new CertificatesTrustManager();<NEW_LINE>try {<NEW_LINE>SSLContext sslContext = SSLContext.getInstance("TLS");<NEW_LINE>TrustManager[] trustManagers = new TrustManager[1];<NEW_LINE>trustManagers[0] = trustManager;<NEW_LINE>sslContext.init(null, trustManagers, null);<NEW_LINE>HttpsURLConnection connection = (HttpsURLConnection) new URL(OWN_URL).openConnection();<NEW_LINE>connection.setInstanceFollowRedirects(false);<NEW_LINE>connection.setSSLSocketFactory(sslContext.getSocketFactory());<NEW_LINE>// TODO host name verifier ?<NEW_LINE>try {<NEW_LINE>connection.connect();<NEW_LINE>Log.d(TAG, "connection established, try to save certificate if it has been received");<NEW_LINE><MASK><NEW_LINE>} finally {<NEW_LINE>connection.disconnect();<NEW_LINE>}<NEW_LINE>certificateHasBeenFetchedThisLaunch = true;<NEW_LINE>} catch (NoSuchAlgorithmException | KeyManagementException | MalformedURLException e) {<NEW_LINE>Log.e(TAG, "certificate fetching is failed", e);<NEW_LINE>certificateHasBeenFetchedThisLaunch = true;<NEW_LINE>} catch (IOException e) {<NEW_LINE>if (CertificateUtils.isCertificateException(e)) {<NEW_LINE>Log.d(TAG, "try to save certificate if it has been received");<NEW_LINE>result = saveCertificate(context, trustManager);<NEW_LINE>} else {<NEW_LINE>Log.e(TAG, "certificate fetching is failed", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
result = saveCertificate(context, trustManager);
246,172
private Future<EueWriteFeature.Chunk> submit(final ThreadPool pool, final Path file, final Local local, final BandwidthThrottle throttle, final StreamListener listener, final TransferStatus overall, final String url, final String resourceId, final int partNumber, final long offset, final long length, final ConnectionCallback callback) {<NEW_LINE>if (log.isInfoEnabled()) {<NEW_LINE>log.info(String.format("Submit %s to queue with offset %d and length %d", file, offset, length));<NEW_LINE>}<NEW_LINE>final BytecountStreamListener counter = new BytecountStreamListener(listener);<NEW_LINE>return pool.execute(new SegmentRetryCallable<>(session.getHost(), new BackgroundExceptionCallable<EueWriteFeature.Chunk>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public EueWriteFeature.Chunk call() throws BackgroundException {<NEW_LINE>overall.validate();<NEW_LINE>final Map<String, String> parameters = new HashMap<>();<NEW_LINE>parameters.put(EueWriteFeature.RESOURCE_ID, resourceId);<NEW_LINE>final TransferStatus status = new TransferStatus().segment(true).withOffset(offset).withLength<MASK><NEW_LINE>status.setPart(partNumber);<NEW_LINE>status.setHeader(overall.getHeader());<NEW_LINE>status.setChecksum(writer.checksum(file, status).compute(local.getInputStream(), status));<NEW_LINE>status.setUrl(url);<NEW_LINE>final EueWriteFeature.Chunk chunk = EueLargeUploadService.this.upload(file, local, throttle, listener, status, overall, status, callback);<NEW_LINE>if (log.isInfoEnabled()) {<NEW_LINE>log.info(String.format("Received response %s for part %d", chunk, partNumber));<NEW_LINE>}<NEW_LINE>return chunk;<NEW_LINE>}<NEW_LINE>}, overall, counter));<NEW_LINE>}
(length).withParameters(parameters);
873,511
protected void configure() {<NEW_LINE>mapping(FieldDto.class, FieldInfo.class, TypeMappingOptions.oneWay()).fields("type", "type", FieldsMappingOptions.customConverterId(ID_TYPE_CONVERTER)).fields("partition_key", "partitionKey", FieldsMappingOptions.copyByReference()).fields("source_type", "sourceType", FieldsMappingOptions.copyByReference());<NEW_LINE>mapping(FieldInfo.class, FieldDto.class, TypeMappingOptions.oneWay()).fields("type", "type", FieldsMappingOptions.customConverterId(ID_TYPE_CONVERTER)).fields("partitionKey", "partition_key", FieldsMappingOptions.copyByReference()).fields("sourceType", "source_type", FieldsMappingOptions.copyByReference()).fields("type", "jsonType"<MASK><NEW_LINE>mapping(TableDto.class, TableInfo.class).fields("name", "name", FieldsMappingOptions.copyByReference());<NEW_LINE>mapping(DatabaseDto.class, DatabaseInfo.class).fields("name", "name", FieldsMappingOptions.copyByReference());<NEW_LINE>mapping(PartitionDto.class, PartitionInfo.class).fields("name", "name", FieldsMappingOptions.copyByReference());<NEW_LINE>mapping(CatalogDto.class, CatalogInfo.class);<NEW_LINE>mapping(ClusterDto.class, ClusterInfo.class);<NEW_LINE>mapping(AuditDto.class, AuditInfo.class);<NEW_LINE>mapping(ViewDto.class, ViewInfo.class);<NEW_LINE>mapping(StorageDto.class, StorageInfo.class);<NEW_LINE>}
, FieldsMappingOptions.customConverterId(ID_JSON_TYPE_CONVERTER));
670,743
public Object clone() throws CloneNotSupportedException {<NEW_LINE>DefaultXYDataset clone = (DefaultXYDataset) super.clone();<NEW_LINE>clone.seriesKeys = new ArrayList(this.seriesKeys);<NEW_LINE>clone.seriesList = new ArrayList(<MASK><NEW_LINE>for (int i = 0; i < this.seriesList.size(); i++) {<NEW_LINE>double[][] data = this.seriesList.get(i);<NEW_LINE>double[] x = data[0];<NEW_LINE>double[] y = data[1];<NEW_LINE>double[] xx = new double[x.length];<NEW_LINE>double[] yy = new double[y.length];<NEW_LINE>System.arraycopy(x, 0, xx, 0, x.length);<NEW_LINE>System.arraycopy(y, 0, yy, 0, y.length);<NEW_LINE>clone.seriesList.add(i, new double[][] { xx, yy });<NEW_LINE>}<NEW_LINE>return clone;<NEW_LINE>}
this.seriesList.size());
1,266,376
public void makeCall(Expression origin, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean safe, boolean spreadSafe, boolean implicitThis) {<NEW_LINE>ClassNode sender = controller.getClassNode();<NEW_LINE>if (isSuperExpression(receiver) || (isThisExpression(receiver) && !implicitThis)) {<NEW_LINE>while (sender.getOuterClass() != null && sender.getSuperClass() == ClassHelper.CLOSURE_TYPE) {<NEW_LINE>sender = sender.getOuterClass();<NEW_LINE>}<NEW_LINE>if (isSuperExpression(receiver)) {<NEW_LINE>// GROOVY-4035<NEW_LINE>sender = sender.getSuperClass();<NEW_LINE>// prevent recursion<NEW_LINE>implicitThis = false;<NEW_LINE>// GROOVY-6045<NEW_LINE>safe = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>makeCall(origin, new ClassExpression(sender), receiver, message, arguments, <MASK><NEW_LINE>}
adapter, safe, spreadSafe, implicitThis);
601,564
private Mono<Response<BatchAccountInner>> updateWithResponseAsync(String resourceGroupName, String accountName, BatchAccountUpdateParameters parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (accountName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (parameters == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));<NEW_LINE>} else {<NEW_LINE>parameters.validate();<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.update(this.client.getEndpoint(), resourceGroupName, accountName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));
651,352
public void formatValue(Object value, StringBuilder builder) {<NEW_LINE>if (value == null) {<NEW_LINE>builder.append("NULL");<NEW_LINE>} else if (value instanceof Map) {<NEW_LINE>formatMap((Map<String, Object>) value, builder);<NEW_LINE>} else if (value instanceof Collection) {<NEW_LINE>formatIterable((Iterable<?>) value, builder);<NEW_LINE>} else if (value.getClass().isArray()) {<NEW_LINE>formatArray(value, builder);<NEW_LINE>} else if (value instanceof String || value instanceof Point) {<NEW_LINE>builder.append(Literals.quoteStringLiteral(value.toString()));<NEW_LINE>} else if (value instanceof Period) {<NEW_LINE>builder.append(Literals.quoteStringLiteral(value.toString()));<NEW_LINE>builder.append("::interval");<NEW_LINE>} else if (value instanceof Long && ((Long) value <= Integer.MAX_VALUE || (Long) value >= Integer.MIN_VALUE)) {<NEW_LINE>builder.append(value.toString());<NEW_LINE>builder.append("::bigint");<NEW_LINE>} else {<NEW_LINE>builder.<MASK><NEW_LINE>}<NEW_LINE>}
append(value.toString());
182,626
public static ListCityMapImageDetailsResponse unmarshall(ListCityMapImageDetailsResponse listCityMapImageDetailsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCityMapImageDetailsResponse.setRequestId(_ctx.stringValue("ListCityMapImageDetailsResponse.RequestId"));<NEW_LINE>listCityMapImageDetailsResponse.setCode(_ctx.stringValue("ListCityMapImageDetailsResponse.Code"));<NEW_LINE>listCityMapImageDetailsResponse.setMessage(_ctx.stringValue("ListCityMapImageDetailsResponse.Message"));<NEW_LINE>listCityMapImageDetailsResponse.setPageNumber(_ctx.longValue("ListCityMapImageDetailsResponse.PageNumber"));<NEW_LINE>listCityMapImageDetailsResponse.setPageSize(_ctx.longValue("ListCityMapImageDetailsResponse.PageSize"));<NEW_LINE>listCityMapImageDetailsResponse.setTotalCount(_ctx.longValue("ListCityMapImageDetailsResponse.TotalCount"));<NEW_LINE>List<Datas> data = new ArrayList<Datas>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListCityMapImageDetailsResponse.Data.Length"); i++) {<NEW_LINE>Datas datas = new Datas();<NEW_LINE>datas.setPersonTargetImageStoragePath(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].PersonTargetImageStoragePath"));<NEW_LINE>datas.setAgeLowerLimit(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].AgeLowerLimit"));<NEW_LINE>datas.setAgeUpLimit(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].AgeUpLimit"));<NEW_LINE>datas.setVehicleColor(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].VehicleColor"));<NEW_LINE>datas.setTrousersColor(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].TrousersColor"));<NEW_LINE>datas.setDataSourceId(_ctx.stringValue<MASK><NEW_LINE>datas.setGender(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].Gender"));<NEW_LINE>datas.setAgeLowerLimitReliability(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].AgeLowerLimitReliability"));<NEW_LINE>datas.setGenderCodeReliability(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].GenderCodeReliability"));<NEW_LINE>datas.setVehicleClassReliability(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].VehicleClassReliability"));<NEW_LINE>datas.setRecordId(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].RecordId"));<NEW_LINE>datas.setAgeCodeReliability(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].AgeCodeReliability"));<NEW_LINE>datas.setSourceImageStoragePath(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].SourceImageStoragePath"));<NEW_LINE>datas.setVehicleClass(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].VehicleClass"));<NEW_LINE>datas.setMotorTargetImageStoragePath(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].MotorTargetImageStoragePath"));<NEW_LINE>datas.setCoatColor(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].CoatColor"));<NEW_LINE>datas.setFaceTargetImageStoragePath(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].FaceTargetImageStoragePath"));<NEW_LINE>datas.setShotTime(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].ShotTime"));<NEW_LINE>datas.setVehicleColorReliability(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].VehicleColorReliability"));<NEW_LINE>datas.setTrousersColorReliability(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].TrousersColorReliability"));<NEW_LINE>datas.setCoatColorReliability(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].CoatColorReliability"));<NEW_LINE>datas.setLeftTopX(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].LeftTopX"));<NEW_LINE>datas.setLeftTopY(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].LeftTopY"));<NEW_LINE>datas.setRightBottomX(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].RightBottomX"));<NEW_LINE>datas.setRightBottomY(_ctx.stringValue("ListCityMapImageDetailsResponse.Data[" + i + "].RightBottomY"));<NEW_LINE>data.add(datas);<NEW_LINE>}<NEW_LINE>listCityMapImageDetailsResponse.setData(data);<NEW_LINE>return listCityMapImageDetailsResponse;<NEW_LINE>}
("ListCityMapImageDetailsResponse.Data[" + i + "].DataSourceId"));
654,634
public String run() throws Exception {<NEW_LINE>TableConfig tableConfig = _taskSpec.getTableConfig();<NEW_LINE>String tableName = tableConfig.getTableName();<NEW_LINE>Schema schema = _taskSpec.getSchema();<NEW_LINE>// init record reader config<NEW_LINE>String readerConfigClassName = _taskSpec.getRecordReaderSpec().getConfigClassName();<NEW_LINE>RecordReaderConfig recordReaderConfig = null;<NEW_LINE>if (readerConfigClassName != null) {<NEW_LINE>Map<String, String> configs = _taskSpec.getRecordReaderSpec().getConfigs();<NEW_LINE>if (configs == null) {<NEW_LINE>configs = new HashMap<>();<NEW_LINE>}<NEW_LINE>JsonNode jsonNode = new <MASK><NEW_LINE>Class<?> clazz = PluginManager.get().loadClass(readerConfigClassName);<NEW_LINE>recordReaderConfig = (RecordReaderConfig) JsonUtils.jsonNodeToObject(jsonNode, clazz);<NEW_LINE>}<NEW_LINE>// init segmentName Generator<NEW_LINE>SegmentNameGenerator segmentNameGenerator = getSegmentNameGenerator();<NEW_LINE>// init segment generation config<NEW_LINE>SegmentGeneratorConfig segmentGeneratorConfig = new SegmentGeneratorConfig(tableConfig, schema);<NEW_LINE>segmentGeneratorConfig.setTableName(tableName);<NEW_LINE>segmentGeneratorConfig.setOutDir(_taskSpec.getOutputDirectoryPath());<NEW_LINE>segmentGeneratorConfig.setSegmentNameGenerator(segmentNameGenerator);<NEW_LINE>segmentGeneratorConfig.setSequenceId(_taskSpec.getSequenceId());<NEW_LINE>segmentGeneratorConfig.setReaderConfig(recordReaderConfig);<NEW_LINE>segmentGeneratorConfig.setRecordReaderPath(_taskSpec.getRecordReaderSpec().getClassName());<NEW_LINE>segmentGeneratorConfig.setInputFilePath(_taskSpec.getInputFilePath());<NEW_LINE>segmentGeneratorConfig.setCustomProperties(_taskSpec.getCustomProperties());<NEW_LINE>segmentGeneratorConfig.setFailOnEmptySegment(_taskSpec.isFailOnEmptySegment());<NEW_LINE>// build segment<NEW_LINE>SegmentIndexCreationDriverImpl segmentIndexCreationDriver = new SegmentIndexCreationDriverImpl();<NEW_LINE>segmentIndexCreationDriver.init(segmentGeneratorConfig);<NEW_LINE>segmentIndexCreationDriver.build();<NEW_LINE>return segmentIndexCreationDriver.getSegmentName();<NEW_LINE>}
ObjectMapper().valueToTree(configs);
1,074,107
private <R> R request(String urlSuffix, Http method, Format format, Object jsonValue) {<NEW_LINE>jsonValue = Json.toBindings(jsonValue);<NEW_LINE>urlSuffix = appendParams(urlSuffix);<NEW_LINE>Endpoint endpoint = urlSuffix != null ? <MASK><NEW_LINE>Object result = null;<NEW_LINE>switch(format) {<NEW_LINE>case Json:<NEW_LINE>_headers.put("Accept", "application/json");<NEW_LINE>result = endpoint.sendJsonRequest(method.name(), jsonValue, _headers, _timeout);<NEW_LINE>break;<NEW_LINE>case Yaml:<NEW_LINE>_headers.put("Accept", "application/x-yaml, application/yaml, text/yaml;q=0.9");<NEW_LINE>result = endpoint.sendYamlRequest(method.name(), jsonValue, _headers, _timeout);<NEW_LINE>break;<NEW_LINE>case Xml:<NEW_LINE>_headers.put("Accept", "application/xml");<NEW_LINE>result = endpoint.sendXmlRequest(method.name(), jsonValue, _headers, _timeout);<NEW_LINE>break;<NEW_LINE>case Csv:<NEW_LINE>_headers.put("Accept", "text/csv");<NEW_LINE>result = endpoint.sendCsvRequest(method.name(), jsonValue, _headers, _timeout);<NEW_LINE>break;<NEW_LINE>case Text:<NEW_LINE>result = endpoint.sendPlainTextRequest(method.name(), jsonValue, _headers, _timeout);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException("format: " + format);<NEW_LINE>}<NEW_LINE>// noinspection unchecked<NEW_LINE>result = _resultCoercer.apply(result);<NEW_LINE>return (R) result;<NEW_LINE>}
_endpoint.withUrlSuffix(urlSuffix) : _endpoint;
1,064,253
public com.amazonaws.services.route53resolver.model.ValidationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.route53resolver.model.ValidationException validationException = new com.amazonaws.services.route53resolver.model.ValidationException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 validationException;<NEW_LINE>}
JsonToken token = context.getCurrentToken();