idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
743,112 | protected void initializeDataExtends(Relation<NumberVector> relation, int dim, double[] min, double[] extend) {<NEW_LINE>assert (min.length == dim && extend.length == dim);<NEW_LINE>// if no parameter for min max compute min max values for each dimension<NEW_LINE>// from dataset<NEW_LINE>if (minima == null || maxima ==... | dim + " got maxima dimensionality: " + maxima.length); |
1,080,534 | private static byte[] readMasterKey(ByteBuf packet) {<NEW_LINE>byte[] masterKey = null;<NEW_LINE>// check if the master key is an empty master key<NEW_LINE>boolean isEmptyKey = true;<NEW_LINE>for (int i = 0; i < BookieProtocol.MASTER_KEY_LENGTH; i++) {<NEW_LINE>if (packet.getByte(packet.readerIndex() + i) != emptyPassw... | readerIndex() + BookieProtocol.MASTER_KEY_LENGTH); |
991,898 | public ResourceTargetDefinition unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>ResourceTargetDefinition resourceTargetDefinition = new ResourceTargetDefinition();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOf... | ().unmarshall(context)); |
1,835,324 | private void handleMultiChoiceConstructorConfiguration(JsonNode node, JDefinedClass instanceClass, Schema currentSchema) {<NEW_LINE>// Use this flag to keep track of whether or not we'll actually need to generate any constructors<NEW_LINE>boolean requiresConstructors = false;<NEW_LINE>// Use these lists to keep track o... | classProperties = getConstructorProperties(node, false); |
1,051,692 | public void marshall(AccountAssignmentOperationStatus accountAssignmentOperationStatus, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (accountAssignmentOperationStatus == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshall... | accountAssignmentOperationStatus.getFailureReason(), FAILUREREASON_BINDING); |
1,533,138 | private String findTheName(JsObject configObject) {<NEW_LINE>String name = null;<NEW_LINE>FileObject fo = configObject.getFileObject();<NEW_LINE>Source source = Source.create(fo);<NEW_LINE>TokenHierarchy<?> th = source.createSnapshot().getTokenHierarchy();<NEW_LINE>if (th == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW... | th, configObject.getOffset()); |
487,402 | public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) {<NEW_LINE>final RelDataTypeFactory typeFactory = validator.getTypeFactory();<NEW_LINE>List<RelDataTypeFieldImpl> columns = new LinkedList<>();<NEW_LINE>if (baselineOp.equalsIgnoreCase("LIST")) {<NEW_LINE>columns.add(new RelDat... | createSqlType(SqlTypeName.VARCHAR))); |
1,224,974 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.contacts_preference);<NEW_LINE>// setup toolbar<NEW_LINE>setupToolbar();<NEW_LINE>// setup drawer<NEW_LINE>// setupDrawer(R.id.nav_contacts); // TODO needed?<NEW_LINE>// show sidebar?<NEW_L... | fragment = BackupFragment.create(showSidebar); |
1,240,945 | public final PrimaryContext namedPropertyArgPrimary() throws RecognitionException {<NEW_LINE>PrimaryContext _localctx = new PrimaryContext(_ctx, getState());<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>setState(1596);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>switch(_input.LA(1)) {<NEW_LINE>case AS:<NEW_LINE>case IN:<NEW_L... | enterRule(_localctx, 262, RULE_namedPropertyArgPrimary); |
1,215,663 | public List<Pair<String, String>> export(Node node, ProgressReporter progressReporter) {<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>final String labelName = (String) node.getProperty(<MASK><NEW_LINE>final String property = (String) node.getProperty(SystemPropertyKeys.propertyName.name());<NEW_LINE>map... | SystemPropertyKeys.label.name()); |
42,120 | public void visit(BLangWaitForAllExpr.BLangWaitLiteral waitLiteral) {<NEW_LINE>visitTypedesc(waitLiteral.pos, waitLiteral.getBType(), Collections.emptyList());<NEW_LINE>BIRBasicBlock thenBB = new BIRBasicBlock(this.env.nextBBId(names));<NEW_LINE>addToTrapStack(thenBB);<NEW_LINE>BIRVariableDcl tempVarDcl = new BIRVariab... | add(keyValue.key.value); |
1,001,092 | protected String buildPropertyMapping(ElasticsearchPersistentEntity<?> entity, @Nullable org.springframework.data.elasticsearch.core.document.Document runtimeFields) {<NEW_LINE>try {<NEW_LINE>writeTypeHints = entity.writeTypeHints();<NEW_LINE><MASK><NEW_LINE>// Dynamic templates<NEW_LINE>addDynamicTemplatesMapping(obje... | ObjectNode objectNode = objectMapper.createObjectNode(); |
1,116,558 | public static void main(String[] args) throws IOException {<NEW_LINE>final InputStream input = PurchaseGenerator.class.getResourceAsStream("/dev.properties");<NEW_LINE>final Properties props = new Properties();<NEW_LINE>props.load(input);<NEW_LINE>input.close();<NEW_LINE>Producer<String, Purchase> producer = new KafkaP... | >("purchases", sku, purchase); |
541,018 | public static LifecycleComponentStack buildAutoRecoveryServer(BookieConfiguration conf) throws Exception {<NEW_LINE>LifecycleComponentStack.Builder serverBuilder = LifecycleComponentStack.<MASK><NEW_LINE>// 1. build stats provider<NEW_LINE>StatsProviderService statsProviderService = new StatsProviderService(conf);<NEW_... | newBuilder().withName("autorecovery-server"); |
680,150 | public ECPoint twice() {<NEW_LINE>if (this.isInfinity()) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>ECCurve curve = this.getCurve();<NEW_LINE>ECFieldElement X1 = this.x;<NEW_LINE>if (X1.isZero()) {<NEW_LINE>// A point with X == 0 is its own additive inverse<NEW_LINE>return curve.getInfinity();<NEW_LINE>}<NEW_LINE>ECFi... | X1 : X1.multiply(Z1); |
1,166,819 | protected void handleDoubleClick(DoubleClickEvent anEvent) {<NEW_LINE>super.handleDoubleClick(anEvent);<NEW_LINE>// open the model<NEW_LINE>if (anEvent.getSelection() instanceof IStructuredSelection) {<NEW_LINE>IStructuredSelection iss = (IStructuredSelection) anEvent.getSelection();<NEW_LINE>Object firstElement = iss.... | HashMap<String, String>(); |
383,305 | public String mangle(final String username, final String idCode) {<NEW_LINE>if (null == idCode || idCode.trim().isEmpty()) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final MessageDigest md = MessageDigest.getInstance("SHA-256");<NEW_LINE>final byte[] plaintext = (salt + username + idCode.trim()).getBytes(... | ^ digest[i + 24]); |
328,403 | public AwsElasticsearchDomainNodeToNodeEncryptionOptions unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsElasticsearchDomainNodeToNodeEncryptionOptions awsElasticsearchDomainNodeToNodeEncryptionOptions = new AwsElasticsearchDomainNodeToNodeEncryptionOptions();<NEW_LINE>int originalDepth = con... | String currentParentElement = context.getCurrentParentElement(); |
1,730,038 | private List<Fact> createFacts_Charge(@NonNull final AcctSchema as, @NonNull final DocLine_BankStatement line) {<NEW_LINE>final BigDecimal chargeAmt = line.getChargeAmt();<NEW_LINE>if (chargeAmt.signum() == 0) {<NEW_LINE>return ImmutableList.of();<NEW_LINE>}<NEW_LINE>final MAccount acct_Charge = line.getChargeAccount(a... | chargeAmt.negate(), null); |
1,279,249 | public GrpcRouteMetadata unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GrpcRouteMetadata grpcRouteMetadata = new GrpcRouteMetadata();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token... | int originalDepth = context.getCurrentDepth(); |
910,024 | private void activateHU(final I_M_HU hu, final I_M_InOutLine inoutLine, final String trxName) {<NEW_LINE>//<NEW_LINE>// Get running context<NEW_LINE>final Properties ctx = InterfaceWrapperHelper.getCtx(hu);<NEW_LINE>final IContextAware contextProvider = <MASK><NEW_LINE>Services.get(ITrxManager.class).assertTrxNameNotNu... | PlainContextAware.newWithTrxName(ctx, trxName); |
1,605,255 | public Container.ExecResult execInContainer(InspectContainerResponse containerInfo, Charset outputCharset, String... command) throws UnsupportedOperationException, IOException, InterruptedException {<NEW_LINE>if (!TestEnvironment.dockerExecutionDriverSupportsExec()) {<NEW_LINE>// at time of writing, this is the expecte... | .instance().client(); |
1,352,303 | private Message messageFromMapMms(Map<String, String> msgMap) throws MessagingException {<NEW_LINE>if (LOCAL_LOGV)<NEW_LINE>Log.v(TAG, "messageFromMapMms(" + msgMap + ")");<NEW_LINE>final Uri mmsUri = Uri.withAppendedPath(Consts.MMS_PROVIDER, msgMap.get(Telephony.BaseMmsColumns._ID));<NEW_LINE>MmsSupport.MmsDetails det... | , details.getRecipient())); |
709,059 | protected void configure() {<NEW_LINE>bind(Project.class).toInstance(project);<NEW_LINE>bind(ServiceRegistry.class).toInstance(serviceRegistry);<NEW_LINE>bind(NotationParser.class).to(DefaultNotationParser.class);<NEW_LINE>bind(BuildManager.class).to(DefaultBuildManager.class);<NEW_LINE>bind(GoBinaryManager.class).to(D... | ).to(GitMercurialMapNotationParser.class); |
849,894 | public void textureStitchPost(TextureStitchEvent.Post event) {<NEW_LINE>flowingRenderCache.clear();<NEW_LINE>stillRenderCache.clear();<NEW_LINE>frozenRenderCache.clear();<NEW_LINE>TextureMap map = event.getMap();<NEW_LINE>missingIcon = map.getMissingSprite();<NEW_LINE>textureMap.clear();<NEW_LINE>for (FluidType type : ... | ).put(fluid, sprite); |
977,974 | public CompletableFuture<ExecutionResult> executeAsync(ExecutionInput executionInput) {<NEW_LINE>try {<NEW_LINE>if (logNotSafe.isDebugEnabled()) {<NEW_LINE>logNotSafe.debug("Executing request. operation name: '{}'. query: '{}'. variables '{}'", executionInput.getOperationName(), executionInput.getQuery(), executionInpu... | (this.graphQLSchema, executionInput)); |
1,231,179 | public int compareTo(waitForFateOperation_args other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());<NEW_... | this.tinfo, other.tinfo); |
161,770 | Object promoteObject(Object original, UnsignedWord header) {<NEW_LINE>HeapImpl heap = HeapImpl.getHeapImpl();<NEW_LINE>boolean isAligned = ObjectHeaderImpl.isAlignedHeader(header);<NEW_LINE>Header<?> originalChunk = getChunk(original, isAligned);<NEW_LINE>Space originalSpace = HeapChunk.getSpace(originalChunk);<NEW_LIN... | , (UnalignedHeader) originalChunk, originalSpace); |
1,305,032 | private void moveSelectorCardToDeck(Event event) {<NEW_LINE>SimpleCardView cardView = (SimpleCardView) event.getSource();<NEW_LINE>Card card = null;<NEW_LINE>boolean gameMode = mode != DeckEditorMode.FREE_BUILDING;<NEW_LINE>if (gameMode) {<NEW_LINE>// game: use existing real cards<NEW_LINE>for (Card sideCard : deck.get... | ? cardInfo.getMockCard() : null; |
1,317,467 | private static <T> T wrap(final Object model, final Class<T> modelClass, final Boolean useOldValues) {<NEW_LINE>if (model == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (modelClass.isInstance(model) && (useOldValues == null || useOldValues == Boolean.FALSE)) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>f... | IDocumentAware) model).getDocument(); |
1,691,530 | final DescribeStackSetResult executeDescribeStackSet(DescribeStackSetRequest describeStackSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeStackSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
109,038 | public void createZipFileToSend() {<NEW_LINE>try {<NEW_LINE>Map<String, String> env = new HashMap<>();<NEW_LINE>env.put("create", "true");<NEW_LINE>URI uri = URI.create("jar:file:///" + zipFilePath.replace('\\', '/').replaceAll(" ", "%20"));<NEW_LINE>FileSystem zipfs = FileSystems.newFileSystem(uri, env);<NEW_LINE>// s... | externalTxtFile, pathInZipfile, StandardCopyOption.REPLACE_EXISTING); |
857,622 | public void newEntity(String template) {<NEW_LINE>preview.closePreview();<NEW_LINE>originalElement = null;<NEW_LINE>editedEntity = CustomElementCompiler.getInstance(<MASK><NEW_LINE>if (editedEntity instanceof CustomElement) {<NEW_LINE>codepane.setCode(((CustomElement) editedEntity).getCode());<NEW_LINE>} else {<NEW_LIN... | ).genEntityFromTemplate(template, errorhandler); |
11,902 | public Entry<String, String> serializeForType(HttpServletRequest request, Response resp) {<NEW_LINE>String format = getStringParameter(request, "f", "xml");<NEW_LINE>String jsonpCallback = request.getParameter("callback");<NEW_LINE>boolean json = "json".equals(format);<NEW_LINE>boolean jsonp = "jsonp".<MASK><NEW_LINE>M... | equals(format) && jsonpCallback != null; |
193,867 | public void prepare(Progress progress) throws IOException {<NEW_LINE>if (prepared) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Artifact artifact = mrl.getDefaultArtifact();<NEW_LINE>mrl.prepare(artifact, progress);<NEW_LINE>Path root = mrl.<MASK><NEW_LINE>Path usagePath;<NEW_LINE>switch(usage) {<NEW_LINE>case TRAIN:<NEW_LIN... | getRepository().getResourceDirectory(artifact); |
1,710,232 | public final InsertImpl values(Field<T1> value1, Field<T2> value2, Field<T3> value3, Field<T4> value4, Field<T5> value5, Field<T6> value6, Field<T7> value7, Field<T8> value8, Field<T9> value9, Field<T10> value10, Field<T11> value11, Field<T12> value12, Field<T13> value13, Field<T14> value14, Field<T15> value15, Field<T... | , value19, value20, value21 }); |
1,270,485 | public void write(final java.nio.ByteBuffer buf) {<NEW_LINE>try {<NEW_LINE>int startPositionMark = buf.position();<NEW_LINE>buf.position(buf.position() + 1);<NEW_LINE>int unknownsCounter = 0;<NEW_LINE>if (unknownFields == null)<NEW_LINE>unknownsCounter = Integer.MAX_VALUE;<NEW_LINE>{<NEW_LINE>com.wowd.wobly.WoblyUtils.... | buf, this.format, true); |
1,499,800 | public void exportElement(JRXmlExporterContext exporterContext, JRGenericPrintElement element) {<NEW_LINE>JRPrintText labelPrintText = (JRPrintText) element.getParameterValue(IconLabelElement.PARAMETER_LABEL_TEXT_ELEMENT);<NEW_LINE>if (labelPrintText == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>JRBasePrintFrame fram... | setMode(element.getModeValue()); |
427,920 | private static void preprocess(@Nonnull Path inputPath, @Nonnull Path outputPath, Settings settings) throws IOException {<NEW_LINE>BatfishLogger logger = settings.getLogger();<NEW_LINE>logger.info("\n*** READING INPUT FILES ***\n");<NEW_LINE>Map<Path, String> configurationData = readAllFiles(inputPath.resolve(BfConsts.... | outputPath.resolve(BfConsts.RELPATH_CONFIGURATIONS_DIR); |
50,009 | public RestAction<Void> removeReaction(@Nonnull User user) {<NEW_LINE>Checks.notNull(user, "User");<NEW_LINE>boolean self = user.equals(getJDA().getSelfUser());<NEW_LINE>if (!self) {<NEW_LINE>if (!channel.getType().isGuild()) {<NEW_LINE>throw new PermissionException("Unable to remove Reaction of other user in non-guild... | >(getJDA(), route); |
1,120,568 | Node<K, V> findNear(K kkey, int rel) {<NEW_LINE>Comparable<? super K> key = comparable(kkey);<NEW_LINE>for (; ; ) {<NEW_LINE>Node<K, V> b = findPredecessor(key);<NEW_LINE>Node<K, V> n = b.next;<NEW_LINE>for (; ; ) {<NEW_LINE>if (n == null)<NEW_LINE>return ((rel & LT) == 0 || b.<MASK><NEW_LINE>Node<K, V> f = n.next;<NEW... | isBaseHeader()) ? null : b; |
1,230,701 | private void processMainServer(Map<Server, Long> servers, RouterConfig routerConfig, Map<String, Long> statistics, String group) {<NEW_LINE>for (Entry<String, Long> entry : statistics.entrySet()) {<NEW_LINE>try {<NEW_LINE>String domainName = entry.getKey();<NEW_LINE>Domain defaultDomainConfig = m_configManager.getRoute... | put(server, oldValue + value); |
1,639,316 | public boolean preAuthorization(AdminCommandContext context) {<NEW_LINE>final ActionReport report = context.getActionReport();<NEW_LINE>// Issue 17513 Fix - Check for null passwords if secureadmin is enabled<NEW_LINE>secureAdmin = domain.getSecureAdmin();<NEW_LINE>if (SecureAdmin.Util.isEnabled(secureAdmin)) {<NEW_LINE... | SecurityService securityService = config.getSecurityService(); |
1,661,259 | public final Description matchClass(ClassTree classTree, VisitorState state) {<NEW_LINE>if (!HAS_CONSTRUCTORS_WITH_INJECT.matches(classTree, state)) {<NEW_LINE>return Description.NO_MATCH;<NEW_LINE>}<NEW_LINE>List<MethodTree> ctors = ASTHelpers.getConstructors(classTree);<NEW_LINE>ImmutableList<MethodTree> ctorsWithInj... | ).collect(toImmutableList()); |
1,621,797 | public Iterator<Cache.Entry<K, ValueHolder<V>>> iterator() {<NEW_LINE>java.util.Iterator<Entry<K, OnHeapValueHolder<V>>> iterator = map.entrySetIterator();<NEW_LINE>return new Iterator<Cache.Entry<K, ValueHolder<V>>>() {<NEW_LINE><NEW_LINE>private Cache.Entry<K, ValueHolder<V>> prefetched = advance();<NEW_LINE><NEW_LIN... | > next = iterator.next(); |
1,826,776 | private Dictionary loadDictionary(String locale, Settings nodeSettings, Environment env) throws Exception {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Loading hunspell dictionary [{}]...", locale);<NEW_LINE>}<NEW_LINE>Path dicDir = hunspellDir.resolve(locale);<NEW_LINE>if (FileSystemUtils.isAccessib... | .ROOT, "Too many affix files exist for hunspell dictionary [%s]", locale)); |
61,711 | public SearchMatch newDeclarationMatch(IJavaElement element, Binding binding, int accuracy, int offset, int length, SearchParticipant participant, IResource resource) {<NEW_LINE>switch(element.getElementType()) {<NEW_LINE>case IJavaElement.PACKAGE_FRAGMENT:<NEW_LINE>return new PackageDeclarationMatch(element, accuracy,... | offset, length, participant, resource); |
1,312,909 | public synchronized void update(LogProviderConfig config) {<NEW_LINE>// Get the configured log location, and derive the ffdc location from it<NEW_LINE>File location = config.getLogDirectory();<NEW_LINE>if (location == null) {<NEW_LINE>location = new File(".");<NEW_LINE>}<NEW_LINE>location = new File(location, FFDCConfi... | int maxFiles = config.getMaxFiles(); |
1,363,474 | public void transformJson(HistoryJobEntity job, ObjectNode historicalData, CommandContext commandContext) {<NEW_LINE>HistoricDetailDataManager historicDetailDataManager = processEngineConfiguration.getHistoricDetailDataManager();<NEW_LINE>HistoricDetailVariableInstanceUpdateEntity historicDetailEntity = historicDetailD... | (historicalData, HistoryJsonConstants.PROCESS_INSTANCE_ID)); |
608,476 | private void loadPreview(Attachment attachment, ImageView imageView) {<NEW_LINE>if (cancelPotentialWork(attachment, imageView)) {<NEW_LINE>XmppActivity activity = (XmppActivity) conversationFragment.getActivity();<NEW_LINE>final Bitmap bm = activity.xmppConnectionService.getFileBackend().getPreviewForUri(attachment, Ma... | BitmapWorkerTask task = new BitmapWorkerTask(imageView); |
1,266,714 | public static void build(MeshPartBuilder builder, VertexInfo corner00, VertexInfo corner10, VertexInfo corner11, VertexInfo corner01, int divisionsU, int divisionsV) {<NEW_LINE>if (divisionsU < 1 || divisionsV < 1) {<NEW_LINE>throw new GdxRuntimeException("divisionsU and divisionV must be > 0, u,v: " + divisionsU + ", ... | ) * (divisionsU + 1)); |
909,260 | public static void printThreadInfo(PrintWriter stream, String title) {<NEW_LINE>final int stackDepth = 20;<NEW_LINE>boolean contention = threadBean.isThreadContentionMonitoringEnabled();<NEW_LINE>long[] threadIds = threadBean.getAllThreadIds();<NEW_LINE>stream.println("Process Thread Dump: " + title);<NEW_LINE>stream.p... | " Waiting on " + info.getLockName()); |
259,133 | public void authenticate(AuthenticationFlowContext context) {<NEW_LINE>String existingUserId = context.getAuthenticationSession().getAuthNote(AbstractIdpAuthenticator.EXISTING_USER_INFO);<NEW_LINE>if (existingUserId != null) {<NEW_LINE>UserModel existingUser = AbstractIdpAuthenticator.getExistingUser(context.getSession... | .form().createPasswordReset(); |
1,531,181 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {<NEW_LINE>setPreferencesFromResource(R.xml.preference_delete, rootKey);<NEW_LINE>Activity activity = getActivity();<NEW_LINE>assert activity != null;<NEW_LINE>Context context = getContext();<NEW_LINE>assert context != null;<NEW_LINE>Preference ... | MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(activity); |
312,933 | public void handleOutboundPubrec(@NotNull final ChannelHandlerContext ctx, @NotNull final PUBREC pubrec, @NotNull final ChannelPromise promise) {<NEW_LINE>final Channel channel = ctx.channel();<NEW_LINE>final ClientConnection clientConnection = channel.attr(ChannelAttributes.CLIENT_CONNECTION).get();<NEW_LINE>final Str... | ExtensionInformationUtil.getAndSetClientInformation(channel, clientId); |
652,482 | private void registerToDesc() throws UserException {<NEW_LINE>TableRef ref = new TableRef(tableName, null, partitions == null ? null : new PartitionNames(false, partitions));<NEW_LINE>BaseTableRef tableRef = new BaseTableRef(ref, exportTable, tableName);<NEW_LINE>analyzer.registerTableRef(tableRef);<NEW_LINE>exportTupl... | ), tableRef.hasExplicitAlias()); |
1,689,448 | public void showDownloadControls(boolean needToShow) {<NEW_LINE>// 2 modes:<NEW_LINE>// - only message;<NEW_LINE>// - message + download controls and buttons<NEW_LINE>this.panelGlobal.setVisible(true);<NEW_LINE>// stop button only for loading mode<NEW_LINE>this.buttonStop.setVisible(!needToShow);<NEW_LINE>this.tabsList... | width, this.sizeModeMessageAndControls.height); |
653,864 | private void init() {<NEW_LINE>if (jp == null) {<NEW_LINE>try {<NEW_LINE>long timeLeftMillis = timeoutAt - System.currentTimeMillis();<NEW_LINE>if (checkTimeout(timeLeftMillis)) {<NEW_LINE>throw timeoutQuery();<NEW_LINE>}<NEW_LINE>InputStream is = hasTimeout ? future.get(timeLeftMillis, TimeUnit.MILLISECONDS) : future.... | JsonToken nextToken = jp.nextToken(); |
1,546,883 | final DisassociateLinkResult executeDisassociateLink(DisassociateLinkRequest disassociateLinkRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateLinkRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateLink"); |
873,993 | synchronized public void add(final long commitRecordAddr, final ICommitRecord commitRecord) {<NEW_LINE>if (commitRecord == null)<NEW_LINE>throw new IllegalArgumentException();<NEW_LINE>if (commitRecordAddr == 0L)<NEW_LINE>throw new IllegalArgumentException();<NEW_LINE>final long commitTime = commitRecord.getTimestamp()... | Entry(commitTime, commitRecordAddr))); |
691,937 | public void updateDownloadShares(UpdateDownloadSharesBulkRequest body, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'body' whe... | HashMap<String, String>(); |
577,239 | public synchronized boolean replaceDraftPlayer(Player oldPlayer, String name, PlayerType playerType, int skill) {<NEW_LINE>Optional<Player> newPlayerOpt = createPlayer(name, playerType, skill);<NEW_LINE>if (!newPlayerOpt.isPresent() || table.getState() != TableState.DRAFTING) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LIN... | getPlayer(oldPlayer.getId()); |
1,553,738 | final SetDesiredCapacityResult executeSetDesiredCapacity(SetDesiredCapacityRequest setDesiredCapacityRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(setDesiredCapacityRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Auto Scaling"); |
1,184,996 | private void waitForFutureCompletion(GroupByQuery query, List<ListenableFuture<Void>> futures, IncrementalIndex closeOnFailure) {<NEW_LINE>ListenableFuture<List<Void>> future = Futures.allAsList(futures);<NEW_LINE>try {<NEW_LINE>queryWatcher.registerQueryFuture(query, future);<NEW_LINE>if (QueryContexts.hasTimeout(quer... | , query.getId())); |
141,966 | public void parse(String content, ConstraintLayoutState state) {<NEW_LINE>try {<NEW_LINE>state.clear();<NEW_LINE>CLObject json = CLParser.parse(content);<NEW_LINE>for (CLKey key : json) {<NEW_LINE>String name = key.getName();<NEW_LINE>if (name.equals(HEADER)) {<NEW_LINE>CLElement value = key.getValue();<NEW_LINE>if (va... | , name, (CLObject) value); |
686,675 | public void onNewCard(final NewCardInfo newCardInfo) {<NEW_LINE>if (newCardInfo != null) {<NEW_LINE>if (newCardInfo.getUserId() != mCurrentUserId) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>mBackgroundHandler.post(() -> {<NEW_LINE>final CardWrapper wrapper = newCardInfo.toWrapper(mContext);<NEW_LINE>if (!mHidePrivateData) ... | wrapper, newCardInfo.isPrimary()); |
1,787,548 | private void downloadFile(DownloadTaskParams param) throws IOException {<NEW_LINE>String url = param.url;<NEW_LINE>File writePath = param.targetFile;<NEW_LINE>this.hash = param.hash;<NEW_LINE>OkHttpClient client = new OkHttpClient();<NEW_LINE>Request request = new Request.Builder().url(url).build();<NEW_LINE>Response r... | "Progress " + received + "/" + contentLength); |
566,166 | protected void handleKTableGlobalKTableInputs(Object[] arguments, int index, String input, Class<?> parameterType, Object targetBean, StreamsBuilderFactoryBean streamsBuilderFactoryBean, StreamsBuilder streamsBuilder, KafkaStreamsConsumerProperties extendedConsumerProperties, Serde<?> keySerde, Serde<?> valueSerde, Top... | <Object, Object>) table); |
1,455,512 | private void buildRefElement(TypeBuilder.OCDType ocdType, List<TypeMember> xmlElements, ExtendedAttributeDefinition attributeDef, boolean requiredForThisAttribute, String baseId, OCDType ocdReference, boolean topLevel) {<NEW_LINE>if (generateNested(attributeDef) && !!!ocdReference.isInternal() && (topLevel || (ocdRefer... | String extendsAlias = ocdReference.getExtendsAlias(); |
1,083,912 | public void actionPerformed(ActionEvent e) {<NEW_LINE>// Show Dialog<NEW_LINE>CompiereColor cc = ColorEditor.showDialog((JFrame) Env.getParent(this), m_cc);<NEW_LINE>if (cc == null) {<NEW_LINE>log.info("VColor.actionPerformed - no color");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// set Button<NEW_LINE>setBackgroundColor(c... | "ColorType", cc.getType()); |
893,973 | boolean updateCompactionProgress(String partitionPath, String fieldName, long progressTime) {<NEW_LINE>try {<NEW_LINE>// load existing progress checkpoint.<NEW_LINE>Map<String, <MASK><NEW_LINE>// Ensure we don't downgrade progress already recorded.<NEW_LINE>if (progressTime <= checkpoints.getOrDefault(fieldName, DEFAUL... | Long> checkpoints = getCompactionProgress(partitionPath); |
1,580,912 | private void removeWildcardsInSelectPaths(QueryStatement queryStatement) throws StatementAnalyzeException, PathNumOverLimitException {<NEW_LINE>List<ResultColumn> resultColumns = new ArrayList<>();<NEW_LINE>// Only used for group by level<NEW_LINE>GroupByLevelController groupByLevelController = null;<NEW_LINE>if (query... | removeWildcards(this, resultColumns, needAliasCheck); |
1,046,940 | private void sendInterestArea() {<NEW_LINE>log.info("R_InterestArea_ID=" + m_R_InterestArea_ID);<NEW_LINE>m_ia = MInterestArea.get(getCtx(), m_R_InterestArea_ID);<NEW_LINE>String unsubscribe = null;<NEW_LINE>if (m_ia.isSelfService()) {<NEW_LINE>unsubscribe = "\n\n---------.----------.----------.----------.----------.--... | Level.SEVERE, sql, ex); |
658,111 | private void removeWildcardsWithoutNullColumns(QueryOperator queryOperator) throws LogicalOptimizeException {<NEW_LINE>if (queryOperator.getIndexType() != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (queryOperator.getSpecialClauseComponent() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<Expression> expressio... | LogicalOptimizeException(e.getMessage()); |
897,003 | @SchedulerSupport(SchedulerSupport.NONE)<NEW_LINE>public static <@NonNull T> Observable<T> just(@NonNull T item1, @NonNull T item2, @NonNull T item3, @NonNull T item4, @NonNull T item5, @NonNull T item6, @NonNull T item7, @NonNull T item8) {<NEW_LINE>Objects.requireNonNull(item1, "item1 is null");<NEW_LINE>Objects.requ... | Objects.requireNonNull(item5, "item5 is null"); |
1,499,348 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {<NEW_LINE>if (seekBar == fillHueBar) {<NEW_LINE>fillColorArgb = Color.HSVToColor(Color.alpha(fillColorArgb), new float[] { progress, 1, 1 });<NEW_LINE>} else if (seekBar == fillAlphaBar) {<NEW_LINE>fillColorArgb = Color.argb(progress, Color... | , Color.blue(fillColorArgb)); |
1,508,239 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | endClientExecution(awsRequestMetrics, request, response); |
554,815 | private void ingest(@Nonnull UsageAggregation bucket) {<NEW_LINE>// 1. Translate the bucket to DatasetUsageStatistics first.<NEW_LINE>DatasetUsageStatistics datasetUsageStatistics = new DatasetUsageStatistics();<NEW_LINE>datasetUsageStatistics.setTimestampMillis(bucket.getBucket());<NEW_LINE>datasetUsageStatistics.setE... | datasetUsageStatistics, getUsageStatsAspectSpec(), null); |
1,095,737 | private void createFrameworksList(WebProject project, int filter) {<NEW_LINE>List frameworks = WebFrameworks.getFrameworks();<NEW_LINE>if (project == null || filter == ALL_FRAMEWORKS) {<NEW_LINE>for (int i = 0; i < frameworks.size(); i++) {<NEW_LINE>addFrameworkToModel((WebFrameworkProvider<MASK><NEW_LINE>}<NEW_LINE>} ... | ) frameworks.get(i)); |
1,629,486 | private String addMarkdownLikeHyperlinks(String aboutText, List<StyleRange> styles) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>Pattern <MASK><NEW_LINE>Matcher matcher = pattern.matcher(aboutText);<NEW_LINE>StringBuilder answer = new StringBuilder(aboutText.length());<NEW_LINE>int pointer = 0;<NEW_LINE>while (matcher.find()) {<... | pattern = Pattern.compile("\\[(?<text>[^\\]]*)\\]\\((?<link>[^\\)]*)\\)"); |
935,616 | /*<NEW_LINE>* @see com.sitewhere.grpc.service.DeviceEventManagementGrpc.<NEW_LINE>* DeviceEventManagementImplBase#addStateChanges(com.sitewhere.grpc.service.<NEW_LINE>* GAddStateChangesRequest, io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void addStateChanges(GAddStateChangesRequest reque... | Builder response = GAddStateChangesResponse.newBuilder(); |
657,055 | private void handleExecutorSimulate(String[] args) {<NEW_LINE>String first = args[0];<NEW_LINE>int threadCount = Integer.parseInt(first.substring(1, first.indexOf(".")));<NEW_LINE>if (threadCount < 1 || threadCount > 16) {<NEW_LINE>throw new RuntimeException("threadCount can't be smaller than 1 or larger than 16");<NEW... | getCluster().getMembers()); |
516,201 | private Mono<Response<NameAvailabilityInner>> executeWithResponseAsync(NameAvailabilityRequest nameAvailabilityRequest, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NE... | this.client.mergeContext(context); |
379,499 | public static void dropTempTables(final String endpointId) throws DotDataException {<NEW_LINE>DotConnect dc = new DotConnect();<NEW_LINE>try {<NEW_LINE>IntegrityType[] types = IntegrityType.values();<NEW_LINE>for (IntegrityType integrityType : types) {<NEW_LINE>for (String tempTableName : integrityType.getIntegrityChec... | dc.executeStatement("drop table " + tempTableName); |
1,418,887 | private static int mapActions(OceanBaseGlobalState globalState, Action a) {<NEW_LINE>Randomly r = globalState.getRandomly();<NEW_LINE>int nrPerformed = 0;<NEW_LINE>switch(a) {<NEW_LINE>case DROP_INDEX:<NEW_LINE>nrPerformed = r.getInteger(0, 2);<NEW_LINE>break;<NEW_LINE>case SHOW_TABLES:<NEW_LINE>nrPerformed = r.getInte... | r.getInteger(0, 10); |
425,793 | public void visit(LambdaExpr n, Void arg) {<NEW_LINE>printOrphanCommentsBeforeThisChildNode(n);<NEW_LINE>printComment(n.getComment(), arg);<NEW_LINE>final NodeList<Parameter> parameters = n.getParameters();<NEW_LINE>final <MASK><NEW_LINE>if (printPar) {<NEW_LINE>printer.print("(");<NEW_LINE>}<NEW_LINE>for (Iterator<Par... | boolean printPar = n.isEnclosingParameters(); |
1,491,378 | protected ArrayList<Term<Blk>> iterateInstructions(Term<Blk> block, Listing listing, CodeBlock codeBlock) {<NEW_LINE>PcodeBlockData.instructionIndex = 0;<NEW_LINE>InstructionIterator instructions = <MASK><NEW_LINE>PcodeBlockData.numberOfInstructionsInBlock = StreamSupport.stream(listing.getInstructions(codeBlock, true)... | listing.getInstructions(codeBlock, true); |
874,819 | private byte[] createPubrelBytes(final int packetId, final boolean retained, @Nullable final Long expiry, @Nullable final Long publishTimestamp) {<NEW_LINE>final byte[] result;<NEW_LINE>if (expiry != null && publishTimestamp != null) {<NEW_LINE>result = new byte[Short.BYTES + 1 + Long.BYTES * 2];<NEW_LINE>} else {<NEW_... | serializeShort(packetId, result, cursor); |
1,072,384 | public static DescribeDcdnEsExecuteDataResponse unmarshall(DescribeDcdnEsExecuteDataResponse describeDcdnEsExecuteDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDcdnEsExecuteDataResponse.setRequestId(_ctx.stringValue("DescribeDcdnEsExecuteDataResponse.RequestId"));<NEW_LINE>List<Content> contents <MASK><NEW... | = new ArrayList<Content>(); |
366,395 | public HealthbotManager authenticate(TokenCredential credential, AzureProfile profile) {<NEW_LINE>Objects.requireNonNull(credential, "'credential' cannot be null.");<NEW_LINE><MASK><NEW_LINE>if (retryPolicy == null) {<NEW_LINE>retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);<NEW_LINE>}<NEW_LINE>List<Ht... | Objects.requireNonNull(profile, "'profile' cannot be null."); |
1,540,019 | public NodeIndicesStats stats(CommonStatsFlags flags) {<NEW_LINE>CommonStats commonStats = new CommonStats(flags);<NEW_LINE>// the cumulative statistics also account for shards that are no longer on this node, which is tracked by oldShardsStats<NEW_LINE>for (Flag flag : flags.getFlags()) {<NEW_LINE>switch(flag) {<NEW_L... | , statsByShard(this, flags)); |
213,850 | public void storeFunction(UserFunctionSignature signature, String statement, boolean forceSingle) {<NEW_LINE>withSystemDb(tx -> {<NEW_LINE>Node node = Util.mergeNode(tx, SystemLabels.ApocCypherProcedures, SystemLabels.Function, Pair.of(SystemPropertyKeys.database.name(), api.databaseName()), Pair.of(SystemPropertyKeys.... | (signature.inputSignature())); |
1,544,630 | private static void writeFragments(final List<? extends PsiFragment> psiFragments, Element duplicateElement, Project project, final boolean shouldWriteOffsets) {<NEW_LINE>final PathMacroManager macroManager = PathMacroManager.getInstance(project);<NEW_LINE>final PsiDocumentManager documentManager = PsiDocumentManager.g... | (fragment.getEndOffset())); |
643,728 | public boolean release(CPGroupId groupId, long commitIndex, String name, LockEndpoint endpoint, UUID invocationUid) {<NEW_LINE>heartbeatSession(groupId, endpoint.sessionId());<NEW_LINE>LockRegistry <MASK><NEW_LINE>ReleaseResult result = registry.release(name, endpoint, invocationUid);<NEW_LINE>if (logger.isFineEnabled(... | registry = getLockRegistryOrFail(groupId, name); |
1,848,489 | public SplitEntry findBestFromServerSplit(IntDoubleVector histogram) throws Exception {<NEW_LINE>LOG.debug(String.format("------To find the best split of node[%d]------", this.nid));<NEW_LINE>SplitEntry splitEntry = new SplitEntry();<NEW_LINE>LOG.debug(String.format("The best split before looping the histogram: fid[%d]... | .fvalue, splitEntry.lossChg)); |
1,136,623 | public void processQuery(@NotNull SearchParameters queryParameters, /* Cannot use generics as<NEW_LINE>< 2018.2 needs `Processor<PsiPolyVariantReference>` while<NEW_LINE>>= 2018.2 needs `Processor<? super PsiPolyVariantReference>` */<NEW_LINE>@NotNull @SuppressWarnings("unused") Processor processor) {<NEW_LINE>PsiEleme... | ).isCaseSensitive(), elementToSearchNamed); |
657,427 | private void runOperationInCluster(K key, MergedUpdate<V> task, SessionEntityWrapper<V> sessionWrapper) {<NEW_LINE>V session = sessionWrapper.getEntity();<NEW_LINE>SessionUpdateTask.CacheOperation operation = task.getOperation(session);<NEW_LINE>// Don't need to run update of underlying entity. Local updates were alrea... | logger.debugf("Existing entity in cache for key: %s . Will update it", key); |
144,100 | ActionResult<Wo> execute(String applicationId, String unit, String person) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>List<DateRange> ... | setName(stub.getName()); |
21,719 | final BatchGetResourceConfigResult executeBatchGetResourceConfig(BatchGetResourceConfigRequest batchGetResourceConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchGetResourceConfigRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Req... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,629,890 | public DecisionDefinitionEntity findDecisionDefinitionByKeyVersionTagAndTenantId(String decisionDefinitionKey, String decisionDefinitionVersionTag, String tenantId) {<NEW_LINE>Map<String, Object> parameters = new HashMap<String, Object>();<NEW_LINE>parameters.put("decisionDefinitionVersionTag", decisionDefinitionVersio... | parameters.put("tenantId", tenantId); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.