name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
pulsar_InMemoryDelayedDeliveryTracker_hasMessageAvailable
/** * Return true if there's at least a message that is scheduled to be delivered already. */ @Override public boolean hasMessageAvailable() { boolean hasMessageAvailable = !priorityQueue.isEmpty() && priorityQueue.peekN1() <= getCutoffTime(); if (!hasMessageAvailable) { updateTimer(); } retur...
3.68
hbase_AbstractHBaseSaslRpcClient_getInitialResponse
/** * Computes the initial response a client sends to a server to begin the SASL challenge/response * handshake. If the client's SASL mechanism does not have an initial response, an empty token * will be returned without querying the evaluateChallenge method, as an authentication processing * must be started by cli...
3.68
hbase_MasterObserver_preTruncateTableAction
/** * Called before {@link org.apache.hadoop.hbase.master.HMaster} truncates a table. Called as part * of truncate table procedure and it is async to the truncate RPC call. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table */ default void preTrunc...
3.68
hadoop_IOStatisticsBinding_trackFunctionDuration
/** * Given an IOException raising function/lambda expression, * return a new one which wraps the inner and tracks * the duration of the operation, including whether * it passes/fails. * @param factory factory of duration trackers * @param statistic statistic key * @param inputFn input function * @param <A> typ...
3.68
hadoop_RouterAuditLogger_createFailureLog
/** * A helper api for creating an audit log for a failure event. */ static String createFailureLog(String user, String operation, String perm, String target, String description, ApplicationId appId, SubClusterId subClusterId) { StringBuilder b = createStringBuilderForFailureLog(user, operation, targe...
3.68
morf_SqlDialect_expandInnerSelectFields
/** * Creates the fields from any inner selects on the outer select. * * @param statement the select statement to expand. */ private void expandInnerSelectFields(SelectStatement statement) { if (statement == null || !statement.getFields().isEmpty() || statement.getFromSelects().isEmpty()) { return; } for...
3.68
shardingsphere-elasticjob_SnapshotService_dumpJobDirectly
/** * Dump job. * @param jobName job's name * @return dump job's info */ public String dumpJobDirectly(final String jobName) { String path = "/" + jobName; final List<String> result = new ArrayList<>(); dumpDirectly(path, jobName, result); return String.join("\n", SensitiveInfoUtils.filterSensitiveI...
3.68
hbase_AbstractRpcClient_configureRpcController
/** * Configure an rpc controller * @param controller to configure * @return configured rpc controller */ protected HBaseRpcController configureRpcController(RpcController controller) { HBaseRpcController hrc; // TODO: Ideally we should not use an RpcController other than HBaseRpcController at client // side....
3.68
framework_AnimationUtil_setAnimationDuration
/** * For internal use only. May be removed or replaced in the future. * * Set the animation-duration CSS property. * * @param elem * the element whose animation-duration to set * @param duration * the duration as a valid CSS value */ public static void setAnimationDuration(Element elem, ...
3.68
flink_Rowtime_watermarksFromStrategy
/** Sets a custom watermark strategy to be used for the rowtime attribute. */ public Rowtime watermarksFromStrategy(WatermarkStrategy strategy) { internalProperties.putProperties(strategy.toProperties()); return this; }
3.68
flink_UnsortedGrouping_min
/** * Syntactic sugar for aggregate (MIN, field). * * @param field The index of the Tuple field on which the aggregation function is applied. * @return An AggregateOperator that represents the min'ed DataSet. * @see org.apache.flink.api.java.operators.AggregateOperator */ public AggregateOperator<T> min(int field...
3.68
hadoop_ProtobufWrapperLegacy_isUnshadedProtobufMessage
/** * Is a message an unshaded protobuf message? * @param payload payload * @return true if protobuf.jar is on the classpath and the payload is a Message */ public static boolean isUnshadedProtobufMessage(Object payload) { if (PROTOBUF_KNOWN_NOT_FOUND.get()) { // protobuf is known to be absent. fail fast with...
3.68
pulsar_ManagedLedgerPayloadProcessor_outputProcessor
/** * Used by ManagedLedger for processing payload after reading from bookkeeper ledger. * @return Handle to Processor instance */ default Processor outputProcessor() { return null; }
3.68
framework_BrowserInfo_isAndroidWithBrokenScrollTop
/** * Tests if this is an Android devices with a broken scrollTop * implementation. * * @return true if scrollTop cannot be trusted on this device, false * otherwise */ public boolean isAndroidWithBrokenScrollTop() { return isAndroid() && (getOperatingSystemMajorVersion() == 3 || getOperat...
3.68
hadoop_Tristate_isBoolean
/** * Does this value map to a boolean. * @return true if the state is one of true or false. */ public boolean isBoolean() { return mapping.isPresent(); }
3.68
hudi_BaseHoodieWriteClient_rollbackFailedWrites
/** * Rollback failed writes if any. * * @return true if rollback happened. false otherwise. */ public boolean rollbackFailedWrites() { return tableServiceClient.rollbackFailedWrites(); }
3.68
rocketmq-connect_ConnectKeyValueSerde_serde
/** * serializer and deserializer * * @return */ public static ConnectKeyValueSerde serde() { return new ConnectKeyValueSerde(new ConnectKeyValueSerializer(), new ConnectKeyValueDeserializer()); }
3.68
pulsar_KerberosName_replaceSubstitution
/** * Replace the matches of the from pattern in the base string with the value * of the to string. * @param base the string to transform * @param from the pattern to look for in the base string * @param to the string to replace matches of the pattern with * @param repeat whether the substitution should be repeat...
3.68
framework_BasicEventProvider_removeEventSetChangeListener
/* * (non-Javadoc) * * @see com.vaadin.addon.calendar.ui.CalendarComponentEvents. * EventSetChangeNotifier #removeListener * (com.vaadin.addon.calendar.ui.CalendarComponentEvents. * EventSetChangeListener ) */ @Override public void removeEventSetChangeListener(EventSetChangeListener listener) { listeners.rem...
3.68
querydsl_MapExpressionBase_containsValue
/** * Create a {@code value in values(this)} expression * * @param value value * @return expression */ public final BooleanExpression containsValue(V value) { return Expressions.booleanOperation(Ops.CONTAINS_VALUE, mixin, ConstantImpl.create(value)); }
3.68
dubbo_PathAndInvokerMapper_getRestMethodMetadata
/** * get rest method metadata by path matcher * * @param pathMatcher * @return */ public InvokerAndRestMethodMetadataPair getRestMethodMetadata(PathMatcher pathMatcher) { // first search from pathToServiceMapNoPathVariable if (pathToServiceMapNoPathVariable.containsKey(pathMatcher)) { return path...
3.68
hudi_InternalSchemaCache_getInternalSchemaByVersionId
/** * Give a schema versionId return its internalSchema. * This method will be called by spark tasks, we should minimize time cost. * We try our best to not use metaClient, since the initialization of metaClient is time cost * step1: * try to parser internalSchema from HoodieInstant directly * step2: * if we can...
3.68
hbase_CellVisibility_getExpression
/** Returns The visibility expression */ public String getExpression() { return this.expression; }
3.68
framework_VAccordion_getComponent
/** * Returns the wrapped widget of this stack item. * * @return the widget * * @deprecated This method is not called by the framework code anymore. * Use {@link #getChildWidget()} instead. */ @Deprecated public Widget getComponent() { return getChildWidget(); }
3.68
flink_ExecutionEnvironment_setParallelism
/** * Sets the parallelism for operations executed through this environment. Setting a parallelism * of x here will cause all operators (such as join, map, reduce) to run with x parallel * instances. * * <p>This method overrides the default parallelism for this environment. The {@link * LocalEnvironment} uses by ...
3.68
open-banking-gateway_TppTokenConfig_loadPrivateKey
/** * See {@code de.adorsys.opba.tppauthapi.TokenSignVerifyTest#generateNewTppKeyPair()} for details of how to * generate the encoded key. */ @SneakyThrows private PrivateKey loadPrivateKey(TppTokenProperties tppTokenProperties) { byte[] privateKeyBytes = Base64.getDecoder().decode(tppTokenProperties.getPrivateK...
3.68
framework_AbstractComponentTest_initializeComponents
/** * By default initializes just one instance of {@link #getTestClass()} using * {@link #constructComponent()}. */ @Override protected void initializeComponents() { component = constructComponent(); component.setId("testComponent"); addTestComponent(component); }
3.68
hbase_HRegion_updateCellTimestamps
/** * Replace any cell timestamps set to {@link org.apache.hadoop.hbase.HConstants#LATEST_TIMESTAMP} * provided current timestamp. */ private static void updateCellTimestamps(final Iterable<List<Cell>> cellItr, final byte[] now) throws IOException { for (List<Cell> cells : cellItr) { if (cells == null) conti...
3.68
flink_MapValue_size
/* * (non-Javadoc) * @see java.util.Map#size() */ @Override public int size() { return this.map.size(); }
3.68
hbase_TableSchemaModel_toString
/* * (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{ NAME=> '"); sb.append(name); sb.append('\''); for (Map.Entry<QName, Object> e : attrs.entrySet()) { sb.append(", "); sb.append(e.getKey().getLocalPart()...
3.68
hadoop_Server_getHomeDir
/** * Returns the server home dir. * * @return the server home dir. */ public String getHomeDir() { return homeDir; }
3.68
hbase_RecoverableZooKeeper_multi
/** * Run multiple operations in a transactional manner. Retry before throwing exception */ public List<OpResult> multi(Iterable<Op> ops) throws KeeperException, InterruptedException { final Span span = TraceUtil.createSpan("RecoverableZookeeper.multi"); try (Scope ignored = span.makeCurrent()) { RetryCounter...
3.68
zxing_MinimalEncoder_getCodewordsRemaining
/** Returns the remaining capacity in codewords of the smallest symbol that has enough capacity to fit the given * minimal number of codewords. **/ int getCodewordsRemaining(int minimum) { return getMinSymbolSize(minimum) - minimum; }
3.68
zxing_AztecCode_getMatrix
/** * @return the symbol image */ public BitMatrix getMatrix() { return matrix; }
3.68
flink_BinarySegmentUtils_allocateReuseBytes
/** * Allocate bytes that is only for temporary usage, it should not be stored in somewhere else. * Use a {@link ThreadLocal} to reuse bytes to avoid overhead of byte[] new and gc. * * <p>If there are methods that can only accept a byte[], instead of a MemorySegment[] * parameter, we can allocate a reuse bytes and...
3.68
hadoop_DynoInfraUtils_waitForNameNodeReadiness
/** * Wait for the launched NameNode to be ready, i.e. to have at least 99% of * its DataNodes register, have fewer than 0.01% of its blocks missing, and * less than 1% of its blocks under replicated. Continues until the criteria * have been met or {@code shouldExit} returns true. * * @param nameNodeProperties Th...
3.68
dubbo_ApplicationModel_getConsumerModel
/** * @deprecated ConsumerModel should fetch from context */ @Deprecated public static ConsumerModel getConsumerModel(String serviceKey) { return defaultModel().getDefaultModule().getServiceRepository().lookupReferredService(serviceKey); }
3.68
hbase_HFileWriterImpl_getMinimumMidpointArray
/** * Try to create a new byte array that falls between left and right as short as possible with * lexicographical order. * @return Return a new array that is between left and right and minimally sized else just return * null if left == right. */ private static byte[] getMinimumMidpointArray(ByteBuffer lef...
3.68
flink_Tuple24_copy
/** * Shallow tuple copy. * * @return A new Tuple with the same fields as this. */ @Override @SuppressWarnings("unchecked") public Tuple24< T0, T1, T2, T3, T4, T5, T6, T7, ...
3.68
hudi_AbstractTableFileSystemView_fetchLatestFileSlices
/** * Default implementation for fetching latest file-slices for a partition path. */ Stream<FileSlice> fetchLatestFileSlices(String partitionPath) { return fetchAllStoredFileGroups(partitionPath).map(HoodieFileGroup::getLatestFileSlice).filter(Option::isPresent) .map(Option::get); }
3.68
hbase_MetricsMaster_incrementSnapshotFetchTime
/** * Sets the execution time to fetch the mapping of snapshots to originating table. */ public void incrementSnapshotFetchTime(long executionTime) { masterQuotaSource.incrementSnapshotObserverSnapshotFetchTime(executionTime); }
3.68
hmily_HmilyRepositoryStorage_createHmilyTransaction
/** * Create hmily transaction. * * @param hmilyTransaction the hmily transaction */ public static void createHmilyTransaction(final HmilyTransaction hmilyTransaction) { if (Objects.nonNull(hmilyTransaction)) { PUBLISHER.publishEvent(hmilyTransaction, EventTypeEnum.CREATE_HMILY_TRANSACTION.getCode()); ...
3.68
morf_SqlServerDialect_getForUpdateSql
/** * SQL server places a shared lock on a record when it is selected without doing anything else (no MVCC) * so no need to specify a lock mode. * * @see org.alfasoftware.morf.jdbc.SqlDialect#getForUpdateSql() * @see <a href="http://stackoverflow.com/questions/10935850/when-to-use-select-for-update">When to use se...
3.68
hadoop_RollingFileSystemSink_updateFlushTime
/** * Update the {@link #nextFlush} variable to the next flush time. Add * an integer number of flush intervals, preserving the initial random offset. * * @param now the current time */ @VisibleForTesting protected void updateFlushTime(Date now) { // In non-initial rounds, add an integer number of intervals to t...
3.68
hbase_SimpleRpcServer_start
/** Starts the service. Must be called before any calls will be handled. */ @Override public synchronized void start() { if (started) { return; } authTokenSecretMgr = createSecretManager(); if (authTokenSecretMgr != null) { // Start AuthenticationTokenSecretManager in synchronized way to avoid race cond...
3.68
hbase_BaseLoadBalancer_updateBalancerStatus
/** * Updates the balancer status tag reported to JMX */ @Override public void updateBalancerStatus(boolean status) { metricsBalancer.balancerStatus(status); }
3.68
framework_NativeButtonClick_getTestDescription
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#getTestDescription() */ @Override protected String getTestDescription() { return "Validate click event coordinates not erroneously returned as x=0, y=0"; }
3.68
morf_AbstractSqlDialectTest_expectedPreInsertStatementsNotInsertingUnderAutonumLimit
/** * @return The expected SQL statements to be run prior to insert for the test database table. */ protected List<String> expectedPreInsertStatementsNotInsertingUnderAutonumLimit() { return Collections.emptyList(); }
3.68
flink_HttpRequestHandler_checkAndCreateUploadDir
/** * Checks whether the given directory exists and is writable. If it doesn't exist this method * will attempt to create it. * * @param uploadDir directory to check * @throws IOException if the directory does not exist and cannot be created, or if the * directory isn't writable */ public static synchronized...
3.68
hbase_CompactionPipeline_flattenOneSegment
/** * If the caller holds the current version, go over the the pipeline and try to flatten each * segment. Flattening is replacing the ConcurrentSkipListMap based CellSet to CellArrayMap based. * Flattening of the segment that initially is not based on ConcurrentSkipListMap has no effect. * Return after one segment...
3.68
pulsar_ClientConfiguration_getTlsTrustCertsFilePath
/** * @return path to the trusted TLS certificate file */ public String getTlsTrustCertsFilePath() { return confData.getTlsTrustCertsFilePath(); }
3.68
hbase_HRegion_replayWALBulkLoadEventMarker
/** * @deprecated Since 3.0.0, will be removed in 4.0.0. Only for keep compatibility for old region * replica implementation. */ @Deprecated void replayWALBulkLoadEventMarker(WALProtos.BulkLoadDescriptor bulkLoadEvent) throws IOException { checkTargetRegion(bulkLoadEvent.getEncodedRegionName().toByteAr...
3.68
hbase_SimpleRegionNormalizer_getMergeMinRegionSizeMb
/** * Return this instance's configured value for {@value #MERGE_MIN_REGION_SIZE_MB_KEY}. */ public long getMergeMinRegionSizeMb() { return normalizerConfiguration.getMergeMinRegionSizeMb(); }
3.68
hbase_DataBlockEncoding_getNameFromId
/** * Find and return the name of data block encoder for the given id. * @param encoderId id of data block encoder * @return name, same as used in options in column family */ public static String getNameFromId(short encoderId) { return getEncodingById(encoderId).toString(); }
3.68
hudi_DiskMap_addShutDownHook
/** * Register shutdown hook to force flush contents of the data written to FileOutputStream from OS page cache * (typically 4 KB) to disk. */ private void addShutDownHook() { shutdownThread = new Thread(this::cleanup); Runtime.getRuntime().addShutdownHook(shutdownThread); }
3.68
flink_StreamExecutionEnvironment_setStreamTimeCharacteristic
/** * Sets the time characteristic for all streams create from this environment, e.g., processing * time, event time, or ingestion time. * * <p>If you set the characteristic to IngestionTime of EventTime this will set a default * watermark update interval of 200 ms. If this is not applicable for your application y...
3.68
pulsar_ResourceGroupService_resourceGroupGet
/** * Get a copy of the RG with the given name. */ public ResourceGroup resourceGroupGet(String resourceGroupName) { ResourceGroup retrievedRG = this.getResourceGroupInternal(resourceGroupName); if (retrievedRG == null) { return null; } // Return a copy. return new ResourceGroup(retrieved...
3.68
dubbo_ServiceAnnotationPostProcessor_processAnnotatedBeanDefinition
/** * process @DubboService at java-config @bean method * <pre class="code"> * &#064;Configuration * public class ProviderConfig { * * &#064;Bean * &#064;DubboService(group="demo", version="1.2.3") * public DemoService demoService() { * return new DemoServiceImpl(); * } * * } *...
3.68
dubbo_MetricsSupport_dec
/** * Dec method num */ public static void dec( MetricsKey metricsKey, MetricsPlaceValue placeType, MethodMetricsCollector<TimeCounterEvent> collector, MetricsEvent event) { collector.increment( event.getAttachmentValue(METHOD_METRICS), new MetricsKeyWrapper...
3.68
flink_ExecutionEnvironment_execute
/** * Triggers the program execution. The environment will execute all parts of the program that * have resulted in a "sink" operation. Sink operations are for example printing results ({@link * DataSet#print()}, writing results (e.g. {@link DataSet#writeAsText(String)}, {@link * DataSet#write(org.apache.flink.api....
3.68
flink_YarnClusterDescriptor_getYarnSessionClusterEntrypoint
/** * The class to start the application master with. This class runs the main method in case of * session cluster. */ protected String getYarnSessionClusterEntrypoint() { return YarnSessionClusterEntrypoint.class.getName(); }
3.68
hbase_RegionSplitCalculator_calcCoverage
/** * Generates a coverage multimap from split key to Regions that start with the split key. * @return coverage multimap */ public Multimap<byte[], R> calcCoverage() { // This needs to be sorted to force the use of the comparator on the values, // otherwise byte array comparison isn't used Multimap<byte[], R> ...
3.68
flink_StandaloneResourceManagerFactory_getConfigurationWithoutResourceLimitationIfSet
/** * Get the configuration for standalone ResourceManager, overwrite invalid configs. * * @param configuration configuration object * @return the configuration for standalone ResourceManager */ @VisibleForTesting public static Configuration getConfigurationWithoutResourceLimitationIfSet( Configuration con...
3.68
zxing_BufferedImageLuminanceSource_isRotateSupported
/** * This is always true, since the image is a gray-scale image. * * @return true */ @Override public boolean isRotateSupported() { return true; }
3.68
hbase_ConfigurationManager_notifyAllObservers
/** * The conf object has been repopulated from disk, and we have to notify all the observers that * are expressed interest to do that. */ public void notifyAllObservers(Configuration conf) { LOG.info("Starting to notify all observers that config changed."); synchronized (configurationObservers) { for (Confi...
3.68
hbase_BinaryPrefixComparator_parseFrom
/** * Parse a serialized representation of {@link BinaryPrefixComparator} * @param pbBytes A pb serialized {@link BinaryPrefixComparator} instance * @return An instance of {@link BinaryPrefixComparator} made from <code>bytes</code> * @throws DeserializationException if an error occurred * @see #toByteArray */ pub...
3.68
hadoop_And_apply
/** * Applies child expressions to the {@link PathData} item. If all pass then * returns {@link Result#PASS} else returns the result of the first * non-passing expression. */ @Override public Result apply(PathData item, int depth) throws IOException { Result result = Result.PASS; for (Expression child : getChil...
3.68
framework_BootstrapResponse_getBootstrapHandler
/** * Gets the bootstrap handler that fired this event. * * @return the bootstrap handler that fired this event */ public BootstrapHandler getBootstrapHandler() { return (BootstrapHandler) getSource(); }
3.68
framework_GridDragSourceConnector_dragMultipleRows
/** * Tells if multiple rows are dragged. Returns true if multiple selection is * allowed and a selected row is dragged. * * @param draggedRow * Data of dragged row. * @return {@code true} if multiple rows are dragged, {@code false} * otherwise. */ private boolean dragMultipleRows(JsonObject ...
3.68
dubbo_EnvironmentUtils_filterDubboProperties
/** * Filters Dubbo Properties from {@link ConfigurableEnvironment} * * @param environment {@link ConfigurableEnvironment} * @return Read-only SortedMap */ public static SortedMap<String, String> filterDubboProperties(ConfigurableEnvironment environment) { SortedMap<String, String> dubboProperties = new TreeM...
3.68
rocketmq-connect_WorkerTask_initialize
/** * Initialize the task for execution. * * @param taskConfig initial configuration */ protected void initialize(ConnectKeyValue taskConfig) { // NO-op }
3.68
hudi_HoodieHFileDataBlock_lookupRecords
// TODO abstract this w/in HoodieDataBlock @Override protected <T> ClosableIterator<HoodieRecord<T>> lookupRecords(List<String> sortedKeys, boolean fullKey) throws IOException { HoodieLogBlockContentLocation blockContentLoc = getBlockContentLocation().get(); // NOTE: It's important to extend Hadoop configuration h...
3.68
hadoop_AzureBlobFileSystem_commitSingleFileByRename
/** * Perform the rename. * This will be rate limited, as well as able to recover * from rename errors if the etag was passed in. * @param source path to source file * @param dest destination of rename. * @param sourceEtag etag of source file. may be null or empty * @return the outcome of the operation * @throw...
3.68
dubbo_PojoUtils_getKeyTypeForMap
/** * Get key type for {@link Map} directly implemented by {@code clazz}. * If {@code clazz} does not implement {@link Map} directly, return {@code null}. * * @param clazz {@link Class} * @return Return String.class for {@link com.alibaba.fastjson.JSONObject} */ private static Type getKeyTypeForMap(Class<?> clazz...
3.68
hadoop_RecurrenceId_getPipelineId
/** * Return the pipelineId for the pipeline jobs. * * @return the pipelineId. */ public final String getPipelineId() { return pipelineId; }
3.68
framework_VTabsheet_onClose
/** * Handles a request to close this tab. Closability should be checked * before calling this method. The close request will be delivered to * the server, where the actual closing is handled. * * @see #isClosable() */ public void onClose() { closeHandler.onClose(new VCloseEvent(this)); }
3.68
framework_DownloadStream_getContentDispositionFilename
/** * Returns the filename formatted for inclusion in a Content-Disposition * header. Includes both a plain version of the name and a UTF-8 version * * @since 7.4.8 * @param filename * The filename to include * @return A value for inclusion in a Content-Disposition header */ public static String getC...
3.68
hbase_ZKServerTool_main
/** * Run the tool. * @param args Command line arguments. */ public static void main(String[] args) { for (ServerName server : readZKNodes(HBaseConfiguration.create())) { // bin/zookeeper.sh relies on the "ZK host" string for grepping which is case sensitive. System.out.println("ZK host: " + server.getHost...
3.68
morf_AbstractSqlDialectTest_shouldGenerateCorrectSqlForMathOperations5
/** * Tests that expression builder produces an output with brackets if a second * operand is Math operation. */ @Test public void shouldGenerateCorrectSqlForMathOperations5() { String result = testDialect.getSqlFrom(field("a").multiplyBy(field("b").plus(field("c")))); assertEquals(expectedSqlForMathOperations5(...
3.68
hbase_WALEdit_getBulkLoadDescriptor
/** * Deserialized and returns a BulkLoadDescriptor from the passed in Cell * @param cell the key value * @return deserialized BulkLoadDescriptor or null. */ public static WALProtos.BulkLoadDescriptor getBulkLoadDescriptor(Cell cell) throws IOException { return CellUtil.matchingColumn(cell, METAFAMILY, BULK_LOAD)...
3.68
framework_VScrollTable_initializeRows
/** For internal use only. May be removed or replaced in the future. */ public void initializeRows(UIDL uidl, UIDL rowData) { if (scrollBody != null) { scrollBody.removeFromParent(); } // Without this call the scroll position is messed up in IE even after // the lazy scroller has set the scroll...
3.68
pulsar_FunctionRuntimeManager_findFunctionAssignment
/** * Find a assignment of a function. * @param tenant the tenant the function belongs to * @param namespace the namespace the function belongs to * @param functionName the function name * @return the assignment of the function */ public synchronized Assignment findFunctionAssignment(String tenant, String namespa...
3.68
graphhopper_BikeCommonPriorityParser_collect
/** * @param weightToPrioMap associate a weight with every priority. This sorted map allows * subclasses to 'insert' more important priorities as well as overwrite determined priorities. */ void collect(ReaderWay way, double wayTypeSpeed, TreeMap<Double, PriorityCode> weightToPrioMap) { St...
3.68
dubbo_ApplicationModel_getProviderModel
/** * @deprecated use {@link FrameworkServiceRepository#lookupExportedService(String)} */ @Deprecated public static ProviderModel getProviderModel(String serviceKey) { return defaultModel().getDefaultModule().getServiceRepository().lookupExportedService(serviceKey); }
3.68
framework_VFilterSelect_asFraction
/** * Returns the percentage value as a fraction, e.g. 42% -> 0.42 * * @param percentage */ private float asFraction(String percentage) { String trimmed = percentage.trim(); String withoutPercentSign = trimmed.substring(0, trimmed.length() - 1); float asFraction = Float.parseFloat(withoutPer...
3.68
hadoop_TimelineMetricCalculator_compare
/** * Compare two not-null numbers. * @param n1 Number n1 * @param n2 Number n2 * @return 0 if n1 equals n2, a negative int if n1 is less than n2, a * positive int otherwise. */ public static int compare(Number n1, Number n2) { if (n1 == null || n2 == null) { throw new YarnRuntimeException( "Number ...
3.68
hbase_CommonFSUtils_getFilePermissions
/** * Get the file permissions specified in the configuration, if they are enabled. * @param fs filesystem that the file will be created on. * @param conf configuration to read for determining if permissions are enabled and * which to use * @param permssionConfKey ...
3.68
flink_HiveDDLUtils_noValidateConstraint
// returns a constraint trait that doesn't require VALIDATE public static byte noValidateConstraint(byte trait) { return (byte) (trait & (~HIVE_CONSTRAINT_VALIDATE)); }
3.68
hudi_BaseHoodieWriteClient_initMetadataTable
/** * Bootstrap the metadata table. * * @param instantTime current inflight instant time */ protected void initMetadataTable(Option<String> instantTime) { // by default do nothing. }
3.68
hadoop_TaskTrackerInfo_getBlacklistReport
/** * Gets a descriptive report about why the tasktracker was blacklisted. * * @return report describing why the tasktracker was blacklisted. */ public String getBlacklistReport() { return blacklistReport; }
3.68
flink_NettyShuffleMaster_computeShuffleMemorySizeForTask
/** * JM announces network memory requirement from the calculating result of this method. Please * note that the calculating algorithm depends on both I/O details of a vertex and network * configuration, e.g. {@link NettyShuffleEnvironmentOptions#NETWORK_BUFFERS_PER_CHANNEL} and * {@link NettyShuffleEnvironmentOpti...
3.68
hbase_CellFlatMap_firstKey
// -------------------------------- Key's getters -------------------------------- @Override public Cell firstKey() { if (isEmpty()) { return null; } return descending ? getCell(maxCellIdx - 1) : getCell(minCellIdx); }
3.68
framework_DataProvider_withConfigurableFilter
/** * Wraps this data provider to create a data provider that supports * programmatically setting a filter but no filtering through the query. * * @see #withConfigurableFilter(SerializableBiFunction) * @see ConfigurableFilterDataProvider#setFilter(Object) * * @return a data provider with a configurable filter, n...
3.68
framework_WidgetSet_createConnector
/** * Create an uninitialized connector that best matches given UIDL. The * connector must implement {@link ServerConnector}. * * @param tag * connector type tag for the connector to create * @param conf * the application configuration to use when creating the * connector * * ...
3.68
morf_XmlDataSetProducer_views
/** * @see org.alfasoftware.morf.metadata.Schema#views() */ @Override public Collection<View> views() { return Collections.emptySet(); }
3.68
morf_Function_sumDistinct
/** * Helper method to create an instance of the "sum(distinct)" SQL function. * * @param fieldToEvaluate the field to evaluate in the sum function. This can be any expression resulting in a single column of data. * @return an instance of the sum function */ public static Function sumDistinct(AliasedField fieldToE...
3.68
hbase_ScannerContext_setTimeLimitScope
/** * @param scope The scope in which the time limit will be enforced */ void setTimeLimitScope(LimitScope scope) { limits.setTimeScope(scope); }
3.68
framework_TreeGrid_setHierarchyColumn
/** * Set the column that displays the hierarchy of this grid's data. By * default the hierarchy will be displayed in the first column. * <p> * Setting a hierarchy column by calling this method also sets the column to * be visible and not hidable. * <p> * <strong>Note:</strong> Changing the Renderer of the hiera...
3.68
open-banking-gateway_EncryptionProviderConfig_consentAuthEncryptionProvider
/** * Consent authorization flow encryption. * @param specSecretKeyConfig Secret key based encryption configuration. * @return Consent Authorization encryption */ @Bean ConsentAuthorizationEncryptionServiceProvider consentAuthEncryptionProvider(ConsentSpecSecretKeyConfig specSecretKeyConfig) { return new Consen...
3.68
framework_AbstractComponent_getWidth
/* * (non-Javadoc) * * @see com.vaadin.server.Sizeable#getWidth() */ @Override public float getWidth() { return width; }
3.68