idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,779,699 | public static ErrorDescription apply(HintContext hc) {<NEW_LINE>if (hc.isCanceled()) {<NEW_LINE>// NOI18N<NEW_LINE>// we pass only if it is an annotation<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final JPAProblemContext ctx = ModelUtils.getOrCreateCachedContext(hc);<NEW_LINE>if (ctx == null || hc.isCanceled()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>AnnotationMirror isENtityMapped = getFirstAnnotationFromGivenSet(subject, Arrays.asList(JPAAnnotations.ENTITY, JPAAnnotations.MAPPED_SUPERCLASS));<NEW_LINE>if (isENtityMapped != null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>AnnotationMirror firstOffendingAnotation = getFirstAnnotationFromGivenSet(subject, Arrays.asList(JPAAnnotations.NAMED_QUERY, JPAAnnotations.NAMED_NATIVE_QUERY, JPAAnnotations.NAMED_QUERIES, JPAAnnotations.NAMED_NATIVE_QUERIES));<NEW_LINE>if (firstOffendingAnotation != null) {<NEW_LINE>TreePath par = hc.getPath();<NEW_LINE>while (par != null && par.getParentPath() != null && par.getLeaf().getKind() != Tree.Kind.CLASS) {<NEW_LINE>par = par.getParentPath();<NEW_LINE>}<NEW_LINE>Utilities.TextSpan underlineSpan = Utilities.getUnderlineSpan(ctx.getCompilationInfo(), par.getLeaf());<NEW_LINE>return ErrorDescriptionFactory.forSpan(hc, underlineSpan.getStartOffset(), underlineSpan.getEndOffset(), NbBundle.getMessage(QueriesProperlyDefined.class, "MSG_QueriesProperlyDefined"));<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>} | TypeElement subject = ctx.getJavaClass(); |
903,846 | public static ListFirewallRulesResponse unmarshall(ListFirewallRulesResponse listFirewallRulesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listFirewallRulesResponse.setRequestId<MASK><NEW_LINE>listFirewallRulesResponse.setPageNumber(_ctx.integerValue("ListFirewallRulesResponse.PageNumber"));<NEW_LINE>listFirewallRulesResponse.setPageSize(_ctx.integerValue("ListFirewallRulesResponse.PageSize"));<NEW_LINE>listFirewallRulesResponse.setTotalCount(_ctx.integerValue("ListFirewallRulesResponse.TotalCount"));<NEW_LINE>List<FirewallRule> firewallRules = new ArrayList<FirewallRule>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListFirewallRulesResponse.FirewallRules.Length"); i++) {<NEW_LINE>FirewallRule firewallRule = new FirewallRule();<NEW_LINE>firewallRule.setRuleId(_ctx.stringValue("ListFirewallRulesResponse.FirewallRules[" + i + "].RuleId"));<NEW_LINE>firewallRule.setRuleProtocol(_ctx.stringValue("ListFirewallRulesResponse.FirewallRules[" + i + "].RuleProtocol"));<NEW_LINE>firewallRule.setPort(_ctx.stringValue("ListFirewallRulesResponse.FirewallRules[" + i + "].Port"));<NEW_LINE>firewallRules.add(firewallRule);<NEW_LINE>}<NEW_LINE>listFirewallRulesResponse.setFirewallRules(firewallRules);<NEW_LINE>return listFirewallRulesResponse;<NEW_LINE>} | (_ctx.stringValue("ListFirewallRulesResponse.RequestId")); |
206,622 | public void sendTaskCompletedMail(SingularityTaskHistory taskHistory, SingularityRequest request) {<NEW_LINE>final Optional<SingularityTaskHistoryUpdate> lastUpdate = taskHistory.getLastTaskUpdate();<NEW_LINE>if (!lastUpdate.isPresent()) {<NEW_LINE>LOG.warn("Can't send task completed mail for task {} - no last update", taskHistory.<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Optional<SingularityEmailType> emailType = getEmailType(lastUpdate.get().getTaskState(), request, taskHistory.getTaskUpdates());<NEW_LINE>if (!emailType.isPresent()) {<NEW_LINE>LOG.debug("No configured emailType for {} and {}", request, lastUpdate.get().getTaskState());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>prepareTaskMail(Optional.of(taskHistory.getTask()), taskHistory.getTask().getTaskId(), request, emailType.get(), Collections.<String, Object>emptyMap(), taskHistory.getTaskUpdates(), lastUpdate.get().getTaskState(), taskHistory.getTaskMetadata());<NEW_LINE>} | getTask().getTaskId()); |
870,471 | protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) throws IOException {<NEW_LINE>QueryBuilder queryBuilder = <MASK><NEW_LINE>if (queryBuilder instanceof MatchNoneQueryBuilder) {<NEW_LINE>return queryBuilder;<NEW_LINE>}<NEW_LINE>FilterFunctionBuilder[] rewrittenBuilders = new FilterFunctionBuilder[this.filterFunctionBuilders.length];<NEW_LINE>boolean rewritten = false;<NEW_LINE>for (int i = 0; i < rewrittenBuilders.length; i++) {<NEW_LINE>FilterFunctionBuilder rewrite = filterFunctionBuilders[i].rewrite(queryRewriteContext);<NEW_LINE>rewritten |= rewrite != filterFunctionBuilders[i];<NEW_LINE>rewrittenBuilders[i] = rewrite;<NEW_LINE>}<NEW_LINE>if (queryBuilder != query || rewritten) {<NEW_LINE>FunctionScoreQueryBuilder newQueryBuilder = new FunctionScoreQueryBuilder(queryBuilder, rewrittenBuilders);<NEW_LINE>newQueryBuilder.scoreMode = scoreMode;<NEW_LINE>newQueryBuilder.minScore = minScore;<NEW_LINE>newQueryBuilder.maxBoost = maxBoost;<NEW_LINE>newQueryBuilder.boostMode = boostMode;<NEW_LINE>return newQueryBuilder;<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>} | this.query.rewrite(queryRewriteContext); |
1,116,684 | public boolean cancelOrder(CancelOrderParams orderParams) throws IOException {<NEW_LINE>OkCoinFuturesCancelOrderParams myParams = (OkCoinFuturesCancelOrderParams) orderParams;<NEW_LINE>CurrencyPair currencyPair = myParams.getCurrencyPair();<NEW_LINE>FuturesContract reqFuturesContract = myParams.futuresContract;<NEW_LINE>long orderId = myParams.getOrderId() != null ? Long.valueOf(myParams.getOrderId()) : -1;<NEW_LINE>boolean ret = false;<NEW_LINE>try {<NEW_LINE>OkCoinTradeResult cancelResult = futuresCancelOrder(orderId, OkCoinAdapters<MASK><NEW_LINE>if (orderId == cancelResult.getOrderId()) {<NEW_LINE>ret = true;<NEW_LINE>}<NEW_LINE>} catch (ExchangeException e) {<NEW_LINE>if (e.getMessage().equals(OkCoinUtils.getErrorMessage(1009)) || e.getMessage().equals(OkCoinUtils.getErrorMessage(20015))) {<NEW_LINE>// order not found.<NEW_LINE>} else<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>} | .adaptSymbol(currencyPair), reqFuturesContract); |
1,583,097 | private void refillDocs() throws IOException {<NEW_LINE>final int left = docFreq - blockUpto;<NEW_LINE>assert left >= 0;<NEW_LINE>if (left >= BLOCK_SIZE) {<NEW_LINE>forDeltaUtil.<MASK><NEW_LINE>pforUtil.decode(docIn, freqBuffer);<NEW_LINE>blockUpto += BLOCK_SIZE;<NEW_LINE>} else if (docFreq == 1) {<NEW_LINE>docBuffer[0] = singletonDocID;<NEW_LINE>freqBuffer[0] = totalTermFreq;<NEW_LINE>docBuffer[1] = NO_MORE_DOCS;<NEW_LINE>blockUpto++;<NEW_LINE>} else {<NEW_LINE>readVIntBlock(docIn, docBuffer, freqBuffer, left, true);<NEW_LINE>prefixSum(docBuffer, left, accum);<NEW_LINE>docBuffer[left] = NO_MORE_DOCS;<NEW_LINE>blockUpto += left;<NEW_LINE>}<NEW_LINE>accum = docBuffer[BLOCK_SIZE - 1];<NEW_LINE>docBufferUpto = 0;<NEW_LINE>assert docBuffer[BLOCK_SIZE] == NO_MORE_DOCS;<NEW_LINE>} | decodeAndPrefixSum(docIn, accum, docBuffer); |
1,452,325 | public ColumnDefinition unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ColumnDefinition columnDefinition = new ColumnDefinition();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("dataType", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>columnDefinition.setDataType(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("columnName", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>columnDefinition.setColumnName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("columnDescription", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>columnDefinition.setColumnDescription(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 columnDefinition;<NEW_LINE>} | String currentParentElement = context.getCurrentParentElement(); |
545,438 | public void exportWordlist(final OutputStream outputStream, final Appendable debugOutput) throws PwmOperationalException, IOException {<NEW_LINE>Objects.requireNonNull(outputStream);<NEW_LINE>final long totalLines = localDB.size(LocalDB.DB.WORDLIST_WORDS);<NEW_LINE>final LongAdder exportLineCounter = new LongAdder();<NEW_LINE>writeStringToOut(debugOutput, "Wordlist ZIP export beginning of " + StringUtil.formatDiskSize(totalLines) + " records");<NEW_LINE>final Instant startTime = Instant.now();<NEW_LINE>final EventRateMeter eventRateMeter = new EventRateMeter(TimeDuration.MINUTE);<NEW_LINE>final ConditionalTaskExecutor debugOutputter = ConditionalTaskExecutor.forPeriodicTask(() -> outputExportDebugStats(totalLines, exportLineCounter.sum(), eventRateMeter, startTime, debugOutput), TimeDuration.MINUTE.asDuration());<NEW_LINE>try (ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream, PwmConstants.DEFAULT_CHARSET)) {<NEW_LINE>zipOutputStream.putNextEntry(new ZipEntry("wordlist.txt"));<NEW_LINE>try (LocalDB.LocalDBIterator<Map.Entry<String, String>> localDBIterator = localDB.iterator(LocalDB.DB.WORDLIST_WORDS)) {<NEW_LINE>while (localDBIterator.hasNext()) {<NEW_LINE>final Map.Entry<String, String<MASK><NEW_LINE>final String key = entry.getKey();<NEW_LINE>zipOutputStream.write(key.getBytes(PwmConstants.DEFAULT_CHARSET));<NEW_LINE>zipOutputStream.write('\n');<NEW_LINE>exportLineCounter.increment();<NEW_LINE>eventRateMeter.markEvents(1);<NEW_LINE>debugOutputter.conditionallyExecuteTask();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (final IOException e) {<NEW_LINE>writeStringToOut(debugOutput, "IO error during localDB export: " + e.getMessage());<NEW_LINE>}<NEW_LINE>writeStringToOut(debugOutput, "export complete, exported " + exportLineCounter + " records in " + PwmTimeUtil.asLongString(TimeDuration.fromCurrent(startTime)));<NEW_LINE>} | > entry = localDBIterator.next(); |
1,684,180 | public void delete(L2NetworkInventory l2Network, String hostUuid, Completion completion) {<NEW_LINE>L2VxlanNetworkInventory l2vxlan = (L2VxlanNetworkInventory) l2Network;<NEW_LINE>final VxlanKvmAgentCommands.DeleteVxlanBridgeCmd <MASK><NEW_LINE>cmd.setBridgeName(makeBridgeName(l2vxlan.getVni()));<NEW_LINE>cmd.setVni(l2vxlan.getVni());<NEW_LINE>cmd.setL2NetworkUuid(l2Network.getUuid());<NEW_LINE>final List<String> vtepIps = Q.New(VtepVO.class).select(VtepVO_.vtepIp).eq(VtepVO_.hostUuid, hostUuid).eq(VtepVO_.poolUuid, l2vxlan.getPoolUuid()).listValues();<NEW_LINE>String vtepIp = vtepIps.get(0);<NEW_LINE>cmd.setVtepIp(vtepIp);<NEW_LINE>KVMHostAsyncHttpCallMsg msg = new KVMHostAsyncHttpCallMsg();<NEW_LINE>msg.setHostUuid(hostUuid);<NEW_LINE>msg.setCommand(cmd);<NEW_LINE>msg.setPath(VXLAN_KVM_DELETE_L2VXLAN_NETWORK_PATH);<NEW_LINE>bus.makeTargetServiceIdByResourceUuid(msg, HostConstant.SERVICE_ID, hostUuid);<NEW_LINE>bus.send(msg, new CloudBusCallBack(completion) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(MessageReply reply) {<NEW_LINE>if (!reply.isSuccess()) {<NEW_LINE>completion.fail(reply.getError());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>KVMHostAsyncHttpCallReply hreply = reply.castReply();<NEW_LINE>VxlanKvmAgentCommands.DeleteVxlanBridgeResponse rsp = hreply.toResponse(VxlanKvmAgentCommands.DeleteVxlanBridgeResponse.class);<NEW_LINE>if (!rsp.isSuccess()) {<NEW_LINE>ErrorCode err = operr("failed to delete bridge[%s] for l2Network[uuid:%s, type:%s, vni:%s] on kvm host[uuid:%s], because %s", cmd.getBridgeName(), l2Network.getUuid(), l2Network.getType(), l2vxlan.getVni(), hostUuid, rsp.getError());<NEW_LINE>completion.fail(err);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String message = String.format("successfully delete bridge[%s] for l2Network[uuid:%s, type:%s, vni:%s] on kvm host[uuid:%s]", cmd.getBridgeName(), l2Network.getUuid(), l2Network.getType(), l2vxlan.getVni(), hostUuid);<NEW_LINE>logger.debug(message);<NEW_LINE>completion.success();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} | cmd = new VxlanKvmAgentCommands.DeleteVxlanBridgeCmd(); |
1,515,212 | private ImmutableListMultimap<TableRecordReference, I_C_Location> extractLocationRecords(@NonNull final ImmutableListMultimap<TableRecordReference, LocationId> locationIds) {<NEW_LINE>final ImmutableListMultimap.Builder<TableRecordReference, I_C_Location> recordRef2LocationRecords = ImmutableListMultimap.builder();<NEW_LINE>if (locationIds.isEmpty()) {<NEW_LINE>// don't bother the database<NEW_LINE>return recordRef2LocationRecords.build();<NEW_LINE>}<NEW_LINE>final ImmutableList<LocationId> allLocationIds = locationIds.entries().stream().map(Entry::getValue).collect(ImmutableList.toImmutableList());<NEW_LINE>final List<I_C_Location> locationRecords = // .addOnlyActiveRecordsFilter() we also deal with records' "inactive" flag, at least in the REST-API; therefore we here also need to load inactive C_Locations<NEW_LINE>Services.get(IQueryBL.class).createQueryBuilder(I_C_Location.class).addInArrayFilter(I_C_Location.COLUMN_C_Location_ID, allLocationIds)<MASK><NEW_LINE>final ImmutableMap<Integer, I_C_Location> repoId2LocationRecord = Maps.uniqueIndex(locationRecords, I_C_Location::getC_Location_ID);<NEW_LINE>for (final Entry<TableRecordReference, LocationId> recordRefAndLocationId : locationIds.entries()) {<NEW_LINE>final I_C_Location locationRecord = repoId2LocationRecord.get(recordRefAndLocationId.getValue().getRepoId());<NEW_LINE>recordRef2LocationRecords.put(recordRefAndLocationId.getKey(), locationRecord);<NEW_LINE>}<NEW_LINE>return recordRef2LocationRecords.build();<NEW_LINE>} | .create().list(); |
1,628,273 | private void loadTagValues(final String tagGroup, final List<String> tagNameList) {<NEW_LINE>final List<TagData> dataList = new ArrayList<TagData>();<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>try {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>param.put("objType", objType);<NEW_LINE>param.put("tagGroup", tagGroup);<NEW_LINE>ListValue tagNameLv = param.newList("tagName");<NEW_LINE>for (String tagName : tagNameList) {<NEW_LINE>tagNameLv.add(tagName);<NEW_LINE>}<NEW_LINE>param.put("date", date);<NEW_LINE>tcp.process(RequestCmd.TAGCNT_TAG_VALUES, param, new INetReader() {<NEW_LINE><NEW_LINE>public void process(DataInputX in) throws IOException {<NEW_LINE>TagData data = new TagData();<NEW_LINE>dataList.add(data);<NEW_LINE>data.tagName = in.readText();<NEW_LINE>data.totalSize = in.readInt();<NEW_LINE>data.totalCnt = in.readFloat();<NEW_LINE>int size = in.readInt();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE><MASK><NEW_LINE>float cnt = in.readFloat();<NEW_LINE>data.addValue(v, cnt);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} finally {<NEW_LINE>TcpProxy.putTcpProxy(tcp);<NEW_LINE>}<NEW_LINE>for (TagData data : dataList) {<NEW_LINE>data.strValueList = TagCountUtil.loadTagString(serverId, date, data.valueList, data.tagName);<NEW_LINE>String tagName = data.tagName;<NEW_LINE>TagCount parentTag = nameTree.get(tagName);<NEW_LINE>if (parentTag == null)<NEW_LINE>return;<NEW_LINE>for (int i = 0; i < data.strValueList.size(); i++) {<NEW_LINE>TagCount child = new TagCount();<NEW_LINE>child.tagName = parentTag.value;<NEW_LINE>child.value = data.strValueList.get(i);<NEW_LINE>child.count = data.cntList.get(i);<NEW_LINE>parentTag.addChild(child);<NEW_LINE>}<NEW_LINE>parentTag.count = data.totalCnt;<NEW_LINE>parentTag.value += " (" + data.totalSize + ")";<NEW_LINE>}<NEW_LINE>} | Value v = in.readValue(); |
1,464,617 | private byte[] copyOneTransactionInternal(RangeRequest range, long rangeId, Transaction readT, Transaction writeT) {<NEW_LINE>final long maxBytes = TransactionConstants.WARN_LEVEL_FOR_QUEUED_BYTES / 2;<NEW_LINE>byte[] start = getCheckpoint(rangeId, writeT);<NEW_LINE>if (start == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>RangeRequest.Builder builder = range.getBuilder().startRowInclusive(start);<NEW_LINE>if (builder.isInvalidRange()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>RangeRequest rangeToUse = builder.build();<NEW_LINE>if (log.isTraceEnabled()) {<NEW_LINE>log.trace("Copying table {} range {} from {} to {}", LoggingArgs.tableRef("srcTable", srcTable), SafeArg.of("rangeId", rangeId), UnsafeArg.of("rangeStartInclusive", BaseEncoding.base16().lowerCase().encode(rangeToUse.getStartInclusive())), UnsafeArg.of("rangeStartExclusive", BaseEncoding.base16().lowerCase().encode(rangeToUse.getEndExclusive())));<NEW_LINE>}<NEW_LINE>BatchingVisitable<RowResult<byte[]>> bv = readT.getRange(srcTable, rangeToUse);<NEW_LINE>Map<Cell, byte[]> <MASK><NEW_LINE>byte[] lastRow = internalCopyRange(bv, maxBytes, writeMap);<NEW_LINE>if (log.isTraceEnabled() && (lastRow != null)) {<NEW_LINE>log.trace("Copying {} bytes for range {} on table {}", SafeArg.of("lengths", lastRow.length), SafeArg.of("rangeId", rangeId), LoggingArgs.tableRef("srcTable", srcTable));<NEW_LINE>}<NEW_LINE>writeToKvs(writeMap);<NEW_LINE>byte[] nextRow = getNextRowName(lastRow);<NEW_LINE>checkpointer.checkpoint(srcTable.getQualifiedName(), rangeId, nextRow, writeT);<NEW_LINE>return lastRow;<NEW_LINE>} | writeMap = new HashMap<>(); |
1,114,106 | public StatCounter merge(StatCounter o) {<NEW_LINE>if (o == null || o.count == 0) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>if (o == this) {<NEW_LINE>return merge(o.clone());<NEW_LINE>}<NEW_LINE>if (this.count == 0) {<NEW_LINE>count = o.count;<NEW_LINE>runningMean = o.runningMean;<NEW_LINE>runningMean = o.runningM2;<NEW_LINE>max = o.max;<NEW_LINE>min = o.min;<NEW_LINE>} else {<NEW_LINE>min = Math.min(min, o.min);<NEW_LINE>max = Math.max(max, o.max);<NEW_LINE><MASK><NEW_LINE>if (o.count * 10 < count) {<NEW_LINE>runningMean = runningMean + (d * o.count) / (count + o.count);<NEW_LINE>} else if (count * 10 < o.count) {<NEW_LINE>runningMean = o.runningMean - (d * count) / (count + o.count);<NEW_LINE>} else {<NEW_LINE>runningMean = (runningMean * count + o.runningMean * o.count) / (count + o.count);<NEW_LINE>}<NEW_LINE>runningM2 += o.runningM2 + (d * d * count * o.count) / (count + o.count);<NEW_LINE>count += o.count;<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>} | double d = o.runningMean - runningMean; |
1,407,804 | private void init(SystemInfo si) {<NEW_LINE>setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));<NEW_LINE>setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));<NEW_LINE><MASK><NEW_LINE>paramsLabel.setAlignmentX(Component.CENTER_ALIGNMENT);<NEW_LINE>add(paramsLabel);<NEW_LINE>JTextArea paramsArea = new JTextArea(0, 0);<NEW_LINE>paramsArea.setText(buildParamsText(si.getOperatingSystem()));<NEW_LINE>add(paramsArea);<NEW_LINE>JLabel interfaceLabel = new JLabel(INTERFACES);<NEW_LINE>interfaceLabel.setAlignmentX(Component.CENTER_ALIGNMENT);<NEW_LINE>add(interfaceLabel);<NEW_LINE>List<NetworkIF> networkIfList = si.getHardware().getNetworkIFs(true);<NEW_LINE>TableModel model = new DefaultTableModel(parseInterfaces(networkIfList), COLUMNS);<NEW_LINE>JTable intfTable = new JTable(model);<NEW_LINE>JScrollPane scrollV = new JScrollPane(intfTable);<NEW_LINE>scrollV.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);<NEW_LINE>resizeColumns(intfTable.getColumnModel());<NEW_LINE>add(scrollV);<NEW_LINE>} | JLabel paramsLabel = new JLabel(PARAMS); |
912,426 | public void run() {<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>MapPack p = null;<NEW_LINE>try {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>param.put("objHash", objHash);<NEW_LINE>param.put("resource", resource);<NEW_LINE>p = (MapPack) tcp.getSingle(RequestCmd.OBJECT_CHECK_RESOURCE_FILE, param);<NEW_LINE>} catch (Exception e) {<NEW_LINE>ConsoleProxy.errorSafe(e.getMessage());<NEW_LINE>} finally {<NEW_LINE>TcpProxy.putTcpProxy(tcp);<NEW_LINE>}<NEW_LINE>if (p != null) {<NEW_LINE>String error = p.getText("error");<NEW_LINE>if (StringUtil.isNotEmpty(error)) {<NEW_LINE>ConsoleProxy.errorSafe(error);<NEW_LINE>} else {<NEW_LINE>final String <MASK><NEW_LINE>final long size = p.getLong("size");<NEW_LINE>ExUtil.exec(tableViewer.getTable(), new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>if (MessageDialog.openQuestion(tableViewer.getTable().getShell(), data.name, name + "(" + ScouterUtil.humanReadableByteCount(size, true) + ") will be downloaded.\nContinue?")) {<NEW_LINE>Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();<NEW_LINE>FileDialog dialog = new FileDialog(shell, SWT.SAVE);<NEW_LINE>dialog.setOverwrite(true);<NEW_LINE>dialog.setFileName(name);<NEW_LINE>dialog.setFilterExtensions(new String[] { "*.jar", "*.*" });<NEW_LINE>dialog.setFilterNames(new String[] { "Jar File(*.jar)", "All Files" });<NEW_LINE>String fileSelected = dialog.open();<NEW_LINE>if (fileSelected != null) {<NEW_LINE>new DownloadJarFileJob(name, resource, fileSelected).schedule();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | name = p.getText("name"); |
216,207 | public void writeMetrics(Settings settings, SourceMetric metric) throws Exception {<NEW_LINE>long totalrows = metric.getTotalRows().count();<NEW_LINE>long elapsed = metric.elapsed() / 1000000;<NEW_LINE>long bytes = metric.getTotalSizeInBytes().count();<NEW_LINE>double dps = totalrows * 1000.0 / elapsed;<NEW_LINE>// avoid div by zero<NEW_LINE>double avg = bytes / (totalrows + 1);<NEW_LINE>double mbps = (<MASK><NEW_LINE>if (settings.getAsBoolean("metrics.logger.json", false)) {<NEW_LINE>XContentBuilder builder = jsonBuilder();<NEW_LINE>builder.startObject().field("totalrows", totalrows).field("elapsed", elapsed).field("bytes", bytes).field("avg", avg).field("dps", dps).field("mbps", mbps).endObject();<NEW_LINE>jsonsourcelogger.info(builder.string());<NEW_LINE>}<NEW_LINE>if (settings.getAsBoolean("metrics.logger.plain", true)) {<NEW_LINE>plainsourcelogger.info("totalrows = {}, {} = {} ms, {} = {} bytes, {} = {} avg size, {} dps, {} MB/s", totalrows, FormatUtil.formatDurationWords(elapsed, true, true), elapsed, bytes, FormatUtil.convertFileSize(bytes), FormatUtil.convertFileSize(avg), formatter.format(avg), formatter.format(dps), formatter.format(mbps));<NEW_LINE>}<NEW_LINE>} | bytes * 1024.0 / elapsed) / 1048576.0; |
1,583,376 | public EObject info(EAtom spec) {<NEW_LINE>FunID id = get_id();<NEW_LINE>if (spec == ERT.am_arity) {<NEW_LINE>return new ETuple2(spec, ERT.box(id.arity - get_env<MASK><NEW_LINE>} else if (spec == ERT.am_module) {<NEW_LINE>return new ETuple2(spec, id.module);<NEW_LINE>} else if (spec == ERT.am_name) {<NEW_LINE>return new ETuple2(spec, id.function);<NEW_LINE>} else if (spec == ERT.am_env) {<NEW_LINE>return new ETuple2(spec, this.get_env());<NEW_LINE>} else if (spec == ERT.am_type) {<NEW_LINE>return new ETuple2(ERT.am_type, (id instanceof LocalFunID) ? ERT.am_local : ERT.am_external);<NEW_LINE>}<NEW_LINE>if (id instanceof LocalFunID) {<NEW_LINE>LocalFunID lid = (LocalFunID) id;<NEW_LINE>if (spec == ERT.am_index) {<NEW_LINE>return new ETuple2(spec, ERT.box(lid.index));<NEW_LINE>} else if (spec == ERT.am_new_index) {<NEW_LINE>return new ETuple2(spec, ERT.box(lid.new_index));<NEW_LINE>} else if (spec == ERT.am_uniq) {<NEW_LINE>return new ETuple2(spec, ERT.box(lid.uniq));<NEW_LINE>} else if (spec == ERT.am_new_uniq) {<NEW_LINE>return new ETuple2(spec, lid.new_uniq);<NEW_LINE>} else if (spec == ERT.am_pid) {<NEW_LINE>return new ETuple2(spec, this.get_pid());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (spec == ERT.am_type) {<NEW_LINE>return new ETuple2(ERT.am_type, ERT.am_external);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ERT.am_undefined;<NEW_LINE>} | ().length())); |
1,055,911 | static BoundedCostBackupRequestsStrategy tryCreateBoundedCost(Map<String, Object> properties) {<NEW_LINE>int cost = mapGet(properties, PropertyKeys.COST);<NEW_LINE>int historyLength = properties.containsKey(PropertyKeys.HISTORY_LENGTH) ? mapGet(properties, PropertyKeys.HISTORY_LENGTH) : BCBR.getHistoryLength();<NEW_LINE>int requiredHistoryLength = properties.containsKey(PropertyKeys.REQUIRED_HISTORY_LENGTH) ? mapGet(properties, PropertyKeys.REQUIRED_HISTORY_LENGTH) : BCBR.getRequiredHistoryLength();<NEW_LINE>int maxBurst = properties.containsKey(PropertyKeys.MAX_BURST) ? mapGet(properties, PropertyKeys.MAX_BURST) : BCBR.getMaxBurst();<NEW_LINE>int minBackupDelayMs = properties.containsKey(PropertyKeys.MIN_BACKUP_DELAY_MS) ? mapGet(properties, PropertyKeys.MIN_BACKUP_DELAY_MS) : BCBR.getMinBackupDelayMs();<NEW_LINE>return new BoundedCostBackupRequestsStrategy(cost, <MASK><NEW_LINE>} | maxBurst, historyLength, requiredHistoryLength, minBackupDelayMs); |
28,456 | public static OpenSearchStatusException errorFromXContent(XContentParser parser) throws IOException {<NEW_LINE>XContentParser.Token token = parser.nextToken();<NEW_LINE>ensureExpectedToken(XContentParser.Token.START_OBJECT, token, parser);<NEW_LINE>OpenSearchException exception = null;<NEW_LINE>RestStatus status = null;<NEW_LINE>String currentFieldName = null;<NEW_LINE>while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {<NEW_LINE>if (token == XContentParser.Token.FIELD_NAME) {<NEW_LINE>currentFieldName = parser.currentName();<NEW_LINE>}<NEW_LINE>if (STATUS.equals(currentFieldName)) {<NEW_LINE>if (token != XContentParser.Token.FIELD_NAME) {<NEW_LINE>ensureExpectedToken(XContentParser.Token.VALUE_NUMBER, token, parser);<NEW_LINE>status = RestStatus.fromCode(parser.intValue());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (exception == null) {<NEW_LINE>throw new IllegalStateException("Failed to parse opensearch status exception: no exception was found");<NEW_LINE>}<NEW_LINE>OpenSearchStatusException result = new OpenSearchStatusException(exception.getMessage(), status, exception.getCause());<NEW_LINE>for (String header : exception.getHeaderKeys()) {<NEW_LINE>result.addHeader(header, exception.getHeader(header));<NEW_LINE>}<NEW_LINE>for (String metadata : exception.getMetadataKeys()) {<NEW_LINE>result.addMetadata(metadata, exception.getMetadata(metadata));<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>} | exception = OpenSearchException.failureFromXContent(parser); |
1,500,292 | protected static void dispatchNodeData(Node node, org.xml.sax.ContentHandler ch, int depth) throws org.xml.sax.SAXException {<NEW_LINE>switch(node.getNodeType()) {<NEW_LINE>case Node.DOCUMENT_FRAGMENT_NODE:<NEW_LINE>case Node.DOCUMENT_NODE:<NEW_LINE>case Node.ELEMENT_NODE:<NEW_LINE>{<NEW_LINE>for (Node child = node.getFirstChild(); null != child; child = child.getNextSibling()) {<NEW_LINE>dispatchNodeData(child, ch, depth + 1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>// %REVIEW%<NEW_LINE>case Node.PROCESSING_INSTRUCTION_NODE:<NEW_LINE>case Node.COMMENT_NODE:<NEW_LINE>if (0 != depth)<NEW_LINE>break;<NEW_LINE>// NOTE: Because this operation works in the DOM space, it does _not_ attempt<NEW_LINE>// to perform Text Coalition. That should only be done in DTM space.<NEW_LINE>case Node.TEXT_NODE:<NEW_LINE>case Node.CDATA_SECTION_NODE:<NEW_LINE>case Node.ATTRIBUTE_NODE:<NEW_LINE><MASK><NEW_LINE>if (ch instanceof CharacterNodeHandler) {<NEW_LINE>((CharacterNodeHandler) ch).characters(node);<NEW_LINE>} else {<NEW_LINE>ch.characters(str.toCharArray(), 0, str.length());<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>// /* case Node.PROCESSING_INSTRUCTION_NODE :<NEW_LINE>// // warning(XPATHErrorResources.WG_PARSING_AND_PREPARING);<NEW_LINE>// break; */<NEW_LINE>default:<NEW_LINE>// ignore<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>} | String str = node.getNodeValue(); |
270,425 | public void beforeBulk(long executionId, BulkRequest request) {<NEW_LINE>checkBulkProcessorAvailability();<NEW_LINE>logger.trace("beforeBulk - new bulk [{}] of items [{}]", executionId, request.numberOfActions());<NEW_LINE>if (flushBulkProcessor.get()) {<NEW_LINE>logger.trace("About to flush bulk request index[{}] - type[{}]", index, type);<NEW_LINE>int dropDollectionIndex = <MASK><NEW_LINE>request.requests().subList(0, dropDollectionIndex + 1).clear();<NEW_LINE>try {<NEW_LINE>dropRecreateMapping();<NEW_LINE>deletedDocuments.set(0);<NEW_LINE>updatedDocuments.set(0);<NEW_LINE>insertedDocuments.set(0);<NEW_LINE>flushBulkProcessor.set(false);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>logger.error("Drop collection operation failed", t);<NEW_LINE>MongoDBRiverHelper.setRiverStatus(client, definition.getRiverName(), Status.IMPORT_FAILED);<NEW_LINE>request.requests().clear();<NEW_LINE>bulkProcessor.close();<NEW_LINE>river.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | findLastDropCollection(request.requests()); |
1,714,698 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String jsonSchemas = "@public @buseventtype create json schema S0_JSON(id String, p00 int);\n" + "@public @buseventtype create json schema S1_JSON(id String, p00 int);\n" + "@public @buseventtype @JsonSchema(className='" + MyLocalJsonProvidedS0.class.getName() + "') create json schema S0_JSONCLASSPROVIDED();\n" + "@public @buseventtype @JsonSchema(className='" + MyLocalJsonProvidedS1<MASK><NEW_LINE>env.compileDeploy(jsonSchemas, path);<NEW_LINE>AtomicInteger milestone = new AtomicInteger();<NEW_LINE>for (EventRepresentationChoice rep : EventRepresentationChoice.values()) {<NEW_LINE>String s0Type = "S0_" + rep.getName();<NEW_LINE>String s1Type = "S1_" + rep.getName();<NEW_LINE>String eplOne = "select S0.id as s0id, S1.id as s1id, S0.p00 as s0p00, S1.p00 as s1p00 from " + s0Type + "#keepall as S0, " + s1Type + "#keepall as S1 where S0.id = S1.id";<NEW_LINE>tryJoinAssertion(env, eplOne, rep, "s0id,s1id,s0p00,s1p00", milestone, path, MyLocalJsonProvidedWFields.class);<NEW_LINE>}<NEW_LINE>for (EventRepresentationChoice rep : EventRepresentationChoice.values()) {<NEW_LINE>String s0Type = "S0_" + rep.getName();<NEW_LINE>String s1Type = "S1_" + rep.getName();<NEW_LINE>String eplTwo = "select * from " + s0Type + "#keepall as s0, " + s1Type + "#keepall as s1 where s0.id = s1.id";<NEW_LINE>tryJoinAssertion(env, eplTwo, rep, "s0.id,s1.id,s0.p00,s1.p00", milestone, path, MyLocalJsonProvidedWildcard.class);<NEW_LINE>}<NEW_LINE>env.undeployAll();<NEW_LINE>} | .class.getName() + "') create json schema S1_JSONCLASSPROVIDED();\n"; |
264,153 | private void validate(User user, PerfTest oldOne, PerfTest newOne) {<NEW_LINE>if (oldOne == null) {<NEW_LINE>oldOne = new PerfTest();<NEW_LINE>oldOne.init();<NEW_LINE>}<NEW_LINE>newOne = oldOne.merge(newOne);<NEW_LINE>checkNotEmpty(newOne.getTestName(), "testName should be provided");<NEW_LINE>checkArgument(newOne.getStatus().equals(Status.READY) || newOne.getStatus().equals(Status.SAVED), "status only allows SAVE or READY");<NEW_LINE>if (newOne.isThresholdRunCount()) {<NEW_LINE>final Integer runCount = newOne.getRunCount();<NEW_LINE>checkArgument(runCount > 0 && runCount <= agentManager.getMaxRunCount(), "runCount should be equal to or less than %s", agentManager.getMaxRunCount());<NEW_LINE>} else {<NEW_LINE>final Long duration = newOne.getDuration();<NEW_LINE>checkArgument(duration > 0 && duration <= (((long) agentManager.getMaxRunHour()) * 3600000L), "duration should be equal to or less than %s", agentManager.getMaxRunHour());<NEW_LINE>}<NEW_LINE>Map<String, MutableInt> agentCountMap = agentService.getAvailableAgentCountMap(user.getUserId());<NEW_LINE>MutableInt agentCountObj = agentCountMap.get(config.isClustered() ? newOne.getRegion() : Config.NONE_REGION);<NEW_LINE>checkNotNull(agentCountObj, "region should be within current region list");<NEW_LINE>int agentMaxCount = agentCountObj.intValue();<NEW_LINE>checkArgument(newOne.getAgentCount(<MASK><NEW_LINE>if (newOne.getStatus().equals(Status.READY)) {<NEW_LINE>checkArgument(newOne.getAgentCount() >= 1, "agentCount should be more than 1 when it's READY status.");<NEW_LINE>}<NEW_LINE>checkArgument(newOne.getVuserPerAgent() <= agentManager.getMaxVuserPerAgent(), "vuserPerAgent should be equal to or less than %s", agentManager.getMaxVuserPerAgent());<NEW_LINE>if (config.isSecurityEnabled() && GrinderConstants.GRINDER_SECURITY_LEVEL_NORMAL.equals(config.getSecurityLevel())) {<NEW_LINE>checkArgument(StringUtils.isNotEmpty(newOne.getTargetHosts()), "targetHosts should be provided when security mode is enabled");<NEW_LINE>}<NEW_LINE>if (newOne.getStatus() != Status.SAVED) {<NEW_LINE>checkArgument(StringUtils.isNotBlank(newOne.getScriptName()), "scriptName should be provided.");<NEW_LINE>}<NEW_LINE>checkArgument(newOne.getVuserPerAgent() == newOne.getProcesses() * newOne.getThreads(), "vuserPerAgent should be equal to (processes * threads)");<NEW_LINE>} | ) <= agentMaxCount, "test agent should be equal to or less than %s", agentMaxCount); |
705,003 | private SubsonicRESTController.ErrorCode authenticate(HttpServletRequest httpRequest, String username, String password, String salt, String token, Authentication previousAuth) {<NEW_LINE>// Previously authenticated and username not overridden?<NEW_LINE>if (username == null && previousAuth != null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (salt != null && token != null) {<NEW_LINE>User user = securityService.getUserByName(username);<NEW_LINE>if (user == null) {<NEW_LINE>return SubsonicRESTController.ErrorCode.NOT_AUTHENTICATED;<NEW_LINE>}<NEW_LINE>String expectedToken = DigestUtils.md5Hex(user.getPassword() + salt);<NEW_LINE>if (!expectedToken.equals(token)) {<NEW_LINE>return SubsonicRESTController.ErrorCode.NOT_AUTHENTICATED;<NEW_LINE>}<NEW_LINE>password = user.getPassword();<NEW_LINE>}<NEW_LINE>if (password != null) {<NEW_LINE>UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(username, password);<NEW_LINE>authRequest.setDetails(authenticationDetailsSource.buildDetails(httpRequest));<NEW_LINE>try {<NEW_LINE>Authentication authResult = authenticationManager.authenticate(authRequest);<NEW_LINE>SecurityContextHolder.<MASK><NEW_LINE>return null;<NEW_LINE>} catch (AuthenticationException x) {<NEW_LINE>eventPublisher.publishEvent(new AuthenticationFailureBadCredentialsEvent(authRequest, x));<NEW_LINE>return SubsonicRESTController.ErrorCode.NOT_AUTHENTICATED;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return SubsonicRESTController.ErrorCode.MISSING_PARAMETER;<NEW_LINE>} | getContext().setAuthentication(authResult); |
918,935 | private Map<String, List<PersistentProperty<?>>> findUnwrappedPropertyPaths(Class<?> type, NameTransformer nameTransformer, boolean considerRegularProperties) {<NEW_LINE>return entities.getPersistentEntity(type).map(entity -> {<NEW_LINE>Map<String, List<PersistentProperty<?>>> mapping = new HashMap<String, List<PersistentProperty<?>>>();<NEW_LINE>for (BeanPropertyDefinition property : getMappedProperties(entity)) {<NEW_LINE>//<NEW_LINE>//<NEW_LINE>Optionals.//<NEW_LINE>ifAllPresent(//<NEW_LINE>Optional.ofNullable(entity.getPersistentProperty(property.getInternalName())), findAnnotatedMember(property), (prop, member) -> {<NEW_LINE>if (isJsonUnwrapped(member)) {<NEW_LINE>mapping.putAll(findUnwrappedPropertyPaths(nameTransformer, member, prop));<NEW_LINE>} else if (considerRegularProperties) {<NEW_LINE>mapping.put(nameTransformer.transform(property.getName()), Collections.<PersistentProperty<<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>return mapping;<NEW_LINE>}).orElse(Collections.emptyMap());<NEW_LINE>} | ?>>singletonList(prop)); |
1,130,537 | public static void buildPredDCLft(int blkX, int blkY, int mbX, boolean leftAvailable, boolean topAvailable, byte[] leftRow, byte[] topLine, byte[] pixOut) {<NEW_LINE>int s2, blkOffX = (blkX << 2) + (mbX << 3), blkOffY = blkY << 2;<NEW_LINE>if (leftAvailable) {<NEW_LINE>s2 = 0;<NEW_LINE>for (int i = 0; i < 4; i++) s2 += leftRow[blkOffY + i];<NEW_LINE>s2 = (s2 + 2) >> 2;<NEW_LINE>} else if (topAvailable) {<NEW_LINE>s2 = 0;<NEW_LINE>for (int i = 0; i < 4; i++) s2 += topLine[blkOffX + i];<NEW_LINE>s2 = <MASK><NEW_LINE>} else {<NEW_LINE>s2 = 0;<NEW_LINE>}<NEW_LINE>for (int j = 0; j < 16; j++) {<NEW_LINE>pixOut[j] = (byte) s2;<NEW_LINE>}<NEW_LINE>} | (s2 + 2) >> 2; |
1,820,273 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>return srcSequence.max();<NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>Expression exp = param.getLeafExpression();<NEW_LINE>return srcSequence.calc(exp, ctx).max();<NEW_LINE>} else {<NEW_LINE>if (param.getSubSize() != 2) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("max" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>IParam param0 = param.getSub(0);<NEW_LINE>IParam param1 = param.getSub(1);<NEW_LINE>if (param1 == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("max" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>Object obj = param1.<MASK><NEW_LINE>if (!(obj instanceof Number)) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("max" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>int count = ((Number) obj).intValue();<NEW_LINE>if (param0 == null) {<NEW_LINE>return srcSequence.max(count);<NEW_LINE>} else {<NEW_LINE>Expression exp = param0.getLeafExpression();<NEW_LINE>return srcSequence.calc(exp, ctx).max(count);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | getLeafExpression().calculate(ctx); |
1,117,025 | public Request<ListDevicePositionsRequest> marshall(ListDevicePositionsRequest listDevicePositionsRequest) {<NEW_LINE>if (listDevicePositionsRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListDevicePositionsRequest)");<NEW_LINE>}<NEW_LINE>Request<ListDevicePositionsRequest> request = new DefaultRequest<ListDevicePositionsRequest>(listDevicePositionsRequest, "AmazonLocation");<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/tracking/v0/trackers/{TrackerName}/list-positions";<NEW_LINE>uriResourcePath = uriResourcePath.replace("{TrackerName}", (listDevicePositionsRequest.getTrackerName() == null) ? "" : StringUtils.fromString(listDevicePositionsRequest.getTrackerName()));<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (listDevicePositionsRequest.getMaxResults() != null) {<NEW_LINE>Integer maxResults = listDevicePositionsRequest.getMaxResults();<NEW_LINE>jsonWriter.name("MaxResults");<NEW_LINE>jsonWriter.value(maxResults);<NEW_LINE>}<NEW_LINE>if (listDevicePositionsRequest.getNextToken() != null) {<NEW_LINE>String nextToken = listDevicePositionsRequest.getNextToken();<NEW_LINE>jsonWriter.name("NextToken");<NEW_LINE>jsonWriter.value(nextToken);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE>String snippet = stringWriter.toString();<NEW_LINE>byte[] content = snippet.getBytes(UTF8);<NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.1");<NEW_LINE>}<NEW_LINE>request.setHostPrefix("tracking.");<NEW_LINE>return request;<NEW_LINE>} | t.getMessage(), t); |
341,795 | public PrintStreamOp linkFrom(StreamOperator<?>... inputs) {<NEW_LINE>StreamOperator<?> in = checkAndGetFirst(inputs);<NEW_LINE>try {<NEW_LINE>System.err.println(TableUtil.formatTitle(in.getColNames()));<NEW_LINE>final int refreshInterval = getParams().get(REFRESH_INTERVAL);<NEW_LINE>if (refreshInterval <= 0) {<NEW_LINE>DataStreamConversionUtil.fromTable(getMLEnvironmentId(), in.getOutputTable()).addSink(new StreamPrintSinkFunction());<NEW_LINE>} else {<NEW_LINE>final int maxLimit = <MASK><NEW_LINE>DataStreamConversionUtil.fromTable(getMLEnvironmentId(), in.getOutputTable()).timeWindowAll(Time.of(refreshInterval, TimeUnit.SECONDS)).apply(new AllWindowFunction<Row, List<Row>, TimeWindow>() {<NEW_LINE><NEW_LINE>private static final long serialVersionUID = -5002192700679782400L;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void apply(TimeWindow window, Iterable<Row> values, Collector<List<Row>> out) {<NEW_LINE>List<Row> list = new ArrayList<>();<NEW_LINE>for (Row row : values) {<NEW_LINE>if (list.size() < maxLimit) {<NEW_LINE>list.add(row);<NEW_LINE>} else {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>out.collect(list);<NEW_LINE>}<NEW_LINE>}).addSink(new PrintStreamOp.StreamPrintListRowSinkFunction());<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new RuntimeException(ex);<NEW_LINE>}<NEW_LINE>this.setOutputTable(in.getOutputTable());<NEW_LINE>return this;<NEW_LINE>} | getParams().get(MAX_LIMIT); |
764,032 | private void initUI() {<NEW_LINE>setBackground(ColorResource.getDarkestBgColor());<NEW_LINE>txtFile = new JTextField();<NEW_LINE>setBorder(new LineBorder(ColorResource<MASK><NEW_LINE>txtFile.setBackground(ColorResource.getDarkestBgColor());<NEW_LINE>txtFile.setBorder(null);<NEW_LINE>txtFile.setForeground(Color.WHITE);<NEW_LINE>txtFile.setBounds(getScaledInt(77), getScaledInt(111), getScaledInt(241), getScaledInt(20));<NEW_LINE>txtFile.setCaretColor(ColorResource.getSelectionColor());<NEW_LINE>add(txtFile);<NEW_LINE>Box hbox = Box.createHorizontalBox();<NEW_LINE>btnBrowse = new CustomButton();<NEW_LINE>btnBrowse.setBackground(ColorResource.getDarkestBgColor());<NEW_LINE>btnBrowse.setIcon(ImageResource.getIcon("folder.png", 16, 16));<NEW_LINE>btnBrowse.setMargin(new Insets(0, 0, 0, 0));<NEW_LINE>btnBrowse.setContentAreaFilled(false);<NEW_LINE>btnBrowse.setBorderPainted(false);<NEW_LINE>btnBrowse.setFocusPainted(false);<NEW_LINE>btnBrowse.setOpaque(false);<NEW_LINE>btnBrowse.addActionListener(this);<NEW_LINE>btnDropdown = new CustomButton();<NEW_LINE>btnDropdown.setBackground(ColorResource.getDarkestBgColor());<NEW_LINE>btnDropdown.setIcon(ImageResource.getIcon("down_white.png", 16, 16));<NEW_LINE>btnDropdown.setMargin(new Insets(0, 0, 0, 0));<NEW_LINE>btnDropdown.setContentAreaFilled(false);<NEW_LINE>btnDropdown.setBorderPainted(false);<NEW_LINE>btnDropdown.setFocusPainted(false);<NEW_LINE>btnDropdown.addActionListener(this);<NEW_LINE>hbox.add(btnBrowse);<NEW_LINE>hbox.add(btnDropdown);<NEW_LINE>add(hbox, BorderLayout.EAST);<NEW_LINE>pop = new JPopupMenu();<NEW_LINE>if (!StringUtils.isNullOrEmptyOrBlank(Config.getInstance().getLastFolder())) {<NEW_LINE>pop.add(createMenuItem(Config.getInstance().getLastFolder()));<NEW_LINE>}<NEW_LINE>pop.add(createMenuItem(Config.getInstance().getDownloadFolder()));<NEW_LINE>if (!Config.getInstance().isForceSingleFolder()) {<NEW_LINE>pop.add(createMenuItem(Config.getInstance().getCategoryDocuments()));<NEW_LINE>pop.add(createMenuItem(Config.getInstance().getCategoryMusic()));<NEW_LINE>pop.add(createMenuItem(Config.getInstance().getCategoryPrograms()));<NEW_LINE>pop.add(createMenuItem(Config.getInstance().getCategoryCompressed()));<NEW_LINE>pop.add(createMenuItem(Config.getInstance().getCategoryVideos()));<NEW_LINE>}<NEW_LINE>pop.setInvoker(btnDropdown);<NEW_LINE>} | .getSelectionColor(), 1)); |
921,087 | public static void main(String[] args) throws Exception {<NEW_LINE>boolean sanityCheck = Arrays.asList(args).contains("--sanity-check");<NEW_LINE>if (sanityCheck && GraphicsEnvironment.isHeadless()) {<NEW_LINE>Logger.getGlobal().log(Level.SEVERE, "[Vader] Hello, Luke. Can't do much in headless mode.");<NEW_LINE>Runtime.getRuntime().exit(0);<NEW_LINE>}<NEW_LINE>String lookAndFeelClassName = UIManager.getSystemLookAndFeelClassName();<NEW_LINE>if (!lookAndFeelClassName.contains("AquaLookAndFeel") && !lookAndFeelClassName.contains("PlasticXPLookAndFeel")) {<NEW_LINE>// may be running on linux platform<NEW_LINE>lookAndFeelClassName = "javax.swing.plaf.metal.MetalLookAndFeel";<NEW_LINE>}<NEW_LINE>UIManager.setLookAndFeel(lookAndFeelClassName);<NEW_LINE>GraphicsEnvironment genv = GraphicsEnvironment.getLocalGraphicsEnvironment();<NEW_LINE>genv.registerFont(FontUtils.createElegantIconFont());<NEW_LINE>var guiThreadResult = new SynchronousQueue<Boolean>();<NEW_LINE>javax.swing.SwingUtilities.invokeLater(() -> {<NEW_LINE>try {<NEW_LINE>guiThreadResult.put(createGUI());<NEW_LINE>// Show the initial dialog.<NEW_LINE>OpenIndexDialogFactory openIndexDialogFactory = OpenIndexDialogFactory.getInstance();<NEW_LINE>new DialogOpener<>(openIndexDialogFactory).open(MessageUtils.getLocalizedMessage("openindex.dialog.title"), 600, 420, (factory) -> {<NEW_LINE>});<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (Boolean.FALSE.equals(guiThreadResult.take())) {<NEW_LINE>Logger.getGlobal().log(Level.SEVERE, "Luke could not start.");<NEW_LINE>Runtime.<MASK><NEW_LINE>}<NEW_LINE>if (sanityCheck) {<NEW_LINE>// In sanity-check mode on non-headless displays, return success.<NEW_LINE>Logger.getGlobal().log(Level.SEVERE, "[Vader] Hello, Luke. We seem to be fine.");<NEW_LINE>Runtime.getRuntime().exit(0);<NEW_LINE>}<NEW_LINE>} | getRuntime().exit(1); |
1,101,264 | public static void selectSingleGPXFile(final FragmentActivity activity, boolean showCurrentGpx, final CallbackWithObject<GPXFile[]> callbackWithObject) {<NEW_LINE>OsmandApplication app = (OsmandApplication) activity.getApplication();<NEW_LINE>int gpxDirLength = app.getAppPath(IndexConstants.GPX_INDEX_DIR).getAbsolutePath().length();<NEW_LINE>List<SelectedGpxFile> selectedGpxFiles = app.getSelectedGpxHelper().getSelectedGPXFiles();<NEW_LINE>final List<GPXInfo> list = new ArrayList<>(selectedGpxFiles.size() + 1);<NEW_LINE>if (!OsmandPlugin.isActive(OsmandMonitoringPlugin.class)) {<NEW_LINE>showCurrentGpx = false;<NEW_LINE>}<NEW_LINE>if (!selectedGpxFiles.isEmpty() || showCurrentGpx) {<NEW_LINE>if (showCurrentGpx) {<NEW_LINE>list.add(new GPXInfo(activity.getString(R.string.shared_string_currently_recording_track), 0, 0));<NEW_LINE>}<NEW_LINE>for (SelectedGpxFile selectedGpx : selectedGpxFiles) {<NEW_LINE>GPXFile gpxFile = selectedGpx.getGpxFile();<NEW_LINE>if (!gpxFile.showCurrentTrack && gpxFile.path.length() > gpxDirLength + 1) {<NEW_LINE>list.add(new GPXInfo(gpxFile.path.substring(gpxDirLength + 1), gpxFile.modifiedTime, 0));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>SelectGpxTrackBottomSheet.showInstance(activity.getSupportFragmentManager(<MASK><NEW_LINE>}<NEW_LINE>} | ), showCurrentGpx, callbackWithObject, list); |
738,516 | /*<NEW_LINE>* Check if a topology edge is used in a particular protocol.<NEW_LINE>*/<NEW_LINE>public boolean isEdgeUsed(Configuration conf, Protocol proto, GraphEdge ge) {<NEW_LINE>Interface iface = ge.getStart();<NEW_LINE>// Use a null routed edge, but only for the static protocol<NEW_LINE>if (ge.isNullEdge()) {<NEW_LINE>return proto.isStatic();<NEW_LINE>}<NEW_LINE>// Don't use if interface is not active<NEW_LINE>if (!isInterfaceActive(proto, iface)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Exclude abstract iBGP edges from all protocols except BGP<NEW_LINE>if (iface.getName().startsWith("iBGP-")) {<NEW_LINE>return proto.isBgp();<NEW_LINE>}<NEW_LINE>// Never use Loopbacks for any protocol except connected<NEW_LINE>if (ge.getStart().isLoopback()) {<NEW_LINE>return proto.isConnected();<NEW_LINE>}<NEW_LINE>// Don't use ospf over edges to hosts / external<NEW_LINE>if ((ge.getPeer() == null || isHost(ge.getPeer())) && proto.isOspf()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Only use specified edges from static routes<NEW_LINE>if (proto.isStatic()) {<NEW_LINE>List<StaticRoute> srs = getStaticRoutes().get(conf.getHostname(), iface.getName());<NEW_LINE>return iface.getActive() && srs != null && !srs.isEmpty();<NEW_LINE>}<NEW_LINE>// Only use an edge in BGP if there is an explicit peering<NEW_LINE>if (proto.isBgp()) {<NEW_LINE>BgpPeerConfig n1 = _ebgpNeighbors.get(ge);<NEW_LINE>BgpPeerConfig n2 = _ibgpNeighbors.get(ge);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} | return n1 != null || n2 != null; |
1,307,608 | void positionCartAttributes(FloatRect start, FloatRect end, float x, float y, String[] attribute, float[] value) {<NEW_LINE>float startCenterX = start.centerX();<NEW_LINE>float startCenterY = start.centerY();<NEW_LINE>float endCenterX = end.centerX();<NEW_LINE>float endCenterY = end.centerY();<NEW_LINE>float pathVectorX = endCenterX - startCenterX;<NEW_LINE>float pathVectorY = endCenterY - startCenterY;<NEW_LINE>if (attribute[0] != null) {<NEW_LINE>// they are saying what to use<NEW_LINE>if (PositionType.S_PERCENT_X.equals(attribute[0])) {<NEW_LINE>value[0] = (x - startCenterX) / pathVectorX;<NEW_LINE>value[1] = (y - startCenterY) / pathVectorY;<NEW_LINE>} else {<NEW_LINE>value[1] = (x - startCenterX) / pathVectorX;<NEW_LINE>value[0] = (y - startCenterY) / pathVectorY;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// we will use what we want to<NEW_LINE>attribute[0] = PositionType.S_PERCENT_X;<NEW_LINE>value[0] = (x - startCenterX) / pathVectorX;<NEW_LINE><MASK><NEW_LINE>value[1] = (y - startCenterY) / pathVectorY;<NEW_LINE>}<NEW_LINE>} | attribute[1] = PositionType.S_PERCENT_Y; |
1,600,843 | public TraceContextOrSamplingFlags extract(R request) {<NEW_LINE>TraceContextOrSamplingFlags.Builder builder = delegate.extract(request).toBuilder();<NEW_LINE>BaggageFields extra <MASK><NEW_LINE>builder.addExtra(extra);<NEW_LINE>if (factory.extra == null)<NEW_LINE>return builder.build();<NEW_LINE>for (BaggagePropagationConfig config : factory.configs) {<NEW_LINE>// local field<NEW_LINE>if (config.baggageCodec == BaggageCodec.NOOP)<NEW_LINE>continue;<NEW_LINE>List<String> keys = config.baggageCodec.injectKeyNames();<NEW_LINE>for (int i = 0, length = keys.size(); i < length; i++) {<NEW_LINE>String value = getter.get(request, keys.get(i));<NEW_LINE>if (value != null && config.baggageCodec.decode(extra, request, value)) {<NEW_LINE>// accept the first match<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return builder.addExtra(factory.extra).build();<NEW_LINE>} | = factory.baggageFactory.create(); |
878,508 | private void createPayments(MOrder sourceOrder, MOrder targetOrder) {<NEW_LINE>for (MPayment sourcePayment : MPayment.getOfOrder(sourceOrder)) {<NEW_LINE>MPayment payment = new MPayment(getCtx(), 0, get_TrxName());<NEW_LINE>PO.copyValues(sourcePayment, payment);<NEW_LINE>payment.setDateTrx(today);<NEW_LINE>payment.setDateAcct(today);<NEW_LINE>payment.setC_Order_ID(targetOrder.getC_Order_ID());<NEW_LINE>payment.setC_BPartner_ID(targetOrder.getC_BPartner_ID());<NEW_LINE>payment.setC_Invoice_ID(-1);<NEW_LINE>payment.addDescription(Msg.parseTranslation(sourceOrder.getCtx(), " @From@ ") + sourcePayment.getDocumentNo());<NEW_LINE>payment.setIsReceipt(true);<NEW_LINE>payment.setC_DocType_ID(MDocType.getDocType(MDocType.DOCBASETYPE_ARReceipt, sourceOrder.getAD_Org_ID()));<NEW_LINE>payment.setIsPrepayment(true);<NEW_LINE>payment.saveEx();<NEW_LINE>payment.processIt(getDocumentAction());<NEW_LINE>payment.saveEx();<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} | addLog(payment.getDocumentInfo()); |
975,006 | private static void tryMT(RegressionEnvironment env, int numSeconds) throws InterruptedException {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplCreateVariable = "@public create table vartotal (topgroup int primary key, subgroup int primary key, thecnt count(*))";<NEW_LINE>env.compileDeploy(eplCreateVariable, path);<NEW_LINE>String eplCreateIndex = "create index myindex on vartotal (topgroup)";<NEW_LINE>env.compileDeploy(eplCreateIndex, path);<NEW_LINE>// populate<NEW_LINE>String eplInto = "into table vartotal select count(*) as thecnt from SupportTopGroupSubGroupEvent#length(100) group by topgroup, subgroup";<NEW_LINE>env.compileDeploy(eplInto, path);<NEW_LINE>// delete empty groups<NEW_LINE>String eplDelete = "on SupportBean_S0 merge vartotal when matched and thecnt = 0 then delete";<NEW_LINE>env.compileDeploy(eplDelete, path);<NEW_LINE>// seed with {0, 0} group<NEW_LINE>env.sendEventBean(new SupportTopGroupSubGroupEvent(0, 0));<NEW_LINE>// select/read<NEW_LINE>String eplMergeSelect = "@public on SupportBean merge vartotal as vt " + "where vt.topgroup = intPrimitive and vt.thecnt > 0 " + "when matched then insert into MyOutputStream select *";<NEW_LINE>env.compileDeploy(eplMergeSelect, path);<NEW_LINE>env.compileDeploy("@name('s0') select * from MyOutputStream", path).addListener("s0");<NEW_LINE>SupportListener listener = env.listener("s0");<NEW_LINE>WriteRunnable writeRunnable = new WriteRunnable(env);<NEW_LINE>ReadRunnable readRunnable = new ReadRunnable(env, listener);<NEW_LINE>// start<NEW_LINE>Thread writeThread = new Thread(writeRunnable, InfraTableMTGroupedMergeReadMergeWriteSecondaryIndexUpd.class.getSimpleName() + "-write");<NEW_LINE>Thread readThread = new Thread(readRunnable, InfraTableMTGroupedMergeReadMergeWriteSecondaryIndexUpd.class.getSimpleName() + "-read");<NEW_LINE>writeThread.start();<NEW_LINE>readThread.start();<NEW_LINE>// wait<NEW_LINE>Thread.sleep(numSeconds * 1000);<NEW_LINE>// shutdown<NEW_LINE>writeRunnable.setShutdown(true);<NEW_LINE>readRunnable.setShutdown(true);<NEW_LINE>// join<NEW_LINE>log.info("Waiting for completion");<NEW_LINE>writeThread.join();<NEW_LINE>readThread.join();<NEW_LINE>assertNull(writeRunnable.getException());<NEW_LINE>assertNull(readRunnable.getException());<NEW_LINE><MASK><NEW_LINE>assertTrue(readRunnable.numQueries > 100);<NEW_LINE>System.out.println("Send " + writeRunnable.numEvents + " and performed " + readRunnable.numQueries + " reads");<NEW_LINE>env.undeployAll();<NEW_LINE>} | assertTrue(writeRunnable.numEvents > 100); |
805,620 | public Oql visit(Call call) {<NEW_LINE>final Operator op = call.operator();<NEW_LINE>final List<Expression> args = call.arguments();<NEW_LINE>if (op == Operators.NOT_IN || op == IterableOperators.NOT_EMPTY) {<NEW_LINE>// geode doesn't understand syntax foo not in [1, 2, 3]<NEW_LINE>// convert "foo not in [1, 2, 3]" into "not (foo in [1, 2, 3])"<NEW_LINE>return visit(Expressions.not(Expressions.call(inverseOp(op), call.arguments())));<NEW_LINE>}<NEW_LINE>if (op == Operators.AND || op == Operators.OR) {<NEW_LINE>Preconditions.checkArgument(!args.isEmpty(), "Size should be >=1 for %s but was %s", op, args.size());<NEW_LINE>final String join = ") " + op.name() + " (";<NEW_LINE>final String newOql = "(" + args.stream().map(a -> a.accept(this)).map(Oql::oql).collect(Collectors.joining(join)) + ")";<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (op.arity() == Operator.Arity.BINARY) {<NEW_LINE>return binaryOperator(call);<NEW_LINE>}<NEW_LINE>if (op.arity() == Operator.Arity.UNARY) {<NEW_LINE>return unaryOperator(call);<NEW_LINE>}<NEW_LINE>throw new UnsupportedOperationException("Don't know how to handle " + call);<NEW_LINE>} | return new Oql(variables, newOql); |
617,364 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ali_client" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (nSize < 2) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ali_client" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>IParam sub0 = param.getSub(0);<NEW_LINE>IParam sub1 = param.getSub(1);<NEW_LINE>if (sub0 == null || sub1 == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ali_client" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>String user = "", pwd = "";<NEW_LINE>Object username = null, password = null;<NEW_LINE>if (nSize > 2) {<NEW_LINE>IParam sub2 = param.getSub(2);<NEW_LINE>if (sub2 != null) {<NEW_LINE>username = sub2.getLeafExpression().calculate(ctx);<NEW_LINE>if (username != null)<NEW_LINE>user = username.toString();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (nSize > 3) {<NEW_LINE>IParam sub3 = param.getSub(3);<NEW_LINE>if (sub3 != null) {<NEW_LINE>password = sub3.getLeafExpression().calculate(ctx);<NEW_LINE>if (password != null)<NEW_LINE>pwd = password.toString();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Object url = sub0.getLeafExpression().calculate(ctx);<NEW_LINE>Object catalog = sub1.getLeafExpression().calculate(ctx);<NEW_LINE>if (!(url instanceof String)) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("olap_client" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>// String server, String catalog, String user, String password, int retry<NEW_LINE>MdxQueryUtil mdx = new MdxQueryUtil();<NEW_LINE>if (mdx != null) {<NEW_LINE>OlapConnection conn = mdx.getOlapConn(ctx, url.toString(), catalog.toString(), user, pwd, 1);<NEW_LINE>if (conn == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("olap_client" + mm.getMessage("Connect server false"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return mdx;<NEW_LINE>} | int nSize = param.getSubSize(); |
1,492,426 | public static IpRangeInventory fromMessage(APIAddIpv6RangeByNetworkCidrMsg msg) {<NEW_LINE>IpRangeInventory ipr = new IpRangeInventory();<NEW_LINE>ipr.setNetworkCidr(IPv6NetworkUtils.getFormalCidrOfNetworkCidr(msg.getNetworkCidr()));<NEW_LINE>ipr.setName(msg.getName());<NEW_LINE>ipr.setDescription(msg.getDescription());<NEW_LINE>ipr.setAddressMode(msg.getAddressMode());<NEW_LINE>ipr.setStartIp(IPv6NetworkUtils.getStartIpOfNetworkCidr(msg.getNetworkCidr()));<NEW_LINE>ipr.setEndIp(IPv6NetworkUtils.getEndIpOfNetworkCidr(msg.getNetworkCidr()));<NEW_LINE>ipr.setNetmask(IPv6NetworkUtils.getFormalNetmaskOfNetworkCidr(msg.getNetworkCidr()));<NEW_LINE>ipr.setGateway(IPv6NetworkUtils.getGatewayOfNetworkCidr(msg.getNetworkCidr()));<NEW_LINE>ipr.setL3NetworkUuid(msg.getL3NetworkUuid());<NEW_LINE>ipr.setUuid(msg.getResourceUuid());<NEW_LINE>ipr.setIpVersion(IPv6Constants.IPv6);<NEW_LINE>ipr.setPrefixLen(IPv6NetworkUtils.getPrefixLenOfNetworkCidr(msg.getNetworkCidr()));<NEW_LINE>ipr.setIpRangeType(IpRangeType.valueOf<MASK><NEW_LINE>return ipr;<NEW_LINE>} | (msg.getIpRangeType())); |
168,048 | public static LocalVariableAnnotation findUniqueBestMatchingParameter(ClassContext classContext, Method method, String name, String signature) {<NEW_LINE>LocalVariableAnnotation match = null;<NEW_LINE>int localsThatAreParameters = PreorderVisitor.getNumberArguments(method.getSignature());<NEW_LINE>int startIndex = 0;<NEW_LINE>if (!method.isStatic()) {<NEW_LINE>startIndex = 1;<NEW_LINE>}<NEW_LINE>SignatureParser parser = new SignatureParser(method.getSignature());<NEW_LINE>Iterator<String> signatureIterator = parser.parameterSignatureIterator();<NEW_LINE>int lowestCost = Integer.MAX_VALUE;<NEW_LINE>for (int i = startIndex; i < localsThatAreParameters + startIndex; i++) {<NEW_LINE>String sig = signatureIterator.next();<NEW_LINE>if (signature.equals(sig)) {<NEW_LINE>LocalVariableAnnotation potentialMatch = LocalVariableAnnotation.getLocalVariableAnnotation(method, i, 0, 0);<NEW_LINE>if (!potentialMatch.isNamed()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int distance = EditDistance.editDistance(<MASK><NEW_LINE>if (distance < lowestCost) {<NEW_LINE>match = potentialMatch;<NEW_LINE>match.setDescription(DID_YOU_MEAN_ROLE);<NEW_LINE>lowestCost = distance;<NEW_LINE>} else if (distance == lowestCost) {<NEW_LINE>// not unique best match<NEW_LINE>match = null;<NEW_LINE>}<NEW_LINE>// signatures match<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (lowestCost < 5) {<NEW_LINE>return match;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>} | name, potentialMatch.getName()); |
610,792 | final TransactGetItemsResult executeTransactGetItems(TransactGetItemsRequest transactGetItemsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(transactGetItemsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<TransactGetItemsRequest> request = null;<NEW_LINE>Response<TransactGetItemsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new TransactGetItemsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(transactGetItemsRequest));<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, "DynamoDB");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>URI cachedEndpoint = null;<NEW_LINE>if (endpointDiscoveryEnabled) {<NEW_LINE>cachedEndpoint = cache.get(awsCredentialsProvider.getCredentials().getAWSAccessKeyId(), false, endpoint);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<TransactGetItemsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TransactGetItemsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext, cachedEndpoint, null);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>} | addHandlerContext(HandlerContextKey.OPERATION_NAME, "TransactGetItems"); |
1,071,725 | private ProtocolInitializer createInternalProtocolInitializer(BoltProtocolFactory boltProtocolFactory, TransportThrottleGroup throttleGroup, ByteBufAllocator bufferAllocator) {<NEW_LINE>SslContext sslCtx = null;<NEW_LINE>SslPolicyLoader sslPolicyLoader = dependencyResolver.resolveDependency(SslPolicyLoader.class);<NEW_LINE>boolean requireEncryption = sslPolicyLoader.hasPolicyForSource(CLUSTER);<NEW_LINE>if (requireEncryption) {<NEW_LINE>try {<NEW_LINE>sslCtx = sslPolicyLoader.getPolicy(CLUSTER).nettyServerContext();<NEW_LINE>} catch (SSLException e) {<NEW_LINE>throw new RuntimeException("Failed to initialize SSL encryption support, which is required to start this connector. " + "Error was: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>SocketAddress internalListenAddress;<NEW_LINE>if (config.isExplicitlySet(GraphDatabaseSettings.routing_listen_address)) {<NEW_LINE>internalListenAddress = config.get(GraphDatabaseSettings.routing_listen_address).socketAddress();<NEW_LINE>} else {<NEW_LINE>// otherwise use same host as external connector but with default internal port<NEW_LINE>internalListenAddress = new InetSocketAddress(config.get(BoltConnector.listen_address).getHostname(), config.get(GraphDatabaseSettings.routing_listen_address).getPort());<NEW_LINE>}<NEW_LINE>Duration channelTimeout = <MASK><NEW_LINE>long maxMessageSize = config.get(BoltConnectorInternalSettings.unsupported_bolt_unauth_connection_max_inbound_bytes);<NEW_LINE>return new SocketTransport(BoltConnector.NAME, internalListenAddress, sslCtx, requireEncryption, logService.getInternalLogProvider(), throttleGroup, boltProtocolFactory, connectionTracker, channelTimeout, maxMessageSize, bufferAllocator, boltMemoryPool, dependencyResolver.resolveDependency(AuthConfigProvider.class), config);<NEW_LINE>} | config.get(BoltConnectorInternalSettings.unsupported_bolt_unauth_connection_timeout); |
957,463 | final DecodeAuthorizationMessageResult executeDecodeAuthorizationMessage(DecodeAuthorizationMessageRequest decodeAuthorizationMessageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(decodeAuthorizationMessageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DecodeAuthorizationMessageRequest> request = null;<NEW_LINE>Response<DecodeAuthorizationMessageResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DecodeAuthorizationMessageRequestMarshaller().marshall<MASK><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, "STS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DecodeAuthorizationMessage");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DecodeAuthorizationMessageResult> responseHandler = new StaxResponseHandler<DecodeAuthorizationMessageResult>(new DecodeAuthorizationMessageResultStaxUnmarshaller());<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>} | (super.beforeMarshalling(decodeAuthorizationMessageRequest)); |
465,163 | /*<NEW_LINE>* Same than LocalVariablePattern.<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void findIndexMatches(Index index, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope, IProgressMonitor progressMonitor) {<NEW_LINE>IPackageFragmentRoot root = (IPackageFragmentRoot) this.typeParameter.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);<NEW_LINE>String documentPath;<NEW_LINE>String relativePath;<NEW_LINE>if (root.isArchive()) {<NEW_LINE>IType type = (IType) this.typeParameter.getAncestor(IJavaElement.TYPE);<NEW_LINE>relativePath = (type.getFullyQualifiedName('$')).replace('.', '/') + SuffixConstants.SUFFIX_STRING_class;<NEW_LINE>documentPath = root.getPath() + IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR + relativePath;<NEW_LINE>} else {<NEW_LINE>IPath path = this.typeParameter.getPath();<NEW_LINE>documentPath = path.toString();<NEW_LINE>relativePath = <MASK><NEW_LINE>}<NEW_LINE>if (scope instanceof JavaSearchScope) {<NEW_LINE>JavaSearchScope javaSearchScope = (JavaSearchScope) scope;<NEW_LINE>// Get document path access restriction from java search scope<NEW_LINE>// Note that requestor has to verify if needed whether the document violates the access restriction or not<NEW_LINE>AccessRuleSet access = javaSearchScope.getAccessRuleSet(relativePath, index.containerPath);<NEW_LINE>if (access != JavaSearchScope.NOT_ENCLOSED) {<NEW_LINE>// scope encloses the path<NEW_LINE>if (!requestor.acceptIndexMatch(documentPath, this, participant, access))<NEW_LINE>throw new OperationCanceledException();<NEW_LINE>}<NEW_LINE>} else if (scope.encloses(documentPath)) {<NEW_LINE>if (!requestor.acceptIndexMatch(documentPath, this, participant, null))<NEW_LINE>throw new OperationCanceledException();<NEW_LINE>}<NEW_LINE>} | Util.relativePath(path, 1); |
1,525,081 | private void intializeMQTTClient() throws Exception {<NEW_LINE>Matcher matcher = ENDPOINT_PATTERN.matcher(specification.<MASK><NEW_LINE>// Call matcher.find() to be able to use named expressions.<NEW_LINE>matcher.find();<NEW_LINE>String endpointBrokerUrl = matcher.group("brokerUrl");<NEW_LINE>endpointTopic = matcher.group("topic");<NEW_LINE>options = matcher.group("options");<NEW_LINE>MqttConnectOptions connectOptions = new MqttConnectOptions();<NEW_LINE>connectOptions.setAutomaticReconnect(false);<NEW_LINE>connectOptions.setCleanSession(true);<NEW_LINE>connectOptions.setConnectionTimeout(10);<NEW_LINE>// Initialize default protocol pragma for connection string.<NEW_LINE>String protocolPragma = "tcp://";<NEW_LINE>if (specification.getSecret() != null) {<NEW_LINE>if (specification.getSecret().getUsername() != null && specification.getSecret().getPassword() != null) {<NEW_LINE>logger.debug("Adding username/password authentication from secret " + specification.getSecret().getName());<NEW_LINE>connectOptions.setUserName(specification.getSecret().getUsername());<NEW_LINE>connectOptions.setPassword(specification.getSecret().getPassword().toCharArray());<NEW_LINE>}<NEW_LINE>if (specification.getSecret().getCaCertPem() != null) {<NEW_LINE>logger.debug("Installing a broker certificate from secret " + specification.getSecret().getName());<NEW_LINE>trustStore = ConsumptionTaskCommons.installBrokerCertificate(specification);<NEW_LINE>// Find the list of SSL properties here:<NEW_LINE>// https://www.eclipse.org/paho/files/javadoc/org/eclipse/paho/client/mqttv3/MqttConnectOptions.html#setSSLProperties-java.util.Properties-<NEW_LINE>Properties sslProperties = new Properties();<NEW_LINE>sslProperties.put("com.ibm.ssl.trustStore", trustStore.getAbsolutePath());<NEW_LINE>sslProperties.put("com.ibm.ssl.trustStorePassword", ConsumptionTaskCommons.TRUSTSTORE_PASSWORD);<NEW_LINE>sslProperties.put("com.ibm.ssl.trustStoreType", "JKS");<NEW_LINE>connectOptions.setSSLProperties(sslProperties);<NEW_LINE>// We also have to change the prococolPragma to ssl://<NEW_LINE>protocolPragma = "ssl://";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Create the subscriber and connect it to server using the properties.<NEW_LINE>// Generate a unique clientId for each publication to avoid collisions (cleanSession is true).<NEW_LINE>subscriber = new MqttClient(protocolPragma + endpointBrokerUrl, "microcks-async-minion-test-" + System.currentTimeMillis());<NEW_LINE>subscriber.connect(connectOptions);<NEW_LINE>} | getEndpointUrl().trim()); |
540,766 | public int paint(Graphics2D g, int w, int h, int[] ticks) {<NEW_LINE>int draw_width = mCanvasWidth - ins_left - ins_right;<NEW_LINE>float e = 0.0001f * (maxx - minx);<NEW_LINE>FontMetrics fm = g.getFontMetrics();<NEW_LINE>int ascent = fm.getAscent();<NEW_LINE>int descent = fm.getDescent();<NEW_LINE>int text_height = fm.getHeight();<NEW_LINE>int top = text_height / 2;<NEW_LINE>int tcount = 0;<NEW_LINE>int count = getCount();<NEW_LINE>for (int x = 0; x < count; x++) {<NEW_LINE>float fx = mTickX * x;<NEW_LINE>int ix = (int) (draw_width * fx / (maxx - minx) + ins_left);<NEW_LINE>ticks[tcount++] = ix;<NEW_LINE>g.drawLine(ix, top + text_height, ix, h - ins_botom);<NEW_LINE>String str = df.format(fx + minx);<NEW_LINE>int sw = fm.stringWidth(str) / 2;<NEW_LINE>g.drawString(str, <MASK><NEW_LINE>}<NEW_LINE>return tcount;<NEW_LINE>} | ix - sw, ascent + top); |
1,562,372 | public Pair<Expression, Concrete.Expression> visitCase(Concrete.CaseExpression expr, Expression coreExpr) {<NEW_LINE>if (matchesSubExpr(expr))<NEW_LINE>return new Pair<>(coreExpr, expr);<NEW_LINE>var coreCaseExpr = coreExpr.cast(CaseExpression.class);<NEW_LINE>if (coreCaseExpr == null)<NEW_LINE>return null;<NEW_LINE>var expression = visitExprs(coreCaseExpr.getArguments(), expr.getArguments().stream().map(i -> i.expression).collect(Collectors.toList()), coreCaseExpr);<NEW_LINE>if (expression != null)<NEW_LINE>return expression;<NEW_LINE>Concrete.<MASK><NEW_LINE>if (resultType != null) {<NEW_LINE>var accepted = resultType.accept(this, coreCaseExpr.getResultType());<NEW_LINE>if (accepted != null)<NEW_LINE>return accepted;<NEW_LINE>}<NEW_LINE>return visitElimTree(expr.getClauses(), coreCaseExpr.getElimBody().getClauses());<NEW_LINE>} | Expression resultType = expr.getResultType(); |
1,688,563 | private void parseRangeDefinition() {<NEW_LINE>Matcher matchingRe;<NEW_LINE>matchingRe = START_AND_STOP.matcher(definition);<NEW_LINE>if (matchingRe.matches()) {<NEW_LINE>// Both positions specified<NEW_LINE>startStr = matchingRe.group(1) + (matchingRe.group(4) != null ? matchingRe.group(4) : "");<NEW_LINE>stopStr = matchingRe.group(5) + (matchingRe.group(8) != null ? matchingRe.group(8) : "");<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>matchingRe = JUST_START.matcher(definition);<NEW_LINE>if (matchingRe.matches()) {<NEW_LINE>// Only start position specified<NEW_LINE>startStr = matchingRe.group(1) + (matchingRe.group(4) != null ? matchingRe.group(4) : "");<NEW_LINE>// One line only addressed<NEW_LINE>stopStr = startStr;<NEW_LINE>} else {<NEW_LINE>// Only stop position specified<NEW_LINE>matchingRe = JUST_STOP.matcher(definition);<NEW_LINE>if (matchingRe.matches()) {<NEW_LINE>stopStr = matchingRe.group(1) + (matchingRe.group(4) != null ? matchingRe.group(4) : "");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>operationStr = matchingRe.group(5);<NEW_LINE>}<NEW_LINE>// % is a shortcut for 0,$<NEW_LINE>if (startStr.equals("%")) {<NEW_LINE>startStr = "0";<NEW_LINE>stopStr = "$";<NEW_LINE>} else {<NEW_LINE>// if range not defined, assume current position<NEW_LINE>if (startStr.length() == 0 || startStr.startsWith("+") || startStr.startsWith("-")) {<NEW_LINE>startStr = "." + startStr;<NEW_LINE>}<NEW_LINE>if (stopStr.length() == 0 || stopStr.startsWith("+") || stopStr.startsWith("-")) {<NEW_LINE>stopStr = "." + stopStr;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | operationStr = matchingRe.group(9); |
1,684,015 | public ActivityType unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ActivityType activityType = new ActivityType();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>activityType.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("version", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>activityType.setVersion(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 activityType;<NEW_LINE>} | int originalDepth = context.getCurrentDepth(); |
1,386,017 | public void run() {<NEW_LINE>final PropertyKey<Long> lastScannedKey = StructrApp.key(Folder.class, "mountLastScanned");<NEW_LINE>final PropertyKey<String> mountTargetKey = StructrApp.<MASK><NEW_LINE>boolean canStart = false;<NEW_LINE>// wait for transaction to finish so we can be<NEW_LINE>// sure that the mounted folder exists<NEW_LINE>for (int i = 0; i < 3; i++) {<NEW_LINE>try (final Tx tx = StructrApp.getInstance().tx()) {<NEW_LINE>if (StructrApp.getInstance().nodeQuery(Folder.class).and(mountTargetKey, root.toString()).getFirst() != null) {<NEW_LINE>canStart = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>tx.success();<NEW_LINE>} catch (FrameworkException fex) {<NEW_LINE>}<NEW_LINE>// wait for the transaction in a different thread to finish<NEW_LINE>try {<NEW_LINE>Thread.sleep(1000);<NEW_LINE>} catch (InterruptedException ex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// We need to wait for the creating or modifying transaction to finish before we can<NEW_LINE>// start, otherwise the folder will not be available and no files will be created.<NEW_LINE>if (canStart) {<NEW_LINE>final Path actualPath = Paths.get(path);<NEW_LINE>if (Files.exists(actualPath)) {<NEW_LINE>if (Files.isDirectory(actualPath)) {<NEW_LINE>try {<NEW_LINE>// add watch services for each directory recursively<NEW_LINE>scanDirectoryTree(registerWatchKey, root, actualPath);<NEW_LINE>// set last scanned timestamp on root folder<NEW_LINE>if (isRootScanner) {<NEW_LINE>try (final Tx tx = StructrApp.getInstance().tx()) {<NEW_LINE>final Folder rootFolder = StructrApp.getInstance().nodeQuery(Folder.class).and(mountTargetKey, root.toString()).getFirst();<NEW_LINE>if (rootFolder != null) {<NEW_LINE>rootFolder.setProperty(lastScannedKey, System.currentTimeMillis());<NEW_LINE>}<NEW_LINE>tx.success();<NEW_LINE>} catch (FrameworkException fex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException ex) {<NEW_LINE>logger.warn("Unable to mount {}: {}", path, ex.getMessage());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.warn("Unable to mount {}, not a directory", path);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.warn("Unable to mount {}, directory does not exist", path);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.warn("Unable to mount {}, folder was not created or mount target was not set", path);<NEW_LINE>}<NEW_LINE>} | key(Folder.class, "mountTarget"); |
1,209,909 | public State apply(final char ch, final StringBuilder out) {<NEW_LINE>State state = this;<NEW_LINE>if (Character.isJavaIdentifierPart(ch)) {<NEW_LINE>state = IDENTIFIER;<NEW_LINE>state._start = out.length() - 1;<NEW_LINE>} else if (ch == '"') {<NEW_LINE>state = STRING_LITERAL;<NEW_LINE>out.insert(out.length() - 1, "<font color=\"" + STRING_COLOR + "\">");<NEW_LINE>} else if ((ch == '/') && (out.charAt(out.length() - 2) == '/')) {<NEW_LINE>state = COMMENT;<NEW_LINE>out.insert(out.length() - 2, "<font color=\"" + COMMENT_COLOR + "\">");<NEW_LINE>} else if ((ch == '@') && (out.charAt(out.length() - 2) == '\\') && (out.charAt(out.length() - 3) != '\\')) {<NEW_LINE>state = ANNOTATION;<NEW_LINE>out.deleteCharAt(<MASK><NEW_LINE>out.insert(out.length() - 1, "<font color=\"" + ANNOTATION_COLOR + "\"><b>");<NEW_LINE>}<NEW_LINE>return state;<NEW_LINE>} | out.length() - 2); |
1,789,337 | private void readOutParamsAsArray(CallableStatement cStmt) throws SQLException {<NEW_LINE>// Read OUT parameter.<NEW_LINE>final Array outParam = cStmt.getArray(2);<NEW_LINE>final Object[] outParamArrayOfRecords = (Object[]) outParam.getArray();<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < NO_OF_RECORDS; i++) {<NEW_LINE>final Struct record = (Struct) outParamArrayOfRecords[i];<NEW_LINE>final Object[] attrs = record.getAttributes();<NEW_LINE>System.out.print(attrs[0] + "," + attrs[1] + ";\t");<NEW_LINE>}<NEW_LINE>// Read IN OUT parameter.<NEW_LINE>final Array inOutParam = cStmt.getArray(3);<NEW_LINE>final Object[] inOutParamArrayOfRecords = (Object[]) inOutParam.getArray();<NEW_LINE>System.out.println("\n\nValues of IN OUT param read as an array of Strings:");<NEW_LINE>for (int i = 0; i < NO_OF_RECORDS; i++) {<NEW_LINE>final Struct record = (Struct) inOutParamArrayOfRecords[i];<NEW_LINE>final Object[] attrs = record.getAttributes();<NEW_LINE>System.out.print(attrs[0] + "," + attrs[1] + ";\t");<NEW_LINE>}<NEW_LINE>} | System.out.println("\nValues of OUT param read as an array of objects:"); |
1,463,197 | boolean isValueTypeMatch(@Nullable CollectionModel<?> collectionModel, ResolvableType target) {<NEW_LINE>if (collectionModel == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Collection<?> content = collectionModel.getContent();<NEW_LINE>if (content.isEmpty()) {<NEW_LINE>return collectionModel.getResolvableType().isAssignableFrom(target);<NEW_LINE>}<NEW_LINE>ResolvableType superType = null;<NEW_LINE>for (Class<?> collectionModelType : Arrays.<Class<?>>asList(collectionModel.getClass(), CollectionModel.class)) {<NEW_LINE><MASK><NEW_LINE>if (superType != null) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (superType == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Object element = content.iterator().next();<NEW_LINE>ResolvableType resourceType = superType.getGeneric(0);<NEW_LINE>if (element instanceof EntityModel) {<NEW_LINE>return EntityModelProcessorWrapper.isValueTypeMatch((EntityModel<?>) element, resourceType);<NEW_LINE>} else if (element instanceof RepresentationModel) {<NEW_LINE>return resourceType.isInstance(element);<NEW_LINE>} else if (element instanceof EmbeddedWrapper) {<NEW_LINE>return isRawTypeAssignable(resourceType, ((EmbeddedWrapper) element).getRelTargetType());<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>} | superType = getSuperType(target, collectionModelType); |
96,816 | public Object decode(byte[] bytes) throws CodingException {<NEW_LINE>Example example = null;<NEW_LINE>try {<NEW_LINE>example = Example.parseFrom(bytes);<NEW_LINE>} catch (InvalidProtocolBufferException e1) {<NEW_LINE>e1.printStackTrace();<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>Map<String, Feature> nameToFeature = example.getFeatures().getFeatureMap();<NEW_LINE>List<Object> fields = new ArrayList<>(outputConfig.count());<NEW_LINE>for (int i = 0; i < outputConfig.count(); i++) {<NEW_LINE>String colName = outputConfig.getColName(i);<NEW_LINE>DataTypesV2 type = outputConfig.getType(i);<NEW_LINE>if (colName != null) {<NEW_LINE>Feature f = nameToFeature.get(colName);<NEW_LINE>if (f != null) {<NEW_LINE>Object o = TFExampleConversionV2.featureToJava(type, f);<NEW_LINE>fields.add(o);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return outputConfig.createResultObject(fields);<NEW_LINE>} | CodingException(e1.getMessage()); |
683,881 | private CSharpTableHost buildExtraSqlBuilderHost(CodeGenContext codeGenCtx, GenTaskBySqlBuilder sqlBuilder) throws Exception {<NEW_LINE>GenTaskByTableViewSp tableViewSp = new GenTaskByTableViewSp();<NEW_LINE>tableViewSp.setCud_by_sp(false);<NEW_LINE>tableViewSp.setPagination(false);<NEW_LINE>tableViewSp.<MASK><NEW_LINE>tableViewSp.setDatabaseSetName(sqlBuilder.getDatabaseSetName());<NEW_LINE>tableViewSp.setPrefix("");<NEW_LINE>tableViewSp.setSuffix("");<NEW_LINE>DatabaseCategory dbCategory = DatabaseCategory.SqlServer;<NEW_LINE>String dbType = DbUtils.getDbType(sqlBuilder.getAllInOneName());<NEW_LINE>if (dbType != null && !dbType.equalsIgnoreCase("Microsoft SQL Server")) {<NEW_LINE>dbCategory = DatabaseCategory.MySql;<NEW_LINE>}<NEW_LINE>List<StoredProcedure> allSpNames = DbUtils.getAllSpNames(sqlBuilder.getAllInOneName());<NEW_LINE>return buildTableHost(codeGenCtx, tableViewSp, sqlBuilder.getTable_name(), dbCategory, allSpNames);<NEW_LINE>} | setAllInOneName(sqlBuilder.getAllInOneName()); |
1,760,926 | final UpdateKeyDescriptionResult executeUpdateKeyDescription(UpdateKeyDescriptionRequest updateKeyDescriptionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateKeyDescriptionRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateKeyDescriptionRequest> request = null;<NEW_LINE>Response<UpdateKeyDescriptionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateKeyDescriptionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateKeyDescriptionRequest));<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, "KMS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateKeyDescription");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateKeyDescriptionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateKeyDescriptionResultJsonUnmarshaller());<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 awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,674,744 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NEW_LINE>Response<UntagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall<MASK><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, "savingsplans");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UntagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());<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>} | (super.beforeMarshalling(untagResourceRequest)); |
925,937 | final CreatePrefetchScheduleResult executeCreatePrefetchSchedule(CreatePrefetchScheduleRequest createPrefetchScheduleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPrefetchScheduleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreatePrefetchScheduleRequest> request = null;<NEW_LINE>Response<CreatePrefetchScheduleResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreatePrefetchScheduleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createPrefetchScheduleRequest));<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, "MediaTailor");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePrefetchSchedule");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreatePrefetchScheduleResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreatePrefetchScheduleResultJsonUnmarshaller());<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()); |
345,574 | public static CovarianceMatrix make(Relation<? extends NumberVector> relation, DBIDs ids) {<NEW_LINE>int dim = RelationUtil.dimensionality(relation);<NEW_LINE>CovarianceMatrix c = new CovarianceMatrix(dim);<NEW_LINE>double[] mean = c.mean;<NEW_LINE>int count = 0;<NEW_LINE>// Compute mean first:<NEW_LINE>for (DBIDIter iditer = ids.iter(); iditer.valid(); iditer.advance()) {<NEW_LINE>NumberVector vec = relation.get(iditer);<NEW_LINE>for (int i = 0; i < dim; i++) {<NEW_LINE>mean[i] += vec.doubleValue(i);<NEW_LINE>}<NEW_LINE>count++;<NEW_LINE>}<NEW_LINE>if (count == 0) {<NEW_LINE>return c;<NEW_LINE>}<NEW_LINE>// Normalize mean<NEW_LINE>for (int i = 0; i < dim; i++) {<NEW_LINE>mean[i] /= count;<NEW_LINE>}<NEW_LINE>// Compute covariances second<NEW_LINE>// Two-pass approach is numerically okay and fast, when possible.<NEW_LINE>// Scratch space<NEW_LINE>double[] tmp = c.nmea;<NEW_LINE>double[][] elems = c.elements;<NEW_LINE>for (DBIDIter iditer = ids.iter(); iditer.valid(); iditer.advance()) {<NEW_LINE>NumberVector <MASK><NEW_LINE>for (int i = 0; i < dim; i++) {<NEW_LINE>tmp[i] = vec.doubleValue(i) - mean[i];<NEW_LINE>}<NEW_LINE>for (int i = 0; i < dim; i++) {<NEW_LINE>for (int j = i; j < dim; j++) {<NEW_LINE>elems[i][j] += tmp[i] * tmp[j];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Restore symmetry.<NEW_LINE>for (int i = 0; i < dim; i++) {<NEW_LINE>for (int j = i + 1; j < dim; j++) {<NEW_LINE>elems[j][i] = elems[i][j];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>c.wsum = count;<NEW_LINE>return c;<NEW_LINE>} | vec = relation.get(iditer); |
673,971 | public static GetAggregateResourceComplianceTimelineResponse unmarshall(GetAggregateResourceComplianceTimelineResponse getAggregateResourceComplianceTimelineResponse, UnmarshallerContext _ctx) {<NEW_LINE>getAggregateResourceComplianceTimelineResponse.setRequestId(_ctx.stringValue("GetAggregateResourceComplianceTimelineResponse.RequestId"));<NEW_LINE>ResourceComplianceTimeline resourceComplianceTimeline = new ResourceComplianceTimeline();<NEW_LINE>resourceComplianceTimeline.setNextToken(_ctx.stringValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.NextToken"));<NEW_LINE>resourceComplianceTimeline.setMaxResults(_ctx.integerValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.MaxResults"));<NEW_LINE>List<ComplianceListItem> complianceList = new ArrayList<ComplianceListItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList.Length"); i++) {<NEW_LINE>ComplianceListItem complianceListItem = new ComplianceListItem();<NEW_LINE>complianceListItem.setTags(_ctx.stringValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].Tags"));<NEW_LINE>complianceListItem.setAccountId(_ctx.stringValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].AccountId"));<NEW_LINE>complianceListItem.setAvailabilityZone(_ctx.stringValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].AvailabilityZone"));<NEW_LINE>complianceListItem.setResourceType(_ctx.stringValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].ResourceType"));<NEW_LINE>complianceListItem.setResourceCreateTime(_ctx.longValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].ResourceCreateTime"));<NEW_LINE>complianceListItem.setRegion(_ctx.stringValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].Region"));<NEW_LINE>complianceListItem.setConfiguration(_ctx.stringValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].Configuration"));<NEW_LINE>complianceListItem.setCaptureTime(_ctx.longValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].CaptureTime"));<NEW_LINE>complianceListItem.setConfigurationDiff(_ctx.stringValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].ConfigurationDiff"));<NEW_LINE>complianceListItem.setResourceId(_ctx.stringValue<MASK><NEW_LINE>complianceListItem.setResourceName(_ctx.stringValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].ResourceName"));<NEW_LINE>complianceListItem.setResourceStatus(_ctx.stringValue("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].ResourceStatus"));<NEW_LINE>complianceList.add(complianceListItem);<NEW_LINE>}<NEW_LINE>resourceComplianceTimeline.setComplianceList(complianceList);<NEW_LINE>getAggregateResourceComplianceTimelineResponse.setResourceComplianceTimeline(resourceComplianceTimeline);<NEW_LINE>return getAggregateResourceComplianceTimelineResponse;<NEW_LINE>} | ("GetAggregateResourceComplianceTimelineResponse.ResourceComplianceTimeline.ComplianceList[" + i + "].ResourceId")); |
1,204,012 | public void execute() throws IOException, URISyntaxException {<NEW_LINE>final ObjectMapper mapper = new ObjectMapper();<NEW_LINE>// 1. Read from the file into JSON.<NEW_LINE>final JsonNode userObj = mapper.readTree(new ClassPathResource("./boot/root_user.json").getFile());<NEW_LINE>if (!userObj.isObject()) {<NEW_LINE>throw new RuntimeException(String.format("Found malformed root user file, expected an Object but found %s", userObj.getNodeType()));<NEW_LINE>}<NEW_LINE>// 2. Ingest the user info<NEW_LINE>final Urn urn;<NEW_LINE>try {<NEW_LINE>urn = Urn.createFromString(userObj.get("urn").asText());<NEW_LINE>} catch (URISyntaxException e) {<NEW_LINE>log.error("Malformed urn: {}", userObj.get("urn").asText());<NEW_LINE>throw new RuntimeException("Malformed urn", e);<NEW_LINE>}<NEW_LINE>final CorpUserInfo info = RecordUtils.toRecordTemplate(CorpUserInfo.class, userObj.get("info").toString());<NEW_LINE>final CorpUserKey key = (CorpUserKey) EntityKeyUtils.convertUrnToEntityKey(urn, getUserKeySchema());<NEW_LINE>final AuditStamp aspectAuditStamp = new AuditStamp().setActor(Urn.createFromString(SYSTEM_ACTOR)).setTime(System.currentTimeMillis());<NEW_LINE>_entityService.ingestAspect(urn, CORP_USER_KEY_ASPECT_NAME, key, aspectAuditStamp, null);<NEW_LINE>_entityService.ingestAspect(urn, <MASK><NEW_LINE>} | USER_INFO_ASPECT_NAME, info, aspectAuditStamp, null); |
564,773 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see<NEW_LINE>* edu.umd.cs.findbugs.ba.ch.InheritanceGraphVisitor#visitClass(edu.umd.<NEW_LINE>* cs.findbugs.classfile.ClassDescriptor, edu.umd.cs.findbugs.ba.XClass)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public boolean visitClass(ClassDescriptor classDescriptor, XClass xclass) {<NEW_LINE>assert xclass != null;<NEW_LINE>String methodSignature = xmethod.getSignature();<NEW_LINE><MASK><NEW_LINE>// See if this class has an overridden method<NEW_LINE>XMethod xm = xclass.findMethod(xmethod.getName(), methodSignature, false);<NEW_LINE>if (xm == null && bridgedFrom != null && !classDescriptor.equals(xmethod.getClassDescriptor())) {<NEW_LINE>methodSignature = bridgedFrom.getSignature();<NEW_LINE>xm = xclass.findMethod(xmethod.getName(), methodSignature, false);<NEW_LINE>}<NEW_LINE>if (xm != null) {<NEW_LINE>return visitOverriddenMethod(xm) || bridgedFrom != null;<NEW_LINE>} else {<NEW_LINE>// Even though this particular class doesn't contain the method<NEW_LINE>// we're<NEW_LINE>// looking for, a superclass might, so we need to keep going.<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>} | XMethod bridgedFrom = xmethod.bridgeFrom(); |
864,426 | private IssueManagement parseIssueManagement(XmlPullParser parser, boolean strict) throws IOException, XmlPullParserException {<NEW_LINE>String tagName = parser.getName();<NEW_LINE>IssueManagement issueManagement = new IssueManagement();<NEW_LINE>for (int i = parser.getAttributeCount() - 1; i >= 0; i--) {<NEW_LINE>String name = parser.getAttributeName(i);<NEW_LINE>String value = parser.getAttributeValue(i);<NEW_LINE>if (name.indexOf(':') >= 0) {<NEW_LINE>// just ignore attributes with non-default namespace (for example: xmlns:xsi)<NEW_LINE>} else if ("system".equals(name)) {<NEW_LINE>issueManagement.setSystem(getTrimmedValue(value));<NEW_LINE>} else if ("url".equals(name)) {<NEW_LINE>issueManagement.setUrl(getTrimmedValue(value));<NEW_LINE>} else {<NEW_LINE>checkUnknownAttribute(parser, name, tagName, strict);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>java.util.Set parsed = <MASK><NEW_LINE>while ((strict ? parser.nextTag() : nextTag(parser)) == XmlPullParser.START_TAG) {<NEW_LINE>checkUnknownElement(parser, strict);<NEW_LINE>}<NEW_LINE>return issueManagement;<NEW_LINE>} | new java.util.HashSet(); |
204,504 | public String renameUser(@CommandParam(value = "userName", suggester = UsernameSuggester.class) String userName, @CommandParam(value = "newUserName") String newUserName) {<NEW_LINE>Iterable<EntityRef> clientInfoEntities = <MASK><NEW_LINE>for (EntityRef clientInfo : clientInfoEntities) {<NEW_LINE>DisplayNameComponent nameComp = clientInfo.getComponent(DisplayNameComponent.class);<NEW_LINE>if (newUserName.equalsIgnoreCase(nameComp.name)) {<NEW_LINE>throw new IllegalArgumentException("New user name is already in use");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (EntityRef clientInfo : clientInfoEntities) {<NEW_LINE>DisplayNameComponent nameComp = clientInfo.getComponent(DisplayNameComponent.class);<NEW_LINE>if (userName.equalsIgnoreCase(nameComp.name)) {<NEW_LINE>nameComp.name = newUserName;<NEW_LINE>clientInfo.saveComponent(nameComp);<NEW_LINE>return "User " + userName + " has been renamed to " + newUserName;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new IllegalArgumentException("No such user '" + userName + "'");<NEW_LINE>} | entityManager.getEntitiesWith(ClientInfoComponent.class); |
82,408 | public void exitNo_neighbor_activate_rb_stanza(No_neighbor_activate_rb_stanzaContext ctx) {<NEW_LINE>BgpProcess proc = currentVrf().getBgpProcess();<NEW_LINE>if (ctx.ip != null) {<NEW_LINE>Ip ip = toIp(ctx.ip);<NEW_LINE>IpBgpPeerGroup pg = proc.getIpPeerGroups().get(ip);<NEW_LINE>if (pg == null) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>pg.setActive(false);<NEW_LINE>}<NEW_LINE>} else if (ctx.ip6 != null) {<NEW_LINE>Ip6 ip6 = toIp6(ctx.ip6);<NEW_LINE>Ipv6BgpPeerGroup pg = proc.getIpv6PeerGroups().get(ip6);<NEW_LINE>if (pg == null) {<NEW_LINE>warn(ctx, "ignoring attempt to activate undefined ipv6 peer group: " + ip6);<NEW_LINE>} else {<NEW_LINE>pg.setActive(false);<NEW_LINE>}<NEW_LINE>} else if (ctx.peergroup != null) {<NEW_LINE>String pgName = ctx.peergroup.getText();<NEW_LINE>NamedBgpPeerGroup npg = proc.getNamedPeerGroups().get(pgName);<NEW_LINE>npg.setActive(false);<NEW_LINE>for (IpBgpPeerGroup ipg : proc.getIpPeerGroups().values()) {<NEW_LINE>String currentGroupName = ipg.getGroupName();<NEW_LINE>if (currentGroupName != null && currentGroupName.equals(pgName)) {<NEW_LINE>ipg.setActive(false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (Ipv6BgpPeerGroup ipg : proc.getIpv6PeerGroups().values()) {<NEW_LINE>String currentGroupName = ipg.getGroupName();<NEW_LINE>if (currentGroupName != null && currentGroupName.equals(pgName)) {<NEW_LINE>ipg.setActive(false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | warn(ctx, "ignoring attempt to activate undefined ip peer group: " + ip); |
1,021,990 | public OcamlLibrary createBuildRule(BuildRuleCreationContextWithTargetGraph context, BuildTarget buildTarget, BuildRuleParams params, PrebuiltOcamlLibraryDescriptionArg args) {<NEW_LINE>boolean bytecodeOnly = args.getBytecodeOnly();<NEW_LINE>String libDir = args.getLibDir();<NEW_LINE>String nativeLib = args.getNativeLib();<NEW_LINE>String bytecodeLib = args.getBytecodeLib();<NEW_LINE>ImmutableList<String> cLibs = args.getCLibs();<NEW_LINE>ImmutableList<String> nativeCLibs = args.getNativeCLibs();<NEW_LINE>ImmutableList<String> bytecodeCLibs = args.getBytecodeCLibs();<NEW_LINE>Path libPath = buildTarget.getCellRelativeBasePath().getPath().toPath(context.getProjectFilesystem().getFileSystem()).resolve(libDir);<NEW_LINE>Path includeDir = libPath.resolve(args.getIncludeDir());<NEW_LINE>ProjectFilesystem projectFilesystem = context.getProjectFilesystem();<NEW_LINE>Optional<SourcePath> staticNativeLibraryPath = bytecodeOnly ? Optional.empty() : Optional.of(PathSourcePath.of(projectFilesystem, libPath.resolve(nativeLib)));<NEW_LINE>SourcePath staticBytecodeLibraryPath = PathSourcePath.of(projectFilesystem<MASK><NEW_LINE>ImmutableList<SourcePath> staticCLibraryPaths = cLibs.stream().map(input -> PathSourcePath.of(projectFilesystem, libPath.resolve(input))).collect(ImmutableList.toImmutableList());<NEW_LINE>ImmutableList<SourcePath> staticNativeCLibraryPaths = nativeCLibs.stream().map(input -> PathSourcePath.of(projectFilesystem, libPath.resolve(input))).collect(ImmutableList.toImmutableList());<NEW_LINE>ImmutableList<SourcePath> staticBytecodeCLibraryPaths = bytecodeCLibs.stream().map(input -> PathSourcePath.of(projectFilesystem, libPath.resolve(input))).collect(ImmutableList.toImmutableList());<NEW_LINE>SourcePath bytecodeLibraryPath = PathSourcePath.of(projectFilesystem, libPath.resolve(bytecodeLib));<NEW_LINE>CxxDeps allDeps = CxxDeps.builder().addDeps(args.getDeps()).addPlatformDeps(args.getPlatformDeps()).build();<NEW_LINE>return new PrebuiltOcamlLibrary(buildTarget, projectFilesystem, params, context.getActionGraphBuilder(), staticNativeLibraryPath, staticBytecodeLibraryPath, staticCLibraryPaths, staticNativeCLibraryPaths, staticBytecodeCLibraryPaths, bytecodeLibraryPath, libPath, includeDir, allDeps);<NEW_LINE>} | , libPath.resolve(bytecodeLib)); |
1,844,665 | private Mono<Response<AttestationProviderInner>> createWithResponseAsync(String resourceGroupName, String providerName, AttestationServiceCreationParams creationParams, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (providerName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (creationParams == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter creationParams is required and cannot be null."));<NEW_LINE>} else {<NEW_LINE>creationParams.validate();<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, providerName, this.client.getApiVersion(), creationParams, accept, context);<NEW_LINE>} | error(new IllegalArgumentException("Parameter providerName is required and cannot be null.")); |
776,956 | private void extractAmountAndType(@NonNull final ReportEntry8 ntry, @NonNull final EntryTransaction8 txDtls, @NonNull final ESRTransactionBuilder trxBuilder) {<NEW_LINE>// credit-or-debit indicator<NEW_LINE>final ActiveOrHistoricCurrencyAndAmount transactionDetailAmt = txDtls.getAmt();<NEW_LINE>final BigDecimal amount = transactionDetailAmt.getValue().multiply(getCrdDbtMultiplier(txDtls.getCdtDbtInd())).multiply(getRvslMultiplier(ntry));<NEW_LINE>trxBuilder.amount(amount);<NEW_LINE>if (txDtls.getCdtDbtInd() == CreditDebitCode.CRDT) {<NEW_LINE>if (isReversal(ntry)) {<NEW_LINE>trxBuilder.trxType(ESRConstants.ESRTRXTYPE_ReverseBooking);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// we get charged; currently not supported<NEW_LINE>trxBuilder.trxType(ESRConstants.ESRTRXTYPE_UNKNOWN).errorMsg(getErrorMsg(ESRDataImporterCamt54.MSG_UNSUPPORTED_CREDIT_DEBIT_CODE_1P, ntry.getCdtDbtInd()));<NEW_LINE>}<NEW_LINE>} | trxBuilder.trxType(ESRConstants.ESRTRXTYPE_CreditMemo); |
1,270,574 | protected List<AppNode> eatAppList(boolean preceedingSourceChannelSpecified) {<NEW_LINE>Tokens tokens = getTokens();<NEW_LINE>List<AppNode> appNodes = new ArrayList<AppNode>();<NEW_LINE>int usedListDelimiter = -1;<NEW_LINE>int usedStreamDelimiter = -1;<NEW_LINE>appNodes.add(eatApp());<NEW_LINE>while (tokens.hasNext()) {<NEW_LINE>Token t = tokens.peek();<NEW_LINE>if (t.kind == TokenKind.PIPE) {<NEW_LINE>if (usedListDelimiter >= 0) {<NEW_LINE>tokens.raiseException(t.startPos, DSLMessage.DONT_MIX_PIPE_AND_DOUBLEPIPE);<NEW_LINE>}<NEW_LINE>usedStreamDelimiter = t.startPos;<NEW_LINE>tokens.next();<NEW_LINE><MASK><NEW_LINE>} else if (t.kind == TokenKind.DOUBLEPIPE) {<NEW_LINE>if (preceedingSourceChannelSpecified) {<NEW_LINE>tokens.raiseException(t.startPos, DSLMessage.DONT_USE_DOUBLEPIPE_WITH_CHANNELS);<NEW_LINE>}<NEW_LINE>if (usedStreamDelimiter >= 0) {<NEW_LINE>tokens.raiseException(t.startPos, DSLMessage.DONT_MIX_PIPE_AND_DOUBLEPIPE);<NEW_LINE>}<NEW_LINE>usedListDelimiter = t.startPos;<NEW_LINE>tokens.next();<NEW_LINE>appNodes.add(eatApp());<NEW_LINE>} else {<NEW_LINE>// might be followed by sink destination<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean isFollowedBySinkChannel = tokens.peek(TokenKind.GT);<NEW_LINE>if (isFollowedBySinkChannel && usedListDelimiter >= 0) {<NEW_LINE>tokens.raiseException(usedListDelimiter, DSLMessage.DONT_USE_DOUBLEPIPE_WITH_CHANNELS);<NEW_LINE>}<NEW_LINE>for (AppNode appNode : appNodes) {<NEW_LINE>appNode.setUnboundStreamApp(!preceedingSourceChannelSpecified && !isFollowedBySinkChannel && (usedStreamDelimiter < 0));<NEW_LINE>}<NEW_LINE>return appNodes;<NEW_LINE>} | appNodes.add(eatApp()); |
1,077,845 | public void testSetDisableMessageTimestamp_TCP_SecOn(HttpServletRequest request, HttpServletResponse response) throws Throwable {<NEW_LINE>boolean exceptionFlag = false;<NEW_LINE>JMSContext jmsContext = QCFTCP.createContext();<NEW_LINE>emptyQueue(QCFTCP, queue2);<NEW_LINE>JMSProducer jmsProducer = jmsContext.createProducer();<NEW_LINE>JMSConsumer jmsConsumer = jmsContext.createConsumer(queue2);<NEW_LINE>TextMessage msg = jmsContext.createTextMessage();<NEW_LINE>boolean defaultSetMessageTimestamp = jmsProducer.getDisableMessageTimestamp();<NEW_LINE>jmsProducer.setDisableMessageTimestamp(true);<NEW_LINE>jmsProducer.send(queue2, msg);<NEW_LINE>long msgTS = jmsConsumer.<MASK><NEW_LINE>if (!(defaultSetMessageTimestamp == false && msgTS == 0))<NEW_LINE>exceptionFlag = true;<NEW_LINE>if (exceptionFlag)<NEW_LINE>throw new WrongException("testSetDisableMessageTimestamp_TCP_SecOn failed ");<NEW_LINE>jmsConsumer.close();<NEW_LINE>jmsContext.close();<NEW_LINE>} | receive(30000).getJMSTimestamp(); |
1,744,849 | private void logDebugInfo(DocumentEvent e, LineCol onesideStartPosition, LineCol onesideEndPosition, int twosideStartLine, int twosideEndLine) {<NEW_LINE>StringBuilder info = new StringBuilder();<NEW_LINE>Document document1 = getDocument(Side.LEFT);<NEW_LINE>Document document2 = getDocument(Side.RIGHT);<NEW_LINE>info.append("==== UnifiedDiffViewer Debug Info ====");<NEW_LINE>info.append("myMasterSide - ").append(myMasterSide).append('\n');<NEW_LINE>info.append("myLeftDocument.length() - ").append(document1.getTextLength()).append('\n');<NEW_LINE>info.append("myRightDocument.length() - ").append(document2.getTextLength()).append('\n');<NEW_LINE>info.append("myDocument.length() - ").append(myDocument.getTextLength()).append('\n');<NEW_LINE>info.append("e.getOffset() - ").append(e.getOffset<MASK><NEW_LINE>info.append("e.getNewLength() - ").append(e.getNewLength()).append('\n');<NEW_LINE>info.append("e.getOldLength() - ").append(e.getOldLength()).append('\n');<NEW_LINE>info.append("onesideStartPosition - ").append(onesideStartPosition).append('\n');<NEW_LINE>info.append("onesideEndPosition - ").append(onesideEndPosition).append('\n');<NEW_LINE>info.append("twosideStartLine - ").append(twosideStartLine).append('\n');<NEW_LINE>info.append("twosideEndLine - ").append(twosideEndLine).append('\n');<NEW_LINE>Pair<int[], Side> pair1 = transferLineFromOneside(onesideStartPosition.line);<NEW_LINE>Pair<int[], Side> pair2 = transferLineFromOneside(onesideEndPosition.line);<NEW_LINE>info.append("non-strict transferStartLine - ").append(pair1.first[0]).append("-").append(pair1.first[1]).append(":").append(pair1.second).append('\n');<NEW_LINE>info.append("non-strict transferEndLine - ").append(pair2.first[0]).append("-").append(pair2.first[1]).append(":").append(pair2.second).append('\n');<NEW_LINE>info.append("---- UnifiedDiffViewer Debug Info ----");<NEW_LINE>LOG.warn(info.toString());<NEW_LINE>} | ()).append('\n'); |
660,333 | final GetAWSOrganizationsAccessStatusResult executeGetAWSOrganizationsAccessStatus(GetAWSOrganizationsAccessStatusRequest getAWSOrganizationsAccessStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getAWSOrganizationsAccessStatusRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetAWSOrganizationsAccessStatusRequest> request = null;<NEW_LINE>Response<GetAWSOrganizationsAccessStatusResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetAWSOrganizationsAccessStatusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getAWSOrganizationsAccessStatusRequest));<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, "Service Catalog");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAWSOrganizationsAccessStatus");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetAWSOrganizationsAccessStatusResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetAWSOrganizationsAccessStatusResultJsonUnmarshaller());<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()); |
157,187 | static void compile(JavaCompiler compiler, List<String> options, ResourceFinder sourceFinder, Charset sourceFileCharset, ResourceFinder classFileFinder, ResourceCreator classFileCreator, Resource[] sourceFiles, @Nullable ErrorHandler compileErrorHandler, @Nullable WarningHandler warningHandler, @Nullable SortedSet<Location> offsets) throws CompileException, IOException {<NEW_LINE>// Wrap the source files in JavaFileObjects.<NEW_LINE>Collection<JavaFileObject> sourceFileObjects = new ArrayList<>();<NEW_LINE>for (int i = 0; i < sourceFiles.length; i++) {<NEW_LINE>Resource sourceResource = sourceFiles[i];<NEW_LINE>String fn = sourceResource.getFileName();<NEW_LINE>String className = fn.substring(fn.lastIndexOf(File.separatorChar) + 1).replace('/', '.');<NEW_LINE>if (className.endsWith(".java"))<NEW_LINE>className = className.substring(0, className.length() - 5);<NEW_LINE>sourceFileObjects.add(JavaFileObjects.fromResource(sourceResource, className<MASK><NEW_LINE>}<NEW_LINE>final JavaFileManager fileManager = Compiler.getJavaFileManager(compiler, sourceFinder, sourceFileCharset, classFileFinder, classFileCreator);<NEW_LINE>try {<NEW_LINE>Compiler.compile(compiler, options, sourceFileObjects, fileManager, compileErrorHandler, warningHandler, offsets);<NEW_LINE>} finally {<NEW_LINE>fileManager.close();<NEW_LINE>}<NEW_LINE>} | , Kind.SOURCE, sourceFileCharset)); |
1,254,315 | public void moveText(int srcStart, int srcEnd, int dstOffset) {<NEW_LINE>assertBounds(srcStart, srcEnd);<NEW_LINE>if (dstOffset == srcStart || dstOffset == srcEnd)<NEW_LINE>return;<NEW_LINE>ProperTextRange srcRange = new ProperTextRange(srcStart, srcEnd);<NEW_LINE>assert !srcRange.containsOffset(dstOffset) : "Can't perform text move from range [" + srcStart + "; " + srcEnd + ") to offset " + dstOffset;<NEW_LINE>String replacement = getCharsSequence().subSequence(<MASK><NEW_LINE>insertString(dstOffset, replacement);<NEW_LINE>int shift = 0;<NEW_LINE>if (dstOffset < srcStart) {<NEW_LINE>shift = srcEnd - srcStart;<NEW_LINE>}<NEW_LINE>fireMoveText(srcStart + shift, srcEnd + shift, dstOffset);<NEW_LINE>deleteString(srcStart + shift, srcEnd + shift);<NEW_LINE>} | srcStart, srcEnd).toString(); |
1,744,792 | public static DiffLog mergeTrees(@Nonnull final PsiFileImpl fileImpl, @Nonnull final ASTNode oldRoot, @Nonnull final ASTNode newRoot, @Nonnull ProgressIndicator indicator, @Nonnull CharSequence lastCommittedText) {<NEW_LINE>PsiUtilCore.ensureValid(fileImpl);<NEW_LINE>if (newRoot instanceof FileElement) {<NEW_LINE><MASK><NEW_LINE>if (fileImplElement != null) {<NEW_LINE>((FileElement) newRoot).setCharTable(fileImplElement.getCharTable());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>newRoot.putUserData(TREE_TO_BE_REPARSED, Pair.create(oldRoot, lastCommittedText));<NEW_LINE>if (isReplaceWholeNode(fileImpl, newRoot)) {<NEW_LINE>DiffLog treeChangeEvent = replaceElementWithEvents(oldRoot, newRoot);<NEW_LINE>fileImpl.putUserData(TREE_DEPTH_LIMIT_EXCEEDED, Boolean.TRUE);<NEW_LINE>return treeChangeEvent;<NEW_LINE>}<NEW_LINE>// maybe reparsed in PsiBuilderImpl and have thrown exception here<NEW_LINE>newRoot.getFirstChildNode();<NEW_LINE>} catch (ReparsedSuccessfullyException e) {<NEW_LINE>// reparsed in PsiBuilderImpl<NEW_LINE>return e.getDiffLog();<NEW_LINE>} finally {<NEW_LINE>newRoot.putUserData(TREE_TO_BE_REPARSED, null);<NEW_LINE>}<NEW_LINE>final ASTShallowComparator comparator = new ASTShallowComparator(indicator);<NEW_LINE>final ASTStructure treeStructure = createInterruptibleASTStructure(newRoot, indicator);<NEW_LINE>DiffLog diffLog = new DiffLog();<NEW_LINE>diffTrees(oldRoot, diffLog, comparator, treeStructure, indicator, lastCommittedText);<NEW_LINE>return diffLog;<NEW_LINE>} | FileElement fileImplElement = fileImpl.getTreeElement(); |
829,570 | private ArrayTableFunction readUnnestFunction() {<NEW_LINE>ArrayTableFunction f = new ArrayTableFunction(ArrayTableFunction.UNNEST);<NEW_LINE>ArrayList<Column<MASK><NEW_LINE>if (!readIf(CLOSE_PAREN)) {<NEW_LINE>int i = 0;<NEW_LINE>do {<NEW_LINE>Expression expr = readExpression();<NEW_LINE>TypeInfo columnType = TypeInfo.TYPE_NULL;<NEW_LINE>if (expr.isConstant()) {<NEW_LINE>expr = expr.optimize(session);<NEW_LINE>TypeInfo exprType = expr.getType();<NEW_LINE>if (exprType.getValueType() == Value.ARRAY) {<NEW_LINE>columnType = (TypeInfo) exprType.getExtTypeInfo();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>f.addParameter(expr);<NEW_LINE>columns.add(new Column("C" + ++i, columnType));<NEW_LINE>} while (readIfMore());<NEW_LINE>}<NEW_LINE>if (readIf(WITH)) {<NEW_LINE>read("ORDINALITY");<NEW_LINE>columns.add(new Column("NORD", TypeInfo.TYPE_INTEGER));<NEW_LINE>}<NEW_LINE>f.setColumns(columns);<NEW_LINE>f.doneWithParameters();<NEW_LINE>return f;<NEW_LINE>} | > columns = Utils.newSmallArrayList(); |
30,514 | protected Auth directGrantAuth(String username, String password) throws IOException, VerificationException {<NEW_LINE>String authServerBaseUrl = deployment.getAuthServerBaseUrl();<NEW_LINE>HttpPost post = new HttpPost(deployment.getTokenUrl());<NEW_LINE>List<NameValuePair> formparams = new ArrayList<NameValuePair>();<NEW_LINE>formparams.add(new BasicNameValuePair(OAuth2Constants.GRANT_TYPE, OAuth2Constants.PASSWORD));<NEW_LINE>formparams.add(new BasicNameValuePair("username", username));<NEW_LINE>formparams.add(new BasicNameValuePair("password", password));<NEW_LINE>if (scope != null) {<NEW_LINE>formparams.add(new BasicNameValuePair(OAuth2Constants.SCOPE, scope));<NEW_LINE>}<NEW_LINE>ClientCredentialsProviderUtils.setClientCredentials(deployment, post, formparams);<NEW_LINE>UrlEncodedFormEntity form = new UrlEncodedFormEntity(formparams, "UTF-8");<NEW_LINE>post.setEntity(form);<NEW_LINE>HttpClient client = deployment.getClient();<NEW_LINE>HttpResponse response = client.execute(post);<NEW_LINE>int status = response.getStatusLine().getStatusCode();<NEW_LINE>HttpEntity entity = response.getEntity();<NEW_LINE>if (status != 200) {<NEW_LINE>StringBuilder errorBuilder = new StringBuilder("Login failed. Invalid status: " + status);<NEW_LINE>if (entity != null) {<NEW_LINE>InputStream is = entity.getContent();<NEW_LINE>OAuth2ErrorRepresentation errorRep = JsonSerialization.<MASK><NEW_LINE>errorBuilder.append(", OAuth2 error. Error: " + errorRep.getError()).append(", Error description: " + errorRep.getErrorDescription());<NEW_LINE>}<NEW_LINE>String error = errorBuilder.toString();<NEW_LINE>log.warn(error);<NEW_LINE>throw new IOException(error);<NEW_LINE>}<NEW_LINE>if (entity == null) {<NEW_LINE>throw new IOException("No Entity");<NEW_LINE>}<NEW_LINE>InputStream is = entity.getContent();<NEW_LINE>AccessTokenResponse tokenResponse = JsonSerialization.readValue(is, AccessTokenResponse.class);<NEW_LINE>// refreshToken will be saved to privateCreds of Subject for now<NEW_LINE>refreshToken = tokenResponse.getRefreshToken();<NEW_LINE>AdapterTokenVerifier.VerifiedTokens tokens = AdapterTokenVerifier.verifyTokens(tokenResponse.getToken(), tokenResponse.getIdToken(), deployment);<NEW_LINE>return postTokenVerification(tokenResponse.getToken(), tokens.getAccessToken());<NEW_LINE>} | readValue(is, OAuth2ErrorRepresentation.class); |
772,013 | // @Override<NEW_LINE>public void fetch(URL url, OutputStream writeTo) throws IOException {<NEW_LINE>URLConnection conn = null;<NEW_LINE>InputStream input = null;<NEW_LINE>try {<NEW_LINE>conn = connectionFactory.createConnection(url);<NEW_LINE>conn.connect();<NEW_LINE>if (DEBUG) {<NEW_LINE>System.out.println(">>> " + url);<NEW_LINE>Map<String, List<String>> headers = conn.getHeaderFields();<NEW_LINE>for (Entry<String, List<String>> header : headers.entrySet()) {<NEW_LINE>System.out.println(header.getKey() + ":");<NEW_LINE>for (String value : header.getValue()) {<NEW_LINE>System.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");<NEW_LINE>}<NEW_LINE>input = conn.getInputStream();<NEW_LINE>IOUtil.pipe(input, writeTo);<NEW_LINE>} finally {<NEW_LINE>if (input != null) {<NEW_LINE>try {<NEW_LINE>input.close();<NEW_LINE>} catch (Throwable e) {<NEW_LINE>// ignore.<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | out.println(" " + value); |
1,623,145 | private static Map<Class<? extends Annotation>, Annotation> buildAnnotations(Join join) {<NEW_LINE>Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<>();<NEW_LINE>annotations.put(com.yahoo.elide.datastores.aggregation.annotation.Join.class, new com.yahoo.elide.datastores.aggregation.annotation.Join() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Class<? extends Annotation> annotationType() {<NEW_LINE>return com.yahoo.elide.datastores.aggregation.annotation.Join.class;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String value() {<NEW_LINE>return <MASK><NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public JoinType type() {<NEW_LINE>if (join.getType() == null) {<NEW_LINE>return JoinType.LEFT;<NEW_LINE>}<NEW_LINE>return JoinType.valueOf(join.getType().name());<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean toOne() {<NEW_LINE>return join.getKind() == Join.Kind.TOONE;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return annotations;<NEW_LINE>} | trimColumnReferences(join.getDefinition()); |
762,667 | public RegularStatement call() throws Exception {<NEW_LINE>Selection select = QueryBuilder.select();<NEW_LINE>for (int i = 0; i < allPrimayKeyCols.length; i++) {<NEW_LINE>select.column(allPrimayKeyCols[i]);<NEW_LINE>}<NEW_LINE>for (ColumnDefinition colDef : regularCols) {<NEW_LINE>String colName = colDef.getName();<NEW_LINE>select.column(colName).ttl(colName).writeTime(colName);<NEW_LINE>}<NEW_LINE>Where stmt = select.from(keyspace, cfDef.getName()).where(eq(partitionKeyCol, BIND_MARKER));<NEW_LINE>List<RangeQueryRecord> records = rowQuery<MASK><NEW_LINE>int componentIndex = 0;<NEW_LINE>for (RangeQueryRecord record : records) {<NEW_LINE>for (RangeQueryOp op : record.getOps()) {<NEW_LINE>String columnName = clusteringKeyCols.get(componentIndex).getName();<NEW_LINE>switch(op.getOperator()) {<NEW_LINE>case EQUAL:<NEW_LINE>stmt.and(eq(columnName, BIND_MARKER));<NEW_LINE>componentIndex++;<NEW_LINE>break;<NEW_LINE>case LESS_THAN:<NEW_LINE>stmt.and(lt(columnName, BIND_MARKER));<NEW_LINE>break;<NEW_LINE>case LESS_THAN_EQUALS:<NEW_LINE>stmt.and(lte(columnName, BIND_MARKER));<NEW_LINE>break;<NEW_LINE>case GREATER_THAN:<NEW_LINE>stmt.and(gt(columnName, BIND_MARKER));<NEW_LINE>break;<NEW_LINE>case GREATER_THAN_EQUALS:<NEW_LINE>stmt.and(gte(columnName, BIND_MARKER));<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new RuntimeException("Cannot recognize operator: " + op.getOperator().name());<NEW_LINE>}<NEW_LINE>// end of switch stmt<NEW_LINE>;<NEW_LINE>}<NEW_LINE>// end of inner for for ops for each range query record<NEW_LINE>}<NEW_LINE>return stmt;<NEW_LINE>} | .getCompositeRange().getRecords(); |
566,761 | void showFileBrowser(final String[] acceptTypes, ValueCallback<Uri[]> filePathCallback) {<NEW_LINE>MainController.get().switchToBubbleView(false);<NEW_LINE>mFilePathCallback = filePathCallback;<NEW_LINE>Runnable runnable = new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>mHandler.post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>Intent i = new Intent(Intent.ACTION_GET_CONTENT);<NEW_LINE>i.addCategory(Intent.CATEGORY_OPENABLE);<NEW_LINE>// Android intents wants mime types, filepickers can specify<NEW_LINE>// mime types or file types, filter out the file types.<NEW_LINE>ArrayList<String> filteredList = new ArrayList<>();<NEW_LINE>for (String acceptType : acceptTypes) {<NEW_LINE>if (acceptType.contains("/")) {<NEW_LINE>filteredList.add(acceptType);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (filteredList.size() == 0) {<NEW_LINE>i.setType("*/*");<NEW_LINE>} else {<NEW_LINE>i.setType(StringUtil.join(filteredList, ","));<NEW_LINE>}<NEW_LINE>startActivityForResult(Intent.createChooser<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>};<NEW_LINE>new Thread(runnable).start();<NEW_LINE>} | (i, "File Chooser"), FILECHOOSER_RESULTCODE); |
1,723,558 | public void doImageSave() {<NEW_LINE>if (!isGif) {<NEW_LINE>if (Reddit.appRestart.getString("imagelocation", "").isEmpty()) {<NEW_LINE>showFirstDialog();<NEW_LINE>} else if (!new File(Reddit.appRestart.getString("imagelocation", "")).exists()) {<NEW_LINE>showErrorDialog();<NEW_LINE>} else {<NEW_LINE>Intent i = new <MASK><NEW_LINE>// always download the original file, or use the cached original if that is currently displayed<NEW_LINE>i.putExtra("actuallyLoaded", contentUrl);<NEW_LINE>if (subreddit != null && !subreddit.isEmpty())<NEW_LINE>i.putExtra("subreddit", subreddit);<NEW_LINE>if (submissionTitle != null)<NEW_LINE>i.putExtra(EXTRA_SUBMISSION_TITLE, submissionTitle);<NEW_LINE>i.putExtra("index", index);<NEW_LINE>startService(i);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>doOnClick.run();<NEW_LINE>}<NEW_LINE>} | Intent(this, ImageDownloadNotificationService.class); |
515,170 | private static String convertBetweenTimeZones(String timestampString, TimeZone fromTimeZone, TimeZone toTimeZone, long precision) {<NEW_LINE>boolean needTimeZoneConversion = needTimeZoneConversion(fromTimeZone) || needTimeZoneConversion(toTimeZone);<NEW_LINE>if (!needTimeZoneConversion || TStringUtil.isBlank(timestampString) || isZeroValue(timestampString)) {<NEW_LINE>// Don't need conversion.<NEW_LINE>return timestampString;<NEW_LINE>}<NEW_LINE>MysqlDateTime mysqlDateTime = StringTimeParser.parseDatetime(timestampString.getBytes());<NEW_LINE>if (mysqlDateTime == null) {<NEW_LINE>// Failed to parse for some reason, so return original timestamp string.<NEW_LINE>return timestampString;<NEW_LINE>}<NEW_LINE>TimeZone <MASK><NEW_LINE>if (fromTimeZone == null) {<NEW_LINE>fromTimeZone = fixedTimeZone;<NEW_LINE>}<NEW_LINE>if (toTimeZone == null) {<NEW_LINE>toTimeZone = fixedTimeZone;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return convertBetweenTimeZones(mysqlDateTime, fromTimeZone, toTimeZone, precision);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.error(String.format("Failed to convert %s from %s to %s. Caused by: %s", timestampString, fromTimeZone.getID(), toTimeZone.getID(), e.getMessage()), e);<NEW_LINE>return timestampString;<NEW_LINE>}<NEW_LINE>} | fixedTimeZone = TimeZone.getTimeZone(FIXED_GMT_IN_META); |
810,992 | private static final void exportDomain0(Configuration configuration, InformationSchema result, Domain<?> d) {<NEW_LINE>org.jooq.util.xml.jaxb.Domain id = new org.jooq.util.xml.jaxb.Domain();<NEW_LINE>String catalogName = catalogName(d);<NEW_LINE>String schemaName = schemaName(d);<NEW_LINE>String domainName = d.getName();<NEW_LINE>if (!isBlank(catalogName))<NEW_LINE>id.setDomainCatalog(catalogName);<NEW_LINE>if (!isBlank(schemaName))<NEW_LINE>id.setDomainSchema(schemaName);<NEW_LINE>id.setDomainName(domainName);<NEW_LINE>id.setDataType(d.getDataType().getTypeName(configuration));<NEW_LINE>if (d.getDataType().lengthDefined())<NEW_LINE>id.setCharacterMaximumLength(d.<MASK><NEW_LINE>if (d.getDataType().precisionDefined())<NEW_LINE>id.setNumericPrecision(d.getDataType().precision());<NEW_LINE>if (d.getDataType().scaleDefined())<NEW_LINE>id.setNumericScale(d.getDataType().scale());<NEW_LINE>result.getDomains().add(id);<NEW_LINE>for (Check<?> c : d.getChecks()) {<NEW_LINE>org.jooq.util.xml.jaxb.DomainConstraint idc = new org.jooq.util.xml.jaxb.DomainConstraint();<NEW_LINE>org.jooq.util.xml.jaxb.CheckConstraint icc = new org.jooq.util.xml.jaxb.CheckConstraint();<NEW_LINE>if (!isBlank(catalogName)) {<NEW_LINE>idc.setDomainCatalog(catalogName);<NEW_LINE>idc.setConstraintCatalog(catalogName);<NEW_LINE>icc.setConstraintCatalog(catalogName);<NEW_LINE>}<NEW_LINE>if (!isBlank(schemaName)) {<NEW_LINE>idc.setDomainSchema(schemaName);<NEW_LINE>idc.setConstraintSchema(schemaName);<NEW_LINE>icc.setConstraintSchema(schemaName);<NEW_LINE>}<NEW_LINE>idc.setDomainName(domainName);<NEW_LINE>idc.setConstraintName(c.getName());<NEW_LINE>icc.setConstraintName(c.getName());<NEW_LINE>icc.setCheckClause(configuration.dsl().render(c.condition()));<NEW_LINE>result.getDomainConstraints().add(idc);<NEW_LINE>result.getCheckConstraints().add(icc);<NEW_LINE>}<NEW_LINE>} | getDataType().length()); |
629,748 | public void paintComponent(Graphics g) {<NEW_LINE>super.paintComponent(g);<NEW_LINE>Graphics2D g2d = (Graphics2D) g;<NEW_LINE>if (opacity == 0)<NEW_LINE>return;<NEW_LINE>Rectangle r = getBounds();<NEW_LINE>g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR, 1.0f));<NEW_LINE>g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);<NEW_LINE>if (shape == RECTANGLE) {<NEW_LINE>g2d.fillRect(0, 0, r.width - 1, r.height - 1);<NEW_LINE>g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f * (1 - opacity)));<NEW_LINE>g2d.fillRect(0, 0, r.width - 1, r.height - 1);<NEW_LINE>} else if (shape == CIRCLE) {<NEW_LINE>Ellipse2D.Double ellipse = new Ellipse2D.Double(0, 0, r.width, r.height);<NEW_LINE>g2d.fill(ellipse);<NEW_LINE>// adding visual ringing effect<NEW_LINE>g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity));<NEW_LINE>int[] ds = { 0, 2, 4, 6 };<NEW_LINE>float[] bs <MASK><NEW_LINE>for (int i = 0; i < 3; ++i) {<NEW_LINE>int d = ds[i];<NEW_LINE>float b = bs[i];<NEW_LINE>g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity));<NEW_LINE>ellipse = new Ellipse2D.Double(d, d, r.width - 2 * d, r.height - 2 * d);<NEW_LINE>g2d.setColor(new Color(0f, 0f, 0f, b));<NEW_LINE>g2d.fill(ellipse);<NEW_LINE>d = ds[i + 1];<NEW_LINE>g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR, 1.0f));<NEW_LINE>ellipse = new Ellipse2D.Double(d, d, r.width - 2 * d, r.height - 2 * d);<NEW_LINE>g2d.setColor(Color.black);<NEW_LINE>g2d.fill(ellipse);<NEW_LINE>g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f * (1 - opacity)));<NEW_LINE>// 0,0,r.width-1,r.height-1);<NEW_LINE>g2d.fill(ellipse);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f));<NEW_LINE>} | = { 0.25f, 0.15f, 0.1f }; |
1,306,079 | public void endVisit(ExplicitConstructorCall x, BlockScope scope) {<NEW_LINE>try {<NEW_LINE>SourceInfo info = makeSourceInfo(x);<NEW_LINE>JConstructor ctor = (JConstructor) typeMap.get(x.binding);<NEW_LINE>JExpression trueQualifier = makeThisRef(info);<NEW_LINE>JMethodCall call = new JMethodCall(info, trueQualifier, ctor);<NEW_LINE>List<JExpression> callArgs = popCallArguments(info, x.arguments, x.binding);<NEW_LINE>if (curClass.classType.isEnumOrSubclass() != null) {<NEW_LINE>// Enums: wire up synthetic name/ordinal params to the super method.<NEW_LINE>JParameterRef enumNameRef = curMethod.method.getParams().get<MASK><NEW_LINE>call.addArg(enumNameRef);<NEW_LINE>JParameterRef enumOrdinalRef = curMethod.method.getParams().get(1).makeRef(info);<NEW_LINE>call.addArg(enumOrdinalRef);<NEW_LINE>}<NEW_LINE>if (x.isSuperAccess()) {<NEW_LINE>JExpression qualifier = pop(x.qualification);<NEW_LINE>ReferenceBinding superClass = x.binding.declaringClass;<NEW_LINE>boolean nestedSuper = JdtUtil.isInnerClass(superClass);<NEW_LINE>if (nestedSuper) {<NEW_LINE>processSuperCallThisArgs(superClass, call, qualifier, x.qualification);<NEW_LINE>}<NEW_LINE>call.addArgs(callArgs);<NEW_LINE>if (nestedSuper) {<NEW_LINE>processSuperCallLocalArgs(superClass, call);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>assert (x.qualification == null);<NEW_LINE>ReferenceBinding declaringClass = x.binding.declaringClass;<NEW_LINE>boolean nested = JdtUtil.isInnerClass(declaringClass);<NEW_LINE>if (nested) {<NEW_LINE>processThisCallThisArgs(declaringClass, call);<NEW_LINE>}<NEW_LINE>call.addArgs(callArgs);<NEW_LINE>if (nested) {<NEW_LINE>processThisCallLocalArgs(declaringClass, call);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>call.setStaticDispatchOnly();<NEW_LINE>push(call.makeStatement());<NEW_LINE>} catch (Throwable e) {<NEW_LINE>throw translateException(x, e);<NEW_LINE>} finally {<NEW_LINE>scope.methodScope().isConstructorCall = false;<NEW_LINE>}<NEW_LINE>} | (0).makeRef(info); |
1,162,563 | public void marshall(Certificate certificate, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (certificate == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(certificate.getArn(), ARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getDomainName(), DOMAINNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getStatus(), STATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getSerialNumber(), SERIALNUMBER_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getSubjectAlternativeNames(), SUBJECTALTERNATIVENAMES_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getDomainValidationRecords(), DOMAINVALIDATIONRECORDS_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getRequestFailureReason(), REQUESTFAILUREREASON_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(certificate.getKeyAlgorithm(), KEYALGORITHM_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getCreatedAt(), CREATEDAT_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getIssuedAt(), ISSUEDAT_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getIssuerCA(), ISSUERCA_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getNotBefore(), NOTBEFORE_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getNotAfter(), NOTAFTER_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getEligibleToRenew(), ELIGIBLETORENEW_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getRenewalSummary(), RENEWALSUMMARY_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getRevokedAt(), REVOKEDAT_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getRevocationReason(), REVOCATIONREASON_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getTags(), TAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getSupportCode(), SUPPORTCODE_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>} | certificate.getInUseResourceCount(), INUSERESOURCECOUNT_BINDING); |
106,262 | final DescribeMetricCollectionTypesResult executeDescribeMetricCollectionTypes(DescribeMetricCollectionTypesRequest describeMetricCollectionTypesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeMetricCollectionTypesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeMetricCollectionTypesRequest> request = null;<NEW_LINE>Response<DescribeMetricCollectionTypesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeMetricCollectionTypesRequestMarshaller().marshall(super.beforeMarshalling(describeMetricCollectionTypesRequest));<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, "Auto Scaling");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeMetricCollectionTypes");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeMetricCollectionTypesResult> responseHandler = new StaxResponseHandler<DescribeMetricCollectionTypesResult>(new DescribeMetricCollectionTypesResultStaxUnmarshaller());<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); |
90,713 | public void filter(ContainerRequestContext requestContext) throws IOException {<NEW_LINE>try {<NEW_LINE>SofaResourceMethodInvoker resourceMethodInvoker = (SofaResourceMethodInvoker) ((PostMatchContainerRequestContext) requestContext).getResourceMethod();<NEW_LINE><MASK><NEW_LINE>String serviceName = factory.getServiceName();<NEW_LINE>String appName = factory.getAppName();<NEW_LINE>if (serviceName == null) {<NEW_LINE>serviceName = resourceMethodInvoker.getResourceClass().getName();<NEW_LINE>}<NEW_LINE>String methodName = resourceMethodInvoker.getMethod().getName();<NEW_LINE>RpcInternalContext context = RpcInternalContext.getContext();<NEW_LINE>context.setAttachment(INTERNAL_KEY_PREFIX + RestConstants.REST_SERVICE_KEY, serviceName + ":1.0");<NEW_LINE>context.setAttachment(INTERNAL_KEY_PREFIX + RestConstants.REST_METHODNAME_KEY, methodName);<NEW_LINE>context.setAttachment(INTERNAL_KEY_PREFIX + RemotingConstants.HEAD_APP_NAME, appName);<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error(LogCodes.getLog(LogCodes.ERROR_LOOKOUT_PROCESS), e);<NEW_LINE>}<NEW_LINE>} | SofaResourceFactory factory = resourceMethodInvoker.getResource(); |
1,259,626 | public void resourceChanged(IResourceChangeEvent event) {<NEW_LINE>IResourceDelta delta = event.getDelta();<NEW_LINE>try {<NEW_LINE>class ResourceDeltaVisitor implements IResourceDeltaVisitor {<NEW_LINE><NEW_LINE>protected ResourceSet resourceSet = editingDomain.getResourceSet();<NEW_LINE><NEW_LINE>protected Collection<Resource> changedResources = new ArrayList<Resource>();<NEW_LINE><NEW_LINE>protected Collection<Resource> removedResources = new ArrayList<Resource>();<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean visit(IResourceDelta delta) {<NEW_LINE>if (delta.getResource().getType() == IResource.FILE) {<NEW_LINE>if (delta.getKind() == IResourceDelta.REMOVED || delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {<NEW_LINE>Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);<NEW_LINE>if (resource != null) {<NEW_LINE>if (delta.getKind() == IResourceDelta.REMOVED) {<NEW_LINE>removedResources.add(resource);<NEW_LINE>} else if (!savedResources.remove(resource)) {<NEW_LINE>changedResources.add(resource);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE><NEW_LINE>public Collection<Resource> getChangedResources() {<NEW_LINE>return changedResources;<NEW_LINE>}<NEW_LINE><NEW_LINE>public Collection<Resource> getRemovedResources() {<NEW_LINE>return removedResources;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();<NEW_LINE>delta.accept(visitor);<NEW_LINE>if (!visitor.getRemovedResources().isEmpty()) {<NEW_LINE>getSite().getShell().getDisplay().asyncExec(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>removedResources.addAll(visitor.getRemovedResources());<NEW_LINE>if (!isDirty()) {<NEW_LINE>getSite().getPage().closeEditor(OpenDDSEditor.this, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>if (!visitor.getChangedResources().isEmpty()) {<NEW_LINE>getSite().getShell().getDisplay().asyncExec(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>changedResources.addAll(visitor.getChangedResources());<NEW_LINE>if (getSite().getPage().getActiveEditor() == OpenDDSEditor.this) {<NEW_LINE>handleActivate();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>} catch (CoreException exception) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} | OpenDDSEditorPlugin.INSTANCE.log(exception); |
1,668,165 | public void testSelfCancelingTask(PrintWriter out) throws Exception {<NEW_LINE>// Cancel on the second update<NEW_LINE>Callable<Integer> task = new SelfCancelingTask("testSelfCancelingTask", 2, false);<NEW_LINE>// Run up to 5 times, but we should cancel at 2<NEW_LINE>Trigger trigger = new FixedRepeatTrigger(5, 22);<NEW_LINE>TaskStatus<Integer> status = scheduler.schedule(task, trigger);<NEW_LINE>pollForTableEntry("testSelfCancelingTask", 2);<NEW_LINE>status = scheduler.getStatus(status.getTaskId());<NEW_LINE>if (!status.isCancelled())<NEW_LINE>throw new Exception("Task was not canceled. " + status);<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>throw new Exception("Should not be able to retrieve a result (" + result + ") from a canceled task. " + status);<NEW_LINE>} catch (CancellationException x) {<NEW_LINE>}<NEW_LINE>TimersPersistentExecutor timersExecutor = (TimersPersistentExecutor) scheduler;<NEW_LINE>Date nextExecution = timersExecutor.getNextExecutionTime(status.getTaskId());<NEW_LINE>if (nextExecution != null)<NEW_LINE>throw new Exception("Expecting null getNextExecution for canceled task. Instead: " + nextExecution + ". Status: " + status);<NEW_LINE>trigger = timersExecutor.getTimer(status.getTaskId());<NEW_LINE>if (trigger != null)<NEW_LINE>throw new Exception("Expecting null trigger for canceled task. Instead: " + trigger + ". Status: " + status);<NEW_LINE>} | Integer result = status.get(); |
214,359 | public void requestPurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException {<NEW_LINE>if (!appSupplychainService.isApp("supplychain")) {<NEW_LINE>super.requestPurchaseOrder(purchaseOrder);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// budget control<NEW_LINE>if (appAccountService.isApp("budget") && appAccountService.getAppBudget().getCheckAvailableBudget()) {<NEW_LINE>List<PurchaseOrderLine> purchaseOrderLines = purchaseOrder.getPurchaseOrderLineList();<NEW_LINE>Map<Budget, BigDecimal> amountPerBudget = new HashMap<>();<NEW_LINE>if (appAccountService.getAppBudget().getManageMultiBudget()) {<NEW_LINE>for (PurchaseOrderLine pol : purchaseOrderLines) {<NEW_LINE>if (pol.getBudgetDistributionList() != null) {<NEW_LINE>for (BudgetDistribution bd : pol.getBudgetDistributionList()) {<NEW_LINE><MASK><NEW_LINE>if (!amountPerBudget.containsKey(budget)) {<NEW_LINE>amountPerBudget.put(budget, bd.getAmount());<NEW_LINE>} else {<NEW_LINE>BigDecimal oldAmount = amountPerBudget.get(budget);<NEW_LINE>amountPerBudget.put(budget, oldAmount.add(bd.getAmount()));<NEW_LINE>}<NEW_LINE>isBudgetExceeded(budget, amountPerBudget.get(budget));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (PurchaseOrderLine pol : purchaseOrderLines) {<NEW_LINE>// getting Budget associated to POL<NEW_LINE>Budget budget = pol.getBudget();<NEW_LINE>if (!amountPerBudget.containsKey(budget)) {<NEW_LINE>amountPerBudget.put(budget, pol.getExTaxTotal());<NEW_LINE>} else {<NEW_LINE>BigDecimal oldAmount = amountPerBudget.get(budget);<NEW_LINE>amountPerBudget.put(budget, oldAmount.add(pol.getExTaxTotal()));<NEW_LINE>}<NEW_LINE>isBudgetExceeded(budget, amountPerBudget.get(budget));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>super.requestPurchaseOrder(purchaseOrder);<NEW_LINE>int intercoPurchaseCreatingStatus = appSupplychainService.getAppSupplychain().getIntercoPurchaseCreatingStatusSelect();<NEW_LINE>if (purchaseOrder.getInterco() && intercoPurchaseCreatingStatus == PurchaseOrderRepository.STATUS_REQUESTED) {<NEW_LINE>Beans.get(IntercoService.class).generateIntercoSaleFromPurchase(purchaseOrder);<NEW_LINE>}<NEW_LINE>if (purchaseOrder.getCreatedByInterco()) {<NEW_LINE>fillIntercompanySaleOrderCounterpart(purchaseOrder);<NEW_LINE>}<NEW_LINE>} | Budget budget = bd.getBudget(); |
694,035 | final PurchaseOfferingResult executePurchaseOffering(PurchaseOfferingRequest purchaseOfferingRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(purchaseOfferingRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PurchaseOfferingRequest> request = null;<NEW_LINE>Response<PurchaseOfferingResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PurchaseOfferingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(purchaseOfferingRequest));<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, "Device Farm");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PurchaseOffering");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PurchaseOfferingResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PurchaseOfferingResultJsonUnmarshaller());<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,025,090 | private void save(ServerIntIntRow row, PSMatrixSaveContext saveContext, MatrixPartitionMeta meta, DataOutputStream out) throws IOException {<NEW_LINE>int startCol = (int) meta.getStartCol();<NEW_LINE>IntIntVector vector = ServerRowUtils.getVector(row);<NEW_LINE>IntIntElement element = new IntIntElement();<NEW_LINE>if (vector.isDense()) {<NEW_LINE>int[] data = vector.getStorage().getValues();<NEW_LINE>for (int i = 0; i < data.length; i++) {<NEW_LINE>element.rowId = row.getRowId();<NEW_LINE>element.colId = startCol + i;<NEW_LINE>element.value = data[i];<NEW_LINE>save(element, out);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (saveContext.sortFirst()) {<NEW_LINE>int[] indices = vector.getStorage().getIndices();<NEW_LINE>int[] values = vector.getStorage().getValues();<NEW_LINE>Sort.quickSort(indices, values, 0, indices.length - 1);<NEW_LINE>for (int i = 0; i < indices.length; i++) {<NEW_LINE>element.rowId = row.getRowId();<NEW_LINE>element.colId = indices[i] + startCol;<NEW_LINE>element.value = values[i];<NEW_LINE>save(element, out);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>ObjectIterator<Int2IntMap.Entry> iter = vector.getStorage().entryIterator();<NEW_LINE>Int2IntMap.Entry entry;<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>entry = iter.next();<NEW_LINE>element.rowId = row.getRowId();<NEW_LINE>element.colId <MASK><NEW_LINE>element.value = entry.getIntValue();<NEW_LINE>save(element, out);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | = entry.getIntKey() + startCol; |
1,687,993 | public void write(ByteBuf output, ClientWorld world, Chunk chunk) throws Exception {<NEW_LINE>output.writeInt(chunk.getX());<NEW_LINE>output.writeInt(chunk.getZ());<NEW_LINE>output.writeBoolean(chunk.isFullChunk());<NEW_LINE>Type.VAR_INT.writePrimitive(output, chunk.getBitmask());<NEW_LINE>ByteBuf buf = output.alloc().buffer();<NEW_LINE>try {<NEW_LINE>for (int i = 0; i < 16; i++) {<NEW_LINE>ChunkSection section = chunk.getSections()[i];<NEW_LINE>// Section not set<NEW_LINE>if (section == null)<NEW_LINE>continue;<NEW_LINE>Types1_9.CHUNK_SECTION.write(buf, section);<NEW_LINE>section.getLight().writeBlockLight(buf);<NEW_LINE>// No sky light, we're done here.<NEW_LINE>if (!section.getLight().hasSkyLight())<NEW_LINE>continue;<NEW_LINE>section.<MASK><NEW_LINE>}<NEW_LINE>buf.readerIndex(0);<NEW_LINE>Type.VAR_INT.writePrimitive(output, buf.readableBytes() + (chunk.isBiomeData() ? 256 : 0));<NEW_LINE>output.writeBytes(buf);<NEW_LINE>} finally {<NEW_LINE>// release buffer<NEW_LINE>buf.release();<NEW_LINE>}<NEW_LINE>// Write biome data<NEW_LINE>if (chunk.isBiomeData()) {<NEW_LINE>for (int biome : chunk.getBiomeData()) {<NEW_LINE>output.writeByte((byte) biome);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | getLight().writeSkyLight(buf); |
340,395 | protected BSONObject serializeMedia(Media media) {<NEW_LINE>BSONObject r = new BasicBSONObject();<NEW_LINE>r.put(FULL_FIELD_NAME_PLAYER, media.player.name());<NEW_LINE>r.put(FULL_FIELD_NAME_URI, media.uri);<NEW_LINE>if (media.title != null)<NEW_LINE>r.put(FULL_FIELD_NAME_TITLE, media.title);<NEW_LINE>r.put(FULL_FIELD_NAME_WIDTH, media.width);<NEW_LINE>r.<MASK><NEW_LINE>r.put(FULL_FIELD_NAME_FORMAT, media.format);<NEW_LINE>r.put(FULL_FIELD_NAME_DURATION, media.duration);<NEW_LINE>r.put(FULL_FIELD_NAME_SIZE, media.size);<NEW_LINE>if (media.hasBitrate)<NEW_LINE>r.put(FULL_FIELD_NAME_BITRATE, media.bitrate);<NEW_LINE>if (media.copyright != null)<NEW_LINE>r.put(FULL_FIELD_NAME_COPYRIGHT, media.copyright);<NEW_LINE>r.put(FULL_FIELD_NAME_PERSONS, media.persons);<NEW_LINE>return r;<NEW_LINE>} | put(FULL_FIELD_NAME_HEIGHT, media.height); |
1,308,727 | public void executor(final Collection<URIRegisterDTO> dataList) {<NEW_LINE>for (URIRegisterDTO uriRegisterDTO : dataList) {<NEW_LINE>Stopwatch stopwatch = Stopwatch.createStarted();<NEW_LINE>while (true) {<NEW_LINE>try (Socket ignored = new Socket(uriRegisterDTO.getHost(), uriRegisterDTO.getPort())) {<NEW_LINE>break;<NEW_LINE>} catch (IOException e) {<NEW_LINE>long sleepTime = 1000;<NEW_LINE>// maybe the port is delay exposed<NEW_LINE>if (stopwatch.elapsed(TimeUnit.SECONDS) > 5) {<NEW_LINE>LOG.error("host:{}, port:{} connection failed, will retry", uriRegisterDTO.getHost(), uriRegisterDTO.getPort());<NEW_LINE>// If the connection fails for a long time, Increase sleep time<NEW_LINE>if (stopwatch.elapsed(TimeUnit.SECONDS) > 180) {<NEW_LINE>sleepTime = 10000;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>TimeUnit.MILLISECONDS.sleep(sleepTime);<NEW_LINE>} catch (InterruptedException ex) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ShenyuClientShutdownHook.delayOtherHooks();<NEW_LINE>shenyuClientRegisterRepository.persistURI(uriRegisterDTO);<NEW_LINE>}<NEW_LINE>} | LOG.error("interrupted when sleep", ex); |
1,580,775 | public void run() {<NEW_LINE>resume();<NEW_LINE>final <MASK><NEW_LINE>final Document doc = result.getSnapshot().getSource().getDocument(false);<NEW_LINE>if (doc == null || !BreadcrumbsController.areBreadCrumsEnabled(doc))<NEW_LINE>return;<NEW_LINE>final int caret;<NEW_LINE>if (event instanceof CursorMovedSchedulerEvent) {<NEW_LINE>caret = ((CursorMovedSchedulerEvent) event).getCaretOffset();<NEW_LINE>} else {<NEW_LINE>// XXX: outside AWT!<NEW_LINE>JTextComponent c = EditorRegistry.focusedComponent();<NEW_LINE>if (c != null && c.getDocument() == doc)<NEW_LINE>caret = c.getCaretPosition();<NEW_LINE>else<NEW_LINE>caret = (-1);<NEW_LINE>}<NEW_LINE>if (caret == (-1))<NEW_LINE>return;<NEW_LINE>final StructureItem structureRoot = computeStructureRoot(result.getSnapshot().getSource());<NEW_LINE>if (structureRoot == null)<NEW_LINE>return;<NEW_LINE>WORKER.post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>selectNode(doc, structureRoot, id, caret);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} | long id = requestId.incrementAndGet(); |
929,468 | void showDummyNotification(Service service) {<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {<NEW_LINE>if (!isShowingDummyNotification) {<NEW_LINE>NotificationManager notificationManager = service.getSystemService(NotificationManager.class);<NEW_LINE>NotificationChannel channel = notificationManager.getNotificationChannel(CHANNEL_ID);<NEW_LINE>if (channel == null) {<NEW_LINE>channel = new NotificationChannel(CHANNEL_ID, service.getString(R.string.app_name), NotificationManager.IMPORTANCE_DEFAULT);<NEW_LINE>channel.enableLights(false);<NEW_LINE>channel.enableVibration(false);<NEW_LINE>channel.setSound(null, null);<NEW_LINE>channel.setShowBadge(false);<NEW_LINE>channel.setImportance(NotificationManager.IMPORTANCE_LOW);<NEW_LINE>notificationManager.createNotificationChannel(channel);<NEW_LINE>}<NEW_LINE>Notification notification = new Notification.Builder(service, CHANNEL_ID).setContentTitle(service.getString(R.string.app_name)).setContentText(service.getString(R.string.notification_text_shuttle_running)).setSmallIcon(R.<MASK><NEW_LINE>notificationManager.notify(NOTIFICATION_ID_DUMMY, notification);<NEW_LINE>if (!isForegroundedByApp) {<NEW_LINE>service.startForeground(NOTIFICATION_ID_DUMMY, notification);<NEW_LINE>}<NEW_LINE>isShowingDummyNotification = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (dummyNotificationDisposable != null) {<NEW_LINE>dummyNotificationDisposable.dispose();<NEW_LINE>}<NEW_LINE>dummyNotificationDisposable = Completable.timer(NOTIFICATION_STOP_DELAY, TimeUnit.MILLISECONDS).doOnComplete(() -> removeDummyNotification(service)).subscribe();<NEW_LINE>} | drawable.ic_stat_notification).build(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.