name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
AreaShop_CommandAreaShop_confirm
/** * Confirm a command. * @param sender To confirm it for, or send a message to confirm * @param args Command args * @param message Message to send when confirmation is required * @return true if confirmed, false if confirmation is required */ public boolean confirm(CommandSender sender, String[] args, Message m...
3.68
starts_Attribute_isCodeAttribute
/** * Returns <code>true</code> if this type of attribute is a code attribute. * * @return <code>true</code> if this type of attribute is a code attribute. */ public boolean isCodeAttribute() { return false; }
3.68
hudi_HoodieBackedTableMetadata_isFullScanAllowedForPartition
// NOTE: We're allowing eager full-scan of the log-files only for "files" partition. // Other partitions (like "column_stats", "bloom_filters") will have to be fetched // t/h point-lookups private boolean isFullScanAllowedForPartition(String partitionName) { switch (partitionName) { case PARTITION_NAM...
3.68
hadoop_FullCredentialsTokenBinding_deployUnbonded
/** * Serve up the credentials retrieved from configuration/environment in * {@link #loadAWSCredentials()}. * @return a credential provider for the unbonded instance. * @throws IOException failure to load */ @Override public AWSCredentialProviderList deployUnbonded() throws IOException { requireServiceStarted();...
3.68
flink_LocalFileSystem_getSharedInstance
/** * Gets the shared instance of this file system. * * @return The shared instance of this file system. */ public static LocalFileSystem getSharedInstance() { return INSTANCE; }
3.68
hbase_BalancerClusterState_updateForLocation
/** * Common method for per host and per Location region index updates when a region is moved. * @param serverIndexToLocation serverIndexToHostIndex or serverIndexToLocationIndex * @param regionsPerLocation regionsPerHost or regionsPerLocation * @param colocatedReplicaCountsPerLocation co...
3.68
flink_ModuleManager_listFunctions
/** * Get names of all functions from used modules. It excludes hidden functions. * * @return a set of function names of used modules */ public Set<String> listFunctions() { return usedModules.stream() .map(name -> loadedModules.get(name).listFunctions(false)) .flatMap(Collection::stream...
3.68
flink_WorksetIterationPlanNode_mergeBranchPlanMaps
/** * Merging can only take place after the solutionSetDelta and nextWorkset PlanNode has been set, * because they can contain also some of the branching nodes. */ @Override protected void mergeBranchPlanMaps( Map<OptimizerNode, PlanNode> branchPlan1, Map<OptimizerNode, PlanNode> branchPlan2) {}
3.68
shardingsphere-elasticjob_TransactionOperation_opDelete
/** * Operation delete. * * @param key key * @return TransactionOperation */ public static TransactionOperation opDelete(final String key) { return new TransactionOperation(Type.DELETE, key, null); }
3.68
flink_ManagedTableFactory_discoverManagedTableFactory
/** Discovers the unique implementation of {@link ManagedTableFactory} without identifier. */ static ManagedTableFactory discoverManagedTableFactory(ClassLoader classLoader) { return FactoryUtil.discoverManagedTableFactory(classLoader, ManagedTableFactory.class); }
3.68
hadoop_ReadBufferManager_getNextBlockToRead
/** * ReadBufferWorker thread calls this to get the next buffer that it should work on. * * @return {@link ReadBuffer} * @throws InterruptedException if thread is interrupted */ ReadBuffer getNextBlockToRead() throws InterruptedException { ReadBuffer buffer = null; synchronized (this) { //buffer = readAhea...
3.68
hbase_StoreFileInfo_getReference
/** * @return the Reference object associated to this StoreFileInfo. null if the StoreFile is not a * reference. */ public Reference getReference() { return this.reference; }
3.68
morf_Function_greatest
/** * Helper method to create an instance of the "greatest" SQL function. * * @param fields the fields to evaluate. * @return an instance of the "greatest" function. */ public static Function greatest(Iterable<? extends AliasedField> fields) { return new Function(FunctionType.GREATEST, fields); }
3.68
hadoop_HdfsFileStatus_getLocalName
/** * Get the string representation of the local name. * @return the local name in string */ default String getLocalName() { return DFSUtilClient.bytes2String(getLocalNameInBytes()); }
3.68
flink_SlidingWindowAssigner_of
/** * Creates a new {@code SlidingEventTimeWindows} {@link * org.apache.flink.streaming.api.windowing.assigners.WindowAssigner} that assigns elements to * sliding time windows based on the element timestamp. * * @param size The size of the generated windows. * @param slide The slide interval of the generated wind...
3.68
hbase_HbckRegionInfo_loadHdfsRegioninfo
/** * Read the .regioninfo file from the file system. If there is no .regioninfo, add it to the * orphan hdfs region list. */ public void loadHdfsRegioninfo(Configuration conf) throws IOException { Path regionDir = getHdfsRegionDir(); if (regionDir == null) { if (getReplicaId() == RegionInfo.DEFAULT_REPLICA_...
3.68
flink_ExceptionUtils_rethrow
/** * Throws the given {@code Throwable} in scenarios where the signatures do not allow you to * throw an arbitrary Throwable. Errors and RuntimeExceptions are thrown directly, other * exceptions are packed into a parent RuntimeException. * * @param t The throwable to be thrown. * @param parentMessage The message...
3.68
flink_FileBasedOneShotLatch_await
/** * Waits until the latch file is created. * * <p>When this method returns, subsequent invocations will not block even after the latch file * is deleted. Note that this method may not return if the latch file is deleted before this * method returns. * * @throws InterruptedException if interrupted while waiting...
3.68
hadoop_BytesWritable_getBytes
/** * Get the data backing the BytesWritable. Please use {@link #copyBytes()} * if you need the returned array to be precisely the length of the data. * @return The data is only valid between 0 and getLength() - 1. */ @Override public byte[] getBytes() { return bytes; }
3.68
pulsar_ClientConfiguration_getStatsIntervalSeconds
/** * Stats will be activated with positive statsIntervalSeconds. * * @return the interval between each stat info <i>(default: 60 seconds)</i> */ public long getStatsIntervalSeconds() { return confData.getStatsIntervalSeconds(); }
3.68
flink_Description_linebreak
/** Creates a line break in the description. */ public DescriptionBuilder linebreak() { blocks.add(LineBreakElement.linebreak()); return this; }
3.68
hbase_MetaTableAccessor_getMetaHTable
/** * Callers should call close on the returned {@link Table} instance. * @param connection connection we're using to access Meta * @return An {@link Table} for <code>hbase:meta</code> * @throws NullPointerException if {@code connection} is {@code null} */ public static Table getMetaHTable(final Connection connect...
3.68
rocketmq-connect_DatabaseDialectLoader_getDatabaseDialect
/** * Get database dialect factory * * @param config * @return */ public static DatabaseDialect getDatabaseDialect(AbstractConfig config) { String url = config.getConnectionDbUrl(); assert url != null; JdbcUrlInfo jdbcUrlInfo = extractJdbcUrlInfo(url); final List<DatabaseDialectFactory> matchingFac...
3.68
flink_SinkUtils_tryAcquire
/** * Acquire permits on the given semaphore within a given allowed timeout and deal with errors. * * @param permits the mumber of permits to acquire. * @param maxConcurrentRequests the maximum number of permits the semaphore was initialized * with. * @param maxConcurrentRequestsTimeout the timeout to acquire...
3.68
flink_KeyedStream_sum
/** * Applies an aggregation that gives the current sum of the data stream at the given field by * the given key. An independent aggregate is kept per key. * * @param field In case of a POJO, Scala case class, or Tuple type, the name of the (public) * field on which to perform the aggregation. Additionally, a ...
3.68
pulsar_AuthorizationProvider_allowTopicPolicyOperation
/** * @deprecated - will be removed after 2.12. Use async variant. */ @Deprecated default Boolean allowTopicPolicyOperation(TopicName topicName, String role, PolicyName policy, PolicyOperation...
3.68
framework_VComboBox_updateSuggestionPopupMinWidth
/** * Update minimum width for combo box textarea based on input prompt and * suggestions. * <p> * For internal use only. May be removed or replaced in the future. */ public void updateSuggestionPopupMinWidth() { debug("VComboBox: updateSuggestionPopupMinWidth()"); // used only to calculate minimum width ...
3.68
graphhopper_GraphHopperWeb_setOptimize
/** * @param optimize "false" if the order of the locations should be left * unchanged, this is the default. Or if "true" then the order of the * location is optimized according to the overall best route and returned * this way i.e. the traveling salesman problem is s...
3.68
flink_DefaultCheckpointPlanCalculator_calculateAfterTasksFinished
/** * Calculates the checkpoint plan after some tasks have finished. We iterate the job graph to * find the task that is still running, but do not has precedent running tasks. * * @return The plan of this checkpoint. */ private CheckpointPlan calculateAfterTasksFinished() { // First collect the task running st...
3.68
hadoop_FederationUtil_newActiveNamenodeResolver
/** * Creates an instance of an ActiveNamenodeResolver from the configuration. * * @param conf Configuration that defines the namenode resolver class. * @param stateStore State store passed to class constructor. * @return New active namenode resolver. */ public static ActiveNamenodeResolver newActiveNamenodeResol...
3.68
pulsar_OneStageAuthenticationState_isComplete
/** * @deprecated rely on result from {@link #authenticateAsync(AuthData)}. For more information, see the Javadoc * for {@link AuthenticationState#isComplete()}. */ @Deprecated(since = "3.0.0") @Override public boolean isComplete() { return authRole != null; }
3.68
hadoop_AbstractDTService_getOwner
/** * Get the owner of this Service. * @return owner; non-null after binding to an FS. */ public UserGroupInformation getOwner() { return owner; }
3.68
hadoop_QuotaUsage_getSpaceConsumed
/** * Return (disk) space consumed. * * @return space consumed. */ public long getSpaceConsumed() { return spaceConsumed; }
3.68
hbase_KeyValue_equals
/** * Needed doing 'contains' on List. Only compares the key portion, not the value. */ @Override public boolean equals(Object other) { if (!(other instanceof Cell)) { return false; } return CellUtil.equals(this, (Cell) other); }
3.68
framework_VScrollTable_getColKey
/** * Returns the column key of the column. * * @return The column key */ public String getColKey() { return cid; }
3.68
framework_ErrorIndicator_getTicketNumber
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber() */ @Override protected Integer getTicketNumber() { return 10046; }
3.68
hbase_RequestConverter_buildNoDataRegionActions
/** * Create a protocol buffer multirequest with NO data for a list of actions (data is carried * otherwise than via protobuf). This means it just notes attributes, whether to write the WAL, * etc., and the presence in protobuf serves as place holder for the data which is coming along * otherwise. Note that Get is ...
3.68
framework_VTree_onKeyPress
/* * (non-Javadoc) * * @see * com.google.gwt.event.dom.client.KeyPressHandler#onKeyPress(com.google * .gwt.event.dom.client.KeyPressEvent) */ @Override public void onKeyPress(KeyPressEvent event) { NativeEvent nativeEvent = event.getNativeEvent(); int keyCode = nativeEvent.getKeyCode(); if (keyCode ==...
3.68
hbase_IdReadWriteLockWithObjectPool_getLock
/** * Get the ReentrantReadWriteLock corresponding to the given id * @param id an arbitrary number to identify the lock */ @Override public ReentrantReadWriteLock getLock(T id) { lockPool.purge(); ReentrantReadWriteLock readWriteLock = lockPool.get(id); return readWriteLock; }
3.68
dubbo_AbstractConfigManager_isRequired
/** * The configuration that does not affect the main process is not necessary. * * @param clazz * @param <T> * @return */ protected <T extends AbstractConfig> boolean isRequired(Class<T> clazz) { if (clazz == RegistryConfig.class || clazz == MetadataReportConfig.class || clazz == Moni...
3.68
cron-utils_StringUtils_isNumeric
/** * <p> * Checks if the CharSequence contains only Unicode digits. A decimal point is * not a Unicode digit and returns false. * </p> * * <p> * {@code null} will return {@code false}. An empty CharSequence (length()=0) * will return {@code false}. * </p> * * <p> * Note that the method does not allow for a...
3.68
framework_CustomField_getContent
/** * Returns the content (UI) of the custom component. * * @return Component */ protected Component getContent() { if (null == root) { root = initContent(); root.setParent(this); } return root; }
3.68
hadoop_FlowRunRowKey_encode
/* * (non-Javadoc) * * Encodes FlowRunRowKey object into a byte array with each component/field * in FlowRunRowKey separated by Separator#QUALIFIERS. This leads to an flow * run row key of the form clusterId!userId!flowName!flowrunId If flowRunId * in passed FlowRunRowKey object is null (and the fields preceding ...
3.68
framework_VaadinSession_access
/** * Provides exclusive access to this session from outside a request handling * thread. * <p> * The given runnable is executed while holding the session lock to ensure * exclusive access to this session. If this session is not locked, the lock * will be acquired and the runnable is run right away. If this sessi...
3.68
framework_Range_combineWith
/** * Combines two ranges to create a range containing all values in both * ranges, provided there are no gaps between the ranges. * * @param other * the range to combine with this range * * @return the combined range * * @throws IllegalArgumentException * if the two ranges aren't conne...
3.68
hudi_StringUtils_split
/** * Splits input string, delimited {@code delimiter} into a list of non-empty strings * (skipping any empty string produced during splitting) */ public static List<String> split(@Nullable String input, String delimiter) { if (isNullOrEmpty(input)) { return Collections.emptyList(); } return Stream.of(inpu...
3.68
hbase_RSMobFileCleanerChore_archiveMobFiles
/** * Archives the mob files. * @param conf The current configuration. * @param tableName The table name. * @param family The name of the column family. * @param storeFiles The files to be archived. * @throws IOException exception */ public void archiveMobFiles(Configuration conf, TableName tableName,...
3.68
framework_DefaultFieldGroupFieldFactory_createDefaultField
/** * Fallback when no specific field has been created. Typically returns a * TextField. * * @param <T> * The type of field to create * @param type * The type of data that should be edited * @param fieldType * The type of field to create * @return A field capable of editing th...
3.68
framework_VFilterSelect_setNextButtonActive
/** * Should the next page button be visible to the user? * * @param active */ private void setNextButtonActive(boolean active) { if (enableDebug) { debug("VFS.SP: setNextButtonActive(" + active + ")"); } if (active) { DOM.sinkEvents(down, Event.ONCLICK); down.setClassName( ...
3.68
flink_FutureCompletingBlockingQueue_remainingCapacity
/** * Checks the remaining capacity in the queue. That is the difference between the maximum * capacity and the current number of elements in the queue. */ public int remainingCapacity() { lock.lock(); try { return capacity - queue.size(); } finally { lock.unlock(); } }
3.68
hadoop_HdfsFileStatus_blocksize
/** * Set the blocksize of this entity (default = 0). * @param blocksize Target, default blocksize * @return This Builder instance */ public Builder blocksize(long blocksize) { this.blocksize = blocksize; return this; }
3.68
flink_MurmurHashUtils_hashUnsafeBytesByWords
/** * Hash unsafe bytes, length must be aligned to 4 bytes. * * @param base base unsafe object * @param offset offset for unsafe object * @param lengthInBytes length in bytes * @return hash code */ public static int hashUnsafeBytesByWords(Object base, long offset, int lengthInBytes) { return hashUnsafeBytesB...
3.68
hbase_DoubleArrayCost_getMaxSkew
/** * Return the max deviation of distribution Compute max as if all region servers had 0 and one had * the sum of all costs. This must be a zero sum cost for this to make sense. */ public static double getMaxSkew(double total, double numServers) { if (numServers == 0) { return 0; } double mean = total / n...
3.68
pulsar_ProducerConfiguration_addEncryptionKey
/** * Add public encryption key, used by producer to encrypt the data key. * * At the time of producer creation, Pulsar client checks if there are keys added to encryptionKeys. If keys are * found, a callback getKey(String keyName) is invoked against each key to load the values of the key. Application * should imp...
3.68
framework_Upload_setAcceptMimeTypes
/** * Sets the component's list of accepted content-types. According to RFC * 1867, if the attribute is present, the browser might constrain the file * patterns prompted for to match those with the corresponding appropriate * file extensions for the platform. Good examples are: {@code image/*} or * {@code image/pn...
3.68
pulsar_ProducerBuilderImpl_schema
/** * Allow to override schema in builder implementation. * @return */ public ProducerBuilder<T> schema(Schema<T> schema) { this.schema = schema; return this; }
3.68
rocketmq-connect_AvroData_fixedValueSizeMatch
/** * Returns true if the fixed value size of the value matches the expected size */ private static boolean fixedValueSizeMatch(Schema fieldSchema, Object value, int size, boolean enhancedS...
3.68
hudi_AvroSchemaUtils_getAvroRecordQualifiedName
/** * Generates fully-qualified name for the Avro's schema based on the Table's name * * NOTE: PLEASE READ CAREFULLY BEFORE CHANGING * This method should not change for compatibility reasons as older versions * of Avro might be comparing fully-qualified names rather than just the record * names ...
3.68
hbase_QuotaObserverChore_updateNamespaceQuota
/** * Updates the hbase:quota table with the target quota policy for this <code>namespace</code> if * necessary. * @param namespace The namespace being checked * @param currentSnapshot The state of the quota on this namespace from the previous invocation * @param targetSnapshot The state the quota sho...
3.68
framework_VCheckBox_getLabelElement
/** * Gives access to the label element. * * @return Element of the Label itself * @since 8.7 */ public Element getLabelElement() { // public to allow CheckBoxState to access it. // FIXME: Would love to use a better way to access the label element return getInputElement().getNextSiblingElement(); }
3.68
AreaShop_FriendsFeature_getFriendNames
/** * Get the list of friends added to this region. * @return Friends added to this region */ public Set<String> getFriendNames() { HashSet<String> result = new HashSet<>(); for(UUID friend : getFriends()) { OfflinePlayer player = Bukkit.getOfflinePlayer(friend); if(player != null && player.getName() != null) ...
3.68
hadoop_S3LogParser_eNoTrailing
/** * An entry in the regexp. * @param name name of the group * @param pattern pattern to use in the regexp * @return the pattern for the regexp */ private static String eNoTrailing(String name, String pattern) { return String.format("(?<%s>%s)", name, pattern); }
3.68
hudi_WriteMetadataEvent_emptyBootstrap
/** * Creates empty bootstrap event for task {@code taskId}. * * <p>The event indicates that the new instant can start directly, * there is no old instant write statuses to recover. */ public static WriteMetadataEvent emptyBootstrap(int taskId) { return WriteMetadataEvent.builder() .taskID(taskId) .i...
3.68
flink_ResultPartitionMetrics_refreshAndGetMin
/** * Iterates over all sub-partitions and collects the minimum number of queued buffers in a * sub-partition in a best-effort way. * * @return minimum number of queued buffers per sub-partition (<tt>0</tt> if sub-partitions * exist) */ int refreshAndGetMin() { int min = Integer.MAX_VALUE; int numSubp...
3.68
flink_FileLock_inTempFolder
/** * Initialize a FileLock using a file located inside temp folder. * * @param fileName The name of the locking file * @return The initialized FileLock */ public static FileLock inTempFolder(String fileName) { return new FileLock(TEMP_DIR, fileName); }
3.68
AreaShop_AreaShop_setChatprefix
/** * Set the chatprefix to use in the chat (loaded from config normally). * @param chatprefix The string to use in front of chat messages (supports formatting codes) */ public void setChatprefix(List<String> chatprefix) { this.chatprefix = chatprefix; }
3.68
hadoop_RouterFedBalance_setDiffThreshold
/** * Specify the threshold of diff entries. * @param value the threshold of a fast distcp. */ public Builder setDiffThreshold(int value) { this.diffThreshold = value; return this; }
3.68
flink_StreamTask_finalize
/** * The finalize method shuts down the timer. This is a fail-safe shutdown, in case the original * shutdown method was never called. * * <p>This should not be relied upon! It will cause shutdown to happen much later than if manual * shutdown is attempted, and cause threads to linger for longer than needed. */ @...
3.68
hbase_Chunk_init
/** * Actually claim the memory for this chunk. This should only be called from the thread that * constructed the chunk. It is thread-safe against other threads calling alloc(), who will block * until the allocation is complete. */ public void init() { assert nextFreeOffset.get() == UNINITIALIZED; try { all...
3.68
framework_Slider_setUpdateValueOnClick
/** * Sets the slider to update its value when the user clicks on it. By * default, the slider value is updated by dragging the slider's handle or * clicking arrows. * * @param updateValueOnClick * {@code true} to update the value of the slider on click, * {@code false} otherwise. * @since...
3.68
hbase_MasterObserver_preGetUserPermissions
/** * Called before getting user permissions. * @param ctx the coprocessor instance's environment * @param userName the user name, null if get all user permissions * @param namespace the namespace, null if don't get namespace permission * @param tableName the table name, null if don't get table permission ...
3.68
hbase_Procedure_incChildrenLatch
/** * Called by the ProcedureExecutor on procedure-load to restore the latch state */ protected synchronized void incChildrenLatch() { // TODO: can this be inferred from the stack? I think so... this.childrenLatch++; if (LOG.isTraceEnabled()) { LOG.trace("CHILD LATCH INCREMENT " + this.childrenLatch, new Th...
3.68
framework_AbstractOrderedLayout_replaceComponent
/* Documented in superclass */ @Override public void replaceComponent(Component oldComponent, Component newComponent) { // Gets the locations int oldLocation = -1; int newLocation = -1; int location = 0; for (final Component component : components) { if (component == oldComponent) {...
3.68
hmily_PropertyKeySource_getSource
/** * Return original data. * * @return source */ public T getSource() { return source; }
3.68
hadoop_IOStatisticsLogging_ioStatisticsSourceToString
/** * Extract the statistics from a source object -or "" * if it is not an instance of {@link IOStatistics}, * {@link IOStatisticsSource} or the retrieved * statistics are null. * <p> * Exceptions are caught and downgraded to debug logging. * @param source source of statistics. * @return a string for logging. ...
3.68
pulsar_PulsarFieldValueProviders_timeValueProvider
/** * FieldValueProvider for Time (Data, Timestamp etc.) with indicate Null instead of longValueProvider. */ public static FieldValueProvider timeValueProvider(long millis, boolean isNull) { return new FieldValueProvider() { @Override public long getLong() { return millis * Timestamps....
3.68
framework_DateCellDayEvent_calculateDateCellOffsetPx
/** * @param dateOffset * @return the amount of pixels the given date is from the left side */ private int calculateDateCellOffsetPx(int dateOffset) { int dateCellOffset = 0; int[] dateWidths = weekGrid.getDateCellWidths(); if (dateWidths != null) { for (int i = 0; i < dateOffset; i++) { ...
3.68
hudi_HoodieSparkQuickstart_runQuickstart
/** * Visible for testing */ public static void runQuickstart(JavaSparkContext jsc, SparkSession spark, String tableName, String tablePath) { final HoodieExampleDataGenerator<HoodieAvroPayload> dataGen = new HoodieExampleDataGenerator<>(); String snapshotQuery = "SELECT begin_lat, begin_lon, driver, end_lat, end...
3.68
streampipes_StreamRequirementsBuilder_requiredPropertyWithNaryMapping
/** * Sets a new property requirement and, in addition, adds a * {@link org.apache.streampipes.model.staticproperty.MappingPropertyNary} static property to the pipeline element * definition. * * @param propertyRequirement The property requirement. * Use {@link org.apache.streampipes.sdk...
3.68
flink_SingleInputPlanNode_setDriverKeyInfo
/** * Sets the key field information for the specified driver comparator. * * @param keys The key field indexes for the specified driver comparator. * @param sortOrder The key sort order for the specified driver comparator. * @param id The ID of the driver comparator. */ public void setDriverKeyInfo(FieldList key...
3.68
hudi_HoodieTableMetadata_getDataTableBasePathFromMetadataTable
/** * Returns the base path of the Dataset provided the base-path of the Metadata Table of this * Dataset */ static String getDataTableBasePathFromMetadataTable(String metadataTableBasePath) { checkArgument(isMetadataTable(metadataTableBasePath)); return metadataTableBasePath.substring(0, metadataTableBasePath.l...
3.68
hbase_CompositeImmutableSegment_incMemStoreSize
/** * Updates the heap size counter of the segment by the given delta */ @Override public long incMemStoreSize(long delta, long heapOverhead, long offHeapOverhead, int cellsCount) { throw new IllegalStateException("Not supported by CompositeImmutableScanner"); }
3.68
shardingsphere-elasticjob_ZookeeperElectionService_stop
/** * Stop election. */ public void stop() { log.info("Elastic job: stop leadership election"); leaderLatch.countDown(); try { leaderSelector.close(); // CHECKSTYLE:OFF } catch (final Exception ignore) { } // CHECKSTYLE:ON }
3.68
pulsar_PulsarAdminImpl_functions
/** * * @return the functions management object */ public Functions functions() { return functions; }
3.68
zxing_AbstractRSSReader_count
/** * @param array values to sum * @return sum of values * @deprecated call {@link MathUtils#sum(int[])} */ @Deprecated protected static int count(int[] array) { return MathUtils.sum(array); }
3.68
rocketmq-connect_WorkerDirectTask_resume
/** * Resume consumption of messages from previously paused Partition. * * @param partitions the partition list to be resume. */ @Override public void resume(List<RecordPartition> partitions) { // no-op }
3.68
pulsar_OffloadersCache_getOrLoadOffloaders
/** * Method to load an Offloaders directory or to get an already loaded Offloaders directory. * * @param offloadersPath - the directory to search the offloaders nar files * @param narExtractionDirectory - the directory to use for extraction * @return the loaded offloaders class * @throws IOException when fail to...
3.68
hbase_Bytes_searchDelimiterIndex
/** * Find index of passed delimiter. * @return Index of delimiter having started from start of <code>b</code> moving rightward. */ public static int searchDelimiterIndex(final byte[] b, int offset, final int length, final int delimiter) { if (b == null) { throw new IllegalArgumentException("Passed buffer is...
3.68
rocketmq-connect_PluginUtils_shouldLoadInIsolation
/** * Return whether the class with the given name should be loaded in isolation using a plugin * classloader. * * @param name the fully qualified name of the class. * @return true if this class should be loaded in isolation, false otherwise. */ public static boolean shouldLoadInIsolation(String name) { retur...
3.68
hmily_CuratorZookeeperClient_pull
/** * Pull input stream. * * @param path the path * @return the input stream */ public InputStream pull(final String path) { String content = get(path); if (LOGGER.isDebugEnabled()) { LOGGER.debug("zookeeper content {}", content); } if (StringUtils.isBlank(content)) { return null; ...
3.68
flink_PythonOperatorChainingOptimizer_of
/** No chaining happens. */ public static ChainInfo of(Transformation<?> newTransformation) { return new ChainInfo(newTransformation, Collections.emptyList()); }
3.68
hadoop_TimelineEntity_setEntityId
/** * Set the entity Id * * @param entityId * the entity Id */ public void setEntityId(String entityId) { this.entityId = entityId; }
3.68
hbase_SnapshotQuotaObserverChore_persistSnapshotSizesForNamespaces
/** * Writes the size used by snapshots for each namespace to the quota table. */ void persistSnapshotSizesForNamespaces(Map<String, Long> snapshotSizesByNamespace) throws IOException { try (Table quotaTable = conn.getTable(QuotaUtil.QUOTA_TABLE_NAME)) { quotaTable.put(snapshotSizesByNamespace.entrySet().stre...
3.68
zxing_CaptureActivity_handleDecode
/** * A valid barcode has been found, so give an indication of success and show the results. * * @param rawResult The contents of the barcode. * @param scaleFactor amount by which thumbnail was scaled * @param barcode A greyscale bitmap of the camera data which was decoded. */ public void handleDecode(Result ra...
3.68
flink_AfterMatchSkipStrategy_skipToFirst
/** * Discards every partial match that started before the first event of emitted match mapped to * *PatternName*. * * @param patternName the pattern name to skip to * @return the created AfterMatchSkipStrategy */ public static SkipToFirstStrategy skipToFirst(String patternName) { return new SkipToFirstStrate...
3.68
morf_AbstractSqlDialectTest_provideDatabaseType
/** * This method can be overridden in specific dialects to test DialectSpecificHint in each dialect * @return a mock database type identifier value or an overridden, dialect specific, database type identfier */ protected String provideDatabaseType() { return "SOME_DATABASE_IDENTIFIER"; }
3.68
framework_VMenuBar_itemOver
/** * When the user hovers the mouse over the item. * * @param item */ public void itemOver(CustomMenuItem item) { if ((openRootOnHover || subMenu || menuVisible) && !item.isSeparator()) { setSelected(item); if (!subMenu && openRootOnHover && !menuVisible) { menuVisible =...
3.68
hadoop_AbstractReservationSystem_getPlanFollowerTimeStep
/** * @return the planStepSize */ @Override public long getPlanFollowerTimeStep() { readLock.lock(); try { return planStepSize; } finally { readLock.unlock(); } }
3.68
hadoop_AzureBlobFileSystemStore_populateAbfsClientContext
/** * Populate a new AbfsClientContext instance with the desired properties. * * @return an instance of AbfsClientContext. */ private AbfsClientContext populateAbfsClientContext() { return new AbfsClientContextBuilder() .withExponentialRetryPolicy( new ExponentialRetryPolicy(abfsConfiguration)) ...
3.68
framework_ExtremelyLongPushTime_setup
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. * VaadinRequest) */ @Override protected void setup(VaadinRequest request) { super.setup(request); duration.setConvertedValue(DURATION_MS); interval.setConvertedValue(INTERVAL_MS); dataSize.setConvertedVa...
3.68