idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,658,083 | protected void installApkFiles(ApkSource aApkSource) {<NEW_LINE>cleanOldSessions();<NEW_LINE>PackageInstaller.Session session = null;<NEW_LINE>try (ApkSource apkSource = aApkSource) {<NEW_LINE>PackageInstaller.SessionParams sessionParams = new PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INST... | session = mPackageInstaller.openSession(sessionID); |
1,187,513 | final DeleteVcenterClientResult executeDeleteVcenterClient(DeleteVcenterClientRequest deleteVcenterClientRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteVcenterClientRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
748,131 | // todo use template<NEW_LINE>@Override<NEW_LINE>public void implement() throws Exception {<NEW_LINE>final StringBuilder insertText = new StringBuilder();<NEW_LINE>// NOI18N<NEW_LINE>insertText.append(' ');<NEW_LINE>Iterator<Attribute> i = attrs.iterator();<NEW_LINE>while (i.hasNext()) {<NEW_LINE>Attribute a = i.next()... | insertText.toString(), null); |
784,984 | public // !! This function must be always called from try-with-resources block, otherwise vault secret may be leaked !!<NEW_LINE>LDAPQuery createGroupQuery(boolean includeMemberAttribute) {<NEW_LINE>LDAPQuery ldapQuery = new LDAPQuery(ldapProvider);<NEW_LINE>// For now, use same search scope, which is configured "globa... | addReturningLdapAttribute(config.getGroupNameLdapAttribute()); |
1,320,621 | public Request<ListVocabularyFiltersRequest> marshall(ListVocabularyFiltersRequest listVocabularyFiltersRequest) {<NEW_LINE>if (listVocabularyFiltersRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListVocabularyFiltersRequest)");<NEW_LINE>}<NEW_LINE>Request<ListVocabular... | .toString(content.length)); |
1,698,368 | public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {<NEW_LINE>// Wrap the caching connection factories instead of its target, because it catches<NEW_LINE>// callbacks<NEW_LINE>// such as ExceptionListener. If we don't wrap, cached callbacks like this won't<NEW_LINE>// be tr... | .beanFactory, (ConnectionFactory) bean); |
1,153,663 | public byte[] download(String reportID, String processState) throws XDocReportException {<NEW_LINE>XDocArchive archive = null;<NEW_LINE>ByteArrayOutputStream out = new ByteArrayOutputStream();<NEW_LINE>IXDocReport report = getXDocReportRegistry().getReport(reportID);<NEW_LINE>if (report == null)<NEW_LINE>throw new XDoc... | .getPreprocessedDocumentArchive().createCopy(); |
1,358,212 | private void dumpCategoriesArgsStatistics(PrintStream out) {<NEW_LINE>HashMap<String, Counters> data = new HashMap<>();<NEW_LINE>for (Stat stat : stats.values()) {<NEW_LINE>// NOI18N<NEW_LINE>String id = stat.category + "%" + Arrays.toString(stat.args);<NEW_LINE>Counters counters = data.get(id);<NEW_LINE>if (counters =... | idx = cat.indexOf('%'); |
670,604 | private void refreshIdentity(NodeAgentContext context, ContainerPath privateKeyFile, ContainerPath certificateFile, ContainerPath identityDocumentFile) {<NEW_LINE>SignedIdentityDocument identityDocument = EntityBindingsMapper.readSignedIdentityDocumentFromFile(identityDocumentFile);<NEW_LINE>KeyPair keyPair = KeyUtils.... | context, privateKeyFile, certificateFile, identityDocumentFile); |
1,853,901 | public boolean isStatisticsEnabled(ServletEvent evt) {<NEW_LINE>Object evtSrc = evt.getSource();<NEW_LINE>if (evtSrc instanceof IServletWrapper) {<NEW_LINE>IServletConfig sConfig = (IServletConfig) ((IServletWrapper) evtSrc).getServletConfig();<NEW_LINE>if (sConfig == null || sConfig.isStatisticsEnabled()) {<NEW_LINE>i... | evt.getServletName() + "]"); |
1,099,048 | public Product save(Product p) {<NEW_LINE>Long id = p.getId();<NEW_LINE>if (id == null) {<NEW_LINE>id = populate(queryFactory.insert(product), p).executeWithKey(product.id);<NEW_LINE>p.setId(id);<NEW_LINE>} else {<NEW_LINE>populate(queryFactory.update(product), p).where(product.id.eq<MASK><NEW_LINE>// delete l10n rows<... | (id)).execute(); |
694,445 | public YearMonth plus(long amountToAdd, TemporalUnit unit) {<NEW_LINE>if (unit instanceof ChronoUnit) {<NEW_LINE>switch((ChronoUnit) unit) {<NEW_LINE>case MONTHS:<NEW_LINE>return plusMonths(amountToAdd);<NEW_LINE>case YEARS:<NEW_LINE>return plusYears(amountToAdd);<NEW_LINE>case DECADES:<NEW_LINE>return plusYears(Jdk8Me... | .safeMultiply(amountToAdd, 10)); |
1,783,478 | private boolean isNetworkAddressInCidr(String networkUuid1, String networkUuid2) {<NEW_LINE>L3NetworkVO l3vo1 = Q.New(L3NetworkVO.class).eq(L3NetworkVO_.uuid, networkUuid1).find();<NEW_LINE>L3NetworkVO l3vo2 = Q.New(L3NetworkVO.class).eq(L3NetworkVO_.uuid, networkUuid2).find();<NEW_LINE>List<IpRangeInventory> ipInvs1 =... | ) || isIpv6RangeInSameCidr(ip6Invs1, ip6Invs2); |
740,804 | private JCTree.JCExpression makeUnaryIncDecCall(JCTree.JCUnary tree, TreeMaker make, Symbol.MethodSymbol operatorMethod, JCExpression operand) {<NEW_LINE>if (operatorMethod == null) {<NEW_LINE>Type unboxedType = _tp.getTypes().unboxedType(operand.type);<NEW_LINE>if (unboxedType != null && !unboxedType.hasTag(NONE)) {<N... | env.enclClass = getEnclosingClass(tree); |
934,764 | protected void createJobEntities(BatchEntity batch, T configuration, String deploymentId, List<String> processIds, int invocationsPerBatchJob) {<NEW_LINE>if (processIds == null || processIds.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CommandContext commandContext = Context.getCommandContext();<NEW_LINE>ByteArray... | setBatchId(batch.getId()); |
1,021,751 | public void createIfNotExistsCodeSnippets() {<NEW_LINE>// BEGIN: com.azure.storage.file.share.ShareDirectoryClient.createIfNotExists<NEW_LINE>ShareDirectoryClient shareDirectoryClient = createClientWithSASToken();<NEW_LINE>ShareDirectoryInfo shareDirectoryInfo = shareDirectoryClient.createIfNotExists();<NEW_LINE>System... | "Last Modified Time:%s", shareDirectoryInfo.getLastModified()); |
834,816 | private RelativePoint relativePointByQuickSearch(@Nonnull DataContext dataContext) {<NEW_LINE>Rectangle dominantArea = dataContext.getData(PlatformDataKeys.DOMINANT_HINT_AREA_RECTANGLE);<NEW_LINE>if (dominantArea != null) {<NEW_LINE>final Component focusedComponent = getWndManager().getFocusedComponent(myProject);<NEW_... | Rectangle(screenPoint, getSizeForPositioning()); |
42,352 | public DevConsoleTemplateInfoBuildItem collectBeanInfo(ValidationPhaseBuildItem validationPhaseBuildItem, CompletedApplicationClassPredicateBuildItem predicate) {<NEW_LINE>BeanDeploymentValidator.ValidationContext validationContext = validationPhaseBuildItem.getContext();<NEW_LINE>DevBeanInfos beanInfos = new DevBeanIn... | .from(decorator, predicate)); |
1,068,047 | public void onMessage(final ConsumerRecord<K, V> record, @Nullable final Acknowledgment acknowledgment, final Consumer<?, ?> consumer) {<NEW_LINE>RetryState retryState = null;<NEW_LINE>if (this.stateful) {<NEW_LINE>retryState = new DefaultRetryState(record.topic() + "-" + record.partition() + "-" + record.offset());<NE... | context.setAttribute(CONTEXT_CONSUMER, consumer); |
1,264,817 | private ServerInterceptor generateAuthorizationInterceptor(AuthConfig config) {<NEW_LINE>checkNotNull(config, "config");<NEW_LINE>final GrpcAuthorizationEngine authEngine = new GrpcAuthorizationEngine(config);<NEW_LINE>return new ServerInterceptor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public <ReqT, RespT> ServerCal... | next.startCall(call, headers); |
1,553,514 | public void takeSnapshot(SnapshotInfo snapshotInfo, AsyncCompletionCallback<CreateCmdResult> callback) {<NEW_LINE>LOGGER.debug("Taking PowerFlex volume snapshot");<NEW_LINE>Preconditions.checkArgument(snapshotInfo != null, "snapshotInfo cannot be null");<NEW_LINE>VolumeInfo volumeInfo = snapshotInfo.getBaseVolume();<NE... | CreateObjectAnswer createObjectAnswer = new CreateObjectAnswer(snapshotObjectTo); |
744,828 | protected void addAllTask(List<AbstractPartitionJob> tasks) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>List<Long> existingInodes = (List<Long>) this.get("existingInodes");<NEW_LINE>ReliableTaildirEventReader reader = (ReliableTaildirEventReader) this.get("reader");<NEW_LINE>CopyOfProcessOfLogagent cpy = (CopyOf... | "### TailFilesMutiJobs tf path:###" + tf.getPath()); |
95,805 | private AccessControl buildAccessControl(DeployState deployState, AbstractConfigProducer ancestor, Element accessControlElem) {<NEW_LINE>AthenzDomain domain = getAccessControlDomain(deployState, accessControlElem);<NEW_LINE>AccessControl.Builder builder = new AccessControl.Builder(domain.value());<NEW_LINE>getContainer... | ).forEach(builder::excludeBinding); |
1,443,993 | public void onStyleLoaded(@NonNull Style style) {<NEW_LINE>TurfCirclePoiWithinFilterActivity.this.mapboxMap = mapboxMap;<NEW_LINE>hideLayers();<NEW_LINE>initPolygonCircleFillLayer();<NEW_LINE>// Set up the seekbar so that the circle's radius can be adjusted<NEW_LINE>final SeekBar circleRadiusSeekbar = findViewById(R.id... | findViewById(R.id.circle_radius_textview); |
339,986 | public void draw(Canvas canvas) {<NEW_LINE>Rect bounds = getBounds();<NEW_LINE>// Draw bounding box<NEW_LINE>mPaint.setStyle(Paint.Style.STROKE);<NEW_LINE>mPaint.setStrokeWidth(OUTLINE_STROKE_WIDTH_PX);<NEW_LINE>mPaint.setColor(OUTLINE_COLOR);<NEW_LINE>canvas.drawRect(bounds.left, bounds.top, bounds.right, bounds.botto... | setStyle(Paint.Style.FILL); |
513,862 | public I_M_Transaction retrieveReversalTransaction(final Object referencedModelReversal, final I_M_Transaction originalTrx) {<NEW_LINE>Check.assumeNotNull(referencedModelReversal, "referencedModelReversal not null");<NEW_LINE>Check.assumeNotNull(originalTrx, "originalTrx not null");<NEW_LINE>final IQueryFilter<I_M_Tran... | ).firstOnly(I_M_Transaction.class); |
1,149,334 | public void updateFirmware(final ThingUID thingUID, final String firmwareVersion, @Nullable final Locale locale) {<NEW_LINE>ParameterChecks.checkNotNull(thingUID, "Thing UID");<NEW_LINE>ParameterChecks.checkNotNullOrEmpty(firmwareVersion, "Firmware version");<NEW_LINE>final FirmwareUpdateHandler firmwareUpdateHandler =... | progressCallbackMap.put(thingUID, progressCallback); |
1,361,670 | public void marshall(UpdateNotebookInstanceRequest updateNotebookInstanceRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (updateNotebookInstanceRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marsha... | updateNotebookInstanceRequest.getDefaultCodeRepository(), DEFAULTCODEREPOSITORY_BINDING); |
1,322,571 | public static GetInstanceErrorRankResponse unmarshall(GetInstanceErrorRankResponse getInstanceErrorRankResponse, UnmarshallerContext _ctx) {<NEW_LINE>getInstanceErrorRankResponse.setRequestId(_ctx.stringValue("GetInstanceErrorRankResponse.RequestId"));<NEW_LINE>InstanceErrorRank instanceErrorRank = new InstanceErrorRan... | ("GetInstanceErrorRankResponse.InstanceErrorRank.ErrorRank[" + i + "].NodeName")); |
463,963 | private void pringGC(final RoutingContext ctx, boolean before) {<NEW_LINE>if (RoutingContext.SHOW_GC_SIZE && before) {<NEW_LINE>long h1 = RoutingContext.runGCUsedMemory();<NEW_LINE>float mb = (1 << 20);<NEW_LINE>log.warn("Used before routing " + h1 / mb + " actual");<NEW_LINE>} else if (RoutingContext.SHOW_GC_SIZE && !... | long h1 = RoutingContext.runGCUsedMemory(); |
31,562 | private void updateQuota(long quota) {<NEW_LINE>long storedQuota = getDBLong("quotaPoints", 0L);<NEW_LINE>String storedDate = getDBString("quotaDate", "01-01-2000");<NEW_LINE>SimpleDateFormat datefmt = new SimpleDateFormat("dd-MM-yyyy");<NEW_LINE>datefmt.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles"));<NEW_LIN... | .format(new Date()); |
1,476,629 | public static ListTagResourcesResponse unmarshall(ListTagResourcesResponse listTagResourcesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listTagResourcesResponse.setRequestId(_ctx.stringValue("ListTagResourcesResponse.RequestId"));<NEW_LINE>listTagResourcesResponse.setSuccess(_ctx.booleanValue("ListTagResourcesRespons... | ("ListTagResourcesResponse.TagResources[" + i + "].ResourceId")); |
136,376 | default void logContext(Logger log, RelationshipOp operation, Environment environment) {<NEW_LINE>List<?> children = (environment.field.getSelectionSet() != null) ? (List) environment.field.getSelectionSet().getChildren() : new ArrayList<>();<NEW_LINE>List<String> fieldName = new ArrayList<>();<NEW_LINE>if (CollectionU... | ) i).getName()); |
1,122,022 | public static SparkSession createSparkSession(final StoreProperties storeProperties) {<NEW_LINE>SparkSession.Builder builder = SparkSession.builder().appName(storeProperties.get(SparkConstants.APP_NAME, SparkConstants.DEFAULT_APP_NAME));<NEW_LINE>if (Boolean.parseBoolean(storeProperties.get(SparkConstants.USE_SPARK_DEF... | .KRYO_REGISTRATOR, SparkConstants.DEFAULT_KRYO_REGISTRATOR)); |
1,379,167 | protected Query doToQuery(SearchExecutionContext context) throws IOException {<NEW_LINE>Expression compiledExpression = (Expression) Scripting.compile(expr);<NEW_LINE>AggrType aggrType = AggrType.valueOf(aggr.toUpperCase(Locale.getDefault()));<NEW_LINE>AggrType posAggrType = AggrType.valueOf(pos_aggr.toUpperCase(Locale... | termSet = new HashSet<>(); |
1,817,903 | public void build(boolean parallel, List<V> collection, DistanceMetric dm) {<NEW_LINE>// really just checking dm == euclidean<NEW_LINE>setDistanceMetric(dm);<NEW_LINE>this.vecs = new ArrayList<>(collection);<NEW_LINE>this.cache = euclid.getAccelerationCache(vecs, parallel);<NEW_LINE>int d = collection.get(0).length();<... | new NearestIterator[m][L]; |
1,450,374 | public void generateRandomPasswordForUsers(List<Long> userIds) {<NEW_LINE>AuthService authService = <MASK><NEW_LINE>LocalDateTime todayDateTime = Beans.get(AppBaseService.class).getTodayDateTime().toLocalDateTime();<NEW_LINE>for (Long userId : userIds) {<NEW_LINE>User user = userRepo.find(userId);<NEW_LINE>String passw... | Beans.get(AuthService.class); |
1,448,331 | private OHashTable.NodeSplitResult splitNode(final OHashTable.BucketPath bucketPath, final OAtomicOperation atomicOperation) throws IOException {<NEW_LINE>final long[] newNode = new long[MAX_LEVEL_SIZE];<NEW_LINE>final int hashMapSize = 1 << (bucketPath.nodeLocalDepth + 1);<NEW_LINE>boolean hashMapItemsAreEqual = true;... | final long position = node[i]; |
440,294 | final ListTrackerConsumersResult executeListTrackerConsumers(ListTrackerConsumersRequest listTrackerConsumersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTrackerConsumersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
936,688 | public void testSLLFutureGetNoTimeout() throws Exception {<NEW_LINE>long currentThreadId = 0;<NEW_LINE>ResultsStatelessLocal bean = lookupSLLBean();<NEW_LINE>assertNotNull("Async Stateless Bean created successfully", bean);<NEW_LINE>// call bean asynchronous method using Future<V> object to receive results<NEW_LINE>Fut... | ResultsStatelessLocalFutureBean.MAX_ASYNC_WAIT, TimeUnit.MILLISECONDS); |
1,336,748 | public CompletableFuture<R> invoke(Object proxy, Method invokedMethod, Object[] args) {<NEW_LINE>Object command = args[0];<NEW_LINE>if (metaDataExtractors.length != 0) {<NEW_LINE>Map<String, Object> metaDataValues = new HashMap<>();<NEW_LINE>for (MetaDataExtractor extractor : metaDataExtractors) {<NEW_LINE>extractor.ad... | command, new CompositeCallback(callbacks)); |
924,615 | private EntityDef addSecurityGroupEntity() {<NEW_LINE>final String guid = "042d9b5c-677e-477b-811f-1c39bf716759";<NEW_LINE>final String name = "SecurityGroup";<NEW_LINE>final String description = "A collection of users that should be given the same security privileges.";<NEW_LINE>final String descriptionGUID = null;<NE... | properties = new ArrayList<>(); |
908,057 | public void doReportStat(SofaTracerSpan sofaTracerSpan) {<NEW_LINE>Map<String, String> tagsWithStr = sofaTracerSpan.getTagsWithStr();<NEW_LINE>StatKey statKey = new StatKey();<NEW_LINE>String appName = tagsWithStr.get(CommonSpanTags.LOCAL_APP);<NEW_LINE>// service name<NEW_LINE>String serviceName = tagsWithStr.get(Comm... | () - sofaTracerSpan.getStartTime(); |
1,299,682 | public UISWTViewEventListener createEventListener(UISWTView view) {<NEW_LINE>boolean isCloneable = isListenerCloneable();<NEW_LINE>UISWTViewEventListener listener = getListener();<NEW_LINE>synchronized (mapViewToListener) {<NEW_LINE>if (!isCloneable) {<NEW_LINE>if (!mapViewToListener.isEmpty()) {<NEW_LINE>UISWTView exi... | UISWTViewEventListenerEx) listener).getClone(); |
1,187,765 | final StartExperimentResult executeStartExperiment(StartExperimentRequest startExperimentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startExperimentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<StartE... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,501,811 | private Mono<Response<AttestationProviderInner>> updateWithResponseAsync(String resourceGroupName, String providerName, AttestationServicePatchParams updateParams, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpo... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
1,613,692 | public void onMucEditButtonClicked(View v) {<NEW_LINE>if (this.binding.mucEditor.getVisibility() == View.GONE) {<NEW_LINE>final MucOptions mucOptions = mConversation.getMucOptions();<NEW_LINE>this.binding.<MASK><NEW_LINE>this.binding.mucDisplay.setVisibility(View.GONE);<NEW_LINE>this.binding.editMucNameButton.setImageR... | mucEditor.setVisibility(View.VISIBLE); |
1,459,501 | public Request<AssociateKmsKeyRequest> marshall(AssociateKmsKeyRequest associateKmsKeyRequest) {<NEW_LINE>if (associateKmsKeyRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(AssociateKmsKeyRequest)");<NEW_LINE>}<NEW_LINE>Request<AssociateKmsKeyRequest> request = new Defau... | t.getMessage(), t); |
111,291 | public final QualifiedNameContext qualifiedName() throws RecognitionException {<NEW_LINE>QualifiedNameContext _localctx = new QualifiedNameContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 102, RULE_qualifiedName);<NEW_LINE>try {<NEW_LINE>int _alt;<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setSta... | _errHandler.reportError(this, re); |
1,177,994 | public List<FileEditor> openEditor(@Nonnull final OpenFileDescriptor descriptor, final boolean focusEditor) {<NEW_LINE>assertDispatchThread();<NEW_LINE>if (descriptor.getFile() instanceof VirtualFileWindow) {<NEW_LINE>VirtualFileWindow delegate = (VirtualFileWindow) descriptor.getFile();<NEW_LINE>int hostOffset = deleg... | delegate.getDelegate(), hostOffset); |
590,034 | public void createPartControl(Composite parent) {<NEW_LINE>comp = new Composite(parent, SWT.NONE);<NEW_LINE>table = new Table(comp, SWT.BORDER | SWT.WRAP | SWT.FULL_SELECTION | <MASK><NEW_LINE>table.setHeaderVisible(true);<NEW_LINE>table.setLinesVisible(true);<NEW_LINE>comp.setLayout(tableColumnLayout);<NEW_LINE>table.... | SWT.V_SCROLL | SWT.H_SCROLL); |
1,817,077 | public boolean handleLicenses() {<NEW_LINE>if (acceptLicense) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>InstallKernelInteractive installKernel = InstallKernelFactory.getInteractiveInstance();<NEW_LINE>try {<NEW_LINE>installKernel.resolve(this.features, false);<NEW_LINE>featureLicenses = installKernel.<MASK><NEW_LINE>... | getFeatureLicense(Locale.getDefault()); |
731,375 | static Stream<String> splitNameservers(String ns) {<NEW_LINE>Matcher matcher = FORMAT_BRACKETS.matcher(ns);<NEW_LINE>if (!matcher.matches()) {<NEW_LINE>checkArgument(!ns.contains("[") && !ns.contains("]"), "Could not parse square brackets in %s", ns);<NEW_LINE>return ImmutableList.of(ns).stream();<NEW_LINE>}<NEW_LINE>I... | new ImmutableList.Builder<>(); |
1,683,822 | protected void masterOperation(Task task, final ResumeFollowAction.Request request, ClusterState state, final ActionListener<AcknowledgedResponse> listener) throws Exception {<NEW_LINE>if (ccrLicenseChecker.isCcrAllowed() == false) {<NEW_LINE>listener.onFailure(LicenseUtils.newComplianceException("ccr"));<NEW_LINE>retu... | ccrMetadata.get(Ccr.CCR_CUSTOM_METADATA_LEADER_INDEX_NAME_KEY); |
640,391 | protected Map<Object, Object> convertToParameters(Object... iArgs) {<NEW_LINE><MASK><NEW_LINE>if (iArgs.length == 1 && iArgs[0] instanceof Map) {<NEW_LINE>params = (Map<Object, Object>) iArgs[0];<NEW_LINE>} else {<NEW_LINE>if (iArgs.length == 1 && iArgs[0] != null && iArgs[0].getClass().isArray() && iArgs[0] instanceof... | final Map<Object, Object> params; |
212,146 | protected CompilationParticipantResult[] notifyParticipants(SourceFile[] unitsAboutToCompile) {<NEW_LINE>CompilationParticipantResult[] results = new CompilationParticipantResult[unitsAboutToCompile.length];<NEW_LINE>for (int i = unitsAboutToCompile.length; --i >= 0; ) results[i] = new CompilationParticipantResult(unit... | buildStarting(results, this instanceof BatchImageBuilder); |
454,939 | public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {<NEW_LINE>if (!Pet.class.isAssignableFrom(type.getRawType())) {<NEW_LINE>// this class only serializes 'Pet' and its subtypes<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);<NEW_... | toJsonTree(value).getAsJsonObject(); |
456,400 | public boolean init(String[] args) throws ParseException {<NEW_LINE>CommandLine cliParser = new GnuParser().parse(jstormClientContext.opts, args);<NEW_LINE>if (cliParser.hasOption(JOYConstants.HELP)) {<NEW_LINE>printUsage();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>jstormClientContext.appName = cliParser.getOptionVal... | JOYConstants.INSTANCE_NAME, JOYConstants.EMPTY); |
355,073 | private BraceContext findContextBackwards() throws BadLocationException {<NEW_LINE>((AbstractDocument) context.getDocument()).readLock();<NEW_LINE>try {<NEW_LINE>BaseDocument doc = <MASK><NEW_LINE>TokenSequence<? extends PHPTokenId> ts = LexUtilities.getPHPTokenSequence(doc, matchingOffset);<NEW_LINE>if (ts == null) {<... | (BaseDocument) context.getDocument(); |
1,830,535 | public void mouseClicked(MouseEvent e) {<NEW_LINE>if (callback == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>data.setComponent(this);<NEW_LINE>data.setCard(this.getGameCard());<NEW_LINE>data.setGameId(this.gameId);<NEW_LINE>// popup menu processing<NEW_LINE>if (e.isPopupTrigger() || SwingUtilities.isRightMouseButton(... | callback.popupMenuCard(e, data); |
904,903 | public static IRubyObject warn(ThreadContext context, IRubyObject recv, IRubyObject[] args) {<NEW_LINE>boolean kwargs = false;<NEW_LINE>int uplevel = 0;<NEW_LINE>int argMessagesLen = args.length;<NEW_LINE>if (argMessagesLen > 0) {<NEW_LINE>IRubyObject opts = TypeConverter.checkHashType(context.runtime, args[argMessages... | , (RubyHash) opts, "uplevel"); |
1,718,040 | public boolean matches(final IStorageRecord storageRecord) {<NEW_LINE>if (storageRecord == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Check if Product matches<NEW_LINE>final Set<ProductId> queryProductIds = getProductIds();<NEW_LINE>if (!queryProductIds.isEmpty()) {<NEW_LINE>final ProductId recor... | <BPartnerId> queryBPartnerIds = getBPartnerIds(); |
1,250,243 | public void paintOverlay(Graphics2D g, Token aToken, Rectangle bounds) {<NEW_LINE>double hc = (double) bounds.width / 2;<NEW_LINE>double vc = (double) bounds.height / 2;<NEW_LINE>Color tempColor = g.getColor();<NEW_LINE>g.setColor(getColor());<NEW_LINE>Stroke tempStroke = g.getStroke();<NEW_LINE>g.setStroke(getStroke()... | , vc, hc, 0)); |
61,950 | public Element saveToXml() {<NEW_LINE>Element root = new Element("FORMAT");<NEW_LINE>for (int i = 0; i < rows.size(); i++) {<NEW_LINE>Element rowElem = new Element("ROW");<NEW_LINE>Row row = rows.get(i);<NEW_LINE>FieldFactory[] rowFactorys = row.getFactorys();<NEW_LINE>for (FieldFactory ff : rowFactorys) {<NEW_LINE>Ele... | "" + ff.getWidth()); |
62,838 | private void loadNode1061() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.NamespacesType_NamespaceIdentifier_Placeholder_IsNamespaceSubset, new QualifiedName(0, "IsNamespaceSubset"), new LocalizedText("en", "IsNamespaceSubset"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger... | .expanded(), true)); |
330,020 | static public int showDownloadSysImageDialog(Frame editor, boolean wear) {<NEW_LINE>String title = wear ? AndroidMode.getTextString("android_sdk.dialog.download_watch_image_title") : AndroidMode.getTextString("android_sdk.dialog.download_phone_image_title");<NEW_LINE>String msg = wear ? AndroidMode.getTextString("andro... | getURL().toString()); |
1,578,042 | // Responds to an HTTP request using data from the request body parsed according to the<NEW_LINE>// "content-type" header.<NEW_LINE>@Override<NEW_LINE>public void service(HttpRequest request, HttpResponse response) throws IOException {<NEW_LINE>String name = null;<NEW_LINE>// Default values avoid null issues (with swit... | ()), StandardCharsets.UTF_8); |
139,128 | protected final void buildMetadata(NetworkTable metaTable) {<NEW_LINE>if (!m_metadataDirty) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Component type<NEW_LINE>if (getType() == null) {<NEW_LINE>metaTable.getEntry("PreferredComponent").delete();<NEW_LINE>} else {<NEW_LINE>metaTable.getEntry("PreferredComponent").forceSetS... | [] { m_width, m_height }); |
954,143 | public static int[] hsvToRgb(double hue, double saturation, double value) {<NEW_LINE>if (hue < 0 || hue > 360) {<NEW_LINE>throw new IllegalArgumentException("hue should be between 0 and 360");<NEW_LINE>}<NEW_LINE>if (saturation < 0 || saturation > 1) {<NEW_LINE>throw new IllegalArgumentException("saturation should be b... | (hueSection % 2 - 1)); |
176,144 | public static GameView prepareGameView(Game game, UUID playerId, UUID userId) {<NEW_LINE>Player player = game.getPlayer(playerId);<NEW_LINE>GameView gameView = new GameView(game.getState(), game, playerId, null);<NEW_LINE>gameView.setHand(new CardsView(game, player.getHand().getCards(game)));<NEW_LINE>if (gameView.getP... | processControlledPlayers(game, player, gameView); |
151,974 | protected void drawGuiContainerForegroundLayer(PoseStack transform, int mouseX, int mouseY, float partialTick) {<NEW_LINE>this.font.draw(transform, new TranslatableComponent(Lib.GUI_CONFIG + "redstone_color_sending").getString(), guiLeft, guiTop, DyeColor.WHITE.getTextColor());<NEW_LINE>this.font.draw(transform, new Tr... | , height, -1, font); |
1,618,310 | public void beforeRequest(Request<?> request) {<NEW_LINE>AmazonWebServiceRequest original = request.getOriginalRequest();<NEW_LINE>if (original instanceof DescribeSpotFleetRequestHistoryRequest) {<NEW_LINE>Map<String, List<String>> params = request.getParameters();<NEW_LINE>List<String> startTime = params.get(START_TIM... | validUntil = params.get(VALID_UNTIL); |
393,562 | private Recording startRecordingAudioOnly(Session session, Recording recording, RecordingProperties properties) throws OpenViduException {<NEW_LINE>log.info("Starting composed (audio-only) recording {} of session {}", recording.getId(<MASK><NEW_LINE>CompositeWrapper compositeWrapper = new CompositeWrapper((KurentoSessi... | ), recording.getSessionId()); |
1,328,523 | private IProject createNewProject() {<NEW_LINE>if (newProject != null) {<NEW_LINE>return newProject;<NEW_LINE>}<NEW_LINE>// get a project handle<NEW_LINE>final IProject newProjectHandle = mainPage.getProjectHandle();<NEW_LINE>// get a project descriptor<NEW_LINE>URI location = null;<NEW_LINE>if (!mainPage.useDefaults()... | newProjectHandle, description, sample, projectData); |
4,971 | private void placeBlockSimple(BlockPos pos) {<NEW_LINE>Direction side = null;<NEW_LINE>Direction[] sides = Direction.values();<NEW_LINE>Vec3d eyesPos = RotationUtils.getEyesPos();<NEW_LINE>Vec3d posVec = Vec3d.ofCenter(pos);<NEW_LINE>double <MASK><NEW_LINE>Vec3d[] hitVecs = new Vec3d[sides.length];<NEW_LINE>for (int i ... | distanceSqPosVec = eyesPos.squaredDistanceTo(posVec); |
1,007,156 | public RecordDataSchema schema() {<NEW_LINE>synchronized (this) {<NEW_LINE>// Don't use double-checked locking because _schema isn't volatile<NEW_LINE>if (_schema == null) {<NEW_LINE>final StringBuilder errorMessageBuilder = new StringBuilder(10);<NEW_LINE>final Name elementSchemaName = new Name(_valueClass.getSimpleNa... | errorsField.setName(ERRORS, errorMessageBuilder); |
1,715,316 | public static DescribeDnsGtmAccessStrategyResponse unmarshall(DescribeDnsGtmAccessStrategyResponse describeDnsGtmAccessStrategyResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDnsGtmAccessStrategyResponse.setRequestId(_ctx.stringValue("DescribeDnsGtmAccessStrategyResponse.RequestId"));<NEW_LINE>describeDnsGtmAcce... | (_ctx.integerValue("DescribeDnsGtmAccessStrategyResponse.DefaultMinAvailableAddrNum")); |
1,331,738 | private static String renderDocumentType(DocumentType docType) {<NEW_LINE>String publicId = docType.getPublicId();<NEW_LINE>String systemId = docType.getSystemId();<NEW_LINE>String nodeName;<NEW_LINE>if (null != docType.getOwnerDocument() && null != docType.getOwnerDocument().getDocumentElement() && null != docType.get... | "%22")).append('"'); |
1,232,723 | public void persist(final BlockHeader blockHeader) {<NEW_LINE>final WorldStateStorage.Updater stateUpdater = worldStateStorage.updater();<NEW_LINE>// Store updated code<NEW_LINE>for (final Bytes code : updatedAccountCode.values()) {<NEW_LINE>stateUpdater.putCode(null, code);<NEW_LINE>}<NEW_LINE>// Commit account storag... | accountStateTrie.commit(stateUpdater::putAccountStateTrieNode); |
1,559,680 | private void bindValues(SQLiteStatement stmt, JobHolder jobHolder) {<NEW_LINE>if (jobHolder.getInsertionOrder() != null) {<NEW_LINE>stmt.bindLong(DbOpenHelper.INSERTION_ORDER_COLUMN.columnIndex + 1, jobHolder.getInsertionOrder());<NEW_LINE>}<NEW_LINE>stmt.bindString(DbOpenHelper.ID_COLUMN.columnIndex + 1, jobHolder.get... | isCancelled() ? 1 : 0); |
1,700,082 | private static void checkProxyProperty(String propertyName, final URL url, final URLConnection[] conn, URI[] connectedVia, final CountDownLatch connected, final List<Exception> errs, StringBuffer msgs) {<NEW_LINE>String httpProxy = System.getenv(propertyName);<NEW_LINE>msgs.append("\n[" + propertyName + "] set to " + h... | test = url.openConnection(proxy); |
657,921 | public boolean connectPhysicalDisksViaVmSpec(VirtualMachineTO vmSpec) {<NEW_LINE>boolean result = false;<NEW_LINE>final <MASK><NEW_LINE>List<DiskTO> disks = Arrays.asList(vmSpec.getDisks());<NEW_LINE>for (DiskTO disk : disks) {<NEW_LINE>if (disk.getType() == Volume.Type.ISO) {<NEW_LINE>result = true;<NEW_LINE>continue;... | String vmName = vmSpec.getName(); |
234,854 | public MetaData.Builder addVirtualIndexMappings(final MetaData metaData) {<NEW_LINE>MetaData.Builder metaDataBuilder = new MetaData.Builder(metaData);<NEW_LINE>for (ObjectCursor<IndexMetaData> cursor : metaData.indices().values()) {<NEW_LINE>IndexMetaData virtualIndex = metaDataBuilder.get(cursor.value.virtualIndex());... | cursor.value.getMappings()); |
1,203,819 | private Mono<Response<Flux<ByteBuffer>>> exportRequestRateByIntervalWithResponseAsync(String location, RequestRateByIntervalInput parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and ... | this.client.mergeContext(context); |
1,542,040 | public void generateMovementFromEmptiesInout(@NonNull final I_M_InOut emptiesInOut) {<NEW_LINE>//<NEW_LINE>// Fetch shipment/receipt lines and convert them to packing material line candidates.<NEW_LINE>final List<HUPackingMaterialDocumentLineCandidate> lines = Services.get(IInOutDAO.class).retrieveLines(emptiesInOut, I... | collect(GuavaCollectors.toImmutableList()); |
552,687 | public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) {<NEW_LINE>try {<NEW_LINE>KuduScanner.KuduScannerBuilder scannerBuilder = client.newScannerBuilder(kuduTable);<NEW_LINE>List<String> querySchema;<NEW_LINE>if (fields == null) {<NEW_LINE>q... | RowResultIterator closer = scanner.close(); |
1,381,453 | public void update() {<NEW_LINE>if (externalMetricsSupplier != null) {<NEW_LINE>Set<CompactionExecutorId> <MASK><NEW_LINE>synchronized (exCeMetricsMap) {<NEW_LINE>externalMetricsSupplier.get().forEach(ecm -> {<NEW_LINE>seenIds.add(ecm.ceid);<NEW_LINE>ExMetrics exm = exCeMetricsMap.computeIfAbsent(ecm.ceid, id -> {<NEW_... | seenIds = new HashSet<>(); |
33,758 | public static boolean isIPAuthenticated(SipServletMessage message) {<NEW_LINE>if (s_instance.m_hasCheck) {<NEW_LINE>SipServletMessageImpl msg = (SipServletMessageImpl) message;<NEW_LINE>HeaderIterator viaHeaders = msg.getMessage().getViaHeaders();<NEW_LINE>if (viaHeaders != null) {<NEW_LINE>for (int i = 0; i < 2; i++) ... | Situation.SITUATION_START, null, e); |
982,263 | public void run() {<NEW_LINE>if (!SoapUI.usingGraphicalEnvironment()) {<NEW_LINE>// Don't use animation if we're not in the SoapUI GUI.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String oldThreadName = Thread.currentThread().getName();<NEW_LINE>if (future != null) {<NEW_LINE>if (System.getProperty("soapui.enablenamedthreads"... | target.setIcon(getIcon()); |
1,418,031 | public // array<double,2>^ dst, int arrayOffset, bool bForward)<NEW_LINE>void readRange(int streamOffset, int count, double[][] dst, int arrayOffset, boolean bForward) {<NEW_LINE>if (streamOffset < 0 || count < 0 || arrayOffset < 0 || count > NumberUtils.intMax() || size() < count + streamOffset)<NEW_LINE>throw new Ill... | [0] = m_buffer[j]; |
1,216,574 | final CreateFargateProfileResult executeCreateFargateProfile(CreateFargateProfileRequest createFargateProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createFargateProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
143,833 | public List<Endpoint> findEndpoint(String keyword, String serviceId, int limit) throws IOException {<NEW_LINE>StringBuilder sql = new StringBuilder();<NEW_LINE>List<Object> condition = new ArrayList<>(5);<NEW_LINE>sql.append("select * from ").append(EndpointTraffic.INDEX_NAME).append(" where ");<NEW_LINE>sql.append(End... | .SERVICE_ID).append("=?"); |
969,371 | private void customizeEditor(JEditorPane editor) {<NEW_LINE>EditorKit kit = editor.getEditorKit();<NEW_LINE>StyledDocument doc;<NEW_LINE>Document document = editor.getDocument();<NEW_LINE>try {<NEW_LINE>doc = (StyledDocument) editor.getDocument();<NEW_LINE>} catch (ClassCastException e) {<NEW_LINE>doc = new DefaultStyl... | .getLength()), null); |
819,509 | private ArrayList<TorrentFile> parseJsonFileListing(JSONObject response, Torrent torrent) throws JSONException {<NEW_LINE>// Parse response<NEW_LINE>ArrayList<TorrentFile> files = new ArrayList<>();<NEW_LINE>JSONArray objects = response.getJSONArray(RPC_DETAILS);<NEW_LINE>JSONArray progress = response.getJSONArray(RPC_... | priorities = response.getJSONArray(RPC_FILEPRIORITIES); |
877,155 | private static DirEntry findOrCreateNextDirEntry(DirEntry lastEntry, String name, int prevIndex, int nameEnd, int nameHash) {<NEW_LINE>DirEntry nextEntry = null;<NEW_LINE>// volatile read<NEW_LINE>DirEntry[] directories = lastEntry.childrenDirectories;<NEW_LINE>if (directories != null) {<NEW_LINE>// noinspection ForLoo... | .substring(prevIndex, nameEnd)); |
1,712,632 | public void updateWatchStatus(Watch watch) throws IOException {<NEW_LINE>// at the moment we store the status together with the watch,<NEW_LINE>// so we just need to update the watch itself<NEW_LINE>// we do not want to update the status.state field, as it might have been deactivated in-between<NEW_LINE>Map<String, Str... | "true", WatchStatus.INCLUDE_STATE, "false"); |
942,141 | public BackupDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE><MASK><NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>BackupDetails backupDetails = new BackupDetails();<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNex... | AwsJsonReader reader = context.getReader(); |
134,592 | public ModelAndView validateCode(Model model, @RequestParam("code") String code, @ModelAttribute("uaaMfaCredentials") UserGoogleMfaCredentials credentials, HttpServletRequest request, SessionStatus sessionStatus) throws UaaPrincipalIsNotInSession {<NEW_LINE>UaaAuthentication uaaAuth = getUaaAuthentication();<NEW_LINE>U... | model.addAttribute("error", "Incorrect code, please try again."); |
706,200 | final NotifyApplicationStateResult executeNotifyApplicationState(NotifyApplicationStateRequest notifyApplicationStateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(notifyApplicationStateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | endClientExecution(awsRequestMetrics, request, response); |
109,266 | final DescribeScalableTargetsResult executeDescribeScalableTargets(DescribeScalableTargetsRequest describeScalableTargetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeScalableTargetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | invoke(request, responseHandler, executionContext); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.