name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
cron-utils_StringUtils_containsAny
/** * <p>Checks if the CharSequence contains any character in the given. * set of characters.</p> * * <p>A {@code null} CharSequence will return {@code false}. * A {@code null} or zero length search array will return {@code false}.</p> * * <pre> * StringUtils.containsAny(null, *) = false * Strin...
3.68
framework_CustomizedSystemMessages_setInternalErrorMessage
/** * Sets the message of the notification. Set to null for no message. If both * caption and message is null, the notification is disabled; * * @param internalErrorMessage * the message */ public void setInternalErrorMessage(String internalErrorMessage) { this.internalErrorMessage = internalErrorM...
3.68
flink_Tuple19_setFields
/** * Sets new values to all fields of the tuple. * * @param f0 The value for field 0 * @param f1 The value for field 1 * @param f2 The value for field 2 * @param f3 The value for field 3 * @param f4 The value for field 4 * @param f5 The value for field 5 * @param f6 The value for field 6 * @param f7 The valu...
3.68
flink_CastRuleProvider_exists
/** * Returns {@code true} if and only if a {@link CastRule} can be resolved for the provided input * type and target type. */ public static boolean exists(LogicalType inputType, LogicalType targetType) { return resolve(inputType, targetType) != null; }
3.68
flink_ConfigOptions_floatType
/** Defines that the value of the option should be of {@link Float} type. */ public TypedConfigOptionBuilder<Float> floatType() { return new TypedConfigOptionBuilder<>(key, Float.class); }
3.68
hbase_MiniBatchOperationInProgress_getWalEdit
/** Returns Gets the walEdit for the operation(Mutation) at the specified position. */ public WALEdit getWalEdit(int index) { return this.walEditsFromCoprocessors[getAbsoluteIndex(index)]; }
3.68
framework_GridMultiSelect_isAllSelected
/** * Returns whether all items are selected or not. * <p> * This is only {@code true} if user has selected all rows with the select * all checkbox on client side, or if {@link #selectAll()} has been used * from server side. * * @return {@code true} if all selected, {@code false} if not * @since 8.12.0 */ publ...
3.68
hadoop_ExportedBlockKeys_write
/** */ @Override public void write(DataOutput out) throws IOException { out.writeBoolean(isBlockTokenEnabled); out.writeLong(keyUpdateInterval); out.writeLong(tokenLifetime); currentKey.write(out); out.writeInt(allKeys.length); for (int i = 0; i < allKeys.length; i++) { allKeys[i].write(out); } }
3.68
flink_StateDescriptor_getSerializer
/** * Returns the {@link TypeSerializer} that can be used to serialize the value in the state. Note * that the serializer may initialized lazily and is only guaranteed to exist after calling * {@link #initializeSerializerUnlessSet(ExecutionConfig)}. */ public TypeSerializer<T> getSerializer() { TypeSerializer<T...
3.68
flink_TSetClientInfoResp_findByName
/** Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(java.lang.String name) { return byName.get(name); }
3.68
hbase_SortedCompactionPolicy_getNextMajorCompactTime
/** Returns When to run next major compaction */ public long getNextMajorCompactTime(Collection<HStoreFile> filesToCompact) { /** Default to {@link org.apache.hadoop.hbase.HConstants#DEFAULT_MAJOR_COMPACTION_PERIOD}. */ long period = comConf.getMajorCompactionPeriod(); if (period <= 0) { return period; } ...
3.68
flink_ResourceID_generate
/** * Generate a random resource id. * * @return A random resource id. */ public static ResourceID generate() { return new ResourceID(new AbstractID().toString()); }
3.68
framework_VCalendar_getBackwardListener
/** * Set the listener which listens to backward events from the calendar. * * @return */ public BackwardListener getBackwardListener() { return backwardListener; }
3.68
hudi_BaseFileUtils_readBloomFilterFromMetadata
/** * Read the bloom filter from the metadata of the given data file. * @param configuration Configuration * @param filePath The data file path * @return a BloomFilter object */ public BloomFilter readBloomFilterFromMetadata(Configuration configuration, Path filePath) { Map<String, String> footerVals = rea...
3.68
hadoop_Find_registerCommands
/** * Register the names for the count command * * @param factory the command factory that will instantiate this class */ public static void registerCommands(CommandFactory factory) { factory.addClass(Find.class, "-find"); }
3.68
framework_Table_addFooterClickListener
/** * Adds a footer click listener which handles the click events when the user * clicks on a column footer cell in the Table. * <p> * The listener will receive events which contain information about which * column was clicked and some details about the mouse event. * </p> * * @param listener * The ...
3.68
hbase_VisibilityController_checkForReservedVisibilityTagPresence
/** * Checks whether cell contains any tag with type as VISIBILITY_TAG_TYPE. This tag type is * reserved and should not be explicitly set by user. * @param cell The cell under consideration * @param pair An optional pair of type {@code <Boolean, Tag>} which would be reused if already * set and new one ...
3.68
hadoop_ResourceEstimatorServer_shutdown
/** * Stop embedded Hadoop HTTP server. * * @throws Exception in case the HTTP server fails to shut down. */ public void shutdown() throws Exception { LOGGER.info("Stopping resourceestimator service at: {}.", baseURI.toString()); webServer.stop(); }
3.68
flink_PekkoInvocationHandler_ask
/** * Sends the message to the RPC endpoint and returns a future containing its response. * * @param message to send to the RPC endpoint * @param timeout time to wait until the response future is failed with a {@link * TimeoutException} * @return Response future */ protected CompletableFuture<?> ask(Object m...
3.68
hadoop_AclFeature_getEntryAt
/** * Get the entry at the specified position * @param pos Position of the entry to be obtained * @return integer representation of AclEntry * @throws IndexOutOfBoundsException if pos out of bound */ int getEntryAt(int pos) { if (pos < 0 || pos > entries.length) { throw new IndexOutOfBoundsException("Invalid...
3.68
hadoop_RolePolicies_bucketToArn
/** * From an S3 bucket name, build an ARN to refer to it. * @param bucket bucket name. * @return return the ARN to use in statements. */ public static String bucketToArn(String bucket) { return String.format("arn:aws:s3:::%s", bucket); }
3.68
hbase_HStoreFile_isReferencedInReads
/** Returns true if the file is still used in reads */ public boolean isReferencedInReads() { int rc = fileInfo.getRefCount(); assert rc >= 0; // we should not go negative. return rc > 0; }
3.68
framework_UIDL_getStringVariable
/** * Gets the value of the named variable. * * @param name * the name of the variable * @return the value of the variable */ public String getStringVariable(String name) { return var().getString(name); }
3.68
flink_TemporaryClassLoaderContext_of
/** * Sets the context class loader to the given ClassLoader and returns a resource that sets it * back to the current context ClassLoader when the resource is closed. * * <pre>{@code * try (TemporaryClassLoaderContext ignored = TemporaryClassLoaderContext.of(classloader)) { * // code that needs the context c...
3.68
hadoop_StringValueMin_getCombinerOutput
/** * @return return an array of one element. The element is a string * representation of the aggregated value. The return value is * expected to be used by the a combiner. */ public ArrayList<String> getCombinerOutput() { ArrayList<String> retv = new ArrayList<String>(1); retv.add(minVal); re...
3.68
zxing_PDF417HighLevelEncoder_determineConsecutiveDigitCount
/** * Determines the number of consecutive characters that are encodable using numeric compaction. * * @param input the input * @param startpos the start position within the input * @return the requested character count */ private static int determineConsecutiveDigitCount(ECIInput input, int startpos) { in...
3.68
hudi_RocksDBDAO_init
/** * Initialized Rocks DB instance. */ private void init() { try { LOG.info("DELETING RocksDB persisted at " + rocksDBBasePath); FileIOUtils.deleteDirectory(new File(rocksDBBasePath)); managedHandlesMap = new ConcurrentHashMap<>(); managedDescriptorMap = new ConcurrentHashMap<>(); // If alrea...
3.68
hadoop_UserDefinedValueAggregatorDescriptor_generateKeyValPairs
/** * Generate a list of aggregation-id/value pairs for the given * key/value pairs by delegating the invocation to the real object. * * @param key * input key * @param val * input value * @return a list of aggregation id/value pairs. An aggregation id encodes an * aggregation...
3.68
framework_Button_setHtmlContentAllowed
/** * Set whether the caption text is rendered as HTML or not. You might need * to re-theme button to allow higher content than the original text style. * * If set to true, the captions are passed to the browser as html and the * developer is responsible for ensuring no harmful html is used. If set to * false, th...
3.68
hmily_ConsulPassiveConfig_fileName
/** * File name string. * * @return the string */ public String fileName() { return key + "." + fileExtension; }
3.68
framework_StreamResource_getStreamSource
/** * Returns the source for this <code>StreamResource</code>. StreamSource is * queried when the resource is about to be streamed to the client. * * @return Source of the StreamResource. */ public StreamSource getStreamSource() { return streamSource; }
3.68
hbase_HFileLink_getReferencedHFileName
/** * Get the HFile name of the referenced link * @param fileName HFileLink file name * @return the name of the referenced HFile */ public static String getReferencedHFileName(final String fileName) { Matcher m = REF_OR_HFILE_LINK_PATTERN.matcher(fileName); if (!m.matches()) { throw new IllegalArgumentExcep...
3.68
flink_ExecutionConfig_configure
/** * Sets all relevant options contained in the {@link ReadableConfig} such as e.g. {@link * PipelineOptions#CLOSURE_CLEANER_LEVEL}. * * <p>It will change the value of a setting only if a corresponding option was set in the {@code * configuration}. If a key is not present, the current value of a field will remain...
3.68
flink_ExternalizedSnapshotLocation_validatePath
/** * Checks the validity of the path's scheme and path. * * @param path The path to check. * @return The URI as a Path. * @throws IllegalArgumentException Thrown, if the URI misses scheme or path. */ private static Path validatePath(Path path) { if (path == null) { return null; } Optional.of...
3.68
framework_ConnectorTracker_addStreamVariable
/** * Adds a StreamVariable of the given name to the indicated connector. * * @param connectorId * @param variableName * @param variable */ public void addStreamVariable(String connectorId, String variableName, StreamVariable variable) { assert getConnector(connectorId) != null; if (pidToNameToStr...
3.68
rocketmq-connect_ExpressionBuilder_appendStringQuoted
/** * Append to this builder's expression a string surrounded by single quote characters ({@code '}). * Use {@link #appendIdentifier(String, QuoteMethod)} for identifiers, * {@link #appendColumnName(String, QuoteMethod)} for column names, or * {@link #appendTableName(String, QuoteMethod)} for table names. * * @pa...
3.68
framework_ComboBoxElement_getPopupSuggestionElements
/** * Gets the elements of all suggestions on the current page. * <p> * Opens the popup if not already open. * * @return a list of elements for the suggestions on the current page */ public List<WebElement> getPopupSuggestionElements() { List<WebElement> tables = getSuggestionPopup() .findElements...
3.68
hbase_BucketEntry_release
/** * We've three cases to release refCnt now: <br> * 1. BucketCache#evictBlock, it will release the backingMap's reference by force because we're * closing file or clear the bucket cache or some corruption happen. when all rpc references gone, * then free the area in bucketAllocator. <br> * 2. BucketCache#returnB...
3.68
hbase_Strings_appendKeyValue
/** * Append to a StringBuilder a key/value. Uses default separators. * @param sb StringBuilder to use * @param key Key to append. * @param value Value to append. * @param separator Value to use between key and value. * @param keyValueSeparator Value to use between...
3.68
hudi_GenericRecordFullPayloadGenerator_convertPartial
/** * Create a new {@link GenericRecord} with random values. Not all the fields have value, it is random, and its value is random too. * * @param schema Schema to create with. * @return A {@link GenericRecord} with random value. */ protected GenericRecord convertPartial(Schema schema) { GenericRecord result = ne...
3.68
flink_ResourceGuard_releaseResource
/** * Releases access for one client of the guarded resource. This method must only be called after * a matching call to {@link #acquireResource()}. */ private void releaseResource() { synchronized (lock) { --leaseCount; if (closed && leaseCount == 0) { lock.notifyAll(); } ...
3.68
hbase_RegionStates_hasTableRegionStates
// ============================================================================================ // TODO: helpers // ============================================================================================ public boolean hasTableRegionStates(final TableName tableName) { // TODO return !getTableRegionStates(table...
3.68
dubbo_ApplicationModel_getServiceRepository
/** * @deprecated Replace to {@link ApplicationModel#getApplicationServiceRepository()} */ @Deprecated public static ServiceRepository getServiceRepository() { return defaultModel().getApplicationServiceRepository(); }
3.68
hadoop_RegistryTypeUtils_getAddressField
/** * Get a specific field from an address -raising an exception if * the field is not present * @param address address to query * @param field field to resolve * @return the resolved value. Guaranteed to be non-null. * @throws InvalidRecordException if the field did not resolve */ public static String getAddres...
3.68
flink_AsyncSinkBaseBuilder_setMaxRecordSizeInBytes
/** * @param maxRecordSizeInBytes the maximum size of each records in bytes. If a record larger * than this is passed to the sink, it will throw an {@code IllegalArgumentException}. * @return {@link ConcreteBuilderT} itself */ public ConcreteBuilderT setMaxRecordSizeInBytes(long maxRecordSizeInBytes) { this...
3.68
hadoop_RolloverSignerSecretProvider_startScheduler
/** * Starts the scheduler for the rollover to run at an interval. * @param initialDelay The initial delay in the rollover in milliseconds * @param period The interval for the rollover in milliseconds */ protected synchronized void startScheduler(long initialDelay, long period) { if (!schedulerRunning) { sche...
3.68
flink_TemporalRowTimeJoinOperator_cleanupState
/** * The method to be called when a cleanup timer fires. * * @param time The timestamp of the fired timer. */ @Override public void cleanupState(long time) { leftState.clear(); rightState.clear(); nextLeftIndex.clear(); registeredTimer.clear(); }
3.68
flink_KryoUtils_applyRegistrations
/** * Apply a list of {@link KryoRegistration} to a Kryo instance. The list of registrations is * assumed to already be a final resolution of all possible registration overwrites. * * <p>The registrations are applied in the given order and always specify the registration id, * using the given {@code firstRegistrat...
3.68
flink_JobExecutionResult_getNetRuntime
/** * Gets the net execution time of the job, i.e., the execution time in the parallel system, * without the pre-flight steps like the optimizer in a desired time unit. * * @param desiredUnit the unit of the <tt>NetRuntime</tt> * @return The net execution time in the desired unit. */ public long getNetRuntime(Tim...
3.68
flink_MessageSerializer_serializeServerFailure
/** * Serializes the failure message sent to the {@link * org.apache.flink.queryablestate.network.Client} in case of server related errors. * * @param alloc The {@link ByteBufAllocator} used to allocate the buffer to serialize the * message into. * @param cause The exception thrown at the server. * @return T...
3.68
streampipes_OpcUaUtil_getSchema
/*** * OPC UA specific implementation of * @param extractor * @return guess schema * @throws AdapterException * @throws ParseException */ public static GuessSchema getSchema(IAdapterParameterExtractor extractor) throws AdapterException, ParseException { var builder = GuessSchemaBuilder.create(); EventSche...
3.68
morf_ConnectionResourcesBean_setFetchSizeForBulkSelectsAllowingConnectionUseDuringStreaming
/** * @see org.alfasoftware.morf.jdbc.AbstractConnectionResources#setFetchSizeForBulkSelectsAllowingConnectionUseDuringStreaming(Integer) */ @Override public void setFetchSizeForBulkSelectsAllowingConnectionUseDuringStreaming(Integer fetchSizeForBulkSelectsAllowingConnectionUseDuringStreaming) { this.fetchSizeForBu...
3.68
flink_Types_TUPLE
/** * Returns type information for typed subclasses of Flink's {@link * org.apache.flink.api.java.tuple.Tuple}. Typed subclassed are classes that extend {@link * org.apache.flink.api.java.tuple.Tuple0} till {@link org.apache.flink.api.java.tuple.Tuple25} * to provide types for all fields and might add additional ge...
3.68
hbase_MetricsSource_getSizeOfLogQueue
/** * Get the sizeOfLogQueue */ public int getSizeOfLogQueue() { return singleSourceSource.getSizeOfLogQueue(); }
3.68
dubbo_Bytes_copyOf
/** * byte array copy. * * @param src src. * @param length new length. * @return new byte array. */ public static byte[] copyOf(byte[] src, int length) { byte[] dest = new byte[length]; System.arraycopy(src, 0, dest, 0, Math.min(src.length, length)); return dest; }
3.68
hadoop_MultipartUploaderBuilderImpl_replication
/** * Set replication factor. */ @Override public B replication(short replica) { replication = replica; return getThisBuilder(); }
3.68
morf_AddTableFrom_getSelectStatement
/** * @return the {@link SelectStatement} to be used. */ public SelectStatement getSelectStatement() { return selectStatement; }
3.68
pulsar_TransactionMetadataStoreProvider_newProvider
/** * Construct a provider from the provided class. * * @param providerClassName the provider class name. * @return an instance of transaction metadata store provider. */ static TransactionMetadataStoreProvider newProvider(String providerClassName) throws IOException { Class<?> providerClass; try { ...
3.68
hadoop_StoreContext_getAuditor
/** * Get the auditor. * @return auditor. */ public AuditSpanSource<AuditSpanS3A> getAuditor() { return auditor; }
3.68
rocketmq-connect_WorkerDirectTask_pause
/** * Pause consumption of messages from the specified partition. * * @param partitions the partition list to be reset offset. */ @Override public void pause(List<RecordPartition> partitions) { // no-op }
3.68
framework_SystemError_getHtmlMessage
/** * Returns the message of the error in HTML. * * Note that this API may change in future versions. */ protected String getHtmlMessage() { // TODO wrapping div with namespace? See the old code: // target.addXMLSection("div", message, // "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"); String...
3.68
morf_OracleMetaDataProvider_viewNames
/** * @see org.alfasoftware.morf.metadata.Schema#viewNames() */ @Override public Collection<String> viewNames() { return viewMap().keySet(); }
3.68
hmily_OriginTrackedPropertiesLoader_getCharacter
/** * Gets character. * * @return the character */ public char getCharacter() { return (char) this.character; }
3.68
framework_VScrollTable_getNavigationStartKey
/** * Get the key the moves the selection to the beginning of the table. By * default this is the Home key but by overriding this you can change the * key to whatever you want. * * @return */ protected int getNavigationStartKey() { return KeyCodes.KEY_HOME; }
3.68
hadoop_AzureNativeFileSystemStore_getHTTPScheme
/** * Get the appropriate return the appropriate scheme for communicating with * Azure depending on whether wasb or wasbs is specified in the target URI. * * return scheme - HTTPS or HTTP as appropriate. */ private String getHTTPScheme() { String sessionScheme = sessionUri.getScheme(); // Check if we're on a s...
3.68
framework_Navigator_getViewClass
/** * Get the view class for this provider. * * @return {@link View} class */ public Class<? extends View> getViewClass() { return viewClass; }
3.68
framework_ValueContext_getHasValue
/** * Returns an {@code Optional} for the {@code HasValue} used in the value * conversion. In certain complicated cases, ex. cross-field validation, * HasValue might be not available. * * @return the optional of {@code HasValue} * @since 8.1 */ public Optional<HasValue<?>> getHasValue() { return Optional.ofN...
3.68
hmily_RepositoryPathUtils_buildRedisKey
/** * Build redis key string. * * @param keyPrefix the key prefix * @param id the id * @return the string */ public static String buildRedisKey(final String keyPrefix, final String id) { return String.join(":", keyPrefix, id); }
3.68
hbase_JmxCacheBuster_restart
/** * Restarts the stopped service. * @see #stop() */ public static void restart() { stopped.set(false); }
3.68
framework_VTree_setText
/** For internal use only. May be removed or replaced in the future. */ public void setText(String text) { DOM.setInnerText(nodeCaptionSpan, text); }
3.68
flink_CheckpointConfig_getMaxConcurrentCheckpoints
/** * Gets the maximum number of checkpoint attempts that may be in progress at the same time. If * this value is <i>n</i>, then no checkpoints will be triggered while <i>n</i> checkpoint * attempts are currently in flight. For the next checkpoint to be triggered, one checkpoint * attempt would need to finish or ex...
3.68
framework_DataCommunicator_beforeClientResponse
/** * Initially and in the case of a reset all data should be pushed to the * client. */ @Override public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); if (initial && getPushRows().isEmpty()) { // Make sure rows are pushed when component is attached. setPu...
3.68
hbase_FileLink_tryOpen
/** * Try to open the file from one of the available locations. * @return FSDataInputStream stream of the opened file link * @throws IOException on unexpected error, or file not found. */ private FSDataInputStream tryOpen() throws IOException { IOException exception = null; for (Path path : fileLink.getLocation...
3.68
framework_BeanItemContainer_addItemAt
/** * Adds a new bean at the given index. * * The bean is used both as the item contents and as the item identifier. * * @param index * Index at which the bean should be added. * @param newItemId * The bean to add to the container. * @return Returns the new BeanItem or null if the operati...
3.68
morf_DatabaseMetaDataProvider_setColumnNullability
/** * Sets column nullability from a result set. * * @param tableName Name of the table. * @param column Column builder to set to. * @param columnResultSet Result set to be read. * @return Resulting column builder. * @throws SQLException Upon errors. */ @SuppressWarnings("unused") protected ColumnBuilder setCol...
3.68
Activiti_FlowNodeActivityBehavior_leave
/** * Default way of leaving a BPMN 2.0 activity: evaluate the conditions on the outgoing sequence flow and take those that evaluate to true. */ public void leave(DelegateExecution execution) { bpmnActivityBehavior.performDefaultOutgoingBehavior((ExecutionEntity) execution); }
3.68
hadoop_User_setLogin
/** * Set the login object * @param login */ public void setLogin(LoginContext login) { this.login = login; }
3.68
hbase_ServerManager_removeDeletedRegionFromLoadedFlushedSequenceIds
/** * Regions may have been removed between latest persist of FlushedSequenceIds and master abort. So * after loading FlushedSequenceIds from file, and after meta loaded, we need to remove the * deleted region according to RegionStates. */ public void removeDeletedRegionFromLoadedFlushedSequenceIds() { RegionStat...
3.68
hbase_Bytes_random
/** * Fill given array with random bytes at the specified position. * <p> * If you want random bytes generated by a strong source of randomness use * {@link Bytes#secureRandom(byte[], int, int)}. * @param b array which needs to be filled with random bytes * @param offset staring offset in array * @param len...
3.68
framework_AbstractDateField_setValue
/** * Sets the value of this object. If the new value is not equal to * {@code getValue()}, fires a {@link ValueChangeEvent} . * * @param value * the new value, may be {@code null} * @throws IllegalArgumentException * if the value is not within range bounds */ @Override public void setVal...
3.68
framework_MonthEventLabel_isTimeSpecificEvent
/** * Is the event bound to a specific time. * * @return */ public boolean isTimeSpecificEvent() { return timeSpecificEvent; }
3.68
druid_DruidDriver_getDataSource
/** * 参数定义: com.alibaba.druid.log.LogFilter=filter com.alibaba.druid.log.LogFilter.p1=prop-value * com.alibaba.druid.log.LogFilter.p2=prop-value * * @param url * @return * @throws SQLException */ private DataSourceProxyImpl getDataSource(String url, Properties info) throws SQLException { DataSourceProxyImpl ...
3.68
hadoop_AMRMClientRelayerMetrics_getInstance
/** * Initialize the singleton instance. * * @return the singleton */ public static AMRMClientRelayerMetrics getInstance() { if (!isInitialized.get()) { synchronized (AMRMClientRelayerMetrics.class) { if (instance == null) { instance = new AMRMClientRelayerMetrics(); DefaultMetricsSystem...
3.68
hadoop_AllocateResponse_updatedContainers
/** * Set the <code>updatedContainers</code> of the response. * @see AllocateResponse#setUpdatedContainers(List) * @param updatedContainers <code>updatedContainers</code> of the response * @return {@link AllocateResponseBuilder} */ @Private @Unstable public AllocateResponseBuilder updatedContainers( List<Updat...
3.68
framework_FocusUtil_getTabIndex
/** * Gets the widget's position in the tab index. * * @param focusable * The widget * * @return the widget's tab index */ public static int getTabIndex(Widget focusable) { assert (focusable != null && focusable .getElement() != null) : "Can't getTabIndex for a widget without an elemen...
3.68
dubbo_FrameworkModel_defaultModel
/** * During destroying the default FrameworkModel, the FrameworkModel.defaultModel() or ApplicationModel.defaultModel() * will return a broken model, maybe cause unpredictable problem. * Recommendation: Avoid using the default model as much as possible. * @return the global default FrameworkModel */ public static...
3.68
hudi_ZeroToOneUpgradeHandler_getFileNameForMarkerFromLogFile
/** * Curates file name for marker from existing log file path. * log file format : partitionpath/.fileid_baseInstant.log.writetoken * marker file format : partitionpath/fileId_writetoken_baseinstant.basefileExtn.marker.APPEND * * @param logFilePath log file path for which marker file name needs to be generat...
3.68
hbase_MasterObserver_preAddReplicationPeer
/** * Called before add a replication peer * @param ctx the environment to interact with the framework and master * @param peerId a short name that identifies the peer * @param peerConfig configuration for the replication peer */ default void preAddReplicationPeer(final ObserverContext<MasterCoprocessor...
3.68
AreaShop_WorldGuardHandler6_buildDomain
/** * Build a DefaultDomain from a RegionAccessSet. * @param regionAccessSet RegionAccessSet to read * @return DefaultDomain containing the entities from the RegionAccessSet */ private DefaultDomain buildDomain(RegionAccessSet regionAccessSet) { DefaultDomain owners = new DefaultDomain(); for(String playerName :...
3.68
hadoop_AppIdKeyConverter_encode
/* * (non-Javadoc) * * Converts/encodes a string app Id into a byte representation for (row) keys. * For conversion, we extract cluster timestamp and sequence id from the * string app id (calls ConverterUtils#toApplicationId(String) for * conversion) and then store it in a byte array of length 12 (8 bytes (long) ...
3.68
graphhopper_Helper_keepIn
/** * This methods returns the value or min if too small or max if too big. */ public static double keepIn(double value, double min, double max) { return Math.max(min, Math.min(value, max)); }
3.68
flink_AllocatedSlot_hashCode
/** This always returns a reference hash code. */ @Override public final int hashCode() { return super.hashCode(); }
3.68
flink_InPlaceMutableHashTable_insertAfterNoMatch
/** * This method can be called after getMatchFor returned null. It inserts the given record to * the hash table. Important: The given record should have the same key as the record that * was given to getMatchFor! WARNING; Don't do any modifications to the table between * getMatchFor and insertAfterNoMatch! * * @...
3.68
morf_Function_average
/** * Helper method to create an instance of the "average" SQL function. * * @param field the field to evaluate in the average function. * @return an instance of a average function. */ public static Function average(AliasedField field) { return new Function(FunctionType.AVERAGE, field); }
3.68
hadoop_JobMetaData_getResourceSkyline
/** * Get {@link ResourceSkyline}. * * @return {@link ResourceSkyline}. */ public final ResourceSkyline getResourceSkyline() { return resourceSkyline; }
3.68
flink_LongHashPartition_get
/** Returns an iterator for all the values for the given key, or null if no value found. */ public MatchIterator get(long key, int hashCode) { int bucket = findBucket(hashCode); int bucketOffset = bucket << 4; MemorySegment segment = buckets[bucketOffset >>> segmentSizeBits]; int segOffset = bucketOffs...
3.68
zxing_ISBNResultParser_parse
/** * See <a href="http://www.bisg.org/isbn-13/for.dummies.html">ISBN-13 For Dummies</a> */ @Override public ISBNParsedResult parse(Result result) { BarcodeFormat format = result.getBarcodeFormat(); if (format != BarcodeFormat.EAN_13) { return null; } String rawText = getMassagedText(result); int length...
3.68
zxing_BitMatrix_xor
/** * Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding * mask bit is set. * * @param mask XOR mask */ public void xor(BitMatrix mask) { if (width != mask.width || height != mask.height || rowSize != mask.rowSize) { throw new IllegalArgumentException("input matrix dimensions do ...
3.68
hbase_FavoredNodeLoadBalancer_generateFavoredNodesForMergedRegion
/* * Generate favored nodes for a region during merge. Choose the FN from one of the sources to keep * it simple. */ @Override public void generateFavoredNodesForMergedRegion(RegionInfo merged, RegionInfo[] mergeParents) throws IOException { Map<RegionInfo, List<ServerName>> regionFNMap = Maps.newHashMap(); re...
3.68
flink_CliFrontend_getConfiguration
/** * Getter which returns a copy of the associated configuration. * * @return Copy of the associated configuration */ public Configuration getConfiguration() { Configuration copiedConfiguration = new Configuration(); copiedConfiguration.addAll(configuration); return copiedConfiguration; }
3.68