name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_Log4jUtils_disableZkAndClientLoggers
/** * Disables Zk- and HBase client logging */ public static void disableZkAndClientLoggers() { // disable zookeeper log to avoid it mess up command output setLogLevel("org.apache.zookeeper", "OFF"); // disable hbase zookeeper tool log to avoid it mess up command output setLogLevel("org.apache.hadoop.hbase.zo...
3.68
morf_SelectStatement_optimiseForRowCount
/** * If supported by the dialect, requests that the database arranges the query plan such that the * first <code>rowCount</code> rows are returned as fast as possible, even if the statistics * indicate that this means the full result set will take longer to be returned. * * <p>Note that this is <em>not</em> to be...
3.68
hadoop_User_getName
/** * Get the full name of the user. */ @Override public String getName() { return fullName; }
3.68
flink_RouteResult_param
/** * Extracts the param in {@code pathParams} first, then falls back to the first matching param * in {@code queryParams}. * * @return {@code null} if there's no match */ public String param(String name) { String pathValue = pathParams.get(name); return (pathValue == null) ? queryParam(name) : pathValue; ...
3.68
hadoop_BufferedIOStatisticsOutputStream_getIOStatistics
/** * Ask the inner stream for their IOStatistics. * @return any IOStatistics offered by the inner stream. */ @Override public IOStatistics getIOStatistics() { return retrieveIOStatistics(out); }
3.68
hbase_GroupingTableMapper_setConf
/** * Sets the configuration. This is used to set up the grouping details. * @param configuration The configuration to set. * @see org.apache.hadoop.conf.Configurable#setConf( org.apache.hadoop.conf.Configuration) */ @Override public void setConf(Configuration configuration) { this.conf = configuration; String[...
3.68
hadoop_LoadManifestsStage_executeStage
/** * Load the manifests. * @param arguments stage arguments * @return the summary and a list of manifests. * @throws IOException IO failure. */ @Override protected LoadManifestsStage.Result executeStage( final LoadManifestsStage.Arguments arguments) throws IOException { EntryFileIO entryFileIO = new EntryF...
3.68
pulsar_DateFormatter_format
/** * @return a String representing a particular time instant */ public static String format(Instant instant) { return DATE_FORMAT.format(instant); }
3.68
hadoop_MoveStep_setDestinationVolume
/** * Sets destination volume. * * @param destinationVolume - volume */ public void setDestinationVolume(DiskBalancerVolume destinationVolume) { this.destinationVolume = destinationVolume; }
3.68
flink_FileOutputFormat_initDefaultsFromConfiguration
/** * Initialize defaults for output format. Needs to be a static method because it is configured * for local cluster execution. * * @param configuration The configuration to load defaults from */ public static void initDefaultsFromConfiguration(Configuration configuration) { final boolean overwrite = configur...
3.68
hadoop_SchedulerHealth_getAggregateReleaseCount
/** * Get the aggregate of all the release count. * * @return aggregate release count */ public Long getAggregateReleaseCount() { return getAggregateOperationCount(Operation.RELEASE); }
3.68
framework_DateTimeFieldElement_setDateTime
/** * Sets the value to the given date and time. * * @param value * the date and time to set. */ public void setDateTime(LocalDateTime value) { setISOValue(value.format(getISOFormatter())); }
3.68
framework_Table_resetVariablesAndPageBuffer
/** * Resets and paints "to be painted next" variables. Also reset pageBuffer */ private void resetVariablesAndPageBuffer(PaintTarget target) throws PaintException { reqFirstRowToPaint = -1; reqRowsToPaint = -1; containerChangeToBeRendered = false; target.addVariable(this, "reqrows", reqRowsTo...
3.68
hbase_AbstractFSWALProvider_recoverLease
// For HBASE-15019 public static void recoverLease(Configuration conf, Path path) { try { final FileSystem dfs = CommonFSUtils.getCurrentFileSystem(conf); RecoverLeaseFSUtils.recoverFileLease(dfs, path, conf, new CancelableProgressable() { @Override public boolean progress() { LOG.debug("S...
3.68
hadoop_BCFile_getDefaultCompressionName
/** * Get the name of the default compression algorithm. * * @return the name of the default compression algorithm. */ public String getDefaultCompressionName() { return dataIndex.getDefaultCompressionAlgorithm().getName(); }
3.68
flink_BaseHybridHashTable_findSmallerPrime
/** Let prime number be the numBuckets, to avoid partition hash and bucket hash congruences. */ private static int findSmallerPrime(int num) { for (; num > 1; num--) { if (isPrimeNumber(num)) { return num; } } return num; }
3.68
dubbo_ConfigurationCache_computeIfAbsent
/** * Get Cached Value * * @param key key * @param function function to produce value, should not return `null` * @return value */ public String computeIfAbsent(String key, Function<String, String> function) { String value = cache.get(key); // value might be empty here! // empty value from config cent...
3.68
hbase_AssignmentVerificationReport_getNumRegionsOnFavoredNodeByPosition
/** * Return the number of regions based on the position (primary/secondary/ tertiary) assigned to * their favored nodes * @return the number of regions */ int getNumRegionsOnFavoredNodeByPosition(FavoredNodesPlan.Position position) { return favoredNodes[position.ordinal()]; }
3.68
framework_Form_getItemProperty
/** * The property identified by the property id. * * <p> * The property data source of the field specified with property id is * returned. If there is a (with specified property id) having no data * source, the field is returned instead of the data source. * </p> * * @see Item#getItemProperty(Object) */ @Ove...
3.68
framework_AbstractInMemoryContainer_registerNewItem
/** * Registers a new item as having been added to the container. This can * involve storing the item or any relevant information about it in internal * container-specific collections if necessary, as well as registering * listeners etc. * * The full identifier list in {@link AbstractInMemoryContainer} has alread...
3.68
hadoop_MutableStat_lastStat
/** * Return a SampleStat object that supports * calls like StdDev and Mean. * @return SampleStat */ public SampleStat lastStat() { return changed() ? intervalStat : prevStat; }
3.68
graphhopper_GraphHopper_initLocationIndex
/** * Initializes the location index after the import is done. */ protected void initLocationIndex() { if (locationIndex != null) throw new IllegalStateException("Cannot initialize locationIndex twice!"); locationIndex = createLocationIndex(baseGraph.getDirectory()); }
3.68
hbase_ObjectPool_purge
/** * Removes stale references of shared objects from the pool. References newly becoming stale may * still remain. * <p/> * The implementation of this method is expected to be lightweight when there is no stale * reference with the Oracle (Sun) implementation of {@code ReferenceQueue}, because * {@code Reference...
3.68
framework_Label_addListener
/** * @deprecated As of 7.0, replaced by * {@link #addValueChangeListener(Property.ValueChangeListener)} */ @Override @Deprecated public void addListener(Property.ValueChangeListener listener) { addValueChangeListener(listener); }
3.68
morf_RemoveColumn_getTableName
/** * Gets the name of the table. * * @return the table's name */ public String getTableName() { return tableName; }
3.68
pulsar_PulsarConnectorConfig_setZookeeperUri
/** * @deprecated use {@link #setMetadataUrl(String)} */ @Deprecated @Config("pulsar.zookeeper-uri") public PulsarConnectorConfig setZookeeperUri(String zookeeperUri) { if (hasMetadataUrl) { return this; } this.metadataUrl = zookeeperUri; return this; }
3.68
hadoop_BlockStorageMovementNeeded_clearQueuesWithNotification
/** * Clean all the movements in spsDirsToBeTraveresed/storageMovementNeeded * and notify to clean up required resources. */ public synchronized void clearQueuesWithNotification() { // Remove xAttr from directories Long trackId; while ((trackId = ctxt.getNextSPSPath()) != null) { try { // Remove xAtt...
3.68
framework_Escalator_hasColumnAndRowData
/** * Check whether there are both columns and any row data (for either * headers, body or footer). * * @return <code>true</code> if header, body or footer has rows and there * are columns */ private boolean hasColumnAndRowData() { return (header.getRowCount() > 0 || body.getRowCount() > 0 ...
3.68
framework_ShortcutAction_getModifiers
/** * Get the {@link ModifierKey}s required for the shortcut to react. * * @return modifier keys for this shortcut */ public int[] getModifiers() { return modifiers; }
3.68
framework_VAbstractCalendarPanel_setAssistiveLabelNextMonth
/** * Set assistive label for the next month element. * * @param label * the label to set * @since 8.4 */ public void setAssistiveLabelNextMonth(String label) { nextMonthAssistiveLabel = label; }
3.68
hbase_CellArrayImmutableSegment_reinitializeCellSet
/*------------------------------------------------------------------------*/ // Create CellSet based on CellChunkMap from current ConcurrentSkipListMap based CellSet // (without compacting iterator) // We do not consider cells bigger than chunks! private void reinitializeCellSet(int numOfCells, KeyValueScanner segmentS...
3.68
framework_Form_removeAllProperties
/** * Removes all properties and fields from the form. * * @return the Success of the operation. Removal of all fields succeeded if * (and only if) the return value is <code>true</code>. */ public boolean removeAllProperties() { boolean success = true; for (Object property : propertyIds.toArray())...
3.68
pulsar_JdbcUtils_getTableId
/** * Get the {@link TableId} for the given tableName. */ public static TableId getTableId(Connection connection, String tableName) throws Exception { DatabaseMetaData metadata = connection.getMetaData(); try (ResultSet rs = metadata.getTables(null, null, tableName, new String[]{"TABLE", "PARTITIONED TABLE"})...
3.68
hbase_AccessChecker_initGroupService
/* * Initialize the group service. */ private void initGroupService(Configuration conf) { if (groupService == null) { if (conf.getBoolean(User.TestingGroups.TEST_CONF, false)) { UserProvider.setGroups(new User.TestingGroups(UserProvider.getGroups())); groupService = UserProvider.getGroups(); } e...
3.68
hadoop_DockerCommandExecutor_isRemovable
/** * Is the container in a removable state? * * @param containerStatus the container's {@link DockerContainerStatus}. * @return is the container in a removable state. */ public static boolean isRemovable(DockerContainerStatus containerStatus) { return !containerStatus.equals(DockerContainerSt...
3.68
flink_StateAssignmentOperation_reAssignSubKeyedStates
// TODO rewrite based on operator id private Tuple2<List<KeyedStateHandle>, List<KeyedStateHandle>> reAssignSubKeyedStates( OperatorState operatorState, List<KeyGroupRange> keyGroupPartitions, int subTaskIndex, int newParallelism, int oldParallelism) { List<KeyedStateHandle>...
3.68
framework_SystemMessagesInfo_getLocale
/** * The locale of the UI related to the {@link SystemMessages} request. * * @return The Locale or null if the locale is not known */ public Locale getLocale() { return locale; }
3.68
streampipes_DataLakeMeasure_getTimestampFieldName
/** * This can be used to get the name of the timestamp property without the stream prefix * * @return the name of the timestamp property */ @TsIgnore @JsonIgnore public String getTimestampFieldName() { return timestampField.split(STREAM_PREFIX_DELIMITER)[1]; }
3.68
open-banking-gateway_Xs2aConsentInfo_isEmbedded
/** * Is the current consent authorization in EMBEDDED mode. */ public boolean isEmbedded(Xs2aContext ctx) { return EMBEDDED.name().equalsIgnoreCase(ctx.getAspspScaApproach()); }
3.68
pulsar_ConcurrentOpenHashMap_keys
/** * @return a new list of all keys (makes a copy) */ public List<K> keys() { List<K> keys = new ArrayList<>((int) size()); forEach((key, value) -> keys.add(key)); return keys; }
3.68
hmily_HmilyParticipantCacheManager_removeByKey
/** * remove guava cache by key. * * @param participantId guava cache key. */ public void removeByKey(final Long participantId) { if (Objects.nonNull(participantId)) { LOADING_CACHE.invalidate(participantId); } }
3.68
pulsar_AuthenticationProvider_authenticateHttpRequestAsync
/** * Validate the authentication for the given credentials with the specified authentication data. * * <p>Implementations of this method MUST modify the request by adding the {@link AuthenticatedRoleAttributeName} * and the {@link AuthenticatedDataAttributeName} attributes.</p> * * <p>Warning: the calling thread...
3.68
flink_TimestampStringUtils_fromLocalDateTime
/** Convert a {@link LocalDateTime} to a calcite's {@link TimestampString}. */ public static TimestampString fromLocalDateTime(LocalDateTime ldt) { return new TimestampString( ldt.getYear(), ldt.getMonthValue(), ldt.getDayOfMonth(), ldt...
3.68
pulsar_WindowManager_onTrigger
/** * The callback invoked by the trigger policy. */ @Override public boolean onTrigger() { List<Event<T>> windowEvents = null; List<Event<T>> expired = null; lock.lock(); try { /* * scan the entire window to handle out of order events in * the case of time based windows. ...
3.68
graphhopper_NodeBasedNodeContractor_findAndHandleShortcuts
/** * Searches for shortcuts and calls the given handler on each shortcut that is found. The graph is not directly * changed by this method. * Returns the 'degree' of the given node (disregarding edges from/to already contracted nodes). * Note that here the degree is not the total number of adjacent edges, but only...
3.68
hudi_BaseHoodieWriteClient_addColumn
/** * add columns to table. * * @param colName col name to be added. if we want to add col to a nested filed, the fullName should be specified * @param schema col type to be added. * @param doc col doc to be added. * @param position col position to be added * @param positionType col posit...
3.68
morf_ChangePrimaryKeyColumns_getNewPrimaryKeyColumns
/** * @return the new primary key column names */ public List<String> getNewPrimaryKeyColumns() { return newPrimaryKeyColumns; }
3.68
morf_SqlDialect_getSqlForSum
/** * Converts the sum function into SQL. * * @param function the function details * @return a string representation of the SQL */ protected String getSqlForSum(Function function) { return "SUM(" + getSqlFrom(function.getArguments().get(0)) + ")"; }
3.68
hbase_HFileBlockIndex_add
/** * The same as {@link #add(byte[], long, int, long)} but does not take the key/value into * account. Used for single-level indexes. * @see #add(byte[], long, int, long) */ @Override public void add(byte[] firstKey, long blockOffset, int onDiskDataSize) { add(firstKey, blockOffset, onDiskDataSize, -1); }
3.68
pulsar_Schema_PROTOBUF_NATIVE
/** * Create a Protobuf-Native schema type with schema definition. * * @param schemaDefinition schemaDefinition the definition of the schema * @return a Schema instance */ static <T extends com.google.protobuf.GeneratedMessageV3> Schema<T> PROTOBUF_NATIVE( SchemaDefinition<T> schemaDefinition) { return...
3.68
hadoop_GroupsService_getGroups
/** * @deprecated use {@link #getGroupsSet(String user)} */ @Deprecated @Override public List<String> getGroups(String user) throws IOException { return hGroups.getGroups(user); }
3.68
hudi_HoodieMetadataWriteUtils_createMetadataWriteConfig
/** * Create a {@code HoodieWriteConfig} to use for the Metadata Table. This is used by async * indexer only. * * @param writeConfig {@code HoodieWriteConfig} of the main dataset writer * @param failedWritesCleaningPolicy Cleaning policy on failed writes */ public static HoodieWriteConfig createMe...
3.68
hadoop_AzureBlobFileSystem_setPermission
/** * Set permission of a path. * * @param path The path * @param permission Access permission */ @Override public void setPermission(final Path path, final FsPermission permission) throws IOException { LOG.debug("AzureBlobFileSystem.setPermission path: {}", path); TracingContext tracingContext = new...
3.68
dubbo_LoggerFactory_setLevel
/** * Set the current logging level * * @param level logging level */ public static void setLevel(Level level) { loggerAdapter.setLevel(level); }
3.68
hudi_TimestampBasedAvroKeyGenerator_initIfNeeded
/** * The function takes care of lazily initialising dateTimeFormatter variables only once. */ private void initIfNeeded() { if (this.inputFormatter == null) { this.inputFormatter = parser.getInputFormatter(); } if (this.partitionFormatter == null) { this.partitionFormatter = DateTimeFormat.forPattern(o...
3.68
hbase_RegionStateStore_deleteRegion
// ============================================================================================ // Delete Region State helpers // ============================================================================================ /** * Deletes the specified region. */ public void deleteRegion(final RegionInfo regionInfo) th...
3.68
morf_DatabaseMetaDataProvider_setColumnAutonumbered
/** * Sets column being autonumbered 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...
3.68
graphhopper_MatrixResponse_getWeight
/** * Returns the weight for the specific entry (from -&gt; to) in arbitrary units ('costs'), or * {@link Double#MAX_VALUE} in case no connection was found (and {@link GHMRequest#setFailFast(boolean)} was set * to true). */ public double getWeight(int from, int to) { if (hasErrors()) { throw new Illegal...
3.68
dubbo_ScopeClusterInvoker_destroyInjvmInvoker
/** * Destroy the existing InjvmInvoker. */ private void destroyInjvmInvoker() { if (injvmInvoker != null) { injvmInvoker.destroy(); injvmInvoker = null; } }
3.68
flink_SubtaskStateStats_getEndToEndDuration
/** * Computes the duration since the given trigger timestamp. * * <p>If the trigger timestamp is greater than the ACK timestamp, this returns <code>0</code>. * * @param triggerTimestamp Trigger timestamp of the checkpoint. * @return Duration since the given trigger timestamp. */ public long getEndToEndDuration(...
3.68
flink_RequestedLocalProperties_setOrdering
/** * Sets the order for these interesting local properties. * * @param ordering The order to set. */ public void setOrdering(Ordering ordering) { this.ordering = ordering; }
3.68
flink_InPlaceMutableHashTable_appendPointerAndRecord
/** * Appends a pointer and a record. * * @param pointer The pointer to write (Note: this is NOT the position to write to!) * @param record The record to write * @return A pointer to the written data * @throws IOException (EOFException specifically, if memory ran out) */ public long appendPointerAndRecord(long p...
3.68
hadoop_FsStatus_getRemaining
/** * Return the number of remaining bytes on the file system. * @return remaining. */ public long getRemaining() { return remaining; }
3.68
hbase_ThriftHttpServlet_getAuthHeader
/** * Returns the base64 encoded auth header payload * @throws HttpAuthenticationException if a remote or network exception occurs */ private String getAuthHeader(HttpServletRequest request) throws HttpAuthenticationException { String authHeader = request.getHeader(HttpHeaders.AUTHORIZATION); // Each http reques...
3.68
framework_GwtRpcButtonConnector_doRPC
/* * Make an RPC to test our bug. */ private void doRPC() { log("GwtRpcButtonTestConnector onClick"); GwtRpcServiceTestAsync service = GWT.create(GwtRpcServiceTest.class); service.giveMeThat("honey", "sugar", new AsyncCallback<String>() { @Override public void onSuccess(String result) {...
3.68
hadoop_ResourceCalculator_compare
/** * On a cluster with capacity {@code clusterResource}, compare {@code lhs} * and {@code rhs} considering all resources. * * @param clusterResource cluster capacity * @param lhs First {@link Resource} to compare * @param rhs Second {@link Resource} to compare * @return -1 if {@code lhs} is smaller, 0 if equal ...
3.68
hadoop_ExternalSPSFilePathCollector_processPath
/** * Recursively scan the given path and add the file info to SPS service for * processing. */ private long processPath(Long startID, String childPath) { long pendingWorkCount = 0; // to be satisfied file counter for (byte[] lastReturnedName = HdfsFileStatus.EMPTY_NAME;;) { final DirectoryListing children; ...
3.68
hadoop_TimelinePutResponse_setEntityId
/** * Set the entity Id * * @param entityId * the entity Id */ public void setEntityId(String entityId) { this.entityId = entityId; }
3.68
flink_InFlightRequestTracker_registerRequest
/** * Registers an in-flight request. * * @return {@code true} if the request could be registered; {@code false} if the tracker has * already been terminated. */ public boolean registerRequest() { return phaser.register() >= 0; }
3.68
hbase_HRegionFileSystem_getFileSystem
/** Returns the underlying {@link FileSystem} */ public FileSystem getFileSystem() { return this.fs; }
3.68
hadoop_AuxServiceConfiguration_files
/** * Array of list of files that needs to be created and made available as * volumes in the service component containers. **/ public AuxServiceConfiguration files(List<AuxServiceFile> fileList) { this.files = fileList; return this; }
3.68
hadoop_FedBalanceContext_setForceCloseOpenFiles
/** * Force close open files. * @param value true if force close all the open files. * @return the builder. */ public Builder setForceCloseOpenFiles(boolean value) { this.forceCloseOpenFiles = value; return this; }
3.68
flink_Plan_setJobId
/** * Sets the ID of the job that the dataflow plan belongs to. If this ID is set to {@code null}, * then the dataflow represents its own independent job. * * @param jobId The ID of the job that the dataflow plan belongs to. */ public void setJobId(JobID jobId) { this.jobId = jobId; }
3.68
flink_ResourceCounter_getTotalResource
/** * Computes the total resources in this counter. * * @return the total resources in this counter */ public ResourceProfile getTotalResource() { return resources.entrySet().stream() .map(entry -> entry.getKey().multiply(entry.getValue())) .reduce(ResourceProfile.ZERO, ResourceProfile::...
3.68
rocketmq-connect_MemoryConfigManagementServiceImpl_pauseConnector
/** * pause connector * * @param connectorName */ @Override public void pauseConnector(String connectorName) { if (!connectorKeyValueStore.containsKey(connectorName)) { throw new ConnectException("Connector [" + connectorName + "] does not exist"); } ConnectKeyValue config = connectorKeyValueSto...
3.68
flink_GenericDataSinkBase_setLocalOrder
/** * Sets the order in which the sink must write its data within each fragment in the distributed * file system. For any value other then <tt>NONE</tt>, this will cause the system to perform a * local sort, or try to reuse an order from a previous operation. * * @param localOrder The local order to write the data...
3.68
hadoop_LocalSASKeyGeneratorImpl_getStorageAccountInstance
/** * Helper method that creates CloudStorageAccount Instance using the * storage account key. * @param accountName Name of the storage account * @param accountKey Storage Account key * @return CloudStorageAccount instance for the storage account. * @throws SASKeyGenerationException */ private CloudStorageAccoun...
3.68
hadoop_Find_buildDescription
/** Build the description used by the help command. */ private static String buildDescription(ExpressionFactory factory) { ArrayList<Expression> operators = new ArrayList<Expression>(); ArrayList<Expression> primaries = new ArrayList<Expression>(); for (Class<? extends Expression> exprClass : EXPRESSIONS) { E...
3.68
hadoop_AppToFlowColumn_getColumnQualifier
/** * @return the column name value */ private String getColumnQualifier() { return columnQualifier; }
3.68
hbase_ConnectionUtils_setServerSideHConnectionRetriesConfig
/** * Changes the configuration to set the number of retries needed when using Connection internally, * e.g. for updating catalog tables, etc. Call this method before we create any Connections. * @param c The Configuration instance to set the retries into. * @param log Used to log what we set in here. */ public ...
3.68
hmily_CuratorZookeeperExceptionHandler_handleException
/** * Handle exception. * * <p>Ignore interrupt and connection invalid exception.</p> * * @param cause to be handled exception */ public static void handleException(final Exception cause) { if (null == cause) { return; } if (isIgnoredException(cause) || null != cause.getCause() && isIgnoredE...
3.68
graphhopper_VirtualEdgeIteratorState_setUnfavored
/** * This method sets edge to unfavored status for routing from the start or to the stop location. */ public void setUnfavored(boolean unfavored) { this.unfavored = unfavored; }
3.68
rocketmq-connect_ProcessingContext_report
/** * report errors */ public void report() { if (reporters.size() == 1) { reporters.iterator().next().report(this); } reporters.stream().forEach(r -> r.report(this)); }
3.68
hbase_AsyncAdmin_cloneSnapshot
/** * Create a new table by cloning the snapshot content. * @param snapshotName name of the snapshot to be cloned * @param tableName name of the table where the snapshot will be restored * @param restoreAcl <code>true</code> to restore acl of snapshot */ default CompletableFuture<Void> cloneSnapshot(String sn...
3.68
hmily_HmilyXaTransactionManager_initialized
/** * Initialized hmily xa transaction manager. * * @return the hmily xa transaction manager */ public static HmilyXaTransactionManager initialized() { return new HmilyXaTransactionManager(); }
3.68
framework_AbstractOrderedLayoutConnector_init
/* * (non-Javadoc) * * @see com.vaadin.client.ui.AbstractComponentConnector#init() */ @Override public void init() { super.init(); getWidget().setLayoutManager(getLayoutManager()); }
3.68
hibernate-validator_PathImpl_isValidJavaIdentifier
/** * Validate that the given identifier is a valid Java identifier according to the Java Language Specification, * <a href="http://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.8">chapter 3.8</a> * * @param identifier string identifier to validate * * @return true if the given identifier is a valid ...
3.68
zxing_PDF417HighLevelEncoder_encodeHighLevel
/** * Performs high-level encoding of a PDF417 message using the algorithm described in annex P * of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction * is used. * * @param msg the message * @param compaction compaction mode to use * @param encoding character encoding used to...
3.68
zilla_HpackContext_staticIndex18
// Index in static table for the given name of length 18 private static int staticIndex18(DirectBuffer name) { return (name.getByte(17) == 'e' && STATIC_TABLE[48].name.equals(name)) ? 48 : -1; // proxy-authenticate }
3.68
AreaShop_RentRegion_getPlayerName
/** * Get the name of the player renting this region. * @return Name of the player renting this region, if unavailable by UUID it will return the old cached name, if that is unavailable it will return &lt;UNKNOWN&gt; */ public String getPlayerName() { String result = Utils.toName(getRenter()); if(result == null ||...
3.68
framework_FlyweightRow_addCells
/** * Adds cell representations (i.e. new columns) for the indicated cell range * and updates the subsequent indexing. * * @param index * start index of the range * @param numberOfColumns * length of the range */ public void addCells(final int index, final int numberOfColumns) { for (i...
3.68
querydsl_ComparableExpression_coalesce
/** * Create a {@code coalesce(this, args...)} expression * * @param args additional arguments * @return coalesce */ @Override @SuppressWarnings({"unchecked"}) public ComparableExpression<T> coalesce(T... args) { Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin); for (T arg : args) { coalesc...
3.68
hbase_MonitoredRPCHandlerImpl_setRPCPacket
/** * Gives this instance a reference to the protobuf received by the RPC, so that it can later * compute its size if asked for it. * @param param The protobuf received by the RPC for this call */ @Override public void setRPCPacket(Message param) { this.packet = param; }
3.68
framework_Tree_collapseItemsRecursively
/** * Collapses the items recursively. * * Collapse all the children recursively starting from an item. Operation * succeeds only if all expandable items are collapsed. * * @param startItemId * ID of the initial item * @return True if the collapse operation succeeded */ public boolean collapseItemsR...
3.68
framework_DateTimeField_setAssistiveText
/** * Set a description that explains the usage of the Widget for users of * assistive devices. * * @param description * String with the description */ public void setAssistiveText(String description) { getState().descriptionForAssistiveDevices = description; }
3.68
hadoop_CRC64_compute
/** * @param input byte arrays. * @return long value of the CRC-64 checksum of the data. * */ public long compute(byte[] input) { init(); for (int i = 0; i < input.length; i++) { value = TABLE[(input[i] ^ (int) value) & 0xFF] ^ (value >>> 8); } return ~value; }
3.68
hudi_CollectionUtils_diff
/** * Returns difference b/w {@code one} {@link List} of elements and {@code another} * * NOTE: This is less optimal counterpart to {@link #diff(Collection, Collection)}, accepting {@link List} * as a holding collection to support duplicate elements use-cases */ public static <E> List<E> diff(Collection<E> o...
3.68
hbase_Client_negotiate
/** * Initiate client side Kerberos negotiation with the server. * @param method method to inject the authentication token into. * @param uri the String to parse as a URL. * @throws IOException if unknown protocol is found. */ private void negotiate(HttpUriRequest method, String uri) throws IOException { try ...
3.68
hbase_MutableRegionInfo_containsRange
/** * Returns true if the given inclusive range of rows is fully contained by this region. For * example, if the region is foo,a,g and this is passed ["b","c"] or ["a","c"] it will return * true, but if this is passed ["b","z"] it will return false. * @throws IllegalArgumentException if the range passed is invalid ...
3.68
hbase_MobUtils_cleanExpiredMobFiles
/** * Cleans the expired mob files. Cleans the files whose creation date is older than (current - * columnFamily.ttl), and the minVersions of that column family is 0. * @param fs The current file system. * @param conf The current configuration. * @param tableName The current table ...
3.68