idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,494,813
public Builder fromKey(DeterministicKey accountKey, Script.ScriptType outputScriptType) {<NEW_LINE>if (outputScriptType == Script.ScriptType.P2PKH) {<NEW_LINE>DeterministicKeyChain chain = DeterministicKeyChain.builder().spend(accountKey).outputScriptType(Script.ScriptType.P2PKH).accountPath(structure.accountPathFor(Sc...
.P2WPKH)).build();
1,768,762
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) {<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>if (versionService.isNewFinalVersionAvailable()) {<NEW_LINE>map.put("newVersionAvailable", true);<NEW_LINE>map.put("latestVersion", versionService.getLate...
"buildDate", versionService.getLocalBuildDate());
1,828,831
public static QueryMetrics createFromCollection(Collection<QueryMetrics> queryMetricsCollection) {<NEW_LINE>long retrievedDocumentCount = 0;<NEW_LINE>long retrievedDocumentSize = 0;<NEW_LINE>long outputDocumentCount = 0;<NEW_LINE>long outputDocumentSize = 0;<NEW_LINE>long indexHitDocumentCount = 0;<NEW_LINE>Duration to...
indexLookupTime.plus(queryMetrics.indexLookupTime);
1,571,864
public void testCompletionStageRxInvoker_post3WithGenericType(Map<String, String> param, StringBuilder ret) {<NEW_LINE>String serverIP = param.get("serverIP");<NEW_LINE>String serverPort = param.get("serverPort");<NEW_LINE>final String threadName = "jaxrs21Thread";<NEW_LINE>ThreadFactory jaxrs21ThreadFactory = Executor...
> response = completableFuture.get();
1,324,670
public boolean hasSaveRelevantChanges(final OfflineLogEntry prev) {<NEW_LINE>// Do not erase the saved log if the user has removed all the characters<NEW_LINE>// without using "Clear". This may be a manipulation mistake, and erasing<NEW_LINE>// again will be easy using "Clear" while retyping the text may not be.<NEW_LI...
equals(date, prev.date);
940,276
private boolean handleIndexedAssignment(JCTree.JCAssign tree) {<NEW_LINE>if (!(tree.lhs instanceof JCTree.JCArrayAccess)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>JCTree.JCArrayAccess lhs = (JCTree.JCArrayAccess) tree.lhs;<NEW_LINE>if (_tp.getTypes().isArray(lhs.indexed.type)) {<NEW_LINE>return false;<NEW_LINE>}<NE...
lhs.type, tree.pos);
593,504
protected static void put(String key, String value) {<NEW_LINE>boolean found = false;<NEW_LINE>if (key.length() == 0 || value.length() == 0)<NEW_LINE>return;<NEW_LINE>if (mMap.containsKey(key))<NEW_LINE>Log.w(TAG, "compose sequence is a duplicate: " + format(key));<NEW_LINE>else if (mPrefixes.contains(key))<NEW_LINE>Lo...
key.substring(0, i);
125,272
private static void createReprInDocument(XTextDocument doc, String refMarkName, XTextCursor position, boolean insertSpaceAfter, boolean withoutBrackets) throws CreationException {<NEW_LINE>// The cursor we received: we push it before us.<NEW_LINE>position.collapseToEnd();<NEW_LINE>XTextCursor cursor = safeInsertSpacesB...
((short) 1, true);
1,456,779
public static byte[] sign(byte[] message, PrivateKey key, String digestAlgorithm) throws CryptoException {<NEW_LINE>try {<NEW_LINE>String signatureAlgorithm = getSignatureAlgorithm(key.getAlgorithm(), digestAlgorithm);<NEW_LINE>java.security.Signature signer = java.security.Signature.<MASK><NEW_LINE>signer.initSign(key...
getInstance(signatureAlgorithm, getSignatureProvider());
64,510
private void concatWithoutNullColumnsWithFrom(List<PartialPath> prefixPaths, Expression expression, List<Expression> withoutNullColumns, Set<String> aliasSet) throws StatementAnalyzeException {<NEW_LINE>if (expression instanceof TimeSeriesOperand) {<NEW_LINE>TimeSeriesOperand timeSeriesOperand = (TimeSeriesOperand) exp...
StatementAnalyzeException(e.getMessage());
134,541
private int process(byte b, byte[] out, int outOff) {<NEW_LINE>bufBlock[bufOff++] = b;<NEW_LINE>if (bufOff == bufBlock.length) {<NEW_LINE>if (out.length < (outOff + blockSize)) {<NEW_LINE>throw new OutputLengthException("Output buffer is too short");<NEW_LINE>}<NEW_LINE>// TODO Could move the processByte(s) calls to he...
blockSize, bufBlock, 0, macSize);
789,648
private List<ORID> applyTailIndexes(final Object lastIndexResult) {<NEW_LINE>final OIndex beforeTheLastIndex = indexChain.get(indexChain.size() - 2);<NEW_LINE>Set<Comparable> currentKeys = prepareKeys(beforeTheLastIndex, lastIndexResult);<NEW_LINE>for (int j = indexChain.size() - 2; j > 0; j--) {<NEW_LINE>final OIndex ...
(prepareKeys(nextIndex, currentResult));
315,437
public void compileProtoBlock(ProtoModule module, Proto proto, String packageName, StringTemplate protoBlockTemplate) throws IOException {<NEW_LINE>String name = ProtoUtil.toPascalCase(proto.getFile().getName().replace(".proto"<MASK><NEW_LINE>if (javaOutput) {<NEW_LINE>String outerClassname = proto.getExtraOption("java...
, "")).toString();
667,246
protected void convertElementToJson(ObjectNode propertiesNode, BaseElement baseElement, BpmnJsonConverterContext converterContext) {<NEW_LINE>StartEvent startEvent = (StartEvent) baseElement;<NEW_LINE>if (StringUtils.isNotEmpty(startEvent.getInitiator())) {<NEW_LINE>propertiesNode.put(PROPERTY_NONE_STARTEVENT_INITIATOR...
propertiesNode.put(PROPERTY_INTERRUPTING, true);
353,310
public void beforeAnalysis(BeforeAnalysisAccess access) {<NEW_LINE>RuntimeClassInitialization.initializeAtRunTime("io.netty");<NEW_LINE>RuntimeClassInitialization.initializeAtBuildTime("io.netty.util.internal.shaded.org.jctools", "io.netty.util.internal.logging.InternalLoggerFactory", "io.netty.util.internal.logging.Sl...
System.setProperty("io.netty.tryReflectionSetAccessible", "true");
1,472,879
public Jooby ready(@Nonnull Server server) {<NEW_LINE>Logger log = getLog();<NEW_LINE>this.serverOptions = server.getOptions();<NEW_LINE>log.info("{} started with:", getName());<NEW_LINE>log.info(" PID: {}", System.getProperty("PID"));<NEW_LINE>log.info(" {}", server.getOptions());<NEW_LINE>if (log.isDebugEnabled...
log.info(" tmp dir: {}", tmpdir);
738,723
private static void addValue(StringBuilder buf, Object value, boolean addLinks) throws URISyntaxException {<NEW_LINE>// Note: To be bug-compatible with Javadoc from Java 5/6/7, we currently don't escape HTML tags in String-valued annotations.<NEW_LINE>if (value instanceof ITypeBinding) {<NEW_LINE>ITypeBinding typeBindi...
createURI(JavaElementLinks.JAVADOC_SCHEME, type);
1,740,585
static long insert(ClickHouseNode server, String table) throws ClickHouseException {<NEW_LINE>try (ClickHouseClient client = ClickHouseClient.newInstance(server.getProtocol())) {<NEW_LINE>ClickHouseRequest.Mutation request = client.connect(server).write().table(table).format(ClickHouseFormat.RowBinary);<NEW_LINE><MASK>...
ClickHouseConfig config = request.getConfig();
514,641
public DatasetGraph createDataset(Assembler a, Resource root) {<NEW_LINE>// -------- Default graph<NEW_LINE>// Can use ja:graph or ja:defaultGraph<NEW_LINE>Resource dftGraph = GraphUtils.getResourceValue(root, DatasetAssemblerVocab.pDefaultGraph);<NEW_LINE>if (dftGraph == null)<NEW_LINE>dftGraph = GraphUtils.getResourc...
ds.addNamedModel(gName, m);
422,283
public static void updateMnemonicBinding(JComponent c, String pressed, String released) {<NEW_LINE>Class<?> clazz = c.getClass();<NEW_LINE>int m = -1;<NEW_LINE>try {<NEW_LINE>Method mtd = clazz.getMethod("getMnemonic");<NEW_LINE>m = (<MASK><NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Exc...
Integer) mtd.invoke(c);
767,343
private void createPriceChart() {<NEW_LINE>TitledGroupBg titledGroupBg = addTitledGroupBg(root, ++gridRow, 2, Res.get("dao.factsAndFigures.supply.priceChat"), Layout.FLOATING_LABEL_DISTANCE);<NEW_LINE>titledGroupBg.getStyleClass().add("last");<NEW_LINE>priceChartView.initialize();<NEW_LINE>VBox chartContainer = priceCh...
AnchorPane.setBottomAnchor(chartContainer, 0d);
1,491,391
public static void main(String[] args) {<NEW_LINE>try (KubernetesClient client = new KubernetesClientBuilder().build()) {<NEW_LINE>Namespace ns = new NamespaceBuilder().withNewMetadata().withName(NAMESPACE).addToLabels("this", "rocks").endMetadata().build();<NEW_LINE>logger.info("Created namespace: {}", client.namespac...
("/endpoints-deployment.yml")).get();
453,158
public static void main(String[] args) throws InterruptedException {<NEW_LINE>BarSeries series = createBarSeries();<NEW_LINE>Strategy strategy3DaySma = create3DaySmaStrategy(series);<NEW_LINE>BarSeriesManager seriesManager = new BarSeriesManager(series);<NEW_LINE>TradingRecord tradingRecord3DaySma = seriesManager.run(s...
, DecimalNum.valueOf(50));
225,728
public boolean startTrace(int controller, int flags, @Nullable Object context, long longContext) {<NEW_LINE>if (findLowestFreeBit(mCurrentTracesMask.get(), MAX_TRACES, flags) == 0) {<NEW_LINE>// Reached max traces<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TraceController traceController = mControllers.get(controller);...
throw new IllegalArgumentException("Unregistered controller for id = " + controller);
1,152,554
final DescribeQueriesResult executeDescribeQueries(DescribeQueriesRequest describeQueriesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeQueriesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F...
false), new DescribeQueriesResultJsonUnmarshaller());
1,789,302
final GetAccountSummaryResult executeGetAccountSummary(GetAccountSummaryRequest getAccountSummaryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getAccountSummaryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st...
GetAccountSummaryResult>(new GetAccountSummaryResultStaxUnmarshaller());
425,481
private static void processPotentialConnectionArgument(String arg, boolean persist) {<NEW_LINE>Matcher <MASK><NEW_LINE>if (m.matches()) {<NEW_LINE>String connName = m.group(1);<NEW_LINE>String userName = m.group(2);<NEW_LINE>String password = m.group(4);<NEW_LINE>String host = m.group(5);<NEW_LINE>String port = m.group...
m = conArg.matcher(arg);
1,061,749
final CreateResiliencyPolicyResult executeCreateResiliencyPolicy(CreateResiliencyPolicyRequest createResiliencyPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createResiliencyPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_...
addHandlerContext(HandlerContextKey.SERVICE_ID, "resiliencehub");
159,956
public void selectionChanged(IStructuredSelection selection) {<NEW_LINE>if (selection.size() == 1) {<NEW_LINE>Object element = selection.getFirstElement();<NEW_LINE>if (element instanceof IJSScriptElement) {<NEW_LINE>scriptElement = (IJSScriptElement) element;<NEW_LINE>URI location = scriptElement.getURL();<NEW_LINE>if...
SourceDisplayUtil.revealLineInEditor(editorPart, lineNumber);
47,681
public void handleControlMessage(SIBUuid8 sourceMEUuid, ControlMessage cMsg) throws SIRollbackException, SIConnectionLostException, SIResourceException, SIErrorException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "handleControlMessage", new Object[] { sourceMEUu...
.processFlushQuery((ControlAreYouFlushed) cMsg);
1,223,688
public Regressor transformToOutput(List<OnnxValue> tensor, ImmutableOutputInfo<Regressor> outputIDInfo) {<NEW_LINE>float[][] predictions = getBatchPredictions(tensor);<NEW_LINE>if (predictions.length != 1) {<NEW_LINE>throw new IllegalArgumentException("Supplied tensor has too many results, predictions.length = " + pred...
= predictions[0][id];
1,051,382
public void onClick(View v) {<NEW_LINE>if (!SkillUtils.checkPermission(getContext(), Manifest.permission.BLUETOOTH))<NEW_LINE>return;<NEW_LINE>getContext().registerReceiver(mReceiver, mFilter);<NEW_LINE>AlertDialog.Builder builderSingle = new AlertDialog.Builder(getContext());<NEW_LINE>builderSingle.setTitle(R.string.u...
BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
1,176,158
public void write(JmeExporter ex) throws IOException {<NEW_LINE>OutputCapsule oc = ex.getCapsule(this);<NEW_LINE>oc.write(true, "pointSprite", false);<NEW_LINE>oc.write(wireframe, "wireframe", false);<NEW_LINE>oc.write(cullMode, "cullMode", FaceCullMode.Back);<NEW_LINE>oc.write(depthWrite, "depthWrite", true);<NEW_LINE...
backStencilDepthFailOperation, "backStencilDepthFailOperation", StencilOperation.Keep);
1,449,930
private void run() throws SubjectAreaCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException {<NEW_LINE>SubjectArea subjectArea = new SubjectAreaImpl(this.serverName, this.serverURLRoot);<NEW_LINE>subjectAreaGlossary = subjectArea.nodeClients().glossaries();<NEW_LINE>subjectArea...
createChildSubjectAreaDefinition(SYMPTOM, clinical, glossaryGuid);
1,825,379
private void encodeLong(OutputStream out, long value) throws IOException {<NEW_LINE>if (value < 0) {<NEW_LINE>// -Long.MIN_VALUE is out of "long" range. Special-casing it.<NEW_LINE>if (value == Long.MIN_VALUE) {<NEW_LINE>out.write(LONG_MIN);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Turn value to positive so that % and /...
3) - (q << 1);
575,091
public static KeySequence fromShortcutString(String shortcut) {<NEW_LINE>KeySequence sequence = new KeySequence();<NEW_LINE>if (StringUtil.isNullOrEmpty(shortcut))<NEW_LINE>return sequence;<NEW_LINE>String[] splat = shortcut.split("\\s+");<NEW_LINE>for (int i = 0; i < splat.length; i++) {<NEW_LINE>String sc = splat[i]....
"-", KeyboardHelper.KEY_HYPHEN, modifiers);
1,313,162
public static void vertical(Kernel1D_S32 kernel, ImageBorder_S32 input, GrayI16 output, int divisor) {<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int[] dataKer = kernel.data;<NEW_LINE>final int offset = kernel.getOffset();<NEW_LINE>final int kernelWidth = kernel.getWidth();<NEW_LINE>final int width = ...
int borderBottom = kernelWidth - offset - 1;
1,774,480
boolean isTokenInCachedResultExpired(ProviderAuthenticationResult cachedResult, OidcClientConfig clientConfig) {<NEW_LINE>Hashtable<String, Object> customProperties = cachedResult.getCustomProperties();<NEW_LINE>if (customProperties == null || customProperties.isEmpty()) {<NEW_LINE>if (tc.isDebugEnabled()) {<NEW_LINE><...
Tr.debug(tc, "Custom properties were null or empty");
282,136
public void consumeMessageAfter(ConsumeMessageContext context) {<NEW_LINE>if (context == null || context.getMsgList() == null || context.getMsgList().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TraceContext subBeforeContext = <MASK><NEW_LINE>if (subBeforeContext.getTraceBeans() == null || subBeforeContext.getTrac...
(TraceContext) context.getMqTraceContext();
853,222
public static boolean couldBe(ImportBinding[] imports, String key, TypeReference ref) {<NEW_LINE>String[] keyParts = key.split("\\.");<NEW_LINE>if (ref instanceof SingleTypeReference) {<NEW_LINE>char[] token = <MASK><NEW_LINE>if (!matches(keyParts[keyParts.length - 1], token))<NEW_LINE>return false;<NEW_LINE>if (import...
((SingleTypeReference) ref).token;
332,921
private void drawLabels(Graphics2D g, Number next, double xOffset, double yOffset, double zeroOffset, double barWidth, boolean showStackSum, boolean isTotalAnnotations, Color seriesColor) {<NEW_LINE>String numberAsString = chart.getYAxisFormat().format(next);<NEW_LINE>TextLayout textLayout = new TextLayout(numberAsStri...
() * stylerCategory.getLabelsPosition();
1,629,081
private void writeAttributes(@NonNull final Geocache cache) throws IOException {<NEW_LINE>if (cache.getAttributes().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// TODO: Attribute conversion required: English verbose name, gpx-id<NEW_LINE>gpx.startTag(NS_GROUNDSPEAK, "attributes");<NEW_LINE>for (final String attri...
(CacheAttribute.trimAttributeName(attribute));
801,661
public static void init() {<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(<MASK><NEW_LINE>for (DyeColor color : DyeColor.values()) {<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(ColorHelper.STAINED_GLASS_MAP.apply(color), ColorHelper.STAINED_GLASS_MAP);<NEW_LINE>}<NEW_LINE>BotaniaAPI.instance().registe...
Blocks.GLASS, ColorHelper.STAINED_GLASS_MAP);
46,719
private void copyResources(File resourcesDirectory) throws IOException {<NEW_LINE>// Unzip res.zip into resources directory<NEW_LINE>InputStream inputStream = <MASK><NEW_LINE>ZipInputStream zipInputStream = new ZipInputStream(inputStream);<NEW_LINE>try {<NEW_LINE>ZipEntry zipEntry = zipInputStream.getNextEntry();<NEW_L...
getClass().getResourceAsStream("res.zip");
823,736
private void processJWKRequest(HttpServletResponse response, OidcServerConfig oidcServerConfig) throws IOException {<NEW_LINE>String methodName = "processJWKRequest";<NEW_LINE>if (tc.isEntryEnabled()) {<NEW_LINE>Tr.entry(tc, methodName);<NEW_LINE>}<NEW_LINE>String jwkString = oidcServerConfig.getJwkJsonString();<NEW_LI...
debug(tc, "Internal error process JWK request error", ioe);
371,798
final ListClustersResult executeListClusters(ListClustersRequest listClustersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listClustersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec...
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
996,538
default IntColumn difference(TimeColumn column2, ChronoUnit unit) {<NEW_LINE>IntColumn newColumn = IntColumn.create(name() + " - " + column2.name() + "[" + unit.name() + "]");<NEW_LINE>for (int r = 0; r < size(); r++) {<NEW_LINE>int <MASK><NEW_LINE>int c2 = column2.getIntInternal(r);<NEW_LINE>if (TimeColumn.valueIsMiss...
c1 = this.getIntInternal(r);
1,517,269
static void init() {<NEW_LINE>FXUtils.onChangeAndOperate(config().versionListSourceProperty(), versionListSource -> {<NEW_LINE>if (!providersById.containsKey(versionListSource)) {<NEW_LINE>config().setVersionListSource(DEFAULT_PROVIDER_ID);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>currentDownloadProvider = Optional.ofNulla...
(providersById.get(DEFAULT_PROVIDER_ID));
805,144
public static Iterable<SqlFeatureContext> loadFeatures() throws IOException {<NEW_LINE>try (InputStream sqlFeatures = SqlFeatures.class.getResourceAsStream("/sql_features.tsv")) {<NEW_LINE>if (sqlFeatures == null) {<NEW_LINE>throw new ResourceNotFoundException("sql_features.tsv file not found");<NEW_LINE>}<NEW_LINE>Arr...
: parts.get(6));
552,439
public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>System.out.print("Enter the Heap Capacity: ");<NEW_LINE><MASK><NEW_LINE>Min_Heap hp = new Min_Heap(hCap);<NEW_LINE>boolean flag = true;<NEW_LINE>int val = 0;<NEW_LINE>while (flag) {<NEW_LINE>System.out.println();<NEW_LINE>Sy...
int hCap = sc.nextInt();
1,575,259
private String convertCast(String sqlStatement) {<NEW_LINE>final String PATTERN_String = "\'([^']|(''))*\'";<NEW_LINE>final String PATTERN_DataType = "([\\w]+)(\\(\\d+\\))?";<NEW_LINE>final // CAST<sp>(<sp><NEW_LINE>String // CAST<sp>(<sp><NEW_LINE>pattern = // arg1 1(2,3)<NEW_LINE>"\\bCAST\\b[\\s]*\\([\\s]*" + "(("...
String, String>) getConvertMap();
1,498,077
public static String unescapeCharacters(String s) {<NEW_LINE>if (s == null) {<NEW_LINE>throw new NullPointerException();<NEW_LINE>}<NEW_LINE>char[<MASK><NEW_LINE>int count = 0;<NEW_LINE>for (int i = 0, j = chars.length - 1; i < j; i++) {<NEW_LINE>if (chars[i] == DELIMITER && isLegacyDelimitedCharacter(chars[i + 1])) {<...
] chars = s.toCharArray();
1,673,871
public void marshall(JobFlowDetail jobFlowDetail, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (jobFlowDetail == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(jobFlowDetail.getJobFlowId(), JOBFLOWID_BINDI...
jobFlowDetail.getVisibleToAllUsers(), VISIBLETOALLUSERS_BINDING);
738,687
public void update(boolean silent) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.fine("Eclipse resynchronize started (" + silent + ")");<NEW_LINE>WorkspaceFactory<MASK><NEW_LINE>List<String> importProblems = new ArrayList<String>();<NEW_LINE>List<UpgradableProject> projs = getListOfUpdatableProjects();<NEW_LINE>if (projs.size() ==...
.getInstance().resetCache();
279,188
public double predict(int userIdx, int itemIdx) throws LibrecException {<NEW_LINE>// find a number of similar users<NEW_LINE>List<Entry<Integer, Double>> simList = userSimilarityList[userIdx];<NEW_LINE>double predictValue = 0.0D, simSum = 0.0D;<NEW_LINE>Entry<Integer, Double> simUserEntry;<NEW_LINE>double sim;<NEW_LINE...
userRatingVector = trainMatrix.column(itemIdx);
1,638,929
private boolean compareHeaders() {<NEW_LINE>final SAMFileHeader h1 = leftReader.getFileHeader();<NEW_LINE>final <MASK><NEW_LINE>boolean ret = compareValues(h1.getVersion(), h2.getVersion(), "File format version");<NEW_LINE>ret = compareValues(h1.getCreator(), h2.getCreator(), "File creator") && ret;<NEW_LINE>ret = comp...
SAMFileHeader h2 = rightReader.getFileHeader();
66,094
final TerminateJobResult executeTerminateJob(TerminateJobRequest terminateJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(terminateJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec...
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,675,690
private void fillInResult(List<KeepercontainerTbl> keeperCount, List<KeeperBasicInfo> result, int beginPort, BiPredicate<String, Integer> keeperGood, int returnCount) {<NEW_LINE>Map<String, Set<Integer>> ipAndPorts = getIpAndPortsWithSameIpAsKC(keeperCount);<NEW_LINE>// find available port<NEW_LINE>for (int i = 0; i < ...
keepercontainerTbl = keeperCount.get(i);
563,748
public Observable<ServiceResponseWithHeaders<Page<CloudJobSchedule>, JobScheduleListHeaders>> listNextSinglePageAsync(final String nextPageLink) {<NEW_LINE>if (nextPageLink == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");<NEW_LINE>}<NEW_LINE>final JobSche...
JobScheduleListHeaders> result = listNextDelegate(response);
811,374
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.ibm.ws.logging.hpel.LogInstanceBrowser#find(com.ibm.ws.logging.hpel.impl.RepositoryPointerImpl)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public LogRepositoryBrowser find(RepositoryPointerImpl location, boolean ignoreTimestamp) {<NEW_LINE>String[] instanceIds = l...
SEVERE, className, "find", "HPEL_NotRepositoryLocation");
502,791
public CampaignPropertiesDto toDto() {<NEW_LINE>var dto = CampaignPropertiesDto.newBuilder();<NEW_LINE>tokenTypeMap.forEach((k, v) -> dto.putTokenTypes(k, TokenPropertyListDto.newBuilder().addAllProperties(v.stream().map(TokenProperty::toDto).collect(Collectors.toList())).build()));<NEW_LINE>dto.setDefaultSightType(def...
(Collectors.toList()));
946,923
private ResolvableType resolveVariable(TypeVariable<?> variable) {<NEW_LINE>if (this.type instanceof TypeVariable) {<NEW_LINE>return resolveType().resolveVariable(variable);<NEW_LINE>}<NEW_LINE>if (this.type instanceof ParameterizedType) {<NEW_LINE>ParameterizedType parameterizedType = (ParameterizedType) this.type;<NE...
forType(actualType, this.variableResolver);
500,954
public void insertData(double lat, double lon, double alt, double speed, double hdop, long time, float heading) {<NEW_LINE>executeInsertTrackQuery(lat, lon, alt, speed, hdop, time, heading);<NEW_LINE>boolean newSegment = false;<NEW_LINE>if (lastPoint == null || (time - lastTimeUpdated) > 180 * 1000) {<NEW_LINE>lastPoin...
== NO_HEADING ? Float.NaN : heading;
498,507
public static double apply(ComponentVector vector, ReduceOP op) {<NEW_LINE>CompRedExe task = new CompRedExe(vector, op, 0, vector.getNumPartitions() - 1);<NEW_LINE>Future<UnionEle> futRes = pool.submit(task);<NEW_LINE>try {<NEW_LINE>UnionEle tmpRes = futRes.get();<NEW_LINE>switch(op) {<NEW_LINE>case Avg:<NEW_LINE>retur...
sqrt(tmpRes.getDouble2());
276,077
public void run(Parser.Result result, SchedulerEvent event) {<NEW_LINE>cancelled = false;<NEW_LINE>final Snapshot mySnapshot = result.getSnapshot();<NEW_LINE>if (mySnapshot.getMimePath().size() > 1) {<NEW_LINE>// I do not want the inner mimetype<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (mySnapshot.getMimeType().equals("...
(false), "java-hints", allHints);
1,194,816
private static CurveNode curveFraCurveNode(String conventionStr, String timeStr, String label, QuoteId quoteId, double spread, CurveNodeDate date, CurveNodeDateOrder order) {<NEW_LINE>Matcher matcher = FRA_TIME_REGEX.matcher(timeStr.toUpperCase(Locale.ENGLISH));<NEW_LINE>if (!matcher.matches()) {<NEW_LINE>throw new Ill...
dateOrder(order).build();
119,596
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>{<NEW_LINE><MASK><NEW_LINE>{<NEW_LINE>builder.field(Fields.FILE_COUNT, getIncrementalFileCount());<NEW_LINE>builder.humanReadableField(Fields.SIZE_IN_BYTES, Fields.SIZE, new...
builder.startObject(Fields.INCREMENTAL);
186,460
public static DescribeDcdnDomainRegionDataResponse unmarshall(DescribeDcdnDomainRegionDataResponse describeDcdnDomainRegionDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDcdnDomainRegionDataResponse.setRequestId(_ctx.stringValue("DescribeDcdnDomainRegionDataResponse.RequestId"));<NEW_LINE>describeDcdnDomain...
(_ctx.stringValue("DescribeDcdnDomainRegionDataResponse.DomainName"));
1,516,243
public synchronized void loadingFinished() {<NEW_LINE>logIfNonEmpty("Slowest packages (ms)", slowestPackagesToLoad.getExtremeElements(), c -> Durations.toMillis(c.getPackageMetricsInternal().getLoadDuration()));<NEW_LINE>logIfNonEmpty("Largest packages (num targets)", largestPackages.getExtremeElements(), c -> c.getPac...
getPackageMetricsInternal().getPackageOverhead());
1,809,837
public ResourcePendingMaintenanceActions unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ResourcePendingMaintenanceActions resourcePendingMaintenanceActions = new ResourcePendingMaintenanceActions();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI...
int originalDepth = context.getCurrentDepth();
225,010
public Boolean scan(Tree node, Unifier unifier) {<NEW_LINE>Iterator<UExpression> iterator = unmatched.iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>if (couldUnify(iterator.next(), node, unifier)) {<NEW_LINE>iterator.remove();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (UExpression expr : allo...
keyBinding = unifier.getBinding(key);
1,855,214
private static void requestPostsForBlog(final long blogId, final UpdateAction updateAction, final ReaderActions.UpdateResultListener resultListener) {<NEW_LINE>String path = "read/sites/" + blogId + "/posts/?meta=site,likes";<NEW_LINE>// append the date of the oldest cached post in this blog when requesting older posts...
null, jsonObject, updateAction, resultListener);
1,443,016
private void addEvent(String entityId, String datasetId, String eventType, Optional<String> updatedField, Map<String, Object> extraFieldsMap, String eventMessage) {<NEW_LINE>if (!isEventSystemEnabled) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Add succeeded event in local DB<NEW_LINE>JsonObject eventMetadata = new JsonO...
), ModelDBResourceEnum.ModelDBServiceResourceTypes.DATASET);
1,305,608
public boolean isVisible(File file) {<NEW_LINE>long t = System.currentTimeMillis();<NEW_LINE>if (Subversion.LOG.isLoggable(Level.FINE)) {<NEW_LINE>Subversion.LOG.log(Level.FINE, "isVisible {0}", <MASK><NEW_LINE>}<NEW_LINE>boolean ret = true;<NEW_LINE>try {<NEW_LINE>if (file == null)<NEW_LINE>return true;<NEW_LINE>if (f...
new Object[] { file });
788,629
public APIGatewayProxyResponseEvent updateStatus(Map<String, Object> event, Context context) {<NEW_LINE>if (Utils.warmup(event)) {<NEW_LINE>// LOGGER.info("Warming up");<NEW_LINE>return new APIGatewayProxyResponseEvent().withHeaders(CORS).withStatusCode(200);<NEW_LINE>}<NEW_LINE>long startTimeMillis = System.currentTim...
(400).withBody("{\"message\":\"Invalid resource for onboarding.\"}");
639,210
public void appendTo(Appendable out, DependencyInfo info, CharSource content) throws IOException {<NEW_LINE>String code = content.read();<NEW_LINE>if (info.isModule()) {<NEW_LINE>mode.appendGoogModule(transpile<MASK><NEW_LINE>} else if ("es6".equals(info.getLoadFlags().get("module")) && transpiler == Transpiler.NULL) {...
(code), out, sourceUrl);
1,348,732
public void parseCqSelectIntoClause(IoTDBSqlParser.CqSelectIntoClauseContext ctx, CreateContinuousQueryOperator createContinuousQueryOperator) {<NEW_LINE>queryOp = new GroupByQueryOperator();<NEW_LINE>parseSelectClause(ctx.selectClause());<NEW_LINE><MASK><NEW_LINE>if (queryOp.getSelectComponent().getResultColumns().siz...
parseFromClause(ctx.fromClause());
1,779,288
static IRubyObject _parse_eu(ThreadContext context, IRubyObject self, RubyString str, RubyHash hash) {<NEW_LINE>final Ruby runtime = context.runtime;<NEW_LINE>RubyRegexp re = newRegexpFromCache(runtime, _parse_eu, RE_OPTION_IGNORECASE);<NEW_LINE>IRubyObject sub = subSpace(context, (RubyString) str, re);<NEW_LINE>if (su...
final RubyMatchData match = (RubyMatchData) sub;
348,331
private void addHighlightElements(String query, int parent, String code, int index) {<NEW_LINE>NodeList<Element> els = DomUtils.querySelectorAll(Document.get().getBody(), query);<NEW_LINE>// guard against queries that might select an excessive number<NEW_LINE>// of UI elements<NEW_LINE>int n = Math.min(HIGHLIGHT_ELEMEN...
.get().createDivElement();
1,346,577
private void load(QueueItem item) {<NEW_LINE>int bulkLoad = store.getBulkLoad();<NEW_LINE>bulkLoad = Math.min(getItemQueue(<MASK><NEW_LINE>if (bulkLoad == 1) {<NEW_LINE>item.setSerializedObject(store.load(item.getItemId()));<NEW_LINE>} else if (bulkLoad > 1) {<NEW_LINE>long maxIdToLoad = -1;<NEW_LINE>Iterator<QueueItem...
).size(), bulkLoad);
1,650,021
final DescribeAppInstanceResult executeDescribeAppInstance(DescribeAppInstanceRequest describeAppInstanceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeAppInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW...
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
667,058
private static void descendantDump(Box parent, int indent, List<DescendantContent> out) {<NEW_LINE>out.add(new DescendantContent(parent, indent));<NEW_LINE>indent++;<NEW_LINE>for (Box child : parent.getChildren()) {<NEW_LINE>descendantDump(child, indent, out);<NEW_LINE>}<NEW_LINE>if (parent instanceof BlockBox && ((Blo...
new DescendantContent(child, indent));
338,216
String doDisplay(Object value, @CachedLibrary(limit = "5") InteropLibrary objects, @CachedLibrary(limit = "5") InteropLibrary displays, @CachedLibrary(limit = "5") InteropLibrary strings) {<NEW_LINE>if (value == null) {<NEW_LINE>// TODO [RW] This is a temporary workaround to make it possible to display errors related t...
.getConstructor().getName();
1,199,623
void doMetaRequests() throws IOException {<NEW_LINE>if (!isState(STATE_GETTING_METADATA))<NEW_LINE>return;<NEW_LINE>while (outstandingRequests <= maxRequests) {<NEW_LINE>int idx = pool.reservePiece(this);<NEW_LINE>if (idx < 0)<NEW_LINE>break;<NEW_LINE>Map<String, Object> req = new HashMap<>();<NEW_LINE>req.put("msg_typ...
encoder.encode(req, 512);
1,137,536
public void printTo(Writer out, ReadablePeriod period, Locale locale) throws IOException {<NEW_LINE>long valueLong = getFieldValue(period);<NEW_LINE>if (valueLong == Long.MAX_VALUE) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int value = (int) valueLong;<NEW_LINE>if (iFieldType >= SECONDS_MILLIS) {<NEW_LINE>value = (int) (v...
iSuffix.printTo(out, value);
190,237
public synchronized void asyncDeleteCursor(final String consumerName, final DeleteCursorCallback callback, final Object ctx) {<NEW_LINE>final ManagedCursorImpl cursor = (ManagedCursorImpl) cursors.get(consumerName);<NEW_LINE>if (cursor == null) {<NEW_LINE>callback.deleteCursorFailed(new ManagedLedgerException.CursorNot...
PositionImpl slowestConsumerPosition = cursors.getSlowestReaderPosition();
1,292,991
public CompletableFuture<Void> closeSession(SessionId sessionId, boolean delete) {<NEW_LINE>RaftSessionState state = sessions.get(sessionId.id());<NEW_LINE>if (state == null) {<NEW_LINE>return Futures.exceptionalFuture(new RaftException.UnknownSession("Unknown session: " + sessionId));<NEW_LINE>}<NEW_LINE>log.debug("Cl...
withDelete(delete).build();
547,319
public void marshall(CoreNetworkPolicy coreNetworkPolicy, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (coreNetworkPolicy == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(coreNetworkPolicy.getCoreNetworkI...
coreNetworkPolicy.getCreatedAt(), CREATEDAT_BINDING);
1,115,032
public CompletableFuture<String> sayHello(String name) {<NEW_LINE>// If attachments and context are going to be used in the new thread, startAsync() and signalContextSwitch() must be called.<NEW_LINE>// Otherwise, it is not necessary to call these two methods.<NEW_LINE>AsyncContext asyncContext = RpcContext.startAsync(...
RpcContextAttachment attachmentFromClient = RpcContext.getServerAttachment();
23,955
private void loadKeyLetters() {<NEW_LINE>// URL url = Platform.getBundle(BUNDLE_ID).getResource(RELATIONSHIPS_KEYS_FILE);<NEW_LINE>URL url = Platform.getBundle(BUNDLE_ID).getEntry(RELATIONSHIPS_KEYS_FILE);<NEW_LINE>// Load the JDOM Document from XML<NEW_LINE>Document doc = null;<NEW_LINE>try {<NEW_LINE>doc = new SAXBui...
IArchimatePackage.eINSTANCE.getEClassifier(relationName);
1,213,295
protected DeploymentGroupStatus awaitDeploymentGroupStatus(final HeliosClient client, final String name, final DeploymentGroupStatus.State expected) throws Exception {<NEW_LINE>return Polling.await(LONG_WAIT_SECONDS, SECONDS, new Callable<DeploymentGroupStatus>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Deploymen...
State actual = status.getState();
1,691,866
protected void configure(KafkaJsonSchemaSerializerConfig config) {<NEW_LINE>configureClientProperties(config, new JsonSchemaProvider());<NEW_LINE>this.normalizeSchema = config.normalizeSchema();<NEW_LINE>this.autoRegisterSchema = config.autoRegisterSchema();<NEW_LINE>this.useSchemaId = config.useSchemaId();<NEW_LINE>th...
configure(SerializationFeature.INDENT_OUTPUT, prettyPrint);
1,666,973
public void tableChanged(TableModelEvent e) {<NEW_LINE>boolean enabled = !processesModel.isRefreshing();<NEW_LINE>processes.setEnabled(enabled);<NEW_LINE>refresh.setEnabled(enabled);<NEW_LINE>Mnemonics.setLocalizedText(processesHint, enabled ? Bundle.AttachDialog_SelectProcess() : Bundle.AttachDialog_SelectProcessReloa...
processes.selectRow(row, true);
1,645,755
public static DescribeSagExpressConnectInterfaceListResponse unmarshall(DescribeSagExpressConnectInterfaceListResponse describeSagExpressConnectInterfaceListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSagExpressConnectInterfaceListResponse.setRequestId(_ctx.stringValue("DescribeSagExpressConnectInterfaceList...
= new ArrayList<_Interface>();
838,101
public void lower(NewInstanceNode newInstanceNode, HotSpotRegistersProvider registers, LoweringTool tool) {<NEW_LINE>StructuredGraph graph = newInstanceNode.graph();<NEW_LINE>HotSpotResolvedObjectType type = (HotSpotResolvedObjectType) newInstanceNode.instanceClass();<NEW_LINE>assert !type.isArray();<NEW_LINE>ConstantN...
OptionValues localOptions = graph.getOptions();
689,767
private void invokePropertyHandler(String name, List<Value> values) {<NEW_LINE>// See if we have a property-handler function<NEW_LINE>try {<NEW_LINE>String[] parts = name.toLowerCase(Locale.ROOT).split("-");<NEW_LINE>StringBuffer methodName = new StringBuffer("propertyHandler");<NEW_LINE>for (String part : parts) {<NEW...
toString(), List.class);
542,321
public void initForNextRequest(IRequest req) {<NEW_LINE>// 321485<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {<NEW_LINE>// 306998.15<NEW_LINE>logger.logp(Level.FINE, CLASS_NAME, "initForNextRequest", "this->" + <MASK><NEW_LINE>}<NEW_LINE>if (WCCustomProperties.CHECK_REQUEST_OBJE...
this + " : " + " req->" + req);
1,769,299
public String template(Cursor cursor, String template, Space.Location location) {<NEW_LINE>// noinspection ConstantConditions<NEW_LINE>return Timer.builder("rewrite.template.generate.statement").register(Metrics.globalRegistry).record(() -> {<NEW_LINE>StringBuilder before = new StringBuilder();<NEW_LINE>StringBuilder a...
).withPrefix(Space.EMPTY);
995,808
public void write(org.apache.thrift.protocol.TProtocol prot, TConditionalSession struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.is...
oprot.writeI64(struct.sessionId);
1,683,166
public Response filter(Caller<?> caller, Request request) {<NEW_LINE>Entry interfaceEntry = null;<NEW_LINE>Entry methodEntry = null;<NEW_LINE>Map<String, String> attachment = request.getAttachments();<NEW_LINE>String origin = attachment.getOrDefault(MotanAdapterGlobalConfig.APPLICATION, MotanAdapterGlobalConfig.MOTAN);...
ContextUtil.enter(methodResourceName, origin);