idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
302,277 | public void build(EstimatePositionRequest request, EstimatePositionResponse response) {<NEW_LINE>String operating_system = request.getOperatingSystem();<NEW_LINE>String buid = request.getBuid();<NEW_LINE>String floor = request.getFloor();<NEW_LINE>String algorithm = request.getAlgorithm();<NEW_LINE>if (operating_system... | ).info(anyplace_response + "\n"); |
1,413,692 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>personaIDLabel = <MASK><NEW_LINE>viewButton = new javax.swing.JButton();<NEW_LINE>setLayout(new java.awt.GridBagLayout());<... | new javax.swing.JLabel(); |
1,275,338 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setTheme(MainActivity.nightMode ? R.style.AppTheme_Dark : R.style.AppTheme);<NEW_LINE>// set to full screen<NEW_LINE>getWindow().<MASK><NEW_LINE>// keep main display on?<NEW_LINE>if (MainActivity.prefs.getBoolean("ke... | addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); |
1,138,074 | protected Map<String, Object> defaultPrntOptions(boolean skipDefault) {<NEW_LINE>Map<String, Object> out = new HashMap<>();<NEW_LINE>if (engine != null && !skipDefault && engine.hasVariable(VAR_PRNT_OPTIONS)) {<NEW_LINE>out.putAll((Map<String, Object><MASK><NEW_LINE>out.remove(Printer.SKIP_DEFAULT_OPTIONS);<NEW_LINE>ma... | ) engine.get(VAR_PRNT_OPTIONS)); |
879,371 | public DescribeThingTypeResult describeThingType(DescribeThingTypeRequest describeThingTypeRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeThingTypeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAws... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
118,567 | public void removeRelation(InternalRelation relation) {<NEW_LINE>Preconditions.checkArgument(!relation.isRemoved());<NEW_LINE>relation = relation.it();<NEW_LINE>for (int i = 0; i < relation.getLen(); i++) verifyWriteAccess(relation.getVertex(i));<NEW_LINE>// Delete from Vertex<NEW_LINE>for (int i = 0; i < relation.getL... | vertex, vertex.longId()); |
1,079,687 | public void layoutContainer(Container parent) {<NEW_LINE>int width = parent.getWidth();<NEW_LINE>int height = parent.getHeight();<NEW_LINE>parentContainer = parent;<NEW_LINE>state.<MASK><NEW_LINE>if (DEBUG) {<NEW_LINE>Utils.log("Current system is:\n" + state.serialize());<NEW_LINE>}<NEW_LINE>for (String id : idsToConst... | guidelines.apply(mLayout, idsToConstraintWidgets); |
324,593 | public double skewness() {<NEW_LINE>double mean = mean();<NEW_LINE>double numer = 0, denom = 0;<NEW_LINE>for (int i = 0; i < used; i++) {<NEW_LINE>numer += pow(values[i] - mean, 3);<NEW_LINE>denom += pow(values[i] - mean, 2);<NEW_LINE>}<NEW_LINE>// All the zero's we arent storing<NEW_LINE>numer += pow(-mean, 3) * (leng... | (denom, 3.0 / 2.0)); |
306,050 | public StepExecutionResult execute(ExecutionContext context) throws IOException, InterruptedException {<NEW_LINE>if (dryRunResultsPath.isPresent()) {<NEW_LINE>NSDictionary dryRunResult = new NSDictionary();<NEW_LINE>dryRunResult.put("relative-path-to-sign", dryRunResultsPath.get().getParent().relativize(pathToSign).toS... | add(pathToSign.toString()); |
952,418 | protected void handleMessageInternal(Message<?> message) {<NEW_LINE>MessageHeaders headers = message.getHeaders();<NEW_LINE>String destination = SimpMessageHeaderAccessor.getDestination(headers);<NEW_LINE>String sessionId = SimpMessageHeaderAccessor.getSessionId(headers);<NEW_LINE>updateSessionReadTime(sessionId);<NEW_... | SimpMessageHeaderAccessor.create(SimpMessageType.CONNECT_ACK); |
1,467,730 | public void worst() {<NEW_LINE><MASK><NEW_LINE>size = s.nextInt();<NEW_LINE>System.out.println("ENTER THE SIZES OF PROCESSES");<NEW_LINE>int[] s111 = new int[size];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>int a = s.nextInt();<NEW_LINE>s111[i] = a;<NEW_LINE>}<NEW_LINE>System.out.println("ENTER THE SIZE OF MEM... | System.out.println("ENTER THE NUMBER OF PROCESSES"); |
236,200 | final DetachFromIndexResult executeDetachFromIndex(DetachFromIndexRequest detachFromIndexRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(detachFromIndexRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<Detach... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
419,476 | public static ListInboundOrderCasesResponse unmarshall(ListInboundOrderCasesResponse listInboundOrderCasesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listInboundOrderCasesResponse.setRequestId(_ctx.stringValue("ListInboundOrderCasesResponse.RequestId"));<NEW_LINE>listInboundOrderCasesResponse.setPageSize(_ctx.intege... | ("ListInboundOrderCasesResponse.Cases[" + i + "].ApplyStatus")); |
938,732 | private Map<String, Object> toD3Format(Iterator<Map<String, Object>> result) {<NEW_LINE>List<Map<String, Object>> nodes = new ArrayList<>();<NEW_LINE>List<Map<String, Object>> rels = new ArrayList<>();<NEW_LINE>int i = 0;<NEW_LINE>while (result.hasNext()) {<NEW_LINE>Map<String, Object> row = result.next();<NEW_LINE>nod... | "title", name, "label", "actor"); |
531,374 | private void breakFromList(Deque<BlockPos> closedList, int maxAmount, Level world, ServerPlayer player, ItemStack stack) {<NEW_LINE>int count = 0;<NEW_LINE>while (count++ < maxAmount && !closedList.isEmpty()) {<NEW_LINE>BlockPos pos = closedList.pollFirst();<NEW_LINE>int xpDropEvent = ForgeHooks.onBlockBreakEvent(world... | new ClientboundBlockUpdatePacket(world, pos)); |
52,765 | final GetFunctionResult executeGetFunction(GetFunctionRequest getFunctionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getFunctionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
91,329 | public void createThread(TargetObject added) {<NEW_LINE>// System.err.println("createThread " + added + ":" + this);<NEW_LINE>synchronized (recorder.threadMap) {<NEW_LINE>ManagedThreadRecorder threadRecorder = recorder.getThreadRecorder((TargetThread) added);<NEW_LINE>TraceThread traceThread = threadRecorder.getTraceTh... | traceThread + " started", traceThread, null); |
1,050,193 | protected void deploy(DeploymentInfo deploymentInfo) {<NEW_LINE>LOG.info("Deploying JAX-RS deployment for protocol instance : " + this);<NEW_LINE>DeploymentManager manager = Servlets.defaultContainer().addDeployment(deploymentInfo);<NEW_LINE>manager.deploy();<NEW_LINE>HttpHandler httpHandler;<NEW_LINE>// Get realm from... | String agentRealm = agent.getRealm(); |
49,575 | public static void vertical(GrayF32 src, GrayI16 dst) {<NEW_LINE>if (src.height < dst.height)<NEW_LINE>throw new IllegalArgumentException("src height must be >= dst height");<NEW_LINE>if (src.width != dst.width)<NEW_LINE>throw new IllegalArgumentException("src width must equal dst width");<NEW_LINE>float scale = src.he... | = (y + 1) * scale; |
175,485 | public Object handleOperation(String operation, Object[] params) throws IOException {<NEW_LINE>if (OPERATION_DOWNLOAD.equals(operation)) {<NEW_LINE>if (params.length == 2) {<NEW_LINE>downloadFile((String) params[0], (String) params[1]);<NEW_LINE>} else {<NEW_LINE>// partial download<NEW_LINE>return downloadFile((String... | (String) params[0]); |
1,377,890 | protected void sync() {<NEW_LINE>inSync = true;<NEW_LINE>WSDLComponent secBinding = null;<NEW_LINE>WSDLComponent topSecBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(comp);<NEW_LINE>WSDLComponent protTokenKind = SecurityTokensModelHelper.getTokenElement(topSecBinding, ProtectionToken.class);<NEW_LINE... | , SecurityPolicyModelHelper.isRequireSignatureConfirmation(comp)); |
71,429 | SearchInput.Result doExecute(WatchExecutionContext ctx, WatcherSearchTemplateRequest request) throws Exception {<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>logger.trace("[{}] running query for [{}] [{}]", ctx.id(), ctx.watch().id(), request.getSearchSource().utf8ToString());<NEW_LINE>}<NEW_LINE>SearchRequest <MAS... | searchRequest = searchTemplateService.toSearchRequest(request); |
829,566 | protected void exec() {<NEW_LINE>TMPDIR = super.tmpdir;<NEW_LINE>DIR = super.location;<NEW_LINE>datafile = super.filenames.get(0);<NEW_LINE>FileOps.ensureDir(TMPDIR);<NEW_LINE>FileOps.clearAll(TMPDIR);<NEW_LINE>if (!TMPDIR.equals(DIR)) {<NEW_LINE>FileOps.ensureDir(DIR);<NEW_LINE>FileOps.clearAll(DIR);<NEW_LINE>}<NEW_LI... | + super.sortThreads, "--index=SPOG")); |
1,622,417 | public static CodegenExpression codegenPointInTime(DTLocalLongOpsIntervalForge forge, CodegenExpression inner, EPTypeClass innerType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) {<NEW_LINE>CodegenExpression timeZoneField = codegenClassScope.addOrGetFiel... | , methodNode, exprSymbol, codegenClassScope)); |
600,927 | public void onBindHeaderViewHolder(SectionedViewHolder commonHolder, final int section, boolean expanded) {<NEW_LINE>if (section < filteredSyncFolderItems.size()) {<NEW_LINE>HeaderViewHolder holder = (HeaderViewHolder) commonHolder;<NEW_LINE>holder.binding.headerContainer.setVisibility(View.VISIBLE);<NEW_LINE>holder.bi... | syncStatusButton.setVisibility(View.VISIBLE); |
954,208 | private static //<NEW_LINE>//<NEW_LINE>void //<NEW_LINE>evaluateForksExecutionPaths(//<NEW_LINE>List<List<Tree>> allExecutionPaths, //<NEW_LINE>List<List<Tree>> currentPaths, //<NEW_LINE>List<Tree> currentPath, //<NEW_LINE>boolean lastIsCurrentPath, List<BreakTree> activeBreaks, Tree[] forks) {<NEW_LINE>int i = 0;<NEW_... | List<List<Tree>> currentPathsForFork; |
1,162,993 | protected RecoverableUnitSection createLogSection(int sectionId, RecoverableUnit ru) throws SystemException {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "createLogSection", new Object[] { sectionId, ru });<NEW_LINE>RecoverableUnitSection logSection = null;<NEW_LINE>try {<NEW_LINE>// Create a RecoverableUni... | e, "com.ibm.tx.jta.impl.RegisteredResources.createLogSection", "2349", this); |
144,856 | public void visitVariableExpression(VariableExpression expression) {<NEW_LINE>String variableName = expression.getName();<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>// SPECIAL CASES<NEW_LINE>// "this" for static methods is the Class instance<NEW_LINE>ClassNode classNode... | variable, expression.isUseReferenceDirectly()); |
1,250,339 | private static synchronized void persistCache(DataOutputStream os, Map<String, Map<File, Set<String>>> fc, Map<String, List<File>> cc) throws IOException {<NEW_LINE>os.writeInt(fc.size());<NEW_LINE>for (Map.Entry<String, Map<File, Set<String>>> entry : fc.entrySet()) {<NEW_LINE>os.writeUTF(entry.getKey());<NEW_LINE>fin... | getValue().size()); |
374,181 | public static int dds(Model model, AbstractStrategy strategy, int dis, int dep) {<NEW_LINE>int c = 0;<NEW_LINE>try {<NEW_LINE>model.getSolver().getEngine().propagate();<NEW_LINE>} catch (ContradictionException e) {<NEW_LINE>return c;<NEW_LINE>}<NEW_LINE>Decision dec = strategy.getDecision();<NEW_LINE>if (dec != null) {... | .isSatisfied() == ESat.TRUE; |
1,248,443 | private void exportTo(File file, IntPredicate filter) throws IOException {<NEW_LINE>//<NEW_LINE>CSVFormat //<NEW_LINE>csvformat = // $NON-NLS-1$<NEW_LINE>CSVFormat.DEFAULT.builder().setDelimiter(';').setQuote('"').setRecordSeparator("\r\n").// $NON-NLS-1$<NEW_LINE>setAllowDuplicateHeaderNames(true).build();<NEW_LINE>tr... | Messages.CSVColumn_DeltaInPercent, Messages.CSVColumn_CumulatedPerformanceInPercent); |
46,033 | public static DescribeExporterOutputListResponse unmarshall(DescribeExporterOutputListResponse describeExporterOutputListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeExporterOutputListResponse.setRequestId(_ctx.stringValue("DescribeExporterOutputListResponse.RequestId"));<NEW_LINE>describeExporterOutputListRe... | (_ctx.stringValue("DescribeExporterOutputListResponse.Message")); |
1,605,022 | protected void execute(final Event e) {<NEW_LINE>if (potionEffect) {<NEW_LINE>for (LivingEntity livingEntity : entities.getArray(e)) {<NEW_LINE>PotionEffect[] potionEffects = this.potionEffects.getArray(e);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>final PotionEffectType[] ts = potions.getArray(e);<NEW_LINE... | PotionEffectUtils.addEffects(livingEntity, potionEffects); |
964,019 | public void run() {<NEW_LINE>boolean compressed = (mode & EFILE_COMPRESSED) > 0;<NEW_LINE>if (compressed && log.isLoggable(Level.FINE)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>boolean append = (mode & EFILE_MODE_APPEND) > 0;<NEW_LINE>if ((mode & ~(EFILE_MODE_APPEND | EFILE_MODE_READ_WRITE | EFILE_MODE_EXCL)) > 0) {<NEW_L... | log.fine("EFile.open_compressed " + file_name); |
119,209 | final UpdateChannelResult executeUpdateChannel(UpdateChannelRequest updateChannelRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateChannelRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UpdateChannelReq... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
798,182 | public mega.privacy.android.app.protobuf.TombstoneProtos.Thread buildPartial() {<NEW_LINE>mega.privacy.android.app.protobuf.TombstoneProtos.Thread result = new mega.privacy.android.app.protobuf.TombstoneProtos.Thread(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>result.id_ =... | bitField0_ = (bitField0_ & ~0x00000004); |
805,548 | public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<ModelMap> allModels) {<NEW_LINE>Map<String, Object> operations = (Map<String, Object>) objs.get("operations");<NEW_LINE>List<CodegenOperation> operationList = (List<CodegenOperation>) operations.get("operation");<NEW_LINE>for (Cod... | vendorExtensions.put("x-scalatra-path", scalaPath); |
117,591 | public void linkModelToMaterialTracking(@NonNull final MTLinkRequest request) {<NEW_LINE>final I_M_Material_Tracking materialTracking = request.getMaterialTrackingRecord();<NEW_LINE>final Object model = request.getModel();<NEW_LINE>final IMaterialTrackingDAO materialTrackingDAO = Services.get(IMaterialTrackingDAO.class... | get(materialTracking.getM_Material_Tracking_ID()); |
35,722 | private void cullRamerDouglasPeucer(boolean[] survivor, int start, int end) {<NEW_LINE>double dmax = Double.NEGATIVE_INFINITY;<NEW_LINE>int index = -1;<NEW_LINE>WptPt startPt = rs.points.get(start);<NEW_LINE>WptPt endPt = rs.points.get(end);<NEW_LINE>for (int i = start + 1; i < end && !isCancelled(); i++) {<NEW_LINE>Wp... | cullRamerDouglasPeucer(survivor, start, index); |
460,615 | private void generateInvoicesIfNeeded() {<NEW_LINE>Check.assumeNotNull(shipmentsGenerateResult, "shipments generated");<NEW_LINE>final List<I_M_InOut> shipments = shipmentsGenerateResult.getInOuts();<NEW_LINE>if (shipments.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (invoiceMode == BillAssociatedInvoiceCandida... | boolean adhereToInvoiceSchedule = invoiceMode == BillAssociatedInvoiceCandidates.IF_INVOICE_SCHEDULE_PERMITS; |
953,509 | public void onClick(View v) {<NEW_LINE>Date date;<NEW_LINE>hideKeyboard(mToDoTextBodyEditText);<NEW_LINE>if (mUserToDoItem.getToDoDate() != null) {<NEW_LINE>// date = mUserToDoItem.getToDoDate();<NEW_LINE>date = mUserReminderDate;<NEW_LINE>} else {<NEW_LINE>date = new Date();<NEW_LINE>}<NEW_LINE>Calendar calendar = Cal... | calendar.get(Calendar.YEAR); |
1,211,434 | public void bridgeStatusChanged(final ThingStatusInfo bridgeStatusInfo) {<NEW_LINE>logger.debug("DEV {}: Controller status is {}", unitId, bridgeStatusInfo.getStatus());<NEW_LINE>if (bridgeStatusInfo.getStatus() != ThingStatus.ONLINE) {<NEW_LINE>updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE, Consta... | logger.debug("DEV {}: bridge is null!", unitId); |
1,329,244 | private SubTaskGroup createRootVolumeCreationTasks(List<NodeDetails> nodes) {<NEW_LINE>Map<UUID, List<NodeDetails>> rootVolumesPerAZ = nodes.stream().collect(Collectors.groupingBy(n -> n.azUuid));<NEW_LINE>SubTaskGroup subTaskGroup = getTaskExecutor().createSubTaskGroup("CreateRootVolumes", executor);<NEW_LINE>rootVolu... | ).getClusterByUuid(node.placementUuid); |
1,570,492 | final CreateEventDataStoreResult executeCreateEventDataStore(CreateEventDataStoreRequest createEventDataStoreRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createEventDataStoreRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
817,006 | public static Optional<JwkEcPublicKey> tryDecodeEcKey(String keyId, Key key) {<NEW_LINE>// alg field is optional so not verified<NEW_LINE>// use field is optional so not verified<NEW_LINE>Optional<String> curveName = key.getStringProperty("crv");<NEW_LINE>Optional<ECParameterSpec> curve = curveName.flatMap(EcCurve::try... | (keyId, "x", encodedX)); |
745,996 | public RankerScorer scorer(LeafReaderContext context) throws IOException {<NEW_LINE>List<Scorer> scorers = new ArrayList<>(weights.size());<NEW_LINE>DisiPriorityQueue disiPriorityQueue = new DisiPriorityQueue(weights.size());<NEW_LINE>for (Weight weight : weights) {<NEW_LINE>Scorer scorer = weight.scorer(context);<NEW_... | add(new DisiWrapper(scorer)); |
360,354 | public static LeafSlice[] slices(List<LeafReaderContext> leaves, int maxDocsPerSlice, int maxSegmentsPerSlice) {<NEW_LINE>// Make a copy so we can sort:<NEW_LINE>List<LeafReaderContext> sortedLeaves = new ArrayList<>(leaves);<NEW_LINE>// Sort by maxDoc, descending:<NEW_LINE>Collections.sort(sortedLeaves, Collections.re... | ).maxDoc()))); |
986,408 | public MVMap.Decision decide(Record existingValue, Record providedValue) {<NEW_LINE>assert decision == null;<NEW_LINE>if (existingValue == null) {<NEW_LINE>// normally existingValue will always be there except of db initialization<NEW_LINE>// where some undo log entry was captured on disk but actual map entry was not<N... | valueToRestore, MVMap.DecisionMaker.DEFAULT); |
340,729 | final ListInventoryEntriesResult executeListInventoryEntries(ListInventoryEntriesRequest listInventoryEntriesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listInventoryEntriesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
194,532 | void logResponseHeader(long seqId, String serviceName, String methodName, Metadata metadata, int maxHeaderBytes, GrpcLogRecord.EventLogger eventLogger, String rpcId, @Nullable SocketAddress peerAddress) {<NEW_LINE>checkNotNull(serviceName, "serviceName");<NEW_LINE>checkNotNull(methodName, "methodName");<NEW_LINE>checkN... | GrpcLogRecord.EventLogger.LOGGER_CLIENT, "peerAddress can only be specified for client"); |
695,750 | private void initDataTypeConstMap() {<NEW_LINE>for (int i = 0; i < DataTypeSensorToCK.values().length - 1; i++) {<NEW_LINE>DataTypeSensorToCK dt = DataTypeSensorToCK.values()[i];<NEW_LINE>if (i > this.getEntry().getDataTypeConst().size() - 1) {<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), null);<NEW_LINE>continue;<NEW_... | , Long.valueOf(s)); |
1,634,941 | public CompletableFuture<Void> retention(Stream stream) {<NEW_LINE>// Track the new request for this automatic truncation.<NEW_LINE>long requestId = requestIdGenerator.get();<NEW_LINE>String requestDescriptor = RequestTracker.buildRequestDescriptor("truncateStream", stream.getScope(), stream.getStreamName());<NEW_LINE>... | -> requestTracker.untrackRequest(requestDescriptor)); |
435,411 | public org.python.Object __add__(org.python.Object other) {<NEW_LINE>if (other instanceof org.python.types.Int) {<NEW_LINE>long other_val = ((org.python.types.Int) other).value;<NEW_LINE>return new org.python.types.Float(this.value <MASK><NEW_LINE>} else if (other instanceof org.python.types.Bool) {<NEW_LINE>if (((org.... | + ((double) other_val)); |
10,618 | private String resolveHighestArtifactVersion(String stubsGroup, String stubsModule, String classifier, String version) {<NEW_LINE>Artifact artifact = new DefaultArtifact(stubsGroup, stubsModule, classifier, ARTIFACT_EXTENSION, version);<NEW_LINE>VersionRangeRequest versionRangeRequest = new VersionRangeRequest(artifact... | .getHighestVersion().toString(); |
1,343,573 | public void postInit(KeycloakSessionFactory factory) {<NEW_LINE>List<String> clientAuthProviders = factory.getProviderFactoriesStream(ClientAuthenticator.class).map(ProviderFactory::getId).<MASK><NEW_LINE>ProviderConfigProperty allowedClientAuthenticatorsProperty = new ProviderConfigProperty(ALLOWED_CLIENT_AUTHENTICATO... | collect(Collectors.toList()); |
574,437 | public void marshall(Contact contact, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (contact == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(contact.getArn(), ARN_BINDING);<NEW_LINE>protocolMarshaller.mar... | contact.getDescription(), DESCRIPTION_BINDING); |
1,521,882 | // Example usage of how to compute the diameter of a graph<NEW_LINE>public static void main(String[] args) {<NEW_LINE>Map<Integer, List<Edge>> graph = createGraph(5);<NEW_LINE>addUndirectedEdge(graph, 4, 2);<NEW_LINE>addUndirectedEdge(graph, 2, 0);<NEW_LINE>addUndirectedEdge(graph, 0, 1);<NEW_LINE>addUndirectedEdge(gra... | addUndirectedEdge(graph, 6, 5); |
1,506,607 | public Aggregation toDruidAggregation(final PlannerContext plannerContext, final RowSignature rowSignature, final VirtualColumnRegistry virtualColumnRegistry, final RexBuilder rexBuilder, final String name, final AggregateCall aggregateCall, final Project project, final List<Aggregation> existingAggregations, final boo... | collect(Collectors.toList()); |
1,059,137 | public void update(Set<UUID> activeClientIds) {<NEW_LINE>long currentTimeNano = System.nanoTime();<NEW_LINE>List<QueryClientState> victims = new ArrayList<>();<NEW_LINE>for (QueryClientState clientCursor : clientCursors.values()) {<NEW_LINE>// Close cursors that were opened by disconnected clients.<NEW_LINE>if (!active... | clientMemberConnection(victim.getClientId()); |
1,806,475 | private void initSkullItem(ItemStack skullStack) {<NEW_LINE>if (skullStack.hasTagCompound()) {<NEW_LINE><MASK><NEW_LINE>GameProfile gameProfile = null;<NEW_LINE>if (nbttagcompound.hasKey("SkullOwner", NBT.TAG_COMPOUND)) {<NEW_LINE>gameProfile = NBTUtil.readGameProfileFromNBT(nbttagcompound.getCompoundTag("SkullOwner"))... | NBTTagCompound nbttagcompound = skullStack.getTagCompound(); |
118,199 | public String invoice(final ICalloutField calloutField) {<NEW_LINE>final I_C_PaymentAllocate paymentAlloc = calloutField.getModel(I_C_PaymentAllocate.class);<NEW_LINE>final int C_Invoice_ID = paymentAlloc.getC_Invoice_ID();<NEW_LINE>if (// assuming it is resetting value<NEW_LINE>isCalloutActive() || C_Invoice_ID <= 0) ... | C_InvoicePaySchedule_ID = calloutField.getTabInfoContextAsInt("C_InvoicePaySchedule_ID"); |
472,055 | private BufferedImage generateAtlas(int mipMapLevel, List<BlockTile> tileImages, Color clearColor) {<NEW_LINE>int size = atlasSize / (1 << mipMapLevel);<NEW_LINE>int textureSize = tileSize / (1 << mipMapLevel);<NEW_LINE>int tilesPerDim = atlasSize / tileSize;<NEW_LINE>BufferedImage result = new BufferedImage(size, size... | tile = tileImages.get(tileIndex); |
1,184,135 | public <T> CancellablePromise<T> submit(@Nonnull Callable<? extends T> task) {<NEW_LINE>final AsyncPromise<T> promise = new AsyncPromise<>();<NEW_LINE>if (myExpiration != null) {<NEW_LINE>final Expiration.Handle expirationHandle = myExpiration.invokeOnExpiration(promise::cancel);<NEW_LINE>promise.onProcessed(<MASK><NEW... | value -> expirationHandle.unregisterHandler()); |
1,556,352 | public void draw(Graphics2D graphics) {<NEW_LINE>if (spectrum != null) {<NEW_LINE>graphics.setColor(color);<NEW_LINE>int prevFreqInCents = 0;<NEW_LINE>int prevMagnitude = 0;<NEW_LINE>for (int i = 1; i < spectrum.length; i++) {<NEW_LINE>float hertzValue = (i * sampleRate) / (float) fftSize;<NEW_LINE>int frequencyInCents... | prevFreqInCents, prevMagnitude, frequencyInCents, magintude); |
1,613,816 | static void registerBlockColorHandlers(ColorHandlerEvent.Block event) {<NEW_LINE>BlockColors blockColors = event.getBlockColors();<NEW_LINE>// slime plants - blocks<NEW_LINE>for (SlimeType type : SlimeType.values()) {<NEW_LINE>blockColors.register((state, reader, pos, index) -> getSlimeColorByPos(pos, type, null), Tink... | .slimeLeaves.get(type)); |
760,383 | // Runs in EDT<NEW_LINE>public void runPostStartupActivities(UIAccess uiAccess) {<NEW_LINE>if (postStartupActivityPassed()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Application app = myApplication;<NEW_LINE>if (!app.isHeadlessEnvironment()) {<NEW_LINE>checkFsSanity();<NEW_LINE>checkProjectRoots();<NEW_LINE>}<NEW_LI... | uiAccess, myDumbAwarePostStartupActivities, Phases.PROJECT_DUMB_POST_STARTUP); |
1,599,073 | public static RandomDotDefinition loadRandomDotYaml(Reader reader) {<NEW_LINE>Yaml yaml = createYmlObject();<NEW_LINE>Map<String, Object> data = yaml.load(reader);<NEW_LINE>var def = new RandomDotDefinition();<NEW_LINE>if (data.containsKey("random_seed"))<NEW_LINE>// YAML only library only supports ints?<NEW_LINE>def.r... | , coordinates.get(1)); |
1,273,385 | private double[] calculateTruePositiveFalsePositive(double thresh) {<NEW_LINE>int tp = 0;<NEW_LINE>int fp = 0;<NEW_LINE>int tn = 0;<NEW_LINE>int fn = 0;<NEW_LINE>for (BasicData item : this.training) {<NEW_LINE>double x = this.network.computeRegression(item.getInput())[0];<NEW_LINE>double y = <MASK><NEW_LINE>if (x > thr... | item.getIdeal()[0]; |
947,305 | private Object xfer(Object e, int mode, long nanos) {<NEW_LINE>boolean isData = e != null;<NEW_LINE>QNode s = null;<NEW_LINE>final PaddedAtomicReference<QNode> head = this.head;<NEW_LINE>final PaddedAtomicReference<QNode> tail = this.tail;<NEW_LINE>for (; ; ) {<NEW_LINE>QNode t = tail.get();<NEW_LINE><MASK><NEW_LINE>if... | QNode h = head.get(); |
1,175,406 | private STNode parseMemberRhsInStmtStartWithBrace(STNode identifier, STNode colon, STNode secondIdentifier, STNode secondNameRef) {<NEW_LINE>STNode typedBPOrExpr = parseTypedBindingPatternOrMemberAccess(secondNameRef, false, true, ParserRuleContext.AMBIGUOUS_STMT);<NEW_LINE>if (isExpression(typedBPOrExpr.kind)) {<NEW_L... | publicQualifier, varDeclQualifiers, newTypeBP, false); |
1,736,716 | public List<FundingRecord> history(Currency currency, int limit) {<NEW_LINE>List<Map> history = bitbayAuthenticated.history(apiKey, sign, exchange.getNonceFactory(), <MASK><NEW_LINE>SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");<NEW_LINE>dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));<N... | currency.getCurrencyCode(), limit); |
103,156 | public static DescribeClusterDetailResponse unmarshall(DescribeClusterDetailResponse describeClusterDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeClusterDetailResponse.setResource_group_id(_ctx.stringValue("DescribeClusterDetailResponse.resource_group_id"));<NEW_LINE>describeClusterDetailResponse.setVpc_... | (_ctx.stringValue("DescribeClusterDetailResponse.instance_type")); |
1,563,209 | @ExceptionMetered<NEW_LINE>@POST<NEW_LINE>@Consumes(APPLICATION_JSON)<NEW_LINE>public Response partialUpdateSecret(@Auth User user, @PathParam("name") String secretName, @Valid PartialUpdateSecretRequestV2 request) {<NEW_LINE>logger.info("User '{}' partialUpdate secret '{}'.", user, secretName);<NEW_LINE>long id = secr... | metadata().toString()); |
1,344,312 | private void onIntentProcessed() {<NEW_LINE>List<ShareInfo> infos = filePreparedInfos;<NEW_LINE>if (getIntent() != null && getIntent().getAction() != ACTION_PROCESSED) {<NEW_LINE>getIntent().setAction(ACTION_PROCESSED);<NEW_LINE>}<NEW_LINE>if (statusDialog != null) {<NEW_LINE>try {<NEW_LINE>statusDialog.dismiss();<NEW_... | ), infos.size()); |
623,951 | private static boolean dontUseHostName(String nonProxyHosts, String host) {<NEW_LINE>if (host == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean dontUseProxy = false;<NEW_LINE>StringTokenizer st = new StringTokenizer(nonProxyHosts, "|", false);<NEW_LINE>while (st.hasMoreTokens() && !dontUseProxy) {<NEW_LINE>... | .nextToken().trim(); |
378,953 | private Q addConstraint(String type, JanusGraphPredicate rel, Object value) {<NEW_LINE>Preconditions.checkArgument(StringUtils.isNotBlank(type));<NEW_LINE>Preconditions.checkNotNull(rel);<NEW_LINE>// Treat special cases<NEW_LINE>if (type.equals(ImplicitKey.ADJACENT_ID.name())) {<NEW_LINE>Preconditions.checkArgument(rel... | vertexId > 0, "Expected valid vertex id: %s", value); |
593,779 | private void createGetElementPointerExpression(RecordBuffer buffer) {<NEW_LINE>int opCode = buffer.getId();<NEW_LINE>if (opCode == CONSTANT_CE_GEP_WITH_INRANGE_INDEX || buffer.size() % 2 != 0) {<NEW_LINE>// type of pointee<NEW_LINE>buffer.skip();<NEW_LINE>}<NEW_LINE>boolean isInbounds;<NEW_LINE>if (opCode == CONSTANT_C... | j] = buffer.readInt(); |
396,699 | private void fillParameters(final Container[] containers) {<NEW_LINE>SwingUtilities.invokeLater(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>boolean autoscalePref = NbPreferences.forModule(ReportPanel.class).getBoolean(PREF_AUTOSCALE, containers[0].getUnloader().isAutoScale());<NE... | getUnloader().allowAutoNode()); |
1,214,991 | protected Control createDialogArea(Composite parent) {<NEW_LINE>Composite composite = (Composite) super.createDialogArea(parent);<NEW_LINE>Label label = new Label(composite, SWT.WRAP);<NEW_LINE>label.setText(Messages.AddRemoteDialog_AddRemoteDialog_Message);<NEW_LINE>GridData data = new GridData(GridData.GRAB_HORIZONTA... | .GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL)); |
1,817,479 | public static AlterTableBuilder createGsiAddColumnsBuilder(String schemaName, String logicalTableName, String sql, List<String> columns, ExecutionContext executionContext) {<NEW_LINE>SqlIdentifier logicalTableNameNode = new <MASK><NEW_LINE>Map<SqlAlterTable.ColumnOpt, List<String>> columnOpts = new HashMap<>();<NEW_LIN... | SqlIdentifier(logicalTableName, SqlParserPos.ZERO); |
322,941 | public void marshall(Address address, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (address == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(address.getAddressId(), ADDRESSID_BINDING);<NEW_LINE>protocolMa... | address.getPhoneNumber(), PHONENUMBER_BINDING); |
61,907 | private void loadApplication() {<NEW_LINE>ApplicationRegistry appRegistry = habitat.getService(ApplicationRegistry.class);<NEW_LINE>ApplicationInfo <MASK><NEW_LINE>if (appInfo != null && appInfo.isLoaded()) {<NEW_LINE>LOGGER.log(Level.FINE, "Rest Monitoring Application already loaded.");<NEW_LINE>return;<NEW_LINE>}<NEW... | appInfo = appRegistry.get(applicationName); |
222,611 | public MdiEntry createMDiEntry(MultipleDocumentInterface mdi, String id, Object datasource, Map params) {<NEW_LINE>ChatInstance chat = null;<NEW_LINE>if (datasource instanceof ChatInstance) {<NEW_LINE>chat = (ChatInstance) datasource;<NEW_LINE>try {<NEW_LINE>chat = chat.getClone();<NEW_LINE>} catch (Throwable e) {<NEW_... | BuddyPluginBeta beta = BuddyPluginUtils.getBetaPlugin(); |
8,826 | private Mono<Response<DedicatedHostGroupInner>> updateWithResponseAsync(String resourceGroupName, String hostGroupName, DedicatedHostGroupUpdate parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() i... | ), parameters, accept, context); |
1,798,198 | public static void main(String[] args) throws IOException {<NEW_LINE>Path browserProtocol = Paths.get(args[0]);<NEW_LINE>Path jsProtocol = Paths.get(args[1]);<NEW_LINE>String version = args[2];<NEW_LINE>Path target = Files.createTempDirectory("devtools");<NEW_LINE>String devtoolsDir = "org/openqa/selenium/devtools/" + ... | ).replace('\\', '/'); |
461,000 | public void executeMojo() throws MojoExecutionException {<NEW_LINE>List<Migration> pendingMigrations;<NEW_LINE>try {<NEW_LINE>String path = toAbsolutePath(getMigrationsPath());<NEW_LINE>getLog().info("Checking " + getUrl() + " using migrations from " + path);<NEW_LINE>openConnection();<NEW_LINE>MigrationManager manager... | getLog().warn("Pending migration(s): "); |
656,761 | private static ByteSizeValue parse(final String initialInput, final String normalized, final String suffix, ByteSizeUnit unit, final String settingName) {<NEW_LINE>final String s = normalized.substring(0, normalized.length() - suffix.length()).trim();<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>return new ByteSizeValue(Long... | unit.toBytes(1))); |
1,287,234 | protected void lowerLoadFieldNode(LoadFieldNode loadField, LoweringTool tool) {<NEW_LINE>assert loadField.getStackKind() != JavaKind.Illegal;<NEW_LINE>StructuredGraph graph = loadField.graph();<NEW_LINE>ResolvedJavaField field = loadField.field();<NEW_LINE>ValueNode object = loadField.isStatic() ? staticFieldBase(graph... | , getStorageKind(field), memoryRead); |
1,282,645 | public boolean initOnce() {<NEW_LINE>for (Method m : Initiator._QbossADImmersionBannerManager().getDeclaredMethods()) {<NEW_LINE>Class<?>[] argt = m.getParameterTypes();<NEW_LINE>if (m.getReturnType() == View.class && argt.length == 0 && !Modifier.isStatic(m.getModifiers())) {<NEW_LINE>HookUtils.hookBeforeIfEnabled(thi... | param.thisObject, param.args); |
1,138,061 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null || param.isLeaf() || param.getSubSize() < 5) {<NEW_LINE><MASK><NEW_LINE>throw new RQException("Fyield:" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>int size = param.getSubSize();<NEW_LINE>Object[] result = new Object[size];<NEW_LINE>fo... | MessageManager mm = EngineMessage.get(); |
1,561,280 | public void onCreateDBEntryNikki(String arg0) {<NEW_LINE>svLogger.info("onCreateDBEntryNikki: " + arg0);<NEW_LINE>try {<NEW_LINE>InitialContext ic = new InitialContext();<NEW_LINE>String jndiName = "java:comp/env/XMLInjectionInterceptor3/jms/WSTestQCF";<NEW_LINE>Object obj = ic.lookup(jndiName);<NEW_LINE>assertNotNull(... | svLogger.info("onCreateDBEntryNikki results: " + svResults); |
1,371,181 | public boolean isEveryoneGranted(String resourceName, Collection<String> requiredRoles) {<NEW_LINE>validateInput(resourceName, requiredRoles);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {<NEW_LINE>Tr.event(tc, "Determining if Everyone is authorized to access resource " + resourceName + ".... | tc, "Everyone is granted access to resource " + resourceName + " as there are no required roles."); |
1,315,630 | private void executeHealth(final ClusterHealthRequest request, final ClusterState currentState, final ActionListener<ClusterHealthResponse> listener, final int waitCount, final Consumer<ClusterState> onNewClusterStateAfterDelay) {<NEW_LINE>if (request.timeout().millis() == 0) {<NEW_LINE>listener.onResponse(getResponse(... | validateRequest(request, newState, waitCount); |
1,068,284 | public void write(String bareAddress, StructuredName name) {<NEW_LINE>synchronized (writeLock) {<NEW_LINE>if (writeStatement == null) {<NEW_LINE>SQLiteDatabase db = databaseManager.getWritableDatabase();<NEW_LINE>writeStatement = db.compileStatement("INSERT OR REPLACE INTO " + NAME + " (" + Fields.USER + ", " + Fields.... | 3, name.getFormattedName()); |
1,588,289 | private JComponent createDragger() {<NEW_LINE>// NOI18N<NEW_LINE>String className = UIManager.getString("Nb.MainWindow.Toolbar.Dragger");<NEW_LINE>if (null != className) {<NEW_LINE>try {<NEW_LINE>Class klzz = Lookup.getDefault().lookup(ClassLoader<MASK><NEW_LINE>Object inst = klzz.newInstance();<NEW_LINE>if (inst insta... | .class).loadClass(className); |
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.CLIENT_ENDPOINT, endpoint); |
1,542,341 | private void initializeTask(AbstractRepositoryConnector repositoryConnector, TaskData taskData, AbstractTask task, TaskRepository taskRepository) throws CoreException {<NEW_LINE>ITaskMapping mapping = repositoryConnector.getTaskMapping(taskData);<NEW_LINE><MASK><NEW_LINE>if (taskKind != null && taskKind.length() > 0) {... | String taskKind = mapping.getTaskKind(); |
24,828 | private void loadNode408() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.CertificateGroupFolderType_DefaultHttpsGroup_TrustList_OpenWithMasks_InputArguments, new QualifiedName(0, "InputArguments"), new LocalizedText("en", "InputArguments"), LocalizedT... | (1), 0.0, false); |
1,069,602 | static void sendDecodingFailures(ChannelHandlerContext ctx, ConnectionObserver listener, boolean secure, Throwable t, Object msg) {<NEW_LINE>Connection conn = Connection.from(ctx.channel());<NEW_LINE>Throwable cause = t.getCause() != null ? t.getCause() : t;<NEW_LINE>if (log.isWarnEnabled()) {<NEW_LINE>log.warn(format(... | HttpResponseStatus.REQUEST_ENTITY_TOO_LARGE : HttpResponseStatus.BAD_REQUEST); |
1,350,818 | final PutActionRevisionResult executePutActionRevision(PutActionRevisionRequest putActionRevisionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putActionRevisionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | invoke(request, responseHandler, executionContext); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.