idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,394,203 | ConfidenceInterval computeConfidenceInterval(double alpha, double alphaNum) {<NEW_LINE>// Setting alphaDen such that (1 - alpha) = (1 - alphaNum) * (1 - alphaDen).<NEW_LINE>double alphaDen = (alpha - alphaNum) / (1 - alphaNum);<NEW_LINE>ConfidenceInterval confIntNum = normalizedSum.computeConfidenceInterval(alphaNum);<... | () / confIntDen.upperBound(); |
307,649 | public Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> applyAsync(Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future) {<NEW_LINE>return execution -> innerFn.apply(execution).thenCompose(result -> {<NEW_LINE>if (res... | result.getException(), execution); |
1,835,735 | private BRecordType populatePossibleFields(BLangRecordVariable recordVar, List<BType> possibleTypes, SymbolEnv env) {<NEW_LINE>BRecordTypeSymbol recordSymbol = Symbols.createRecordSymbol(Flags.ANONYMOUS, names.fromString(ANONYMOUS_RECORD_NAME), env.enclPkg.symbol.pkgID, null, env.scope.owner, recordVar.pos, SOURCE);<NE... | possibleTypes, mappedFields, recordSymbol, env); |
147,375 | private static void patchHiDPI(UIDefaults defaults) {<NEW_LINE>Object prevScaleVal = defaults.get("hidpi.scaleFactor");<NEW_LINE>// used to normalize previously patched values<NEW_LINE>float prevScale = prevScaleVal != null ? (Float) prevScaleVal : 1f;<NEW_LINE>if (prevScale == JBUI.scale(1f) && prevScaleVal != null)<N... | "Slider.horizontalSize", "Slider.verticalSize", "Slider.minimumHorizontalSize", "Slider.minimumVerticalSize"); |
1,111,582 | private void updateUserMetadata() {<NEW_LINE>int bucketValue = computeBucketValue(bucketNumber.orElse(0), 0);<NEW_LINE>long writeId = maxWriteId.isPresent() ? maxWriteId.getAsLong() : transaction.getWriteId();<NEW_LINE>if (transaction.isAcidTransactionRunning()) {<NEW_LINE>int stripeRowCount = orcWriter.getStripeRowCou... | , format("%s,0,0", stripeRowCount)); |
731,486 | private static byte[] decryptCbcDes(SSL2ServerVerifyMessage message, TlsContext context) {<NEW_LINE>// The RFC draft tells us to not include an index, but (against OpenSSL)<NEW_LINE>// it only works when using "0"<NEW_LINE>byte[] keyMaterial = makeKeyMaterial(context, "0");<NEW_LINE>byte[] clientReadKey = Arrays.<MASK>... | copyOfRange(keyMaterial, 0, 8); |
284,479 | public List<QueryResult> query(String[] categories, String key, int matchRule) {<NEW_LINE>Map<String, QueryResult> results = null;<NEW_LINE>try {<NEW_LINE>// NOTE: I'd like to lock later in the method, but it would contort<NEW_LINE>// the IReadWriteMonitor interface, so we lock here and stick with<NEW_LINE>// the call ... | >(results.values()); |
1,459,699 | public void processPayload(Payload payload) {<NEW_LINE>String p = payload.param("p");<NEW_LINE>String finalUri = payload.getFinalURI();<NEW_LINE>if (Objects.nonNull(p)) {<NEW_LINE>Path inPublic = directoryService.findPathInPublic(p);<NEW_LINE>if (Objects.nonNull(inPublic)) {<NEW_LINE>fileService.processFile(payload, in... | fileService.processFile(payload, path); |
850,407 | public void shouldCollapseRequestsAsync() {<NEW_LINE>final HystrixContextScheduler contextAwareScheduler = new HystrixContextScheduler(Schedulers.computation());<NEW_LINE>final int noOfRequests = 10;<NEW_LINE>final Map<Integer, TestSubscriber<String>> subscribersByNumber = new HashMap<Integer, TestSubscriber<String>>(n... | (contextAwareScheduler).subscribe(subscriber); |
76,314 | static DeprecationIssue translogRetentionSettingCheck(IndexMetadata indexMetadata) {<NEW_LINE>final boolean softDeletesEnabled = IndexSettings.INDEX_SOFT_DELETES_SETTING.<MASK><NEW_LINE>if (softDeletesEnabled) {<NEW_LINE>if (IndexSettings.INDEX_TRANSLOG_RETENTION_SIZE_SETTING.exists(indexMetadata.getSettings()) || Inde... | get(indexMetadata.getSettings()); |
313,192 | public long handle(Emulator<?> emulator) {<NEW_LINE>RegisterContext context = emulator.getContext();<NEW_LINE>UnidbgPointer object = context.getPointerArg(1);<NEW_LINE>int start = context.getIntArg(2);<NEW_LINE>int length = context.getIntArg(3);<NEW_LINE>Pointer buf = context.getPointerArg(4);<NEW_LINE>StringObject str... | string, context.getLRPointer()); |
1,554,186 | public void testInvokeAllMixedPoliciesUntimed() throws Exception {<NEW_LINE>// Use up normal policy's max concurrency of 2<NEW_LINE>CountDownLatch blockerContinueLatch = new CountDownLatch(1);<NEW_LINE>CountingTask blockerTask1 = new CountingTask(null, null, new CountDownLatch(1), blockerContinueLatch);<NEW_LINE>Counti... | assertEquals(currentThreadId, normalTask1.threadId); |
450,414 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedState) {<NEW_LINE>mSenders = SenderCollection.getInstance(getActivity());<NEW_LINE>mDeviceGroupsHelper <MASK><NEW_LINE>View view = inflater.inflate(R.layout.fragment_groups, container, false);<NEW_LINE>setHtmlMode(view, R.id.groups_descr... | = new DeviceGroupsHelper(getActivity()); |
1,161,191 | protected void compile(ProtoModule module, Proto proto) throws IOException {<NEW_LINE>String javaPackageName = proto.getJavaPackageName();<NEW_LINE>String template = module.getOption("emulation_mode") == null ? "gwt_overlay" : "gwt_overlay_emulation_mode";<NEW_LINE>StringTemplateGroup group = getSTG(template);<NEW_LINE... | messageBlock.setAttribute("module", module); |
100,710 | static boolean validate(final MigrationConfig config, final String migrationsDir, final Client ksqlClient) {<NEW_LINE>String version = getLatestMigratedVersion(config, ksqlClient);<NEW_LINE>String nextVersion = null;<NEW_LINE>while (!version.equals(MetadataUtil.NONE_VERSION)) {<NEW_LINE>final MigrationVersionInfo versi... | "No migrations file found for version with status {}. Version: {}", MigrationState.MIGRATED, version); |
342,593 | public BigInteger modPow(BigInteger e, BigInteger m) {<NEW_LINE>if (m.sign < 1) {<NEW_LINE>throw new ArithmeticException("Modulus must be positive");<NEW_LINE>}<NEW_LINE>if (m.equals(ONE)) {<NEW_LINE>return ZERO;<NEW_LINE>}<NEW_LINE>if (e.sign == 0) {<NEW_LINE>return ONE;<NEW_LINE>}<NEW_LINE>if (sign == 0) {<NEW_LINE>r... | result = result.modInverse(m); |
1,708,614 | public static void copyResponseHeaders(final MultivaluedMap<String, Object> jaxRsHeaders, Response restletResponse) {<NEW_LINE>Series<Header> headers = new Series<Header>(Header.class);<NEW_LINE>for (Map.Entry<String, List<Object>> m : jaxRsHeaders.entrySet()) {<NEW_LINE>String headerName = m.getKey();<NEW_LINE>for (Ob... | headers.add(headerName, hValue); |
513,650 | public IdentifierToken transform(IdentifierToken identifier) {<NEW_LINE><MASK><NEW_LINE>// Removes quoted identifier prefix, if presents.<NEW_LINE>if (identifierText.startsWith(QUOTED_IDENTIFIER_PREFIX)) {<NEW_LINE>identifierText = identifierText.substring(1);<NEW_LINE>}<NEW_LINE>// Processes escaped unicode codepoints... | String identifierText = identifier.text(); |
930,246 | final StartMulticastGroupSessionResult executeStartMulticastGroupSession(StartMulticastGroupSessionRequest startMulticastGroupSessionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startMulticastGroupSessionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | false), new StartMulticastGroupSessionResultJsonUnmarshaller()); |
12,364 | protected void attemptStageAction(final ExecutionContext executionContext) throws RetryableJobExecutionException, FatalJobExecutionException {<NEW_LINE>final String requestedJobId = executionContext.getRequestedJobId();<NEW_LINE>final String reservedJobId;<NEW_LINE>if (executionContext.isPreResolved()) {<NEW_LINE>asser... | this.agentJobService.getJobStatus(requestedJobId); |
604,144 | private void addNodes(List<ExplorerNode> added) {<NEW_LINE>Map<ExplorerNode, List<Integer>> indexes = new HashMap();<NEW_LINE>// Save selection<NEW_LINE>Set<DataSource> selectedDataSources = ExplorerSupport.sharedInstance().getSelectedDataSources();<NEW_LINE>// Add nodes and create parent entries<NEW_LINE>for (Explorer... | ExplorerNode parent = entry.getKey(); |
1,160,117 | protected void animateHide(Runnable onFinishedHandler) {<NEW_LINE>if (autoCloseTimer != null) {<NEW_LINE>autoCloseTimer.stop();<NEW_LINE>autoCloseTimer = null;<NEW_LINE>}<NEW_LINE>if (NotificationCenter.useAnimations) {<NEW_LINE>double duration = getDuration(400);<NEW_LINE>Interpolator interpolator = Interpolator.SPLIN... | ), 1, interpolator))); |
921,480 | public AutoScaleVmProfile updateAutoScaleVmProfile(UpdateAutoScaleVmProfileCmd cmd) {<NEW_LINE>Long profileId = cmd.getId();<NEW_LINE>Long templateId = cmd.getTemplateId();<NEW_LINE>Long autoscaleUserId = cmd.getAutoscaleUserId();<NEW_LINE>Map counterParamList = cmd.getCounterParamList();<NEW_LINE><MASK><NEW_LINE>AutoS... | Integer destroyVmGraceperiod = cmd.getDestroyVmGraceperiod(); |
96,892 | public Void visit(ConstructorDeclaration decl, AElement elem) {<NEW_LINE>List<Parameter<MASK><NEW_LINE>List<AnnotationExpr> rcvrAnnos = decl.getAnnotations();<NEW_LINE>BlockStmt body = decl.getBody();<NEW_LINE>StringBuilder sb = new StringBuilder("<init>(");<NEW_LINE>AClass clazz = (AClass) elem;<NEW_LINE>AMethod metho... | > params = decl.getParameters(); |
1,181,579 | private static void registerMetricViews() {<NEW_LINE>// [START config_oc_latency_distribution]<NEW_LINE>Aggregation latencyDistribution = Distribution.create(BucketBoundaries.create(Arrays.asList(0.0, 5.0, 10.0, 25.0, 100.0, 200.0, 400.0, 800.0, 10000.0)));<NEW_LINE>// [END config_oc_latency_distribution]<NEW_LINE>// D... | = Aggregation.Count.create(); |
1,202,416 | public ResourceTask createRollbackVersionTask(String resourceId, String version, String user, Map<String, Object> properties) throws Exception {<NEW_LINE>LOGGER.info("begin to rollback version,resourceId:{}, version:{}", resourceId, version);<NEW_LINE>String lastVersion = getResourceLastVersion(resourceId);<NEW_LINE>St... | insertVersion = ResourceVersion.copyFromOldResourceVersion(oldVersion); |
595,472 | private void paintBase(InstancePainter painter) {<NEW_LINE>final var g = painter.getGraphics();<NEW_LINE>final var facing = painter.getAttributeValue(StdAttr.FACING);<NEW_LINE>final var loc = painter.getLocation();<NEW_LINE>final var x = loc.getX();<NEW_LINE>final var y = loc.getY();<NEW_LINE><MASK><NEW_LINE>var rotate... | g.translate(x, y); |
384,105 | public void storeSettings() {<NEW_LINE>List<String> enabledExternalList = new ArrayList<>();<NEW_LINE>List<String> disabledExternalList = new ArrayList<>();<NEW_LINE>List<String> enabledInternalList = new ArrayList<>();<NEW_LINE>List<String> disabledInternalList = new ArrayList<>();<NEW_LINE>for (ProtectedTermsList lis... | add(list.getLocation()); |
940,990 | final CreateSubnetGroupResult executeCreateSubnetGroup(CreateSubnetGroupRequest createSubnetGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createSubnetGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,074,833 | public void testCommitWhenDirectAssignment() throws Exception {<NEW_LINE>// connect with 1 stream directly requesting one partition<NEW_LINE>final TestStreamingClient client = new TestStreamingClient(URL, subscription.getId(), "batch_flush_timeout=1", Optional.empty(), Optional.of("{\"partitions\":[" + "{\"event_type\"... | ), client.getSessionId()); |
1,005,709 | public void onComplete() {<NEW_LINE>if (lengthOptimization) {<NEW_LINE>LOGGER.finest(() -> "(client reqID: " + requestId + ") " + "Message body contains only one data chunk. Setting chunked encoding to false.");<NEW_LINE><MASK><NEW_LINE>if (!HttpUtil.isContentLengthSet(request)) {<NEW_LINE>if (firstDataChunk != null) {... | HttpUtil.setTransferEncodingChunked(request, false); |
59,944 | private void saveSpecies(final EncogWriteHelper out, final Species species) {<NEW_LINE>out.addColumn("s");<NEW_LINE>out.addColumn(species.getAge());<NEW_LINE>out.addColumn(species.getBestScore());<NEW_LINE>out.<MASK><NEW_LINE>out.writeLine();<NEW_LINE>for (final Genome genome : species.getMembers()) {<NEW_LINE>final NE... | addColumn(species.getGensNoImprovement()); |
127,913 | public void unparseSqlIntervalQualifier(SqlWriter writer, SqlIntervalQualifier qualifier, RelDataTypeSystem typeSystem) {<NEW_LINE>final String start = qualifier.timeUnitRange.startUnit.name();<NEW_LINE>final int fractionalSecondPrecision = qualifier.getFractionalSecondPrecision(typeSystem);<NEW_LINE>final int startPre... | (qualifier.getFractionalSecondPrecision(typeSystem)); |
1,771,913 | public static int executeShell(String taskCommand, long timeout, Map<String, String> env, String errorFilePath, String standardFilePath) throws IOException, InterruptedException {<NEW_LINE>LOG.info("Executing command: " + taskCommand);<NEW_LINE>String executablePath = taskCommand.trim().split(" ")[0];<NEW_LINE>File exe... | File outFile = new File(standardFilePath); |
1,088,319 | public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {<NEW_LINE>if (args.length == 0) {<NEW_LINE>throw new NotEnoughArgumentsException(tl("mobsAvailable", StringUtil.joinList(Mob.getMobList())));<NEW_LINE>}<NEW_LINE>final List<String> mobParts = SpawnMob... | new Exception(tl("cannotStackMob")); |
1,658,376 | public void merge(HeapQuantileSketch other) {<NEW_LINE>if (other == null || other.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (other.k != this.k) {<NEW_LINE>throw new QuantileSketchException("Merge sketches with different k");<NEW_LINE>}<NEW_LINE>SketchUtils.checkBitPattern(other.bitPattern, other.n, other.k);... | this.minValue, other.minValue); |
33,584 | public static void main(String[] args) throws IOException {<NEW_LINE>TreeFactory tf = new LabeledScoredTreeFactory();<NEW_LINE>Reader r = new BufferedReader(new InputStreamReader(new FileInputStream(args<MASK><NEW_LINE>TreeReader tr = new PennTreeReader(r, tf);<NEW_LINE>Tree fullTree = tr.readTree();<NEW_LINE>while (fu... | [0]), "UTF-8")); |
300,344 | public void actionPerformed(ActionEvent e) {<NEW_LINE>log.<MASK><NEW_LINE>JFileChooser chooser = new JFileChooser();<NEW_LINE>chooser.addChoosableFileFilter(FileHelper.ALL_DESIGNS_FILTER);<NEW_LINE>chooser.addChoosableFileFilter(FileHelper.OPENROCKET_DESIGN_FILTER);<NEW_LINE>chooser.addChoosableFileFilter(FileHelper.RO... | info(Markers.USER_MARKER, "Open... selected"); |
596,105 | /* (non-Javadoc)<NEW_LINE>* @see com.ibm.ws.sib.processor.runtime.AbstractControllable#checkValidControllable()<NEW_LINE>*/<NEW_LINE>public void assertValidControllable() throws SIMPControllableNotFoundException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "checkV... | SibTr.exception(tc, finalE); |
707,634 | private List<OResult> toResult(Collection<? extends OCluster> clusterInstances) {<NEW_LINE>List<OResult> result = new ArrayList<>();<NEW_LINE>if (clusterInstances != null) {<NEW_LINE>for (OCluster cluster : clusterInstances) {<NEW_LINE>OResultInternal item = new OResultInternal();<NEW_LINE>item.setProperty("name", clus... | "id", cluster.getId()); |
197,733 | private static void runAssertionEventBeanAnnotation(RegressionEnvironment env, EventRepresentationChoice rep) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy(rep.getAnnotationTextWJsonProvided(MyLocalJsonProvidedMyEvent.class) + "@name('schema') @buseventtype @public create schema MyEv... | eventOne, eventTwo }, "E2" }); |
18,687 | private void initialize() {<NEW_LINE>this.setLayout(new BorderLayout());<NEW_LINE>// ZAP: i18n<NEW_LINE>this.setName(Constant.messages.getString("output.panel.title"));<NEW_LINE>if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {<NEW_LINE>this.setSize(243, 119);<NEW_LINE>}<NEW_LINE... | getMainPanel(), BorderLayout.CENTER); |
1,406,259 | private FieldDescriptor fillInMissingQualifiers(FieldDescriptor fieldDescriptor, Schema schema) {<NEW_LINE>// If there are nested arrays or maps, walk down them until we find the next row. If there<NEW_LINE>// are missing qualifiers, fill them in. This allows users to omit the qualifiers in the<NEW_LINE>// simple case ... | of(MapQualifier.ALL) : qualifier; |
443,657 | public void handle(AnnotationValues<AllArgsConstructor> annotation, JCAnnotation ast, JavacNode annotationNode) {<NEW_LINE>handleFlagUsage(annotationNode, ConfigurationKeys.ALL_ARGS_CONSTRUCTOR_FLAG_USAGE, "@AllArgsConstructor", ConfigurationKeys.ANY_CONSTRUCTOR_FLAG_USAGE, "any @xArgsConstructor");<NEW_LINE>deleteAnno... | AllArgsConstructor ann = annotation.getInstance(); |
920,597 | public void messageArrived(String topic, MqttMessage message) {<NEW_LINE>String payload = new String(message.getPayload());<NEW_LINE>System.out.println(String.format("Received message %s on topic %s with Qos %d", payload, topic, message.getQos()));<NEW_LINE>// The device will receive its latest config when it subscribe... | System.out.println("Fan turned off"); |
1,688,469 | static ImmutableList<SpawnResult> runLocally(Spawn spawn, ActionExecutionContext actionExecutionContext, @Nullable SandboxedSpawnStrategy.StopConcurrentSpawns stopConcurrentSpawns, Function<Spawn, Optional<Spawn>> getExtraSpawnForLocalExecution) throws ExecException, InterruptedException {<NEW_LINE>ImmutableList<SpawnR... | runSpawnLocally(spawn, actionExecutionContext, stopConcurrentSpawns); |
354,327 | private void configureVM(VirtualMachineTO vmTO, LibvirtVMDef vm, Map<String, String> customParams, boolean isUefiEnabled, boolean isSecureBoot, String bootMode, Map<String, String> extraConfig, String uuid) {<NEW_LINE>s_logger.debug(String.format("Configuring VM with UUID [%s].", uuid));<NEW_LINE>GuestDef guest = creat... | int vcpus = vmTO.getCpus(); |
740,340 | public Result index(String jobId) {<NEW_LINE>List<JobEvent> listOfEvents;<NEW_LINE>if (myFs == null) {<NEW_LINE>return internalServerError("Failed to initialize file system in " + this.getClass());<NEW_LINE>}<NEW_LINE>// Check cache<NEW_LINE>listOfEvents = cache.getIfPresent(jobId);<NEW_LINE>if (listOfEvents != null) {... | .parseEvents(myFs, jobFolder)); |
1,726,730 | void moveToTheTail(OClosableEntry<K, V> entry) {<NEW_LINE>if (tail == entry) {<NEW_LINE>assert entry.getNext() == null;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final OClosableEntry<K, V> next = entry.getNext();<NEW_LINE>final OClosableEntry<K, V> prev = entry.getPrev();<NEW_LINE>boolean newEntry = !(next != null || prev !... | assert next.getPrev() == entry; |
669,497 | public TextureAlphaMask createAlphaMask(Shape shape, Stroke stroke) {<NEW_LINE>int[] bounds = new int[] { 0, 0, 0, 0 };<NEW_LINE>long tex = nativeCreateAlphaMaskForShape(shape, stroke, bounds);<NEW_LINE>Rectangle shapeBounds = shape.getBounds();<NEW_LINE>int[] padding = new int[] { // top<NEW_LINE>// right<NEW_LINE>sha... | () - bounds[0] }; |
27,249 | public final ILock retrieveLockForOwner(@NonNull final LockOwner lockOwner) {<NEW_LINE>Check.assumeNotNull(lockOwner.isRealOwner(), "Lock owner shall be real owner but it was {}", lockOwner);<NEW_LINE>final String sql = "SELECT " + " " + I_T_Lock.COLUMNNAME_IsAutoCleanup + ", COUNT(1) as CountLocked" + " FROM " + I_T_L... | newLock(lockOwner, autoCleanup, countLocked); |
1,270,452 | private static void make_go2_method(ClassWriter cw, String outer_name, String mname, String full_inner, int arity, boolean proc, int freevars, Type returnType, boolean isTailCall, boolean isPausable) {<NEW_LINE>if (isPausable) {<NEW_LINE>if (ModuleAnalyzer.log.isLoggable(Level.FINE)) {<NEW_LINE>ModuleAnalyzer.log.fine(... | EPROC_NAME, "arg" + i, EOBJECT_DESC); |
1,624,384 | public static Object runFunctionScriptingSupport(Object reference, String function, Object[] args) {<NEW_LINE>Class<?> classSup = null;<NEW_LINE>if (reference == null || (reference instanceof String && ((String) reference).contains("org.python"))) {<NEW_LINE>try {<NEW_LINE>classSup = Class.forName("org.sikuli.support.i... | classSup = Class.forName("org.sikuli.support.ide.JRubySupport"); |
1,257,210 | protected void onPopulateNodeForVirtualView(int virtualViewId, AccessibilityNodeInfoCompat node) {<NEW_LINE>final Spanned spanned = (Spanned) mText;<NEW_LINE>final Rect sTempRect = new Rect();<NEW_LINE>// it can happen as part of an unmount/mount cycle that the accessibility framework will<NEW_LINE>// request the bound... | .subSequence(start, end)); |
1,513,100 | // Assigns colors (starting from 0) to all vertices and prints the assignment of colors<NEW_LINE>void greedyColoring() {<NEW_LINE>int[] res = new int[num_V];<NEW_LINE>// Initialize all vertices as unassigned<NEW_LINE>Arrays.fill(res, -1);<NEW_LINE>// Assign the first color to first vertex<NEW_LINE>res[0] = 0;<NEW_LINE>... | Arrays.fill(available, true); |
1,342,530 | public void main() {<NEW_LINE>RVec3 a_normal = (RVec3) getGlobal(DefaultShaderVar.A_NORMAL);<NEW_LINE>RVec4 g_color = (RVec4) getGlobal(DefaultShaderVar.G_COLOR);<NEW_LINE><MASK><NEW_LINE>n_color.assign(1);<NEW_LINE>n_color.r().assign(max(a_normal.x(), 0));<NEW_LINE>n_color.g().assign(max(a_normal.y(), 0));<NEW_LINE>n_... | RVec4 n_color = new RVec4("n_color"); |
1,042,059 | private // to decrypt and re-derive.<NEW_LINE>BigInteger findOrDeriveEncryptedPrivateKey(KeyCrypter keyCrypter, KeyParameter aesKey) {<NEW_LINE>if (encryptedPrivateKey != null) {<NEW_LINE>byte[] decryptedKey = keyCrypter.decrypt(encryptedPrivateKey, aesKey);<NEW_LINE>if (decryptedKey.length != 32)<NEW_LINE>throw new Ke... | InvalidCipherText("Decrypted key must be 32 bytes long, but is " + decryptedKey.length); |
97,436 | public String serialize(int numberOfSpacesToIndent, HttpClassCallback httpClassCallback) {<NEW_LINE>StringBuffer output = new StringBuffer();<NEW_LINE>if (httpClassCallback != null) {<NEW_LINE>appendNewLineAndIndent(numberOfSpacesToIndent * INDENT_SIZE, output).append("callback()");<NEW_LINE>if (httpClassCallback.getCa... | ))).append(")"); |
1,661,354 | public Notebook createNotebook(NotebookSpec spec) throws SubmarineRuntimeException {<NEW_LINE>checkNotebookSpec(spec);<NEW_LINE>String lowerName = spec.getMeta().getName().toLowerCase();<NEW_LINE>spec.getMeta().setName(lowerName);<NEW_LINE>NotebookId notebookId = generateNotebookId();<NEW_LINE>Map<String, String> label... | Status.STATUS_CREATING.getValue()); |
1,361,532 | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>builder.field("model_id", modelId);<NEW_LINE>if (inferenceThreads != null) {<NEW_LINE>builder.field(StartTrainedModelDeploymentAction.TaskParams.INFERENCE_THREADS.getPreferredName(), i... | QUEUE_CAPACITY.getPreferredName(), queueCapacity); |
1,811,895 | final CreatePlayerSessionResult executeCreatePlayerSession(CreatePlayerSessionRequest createPlayerSessionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPlayerSessionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | false), new CreatePlayerSessionResultJsonUnmarshaller()); |
1,855,571 | public synchronized void readFields(DataInput in) throws IOException {<NEW_LINE>super.readFields(in);<NEW_LINE>if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_30) {<NEW_LINE>long clusterMapSize = in.readLong();<NEW_LINE>while (clusterMapSize-- > 0) {<NEW_LINE>final String cluster = Text.readStrin... | long id = in.readLong(); |
1,120,199 | public final Control createControl(Composite parent, Consumer<Browser>... functions) {<NEW_LINE>Composite container = new Composite(parent, SWT.NONE);<NEW_LINE>GridLayoutFactory.fillDefaults().applyTo(container);<NEW_LINE>try {<NEW_LINE>browser = new <MASK><NEW_LINE>browser.setJavascriptEnabled(true);<NEW_LINE>GridData... | Browser(container, SWT.NONE); |
1,241,007 | private Node createFileAnnotationNode(FileAnnotationViewModel annotation) {<NEW_LINE>GridPane node = new GridPane();<NEW_LINE>ColumnConstraints firstColumn = new ColumnConstraints();<NEW_LINE>ColumnConstraints secondColumn = new ColumnConstraints();<NEW_LINE>firstColumn.setPercentWidth(70);<NEW_LINE>secondColumn.setPer... | Tooltip(annotation.getMarking()); |
931,288 | public void onNext(PooledRef<Connection> pooledRef) {<NEW_LINE>this.pooledRef = pooledRef;<NEW_LINE>Channel channel = pooledRef.poolable().channel();<NEW_LINE>ConnectionObserver current = channel.attr<MASK><NEW_LINE>if (current instanceof PendingConnectionObserver) {<NEW_LINE>PendingConnectionObserver pending = (Pendin... | (OWNER).getAndSet(this); |
1,458,093 | private static FieldRelation parseReplaceRule(ReplaceRule replaceRule, Set<String> replaceFields, String transformName, String preNode) {<NEW_LINE>StreamField sourceField = replaceRule.getSourceField();<NEW_LINE>final <MASK><NEW_LINE>String regex = replaceRule.getRegex();<NEW_LINE>String targetValue = replaceRule.getTa... | String fieldName = sourceField.getFieldName(); |
1,475,745 | private ReportOptions parseReportOptions(final List<String> classPath) {<NEW_LINE>final ReportOptions data = new ReportOptions();<NEW_LINE>if (this.mojo.getProject().getBuild() != null) {<NEW_LINE>this.log.info("Mutating from " + this.mojo.getProject().getBuild().getOutputDirectory());<NEW_LINE>data.setCodePaths(Collec... | this.mojo.getThreads()); |
1,183,751 | public JPanel buildOverviewPanel(WsdlProject project) {<NEW_LINE>JPropertiesTable<WsdlProject> table = new JPropertiesTable<WsdlProject>("Project Properties", project);<NEW_LINE>if (project.isOpen()) {<NEW_LINE>table.addProperty("Name", "name", true);<NEW_LINE>table.addProperty("Description", "description", true);<NEW_... | addPropertyShadow("Project Password", "shadowPassword", true); |
1,207,758 | private void createTimer() {<NEW_LINE>final Icon[] busyIcons = new Icon[15];<NEW_LINE>// NOI18N<NEW_LINE>for (int i = 0; i < busyIcons.length; i++) busyIcons[i] = new ImageIcon(getClass().getResource("/org/graalvm/visualvm/core/ui/resources/busy-icon" + i + ".png"));<NEW_LINE>busyIconTimer = new Timer(ANIMATION_RATE, n... | .setIcon(busyIcons[busyIconIndex]); |
1,336,095 | V replace(K key, int hash, V newValue) {<NEW_LINE>lock();<NEW_LINE>try {<NEW_LINE>preWriteCleanup();<NEW_LINE>AtomicReferenceArray<E> table = this.table;<NEW_LINE>int index = hash & (table.length() - 1);<NEW_LINE>E first = table.get(index);<NEW_LINE>for (E e = first; e != null; e = e.getNext()) {<NEW_LINE>K entryKey = ... | table.set(index, newFirst); |
115,713 | public static RestClientConfig load(Class<?> interfaceClass) {<NEW_LINE>final RestClientConfig instance = new RestClientConfig();<NEW_LINE>instance.url = getConfigValue(interfaceClass, "url", String.class);<NEW_LINE>instance.uri = getConfigValue(interfaceClass, "uri", String.class);<NEW_LINE>instance.scope = getConfigV... | interfaceClass, "non-proxy-hosts", String.class); |
1,344,170 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>// get a reference to the scene view<NEW_LINE>mSceneView = findViewById(R.id.sceneView);<NEW_LINE>// create a scene with an imagery basemap<NEW_LINE>ArcGISScene sce... | setPitchExpression('[' + PITCH_EXPRESSION + ']'); |
251,174 | public final AnyCharContext anyChar() throws RecognitionException {<NEW_LINE>AnyCharContext _localctx = new AnyCharContext(_ctx, getState());<NEW_LINE><MASK><NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(97);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (!((((_la) & ~0x... | enterRule(_localctx, 20, RULE_anyChar); |
1,146,724 | private Optional<DescriptorProto> buildNonChoiceTypeNestedTypeIfNeeded(ElementDefinition element) throws InvalidFhirException {<NEW_LINE>if (element.getTypeCount() != 1) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>Optional<DescriptorProto> profiledCodeableConcept = makeProfiledCodeableConceptIfRequired(elem... | DescriptorProto> profiledCode = makeProfiledCodeIfRequired(element); |
1,607,244 | public EventCategoriesMap unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>EventCategoriesMap eventCategoriesMap = new EventCategoriesMap();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>tar... | ().unmarshall(context)); |
415,287 | private LockSettingsParams processLockSettingsParams(Map<String, String> params) {<NEW_LINE>Boolean lockSettingsDisableCam = defaultLockSettingsDisableCam;<NEW_LINE>String lockSettingsDisableCamParam = params.get(ApiParams.LOCK_SETTINGS_DISABLE_CAM);<NEW_LINE>if (!StringUtils.isEmpty(lockSettingsDisableCamParam)) {<NEW... | lockSettingsDisableCam = Boolean.parseBoolean(lockSettingsDisableCamParam); |
414,208 | public static void main(String[] args) throws Exception {<NEW_LINE>// read a geometry from a WKT string (using the default geometry factory)<NEW_LINE>Geometry g1 = new WKTReader().read("LINESTRING (0 0, 10 10, 20 20)");<NEW_LINE>System.out.println("Geometry 1: " + g1);<NEW_LINE>// create a geometry by specifying the co... | + g1.contains(point)); |
1,204,248 | private void init() {<NEW_LINE>// long start = System.currentTimeMillis();<NEW_LINE>this.namespaceDefinitionRegistry = new ConcurrentHashMap<String, NamespaceDefinition>();<NEW_LINE>// Add in namespace definitions from the classpath<NEW_LINE>if (XmlNamespaceUtils.useNamespacesFromClasspath(project)) {<NEW_LINE>Resource... | PropertiesLoaderUtils.loadAllProperties(DEFAULT_TOOLING_MAPPINGS_LOCATION, cls); |
347,663 | private void doBasic2Oauth(RoutingContext context, String role, String username, String password) {<NEW_LINE>JsonObject params = new JsonObject().put("username", username).put("password", password);<NEW_LINE>HttpClientOptions sslOptions = getHttpClientOptionsForKeycloak(authConfig);<NEW_LINE>OAuth2Auth oauth2 = Keycloa... | handle403(context, "insufficient_scope", message); |
1,036,434 | private Predicate addPredicateSource(List<? extends IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestDetails theRequest) {<NEW_LINE>// Required for now<NEW_LINE>assert theOperation == SearchFilterParser.CompareOperation.eq;<NEW_LINE>if (myDaoConfig.getStoreMetaSourceInformation() =... | .get("myRequestId"), requestId); |
1,600,819 | private void takeInternal(final Consumer<Path> takeSnapshot) {<NEW_LINE>final var snapshotMetrics = snapshotStore.getSnapshotMetrics();<NEW_LINE>try (final var ignored = snapshotMetrics.startTimer()) {<NEW_LINE>try {<NEW_LINE>takeSnapshot.accept(getPath());<NEW_LINE>if (!directory.toFile().exists() || directory.toFile(... | calculate(directory).getCombinedValue(); |
1,528,929 | public final void parameterModifiersOpt() throws RecognitionException, TokenStreamException {<NEW_LINE>returnAST = null;<NEW_LINE>ASTPair currentAST = new ASTPair();<NEW_LINE>AST parameterModifiersOpt_AST = null;<NEW_LINE>Token first = LT(1);<NEW_LINE>int seenDef = 0;<NEW_LINE>{<NEW_LINE>_loop292: do {<NEW_LINE>switch(... | parameterModifiersOpt_AST = (AST) currentAST.root; |
862,816 | private List<VespaConfigChangeAction> validateAttributeSettings() {<NEW_LINE>List<VespaConfigChangeAction> result = new ArrayList<>();<NEW_LINE>for (Attribute next : nextFields.attributes()) {<NEW_LINE>Attribute current = currentFields.getAttribute(next.getName());<NEW_LINE>if (current != null) {<NEW_LINE>validateAttri... | Attribute::distanceMetric, "distance-metric", result); |
128,107 | public Mono<FetchModelResult> fetchModelAsync(String dtmi, URI repositoryUri, boolean tryFromExpanded, Context context) {<NEW_LINE>return Mono.defer(() -> {<NEW_LINE>Queue<String> work = new LinkedList<>();<NEW_LINE>try {<NEW_LINE>if (tryFromExpanded) {<NEW_LINE>work.add(getModelPath(dtmi, repositoryUri, true));<NEW_LI... | String tryContentPath = work.poll(); |
930,109 | private void runZip(String outputName) {<NEW_LINE>// Zip up the dump, libraries and (optionally) XML file<NEW_LINE>Set<String> files = new LinkedHashSet<>();<NEW_LINE>files.add(_dumpName);<NEW_LINE>for (Iterator<?> iter = _dump.getAdditionalFileNames(); iter.hasNext(); ) {<NEW_LINE>files.add((String) iter.next());<NEW_... | osName = System.getProperty("os.name"); |
1,725,655 | public static List<ListItem> buildListItems(final List<ExchangeRateEntry> exchangeRates, final Coin balance, final BlockchainState blockchainState, final String defaultCurrency, final Coin rateBase) {<NEW_LINE>final List<ListItem> items = new ArrayList<>(exchangeRates.size());<NEW_LINE>for (final ExchangeRateEntry exch... | ExchangeRate rate = exchangeRate.exchangeRate(); |
1,563,460 | public // region update<NEW_LINE>UpdateRequest updateRequest(UpdateQuery query, IndexCoordinates index) {<NEW_LINE>String indexName = query.getIndexName() != null ? query.getIndexName() : index.getIndexName();<NEW_LINE>UpdateRequest updateRequest = new UpdateRequest(indexName, query.getId());<NEW_LINE>if (query.getScri... | setIfPrimaryTerm(query.getIfPrimaryTerm()); |
89,899 | final UntagRoleResult executeUntagRole(UntagRoleRequest untagRoleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagRoleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,655,371 | private static INaviCodeNode insertCodeNode(final INaviView target, final INaviCodeNode node) {<NEW_LINE>// TODO: cloning the node is a bad solution since this just fixes the symptoms: instructions are<NEW_LINE>// closed two times<NEW_LINE>final INaviCodeNode sourceNode = (INaviCodeNode) node.cloneNode();<NEW_LINE>fina... | > newInstructions = codeNode.getInstructions(); |
433,126 | protected RecordSetInner prepareForUpdate(RecordSetInner resource) {<NEW_LINE>if (innerModel().aRecords() != null && !innerModel().aRecords().isEmpty()) {<NEW_LINE>if (resource.aRecords() == null) {<NEW_LINE>resource.withARecords<MASK><NEW_LINE>}<NEW_LINE>resource.aRecords().addAll(innerModel().aRecords());<NEW_LINE>in... | (new ArrayList<>()); |
1,357,684 | public ProcessPreconditionsResolution checkPreconditionsApplicable(final IProcessPreconditionsContext context) {<NEW_LINE>if (!context.isSingleSelection()) {<NEW_LINE>return ProcessPreconditionsResolution.rejectWithInternalReason("one and only one order shall be selected");<NEW_LINE>}<NEW_LINE>final I_C_Order salesOrde... | ofCode(salesOrder.getDocStatus()); |
397,648 | public FlowTemplateFilter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>FlowTemplateFilter flowTemplateFilter = new FlowTemplateFilter();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | JsonToken token = context.getCurrentToken(); |
103,228 | // Driver Program<NEW_LINE>public static void main(String[] args) {<NEW_LINE>// Just generate data<NEW_LINE>Random r = ThreadLocalRandom.current();<NEW_LINE>int size = 100;<NEW_LINE>int maxElement = 100000;<NEW_LINE>Integer[] integers = IntStream.generate(() -> r.nextInt(maxElement)).limit(size).sorted().boxed().toArra... | ("Upper Bound found at an index: %d. Is greater or max element: %b", atIndex, toCheck)); |
277,222 | private static ImageData rotateOptimized(ImageData srcData) {<NEW_LINE>int bytesPerPixel = Math.max(1, srcData.depth / 8);<NEW_LINE>int destBytesPerLine = ((srcData.height * bytesPerPixel - 1) / srcData.scanlinePad + 1) * srcData.scanlinePad;<NEW_LINE>byte[] newData = new <MASK><NEW_LINE>for (int srcY = 0; srcY < srcDa... | byte[destBytesPerLine * srcData.width]; |
164,739 | private void addLocals(StyledDocument doc1, StyledDocument doc2, Function function1, Function function2) {<NEW_LINE>Variable[] vars1 = function1.getLocalVariables();<NEW_LINE>Variable[] vars2 = function2.getLocalVariables();<NEW_LINE>if (ProgramDiff.equivalentVariableArrays(vars1, vars2, false)) {<NEW_LINE>return;<NEW_... | [] { vars1, vars2 }); |
273,425 | public AnimClip buildAnimation(HasLocalTransform target) {<NEW_LINE>Set<Float> times = new TreeSet<>();<NEW_LINE>for (int frameI = 0; ; ++frameI) {<NEW_LINE>float time = frameI / fps;<NEW_LINE>if (time > duration) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>times.add(time);<NEW_LINE>}<NEW_LINE>times.<MASK><NEW_LINE>times.add... | addAll(rotations.keySet()); |
1,372,337 | public void layout(List<SortableElement> elements) {<NEW_LINE>Map<String, List<SortableElement>> packages = extractPackages(elements);<NEW_LINE>Map<SortableElement, List<SortableElement>> packList = new TreeMap<SortableElement, List<SortableElement>>();<NEW_LINE>for (Map.Entry<String, List<SortableElement>> entry : pac... | createPackageElement(entry.getKey()); |
1,447,858 | private Query createQueryInternal(ConvertingParameterAccessor accessor, boolean isCountQuery) {<NEW_LINE>MongoQueryCreator creator = new MongoQueryCreator(tree, accessor, context, isCountQuery ? false : isGeoNearQuery);<NEW_LINE>Query query = creator.createQuery();<NEW_LINE>if (isCountQuery) {<NEW_LINE>return query;<NE... | , Document.parse(fieldSpec)); |
875,173 | public boolean onBlockActivated(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull EntityPlayer entityPlayer, @Nonnull EnumHand hand, @Nonnull EnumFacing side, float hitX, float hitY, float hitZ) {<NEW_LINE>T machine = getTileEntity(world, pos);<NEW_LINE>ItemStack heldItem = entityPlayer.... | side, hitX, hitY, hitZ); |
1,209,251 | public void build(LiteralArgumentBuilder<CommandSource> builder) {<NEW_LINE>builder.then(literal("settings").then(argument("module", ModuleArgumentType.module()).executes(context -> {<NEW_LINE>Module module = context.getArgument("module", Module.class);<NEW_LINE>module.settings.forEach(group -> group.forEach(Setting::r... | set(true, -1)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.