idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,214,482
public final // JPA2.g:497:1: literal : WORD ;<NEW_LINE>JPA2Parser.literal_return literal() throws RecognitionException {<NEW_LINE>JPA2Parser.literal_return retval = new JPA2Parser.literal_return();<NEW_LINE>retval.start = input.LT(1);<NEW_LINE>Object root_0 = null;<NEW_LINE>Token WORD587 = null;<NEW_LINE>Object WORD587_tree = null;<NEW_LINE>try {<NEW_LINE>// JPA2.g:498:5: ( WORD )<NEW_LINE>// JPA2.g:498:7: WORD<NEW_LINE>{<NEW_LINE>root_0 = (Object) adaptor.nil();<NEW_LINE>WORD587 = (Token) match(input, WORD, FOLLOW_WORD_in_literal4663);<NEW_LINE>if (state.failed)<NEW_LINE>return retval;<NEW_LINE>if (state.backtracking == 0) {<NEW_LINE>WORD587_tree = (Object) adaptor.create(WORD587);<NEW_LINE>adaptor.addChild(root_0, WORD587_tree);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>retval.stop = input.LT(-1);<NEW_LINE>if (state.backtracking == 0) {<NEW_LINE>retval.tree = (Object) adaptor.rulePostProcessing(root_0);<NEW_LINE>adaptor.setTokenBoundaries(retval.tree, <MASK><NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>reportError(re);<NEW_LINE>recover(input, re);<NEW_LINE>retval.tree = (Object) adaptor.errorNode(input, retval.start, input.LT(-1), re);<NEW_LINE>} finally {<NEW_LINE>// do for sure before leaving<NEW_LINE>}<NEW_LINE>return retval;<NEW_LINE>}
retval.start, retval.stop);
16,883
public XChartPanel<XYChart> buildPanel() throws IOException {<NEW_LINE>System.out.println("fetching data...");<NEW_LINE>// Get the latest order book data for BTC/USD - BITSTAMP<NEW_LINE>BitcoiniumTickerHistory bitcoiniumTickerHistory = bitcoiniumMarketDataService.getBitcoiniumTickerHistory("BTC", "BITSTAMP_USD", "THREE_HOURS");<NEW_LINE>System.out.println(bitcoiniumTickerHistory.toString());<NEW_LINE>// build ticker history chart series data<NEW_LINE>xAxisData = new ArrayList<>();<NEW_LINE>yAxisData = new ArrayList<>();<NEW_LINE>for (int i = 0; i < bitcoiniumTickerHistory.getCondensedTickers().length; i++) {<NEW_LINE>BitcoiniumTicker bitcoiniumTicker = bitcoiniumTickerHistory.getCondensedTickers()[i];<NEW_LINE>Date timestamp = new <MASK><NEW_LINE>float price = bitcoiniumTicker.getLast().floatValue();<NEW_LINE>System.out.println(timestamp + ": " + price);<NEW_LINE>xAxisData.add(timestamp);<NEW_LINE>yAxisData.add(price);<NEW_LINE>}<NEW_LINE>// Create Chart<NEW_LINE>chart = new XYChartBuilder().width(800).height(600).title("Real-time Bitstamp Price vs. Time").xAxisTitle("Time").yAxisTitle("Price").build();<NEW_LINE>// Customize Chart<NEW_LINE>chart.getStyler().setDefaultSeriesRenderStyle(XYSeriesRenderStyle.Area);<NEW_LINE>chart.getStyler().setLegendPosition(LegendPosition.InsideNE);<NEW_LINE>// add series<NEW_LINE>XYSeries series = chart.addSeries(SERIES_NAME, xAxisData, yAxisData);<NEW_LINE>series.setMarker(SeriesMarkers.NONE);<NEW_LINE>return new XChartPanel(chart);<NEW_LINE>}
Date(bitcoiniumTicker.getTimestamp());
1,264,670
public TorrentMetadata parse(byte[] metadata) throws InvalidBEncodingException, RuntimeException {<NEW_LINE>final Map<String, BEValue> dictionaryMetadata;<NEW_LINE>try {<NEW_LINE>dictionaryMetadata = BDecoder.bdecode(new ByteArrayInputStream(metadata)).getMap();<NEW_LINE>} catch (InvalidBEncodingException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>final Map<String, BEValue> infoTable = getRequiredValueOrThrowException(dictionaryMetadata, INFO_TABLE).getMap();<NEW_LINE>final BEValue creationDateValue = dictionaryMetadata.get(CREATION_DATE_SEC);<NEW_LINE>final long creationDate = creationDateValue == null ? -1 : creationDateValue.getLong();<NEW_LINE>final String comment = getStringOrNull(dictionaryMetadata, COMMENT);<NEW_LINE>final String createdBy = getStringOrNull(dictionaryMetadata, CREATED_BY);<NEW_LINE>final String announceUrl = getStringOrNull(dictionaryMetadata, ANNOUNCE);<NEW_LINE>final List<List<String>> trackers = getTrackers(dictionaryMetadata);<NEW_LINE>final int pieceLength = getRequiredValueOrThrowException(<MASK><NEW_LINE>final byte[] piecesHashes = getRequiredValueOrThrowException(infoTable, PIECES).getBytes();<NEW_LINE>final boolean torrentContainsManyFiles = infoTable.get(FILES) != null;<NEW_LINE>final String dirName = getRequiredValueOrThrowException(infoTable, NAME).getString();<NEW_LINE>final List<TorrentFile> files = parseFiles(infoTable, torrentContainsManyFiles, dirName);<NEW_LINE>if (piecesHashes.length % Constants.PIECE_HASH_SIZE != 0)<NEW_LINE>throw new InvalidBEncodingException("Incorrect size of pieces hashes");<NEW_LINE>final int piecesCount = piecesHashes.length / Constants.PIECE_HASH_SIZE;<NEW_LINE>byte[] infoTableBytes;<NEW_LINE>try {<NEW_LINE>infoTableBytes = BEncoder.bencode(infoTable).array();<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>return new TorrentMetadataImpl(TorrentUtils.calculateSha1Hash(infoTableBytes), trackers, announceUrl, creationDate, comment, createdBy, dirName, files, piecesCount, pieceLength, piecesHashes);<NEW_LINE>}
infoTable, PIECE_LENGTH).getInt();
1,413,652
public QualityQuery[] readQueries(BufferedReader reader) throws IOException {<NEW_LINE>ArrayList<QualityQuery> <MASK><NEW_LINE>StringBuilder sb;<NEW_LINE>try {<NEW_LINE>while (null != (sb = read(reader, "<top>", null, false, false))) {<NEW_LINE>HashMap<String, String> fields = new HashMap<>();<NEW_LINE>// id<NEW_LINE>sb = read(reader, "<num>", null, true, false);<NEW_LINE>int k = sb.indexOf(":");<NEW_LINE>String id = sb.substring(k + 1).trim();<NEW_LINE>// title<NEW_LINE>sb = read(reader, "<title>", null, true, false);<NEW_LINE>k = sb.indexOf(">");<NEW_LINE>String title = sb.substring(k + 1).trim();<NEW_LINE>// description<NEW_LINE>read(reader, "<desc>", null, false, false);<NEW_LINE>sb.setLength(0);<NEW_LINE>String line = null;<NEW_LINE>while ((line = reader.readLine()) != null) {<NEW_LINE>if (line.startsWith("<narr>"))<NEW_LINE>break;<NEW_LINE>if (sb.length() > 0)<NEW_LINE>sb.append(' ');<NEW_LINE>sb.append(line);<NEW_LINE>}<NEW_LINE>String description = sb.toString().trim();<NEW_LINE>// narrative<NEW_LINE>sb.setLength(0);<NEW_LINE>while ((line = reader.readLine()) != null) {<NEW_LINE>if (line.startsWith("</top>"))<NEW_LINE>break;<NEW_LINE>if (sb.length() > 0)<NEW_LINE>sb.append(' ');<NEW_LINE>sb.append(line);<NEW_LINE>}<NEW_LINE>String narrative = sb.toString().trim();<NEW_LINE>// we got a topic!<NEW_LINE>fields.put("title", title);<NEW_LINE>fields.put("description", description);<NEW_LINE>fields.put("narrative", narrative);<NEW_LINE>QualityQuery topic = new QualityQuery(id, fields);<NEW_LINE>res.add(topic);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>reader.close();<NEW_LINE>}<NEW_LINE>// sort result array (by ID)<NEW_LINE>QualityQuery[] qq = res.toArray(new QualityQuery[0]);<NEW_LINE>Arrays.sort(qq);<NEW_LINE>return qq;<NEW_LINE>}
res = new ArrayList<>();
1,425,511
public void encode(ByteBuffer buffer, int base) {<NEW_LINE>boolean isStatic = _entry.isStatic();<NEW_LINE>if (isStatic) {<NEW_LINE>// Indexed Field Line with Static Reference.<NEW_LINE>buffer.put((byte) (0x80 | 0x40));<NEW_LINE>int relativeIndex = _entry.getIndex();<NEW_LINE>NBitIntegerEncoder.encode(buffer, 6, relativeIndex);<NEW_LINE>} else if (_entry.getIndex() < base) {<NEW_LINE>// Indexed Field Line with Dynamic Reference.<NEW_LINE>buffer.put((byte) 0x80);<NEW_LINE>int relativeIndex = base - (_entry.getIndex() + 1);<NEW_LINE>NBitIntegerEncoder.encode(buffer, 6, relativeIndex);<NEW_LINE>} else {<NEW_LINE>// Indexed Field Line with Post-Base Index.<NEW_LINE>buffer.put((byte) 0x10);<NEW_LINE>int relativeIndex <MASK><NEW_LINE>NBitIntegerEncoder.encode(buffer, 4, relativeIndex);<NEW_LINE>}<NEW_LINE>}
= _entry.getIndex() - base;
1,280,747
public static SuggestedFix.Builder addValuesToAnnotationArgument(AnnotationTree annotation, String parameterName, Collection<String> newValues, VisitorState state) {<NEW_LINE>if (annotation.getArguments().isEmpty()) {<NEW_LINE>String parameterPrefix = parameterName.equals("value") ? "" : (parameterName + " = ");<NEW_LINE>return SuggestedFix.builder().replace(annotation, annotation.toString().replaceFirst("\\(\\)", "(" + parameterPrefix + newArgument(newValues) + ")"));<NEW_LINE>}<NEW_LINE>Optional<ExpressionTree> <MASK><NEW_LINE>if (!maybeExistingArgument.isPresent()) {<NEW_LINE>return SuggestedFix.builder().prefixWith(annotation.getArguments().get(0), parameterName + " = " + newArgument(newValues) + ", ");<NEW_LINE>}<NEW_LINE>ExpressionTree existingArgument = maybeExistingArgument.get();<NEW_LINE>if (!existingArgument.getKind().equals(NEW_ARRAY)) {<NEW_LINE>return SuggestedFix.builder().replace(existingArgument, newArgument(state.getSourceForNode(existingArgument), newValues));<NEW_LINE>}<NEW_LINE>NewArrayTree newArray = (NewArrayTree) existingArgument;<NEW_LINE>if (newArray.getInitializers().isEmpty()) {<NEW_LINE>return SuggestedFix.builder().replace(newArray, newArgument(newValues));<NEW_LINE>} else {<NEW_LINE>return SuggestedFix.builder().postfixWith(getLast(newArray.getInitializers()), ", " + Joiner.on(", ").join(newValues));<NEW_LINE>}<NEW_LINE>}
maybeExistingArgument = findArgument(annotation, parameterName);
768,959
protected DatadogReporter createInstance() {<NEW_LINE>final DatadogReporter.Builder reporter = DatadogReporter.forRegistry(getMetricRegistry());<NEW_LINE>final Transport transport;<NEW_LINE>String transportName = getProperty(TRANSPORT);<NEW_LINE>if ("http".equalsIgnoreCase(transportName)) {<NEW_LINE>HttpTransport.Builder builder = new HttpTransport.Builder();<NEW_LINE>builder.withApiKey(getProperty(API_KEY));<NEW_LINE>if (hasProperty(CONNECT_TIMEOUT)) {<NEW_LINE>builder.withConnectTimeout(getProperty(CONNECT_TIMEOUT, Integer.class));<NEW_LINE>}<NEW_LINE>if (hasProperty(SOCKET_TIMEOUT)) {<NEW_LINE>builder.withSocketTimeout(getProperty(SOCKET_TIMEOUT, Integer.class));<NEW_LINE>}<NEW_LINE>transport = builder.build();<NEW_LINE>} else if ("udp".equalsIgnoreCase(transportName) || "statsd".equalsIgnoreCase(transportName)) {<NEW_LINE>UdpTransport.Builder builder = new UdpTransport.Builder();<NEW_LINE>if (hasProperty(STATSD_HOST)) {<NEW_LINE>builder.withStatsdHost(getProperty(STATSD_HOST));<NEW_LINE>}<NEW_LINE>if (hasProperty(STATSD_PORT)) {<NEW_LINE>builder.withPort(getProperty<MASK><NEW_LINE>}<NEW_LINE>if (hasProperty(STATSD_PREFIX)) {<NEW_LINE>builder.withPrefix(getProperty(STATSD_PREFIX));<NEW_LINE>}<NEW_LINE>transport = builder.build();<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Invalid Datadog Transport: " + transportName);<NEW_LINE>}<NEW_LINE>reporter.withTransport(transport);<NEW_LINE>if (hasProperty(TAGS)) {<NEW_LINE>reporter.withTags(asList(StringUtils.tokenizeToStringArray(getProperty(TAGS), ",", true, true)));<NEW_LINE>}<NEW_LINE>if (StringUtils.hasText(getProperty(HOST))) {<NEW_LINE>reporter.withHost(getProperty(HOST));<NEW_LINE>} else if ("true".equalsIgnoreCase(getProperty(EC2_HOST))) {<NEW_LINE>try {<NEW_LINE>reporter.withEC2Host();<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new IllegalStateException("DatadogReporter.Builder.withEC2Host threw an exception", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (hasProperty(EXPANSION)) {<NEW_LINE>String configString = getProperty(EXPANSION).trim().toUpperCase(Locale.ENGLISH);<NEW_LINE>final EnumSet<Expansion> expansions;<NEW_LINE>if ("ALL".equals(configString)) {<NEW_LINE>expansions = Expansion.ALL;<NEW_LINE>} else {<NEW_LINE>expansions = EnumSet.noneOf(Expansion.class);<NEW_LINE>for (String expandedMetricStr : StringUtils.tokenizeToStringArray(configString, ",", true, true)) {<NEW_LINE>expansions.add(Expansion.valueOf(expandedMetricStr.replace(' ', '_')));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reporter.withExpansions(expansions);<NEW_LINE>}<NEW_LINE>if (hasProperty(DYNAMIC_TAG_CALLBACK_REF)) {<NEW_LINE>reporter.withDynamicTagCallback(getPropertyRef(DYNAMIC_TAG_CALLBACK_REF, DynamicTagsCallback.class));<NEW_LINE>}<NEW_LINE>if (hasProperty(METRIC_NAME_FORMATTER_REF)) {<NEW_LINE>reporter.withMetricNameFormatter(getPropertyRef(METRIC_NAME_FORMATTER_REF, MetricNameFormatter.class));<NEW_LINE>}<NEW_LINE>if (hasProperty(PREFIX)) {<NEW_LINE>reporter.withPrefix(getProperty(PREFIX));<NEW_LINE>}<NEW_LINE>if (hasProperty(DURATION_UNIT)) {<NEW_LINE>reporter.convertDurationsTo(getProperty(DURATION_UNIT, TimeUnit.class));<NEW_LINE>}<NEW_LINE>if (hasProperty(RATE_UNIT)) {<NEW_LINE>reporter.convertRatesTo(getProperty(RATE_UNIT, TimeUnit.class));<NEW_LINE>}<NEW_LINE>if (hasProperty(CLOCK_REF)) {<NEW_LINE>reporter.withClock(getPropertyRef(CLOCK_REF, Clock.class));<NEW_LINE>}<NEW_LINE>reporter.filter(getMetricFilter());<NEW_LINE>return reporter.build();<NEW_LINE>}
(STATSD_PORT, Integer.class));
834,640
public Request<DescribeImportImageTasksRequest> marshall(DescribeImportImageTasksRequest describeImportImageTasksRequest) {<NEW_LINE>if (describeImportImageTasksRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeImportImageTasksRequest> request = new DefaultRequest<DescribeImportImageTasksRequest>(describeImportImageTasksRequest, "AmazonEC2");<NEW_LINE>request.addParameter("Action", "DescribeImportImageTasks");<NEW_LINE>request.addParameter("Version", "2015-10-01");<NEW_LINE>java.util.List<String> importTaskIdsList = describeImportImageTasksRequest.getImportTaskIds();<NEW_LINE>int importTaskIdsListIndex = 1;<NEW_LINE>for (String importTaskIdsListValue : importTaskIdsList) {<NEW_LINE>if (importTaskIdsListValue != null) {<NEW_LINE>request.addParameter("ImportTaskId." + importTaskIdsListIndex, StringUtils.fromString(importTaskIdsListValue));<NEW_LINE>}<NEW_LINE>importTaskIdsListIndex++;<NEW_LINE>}<NEW_LINE>if (describeImportImageTasksRequest.getNextToken() != null) {<NEW_LINE>request.addParameter("NextToken", StringUtils.fromString(describeImportImageTasksRequest.getNextToken()));<NEW_LINE>}<NEW_LINE>if (describeImportImageTasksRequest.getMaxResults() != null) {<NEW_LINE>request.addParameter("MaxResults", StringUtils.fromInteger(describeImportImageTasksRequest.getMaxResults()));<NEW_LINE>}<NEW_LINE>java.util.List<Filter> filtersList = describeImportImageTasksRequest.getFilters();<NEW_LINE>int filtersListIndex = 1;<NEW_LINE>for (Filter filtersListValue : filtersList) {<NEW_LINE>Filter filterMember = filtersListValue;<NEW_LINE>if (filterMember != null) {<NEW_LINE>if (filterMember.getName() != null) {<NEW_LINE>request.addParameter("Filters." + filtersListIndex + ".Name", StringUtils.fromString(filterMember.getName()));<NEW_LINE>}<NEW_LINE>java.util.List<String<MASK><NEW_LINE>int valuesListIndex = 1;<NEW_LINE>for (String valuesListValue : valuesList) {<NEW_LINE>if (valuesListValue != null) {<NEW_LINE>request.addParameter("Filters." + filtersListIndex + ".Value." + valuesListIndex, StringUtils.fromString(valuesListValue));<NEW_LINE>}<NEW_LINE>valuesListIndex++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>filtersListIndex++;<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
> valuesList = filterMember.getValues();
1,761,935
public Container or(final ArrayContainer value2) {<NEW_LINE>final ArrayContainer value1 = this;<NEW_LINE>int totalCardinality = value1.getCardinality() + value2.getCardinality();<NEW_LINE>if (totalCardinality > DEFAULT_MAX_SIZE) {<NEW_LINE>// it could be a bitmap!<NEW_LINE>BitmapContainer bc = new BitmapContainer();<NEW_LINE>for (int k = 0; k < value2.cardinality; ++k) {<NEW_LINE>char v = value2.content[k];<NEW_LINE>final int i = (v) >>> 6;<NEW_LINE>bc.bitmap[i] |= (1L << v);<NEW_LINE>}<NEW_LINE>for (int k = 0; k < this.cardinality; ++k) {<NEW_LINE>char v = this.content[k];<NEW_LINE>final int i = (v) >>> 6;<NEW_LINE>bc.bitmap[i] |= (1L << v);<NEW_LINE>}<NEW_LINE>bc.cardinality = 0;<NEW_LINE>for (long k : bc.bitmap) {<NEW_LINE>bc.cardinality += Long.bitCount(k);<NEW_LINE>}<NEW_LINE>if (bc.cardinality <= DEFAULT_MAX_SIZE) {<NEW_LINE>return bc.toArrayContainer();<NEW_LINE>} else if (bc.isFull()) {<NEW_LINE>return RunContainer.full();<NEW_LINE>}<NEW_LINE>return bc;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>answer.cardinality = Util.unsignedUnion2by2(value1.content, 0, value1.getCardinality(), value2.content, 0, value2.getCardinality(), answer.content);<NEW_LINE>return answer;<NEW_LINE>}
ArrayContainer answer = new ArrayContainer(totalCardinality);
908,818
public static List<Object> createNewSubBody(List<Object> oldSubBody, int nodeNumber, ASTLabeledBlockNode labelBlock) {<NEW_LINE>// create a new SubBody<NEW_LINE>List<Object> newSubBody = new ArrayList<Object>();<NEW_LINE>// this is an iterator of ASTNodes<NEW_LINE>Iterator<Object> it = oldSubBody.iterator();<NEW_LINE>// copy to newSubBody all nodes until you get to nodeNumber<NEW_LINE>int index = 0;<NEW_LINE>while (index != nodeNumber) {<NEW_LINE>if (!it.hasNext()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>newSubBody.add(it.next());<NEW_LINE>index++;<NEW_LINE>}<NEW_LINE>// at this point the iterator is pointing to the ASTLabeledBlock to be removed<NEW_LINE>// just to make sure check this<NEW_LINE>ASTNode toRemove = (ASTNode) it.next();<NEW_LINE>if (!(toRemove instanceof ASTLabeledBlockNode)) {<NEW_LINE>// something is wrong<NEW_LINE>return null;<NEW_LINE>} else {<NEW_LINE>ASTLabeledBlockNode toRemoveNode = (ASTLabeledBlockNode) toRemove;<NEW_LINE>// just double checking that this is a null label<NEW_LINE>SETNodeLabel label = toRemoveNode.get_Label();<NEW_LINE>if (label.toString() != null) {<NEW_LINE>// something is wrong we cant remove a non null label<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// so this is the label to remove<NEW_LINE>// removing a label means bringing all its bodies one step up the hierarchy<NEW_LINE>List<Object> blocksSubBodies = toRemoveNode.get_SubBodies();<NEW_LINE>// we know this is a labeledBlock so it has only one subBody<NEW_LINE>List onlySubBodyOfLabeledBlock = (<MASK><NEW_LINE>// all these subBodies should be added to the newSubbody<NEW_LINE>newSubBody.addAll(onlySubBodyOfLabeledBlock);<NEW_LINE>}<NEW_LINE>// add any remaining nodes in the oldSubBody to the new one<NEW_LINE>while (it.hasNext()) {<NEW_LINE>newSubBody.add(it.next());<NEW_LINE>}<NEW_LINE>// newSubBody is ready return it<NEW_LINE>return newSubBody;<NEW_LINE>}
List) blocksSubBodies.get(0);
1,736,699
public void updateTabletServerInfo(Monitor monitor, TabletServerStatus thriftStatus, TableInfo summary) {<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>this.server = this.ip = this.hostname = thriftStatus.name;<NEW_LINE>this.tablets = summary.tablets;<NEW_LINE>this.lastContact = now - thriftStatus.lastContact;<NEW_LINE>this.responseTime = thriftStatus.responseTime;<NEW_LINE>this.entries = summary.recs;<NEW_LINE>this.ingest = cleanNumber(summary.ingestRate);<NEW_LINE>this.query = cleanNumber(summary.queryRate);<NEW_LINE>this.holdtime = thriftStatus.holdTime;<NEW_LINE>this.scansRunning = summary.scans != null ? summary.scans.running : 0;<NEW_LINE>this.scansQueued = summary.scans != null ? summary.scans.queued : 0;<NEW_LINE>this.scansCombo = scansRunning + "(" + scansQueued + ")";<NEW_LINE>this.scans = this.scansRunning;<NEW_LINE>this.scansCompacting = new CompactionsList(this.scansRunning, this.scansQueued);<NEW_LINE>this.minorRunning = summary.minors != null ? summary.minors.running : 0;<NEW_LINE>this.minorQueued = summary.minors != null ? summary.minors.queued : 0;<NEW_LINE>this.minorCombo = minorRunning + "(" + minorQueued + ")";<NEW_LINE>this.minor = new CompactionsList(this.minorRunning, this.minorQueued);<NEW_LINE>this.majorRunning = summary.majors != null ? summary.majors.running : 0;<NEW_LINE>this.majorQueued = summary.majors != null ? summary.majors.queued : 0;<NEW_LINE>this.majorCombo = majorRunning + "(" + majorQueued + ")";<NEW_LINE>this.major = new CompactionsList(<MASK><NEW_LINE>this.compactions = new CompactionsTypes(scansCompacting, major, minor);<NEW_LINE>this.osload = thriftStatus.osLoad;<NEW_LINE>this.version = thriftStatus.version;<NEW_LINE>this.lookups = thriftStatus.lookups;<NEW_LINE>this.dataCacheHits = thriftStatus.dataCacheHits;<NEW_LINE>this.dataCacheRequests = thriftStatus.dataCacheRequest;<NEW_LINE>this.indexCacheHits = thriftStatus.indexCacheHits;<NEW_LINE>this.indexCacheRequests = thriftStatus.indexCacheRequest;<NEW_LINE>this.indexCacheHitRate = this.indexCacheHits / (double) Math.max(this.indexCacheRequests, 1);<NEW_LINE>this.dataCacheHitRate = this.dataCacheHits / (double) Math.max(this.dataCacheRequests, 1);<NEW_LINE>this.ingestMB = cleanNumber(summary.ingestByteRate);<NEW_LINE>this.queryMB = cleanNumber(summary.queryByteRate);<NEW_LINE>this.scansessions = monitor.getLookupRate();<NEW_LINE>// For backwards compatibility<NEW_LINE>this.scanssessions = this.scansessions;<NEW_LINE>this.logRecoveries = new ArrayList<>(thriftStatus.logSorts.size());<NEW_LINE>for (RecoveryStatus recovery : thriftStatus.logSorts) {<NEW_LINE>logRecoveries.add(new RecoveryStatusInformation(recovery));<NEW_LINE>}<NEW_LINE>}
this.majorRunning, this.majorQueued);
1,382,300
public StringBuilder visitTypeVariable(TypeVariable t, Boolean p) {<NEW_LINE>Element e = t.asElement();<NEW_LINE>if (e != null) {<NEW_LINE>String name = e<MASK><NEW_LINE>if (!CAPTURED_WILDCARD.equals(name)) {<NEW_LINE>return DEFAULT_VALUE.append(name);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>DEFAULT_VALUE.append("?");<NEW_LINE>if (!insideCapturedWildcard) {<NEW_LINE>insideCapturedWildcard = true;<NEW_LINE>TypeMirror bound = t.getLowerBound();<NEW_LINE>if (bound != null && bound.getKind() != TypeKind.NULL) {<NEW_LINE>// NOI18N<NEW_LINE>DEFAULT_VALUE.append(" super ");<NEW_LINE>visit(bound, p);<NEW_LINE>} else {<NEW_LINE>bound = t.getUpperBound();<NEW_LINE>if (bound != null && bound.getKind() != TypeKind.NULL) {<NEW_LINE>// NOI18N<NEW_LINE>DEFAULT_VALUE.append(" extends ");<NEW_LINE>if (bound.getKind() == TypeKind.TYPEVAR) {<NEW_LINE>bound = ((TypeVariable) bound).getLowerBound();<NEW_LINE>}<NEW_LINE>visit(bound, p);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>insideCapturedWildcard = false;<NEW_LINE>}<NEW_LINE>return DEFAULT_VALUE;<NEW_LINE>}
.getSimpleName().toString();
319,946
public DescribeMaintenanceWindowScheduleResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeMaintenanceWindowScheduleResult describeMaintenanceWindowScheduleResult = new DescribeMaintenanceWindowScheduleResult();<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 describeMaintenanceWindowScheduleResult;<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("ScheduledWindowExecutions", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>describeMaintenanceWindowScheduleResult.setScheduledWindowExecutions(new ListUnmarshaller<ScheduledWindowExecution>(ScheduledWindowExecutionJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>describeMaintenanceWindowScheduleResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return describeMaintenanceWindowScheduleResult;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
70,008
public void run(RegressionEnvironment env) {<NEW_LINE>env.advanceTime(0);<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String contextExpr = "@public create context MyContext " + "as start @now end after 10 seconds";<NEW_LINE>env.compileDeploy(contextExpr, path);<NEW_LINE>String[] fields = new String[] { "cnt" };<NEW_LINE>String streamExpr = "@name('s0') context MyContext " + "select count(*) as cnt from SupportBean output last when terminated";<NEW_LINE>env.compileDeploy(streamExpr, path).addListener("s0");<NEW_LINE>env.sendEventBean(new SupportBean("E1", 1));<NEW_LINE>env.milestone(0);<NEW_LINE>env.sendEventBean(new SupportBean("E2", 2));<NEW_LINE>env.advanceTime(8000);<NEW_LINE>env.milestone(1);<NEW_LINE>env.sendEventBean(new SupportBean("E3", 3));<NEW_LINE>env.advanceTime(10000);<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 3L });<NEW_LINE>env.milestone(2);<NEW_LINE>env.sendEventBean(<MASK><NEW_LINE>env.advanceTime(19999);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.advanceTime(20000);<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 1L });<NEW_LINE>env.milestone(3);<NEW_LINE>env.advanceTime(30000);<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 0L });<NEW_LINE>env.eplToModelCompileDeploy(streamExpr, path);<NEW_LINE>env.undeployAll();<NEW_LINE>env.eplToModelCompileDeploy(contextExpr);<NEW_LINE>env.undeployAll();<NEW_LINE>}
new SupportBean("E4", 4));
799,160
private Type acmpNullCheck(short opcode, Edge edge, InstructionHandle last, BasicBlock sourceBlock) throws DataflowAnalysisException {<NEW_LINE>Type type = null;<NEW_LINE>//<NEW_LINE>// Make sure that IF a value has been compared to null,<NEW_LINE>// this edge is the edge on which the<NEW_LINE>// compared value is definitely null.<NEW_LINE>//<NEW_LINE>if ((opcode == Constants.IF_ACMPEQ && edge.getType() == EdgeTypes.IFCMP_EDGE) || (opcode == Constants.IF_ACMPNE && edge.getType() == EdgeTypes.FALL_THROUGH_EDGE)) {<NEW_LINE>//<NEW_LINE>// Check nullness and type of the top two stack values.<NEW_LINE>//<NEW_LINE>Location location <MASK><NEW_LINE>IsNullValueFrame invFrame = invDataflow.getFactAtLocation(location);<NEW_LINE>TypeFrame typeFrame = typeDataflow.getFactAtLocation(location);<NEW_LINE>if (invFrame.isValid() && typeFrame.isValid()) {<NEW_LINE>//<NEW_LINE>// See if exactly one of the top two stack values is definitely<NEW_LINE>// null<NEW_LINE>//<NEW_LINE>boolean leftIsNull = invFrame.getStackValue(1).isDefinitelyNull();<NEW_LINE>boolean rightIsNull = invFrame.getStackValue(0).isDefinitelyNull();<NEW_LINE>if ((leftIsNull || rightIsNull) && !(leftIsNull && rightIsNull)) {<NEW_LINE>//<NEW_LINE>// Now we can determine what type was compared to null.<NEW_LINE>//<NEW_LINE>type = typeFrame.getStackValue(leftIsNull ? 0 : 1);<NEW_LINE>if (DEBUG_NULL_CHECK) {<NEW_LINE>System.out.println("acmp comparison of " + type + " to null at " + last);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return type;<NEW_LINE>}
= new Location(last, sourceBlock);
1,596,873
public static final int[] readThisIntArrayXml(XmlPullParser parser, String endTag, String[] name) throws XmlPullParserException, java.io.IOException {<NEW_LINE>int num;<NEW_LINE>try {<NEW_LINE>num = Integer.parseInt(parser.getAttributeValue(null, "num"));<NEW_LINE>} catch (NullPointerException e) {<NEW_LINE>throw new XmlPullParserException("Need num attribute in int-array");<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>throw new XmlPullParserException("Not a number in num attribute in int-array");<NEW_LINE>}<NEW_LINE>parser.next();<NEW_LINE>int[] array = new int[num];<NEW_LINE>int i = 0;<NEW_LINE>int eventType = parser.getEventType();<NEW_LINE>do {<NEW_LINE>if (eventType == parser.START_TAG) {<NEW_LINE>if (parser.getName().equals("item")) {<NEW_LINE>try {<NEW_LINE>array[i] = Integer.parseInt(parser.getAttributeValue(null, "value"));<NEW_LINE>} catch (NullPointerException e) {<NEW_LINE>throw new XmlPullParserException("Need value attribute in item");<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>throw new XmlPullParserException("Not a number in value attribute in item");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new XmlPullParserException(<MASK><NEW_LINE>}<NEW_LINE>} else if (eventType == parser.END_TAG) {<NEW_LINE>if (parser.getName().equals(endTag)) {<NEW_LINE>return array;<NEW_LINE>} else if (parser.getName().equals("item")) {<NEW_LINE>i++;<NEW_LINE>} else {<NEW_LINE>throw new XmlPullParserException("Expected " + endTag + " end tag at: " + parser.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>eventType = parser.next();<NEW_LINE>} while (eventType != parser.END_DOCUMENT);<NEW_LINE>throw new XmlPullParserException("Document ended before " + endTag + " end tag");<NEW_LINE>}
"Expected item tag at: " + parser.getName());
618,805
private static void initializeGlide(@NonNull Context context, @NonNull GlideBuilder builder, @Nullable GeneratedAppGlideModule annotationGeneratedModule) {<NEW_LINE>Context applicationContext = context.getApplicationContext();<NEW_LINE>List<GlideModule> manifestModules = Collections.emptyList();<NEW_LINE>if (annotationGeneratedModule == null || annotationGeneratedModule.isManifestParsingEnabled()) {<NEW_LINE>manifestModules = new ManifestParser(applicationContext).parse();<NEW_LINE>}<NEW_LINE>if (annotationGeneratedModule != null && !annotationGeneratedModule.getExcludedModuleClasses().isEmpty()) {<NEW_LINE>Set<Class<?>> excludedModuleClasses = annotationGeneratedModule.getExcludedModuleClasses();<NEW_LINE>Iterator<GlideModule> iterator = manifestModules.iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>GlideModule current = iterator.next();<NEW_LINE>if (!excludedModuleClasses.contains(current.getClass())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (Log.isLoggable(TAG, Log.DEBUG)) {<NEW_LINE>Log.d(TAG, "AppGlideModule excludes manifest GlideModule: " + current);<NEW_LINE>}<NEW_LINE>iterator.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (Log.isLoggable(TAG, Log.DEBUG)) {<NEW_LINE>for (GlideModule glideModule : manifestModules) {<NEW_LINE>Log.d(TAG, "Discovered GlideModule from manifest: " + glideModule.getClass());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>RequestManagerRetriever.RequestManagerFactory factory = annotationGeneratedModule != null <MASK><NEW_LINE>builder.setRequestManagerFactory(factory);<NEW_LINE>for (GlideModule module : manifestModules) {<NEW_LINE>module.applyOptions(applicationContext, builder);<NEW_LINE>}<NEW_LINE>if (annotationGeneratedModule != null) {<NEW_LINE>annotationGeneratedModule.applyOptions(applicationContext, builder);<NEW_LINE>}<NEW_LINE>Glide glide = builder.build(applicationContext, manifestModules, annotationGeneratedModule);<NEW_LINE>applicationContext.registerComponentCallbacks(glide);<NEW_LINE>Glide.glide = glide;<NEW_LINE>}
? annotationGeneratedModule.getRequestManagerFactory() : null;
1,189,334
protected boolean isAffectedByOpenable(IJavaElementDelta delta, IJavaElement element, int eventType) {<NEW_LINE>if (element instanceof CompilationUnit) {<NEW_LINE>CompilationUnit cu = (CompilationUnit) element;<NEW_LINE>ICompilationUnit focusCU = this.focusType != null ? this.focusType.getCompilationUnit() : null;<NEW_LINE>if (focusCU != null && focusCU.getOwner() != cu.getOwner())<NEW_LINE>return false;<NEW_LINE>// ADDED delta arising from getWorkingCopy() should be ignored<NEW_LINE>if (eventType != ElementChangedEvent.POST_RECONCILE && !cu.isPrimary() && delta.getKind() == IJavaElementDelta.ADDED)<NEW_LINE>return false;<NEW_LINE>ChangeCollector collector = this.changeCollector;<NEW_LINE>if (collector == null) {<NEW_LINE>collector = new ChangeCollector(this);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>collector.addChange(cu, delta);<NEW_LINE>} catch (JavaModelException e) {<NEW_LINE>if (DEBUG)<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>if (cu.isWorkingCopy() && eventType == ElementChangedEvent.POST_RECONCILE) {<NEW_LINE>// changes to working copies are batched<NEW_LINE>this.changeCollector = collector;<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>return collector.needsRefresh();<NEW_LINE>}<NEW_LINE>} else if (element instanceof ClassFile) {<NEW_LINE>switch(delta.getKind()) {<NEW_LINE>case IJavaElementDelta.REMOVED:<NEW_LINE>IOpenable o = (IOpenable) element;<NEW_LINE>return this.files.get(o) != null;<NEW_LINE>case IJavaElementDelta.ADDED:<NEW_LINE>IType type = ((<MASK><NEW_LINE>String typeName = type.getElementName();<NEW_LINE>if (hasSupertype(typeName) || subtypesIncludeSupertypeOf(type) || this.missingTypes.contains(typeName)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case IJavaElementDelta.CHANGED:<NEW_LINE>IJavaElementDelta[] children = delta.getAffectedChildren();<NEW_LINE>for (int i = 0, length = children.length; i < length; i++) {<NEW_LINE>IJavaElementDelta child = children[i];<NEW_LINE>IJavaElement childElement = child.getElement();<NEW_LINE>if (childElement instanceof IType) {<NEW_LINE>type = (IType) childElement;<NEW_LINE>boolean hasVisibilityChange = (delta.getFlags() & IJavaElementDelta.F_MODIFIERS) > 0;<NEW_LINE>boolean hasSupertypeChange = (delta.getFlags() & IJavaElementDelta.F_SUPER_TYPES) > 0;<NEW_LINE>if ((hasVisibilityChange && hasSupertype(type.getElementName())) || (hasSupertypeChange && includesTypeOrSupertype(type))) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
ClassFile) element).getType();
1,703,332
final UpdateRateBasedRuleResult executeUpdateRateBasedRule(UpdateRateBasedRuleRequest updateRateBasedRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateRateBasedRuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateRateBasedRuleRequest> request = null;<NEW_LINE>Response<UpdateRateBasedRuleResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateRateBasedRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateRateBasedRuleRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "WAF Regional");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateRateBasedRule");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateRateBasedRuleResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateRateBasedRuleResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
949,125
private void loadNode82() {<NEW_LINE>DataTypeEncodingTypeNode node = new DataTypeEncodingTypeNode(this.context, Identifiers.TimeZoneDataType_Encoding_DefaultXml, new QualifiedName(0, "Default XML"), new LocalizedText("en", "Default XML"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valueOf(0));<NEW_LINE>node.addReference(new Reference(Identifiers.TimeZoneDataType_Encoding_DefaultXml, Identifiers.HasEncoding, Identifiers.TimeZoneDataType.expanded(), false));<NEW_LINE>node.addReference(new Reference(Identifiers.TimeZoneDataType_Encoding_DefaultXml, Identifiers.HasDescription, Identifiers.OpcUa_XmlSchema_TimeZoneDataType<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.TimeZoneDataType_Encoding_DefaultXml, Identifiers.HasTypeDefinition, Identifiers.DataTypeEncodingType.expanded(), true));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
1,256,828
public double computeScore(double fullNetRegTerm, boolean training, LayerWorkspaceMgr workspaceMgr) {<NEW_LINE>if (input == null || labels == null)<NEW_LINE>throw new IllegalStateException("Cannot calculate score without input and labels " + layerId());<NEW_LINE>this.fullNetRegTerm = fullNetRegTerm;<NEW_LINE>INDArray preOut = preOutput2d(training, workspaceMgr);<NEW_LINE>// center loss has two components<NEW_LINE>// the first enforces inter-class dissimilarity, the second intra-class dissimilarity (squared l2 norm of differences)<NEW_LINE>ILossFunction interClassLoss = layerConf().getLossFn();<NEW_LINE>// calculate the intra-class score component<NEW_LINE>INDArray centers = params.get(CenterLossParamInitializer.CENTER_KEY);<NEW_LINE>// Ensure correct dtype (same as params); no-op if already correct dtype<NEW_LINE>INDArray l = labels.castTo(centers.dataType());<NEW_LINE>INDArray <MASK><NEW_LINE>// double intraClassScore = intraClassLoss.computeScore(centersForExamples, input, Activation.IDENTITY.getActivationFunction(), maskArray, false);<NEW_LINE>INDArray norm2DifferenceSquared = input.sub(centersForExamples).norm2(1);<NEW_LINE>norm2DifferenceSquared.muli(norm2DifferenceSquared);<NEW_LINE>double sum = norm2DifferenceSquared.sumNumber().doubleValue();<NEW_LINE>double lambda = layerConf().getLambda();<NEW_LINE>double intraClassScore = lambda / 2.0 * sum;<NEW_LINE>// intraClassScore = intraClassScore * layerConf().getLambda() / 2;<NEW_LINE>// now calculate the inter-class score component<NEW_LINE>double interClassScore = interClassLoss.computeScore(getLabels2d(workspaceMgr, ArrayType.FF_WORKING_MEM), preOut, layerConf().getActivationFn(), maskArray, false);<NEW_LINE>double score = interClassScore + intraClassScore;<NEW_LINE>score /= getInputMiniBatchSize();<NEW_LINE>score += fullNetRegTerm;<NEW_LINE>this.score = score;<NEW_LINE>return score;<NEW_LINE>}
centersForExamples = l.mmul(centers);
125,701
public <S, T> MultiNodeResult<T> executeCommandAsyncOnNodes(ClusterCommandCallback<S, T> callback, Iterable<RedisClusterNode> nodes) {<NEW_LINE>Assert.notNull(callback, "Callback must not be null!");<NEW_LINE>Assert.notNull(nodes, "Nodes must not be null!");<NEW_LINE>List<RedisClusterNode> resolvedRedisClusterNodes = new ArrayList<>();<NEW_LINE>ClusterTopology topology = topologyProvider.getTopology();<NEW_LINE>for (RedisClusterNode node : nodes) {<NEW_LINE>try {<NEW_LINE>resolvedRedisClusterNodes.add<MASK><NEW_LINE>} catch (ClusterStateFailureException e) {<NEW_LINE>throw new IllegalArgumentException(String.format("Node %s is unknown to cluster", node), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Map<NodeExecution, Future<NodeResult<T>>> futures = new LinkedHashMap<>();<NEW_LINE>for (RedisClusterNode node : resolvedRedisClusterNodes) {<NEW_LINE>futures.put(new NodeExecution(node), executor.submit(() -> executeCommandOnSingleNode(callback, node)));<NEW_LINE>}<NEW_LINE>return collectResults(futures);<NEW_LINE>}
(topology.lookup(node));
1,842,041
public void read(JmeImporter importer) throws IOException {<NEW_LINE>super.read(importer);<NEW_LINE>InputCapsule c = importer.getCapsule(this);<NEW_LINE>size = c.readInt("size", 0);<NEW_LINE>stepScale = (Vector3f) c.readSavable("stepScale", null);<NEW_LINE>offset = (Vector2f) c.readSavable("offset", new Vector2f(0, 0));<NEW_LINE>offsetAmount = c.readFloat("offsetAmount", 0);<NEW_LINE>quadrant = <MASK><NEW_LINE>totalSize = c.readInt("totalSize", 0);<NEW_LINE>patchSize = c.readInt("patchSize", 0);<NEW_LINE>// lodCalculator = (LodCalculator) c.readSavable("lodCalculator", createDefaultLodCalculator());<NEW_LINE>// lodCalculatorFactory = (LodCalculatorFactory) c.readSavable("lodCalculatorFactory", null);<NEW_LINE>if (!(getParent() instanceof TerrainQuad)) {<NEW_LINE>BoundingBox all = new BoundingBox(getWorldTranslation(), totalSize, totalSize, totalSize);<NEW_LINE>affectedAreaBBox = all;<NEW_LINE>updateNormals();<NEW_LINE>}<NEW_LINE>}
c.readInt("quadrant", 0);
815,340
public void putCSTable(String contextIDStr, String contextKeyStr, CSTable csTable) throws CSErrorException {<NEW_LINE>ContextClient contextClient = ContextClientFactory.getOrCreateContextClient();<NEW_LINE>try {<NEW_LINE>ContextID <MASK><NEW_LINE>ContextKey contextKey = SerializeHelper.deserializeContextKey(contextKeyStr);<NEW_LINE>ContextValue contextValue = new CommonContextValue();<NEW_LINE>// todo check keywords<NEW_LINE>contextValue.setKeywords("");<NEW_LINE>contextValue.setValue(csTable);<NEW_LINE>if (contextID instanceof CombinedNodeIDContextID) {<NEW_LINE>contextID = ((CombinedNodeIDContextID) contextID).getLinkisHaWorkFlowContextID();<NEW_LINE>}<NEW_LINE>contextClient.update(contextID, contextKey, contextValue);<NEW_LINE>} catch (ErrorException e) {<NEW_LINE>throw new CSErrorException(ErrorCode.DESERIALIZE_ERROR, "putCSTable error ", e);<NEW_LINE>}<NEW_LINE>}
contextID = SerializeHelper.deserializeContextID(contextIDStr);
1,637,732
public void addJoin(String type, String table, TableJoinColumn[] cols, String a1, String a2, String extraWhere) {<NEW_LINE>if (tableJoins == null) {<NEW_LINE>tableJoins = new HashSet<>();<NEW_LINE>}<NEW_LINE>String joinKey = table + "-" + a1 + "-" + a2;<NEW_LINE>if (tableJoins.contains(joinKey)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>tableJoins.add(joinKey);<NEW_LINE>sb.append<MASK><NEW_LINE>boolean addAsOfOnClause = false;<NEW_LINE>if (draftSupport != null) {<NEW_LINE>appendTable(table, draftSupport.getDraftTable(table));<NEW_LINE>} else if (!historyQuery) {<NEW_LINE>sb.append(" ").append(table).append(" ");<NEW_LINE>} else {<NEW_LINE>// check if there is an associated history table and if so<NEW_LINE>// use the unionAll view - we expect an additional predicate to match<NEW_LINE>String asOfView = historySupport.getAsOfView(table);<NEW_LINE>appendTable(table, asOfView);<NEW_LINE>if (asOfView != null) {<NEW_LINE>addAsOfOnClause = !historySupport.isStandardsBased();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sb.append(a2);<NEW_LINE>sb.append(" on ");<NEW_LINE>for (int i = 0; i < cols.length; i++) {<NEW_LINE>TableJoinColumn pair = cols[i];<NEW_LINE>if (i > 0) {<NEW_LINE>sb.append(" and ");<NEW_LINE>}<NEW_LINE>if (pair.getForeignSqlFormula() != null) {<NEW_LINE>sb.append(pair.getForeignSqlFormula().replace(tableAliasPlaceHolder, a2));<NEW_LINE>} else {<NEW_LINE>sb.append(a2).append(".").append(pair.getForeignDbColumn());<NEW_LINE>}<NEW_LINE>sb.append(" = ");<NEW_LINE>if (pair.getLocalSqlFormula() != null) {<NEW_LINE>sb.append(pair.getLocalSqlFormula().replace(tableAliasPlaceHolder, a1));<NEW_LINE>} else {<NEW_LINE>sb.append(a1).append(".").append(pair.getLocalDbColumn());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (addAsOfOnClause) {<NEW_LINE>sb.append(" and ").append(historySupport.getAsOfPredicate(a2));<NEW_LINE>}<NEW_LINE>if (extraWhere != null && !extraWhere.isEmpty()) {<NEW_LINE>sb.append(" and ");<NEW_LINE>// we will also need a many-table alias here<NEW_LINE>sb.append(extraWhere.replace(tableAliasPlaceHolder, a2).replace(tableAliasManyPlaceHolder, a1));<NEW_LINE>}<NEW_LINE>}
(" ").append(type);
750,496
private boolean hitsRedundantBreakThreshold(List<Statement> statements, IdentifiedStatement exit) {<NEW_LINE>int count = 0;<NEW_LINE>for (int i = 0; i < statements.size(); ++i) {<NEW_LINE>Statement stmt = statements.get(i);<NEW_LINE>if (!(stmt instanceof ConditionalStatement)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>ConditionalStatement conditional = (ConditionalStatement) stmt;<NEW_LINE>if (!conditional.getConsequent().isEmpty() && !conditional.getAlternative().isEmpty()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>List<Statement> innerStatements = !conditional.getConsequent().isEmpty() ? conditional.getConsequent<MASK><NEW_LINE>if (innerStatements.isEmpty()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Statement last = innerStatements.get(innerStatements.size() - 1);<NEW_LINE>if (!(last instanceof BreakStatement)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>BreakStatement breakStmt = (BreakStatement) last;<NEW_LINE>if (exit != null && exit == breakStmt.getTarget() && ++count == 8) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
() : conditional.getAlternative();
1,141,101
private ReportResult createOutput(final JasperPrint jasperPrint, OutputType outputType) throws JRException, IOException {<NEW_LINE>if (outputType == null) {<NEW_LINE>outputType = DEFAULT_OutputType;<NEW_LINE>}<NEW_LINE>Stopwatch stopwatch = Stopwatch.createStarted();<NEW_LINE>try {<NEW_LINE>if (OutputType.PDF == outputType) {<NEW_LINE>final byte[] data = JasperExportManager.exportReportToPdf(jasperPrint);<NEW_LINE>return ReportResult.builder().outputType(outputType).reportContentBase64(Util.encodeBase64(data)).reportFilename(buildReportFilename(jasperPrint, outputType)).build();<NEW_LINE>} else if (OutputType.HTML == outputType) {<NEW_LINE>final File file = File.createTempFile("JasperPrint", ".html");<NEW_LINE>JasperExportManager.exportReportToHtmlFile(jasperPrint, file.getAbsolutePath());<NEW_LINE>// TODO: handle image links<NEW_LINE>final ByteArrayOutputStream out = new ByteArrayOutputStream();<NEW_LINE>FileUtil.copy(file, out);<NEW_LINE>return ReportResult.builder().outputType(outputType).reportContentBase64(Util.encodeBase64(out.toByteArray())).reportFilename(buildReportFilename(jasperPrint, outputType)).build();<NEW_LINE>} else if (OutputType.XML == outputType) {<NEW_LINE>final ByteArrayOutputStream out = new ByteArrayOutputStream();<NEW_LINE>JasperExportManager.exportReportToXmlStream(jasperPrint, out);<NEW_LINE>return ReportResult.builder().outputType(outputType).reportContentBase64(Util.encodeBase64(out.toByteArray())).reportFilename(buildReportFilename(jasperPrint, outputType)).build();<NEW_LINE>} else if (OutputType.JasperPrint == outputType) {<NEW_LINE>return exportAsJasperPrint(jasperPrint);<NEW_LINE>} else if (OutputType.XLS == outputType) {<NEW_LINE>return exportAsExcel(jasperPrint);<NEW_LINE>} else {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>logger.debug("Took {} to export report to {}", stopwatch.stop(), outputType);<NEW_LINE>}<NEW_LINE>}
RuntimeException("Output type " + outputType + " not supported");
199,647
public void initializeDefaultPreferences() {<NEW_LINE>IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode(CommonEditorPlugin.PLUGIN_ID);<NEW_LINE>prefs.putBoolean(IPreferenceConstants.ENABLE_CHARACTER_PAIR_COLORING, true);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>prefs.put(IPreferenceConstants.CHARACTER_PAIR_COLOR, "128,128,128");<NEW_LINE>prefs.putBoolean(IPreferenceConstants.LINK_OUTLINE_WITH_EDITOR, false);<NEW_LINE>// Tasks<NEW_LINE>// $NON-NLS-1$<NEW_LINE>prefs.put(ICorePreferenceConstants.TASK_TAG_NAMES, "TODO,FIXME,XXX");<NEW_LINE>// $NON-NLS-1$<NEW_LINE>prefs.put(ICorePreferenceConstants.TASK_TAG_PRIORITIES, "NORMAL,HIGH,NORMAL");<NEW_LINE>prefs.putBoolean(ICorePreferenceConstants.TASK_TAGS_CASE_SENSITIVE, true);<NEW_LINE>// mark occurrences<NEW_LINE>prefs.putBoolean(IPreferenceConstants.EDITOR_MARK_OCCURRENCES, false);<NEW_LINE>// camelCase selection<NEW_LINE>prefs.putBoolean(IPreferenceConstants.EDITOR_SUB_WORD_NAVIGATION, true);<NEW_LINE>// content assist<NEW_LINE>prefs.putInt(<MASK><NEW_LINE>prefs.putBoolean(IPreferenceConstants.CONTENT_ASSIST_AUTO_INSERT, true);<NEW_LINE>prefs.putBoolean(IPreferenceConstants.CONTENT_ASSIST_HOVER, true);<NEW_LINE>// insert matching characters<NEW_LINE>prefs.putBoolean(IPreferenceConstants.EDITOR_PEER_CHARACTER_CLOSE, true);<NEW_LINE>// wrap selection<NEW_LINE>prefs.putBoolean(IPreferenceConstants.EDITOR_WRAP_SELECTION, true);<NEW_LINE>// save-action for removing the trailing whitespace<NEW_LINE>prefs.putBoolean(IPreferenceConstants.EDITOR_REMOVE_TRAILING_WHITESPACE, false);<NEW_LINE>// enable folding<NEW_LINE>prefs.putBoolean(IPreferenceConstants.EDITOR_ENABLE_FOLDING, true);<NEW_LINE>// default scopes for spell checking<NEW_LINE>// $NON-NLS-1$<NEW_LINE>prefs.// $NON-NLS-1$<NEW_LINE>put(// $NON-NLS-1$<NEW_LINE>IPreferenceConstants.ENABLED_SPELLING_SCOPES, "comment.block.documentation,comment.line,comment.block");<NEW_LINE>// Set the default max cap on # of columns to color per line (a perf fix).<NEW_LINE>int maxCols = IPreferenceConstants.EDITOR_MAX_COLORED_COLUMNS_DEFAULT;<NEW_LINE>try {<NEW_LINE>// Load up the command line value for max columns colored<NEW_LINE>String maxColsVal = System.getProperty(IPreferenceConstants.EDITOR_MAX_COLORED_COLUMNS);<NEW_LINE>if (!StringUtil.isEmpty(maxColsVal)) {<NEW_LINE>maxCols = Integer.parseInt(maxColsVal);<NEW_LINE>}<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>prefs.putInt(IPreferenceConstants.EDITOR_MAX_COLORED_COLUMNS, maxCols);<NEW_LINE>}
IPreferenceConstants.CONTENT_ASSIST_DELAY, CommonSourceViewerConfiguration.DEFAULT_CONTENT_ASSIST_DELAY);
1,013,197
private Collection<? extends IPath> globalFolders() {<NEW_LINE>List<IPath> dirs = new ArrayList<IPath>();<NEW_LINE>// FIXME Handle properly on Windows...<NEW_LINE>Map<String, String> env = ShellExecutable.getEnvironment(location);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String nodePath = env.get("NODE_PATH");<NEW_LINE>if (nodePath != null) {<NEW_LINE>// Split like PATH and add to dirs<NEW_LINE>String pathENV = PathUtil.convertPATH(nodePath);<NEW_LINE>String[] paths = pathENV.split(File.pathSeparator);<NEW_LINE>for (String path : paths) {<NEW_LINE>dirs.add(Path.fromOSString(path));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String home = env.get("HOME");<NEW_LINE>if (home != null) {<NEW_LINE>IPath homePath = Path.fromOSString(home);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>dirs.add<MASK><NEW_LINE>// $NON-NLS-1$<NEW_LINE>dirs.add(homePath.append(".node_libraries"));<NEW_LINE>}<NEW_LINE>// Grab node_prefix setting!<NEW_LINE>try {<NEW_LINE>IPath modulesPath = getModulesPath();<NEW_LINE>if (modulesPath != null) {<NEW_LINE>dirs.add(modulesPath);<NEW_LINE>}<NEW_LINE>} catch (CoreException e) {<NEW_LINE>IdeLog.logError(JSCorePlugin.getDefault(), e);<NEW_LINE>}<NEW_LINE>return dirs;<NEW_LINE>}
(homePath.append(".node_modules"));
1,330,624
final CreateEnvironmentResult executeCreateEnvironment(CreateEnvironmentRequest createEnvironmentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createEnvironmentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateEnvironmentRequest> request = null;<NEW_LINE>Response<CreateEnvironmentResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateEnvironmentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createEnvironmentRequest));<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, "Migration Hub Refactor Spaces");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateEnvironment");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateEnvironmentResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateEnvironmentResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
236,056
public List<JvmGcBo> decodeValues(Buffer valueBuffer, AgentStatDecodingContext decodingContext) {<NEW_LINE>final <MASK><NEW_LINE>final long baseTimestamp = decodingContext.getBaseTimestamp();<NEW_LINE>final long timestampDelta = decodingContext.getTimestampDelta();<NEW_LINE>final long initialTimestamp = baseTimestamp + timestampDelta;<NEW_LINE>final JvmGcType gcType = JvmGcType.getTypeByCode(valueBuffer.readVInt());<NEW_LINE>int numValues = valueBuffer.readVInt();<NEW_LINE>List<Long> startTimestamps = this.codec.decodeValues(valueBuffer, UnsignedLongEncodingStrategy.REPEAT_COUNT, numValues);<NEW_LINE>List<Long> timestamps = this.codec.decodeTimestamps(initialTimestamp, valueBuffer, numValues);<NEW_LINE>// decode headers<NEW_LINE>final byte[] header = valueBuffer.readPrefixedBytes();<NEW_LINE>AgentStatHeaderDecoder headerDecoder = new BitCountingHeaderDecoder(header);<NEW_LINE>JvmGcCodecDecoder decoder = new JvmGcCodecDecoder(codec);<NEW_LINE>decoder.decode(valueBuffer, headerDecoder, numValues);<NEW_LINE>List<JvmGcBo> jvmGcBos = new ArrayList<>(numValues);<NEW_LINE>for (int i = 0; i < numValues; i++) {<NEW_LINE>JvmGcBo jvmGcBo = decoder.getValue(i);<NEW_LINE>jvmGcBo.setAgentId(agentId);<NEW_LINE>jvmGcBo.setStartTimestamp(startTimestamps.get(i));<NEW_LINE>jvmGcBo.setTimestamp(timestamps.get(i));<NEW_LINE>jvmGcBo.setGcType(gcType);<NEW_LINE>jvmGcBos.add(jvmGcBo);<NEW_LINE>}<NEW_LINE>return jvmGcBos;<NEW_LINE>}
String agentId = decodingContext.getAgentId();
849,539
public OAuth2AccessTokenResponse convert(Map<String, String> tokenResponseParameters) {<NEW_LINE>String accessToken = <MASK><NEW_LINE>OAuth2AccessToken.TokenType accessTokenType = null;<NEW_LINE>if (OAuth2AccessToken.TokenType.BEARER.getValue().equalsIgnoreCase(tokenResponseParameters.get(OAuth2ParameterNames.TOKEN_TYPE))) {<NEW_LINE>accessTokenType = OAuth2AccessToken.TokenType.BEARER;<NEW_LINE>}<NEW_LINE>long expiresIn = 0;<NEW_LINE>if (tokenResponseParameters.containsKey(OAuth2ParameterNames.EXPIRES_IN)) {<NEW_LINE>try {<NEW_LINE>expiresIn = Long.valueOf(tokenResponseParameters.get(OAuth2ParameterNames.EXPIRES_IN));<NEW_LINE>} catch (NumberFormatException ex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Set<String> scopes = Collections.emptySet();<NEW_LINE>if (tokenResponseParameters.containsKey(OAuth2ParameterNames.SCOPE)) {<NEW_LINE>String scope = tokenResponseParameters.get(OAuth2ParameterNames.SCOPE);<NEW_LINE>scopes = Arrays.stream(StringUtils.delimitedListToStringArray(scope, " ")).collect(Collectors.toSet());<NEW_LINE>}<NEW_LINE>String refreshToken = tokenResponseParameters.get(OAuth2ParameterNames.REFRESH_TOKEN);<NEW_LINE>Map<String, Object> additionalParameters = new LinkedHashMap<>();<NEW_LINE>tokenResponseParameters.entrySet().stream().filter(e -> !TOKEN_RESPONSE_PARAMETER_NAMES.contains(e.getKey())).forEach(e -> additionalParameters.put(e.getKey(), e.getValue()));<NEW_LINE>return OAuth2AccessTokenResponse.withToken(accessToken).tokenType(accessTokenType).expiresIn(expiresIn).scopes(scopes).refreshToken(refreshToken).additionalParameters(additionalParameters).build();<NEW_LINE>}
tokenResponseParameters.get(OAuth2ParameterNames.ACCESS_TOKEN);
767,407
public ECPoint twice() {<NEW_LINE>if (this.isInfinity()) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>ECCurve curve = this.getCurve();<NEW_LINE>ECFieldElement X1 = this.x;<NEW_LINE>if (X1.isZero()) {<NEW_LINE>// A point with X == 0 is its own additive inverse<NEW_LINE>return curve.getInfinity();<NEW_LINE>}<NEW_LINE>ECFieldElement L1 = this.y, Z1 = this.zs[0];<NEW_LINE><MASK><NEW_LINE>ECFieldElement L1Z1 = Z1IsOne ? L1 : L1.multiply(Z1);<NEW_LINE>ECFieldElement Z1Sq = Z1IsOne ? Z1 : Z1.square();<NEW_LINE>ECFieldElement T = L1.square().add(L1Z1).add(Z1Sq);<NEW_LINE>if (T.isZero()) {<NEW_LINE>return new SecT283R1Point(curve, T, curve.getB().sqrt());<NEW_LINE>}<NEW_LINE>ECFieldElement X3 = T.square();<NEW_LINE>ECFieldElement Z3 = Z1IsOne ? T : T.multiply(Z1Sq);<NEW_LINE>ECFieldElement X1Z1 = Z1IsOne ? X1 : X1.multiply(Z1);<NEW_LINE>ECFieldElement L3 = X1Z1.squarePlusProduct(T, L1Z1).add(X3).add(Z3);<NEW_LINE>return new SecT283R1Point(curve, X3, L3, new ECFieldElement[] { Z3 });<NEW_LINE>}
boolean Z1IsOne = Z1.isOne();
1,651,892
public Map<String, Map<String, AttributeAdapter>> attributeAdaptersForFunction() {<NEW_LINE>Map<String, Map<String, AttributeAdapter>> ret = new HashMap<>();<NEW_LINE>Map<String, AttributeAdapter> tfMappings = new LinkedHashMap<>();<NEW_LINE>val fields = DifferentialFunctionClassHolder.getInstance().getFieldsForFunction(this);<NEW_LINE>tfMappings.put("r0", new IntArrayIntIndexAdapter(0));<NEW_LINE>tfMappings.put("r1", new IntArrayIntIndexAdapter(1));<NEW_LINE>tfMappings.put("r2", new IntArrayIntIndexAdapter(2));<NEW_LINE>tfMappings.put("r3", new IntArrayIntIndexAdapter(3));<NEW_LINE>tfMappings.put("s0", new IntArrayIntIndexAdapter(0));<NEW_LINE>tfMappings.put("s1", new IntArrayIntIndexAdapter(1));<NEW_LINE>tfMappings.put("s2", new IntArrayIntIndexAdapter(2));<NEW_LINE>tfMappings.put("s3", new IntArrayIntIndexAdapter(3));<NEW_LINE>tfMappings.put("isSameMode", new StringEqualsAdapter("SAME"));<NEW_LINE>// Onnx doesn't have this op i think?<NEW_LINE>Map<String, AttributeAdapter> onnxMappings = new HashMap<>();<NEW_LINE>onnxMappings.put("isSameMode", new StringEqualsAdapter("SAME"));<NEW_LINE>ret.<MASK><NEW_LINE>ret.put(onnxName(), onnxMappings);<NEW_LINE>return ret;<NEW_LINE>}
put(tensorflowName(), tfMappings);
1,382,042
// RoutineLoadScheduler will run this method at fixed interval, and renew the timeout tasks<NEW_LINE>public void processTimeoutTasks() {<NEW_LINE>writeLock();<NEW_LINE>try {<NEW_LINE>List<RoutineLoadTaskInfo> runningTasks <MASK><NEW_LINE>for (RoutineLoadTaskInfo routineLoadTaskInfo : runningTasks) {<NEW_LINE>if (routineLoadTaskInfo.isTimeout()) {<NEW_LINE>// here we simply discard the timeout task and create a new one.<NEW_LINE>// the corresponding txn will be aborted by txn manager.<NEW_LINE>// and after renew, the previous task is removed from routineLoadTaskInfoList,<NEW_LINE>// so task can no longer be committed successfully.<NEW_LINE>// the already committed task will not be handled here.<NEW_LINE>RoutineLoadTaskInfo newTask = unprotectRenewTask(routineLoadTaskInfo);<NEW_LINE>Env.getCurrentEnv().getRoutineLoadTaskScheduler().addTaskInQueue(newTask);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>writeUnlock();<NEW_LINE>}<NEW_LINE>}
= new ArrayList<>(routineLoadTaskInfoList);
128,227
public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>return srcSequence.group(option);<NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>Expression exp = param.getLeafExpression();<NEW_LINE>return srcSequence.group(exp, option, ctx);<NEW_LINE>} else if (param.getType() == IParam.Comma) {<NEW_LINE>// ,<NEW_LINE>int size = param.getSubSize();<NEW_LINE>Expression[] exps = new Expression[size];<NEW_LINE>for (int i = 0; i < size; ++i) {<NEW_LINE>IParam <MASK><NEW_LINE>if (sub == null || !sub.isLeaf()) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("group" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>exps[i] = sub.getLeafExpression();<NEW_LINE>}<NEW_LINE>return srcSequence.group(exps, option, ctx);<NEW_LINE>} else if (param.getType() == IParam.Semicolon) {<NEW_LINE>// ;<NEW_LINE>int size = param.getSubSize();<NEW_LINE>if (size != 2) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("group" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>IParam sub0 = param.getSub(0);<NEW_LINE>IParam sub1 = param.getSub(1);<NEW_LINE>Expression[] exps0 = null;<NEW_LINE>String[] names0 = null;<NEW_LINE>if (sub0 != null) {<NEW_LINE>ParamInfo2 pi0 = ParamInfo2.parse(sub0, "group", true, false);<NEW_LINE>exps0 = pi0.getExpressions1();<NEW_LINE>names0 = pi0.getExpressionStrs2();<NEW_LINE>}<NEW_LINE>Expression[] exps1 = null;<NEW_LINE>String[] names1 = null;<NEW_LINE>if (sub1 != null) {<NEW_LINE>ParamInfo2 pi1 = ParamInfo2.parse(sub1, "group", true, false);<NEW_LINE>exps1 = pi1.getExpressions1();<NEW_LINE>names1 = pi1.getExpressionStrs2();<NEW_LINE>}<NEW_LINE>return srcSequence.group(exps0, names0, exps1, names1, option, ctx);<NEW_LINE>} else {<NEW_LINE>ParamInfo2 pi0 = ParamInfo2.parse(param, "group", true, false);<NEW_LINE>Expression[] exps0 = pi0.getExpressions1();<NEW_LINE>String[] names0 = pi0.getExpressionStrs2();<NEW_LINE>return srcSequence.group(exps0, names0, null, null, option, ctx);<NEW_LINE>}<NEW_LINE>}
sub = param.getSub(i);
562,069
public static // Usage = DuplicationMetrics READ_PAIRS READ_PAIR_DUPLICATES<NEW_LINE>void main(String[] args) {<NEW_LINE>DuplicationMetrics m = new DuplicationMetrics();<NEW_LINE>m.READ_PAIRS_EXAMINED = Integer.parseInt(args[0]);<NEW_LINE>m.READ_PAIR_DUPLICATES = Integer.parseInt(args[1]);<NEW_LINE>m.calculateDerivedFields();<NEW_LINE>System.out.<MASK><NEW_LINE>System.out.println("Est. Library Size : " + m.ESTIMATED_LIBRARY_SIZE);<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("X Seq\tX Unique");<NEW_LINE>for (Histogram.Bin<Double> bin : m.calculateRoiHistogram().values()) {<NEW_LINE>System.out.println(bin.getId() + "\t" + bin.getValue());<NEW_LINE>}<NEW_LINE>}
println("Percent Duplication: " + m.PERCENT_DUPLICATION);
1,067,888
public MaryData process(MaryData d) throws Exception {<NEW_LINE>Document doc = d.getDocument();<NEW_LINE>NodeIterator sentenceIt = MaryDomUtils.createNodeIterator(doc, MaryXML.SENTENCE);<NEW_LINE>Element sentence = null;<NEW_LINE>while ((sentence = (Element) sentenceIt.nextNode()) != null) {<NEW_LINE>// Make sure we have the correct voice:<NEW_LINE>Element voice = (Element) MaryDomUtils.getAncestor(sentence, MaryXML.VOICE);<NEW_LINE>Voice maryVoice = Voice.getVoice(voice);<NEW_LINE>if (maryVoice == null) {<NEW_LINE>maryVoice = d.getDefaultVoice();<NEW_LINE>}<NEW_LINE>if (maryVoice == null) {<NEW_LINE>// Determine Locale in order to use default voice<NEW_LINE>Locale locale = MaryUtils.string2locale(doc.getDocumentElement<MASK><NEW_LINE>maryVoice = Voice.getDefaultVoice(locale);<NEW_LINE>}<NEW_LINE>DirectedGraph currentCart = cart;<NEW_LINE>TargetFeatureComputer currentFeatureComputer = featureComputer;<NEW_LINE>if (maryVoice != null) {<NEW_LINE>DirectedGraph voiceCart = maryVoice.getDurationGraph();<NEW_LINE>if (voiceCart != null) {<NEW_LINE>currentCart = voiceCart;<NEW_LINE>logger.debug("Using voice duration graph");<NEW_LINE>FeatureDefinition voiceFeatDef = voiceCart.getFeatureDefinition();<NEW_LINE>currentFeatureComputer = FeatureRegistry.getTargetFeatureComputer(featureProcessorManager, voiceFeatDef.getFeatureNames());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (currentCart == null) {<NEW_LINE>throw new NullPointerException("No cart for predicting duration");<NEW_LINE>}<NEW_LINE>// cumulative duration from beginning of sentence, in seconds:<NEW_LINE>float end = 0;<NEW_LINE>TreeWalker tw = MaryDomUtils.createTreeWalker(sentence, MaryXML.PHONE, MaryXML.BOUNDARY);<NEW_LINE>Element segmentOrBoundary;<NEW_LINE>Element previous = null;<NEW_LINE>while ((segmentOrBoundary = (Element) tw.nextNode()) != null) {<NEW_LINE>String phone = UnitSelector.getPhoneSymbol(segmentOrBoundary);<NEW_LINE>Target t = new Target(phone, segmentOrBoundary);<NEW_LINE>t.setFeatureVector(currentFeatureComputer.computeFeatureVector(t));<NEW_LINE>float durInSeconds;<NEW_LINE>if (segmentOrBoundary.getTagName().equals(MaryXML.BOUNDARY)) {<NEW_LINE>// a pause<NEW_LINE>durInSeconds = enterPauseDuration(segmentOrBoundary, previous, pausetree, pauseFeatureComputer);<NEW_LINE>} else {<NEW_LINE>float[] dur = (float[]) currentCart.interpret(t);<NEW_LINE>assert dur != null : "Null duration";<NEW_LINE>assert dur.length == 2 : "Unexpected duration length: " + dur.length;<NEW_LINE>durInSeconds = dur[1];<NEW_LINE>float stddevInSeconds = dur[0];<NEW_LINE>}<NEW_LINE>end += durInSeconds;<NEW_LINE>int durInMillis = (int) (1000 * durInSeconds);<NEW_LINE>if (segmentOrBoundary.getTagName().equals(MaryXML.BOUNDARY)) {<NEW_LINE>segmentOrBoundary.setAttribute("duration", String.valueOf(durInMillis));<NEW_LINE>} else {<NEW_LINE>// phone<NEW_LINE>segmentOrBoundary.setAttribute("d", String.valueOf(durInMillis));<NEW_LINE>segmentOrBoundary.setAttribute("end", String.valueOf(end));<NEW_LINE>}<NEW_LINE>previous = segmentOrBoundary;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>MaryData output = new MaryData(getOutputType(), d.getLocale());<NEW_LINE>output.setDocument(doc);<NEW_LINE>return output;<NEW_LINE>}
().getAttribute("xml:lang"));
331,275
private void registerPipelineAggregation(PipelineAggregationSpec spec) {<NEW_LINE>namedXContents.add(new NamedXContentRegistry.Entry(BaseAggregationBuilder.class, spec.getName(), (p, c) -> spec.getParser().parse(p, (String) c)));<NEW_LINE>namedWriteables.add(new NamedWriteableRegistry.Entry(PipelineAggregationBuilder.class, spec.getName().getPreferredName()<MASK><NEW_LINE>if (spec.getAggregatorReader() != null) {<NEW_LINE>namedWriteables.add(new NamedWriteableRegistry.Entry(PipelineAggregator.class, spec.getName().getPreferredName(), spec.getAggregatorReader()));<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, Writeable.Reader<? extends InternalAggregation>> resultReader : spec.getResultReaders().entrySet()) {<NEW_LINE>namedWriteables.add(new NamedWriteableRegistry.Entry(InternalAggregation.class, resultReader.getKey(), resultReader.getValue()));<NEW_LINE>}<NEW_LINE>}
, spec.getReader()));
107,800
public static void performFVT(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryAuthorFVTCheckedException {<NEW_LINE>int initialGlossaryCount = GlossaryFVT.getGlossaryCount(url, serverName, userId);<NEW_LINE>int initialTermCount = TermFVT.getTermCount(url, serverName, userId);<NEW_LINE>int initialCategoryCount = CategoryFVT.getCategoryCount(url, serverName, userId);<NEW_LINE>int initialSubjectAreaCount = SubjectAreaDefinitionCategoryFVT.getSubjectAreaCount(url, serverName, userId);<NEW_LINE>int initialProjectCount = ProjectFVT.getProjectCount(url, serverName, userId);<NEW_LINE>GlossaryFVT.runIt(url, serverName, userId);<NEW_LINE>TermFVT.runIt(url, serverName, userId);<NEW_LINE>CategoryFVT.runIt(url, serverName, userId);<NEW_LINE>CategoryHierarchyFVT.runIt(url, serverName, userId);<NEW_LINE>RelationshipsFVT.runIt(url, serverName, userId);<NEW_LINE>ProjectFVT.runIt(url, serverName, userId);<NEW_LINE>SubjectAreaDefinitionCategoryFVT.runIt(url, serverName, userId);<NEW_LINE>GraphFVT.runIt(url, serverName, userId);<NEW_LINE>EffectiveDatesFVT.runIt(url, serverName, userId);<NEW_LINE>CheckSerializationFVT.runIt(url, serverName, userId);<NEW_LINE>ConfigFVT.runIt(url, serverName, userId);<NEW_LINE>int finalGlossaryCount = GlossaryFVT.getGlossaryCount(url, serverName, userId);<NEW_LINE>int finalTermCount = TermFVT.getTermCount(url, serverName, userId);<NEW_LINE>int finalCategoryCount = CategoryFVT.getCategoryCount(url, serverName, userId);<NEW_LINE>int finalSubjectAreaCount = SubjectAreaDefinitionCategoryFVT.getSubjectAreaCount(url, serverName, userId);<NEW_LINE>int finalProjectCount = ProjectFVT.getProjectCount(url, serverName, userId);<NEW_LINE>if (initialCategoryCount != finalCategoryCount) {<NEW_LINE>throw new GlossaryAuthorFVTCheckedException("ERROR: Categories count incorrect; expected " + initialCategoryCount + " , got " + finalCategoryCount);<NEW_LINE>}<NEW_LINE>if (initialTermCount != finalTermCount) {<NEW_LINE>throw new GlossaryAuthorFVTCheckedException("ERROR: Terms count incorrect; expected " + initialTermCount + " , got " + finalTermCount);<NEW_LINE>}<NEW_LINE>if (initialGlossaryCount != finalGlossaryCount) {<NEW_LINE>throw new GlossaryAuthorFVTCheckedException("ERROR: Glossaries count incorrect; expected " + initialGlossaryCount + " , got " + finalGlossaryCount);<NEW_LINE>}<NEW_LINE>if (initialSubjectAreaCount != finalSubjectAreaCount) {<NEW_LINE>throw new GlossaryAuthorFVTCheckedException("ERROR: SubjectArea count incorrect; expected " + initialSubjectAreaCount + " , got " + finalSubjectAreaCount);<NEW_LINE>}<NEW_LINE>if (initialProjectCount != finalProjectCount) {<NEW_LINE>throw new GlossaryAuthorFVTCheckedException(<MASK><NEW_LINE>}<NEW_LINE>}
"ERROR: Projects count incorrect; expected " + initialProjectCount + " , got " + finalProjectCount);
1,115,660
public void buildContextMenu(IMenuManager menu) {<NEW_LINE>super.buildContextMenu(menu);<NEW_LINE>// Delete from Model<NEW_LINE>menu.appendToGroup(GROUP_EDIT, actionRegistry.getAction(DeleteFromModelAction.ID));<NEW_LINE>// Select Element in Tree<NEW_LINE>menu.appendToGroup<MASK><NEW_LINE>menu.appendToGroup(GROUP_RENAME, actionRegistry.getAction(SelectElementInTreeAction.ID));<NEW_LINE>// Generate View For Element<NEW_LINE>menu.appendToGroup(GROUP_RENAME, actionRegistry.getAction(ArchiActionFactory.GENERATE_VIEW.getId()));<NEW_LINE>// Viewpoints<NEW_LINE>menu.appendToGroup(GROUP_CONNECTIONS, new Separator(GROUP_VIEWPOINTS));<NEW_LINE>IMenuManager viewPointMenu = new MenuManager(Messages.ArchimateDiagramEditorContextMenuProvider_0);<NEW_LINE>menu.appendToGroup(GROUP_VIEWPOINTS, viewPointMenu);<NEW_LINE>for (IViewpoint viewPoint : ViewpointManager.INSTANCE.getAllViewpoints()) {<NEW_LINE>viewPointMenu.add(actionRegistry.getAction(viewPoint.toString()));<NEW_LINE>}<NEW_LINE>}
(GROUP_RENAME, new Separator());
1,779,221
public void deleteOrphanActions(MongockTemplate mongockTemplate) {<NEW_LINE>final Update deletionUpdates = new Update();<NEW_LINE>deletionUpdates.set(fieldName(QNewAction.newAction.deleted), true);<NEW_LINE>deletionUpdates.set(fieldName(QNewAction.newAction.deletedAt), Instant.now());<NEW_LINE>final Query actionQuery = query(where(fieldName(QNewAction.newAction.deleted)).ne(true));<NEW_LINE>actionQuery.fields().include(fieldName(QNewAction.newAction.applicationId));<NEW_LINE>final List<NewAction> actions = mongockTemplate.<MASK><NEW_LINE>for (final NewAction action : actions) {<NEW_LINE>final String applicationId = action.getApplicationId();<NEW_LINE>final boolean shouldDelete = StringUtils.isEmpty(applicationId) || mongockTemplate.exists(query(where(fieldName(QApplication.application.id)).is(applicationId).and(fieldName(QApplication.application.deleted)).is(true)), Application.class);<NEW_LINE>if (shouldDelete) {<NEW_LINE>mongockTemplate.updateFirst(query(where(fieldName(QNewAction.newAction.id)).is(action.getId())), deletionUpdates, NewAction.class);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
find(actionQuery, NewAction.class);
642,052
protected void paintIcon(final JComponent c, final Graphics2D g, final Rectangle viewRect, final Rectangle iconRect) {<NEW_LINE>final Insets insets = c.getInsets();<NEW_LINE>viewRect.x += insets.left;<NEW_LINE>viewRect.y += insets.top;<NEW_LINE>viewRect.width -= (insets.right + viewRect.x);<NEW_LINE>viewRect.height -= (insets.bottom + viewRect.y);<NEW_LINE>final int rad = JBUI.scale(5);<NEW_LINE>// Paint the radio button<NEW_LINE>final int x = iconRect.x + (rad - (rad % 2 == 1 ? 1 : 0)) / 2;<NEW_LINE>final int y = iconRect.y + (rad - (rad % 2 == 1 ? 1 : 0)) / 2;<NEW_LINE>final int w = iconRect.width - rad;<NEW_LINE>final int h = iconRect.height - rad;<NEW_LINE>g.translate(x, y);<NEW_LINE>// setup AA for lines<NEW_LINE>final GraphicsConfig config = GraphicsUtil.setupAAPainting(g);<NEW_LINE>final boolean focus = c.hasFocus();<NEW_LINE>final boolean selected = ((AbstractButton) c).isSelected();<NEW_LINE>// paint focus oval ripple<NEW_LINE>if (focus) {<NEW_LINE>paintOvalRing(g, w, h);<NEW_LINE>}<NEW_LINE>if (selected) {<NEW_LINE>final boolean enabled = c.isEnabled();<NEW_LINE>g.setColor(MTUI.Radio.getSelectedColor(enabled));<NEW_LINE>// draw outer border<NEW_LINE>g.drawOval(JBUI.scale(2), JBUI.scale(1), w, h);<NEW_LINE>// draw dot<NEW_LINE>final int yOff = JBUI.scale(1);<NEW_LINE>g.fillOval(w / 2 - rad / 2, h / 2 - rad / 2 - yOff, rad + JBUI.scale(4), rad + JBUI.scale(4));<NEW_LINE>} else {<NEW_LINE>// paint border<NEW_LINE>g.setPaint(<MASK><NEW_LINE>g.drawOval(JBUI.scale(2), JBUI.scale(1) + 1, w - 1, h - 1);<NEW_LINE>}<NEW_LINE>config.restore();<NEW_LINE>g.translate(-x, -y);<NEW_LINE>}
MTUI.Radio.getBorderColor());
1,110,805
private void startRdpConnection() throws Exception {<NEW_LINE>android.util.Log.i(TAG, "startRdpConnection: Starting RDP connection.");<NEW_LINE>// Get the address and port (based on whether an SSH tunnel is being established or not).<NEW_LINE>String address = getAddress();<NEW_LINE>int rdpPort = getPort(connection.getPort());<NEW_LINE>waitUntilInflated();<NEW_LINE>int remoteWidth = getRemoteWidth(getWidth(), getHeight());<NEW_LINE>int remoteHeight = getRemoteHeight(<MASK><NEW_LINE>rdpcomm.setConnectionParameters(address, rdpPort, connection.getNickname(), remoteWidth, remoteHeight, connection.getDesktopBackground(), connection.getFontSmoothing(), connection.getDesktopComposition(), connection.getWindowContents(), connection.getMenuAnimation(), connection.getVisualStyles(), connection.getRedirectSdCard(), connection.getConsoleMode(), connection.getRemoteSoundType(), connection.getEnableRecording(), connection.getRemoteFx(), connection.getEnableGfx(), connection.getEnableGfxH264());<NEW_LINE>rdpcomm.connect();<NEW_LINE>pd.dismiss();<NEW_LINE>}
getWidth(), getHeight());
1,614,331
protected void buildUI() {<NEW_LINE>SignatureValidationStatus signatureValidationStatus = new SignatureValidationStatus(messageBundle, signatureWidgetAnnotation, signatureValidator);<NEW_LINE>setTitle(messageBundle.getString("viewer.annotation.signature.validation.dialog.title"));<NEW_LINE>// simple close<NEW_LINE>final JButton closeButton = new JButton(messageBundle.getString("viewer.annotation.signature.validation.dialog.close.button.label"));<NEW_LINE>closeButton.setMnemonic(messageBundle.getString("viewer.button.cancel.mnemonic").charAt(0));<NEW_LINE>closeButton.addActionListener(new ActionListener() {<NEW_LINE><NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>setVisible(false);<NEW_LINE>dispose();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// launch properties dialog showing all signature info.<NEW_LINE>final JButton propertiesButton = new JButton(messageBundle.getString("viewer.annotation.signature.validation.dialog.signerProperties.button.label"));<NEW_LINE>final Dialog parent = this;<NEW_LINE>propertiesButton.addActionListener(new ActionListener() {<NEW_LINE><NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>SignatureFieldDictionary fieldDictionary = signatureWidgetAnnotation.getFieldDictionary();<NEW_LINE>if (fieldDictionary != null) {<NEW_LINE>SignatureHandler signatureHandler = fieldDictionary.getLibrary().getSignatureHandler();<NEW_LINE>SignatureValidator signatureValidator = signatureHandler.validateSignature(fieldDictionary);<NEW_LINE>if (signatureValidator != null) {<NEW_LINE>new SignaturePropertiesDialog(parent, messageBundle, signatureWidgetAnnotation).setVisible(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// put it all together.<NEW_LINE>SignatureValidationPanel validityPanel = new SignatureValidationPanel(signatureValidationStatus, messageBundle, signatureWidgetAnnotation, signatureValidator, true, false);<NEW_LINE>GridBagConstraints constraints = validityPanel.getConstraints();<NEW_LINE>constraints.insets = new Insets(15, 5, 5, 5);<NEW_LINE>constraints.anchor = GridBagConstraints.WEST;<NEW_LINE>validityPanel.addGB(propertiesButton, 0, 5, 1, 1);<NEW_LINE>constraints.anchor = GridBagConstraints.EAST;<NEW_LINE>validityPanel.addGB(closeButton, <MASK><NEW_LINE>getContentPane().add(validityPanel);<NEW_LINE>pack();<NEW_LINE>setLocationRelativeTo(getOwner());<NEW_LINE>setResizable(false);<NEW_LINE>}
1, 5, 1, 1);
747,007
public static Collection<RegressionExecution> executions() {<NEW_LINE>ArrayList<RegressionExecution> <MASK><NEW_LINE>execs.add(new ViewExpressionWindowSceneOne());<NEW_LINE>execs.add(new ViewExpressionWindowNewestEventOldestEvent());<NEW_LINE>execs.add(new ViewExpressionWindowLengthWindow());<NEW_LINE>execs.add(new ViewExpressionWindowTimeWindow());<NEW_LINE>execs.add(new ViewExpressionWindowUDFBuiltin());<NEW_LINE>execs.add(new ViewExpressionWindowInvalid());<NEW_LINE>execs.add(new ViewExpressionWindowPrev());<NEW_LINE>execs.add(new ViewExpressionWindowAggregationUngrouped());<NEW_LINE>execs.add(new ViewExpressionWindowAggregationWGroupwin());<NEW_LINE>execs.add(new ViewExpressionWindowNamedWindowDelete());<NEW_LINE>execs.add(new ViewExpressionWindowAggregationWOnDelete());<NEW_LINE>execs.add(new ViewExpressionWindowVariable());<NEW_LINE>execs.add(new ViewExpressionWindowDynamicTimeWindow());<NEW_LINE>return execs;<NEW_LINE>}
execs = new ArrayList<>();
509,684
protected View doInBackground(View... params) {<NEW_LINE>try {<NEW_LINE>m = new AccountManager(Authentication.reddit);<NEW_LINE>JsonNode node = m.getFlairChoicesRootNode(subOverride, null);<NEW_LINE>flairs = m.getFlairChoices(subOverride, node);<NEW_LINE>FlairTemplate currentF = m.getCurrentFlair(subOverride, node);<NEW_LINE>if (currentF != null) {<NEW_LINE>if (currentF.getText().isEmpty()) {<NEW_LINE>current = ("[" + <MASK><NEW_LINE>} else {<NEW_LINE>current = (currentF.getText());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>flairText = new ArrayList<>();<NEW_LINE>for (FlairTemplate temp : flairs) {<NEW_LINE>if (temp.getText().isEmpty()) {<NEW_LINE>flairText.add("[" + temp.getCssClass() + "]");<NEW_LINE>} else {<NEW_LINE>flairText.add(temp.getText());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e1) {<NEW_LINE>e1.printStackTrace();<NEW_LINE>}<NEW_LINE>return params[0];<NEW_LINE>}
currentF.getCssClass() + "]");
789,145
public android.widget.ImageButton createFavoriteButton() {<NEW_LINE>ChannelInfoDto channel = TvManager.getChannel(TvManager.getAllChannelsIndex(mProgram.getChannelId()));<NEW_LINE>boolean isFav = channel.getUserData() != null && channel.getUserData().getIsFavorite();<NEW_LINE>android.widget.ImageButton fave = addImgButton(mDButtonRow, isFav ? R.drawable.ic_heart_red : R.drawable.ic_heart);<NEW_LINE>fave.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>apiClient.getValue().UpdateFavoriteStatusAsync(channel.getId(), TvApp.getApplication().getCurrentUser().getId().toString(), !channel.getUserData().getIsFavorite(), new Response<UserItemDataDto>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onResponse(UserItemDataDto response) {<NEW_LINE>channel.setUserData(response);<NEW_LINE>fave.setImageDrawable(ContextCompat.getDrawable(mActivity, response.getIsFavorite() ? R.drawable.ic_heart_red : R.drawable.ic_heart));<NEW_LINE>mTvGuide.refreshFavorite(channel.getId());<NEW_LINE>DataRefreshService dataRefreshService = KoinJavaComponent.<DataRefreshService>get(DataRefreshService.class);<NEW_LINE>dataRefreshService.<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return fave;<NEW_LINE>}
setLastFavoriteUpdate(System.currentTimeMillis());
1,041,916
static // we inspect the main type plus bounds of type variables and wildcards<NEW_LINE>long requiredNullTagBits(TypeBinding type, CheckMode mode) {<NEW_LINE>long tagBits <MASK><NEW_LINE>if (tagBits != 0)<NEW_LINE>return validNullTagBits(tagBits);<NEW_LINE>if (type.isWildcard()) {<NEW_LINE>WildcardBinding wildcardBinding = (WildcardBinding) type;<NEW_LINE>TypeBinding bound = wildcardBinding.bound;<NEW_LINE>tagBits = bound != null ? bound.tagBits & TagBits.AnnotationNullMASK : 0;<NEW_LINE>switch(wildcardBinding.boundKind) {<NEW_LINE>case Wildcard.SUPER:<NEW_LINE>if (tagBits == TagBits.AnnotationNullable)<NEW_LINE>// type cannot require @NonNull<NEW_LINE>return TagBits.AnnotationNullable;<NEW_LINE>break;<NEW_LINE>case Wildcard.EXTENDS:<NEW_LINE>if (tagBits == TagBits.AnnotationNonNull)<NEW_LINE>return tagBits;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>return TagBits.AnnotationNullMASK;<NEW_LINE>}<NEW_LINE>if (type.isTypeVariable()) {<NEW_LINE>// assume we must require @NonNull, unless lower @Nullable bound<NEW_LINE>// (annotation directly on the TV has already been checked above)<NEW_LINE>if (type.isCapture()) {<NEW_LINE>TypeBinding lowerBound = ((CaptureBinding) type).lowerBound;<NEW_LINE>if (lowerBound != null) {<NEW_LINE>tagBits = lowerBound.tagBits & TagBits.AnnotationNullMASK;<NEW_LINE>if (tagBits == TagBits.AnnotationNullable)<NEW_LINE>// type cannot require @NonNull<NEW_LINE>return TagBits.AnnotationNullable;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>switch(mode) {<NEW_LINE>// no pessimistic checks during boundcheck (we *have* the instantiation)<NEW_LINE>case BOUND_CHECK:<NEW_LINE>case BOUND_SUPER_CHECK:<NEW_LINE>// no pessimistic checks during override check (comparing two *declarations*)<NEW_LINE>case OVERRIDE:<NEW_LINE>case OVERRIDE_RETURN:<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>// instantiation could require @NonNull<NEW_LINE>return TagBits.AnnotationNonNull;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
= type.tagBits & TagBits.AnnotationNullMASK;
135,645
private void bindContact(ViewHolderPhoneContacts holder, InvitationContactInfo contact, boolean isMegaContact) {<NEW_LINE>holder.displayLabel = contact.getDisplayInfo();<NEW_LINE>holder.contactName = contact.getName();<NEW_LINE>holder<MASK><NEW_LINE>holder.contactNameTextView.setText(holder.contactName);<NEW_LINE>holder.displayLabelTextView.setText(holder.displayLabel);<NEW_LINE>if (contact.isHighlighted()) {<NEW_LINE>setItemHighlighted(holder.contactLayout);<NEW_LINE>} else {<NEW_LINE>Bitmap bitmap;<NEW_LINE>if (isMegaContact) {<NEW_LINE>bitmap = getMegaUserAvatar(contact);<NEW_LINE>} else {<NEW_LINE>bitmap = createPhoneContactBitmap(holder.contactId);<NEW_LINE>}<NEW_LINE>// create default one if unable to get user pre-set avatar<NEW_LINE>if (bitmap == null) {<NEW_LINE>logDebug("create default avatar as unable to get user pre-set one");<NEW_LINE>bitmap = getDefaultAvatar(contact.getAvatarColor(), contact.getName(), AVATAR_SIZE, true, false);<NEW_LINE>}<NEW_LINE>contact.setBitmap(bitmap);<NEW_LINE>holder.imageView.setImageBitmap(bitmap);<NEW_LINE>}<NEW_LINE>}
.contactId = contact.getId();
618,806
final ImportGameConfigurationResult executeImportGameConfiguration(ImportGameConfigurationRequest importGameConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(importGameConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ImportGameConfigurationRequest> request = null;<NEW_LINE>Response<ImportGameConfigurationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ImportGameConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(importGameConfigurationRequest));<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, "GameSparks");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ImportGameConfiguration");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ImportGameConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ImportGameConfigurationResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
40,773
public static DescribeTablesResponse unmarshall(DescribeTablesResponse describeTablesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeTablesResponse.setRequestId(_ctx.stringValue("DescribeTablesResponse.RequestId"));<NEW_LINE>describeTablesResponse.setSuccess(_ctx.booleanValue("DescribeTablesResponse.Success"));<NEW_LINE>describeTablesResponse.setPageNumber(_ctx.integerValue("DescribeTablesResponse.PageNumber"));<NEW_LINE>describeTablesResponse.setPageSize(_ctx.integerValue("DescribeTablesResponse.PageSize"));<NEW_LINE>describeTablesResponse.setTotal(_ctx.integerValue("DescribeTablesResponse.Total"));<NEW_LINE>List<ListItem> list <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeTablesResponse.List.Length"); i++) {<NEW_LINE>ListItem listItem = new ListItem();<NEW_LINE>listItem.setTable(_ctx.stringValue("DescribeTablesResponse.List[" + i + "].Table"));<NEW_LINE>listItem.setShardKey(_ctx.stringValue("DescribeTablesResponse.List[" + i + "].ShardKey"));<NEW_LINE>listItem.setIsShard(_ctx.booleanValue("DescribeTablesResponse.List[" + i + "].IsShard"));<NEW_LINE>listItem.setIsLocked(_ctx.booleanValue("DescribeTablesResponse.List[" + i + "].IsLocked"));<NEW_LINE>listItem.setDbInstType(_ctx.integerValue("DescribeTablesResponse.List[" + i + "].DbInstType"));<NEW_LINE>listItem.setBroadcast(_ctx.booleanValue("DescribeTablesResponse.List[" + i + "].Broadcast"));<NEW_LINE>listItem.setAllowFullTableScan(_ctx.booleanValue("DescribeTablesResponse.List[" + i + "].AllowFullTableScan"));<NEW_LINE>listItem.setStatus(_ctx.integerValue("DescribeTablesResponse.List[" + i + "].Status"));<NEW_LINE>list.add(listItem);<NEW_LINE>}<NEW_LINE>describeTablesResponse.setList(list);<NEW_LINE>return describeTablesResponse;<NEW_LINE>}
= new ArrayList<ListItem>();
291,003
public static StringBuilder callURL(String urlPath, String username, String password, int expected_resp, int[] allowedUnexpectedresp, HTTPRequestMethod verb, InputStream body, String conttype) throws Exception {<NEW_LINE>String m = "callURL";<NEW_LINE>Log.info(c, m, "callURL : " + username + "@" + urlPath);<NEW_LINE>URL url = new URL(urlPath);<NEW_LINE>Map<String, String> headers = new <MASK><NEW_LINE>if (conttype != null)<NEW_LINE>headers.put("Content-Type", conttype);<NEW_LINE>else<NEW_LINE>headers.put("Content-Type", "application/json");<NEW_LINE>String userpass = username + ":" + password;<NEW_LINE>String basicAuth = "Basic " + new String(Base64Coder.base64Encode(userpass.getBytes("UTF-8")), "UTF-8");<NEW_LINE>headers.put("Authorization", basicAuth);<NEW_LINE>HttpUtils.trustAllCertificates();<NEW_LINE>HttpURLConnection conn = null;<NEW_LINE>conn = HttpUtils.getHttpConnection(url, expected_resp, allowedUnexpectedresp, 1, verb, headers, body);<NEW_LINE>BufferedReader br = HttpUtils.getConnectionStream(conn);<NEW_LINE>String line;<NEW_LINE>StringBuilder outputBuilder = new StringBuilder();<NEW_LINE>while ((line = br.readLine()) != null) {<NEW_LINE>// .append(System.lineSeparator());<NEW_LINE>outputBuilder.append(line).append('\n');<NEW_LINE>}<NEW_LINE>conn.disconnect();<NEW_LINE>return outputBuilder;<NEW_LINE>}
HashMap<String, String>();
405,438
public static void showAttachSomethingDialog(final Activity activity, final Callback.a1<Integer> userCallback) {<NEW_LINE>final List<String> availableData = new ArrayList<>();<NEW_LINE>final List<Integer> <MASK><NEW_LINE>final List<Integer> availableDataToIconMap = new ArrayList<>();<NEW_LINE>final Callback.a3<Integer, Integer, Integer> addToList = (strRes, actionRes, iconRes) -> {<NEW_LINE>availableData.add(activity.getString(strRes));<NEW_LINE>availableDataToActionMap.add(actionRes);<NEW_LINE>availableDataToIconMap.add(iconRes);<NEW_LINE>};<NEW_LINE>addToList.callback(R.string.color, R.id.action_attach_color, R.drawable.ic_format_color_fill_black_24dp);<NEW_LINE>addToList.callback(R.string.insert_link, R.id.action_attach_link, R.drawable.ic_link_black_24dp);<NEW_LINE>addToList.callback(R.string.file, R.id.action_attach_file, R.drawable.ic_attach_file_black_24dp);<NEW_LINE>addToList.callback(R.string.image, R.id.action_attach_image, R.drawable.ic_image_black_24dp);<NEW_LINE>addToList.callback(R.string.audio, R.id.action_attach_audio, R.drawable.ic_keyboard_voice_black_24dp);<NEW_LINE>addToList.callback(R.string.date, R.id.action_attach_date, R.drawable.ic_access_time_black_24dp);<NEW_LINE>SearchOrCustomTextDialog.DialogOptions dopt = new SearchOrCustomTextDialog.DialogOptions();<NEW_LINE>baseConf(activity, dopt);<NEW_LINE>dopt.callback = str -> userCallback.callback(availableDataToActionMap.get(availableData.indexOf(str)));<NEW_LINE>dopt.data = availableData;<NEW_LINE>dopt.iconsForData = availableDataToIconMap;<NEW_LINE>dopt.isSearchEnabled = false;<NEW_LINE>dopt.titleText = 0;<NEW_LINE>dopt.dialogWidthDp = WindowManager.LayoutParams.WRAP_CONTENT;<NEW_LINE>dopt.gravity = Gravity.BOTTOM | Gravity.END;<NEW_LINE>SearchOrCustomTextDialog.showMultiChoiceDialogWithSearchFilterUI(activity, dopt);<NEW_LINE>}
availableDataToActionMap = new ArrayList<>();
113,465
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see com.aptana.ide.core.ftp.BaseFTPConnectionFileManager#deleteFile(org.eclipse.core.runtime.IPath,<NEW_LINE>* org.eclipse.core.runtime.IProgressMonitor)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>protected void deleteFile(IPath path, IProgressMonitor monitor) throws CoreException, FileNotFoundException {<NEW_LINE>try {<NEW_LINE>IPath dirPath = path.removeLastSegments(1);<NEW_LINE>changeCurrentDir(dirPath);<NEW_LINE>Policy.checkCanceled(monitor);<NEW_LINE>try {<NEW_LINE>ftpClient.delete(path.lastSegment());<NEW_LINE>} catch (FTPException e) {<NEW_LINE>if (e.getReplyCode() == 532) {<NEW_LINE>throw new PermissionDeniedException(<MASK><NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>} catch (FileNotFoundException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (OperationCanceledException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new CoreException(new Status(Status.ERROR, FTPPlugin.PLUGIN_ID, MessageFormat.format(Messages.FTPConnectionFileManager_deleting_failed, path), e));<NEW_LINE>} finally {<NEW_LINE>monitor.done();<NEW_LINE>}<NEW_LINE>}
path.toPortableString(), e);
1,549,467
FieldSpec generateCreator(ProcessingEnvironment env, TypeName autoValueType, List<Property> properties, TypeName type, Map<TypeMirror, FieldSpec> typeAdapters) {<NEW_LINE>ClassName creator = ClassName.bestGuess("android.os.Parcelable.Creator");<NEW_LINE>TypeName creatorOfClass = ParameterizedTypeName.get(creator, type);<NEW_LINE>Types typeUtils = env.getTypeUtils();<NEW_LINE>CodeBlock.Builder ctorCall = CodeBlock.builder();<NEW_LINE>ctorCall.add("return new $T(\n", type);<NEW_LINE>ctorCall.indent().indent();<NEW_LINE>boolean requiresSuppressWarnings = false;<NEW_LINE>for (int i = 0, n = properties.size(); i < n; i++) {<NEW_LINE>Property property = properties.get(i);<NEW_LINE>if (property.typeAdapter != null && typeAdapters.containsKey(property.typeAdapter)) {<NEW_LINE>Parcelables.readValueWithTypeAdapter(ctorCall, property, typeAdapters.get(property.typeAdapter));<NEW_LINE>} else {<NEW_LINE>final TypeName typeName = Parcelables.getTypeNameFromProperty(property, typeUtils);<NEW_LINE>requiresSuppressWarnings |= Parcelables.isTypeRequiresSuppressWarnings(property.type);<NEW_LINE>Parcelables.readValue(typeUtils, ctorCall, property, typeName, autoValueType);<NEW_LINE>}<NEW_LINE>if (i < n - 1)<NEW_LINE>ctorCall.add(",");<NEW_LINE>ctorCall.add("\n");<NEW_LINE>}<NEW_LINE>ctorCall.unindent().unindent();<NEW_LINE>ctorCall.add(");\n");<NEW_LINE>MethodSpec.Builder createFromParcel = MethodSpec.methodBuilder("createFromParcel").addAnnotation(Override.class);<NEW_LINE>if (requiresSuppressWarnings) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>createFromParcel.addModifiers(PUBLIC).returns(type).addParameter(ClassName.bestGuess("android.os.Parcel"), "in");<NEW_LINE>createFromParcel.addCode(ctorCall.build());<NEW_LINE>TypeSpec creatorImpl = TypeSpec.anonymousClassBuilder("").superclass(creatorOfClass).addMethod(createFromParcel.build()).addMethod(MethodSpec.methodBuilder("newArray").addAnnotation(Override.class).addModifiers(PUBLIC).returns(ArrayTypeName.of(type)).addParameter(int.class, "size").addStatement("return new $T[size]", type).build()).build();<NEW_LINE>return FieldSpec.builder(creatorOfClass, "CREATOR", PUBLIC, FINAL, STATIC).initializer("$L", creatorImpl).build();<NEW_LINE>}
createFromParcel.addAnnotation(createSuppressUncheckedWarningAnnotation());
157,652
public void deleteById(String id) {<NEW_LINE>String deviceName = <MASK><NEW_LINE>if (deviceName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'dataBoxEdgeDevices'.", id)));<NEW_LINE>}<NEW_LINE>String name = Utils.getValueFromIdByName(id, "bandwidthSchedules");<NEW_LINE>if (name == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'bandwidthSchedules'.", id)));<NEW_LINE>}<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));<NEW_LINE>}<NEW_LINE>this.delete(deviceName, name, resourceGroupName, Context.NONE);<NEW_LINE>}
Utils.getValueFromIdByName(id, "dataBoxEdgeDevices");
753,847
protected UserModel importUserToKeycloak(RealmModel realm, String username) {<NEW_LINE>Sssd sssd = new Sssd(username);<NEW_LINE>User sssdUser = sssd.getUser();<NEW_LINE>logger.debugf("Creating SSSD user: %s to local Keycloak storage", username);<NEW_LINE>UserModel user = session.userLocalStorage().addUser(realm, username);<NEW_LINE>user.setEnabled(true);<NEW_LINE>user.setEmail(sssdUser.getEmail());<NEW_LINE>user.setFirstName(sssdUser.getFirstName());<NEW_LINE>user.setLastName(sssdUser.getLastName());<NEW_LINE>for (String s : sssd.getGroups()) {<NEW_LINE>GroupModel group = KeycloakModelUtils.findGroupByPath(realm, "/" + s);<NEW_LINE>if (group == null) {<NEW_LINE>group = session.groups().createGroup(realm, s);<NEW_LINE>}<NEW_LINE>user.joinGroup(group);<NEW_LINE>}<NEW_LINE>user.<MASK><NEW_LINE>return validateAndProxy(realm, user);<NEW_LINE>}
setFederationLink(model.getId());
1,317,388
public void onUpdate() {<NEW_LINE>basicChests.clear();<NEW_LINE>trapChests.clear();<NEW_LINE>enderChests.clear();<NEW_LINE>shulkerBoxes.clear();<NEW_LINE>for (BlockEntityTickInvoker blockEntityTicker : ((IWorld) MC.world).getBlockEntityTickers()) {<NEW_LINE>BlockEntity blockEntity = MC.world.getBlockEntity(blockEntityTicker.getPos());<NEW_LINE>if (blockEntity instanceof TrappedChestBlockEntity) {<NEW_LINE>Box box <MASK><NEW_LINE>if (box != null)<NEW_LINE>trapChests.add(box);<NEW_LINE>} else if (blockEntity instanceof ChestBlockEntity) {<NEW_LINE>Box box = getBoxFromChest((ChestBlockEntity) blockEntity);<NEW_LINE>if (box != null)<NEW_LINE>basicChests.add(box);<NEW_LINE>} else if (blockEntity instanceof EnderChestBlockEntity) {<NEW_LINE>BlockPos pos = blockEntity.getPos();<NEW_LINE>if (!BlockUtils.canBeClicked(pos))<NEW_LINE>continue;<NEW_LINE>Box bb = BlockUtils.getBoundingBox(pos);<NEW_LINE>enderChests.add(bb);<NEW_LINE>} else if (blockEntity instanceof ShulkerBoxBlockEntity) {<NEW_LINE>BlockPos pos = blockEntity.getPos();<NEW_LINE>if (!BlockUtils.canBeClicked(pos))<NEW_LINE>continue;<NEW_LINE>Box bb = BlockUtils.getBoundingBox(pos);<NEW_LINE>shulkerBoxes.add(bb);<NEW_LINE>} else if (blockEntity instanceof BarrelBlockEntity) {<NEW_LINE>BlockPos pos = blockEntity.getPos();<NEW_LINE>if (!BlockUtils.canBeClicked(pos))<NEW_LINE>continue;<NEW_LINE>Box bb = BlockUtils.getBoundingBox(pos);<NEW_LINE>basicChests.add(bb);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>minecarts.clear();<NEW_LINE>for (Entity entity : MC.world.getEntities()) if (entity instanceof ChestMinecartEntity)<NEW_LINE>minecarts.add(entity);<NEW_LINE>}
= getBoxFromChest((ChestBlockEntity) blockEntity);
1,329,736
protected Collection<V> convertToModel(Collection<V> componentRawValue) throws ConversionException {<NEW_LINE>ValueSource<Collection<V>> valueSource = getValueSource();<NEW_LINE>if (valueSource != null) {<NEW_LINE>Class<?> modelCollectionType = null;<NEW_LINE>if (valueSource instanceof EntityValueSource) {<NEW_LINE>MetaPropertyPath mpp = ((EntityValueSource) valueSource).getMetaPropertyPath();<NEW_LINE>modelCollectionType = mpp.getMetaProperty().getJavaType();<NEW_LINE>} else if (valueSource instanceof LegacyCollectionDsValueSource) {<NEW_LINE>CollectionDatasource datasource = ((LegacyCollectionDsValueSource) valueSource).getDatasource();<NEW_LINE>if (datasource instanceof NestedDatasource) {<NEW_LINE>MetaProperty property = ((NestedDatasource) datasource).getProperty().getInverse();<NEW_LINE>modelCollectionType = property == null ? null : property.getJavaType();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (modelCollectionType != null) {<NEW_LINE>if (Set.class.isAssignableFrom(modelCollectionType)) {<NEW_LINE>return new LinkedHashSet<>(componentRawValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
return new ArrayList<>(componentRawValue);
22,707
private String doSend(Message<?> message, String subDirectory, FileExistsMode mode, StreamHolder inputStreamHolder, Session<F> session) {<NEW_LINE>String fileName = inputStreamHolder.name;<NEW_LINE>try {<NEW_LINE>String remoteDirectory = <MASK><NEW_LINE>remoteDirectory = normalizeDirectoryPath(remoteDirectory);<NEW_LINE>if (StringUtils.hasText(subDirectory)) {<NEW_LINE>if (subDirectory.startsWith(this.remoteFileSeparator)) {<NEW_LINE>remoteDirectory += subDirectory.substring(1);<NEW_LINE>} else {<NEW_LINE>remoteDirectory += normalizeDirectoryPath(subDirectory);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String temporaryRemoteDirectory = remoteDirectory;<NEW_LINE>if (this.temporaryDirectoryExpressionProcessor != null) {<NEW_LINE>temporaryRemoteDirectory = this.temporaryDirectoryExpressionProcessor.processMessage(message);<NEW_LINE>}<NEW_LINE>fileName = this.fileNameGenerator.generateFileName(message);<NEW_LINE>sendFileToRemoteDirectory(inputStreamHolder.stream, temporaryRemoteDirectory, remoteDirectory, fileName, session, mode);<NEW_LINE>return remoteDirectory + fileName;<NEW_LINE>} catch (FileNotFoundException e) {<NEW_LINE>throw new MessageDeliveryException(message, "File [" + inputStreamHolder.name + "] not found in local working directory; it was moved or deleted unexpectedly.", e);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new MessageDeliveryException(message, "Failed to transfer file [" + inputStreamHolder.name + " -> " + fileName + "] from local directory to remote directory.", e);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new MessageDeliveryException(message, "Error handling message for file [" + inputStreamHolder.name + " -> " + fileName + "]", e);<NEW_LINE>}<NEW_LINE>}
this.directoryExpressionProcessor.processMessage(message);
1,083,903
protected void init() {<NEW_LINE>View view = LayoutInflater.from(mContext).inflate(R.layout.editor_volume_setting, this);<NEW_LINE>mSrcVolumeSeekBar = view.findViewById(R.id.src_volume_seekbar);<NEW_LINE>mSrcVolumeText = view.findViewById(R.id.src_volume_value);<NEW_LINE>mSrcVolumeText.setText(String.format(mContext.getResources().getString(R.string.volume_value), mSrcVolume));<NEW_LINE>mSrcVolumeSeekBar.getThumb().setColorFilter(mContext.getResources().getColor(R.color.white<MASK><NEW_LINE>mSrcVolumeSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {<NEW_LINE>mSrcVolume = progress;<NEW_LINE>mSrcVolumeText.setText(String.format(mContext.getResources().getString(R.string.volume_value), progress));<NEW_LINE>mOnAudioVolumeChangedListener.onAudioVolumeChanged(mSrcVolume / 100f, mMusicVolume / 100f);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStartTrackingTouch(SeekBar seekBar) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStopTrackingTouch(SeekBar seekBar) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>mMusicVolumeSeekBar = view.findViewById(R.id.music_volume_seekbar);<NEW_LINE>mMusicVolumeText = view.findViewById(R.id.music_volume_value);<NEW_LINE>mMusicVolumeText.setText(String.format(mContext.getResources().getString(R.string.volume_value), mMusicVolume));<NEW_LINE>mMusicVolumeSeekBar.getThumb().setColorFilter(mContext.getResources().getColor(R.color.white), PorterDuff.Mode.SRC_ATOP);<NEW_LINE>mMusicVolumeSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {<NEW_LINE>mMusicVolume = progress;<NEW_LINE>mMusicVolumeText.setText(String.format(mContext.getResources().getString(R.string.volume_value), progress));<NEW_LINE>mOnAudioVolumeChangedListener.onAudioVolumeChanged(mSrcVolume / 100f, mMusicVolume / 100f);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStartTrackingTouch(SeekBar seekBar) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStopTrackingTouch(SeekBar seekBar) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>mMusicVolumeSeekBar.setEnabled(false);<NEW_LINE>}
), PorterDuff.Mode.SRC_ATOP);
1,483,022
public static String formatAggregation(Aggregation aggregation) {<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>String arguments = Joiner.on(", ").join(aggregation.getArguments());<NEW_LINE>if (aggregation.getArguments().isEmpty() && "count".equalsIgnoreCase(aggregation.getResolvedFunction().getSignature().getName())) {<NEW_LINE>arguments = "*";<NEW_LINE>}<NEW_LINE>if (aggregation.isDistinct()) {<NEW_LINE>arguments = "DISTINCT " + arguments;<NEW_LINE>}<NEW_LINE>builder.append(aggregation.getResolvedFunction().getSignature().getName()).append<MASK><NEW_LINE>aggregation.getOrderingScheme().ifPresent(orderingScheme -> builder.append(' ').append(orderingScheme.getOrderBy().stream().map(input -> input + " " + orderingScheme.getOrdering(input)).collect(joining(", "))));<NEW_LINE>builder.append(')');<NEW_LINE>aggregation.getFilter().ifPresent(expression -> builder.append(" FILTER (WHERE ").append(expression).append(")"));<NEW_LINE>aggregation.getMask().ifPresent(symbol -> builder.append(" (mask = ").append(symbol).append(")"));<NEW_LINE>return builder.toString();<NEW_LINE>}
('(').append(arguments);
1,028,377
public // until it is deleted using the unsubscribe method.<NEW_LINE>void testCreateSharedDurableConsumer_unsubscribe(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>JMSContext jmsContext = tcfBindings.createContext();<NEW_LINE>JMSConsumer jmsConsumer = jmsContext.createDurableConsumer(topic1, "DURATEST1");<NEW_LINE>JMSProducer jmsProducer = jmsContext.createProducer();<NEW_LINE>TextMessage msgOut = jmsContext.createTextMessage("This is a test message");<NEW_LINE>jmsProducer.send(topic1, msgOut);<NEW_LINE>TextMessage msgIn = (TextMessage) jmsConsumer.receive(DEFAULT_TIMEOUT);<NEW_LINE>jmsConsumer.close();<NEW_LINE>jmsContext.unsubscribe("DURATEST1");<NEW_LINE>MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();<NEW_LINE><MASK><NEW_LINE>boolean testFailed = false;<NEW_LINE>try {<NEW_LINE>String obn = (String) mbs.getAttribute(name, "Id");<NEW_LINE>} catch (InstanceNotFoundException ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>testFailed = true;<NEW_LINE>}<NEW_LINE>jmsContext.close();<NEW_LINE>if (testFailed) {<NEW_LINE>throw new Exception("testCreateSharedDurableConsumer_unsubscribe failed");<NEW_LINE>}<NEW_LINE>}
ObjectName name = new ObjectName("WebSphere:feature=wasJmsServer,type=Subscriber,name=clientID##DURATEST1");
368,970
public Collection<BlockingState> computeAddOnBlockingStates(final DateTime effectiveDate, final Collection<NotificationEvent> notificationEvents, final TenantContext context, final InternalCallContext internalCallContext) throws EntitlementApiException {<NEW_LINE>// Optimization - bail early<NEW_LINE>if (!ProductCategory.BASE.equals(getSubscriptionBase().getCategory())) {<NEW_LINE>// Only base subscriptions have add-ons<NEW_LINE>return ImmutableList.<BlockingState>of();<NEW_LINE>}<NEW_LINE>// Get the latest state from disk (we just got cancelled or changed plan)<NEW_LINE>refresh(context);<NEW_LINE>// If cancellation/change occurs in the future, do nothing for now but add a notification entry.<NEW_LINE>// This is to distinguish whether a future cancellation was requested by the user, or was a side effect<NEW_LINE>// (e.g. base plan cancellation): future entitlement cancellations for add-ons on disk always reflect<NEW_LINE>// an explicit cancellation. This trick lets us determine what to do when un-cancelling.<NEW_LINE>// This mirror the behavior in subscription base (see DefaultSubscriptionBaseApiService).<NEW_LINE>if (effectiveDate.compareTo(internalCallContext.getCreatedDate()) > 0) {<NEW_LINE>// Note that usually we record the notification from the DAO. We cannot do it here because not all calls<NEW_LINE>// go through the DAO (e.g. change)<NEW_LINE>final boolean isBaseEntitlementCancelled = eventsStream.isEntitlementCancelled();<NEW_LINE>final NotificationEvent notificationEvent = new EntitlementNotificationKey(getId(), getBundleId(), isBaseEntitlementCancelled ? EntitlementNotificationKeyAction.CANCEL : EntitlementNotificationKeyAction.CHANGE, effectiveDate);<NEW_LINE>notificationEvents.add(notificationEvent);<NEW_LINE>return <MASK><NEW_LINE>}<NEW_LINE>return eventsStream.computeAddonsBlockingStatesForNextSubscriptionBaseEvent(effectiveDate);<NEW_LINE>}
ImmutableList.<BlockingState>of();
1,160,046
public INDArray doForward(boolean training, LayerWorkspaceMgr workspaceMgr) {<NEW_LINE>if (!canDoForward())<NEW_LINE>throw new IllegalStateException("Cannot do forward pass: input not set");<NEW_LINE>forwardShape = Arrays.copyOf(inputs[0].shape(), inputs[0].rank());<NEW_LINE>INDArray out;<NEW_LINE>switch(inputs[0].rank()) {<NEW_LINE>case 2:<NEW_LINE>out = inputs[0].get(NDArrayIndex.all(), NDArrayIndex.interval(from, to, true));<NEW_LINE>break;<NEW_LINE>case 3:<NEW_LINE>out = inputs[0].get(NDArrayIndex.all(), NDArrayIndex.interval(from, to, true<MASK><NEW_LINE>break;<NEW_LINE>case 4:<NEW_LINE>out = inputs[0].get(NDArrayIndex.all(), NDArrayIndex.interval(from, to, true), NDArrayIndex.all(), NDArrayIndex.all());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new UnsupportedOperationException("Cannot get subset for activations of rank " + inputs[0].rank());<NEW_LINE>}<NEW_LINE>return workspaceMgr.dup(ArrayType.ACTIVATIONS, out);<NEW_LINE>}
), NDArrayIndex.all());
808,397
public Answer execute(final RebootCommand command, final CitrixResourceBase citrixResourceBase) {<NEW_LINE>final Connection conn = citrixResourceBase.getConnection();<NEW_LINE>s_logger.debug("7. The VM " + command.getVmName() + " is in Starting state");<NEW_LINE>try {<NEW_LINE>Set<VM> vms = null;<NEW_LINE>try {<NEW_LINE>vms = VM.getByNameLabel(conn, command.getVmName());<NEW_LINE>} catch (final XenAPIException e0) {<NEW_LINE>s_logger.debug("getByNameLabel failed " + e0.toString());<NEW_LINE>return new RebootAnswer(command, "getByNameLabel failed " + e0.toString(), false);<NEW_LINE>} catch (final Exception e0) {<NEW_LINE>s_logger.debug("getByNameLabel failed " + e0.getMessage());<NEW_LINE>return new RebootAnswer(command, "getByNameLabel failed", false);<NEW_LINE>}<NEW_LINE>for (final VM vm : vms) {<NEW_LINE>try {<NEW_LINE>citrixResourceBase.rebootVM(conn, vm, vm.getNameLabel(conn));<NEW_LINE>} catch (final Exception e) {<NEW_LINE>final String msg = e.toString();<NEW_LINE>s_logger.warn(msg, e);<NEW_LINE>return new <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new RebootAnswer(command, "reboot succeeded", true);<NEW_LINE>} finally {<NEW_LINE>s_logger.debug("8. The VM " + command.getVmName() + " is in Running state");<NEW_LINE>}<NEW_LINE>}
RebootAnswer(command, msg, false);
1,223,183
private void createMissingMatchInvs(final I_C_InvoiceLine il) {<NEW_LINE>// skip description lines<NEW_LINE>if (il.isDescription()) {<NEW_LINE>incrementCounterAndGet(COUNTER_NOTHING_TO_BE_DONE);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// If the invoice line already has at least one matchInv record, we assume that it's all fine.<NEW_LINE>// NOTE: commented out because the checking is done when invoice lines are fetched<NEW_LINE>// final boolean hasExistingMatchInvs = matchInvDAO.retrieveForInvoiceLineQuery(il).create().match();<NEW_LINE>// if (hasExistingMatchInvs)<NEW_LINE>// {<NEW_LINE>// incrementCounterAndGet(COUNTER_NOTHING_TO_BE_DONE);<NEW_LINE>// return;<NEW_LINE>// }<NEW_LINE>//<NEW_LINE>// Consider only Completed/Closed invoices<NEW_LINE>// NOTE: commented out because the checking is done when invoice lines are fetched<NEW_LINE>// final I_C_Invoice currentInvoice = il.getC_Invoice();<NEW_LINE>// if (!docActionBL.isStatusCompletedOrClosed(currentInvoice))<NEW_LINE>// {<NEW_LINE>// incrementCounterAndGet(COUNTER_NOTHING_TO_BE_DONE);<NEW_LINE>// // TODO consider still trying to add MatchInv, but i'm not sure if there is a point<NEW_LINE>// return;<NEW_LINE>// }<NEW_LINE>//<NEW_LINE>// Retrieve how much we need to match on this invoice line.<NEW_LINE>StockQtyAndUOMQty qtyInvoicedNotMatched = retrieveQtyNotMatched(il);<NEW_LINE>if (qtyInvoicedNotMatched.signum() == 0) {<NEW_LINE>incrementCounterAndGet(COUNTER_NOTHING_TO_BE_DONE);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Iterate each M_InOutLine and try to match as much as possible<NEW_LINE>final Map<Integer, StockQtyAndUOMQty> inoutLineId2qtyNotMatched = new HashMap<>();<NEW_LINE>int countMatchInvCreated = 0;<NEW_LINE>int countInOutLinesChecked = 0;<NEW_LINE>for (final I_M_InOutLine inoutLine : retrieveInOutLines(il)) {<NEW_LINE>countInOutLinesChecked++;<NEW_LINE>// Get M_InOutLine's MovementQty that was not already matched<NEW_LINE>final int inoutLineId = inoutLine.getM_InOutLine_ID();<NEW_LINE>StockQtyAndUOMQty qtyMovedNotMatched = inoutLineId2qtyNotMatched.get(inoutLineId);<NEW_LINE>if (qtyMovedNotMatched == null) {<NEW_LINE>final StockQtyAndUOMQty qtysNotMatched = retrieveQtyNotMatched(inoutLine);<NEW_LINE>qtyMovedNotMatched = qtysNotMatched;<NEW_LINE>inoutLineId2qtyNotMatched.put(inoutLineId, qtyMovedNotMatched);<NEW_LINE>}<NEW_LINE>final StockQtyAndUOMQty qtyToMatch = StockQtyAndUOMQtys.minUomQty(qtyInvoicedNotMatched, qtyMovedNotMatched);<NEW_LINE>if (qtyToMatch.signum() == 0) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>countMatchInvCreated++;<NEW_LINE>// Update quantities<NEW_LINE>qtyInvoicedNotMatched = StockQtyAndUOMQtys.subtract(qtyInvoicedNotMatched, qtyToMatch);<NEW_LINE>qtyMovedNotMatched = StockQtyAndUOMQtys.subtract(qtyMovedNotMatched, qtyToMatch);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Update counters<NEW_LINE>if (countMatchInvCreated > 0) {<NEW_LINE>incrementCounterAndGet(COUNTER_MATCHED);<NEW_LINE>} else if (countInOutLinesChecked > 0) {<NEW_LINE>incrementCounterAndGet(COUNTER_NOTHING_TO_BE_DONE_NoIOLWithUnmatchedQty);<NEW_LINE>} else {<NEW_LINE>incrementCounterAndGet(COUNTER_NOTHING_TO_BE_DONE_NoIOL);<NEW_LINE>}<NEW_LINE>}
createNewMatchInvoiceRecord(il, inoutLine, qtyToMatch);
299,843
public static ExplodedPattern explodePattern(String pattern) throws IllegalArgumentException {<NEW_LINE>List<String> parts = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < pattern.length(); i++) {<NEW_LINE>char currentChar = pattern.charAt(i);<NEW_LINE>if (currentChar == '\\' && i + 1 == pattern.length()) {<NEW_LINE>throw new IllegalArgumentException("Unmatched backslash found at end of pattern!");<NEW_LINE>} else if (currentChar == '\\') {<NEW_LINE>char nextChar = pattern.charAt(i + 1);<NEW_LINE>// Escape codes with three chars.<NEW_LINE>if (nextChar == '%' && i + 2 == pattern.length()) {<NEW_LINE>throw new IllegalArgumentException("Backslash-% without extra token found at " + "end of pattern!");<NEW_LINE>} else if (nextChar == '%') {<NEW_LINE>parts.add(pattern.substring<MASK><NEW_LINE>i += 2;<NEW_LINE>} else {<NEW_LINE>parts.add(pattern.substring(i, i + 2));<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>} else if (Character.isHighSurrogate(currentChar) && i + 1 == pattern.length()) {<NEW_LINE>throw new IllegalArgumentException("Unmatched surrogate found at end of pattern!");<NEW_LINE>} else if (Character.isHighSurrogate(currentChar)) {<NEW_LINE>parts.add(pattern.substring(i, i + 1));<NEW_LINE>i++;<NEW_LINE>} else {<NEW_LINE>parts.add(pattern.substring(i, i + 1));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new ExplodedPattern(parts);<NEW_LINE>}
(i, i + 3));
252,885
public void readChunkColumn(boolean full, BitSet mask, DataTypeProvider dataProvider) {<NEW_LINE>// Loop through section Y values, starting from the lowest section that has blocks inside it. Compute the index<NEW_LINE>// in the mask by subtracting the minimum chunk packet section, e.g. the lowest Y value we will find in the<NEW_LINE>// mask.<NEW_LINE>for (int sectionY = getMinBlockSection(); sectionY <= getMaxSection() && !mask.isEmpty(); sectionY++) {<NEW_LINE>ChunkSection section = getChunkSection(sectionY);<NEW_LINE>// A 1 in the position of the mask indicates this chunk section is present in the data buffer<NEW_LINE>int maskIndex = sectionY - getMinBlockSection();<NEW_LINE>if (!mask.get(maskIndex)) {<NEW_LINE>if (full && section != null) {<NEW_LINE>section.resetBlocks();<NEW_LINE>}<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Set indices to 0 when read so that we can stop once the mask is empty<NEW_LINE>mask.set(maskIndex, false);<NEW_LINE>readBlockCount(dataProvider);<NEW_LINE><MASK><NEW_LINE>Palette palette = Palette.readPalette(bitsPerBlock, dataProvider);<NEW_LINE>// A bitmask that contains bitsPerBlock set bits<NEW_LINE>int dataArrayLength = dataProvider.readVarInt();<NEW_LINE>if (section == null) {<NEW_LINE>section = createNewChunkSection((byte) (sectionY & 0xFF), palette);<NEW_LINE>}<NEW_LINE>// if the section has no blocks<NEW_LINE>if (dataArrayLength == 0) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// parse blocks<NEW_LINE>section.setBlocks(dataProvider.readLongArray(dataArrayLength));<NEW_LINE>parseLights(section, dataProvider);<NEW_LINE>// May replace an existing section or a null one<NEW_LINE>setChunkSection(sectionY, section);<NEW_LINE>}<NEW_LINE>// biome data is only present in full chunks, for <= 1.14.4<NEW_LINE>if (full) {<NEW_LINE>parse2DBiomeData(dataProvider);<NEW_LINE>}<NEW_LINE>}
byte bitsPerBlock = dataProvider.readNext();
931,511
private void bluestein_real_inverse2(final float[] a, final int offa) {<NEW_LINE>Arrays.fill(ak, 0);<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>int idx1 = 2 * i;<NEW_LINE>int idx2 = idx1 + 1;<NEW_LINE>int idx3 = offa + i;<NEW_LINE>ak[idx1] = a[idx3] * bk1[idx1];<NEW_LINE>ak[idx2] = a[idx3] * bk1[idx2];<NEW_LINE>}<NEW_LINE>cftbsub(2 * nBluestein, ak, 0, ip, nw, w);<NEW_LINE>for (int i = 0; i < nBluestein; i++) {<NEW_LINE>int idx1 = 2 * i;<NEW_LINE>int idx2 = idx1 + 1;<NEW_LINE>float im = -ak[idx1] * bk2[idx2] + ak[idx2] * bk2[idx1];<NEW_LINE>ak[idx1] = ak[idx1] * bk2[idx1] + ak<MASK><NEW_LINE>ak[idx2] = im;<NEW_LINE>}<NEW_LINE>cftfsub(2 * nBluestein, ak, 0, ip, nw, w);<NEW_LINE>if (n % 2 == 0) {<NEW_LINE>a[offa] = bk1[0] * ak[0] - bk1[1] * ak[1];<NEW_LINE>a[offa + 1] = bk1[n] * ak[n] - bk1[n + 1] * ak[n + 1];<NEW_LINE>for (int i = 1; i < n / 2; i++) {<NEW_LINE>int idx1 = 2 * i;<NEW_LINE>int idx2 = idx1 + 1;<NEW_LINE>a[offa + idx1] = bk1[idx1] * ak[idx1] - bk1[idx2] * ak[idx2];<NEW_LINE>a[offa + idx2] = bk1[idx2] * ak[idx1] + bk1[idx1] * ak[idx2];<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>a[offa] = bk1[0] * ak[0] - bk1[1] * ak[1];<NEW_LINE>a[offa + 1] = bk1[n] * ak[n - 1] + bk1[n - 1] * ak[n];<NEW_LINE>for (int i = 1; i < (n - 1) / 2; i++) {<NEW_LINE>int idx1 = 2 * i;<NEW_LINE>int idx2 = idx1 + 1;<NEW_LINE>a[offa + idx1] = bk1[idx1] * ak[idx1] - bk1[idx2] * ak[idx2];<NEW_LINE>a[offa + idx2] = bk1[idx2] * ak[idx1] + bk1[idx1] * ak[idx2];<NEW_LINE>}<NEW_LINE>a[offa + n - 1] = bk1[n - 1] * ak[n - 1] - bk1[n] * ak[n];<NEW_LINE>}<NEW_LINE>}
[idx2] * bk2[idx2];
566,324
public static DescribeRenewalPriceResponse unmarshall(DescribeRenewalPriceResponse describeRenewalPriceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeRenewalPriceResponse.setRequestId(_ctx.stringValue("DescribeRenewalPriceResponse.RequestId"));<NEW_LINE>PriceInfo priceInfo = new PriceInfo();<NEW_LINE>priceInfo.setCurrency(_ctx.stringValue("DescribeRenewalPriceResponse.PriceInfo.Currency"));<NEW_LINE>priceInfo.setOriginalPrice(_ctx.floatValue("DescribeRenewalPriceResponse.PriceInfo.OriginalPrice"));<NEW_LINE>priceInfo.setTradePrice(_ctx.floatValue("DescribeRenewalPriceResponse.PriceInfo.TradePrice"));<NEW_LINE>priceInfo.setDiscountPrice(_ctx.floatValue("DescribeRenewalPriceResponse.PriceInfo.DiscountPrice"));<NEW_LINE>List<String> ruleIds = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeRenewalPriceResponse.PriceInfo.RuleIds.Length"); i++) {<NEW_LINE>ruleIds.add(_ctx.stringValue("DescribeRenewalPriceResponse.PriceInfo.RuleIds[" + i + "]"));<NEW_LINE>}<NEW_LINE>priceInfo.setRuleIds(ruleIds);<NEW_LINE>ActivityInfo activityInfo = new ActivityInfo();<NEW_LINE>activityInfo.setCheckErrMsg(_ctx.stringValue("DescribeRenewalPriceResponse.PriceInfo.ActivityInfo.CheckErrMsg"));<NEW_LINE>activityInfo.setErrorCode(_ctx.stringValue("DescribeRenewalPriceResponse.PriceInfo.ActivityInfo.ErrorCode"));<NEW_LINE>activityInfo.setSuccess(_ctx.stringValue("DescribeRenewalPriceResponse.PriceInfo.ActivityInfo.Success"));<NEW_LINE>priceInfo.setActivityInfo(activityInfo);<NEW_LINE>List<Coupon> coupons = new ArrayList<Coupon>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeRenewalPriceResponse.PriceInfo.Coupons.Length"); i++) {<NEW_LINE>Coupon coupon = new Coupon();<NEW_LINE>coupon.setCouponNo(_ctx.stringValue("DescribeRenewalPriceResponse.PriceInfo.Coupons[" + i + "].CouponNo"));<NEW_LINE>coupon.setName(_ctx.stringValue<MASK><NEW_LINE>coupon.setDescription(_ctx.stringValue("DescribeRenewalPriceResponse.PriceInfo.Coupons[" + i + "].Description"));<NEW_LINE>coupon.setIsSelected(_ctx.stringValue("DescribeRenewalPriceResponse.PriceInfo.Coupons[" + i + "].IsSelected"));<NEW_LINE>coupons.add(coupon);<NEW_LINE>}<NEW_LINE>priceInfo.setCoupons(coupons);<NEW_LINE>describeRenewalPriceResponse.setPriceInfo(priceInfo);<NEW_LINE>List<Rule> rules = new ArrayList<Rule>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeRenewalPriceResponse.Rules.Length"); i++) {<NEW_LINE>Rule rule = new Rule();<NEW_LINE>rule.setRuleId(_ctx.longValue("DescribeRenewalPriceResponse.Rules[" + i + "].RuleId"));<NEW_LINE>rule.setName(_ctx.stringValue("DescribeRenewalPriceResponse.Rules[" + i + "].Name"));<NEW_LINE>rule.setDescription(_ctx.stringValue("DescribeRenewalPriceResponse.Rules[" + i + "].Description"));<NEW_LINE>rules.add(rule);<NEW_LINE>}<NEW_LINE>describeRenewalPriceResponse.setRules(rules);<NEW_LINE>return describeRenewalPriceResponse;<NEW_LINE>}
("DescribeRenewalPriceResponse.PriceInfo.Coupons[" + i + "].Name"));
425,112
private AllocationResult allocateBucketForWrite(final OAtomicOperation atomicOperation, final int requestedPageIndex, final int requestedPageOffset, Set<OBonsaiBucketPointer> blockedPointers) throws IOException {<NEW_LINE>final OCacheEntry sysCacheEntry = loadPageForWrite(atomicOperation, fileId, SYS_BUCKET.getPageIndex(), false, true);<NEW_LINE>if (requestedPageIndex == -1) {<NEW_LINE>try {<NEW_LINE>final OSysBucket sysBucket = new OSysBucket(sysCacheEntry);<NEW_LINE>if (sysBucket.freeListLength() > 0) {<NEW_LINE>final AllocationResult allocationResult = reuseBucketFromFreeList(atomicOperation, sysBucket, blockedPointers, -1, -1);<NEW_LINE>if (allocationResult != null) {<NEW_LINE>return allocationResult;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return allocateNewPage(atomicOperation, sysBucket);<NEW_LINE>} finally {<NEW_LINE>releasePageFromWrite(atomicOperation, sysCacheEntry);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>// during rollback or data restore we need to restore ridbag with exact value of<NEW_LINE>final OSysBucket sysBucket = new OSysBucket(sysCacheEntry);<NEW_LINE>AllocationResult allocationResult = null;<NEW_LINE>if (sysBucket.freeListLength() > 0) {<NEW_LINE>allocationResult = reuseBucketFromFreeList(atomicOperation, sysBucket, blockedPointers, requestedPageIndex, requestedPageOffset);<NEW_LINE>}<NEW_LINE>if (allocationResult == null) {<NEW_LINE>allocationResult = allocateNewPage(atomicOperation, sysBucket);<NEW_LINE>}<NEW_LINE>if (allocationResult.pointer.getPageIndex() != requestedPageIndex || allocationResult.pointer.getPageOffset() != requestedPageOffset) {<NEW_LINE><MASK><NEW_LINE>throw new OStorageException("Can not allocate rid bag with pageIndex = " + requestedPageIndex + ", pageOffset = " + requestedPageOffset);<NEW_LINE>}<NEW_LINE>return allocationResult;<NEW_LINE>} finally {<NEW_LINE>releasePageFromWrite(atomicOperation, sysCacheEntry);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
releasePageFromWrite(atomicOperation, allocationResult.cacheEntry);
984,145
final PutInboundDmarcSettingsResult executePutInboundDmarcSettings(PutInboundDmarcSettingsRequest putInboundDmarcSettingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putInboundDmarcSettingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutInboundDmarcSettingsRequest> request = null;<NEW_LINE>Response<PutInboundDmarcSettingsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutInboundDmarcSettingsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putInboundDmarcSettingsRequest));<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, "WorkMail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutInboundDmarcSettings");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutInboundDmarcSettingsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutInboundDmarcSettingsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
348,262
final DeleteKeyPairResult executeDeleteKeyPair(DeleteKeyPairRequest deleteKeyPairRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteKeyPairRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteKeyPairRequest> request = null;<NEW_LINE>Response<DeleteKeyPairResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteKeyPairRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteKeyPairRequest));<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, "Lightsail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteKeyPair");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteKeyPairResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteKeyPairResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,225,701
public boolean restore(Connection connection) {<NEW_LINE>ConnectionId connectionId = connection.getConnectionId();<NEW_LINE>if (connectionId == null) {<NEW_LINE>throw new IllegalStateException("Connection must have a connection id!");<NEW_LINE>} else if (connectionId.isEmpty()) {<NEW_LINE>throw new IllegalStateException("Connection must have a none empty connection id!");<NEW_LINE>} else if (connections.get(connectionId) != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>boolean restored = false;<NEW_LINE>synchronized (connections) {<NEW_LINE>if (connections.put(connectionId, connection, connection.getLastMessageNanos())) {<NEW_LINE>if (LOGGER.isTraceEnabled()) {<NEW_LINE>LOGGER.trace("{}connection: add {} (size {})", tag, connection, connections.size(), new Throwable("connection added!"));<NEW_LINE>} else {<NEW_LINE>LOGGER.debug("{}connection: add {} (size {})", tag, connectionId, connections.size());<NEW_LINE>}<NEW_LINE>addToAddressConnections(connection);<NEW_LINE>restored = true;<NEW_LINE>} else {<NEW_LINE>LOGGER.warn("{}connection store is full! {} max. entries.", tag, connections.getCapacity());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (restored && connection.hasEstablishedDtlsContext()) {<NEW_LINE>putEstablishedSession(connection);<NEW_LINE>}<NEW_LINE>return restored;<NEW_LINE>}
throw new IllegalStateException("Connection id already used! " + connectionId);
1,450,831
public void renderTrack(RenderContext ctx, Repainter repainter, double w, double h) {<NEW_LINE>ctx.trace("CpuSummary", () -> {<NEW_LINE>CpuSummaryTrack.Data data = track.getData(state.toRequest(), onUiThread(repainter));<NEW_LINE>drawLoading(ctx, data, state, h);<NEW_LINE>if (data == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// TODO: dedupe with CpuRenderer<NEW_LINE>long tStart = data.request.range.start;<NEW_LINE>int start = Math.max(0, (int) ((state.getVisibleTime().start - tStart) / data.bucketSize));<NEW_LINE>mainGradient().applyBaseAndBorder(ctx);<NEW_LINE>ctx.path(path -> {<NEW_LINE>path.moveTo(0, h);<NEW_LINE>double y = h, x = 0;<NEW_LINE>for (int i = start; i < data.utilizations.length && x < w; i++) {<NEW_LINE>x = state.timeToPx(tStart + i * data.bucketSize);<NEW_LINE>double nextY = h * (1 - data.utilizations[i]);<NEW_LINE>path.lineTo(x, y);<NEW_LINE>path.lineTo(x, nextY);<NEW_LINE>y = nextY;<NEW_LINE>}<NEW_LINE>path.lineTo(x, h);<NEW_LINE>path.close();<NEW_LINE>ctx.fillPath(path);<NEW_LINE>ctx.drawPath(path);<NEW_LINE>});<NEW_LINE>if (hovered != null && hovered.bucket >= start) {<NEW_LINE>double x = state.timeToPx(tStart + hovered.bucket * data.<MASK><NEW_LINE>if (x < w) {<NEW_LINE>double dx = HOVER_PADDING + hovered.size.w + HOVER_PADDING;<NEW_LINE>double dy = HOVER_PADDING + hovered.size.h + HOVER_PADDING;<NEW_LINE>ctx.setBackgroundColor(colors().hoverBackground);<NEW_LINE>ctx.fillRect(x + HOVER_MARGIN, h - HOVER_PADDING - dy, dx, dy);<NEW_LINE>ctx.setForegroundColor(colors().textMain);<NEW_LINE>ctx.drawText(Fonts.Style.Normal, hovered.text, x + HOVER_MARGIN + HOVER_PADDING, h - dy);<NEW_LINE>ctx.setForegroundColor(colors().textMain);<NEW_LINE>ctx.drawCircle(x, h * (1 - hovered.utilization), CURSOR_SIZE / 2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
bucketSize + data.bucketSize / 2);
1,224,879
public void onSuccess(@Nullable Edge edge) {<NEW_LINE>if (edge != null && !customerId.isNullUid()) {<NEW_LINE>saveEdgeEvent(edge.getTenantId(), edge.getId(), EdgeEventType.CUSTOMER, EdgeEventActionType.ADDED, customerId, null);<NEW_LINE>PageLink pageLink = new PageLink(DEFAULT_PAGE_SIZE);<NEW_LINE>PageData<User> pageData;<NEW_LINE>do {<NEW_LINE>pageData = userService.findCustomerUsers(tenantId, customerId, pageLink);<NEW_LINE>if (pageData != null && pageData.getData() != null && !pageData.getData().isEmpty()) {<NEW_LINE>log.trace("[{}] [{}] user(s) are going to be added to edge.", edge.getId(), pageData.getData().size());<NEW_LINE>for (User user : pageData.getData()) {<NEW_LINE>saveEdgeEvent(edge.getTenantId(), edge.getId(), EdgeEventType.USER, EdgeEventActionType.ADDED, user.getId(), null);<NEW_LINE>}<NEW_LINE>if (pageData.hasNext()) {<NEW_LINE>pageLink = pageLink.nextPageLink();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} while (pageData != <MASK><NEW_LINE>}<NEW_LINE>}
null && pageData.hasNext());
294,373
public DescribeDeliveryStreamResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeDeliveryStreamResult describeDeliveryStreamResult = new DescribeDeliveryStreamResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return describeDeliveryStreamResult;<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("DeliveryStreamDescription", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>describeDeliveryStreamResult.setDeliveryStreamDescription(DeliveryStreamDescriptionJsonUnmarshaller.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 describeDeliveryStreamResult;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
660,930
public void copyToLocalFile(URI srcUri, File dstFile) throws Exception {<NEW_LINE>LOGGER.debug("starting to fetch segment from hdfs");<NEW_LINE>final String dstFilePath = dstFile.getAbsolutePath();<NEW_LINE>final Path remoteFile = new Path(srcUri);<NEW_LINE>final Path localFile = new Path(dstFile.toURI());<NEW_LINE>try {<NEW_LINE>if (_hadoopFS == null) {<NEW_LINE>throw new RuntimeException("_hadoopFS client is not initialized when trying to copy files");<NEW_LINE>}<NEW_LINE>if (_hadoopFS.isDirectory(remoteFile)) {<NEW_LINE>throw new IllegalArgumentException(srcUri.toString() + " is a direactory");<NEW_LINE>}<NEW_LINE>long startMs = System.currentTimeMillis();<NEW_LINE>_hadoopFS.copyToLocalFile(remoteFile, localFile);<NEW_LINE>LOGGER.debug("copied {} from hdfs to {} in local for size {}, take {} ms", srcUri, dstFilePath, dstFile.length(), System.currentTimeMillis() - startMs);<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOGGER.warn(<MASK><NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}
"failed to fetch segment {} from hdfs to {}, might retry", srcUri, dstFile, e);
11,882
public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>final Bundle profileInfo = getArguments();<NEW_LINE>int icon = android.R.drawable.ic_dialog_alert;<NEW_LINE>int title = R.string.connect_profile_question;<NEW_LINE>int message = R.string.replaces_active_connection;<NEW_LINE>int button = R.string.connect;<NEW_LINE>if (profileInfo.getBoolean(PROFILE_RECONNECT)) {<NEW_LINE>icon = android.R.drawable.ic_dialog_info;<NEW_LINE>title = R.string.vpn_connected;<NEW_LINE>message = R.string.vpn_profile_connected;<NEW_LINE>button = R.string.reconnect;<NEW_LINE>} else if (profileInfo.getBoolean(PROFILE_DISCONNECT)) {<NEW_LINE>title = R.string.disconnect_question;<NEW_LINE>message = R.string.disconnect_active_connection;<NEW_LINE>button = R.string.disconnect;<NEW_LINE>}<NEW_LINE>DialogInterface.OnClickListener connectListener = new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>VpnProfileControlActivity activity = (VpnProfileControlActivity) getActivity();<NEW_LINE>activity.startVpnProfile(profileInfo);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>DialogInterface.OnClickListener disconnectListener = new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>VpnProfileControlActivity activity = (VpnProfileControlActivity) getActivity();<NEW_LINE>if (activity.mService != null) {<NEW_LINE>activity.mService.disconnect();<NEW_LINE>}<NEW_LINE>activity.finish();<NEW_LINE>}<NEW_LINE>};<NEW_LINE>DialogInterface.OnClickListener cancelListener = new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>getActivity().finish();<NEW_LINE>}<NEW_LINE>};<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()).setIcon(icon).setTitle(String.format(getString(title), profileInfo.getString(PROFILE_NAME))).setMessage(message);<NEW_LINE>if (profileInfo.getBoolean(PROFILE_DISCONNECT)) {<NEW_LINE>builder.setPositiveButton(button, disconnectListener);<NEW_LINE>} else {<NEW_LINE>builder.setPositiveButton(button, connectListener);<NEW_LINE>}<NEW_LINE>if (profileInfo.getBoolean(PROFILE_RECONNECT)) {<NEW_LINE>builder.setNegativeButton(R.string.disconnect, disconnectListener);<NEW_LINE>builder.setNeutralButton(android.R.string.cancel, cancelListener);<NEW_LINE>} else {<NEW_LINE>builder.setNegativeButton(android.<MASK><NEW_LINE>}<NEW_LINE>return builder.create();<NEW_LINE>}
R.string.cancel, cancelListener);
1,472,481
final DescribeJobsResult executeDescribeJobs(DescribeJobsRequest describeJobsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeJobsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeJobsRequest> request = null;<NEW_LINE>Response<DescribeJobsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeJobsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeJobsRequest));<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, "Batch");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeJobs");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeJobsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeJobsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,183,841
private void genChunk(ZonePlannerMapChunkKey key) {<NEW_LINE>ZonePlannerMapChunk zonePlannerMapChunk = ZonePlannerMapDataClient.INSTANCE.getChunk(Minecraft.getMinecraft().world, key);<NEW_LINE>if (zonePlannerMapChunk == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>BufferBuilder builder = Tessellator.getInstance().getBuffer();<NEW_LINE>// TODO: normals<NEW_LINE>builder.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);<NEW_LINE>for (int x = 0; x < 16; x++) {<NEW_LINE>for (int z = 0; z < 16; z++) {<NEW_LINE>MapColourData data = zonePlannerMapChunk.getData(x, z);<NEW_LINE>if (data != null) {<NEW_LINE>setColor(data.colour);<NEW_LINE>drawBlockCuboid(builder, key.chunkPos.getXStart() + x, data.posY, key.chunkPos.getZStart() + z, data.posY);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int glList = GL11.glGenLists(1);<NEW_LINE>GL11.glNewList(glList, GL11.GL_COMPILE);<NEW_LINE>Tessellator<MASK><NEW_LINE>GL11.glEndList();<NEW_LINE>CHUNK_GL_CACHE.put(key, glList);<NEW_LINE>}
.getInstance().draw();
89,584
private Instant scheduleBackward(final Instant end, final Duration activityDuration, final I_S_Resource resource) {<NEW_LINE><MASK><NEW_LINE>Instant start = null;<NEW_LINE>Instant currentDate = end;<NEW_LINE>Duration remainingDuration = activityDuration;<NEW_LINE>// statistical iteration count<NEW_LINE>int iteration = 0;<NEW_LINE>do {<NEW_LINE>log.info("--> end=" + currentDate);<NEW_LINE>log.info("--> nodeDuration=" + remainingDuration);<NEW_LINE>currentDate = reasoner.getAvailableDate(resource, currentDate, true);<NEW_LINE>log.info("--> end(available)=" + currentDate);<NEW_LINE>Instant dayEnd = resourceType.getDayEnd(currentDate);<NEW_LINE>final Instant dayStart = resourceType.getDayStart(currentDate);<NEW_LINE>log.info("--> dayStart=" + dayStart + ", dayEnd=" + dayEnd);<NEW_LINE>// If working has already began at this day and the value is in the range of the<NEW_LINE>// resource's availability, switch end time to the given again<NEW_LINE>if (currentDate.isBefore(dayEnd) && currentDate.isAfter(dayStart)) {<NEW_LINE>dayEnd = currentDate;<NEW_LINE>}<NEW_LINE>// The available time at this day in milliseconds<NEW_LINE>final Duration availableDayDuration = getAvailableDuration(dayStart, dayEnd, resource);<NEW_LINE>// The work can be finish on this day.<NEW_LINE>if (availableDayDuration.compareTo(remainingDuration) >= 0) {<NEW_LINE>log.info("--> availableDayDuration >= nodeDuration true " + availableDayDuration + "|" + remainingDuration);<NEW_LINE>start = dayEnd.minus(remainingDuration);<NEW_LINE>remainingDuration = Duration.ZERO;<NEW_LINE>break;<NEW_LINE>} else // Otherwise recall with previous day and the remained node duration.<NEW_LINE>{<NEW_LINE>log.info("--> availableDayDuration >= nodeDuration false " + availableDayDuration + "|" + remainingDuration);<NEW_LINE>log.info("--> nodeDuration-availableDayDuration " + remainingDuration.minus(availableDayDuration));<NEW_LINE>currentDate = currentDate.atZone(SystemTime.zoneId()).toLocalDate().atTime(LocalTime.MAX).minusDays(1).atZone(SystemTime.zoneId()).toInstant();<NEW_LINE>remainingDuration = remainingDuration.minus(availableDayDuration);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>iteration++;<NEW_LINE>if (iteration > p_MaxIterationsNo) {<NEW_LINE>throw new CRPException("Maximum number of iterations exceeded (" + p_MaxIterationsNo + ")" + " - Date:" + start + ", RemainingMillis:" + remainingDuration);<NEW_LINE>}<NEW_LINE>} while (remainingDuration.toNanos() > 0);<NEW_LINE>log.info(" --> start=" + start + " <---------------------------------------- ");<NEW_LINE>return start;<NEW_LINE>}
final ResourceType resourceType = getResourceType(resource);
1,621,288
private TextChangeManager createChangeManager(IProgressMonitor pm, RefactoringStatus result) throws CoreException {<NEW_LINE>pm.beginTask(RefactoringCoreMessages.ChangeSignatureRefactoring_preview, 2);<NEW_LINE>fChangeManager = new TextChangeManager();<NEW_LINE>boolean isNoArgConstructor = isNoArgConstructor();<NEW_LINE>Map<ICompilationUnit, Set<IType>> namedSubclassMapping = null;<NEW_LINE>if (isNoArgConstructor) {<NEW_LINE>// create only when needed;<NEW_LINE>namedSubclassMapping = createNamedSubclassMapping(new SubProgressMonitor(pm, 1));<NEW_LINE>} else {<NEW_LINE>pm.worked(1);<NEW_LINE>}<NEW_LINE>for (SearchResultGroup occurrence : fOccurrences) {<NEW_LINE>if (pm.isCanceled()) {<NEW_LINE>throw new OperationCanceledException();<NEW_LINE>}<NEW_LINE>SearchResultGroup group = occurrence;<NEW_LINE>ICompilationUnit cu = group.getCompilationUnit();<NEW_LINE>if (cu == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>CompilationUnitRewrite cuRewrite;<NEW_LINE>if (cu.equals(getCu())) {<NEW_LINE>cuRewrite = fBaseCuRewrite;<NEW_LINE>} else {<NEW_LINE>cuRewrite = new CompilationUnitRewrite(cu);<NEW_LINE>cuRewrite.getASTRewrite().setTargetSourceRangeComputer(new TightSourceRangeComputer());<NEW_LINE>}<NEW_LINE>// IntroduceParameterObjectRefactoring needs to update declarations first:<NEW_LINE>List<OccurrenceUpdate<? extends ASTNode>> <MASK><NEW_LINE>for (ASTNode node : ASTNodeSearchUtil.findNodes(group.getSearchResults(), cuRewrite.getRoot())) {<NEW_LINE>OccurrenceUpdate<? extends ASTNode> update = createOccurrenceUpdate(node, cuRewrite, result);<NEW_LINE>if (update instanceof DeclarationUpdate) {<NEW_LINE>update.updateNode();<NEW_LINE>} else {<NEW_LINE>deferredUpdates.add(update);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (OccurrenceUpdate<? extends ASTNode> occurrenceUpdate : deferredUpdates) {<NEW_LINE>occurrenceUpdate.updateNode();<NEW_LINE>}<NEW_LINE>if (isNoArgConstructor && namedSubclassMapping.containsKey(cu)) {<NEW_LINE>// only non-anonymous subclasses may have noArgConstructors to modify - see bug 43444<NEW_LINE>for (IType subtype : namedSubclassMapping.get(cu)) {<NEW_LINE>AbstractTypeDeclaration subtypeNode = ASTNodeSearchUtil.getAbstractTypeDeclarationNode(subtype, cuRewrite.getRoot());<NEW_LINE>if (subtypeNode != null) {<NEW_LINE>modifyImplicitCallsToNoArgConstructor(subtypeNode, cuRewrite);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>TextChange change = cuRewrite.createChange(true);<NEW_LINE>if (change != null) {<NEW_LINE>fChangeManager.manage(cu, change);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>pm.done();<NEW_LINE>return fChangeManager;<NEW_LINE>}
deferredUpdates = new ArrayList<>();
1,647,012
protected void initDisplay() {<NEW_LINE>display = NewtFactory.createDisplay(null);<NEW_LINE>display.addReference();<NEW_LINE>screen = NewtFactory.createScreen(display, 0);<NEW_LINE>screen.addReference();<NEW_LINE>GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment();<NEW_LINE>GraphicsDevice[] awtDevices = environment.getScreenDevices();<NEW_LINE>GraphicsDevice awtDisplayDevice = null;<NEW_LINE>int displayNum = sketch.sketchDisplay();<NEW_LINE>if (displayNum > 0) {<NEW_LINE>// if -1, use the default device<NEW_LINE>if (displayNum <= awtDevices.length) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>System.err.format("Display %d does not exist, " + "using the default display instead.%n", displayNum);<NEW_LINE>for (int i = 0; i < awtDevices.length; i++) {<NEW_LINE>System.err.format("Display %d is %s%n", i + 1, awtDevices[i]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (0 < awtDevices.length) {<NEW_LINE>awtDisplayDevice = awtDevices[0];<NEW_LINE>}<NEW_LINE>if (awtDisplayDevice == null) {<NEW_LINE>awtDisplayDevice = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();<NEW_LINE>}<NEW_LINE>displayRect = awtDisplayDevice.getDefaultConfiguration().getBounds();<NEW_LINE>}
awtDisplayDevice = awtDevices[displayNum - 1];
1,359,005
public void onMatch(RelOptRuleCall call) {<NEW_LINE>Filter filter1 = (Filter) call.rels[0];<NEW_LINE>Filter filter2 = (Filter) call.rels[1];<NEW_LINE>ImmutableSet.Builder variablesSet = ImmutableSet.builder();<NEW_LINE>if (filter1.getVariablesSet() != null) {<NEW_LINE>variablesSet.addAll(filter1.getVariablesSet());<NEW_LINE>}<NEW_LINE>if (filter2.getVariablesSet() != null) {<NEW_LINE>variablesSet.addAll(filter2.getVariablesSet());<NEW_LINE>}<NEW_LINE>RexBuilder rb = call<MASK><NEW_LINE>// to preserve filter order, filter2 first, filter1 later<NEW_LINE>if (filter1 instanceof LogicalFilter) {<NEW_LINE>call.transformTo(LogicalFilter.create(filter2.getInput(), RexUtil.flatten(rb, rb.makeCall(AND, filter2.getCondition(), filter1.getCondition())), variablesSet.build()));<NEW_LINE>} else if (filter1 instanceof PhysicalFilter) {<NEW_LINE>call.transformTo(PhysicalFilter.create(filter2.getInput(), RexUtil.flatten(rb, rb.makeCall(AND, filter2.getCondition(), filter1.getCondition())), variablesSet.build()));<NEW_LINE>}<NEW_LINE>}
.builder().getRexBuilder();
361,871
static <A extends Annotation, E extends Member & AnnotatedElement, T extends Metric> RegistrationPrep create(A annotation, E annotatedElement, Class<?> clazz, MatchingType matchingType, Executable executable) {<NEW_LINE>MetricAnnotationInfo<?, ?> info = ANNOTATION_TYPE_TO_INFO.get(annotation.annotationType());<NEW_LINE>if (info == null || !info.annotationClass().isInstance(annotation)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String metricName = MetricUtil.getMetricName(annotatedElement, clazz, matchingType, info.name(annotation), info.absolute(annotation));<NEW_LINE>MetadataBuilder metadataBuilder = Metadata.builder().withName(metricName).withType(ANNOTATION_TYPE_TO_METRIC_TYPE.get(annotation.annotationType())).withUnit(info.unit(annotation).trim());<NEW_LINE>String candidateDescription = info.description(annotation);<NEW_LINE>if (candidateDescription != null && !candidateDescription.trim().isEmpty()) {<NEW_LINE>metadataBuilder.withDescription(candidateDescription.trim());<NEW_LINE>}<NEW_LINE>String candidateDisplayName = info.displayName(annotation);<NEW_LINE>if (candidateDisplayName != null && !candidateDisplayName.trim().isEmpty()) {<NEW_LINE>metadataBuilder.withDisplayName(candidateDisplayName.trim());<NEW_LINE>}<NEW_LINE>return new RegistrationPrep(metricName, metadataBuilder.build(), info.tags(annotation), info.registerFunction, <MASK><NEW_LINE>}
executable, annotation.annotationType());
1,068,657
void deprioritizeJob(Path manifestPath) throws AutoIngestManagerException {<NEW_LINE>if (state != State.RUNNING) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AutoIngestJob jobToDeprioritize = null;<NEW_LINE>synchronized (jobsLock) {<NEW_LINE>for (AutoIngestJob job : pendingJobs) {<NEW_LINE>if (job.getManifest().getFilePath().equals(manifestPath)) {<NEW_LINE>jobToDeprioritize = job;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (null != jobToDeprioritize) {<NEW_LINE><MASK><NEW_LINE>jobToDeprioritize.setPriority(DEFAULT_PRIORITY);<NEW_LINE>try {<NEW_LINE>this.updateAutoIngestJobData(jobToDeprioritize);<NEW_LINE>} catch (CoordinationServiceException | InterruptedException ex) {<NEW_LINE>jobToDeprioritize.setPriority(oldPriority);<NEW_LINE>throw new AutoIngestManagerException("Error updating job priority", ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collections.sort(pendingJobs);<NEW_LINE>}<NEW_LINE>if (null != jobToDeprioritize) {<NEW_LINE>final String caseName = jobToDeprioritize.getManifest().getCaseName();<NEW_LINE>final String dataSourceName = jobToDeprioritize.getManifest().getDataSourceFileName();<NEW_LINE>new Thread(() -> {<NEW_LINE>eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName, getSystemUserNameProperty(), AutoIngestCasePrioritizedEvent.EventType.JOB_DEPRIORITIZED, dataSourceName));<NEW_LINE>}).start();<NEW_LINE>}<NEW_LINE>}
int oldPriority = jobToDeprioritize.getPriority();
1,728,571
private Namespace createNamespace(String name, SymbolType symbolType, Address address, Namespace toParentNamespace, SourceType source) throws DuplicateNameException, InvalidInputException {<NEW_LINE>if (symbolType == SymbolType.FUNCTION) {<NEW_LINE>// function names don't have to be unique<NEW_LINE>return (Namespace) createSymbol(name, symbolType, address, toParentNamespace, source);<NEW_LINE>}<NEW_LINE>// Need to create a unique named namespace that is equivalent to original.<NEW_LINE>for (int i = 0; i < Integer.MAX_VALUE; i++) {<NEW_LINE>String uniqueName = (i == 0) ? name : name + ProgramMerge.SYMBOL_CONFLICT_SUFFIX + i;<NEW_LINE>Namespace ns = toSymbolTable.getNamespace(uniqueName, toParentNamespace);<NEW_LINE>if (ns != null) {<NEW_LINE>Symbol s = ns.getSymbol();<NEW_LINE>if (!s.getAddress().equals(address) || !s.getSymbolType().equals(symbolType)) {<NEW_LINE>// Not the right one, so go to next conflict name.<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Found the equivalent namespace so return it.<NEW_LINE>return ns;<NEW_LINE>}<NEW_LINE>// Create it, since nothing with this conflict name.<NEW_LINE>Symbol uniqueSymbol = createSymbol(uniqueName, symbolType, address, toParentNamespace, source);<NEW_LINE>if (uniqueSymbol != null) {<NEW_LINE>Object obj = uniqueSymbol.getObject();<NEW_LINE>if (obj instanceof Namespace) {<NEW_LINE>return (Namespace) obj;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Otherwise throw exception<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>throw new DuplicateNameException("Couldn't create namespace '" + name + "' in namespace '" + toParentNamespace<MASK><NEW_LINE>}
.getName(true) + "'.");
1,852,306
public static void showEula(final Activity activity) {<NEW_LINE>if (!new Eula().shouldShowEula(activity))<NEW_LINE>return;<NEW_LINE>final AlertDialog.Builder builder = new AlertDialog.Builder(activity);<NEW_LINE>builder.<MASK><NEW_LINE>builder.setCancelable(true);<NEW_LINE>builder.setPositiveButton(R.string.DLG_accept, new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>accept(activity);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>builder.setNegativeButton(R.string.DLG_decline, new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>refuse(activity);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>builder.setOnCancelListener(new DialogInterface.OnCancelListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onCancel(DialogInterface dialog) {<NEW_LINE>refuse(activity);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>builder.setMessage(AndroidUtilities.readFile(activity, R.raw.eula));<NEW_LINE>builder.show();<NEW_LINE>}
setTitle(R.string.DLG_eula_title);
1,341,009
private <T> boolean existByFilter(final String path, final Class<T> deserializeClass, final Filter<T> filter, final Object... params) {<NEW_LINE>try {<NEW_LINE>GetOption option = GetOption.newBuilder().withPrefix(ByteSequence.from(path, StandardCharsets<MASK><NEW_LINE>List<KeyValue> children = client.getKVClient().get(ByteSequence.from(path, StandardCharsets.UTF_8), option).get().getKvs();<NEW_LINE>if (CollectionUtils.isEmpty(children)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>for (KeyValue child : children) {<NEW_LINE>T t = hmilySerializer.deSerialize(child.getValue().getBytes(), deserializeClass);<NEW_LINE>if (filter.filter(t, params)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (ExecutionException | InterruptedException e) {<NEW_LINE>log.error("existByFilter occur a exception", e);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.UTF_8)).build();
1,039,499
private void updateInfoViewAppearance() {<NEW_LINE>if (portrait)<NEW_LINE>return;<NEW_LINE>View toolsPanel = mainView.findViewById(R.id.measure_mode_controls);<NEW_LINE>View snapToRoadProgress = mainView.findViewById(R.id.snap_to_road_progress_bar);<NEW_LINE>int infoViewWidth = mainView.getWidth() - toolsPanel.getWidth();<NEW_LINE>int bottomMargin = toolsPanel.getHeight();<NEW_LINE>if (progressBarVisible) {<NEW_LINE>bottomMargin += snapToRoadProgress.getHeight();<NEW_LINE>}<NEW_LINE>ViewGroup.MarginLayoutParams params = null;<NEW_LINE>if (mainView.getParent() instanceof FrameLayout) {<NEW_LINE>params = new FrameLayout.LayoutParams(infoViewWidth, -1);<NEW_LINE>} else if (mainView.getParent() instanceof LinearLayout) {<NEW_LINE>params = new LinearLayout<MASK><NEW_LINE>}<NEW_LINE>if (params != null) {<NEW_LINE>AndroidUtils.setMargins(params, 0, 0, 0, bottomMargin);<NEW_LINE>cardsContainer.setLayoutParams(params);<NEW_LINE>}<NEW_LINE>}
.LayoutParams(infoViewWidth, -1);
1,128,655
public List<String[]> tableAsParts(String message, String separator) {<NEW_LINE>String[] lines = StringUtils.split(message, '\n');<NEW_LINE>List<String[]> <MASK><NEW_LINE>Maximum.ForInteger rowWidth = new Maximum.ForInteger(0);<NEW_LINE>for (String line : lines) {<NEW_LINE>String[] row = StringUtils.split(line, separator);<NEW_LINE>rowWidth.add(row.length);<NEW_LINE>rows.add(row);<NEW_LINE>}<NEW_LINE>int columns = rowWidth.getMaxAndReset();<NEW_LINE>int[] maxWidths = findMaxWidths(rows, columns);<NEW_LINE>int compensates = getWidth(" ");<NEW_LINE>List<String[]> table = new ArrayList<>();<NEW_LINE>for (String[] row : rows) {<NEW_LINE>List<String> rowAsParts = new ArrayList<>();<NEW_LINE>for (int i = 0; i < row.length; i++) {<NEW_LINE>StringBuilder part = new StringBuilder(row[i]);<NEW_LINE>int width = getWidth(row[i]);<NEW_LINE>while (maxWidths[i] > width) {<NEW_LINE>part.append(" ");<NEW_LINE>width += compensates;<NEW_LINE>}<NEW_LINE>rowAsParts.add(part.toString());<NEW_LINE>}<NEW_LINE>table.add(rowAsParts.toArray(new String[0]));<NEW_LINE>}<NEW_LINE>return table;<NEW_LINE>}
rows = new ArrayList<>();
602,560
public static DescribeUidWhiteListGroupResponse unmarshall(DescribeUidWhiteListGroupResponse describeUidWhiteListGroupResponse, UnmarshallerContext context) {<NEW_LINE>describeUidWhiteListGroupResponse.setRequestId(context.stringValue("DescribeUidWhiteListGroupResponse.RequestId"));<NEW_LINE>describeUidWhiteListGroupResponse.setModule(context.stringValue("DescribeUidWhiteListGroupResponse.module"));<NEW_LINE>List<String> productList = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribeUidWhiteListGroupResponse.ProductList.Length"); i++) {<NEW_LINE>productList.add(context.stringValue("DescribeUidWhiteListGroupResponse.ProductList[" + i + "]"));<NEW_LINE>}<NEW_LINE>describeUidWhiteListGroupResponse.setProductList(productList);<NEW_LINE>PageInfo pageInfo = new PageInfo();<NEW_LINE>pageInfo.setTotal(context.integerValue("DescribeUidWhiteListGroupResponse.PageInfo.total"));<NEW_LINE>pageInfo.setPageSize(context.integerValue("DescribeUidWhiteListGroupResponse.PageInfo.pageSize"));<NEW_LINE>pageInfo.setCurrentPage(context.integerValue("DescribeUidWhiteListGroupResponse.PageInfo.currentPage"));<NEW_LINE>describeUidWhiteListGroupResponse.setPageInfo(pageInfo);<NEW_LINE>List<Data> dataList = new ArrayList<Data>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribeUidWhiteListGroupResponse.DataList.Length"); i++) {<NEW_LINE>Data data = new Data();<NEW_LINE>data.setStatus(context.stringValue("DescribeUidWhiteListGroupResponse.DataList[" + i + "].Status"));<NEW_LINE>data.setGmtCreate(context.stringValue("DescribeUidWhiteListGroupResponse.DataList[" + i + "].GmtCreate"));<NEW_LINE>data.setGmtRealExpire(context.stringValue("DescribeUidWhiteListGroupResponse.DataList[" + i + "].GmtRealExpire"));<NEW_LINE>data.setSrcUid(context.stringValue("DescribeUidWhiteListGroupResponse.DataList[" + i + "].SrcUid"));<NEW_LINE>data.setAutoConfig(context.integerValue<MASK><NEW_LINE>data.setGroupId(context.integerValue("DescribeUidWhiteListGroupResponse.DataList[" + i + "].GroupId"));<NEW_LINE>List<Item> items = new ArrayList<Item>();<NEW_LINE>for (int j = 0; j < context.lengthValue("DescribeUidWhiteListGroupResponse.DataList[" + i + "].Items.Length"); j++) {<NEW_LINE>Item item = new Item();<NEW_LINE>item.setIP(context.stringValue("DescribeUidWhiteListGroupResponse.DataList[" + i + "].Items[" + j + "].IP"));<NEW_LINE>item.setRegionId(context.stringValue("DescribeUidWhiteListGroupResponse.DataList[" + i + "].Items[" + j + "].RegionId"));<NEW_LINE>items.add(item);<NEW_LINE>}<NEW_LINE>data.setItems(items);<NEW_LINE>dataList.add(data);<NEW_LINE>}<NEW_LINE>describeUidWhiteListGroupResponse.setDataList(dataList);<NEW_LINE>return describeUidWhiteListGroupResponse;<NEW_LINE>}
("DescribeUidWhiteListGroupResponse.DataList[" + i + "].AutoConfig"));
812,267
public void printWsdl(HttpServletResponse response) throws IOException {<NEW_LINE>WsdlInterface[] mockedInterfaces = mockService.getMockedInterfaces();<NEW_LINE>if (mockedInterfaces.length == 1) {<NEW_LINE>StringToStringMap parts = wsdlCache.get(mockedInterfaces[0].getName());<NEW_LINE>printOkXmlResult(response, parts.get(parts.get("#root#")));<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>WSDLFactory wsdlFactory = WSDLFactory.newInstance();<NEW_LINE>Definition def = wsdlFactory.newDefinition();<NEW_LINE>for (WsdlInterface iface : mockedInterfaces) {<NEW_LINE>StringToStringMap parts = wsdlCache.get(iface.getName());<NEW_LINE>Import wsdlImport = def.createImport();<NEW_LINE>wsdlImport.setLocationURI(getInterfacePrefix(iface) + "&part=" + parts.get("#root#"));<NEW_LINE>wsdlImport.setNamespaceURI(WsdlUtils.getTargetNamespace(iface.getWsdlContext<MASK><NEW_LINE>def.addImport(wsdlImport);<NEW_LINE>}<NEW_LINE>response.setStatus(HttpServletResponse.SC_OK);<NEW_LINE>response.setContentType("text/xml");<NEW_LINE>response.setCharacterEncoding("UTF-8");<NEW_LINE>WSDLWriter writer = wsdlFactory.newWSDLWriter();<NEW_LINE>writer.writeWSDL(def, response.getWriter());<NEW_LINE>} catch (Exception e) {<NEW_LINE>SoapUI.logError(e);<NEW_LINE>throw new IOException("Failed to create combined WSDL");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
().getDefinition()));
65,690
public final Query buildQuery(LeafReader reader, BiPredicate<String, BytesRef> termAcceptor) {<NEW_LINE>try {<NEW_LINE>DocumentQueryBuilder queryBuilder = getQueryBuilder();<NEW_LINE>for (FieldInfo field : reader.getFieldInfos()) {<NEW_LINE>Terms terms = reader.terms(field.name);<NEW_LINE>if (terms == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>TokenStream ts = new TermsEnumTokenStream(terms.iterator());<NEW_LINE>for (CustomQueryHandler handler : queryHandlers) {<NEW_LINE>ts = handler.wrapTermStream(field.name, ts);<NEW_LINE>}<NEW_LINE>ts = new FilteringTokenFilter(ts) {<NEW_LINE><NEW_LINE>TermToBytesRefAttribute termAtt = addAttribute(TermToBytesRefAttribute.class);<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected boolean accept() {<NEW_LINE>return filterFields.contains(field.name) == false && termAcceptor.test(field.name, termAtt.getBytesRef());<NEW_LINE>}<NEW_LINE>};<NEW_LINE>TermToBytesRefAttribute termAtt = ts.addAttribute(TermToBytesRefAttribute.class);<NEW_LINE>while (ts.incrementToken()) {<NEW_LINE>queryBuilder.addTerm(field.name, BytesRef.deepCopyOf(termAtt.getBytesRef()));<NEW_LINE>}<NEW_LINE>ts.close();<NEW_LINE>}<NEW_LINE>Query presearcherQuery = queryBuilder.build();<NEW_LINE>BooleanQuery.Builder bq = new BooleanQuery.Builder();<NEW_LINE>bq.add(<MASK><NEW_LINE>bq.add(new TermQuery(new Term(ANYTOKEN_FIELD, ANYTOKEN)), BooleanClause.Occur.SHOULD);<NEW_LINE>presearcherQuery = bq.build();<NEW_LINE>if (filterFields.isEmpty() == false) {<NEW_LINE>bq = new BooleanQuery.Builder();<NEW_LINE>bq.add(presearcherQuery, BooleanClause.Occur.MUST);<NEW_LINE>Query filterQuery = buildFilterFields(reader);<NEW_LINE>if (filterQuery != null) {<NEW_LINE>bq.add(filterQuery, BooleanClause.Occur.FILTER);<NEW_LINE>presearcherQuery = bq.build();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return presearcherQuery;<NEW_LINE>} catch (IOException e) {<NEW_LINE>// We're a MemoryIndex, so this shouldn't happen...<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
presearcherQuery, BooleanClause.Occur.SHOULD);
1,688,647
private void connectToApiRegions(Region region, EnumSet<ApiType> apiTypeVisibility, RegionDigraph copy) throws BundleException {<NEW_LINE><MASK><NEW_LINE>// We want to import ALL from the api regions<NEW_LINE>allBuilder.allowAll(RegionFilter.VISIBLE_ALL_NAMESPACE);<NEW_LINE>boolean connectToInternal = false;<NEW_LINE>for (ApiType apiType : apiTypeVisibility) {<NEW_LINE>ApiRegion apiRegionType = ApiRegion.valueFromApiType(apiType.toString());<NEW_LINE>connectToInternal |= apiRegionType.delegateInternal();<NEW_LINE>Region apiRegion = copy.getRegion(apiRegionType.getRegionName());<NEW_LINE>region.connectRegion(apiRegion, allBuilder.build());<NEW_LINE>}<NEW_LINE>if (connectToInternal) {<NEW_LINE>// connect to the internal region if one of the base api types says to<NEW_LINE>region.connectRegion(copy.getRegion(ApiRegion.INTERNAL.getRegionName()), allBuilder.build());<NEW_LINE>}<NEW_LINE>}
RegionFilterBuilder allBuilder = copy.createRegionFilterBuilder();
70,523
@SaCheckLogin<NEW_LINE>public Object child(@Param("pid") String pid, @Param("wxid") String wxid, HttpServletRequest req) {<NEW_LINE>List<Wx_menu> list = new ArrayList<>();<NEW_LINE>List<NutMap> treeList = new ArrayList<>();<NEW_LINE>Cnd cnd = Cnd.NEW();<NEW_LINE>if (Strings.isBlank(pid)) {<NEW_LINE>cnd.and(Cnd.exps("parentId", "=", "").or("parentId", "is", null));<NEW_LINE>} else {<NEW_LINE>cnd.and("parentId", "=", pid);<NEW_LINE>}<NEW_LINE>cnd.and("wxid", "=", wxid);<NEW_LINE>cnd.asc<MASK><NEW_LINE>list = wxMenuService.query(cnd);<NEW_LINE>for (Wx_menu menu : list) {<NEW_LINE>if (wxMenuService.count(Cnd.where("parentId", "=", menu.getId())) > 0) {<NEW_LINE>menu.setHasChildren(true);<NEW_LINE>}<NEW_LINE>NutMap map = Lang.obj2nutmap(menu);<NEW_LINE>map.addv("expanded", false);<NEW_LINE>map.addv("children", new ArrayList<>());<NEW_LINE>treeList.add(map);<NEW_LINE>}<NEW_LINE>return Result.success().addData(treeList);<NEW_LINE>}
("location").asc("path");
54,340
public static BufferedImage depalettiseImage(BufferedImage src) {<NEW_LINE>BufferedImage result = null;<NEW_LINE>if (BufferedImage.TYPE_BYTE_INDEXED == src.getType() || BufferedImage.TYPE_BYTE_BINARY == src.getType() || src.getColorModel().getNumColorComponents() < 3 || src.getColorModel().getComponentSize(0) > 8) {<NEW_LINE>int width = src.getWidth();<NEW_LINE><MASK><NEW_LINE>Color clear = new Color(255, 255, 255, 0);<NEW_LINE>result = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);<NEW_LINE>Graphics2D graphics = result.createGraphics();<NEW_LINE>graphics.setBackground(clear);<NEW_LINE>graphics.clearRect(0, 0, width, height);<NEW_LINE>graphics.drawImage(src, 0, 0, null);<NEW_LINE>graphics.dispose();<NEW_LINE>} else {<NEW_LINE>result = src;<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
int height = src.getHeight();