name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_Mutation_getFingerprint
/** * Compile the column family (i.e. schema) information into a Map. Useful for parsing and * aggregation by debugging, logging, and administration tools. */ @Override public Map<String, Object> getFingerprint() { Map<String, Object> map = new HashMap<>(); List<String> families = new ArrayList<>(getFamilyCellMa...
3.68
pulsar_ManagedLedgerConfig_getMetadataEnsemblesize
/** * @return the metadataEnsemblesize */ public int getMetadataEnsemblesize() { return metadataEnsembleSize; }
3.68
hadoop_UnresolvedPathException_getResolvedPath
/** * Return a path with the link resolved with the target. */ public Path getResolvedPath() { // If the path is absolute we cam throw out the preceding part and // just append the remainder to the target, otherwise append each // piece to resolve the link in path. boolean noRemainder = (remainder == null || ...
3.68
hbase_MasterProcedureScheduler_waitRegions
/** * Suspend the procedure if the specified set of regions are already locked. * @param procedure the procedure trying to acquire the lock on the regions * @param table the table name of the regions we are trying to lock * @param regionInfos the list of regions we are trying to lock * @return true if the ...
3.68
AreaShop_Utils_configToLocation
/** * Create a location from a map, reconstruction from the config values. * @param config The config section to reconstruct from * @return The location */ public static Location configToLocation(ConfigurationSection config) { if(config == null || !config.isString("world") || !config.isDouble("x") || !con...
3.68
dubbo_FieldUtils_isEnumMemberField
/** * is Enum's member field or not * * @param field {@link VariableElement} must be public static final fields * @return if field is public static final, return <code>true</code>, or <code>false</code> */ static boolean isEnumMemberField(VariableElement field) { if (field == null || !isEnumType(field.getEnclo...
3.68
framework_LoadingIndicatorConfiguration_setThirdDelay
/* * (non-Javadoc) * * @see com.vaadin.ui.LoadingIndicator#setThirdDelay(int) */ @Override public void setThirdDelay(int thirdDelay) { getState().thirdDelay = thirdDelay; }
3.68
flink_HiveParserSemanticAnalyzer_gatherCTEReferences
// TODO: check view references, too private void gatherCTEReferences( HiveParserQB qb, HiveParserBaseSemanticAnalyzer.CTEClause current) throws HiveException { for (String alias : qb.getTabAliases()) { String originTabName = qb.getOriginTabNameForAlias(alias); String cteName = origin...
3.68
querydsl_MetaDataExporter_setImports
/** * Set the java imports * * @param imports * java imports array */ public void setImports(String[] imports) { module.bind(CodegenModule.IMPORTS, new HashSet<String>(Arrays.asList(imports))); }
3.68
starts_Attribute_getCount
/** * Returns the length of the attribute list that begins with this attribute. * * @return the length of the attribute list that begins with this attribute. */ final int getCount() { int count = 0; Attribute attr = this; while (attr != null) { count += 1; attr = attr.next; } ret...
3.68
framework_VAbsoluteLayout_updateStylenames
/** * Updates all style names contained in the layout. * * @param primaryStyleName * The style name to use as primary */ protected void updateStylenames(String primaryStyleName) { super.setStylePrimaryName(primaryStyleName); canvas.setClassName(getStylePrimaryName() + "-canvas"); canvas.setC...
3.68
flink_CheckpointsCleaner_addSubsumedCheckpoint
/** * Add one subsumed checkpoint to CheckpointsCleaner, the subsumed checkpoint would be discarded * at {@link #cleanSubsumedCheckpoints(long, Set, Runnable, Executor)}. * * @param completedCheckpoint which is subsumed. */ public void addSubsumedCheckpoint(CompletedCheckpoint completedCheckpoint) { synchroniz...
3.68
hudi_BufferedRandomAccessFile_endPosition
/** * @return endPosition of the buffer. For the last file block, this may not be a valid position. */ private long endPosition() { return this.startPosition + this.capacity; }
3.68
flink_SpillingThread_mergeChannels
/** * Merges the sorted runs described by the given Channel IDs into a single sorted run. The * merging process uses the given read and write buffers. * * @param channelIDs The IDs of the runs' channels. * @param readBuffers The buffers for the readers that read the sorted runs. * @param writeBuffers The buffers ...
3.68
pulsar_ConsumerImpl_sendFlowPermitsToBroker
/** * send the flow command to have the broker start pushing messages. */ private void sendFlowPermitsToBroker(ClientCnx cnx, int numMessages) { if (cnx != null && numMessages > 0) { if (log.isDebugEnabled()) { log.debug("[{}] [{}] Adding {} additional permits", topic, subscription, numMessage...
3.68
flink_SourceTestSuiteBase_testSourceMetrics
/** * Test connector source metrics. * * <p>This test will create 4 splits in the external system first, write test data to all splits * and consume back via a Flink job with parallelism 4. Then read and compare the metrics. * * <p>Now test: numRecordsIn */ @TestTemplate @DisplayName("Test source metrics") publi...
3.68
flink_CastRuleProvider_generateCodeBlock
/** * Create a {@link CastCodeBlock} for the provided input type and target type. Returns {@code * null} if no rule can be resolved or the resolved rule is not instance of {@link * CodeGeneratorCastRule}. * * @see CodeGeneratorCastRule#generateCodeBlock(CodeGeneratorCastRule.Context, String, String, * Logical...
3.68
querydsl_NumberExpression_like
/** * Create a {@code this like str} expression * * @param str * @return this like str */ public BooleanExpression like(Expression<String> str) { return Expressions.booleanOperation(Ops.LIKE, stringValue(), str); }
3.68
hadoop_MutableCSConfigurationProvider_getInitSchedulerConfig
// Unit test can overwrite this method protected Configuration getInitSchedulerConfig() { Configuration initialSchedConf = new Configuration(false); initialSchedConf. addResource(YarnConfiguration.CS_CONFIGURATION_FILE); return initialSchedConf; }
3.68
dubbo_MonitorFilter_collect
/** * The collector logic, it will be handled by the default monitor * * @param invoker * @param invocation * @param result the invocation result * @param remoteHost the remote host address * @param start the timestamp the invocation begin * @param error if there is an error on the invocation */ ...
3.68
flink_OpenApiSpecGenerator_injectAsyncOperationResultSchema
/** * The {@link AsynchronousOperationResult} contains a generic 'operation' field that can't be * properly extracted from swagger. This method injects these manually. * * <p>Resulting spec diff: * * <pre> * AsynchronousOperationResult: * type: object * properties: * operation: * - type: object ...
3.68
framework_RichTextAreaElement_getValue
/** * Return value of the field element. * * @return value of the field element * @since 8.4 */ public String getValue() { JavascriptExecutor executor = (JavascriptExecutor) getDriver(); return executor.executeScript( "return arguments[0].contentDocument.body.innerHTML", getEditorIf...
3.68
morf_CreateViewListener_registerView
/** * * @param view View being created. * @return List of sql statements. * @deprecated kept to ensure backwards compatibility. */ @Override @Deprecated public Iterable<String> registerView(View view) { return ImmutableList.of(); }
3.68
flink_ResourceCounter_getResourceCount
/** * Number of resources with the given {@link ResourceProfile}. * * @param resourceProfile resourceProfile for which to look up the count * @return number of resources with the given resourceProfile or {@code 0} if the resource * profile does not exist */ public int getResourceCount(ResourceProfile resource...
3.68
framework_Design_designToComponentTree
/** * Constructs a component hierarchy from the design specified as an html * tree. * * <p> * If a component root is given, the component instances created during * reading the design are assigned to its member fields based on their id, * local id, and caption * <p> * If the root is a custom component or compo...
3.68
hadoop_FindOptions_setCommandFactory
/** * Set the command factory. * * @param factory {@link CommandFactory} */ public void setCommandFactory(CommandFactory factory) { this.commandFactory = factory; }
3.68
flink_ExecNodeContext_generateUid
/** Returns a new {@code uid} for transformations. */ public String generateUid(String transformationName, ExecNodeConfig config) { if (!transformationNamePattern.matcher(transformationName).matches()) { throw new TableException( "Invalid transformation name '" + tran...
3.68
hbase_RoundRobinTableInputFormat_roundRobin
/** * Spread the splits list so as to avoid clumping on RegionServers. Order splits so every server * gets one split before a server gets a second, and so on; i.e. round-robin the splits amongst * the servers in the cluster. */ List<InputSplit> roundRobin(List<InputSplit> inputs) throws IOException { if ((inputs ...
3.68
hbase_CheckAndMutate_build
/** * Build the CheckAndMutate object with a RowMutations to commit if the check succeeds. * @param mutations mutations to perform if check succeeds * @return a CheckAndMutate object */ public CheckAndMutate build(RowMutations mutations) { preCheck(mutations); if (filter != null) { return new CheckAndMutate...
3.68
hadoop_WriteOperationHelper_activateAuditSpan
/** * Activate the audit span. * @return the span */ private AuditSpan activateAuditSpan() { return auditSpan.activate(); }
3.68
shardingsphere-elasticjob_JobNodeStorage_isJobNodeExisted
/** * Judge is job node existed or not. * * @param node node * @return is job node existed or not */ public boolean isJobNodeExisted(final String node) { return regCenter.isExisted(jobNodePath.getFullPath(node)); }
3.68
hbase_WALKeyImpl_getTableName
/** Returns table name */ @Override public TableName getTableName() { return tablename; }
3.68
flink_S3TestCredentials_isNotEmpty
/** Checks if a String is not null and not empty. */ private static boolean isNotEmpty(@Nullable String str) { return str != null && !str.isEmpty(); }
3.68
morf_AbstractSelectStatementBuilder_crossJoin
/** * Specifies a cross join (creating a cartesian product) to a subselect: * * <blockquote><pre> * // Each sale as a percentage of all sales * TableReference sale = tableRef("Sale"); * SelectStatement outer = select( * sale.field("id"), * sale.field("amount") * .divideBy(totalSales.asTabl...
3.68
framework_ColorChangeEvent_getColor
/** * Returns the new color. */ public Color getColor() { return color; }
3.68
hbase_MasterAddressTracker_setMasterAddress
/** * Set master address into the <code>master</code> znode or into the backup subdirectory of backup * masters; switch off the passed in <code>znode</code> path. * @param zkw The ZKWatcher to use. * @param znode Where to create the znode; could be at the top level or it could be under backup * m...
3.68
morf_AbstractSqlDialectTest_testSelectWithLikeClause
/** * Tests a select with a where like clause. */ @Test public void testSelectWithLikeClause() { SelectStatement stmt = new SelectStatement() .from(new TableReference(TEST_TABLE)) .where(like(new FieldReference(STRING_FIELD), "A%")); String value = varCharCast("'A%'"); String expectedSql = "SELECT * FROM "...
3.68
hbase_VisibilityUtils_readLabelsFromZKData
/** * Reads back from the zookeeper. The data read here is of the form written by * writeToZooKeeper(Map&lt;byte[], Integer&gt; entries). * @return Labels and their ordinal details */ public static List<VisibilityLabel> readLabelsFromZKData(byte[] data) throws DeserializationException { if (ProtobufUtil.isPBMag...
3.68
hudi_HiveIncrPullSource_findCommitToPull
/** * Finds the first commit from source, greater than the target's last commit, and reads it out. */ private Option<String> findCommitToPull(Option<String> latestTargetCommit) throws IOException { LOG.info("Looking for commits "); FileStatus[] commitTimePaths = fs.listStatus(new Path(incrPullRootPath)); List...
3.68
streampipes_OutputStrategies_keep
/** * Creates a {@link org.apache.streampipes.model.output.KeepOutputStrategy}. Keep output strategies do not change the * schema of an input event, i.e., the output schema matches the input schema. * * @return KeepOutputStrategy */ public static KeepOutputStrategy keep() { return new KeepOutputStrategy(); }
3.68
hadoop_CrcComposer_newStripedCrcComposer
/** * Returns a CrcComposer which will collapse CRCs for every combined * underlying data size which aligns with the specified stripe boundary. For * example, if "update" is called with 20 CRCs and bytesPerCrc == 5, and * stripeLength == 10, then every two (10 / 5) consecutive CRCs will be * combined with each oth...
3.68
zxing_IntentResult_getErrorCorrectionLevel
/** * @return name of the error correction level used in the barcode, if applicable */ public String getErrorCorrectionLevel() { return errorCorrectionLevel; }
3.68
framework_VAbstractCalendarPanel_setSubmitListener
/** * The submit listener is called when the user selects a value from the * calendar either by clicking the day or selects it by keyboard. * * @param submitListener * The listener to trigger */ public void setSubmitListener(SubmitListener submitListener) { this.submitListener = submitListener; }
3.68
hbase_HRegion_replayRecoveredEdits
/** * @param edits File of recovered edits. * @param maxSeqIdInStores Maximum sequenceid found in each store. Edits in wal must be larger * than this to be replayed for each store. * @return the sequence id of the last edit added to this region out of the recovered edits log or *...
3.68
hibernate-validator_AnnotationProxy_run
/** * Runs the given privileged action, using a privileged block if required. * <p> * <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary * privileged actions within HV's protection domain. */ @IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in...
3.68
hadoop_GlobPattern_set
/** * Set and compile a glob pattern * @param glob the glob pattern string */ public void set(String glob) { StringBuilder regex = new StringBuilder(); int setOpen = 0; int curlyOpen = 0; int len = glob.length(); hasWildcard = false; for (int i = 0; i < len; i++) { char c = glob.charAt(i); swi...
3.68
flink_DecimalData_fromUnscaledBytes
/** * Creates an instance of {@link DecimalData} from an unscaled byte array value and the given * precision and scale. */ public static DecimalData fromUnscaledBytes(byte[] unscaledBytes, int precision, int scale) { BigDecimal bd = new BigDecimal(new BigInteger(unscaledBytes), scale); return fromBigDecimal(...
3.68
framework_ContainerHelpers_getItemIdsUsingGetIdByIndex
/** * Get a range of item ids from the container using * {@link Indexed#getIdByIndex(int)}. This is just a helper method to aid * developers to quickly add the required functionality to a Container * during development. This should not be used in a "finished product" * unless fetching an id for an index is very in...
3.68
flink_BlobCacheService_setBlobServerAddress
/** * Sets the address of the {@link BlobServer}. * * @param blobServerAddress address of the {@link BlobServer}. */ public void setBlobServerAddress(InetSocketAddress blobServerAddress) { permanentBlobCache.setBlobServerAddress(blobServerAddress); transientBlobCache.setBlobServerAddress(blobServerAddress);...
3.68
hadoop_SlowPeerTracker_getJson
/** * Retrieve all valid reports as a JSON string. * @return serialized representation of valid reports. null if * serialization failed. */ public String getJson() { Collection<SlowPeerJsonReport> validReports = getJsonReports( maxNodesToReport); try { return WRITER.writeValueAsString(validRep...
3.68
hadoop_BlobOperationDescriptor_getContentLengthIfKnown
/** * Gets the content length for the Azure Storage operation, or returns zero if * unknown. * @param conn the connection object for the Azure Storage operation. * @param operationType the Azure Storage operation type. * @return the content length, or zero if unknown. */ static long getContentLengthIfKnown(HttpUR...
3.68
zxing_AlignmentPatternFinder_handlePossibleCenter
/** * <p>This is called when a horizontal scan finds a possible alignment pattern. It will * cross check with a vertical scan, and if successful, will see if this pattern had been * found on a previous horizontal scan. If so, we consider it confirmed and conclude we have * found the alignment pattern.</p> * * @pa...
3.68
hudi_HoodieMetaSyncOperations_dropTable
/** * Drop table from metastore. */ default void dropTable(String tableName) { }
3.68
hbase_MemStoreLABImpl_incScannerCount
/** * Called when opening a scanner on the data of this MemStoreLAB */ @Override public void incScannerCount() { this.refCnt.retain(); }
3.68
hadoop_RouterAuditLogger_createStringBuilderForSuccessEvent
/** * A helper function for creating the common portion of a successful * log message. */ private static StringBuilder createStringBuilderForSuccessEvent(String user, String operation, String target) { StringBuilder b = new StringBuilder(); start(Keys.USER, user, b); addRemoteIP(b); add(Keys.OPERATION, o...
3.68
druid_ZookeeperNodeListener_refresh
/** * Build Properties from PathChildrenCache. * Should be called after init(). * * @see #getPropertiesFromCache() */ @Override public List<NodeEvent> refresh() { lock.lock(); try { Properties properties = getPropertiesFromCache(); List<NodeEvent> events = NodeEvent.getEventsByDiffPropertie...
3.68
flink_KubernetesStateHandleStore_replaceEntry
/** * Replace the entry in the ConfigMap. If the entry already exists and contains delete marker, * we treat it as non-existent and perform the best effort removal. */ private Optional<KubernetesConfigMap> replaceEntry( KubernetesConfigMap configMap, String key, byte[] serializedStateHandle, ...
3.68
pulsar_PulsarClientImplementationBinding_getBytes
/** * Retrieves ByteBuffer data into byte[]. * * @param byteBuffer * @return */ static byte[] getBytes(ByteBuffer byteBuffer) { if (byteBuffer == null) { return null; } if (byteBuffer.hasArray() && byteBuffer.arrayOffset() == 0 && byteBuffer.array().length == byteBuffer.remaining())...
3.68
flink_StringColumnSummary_getMinLength
/** Shortest String length. */ public Integer getMinLength() { return minLength; }
3.68
hadoop_SignerFactory_registerSigner
/** * Register an implementation class for the given signer type. * * @param signerType The name of the signer type to register. * @param signerClass The class implementing the given signature protocol. */ public static void registerSigner( final String signerType, final Class<? extends Signer> signerClas...
3.68
hbase_WALKeyImpl_getNonce
/** Returns The nonce */ @Override public long getNonce() { return nonce; }
3.68
flink_MutableHashTable_open
/** * Opens the hash join. This method reads the build-side input and constructs the initial hash * table, gradually spilling partitions that do not fit into memory. * * @param buildSide Build side input. * @param probeSide Probe side input. * @param buildOuterJoin Whether outer join on build side. * @throws IOE...
3.68
flink_DynamicSinkUtils_prepareDynamicSink
/** * Prepares the given {@link DynamicTableSink}. It check whether the sink is compatible with the * INSERT INTO clause and applies initial parameters. */ private static void prepareDynamicSink( String tableDebugName, Map<String, String> staticPartitions, boolean isOverwrite, Dynamic...
3.68
hbase_Classes_extendedForName
/** * Equivalent of {@link Class#forName(String)} which also returns classes for primitives like * <code>boolean</code>, etc. The name of the class to retrieve. Can be either a normal class or a * primitive class. * @return The class specified by <code>className</code> If the requested class can not be found. */ p...
3.68
dubbo_ReferenceConfig_aggregateUrlFromRegistry
/** * Get URLs from the registry and aggregate them. */ private void aggregateUrlFromRegistry(Map<String, String> referenceParameters) { checkRegistry(); List<URL> us = ConfigValidationUtils.loadRegistries(this, false); if (CollectionUtils.isNotEmpty(us)) { for (URL u : us) { URL monit...
3.68
framework_VAbstractCalendarPanel_focusPreviousMonth
/** * Selects the previous month */ @SuppressWarnings("deprecation") private void focusPreviousMonth() { if (focusedDate == null) { return; } Date requestedPreviousMonthDate = (Date) focusedDate.clone(); removeOneMonth(requestedPreviousMonthDate); if (!isDateInsideRange(requestedPrevious...
3.68
hadoop_AbfsTokenRenewer_isManaged
/** * Checks if passed token is managed. * * @param token the token being checked * @return true if it is managed. * @throws IOException thrown when evaluating if token is managed. */ @Override public boolean isManaged(Token<?> token) throws IOException { return true; }
3.68
flink_ResultPartitionType_isPipelinedOrPipelinedBoundedResultPartition
/** * {@link #isPipelinedOrPipelinedBoundedResultPartition()} is used to judge whether it is the * specified {@link #PIPELINED} or {@link #PIPELINED_BOUNDED} resultPartitionType. * * <p>This method suitable for judgment conditions related to the specific implementation of * {@link ResultPartitionType}. * * <p>Th...
3.68
querydsl_GenericExporter_setNamePrefix
/** * Set the name prefix * * @param prefix */ public void setNamePrefix(String prefix) { codegenModule.bind(CodegenModule.PREFIX, prefix); }
3.68
flink_Task_deliverOperatorEvent
/** * Dispatches an operator event to the invokable task. * * <p>If the event delivery did not succeed, this method throws an exception. Callers can use * that exception for error reporting, but need not react with failing this task (this method * takes care of that). * * @throws FlinkException This method throw...
3.68
framework_ContainerEventProvider_ignoreContainerEvents
/** * Removes listeners from the container so no events are processed */ private void ignoreContainerEvents() { if (container instanceof ItemSetChangeNotifier) { ((ItemSetChangeNotifier) container) .removeItemSetChangeListener(this); } if (container instanceof ValueChangeNotifier) ...
3.68
hadoop_S3ListResult_representsEmptyDirectory
/** * Does this listing represent an empty directory? * @param dirKey directory key * @return true if the list is considered empty. */ public boolean representsEmptyDirectory( final String dirKey) { // If looking for an empty directory, the marker must exist but // no children. // So the listing must cont...
3.68
graphhopper_Entity_getStringField
/** @return the given column from the current row as a deduplicated String. */ protected String getStringField(String column, boolean required) throws IOException { return getFieldCheckRequired(column, required); }
3.68
open-banking-gateway_PaymentAccessFactory_paymentForAnonymousPsu
/** * Create {@code PaymentAccess} object that is similar to consent facing to anonymous (to OBG) user and ASPSP pair. * @param fintech Fintech that initiates the payment * @param aspsp ASPSP/Bank that is going to perform the payment * @param session Session that identifies the payment. * @return Payment context t...
3.68
framework_JsonCodec_valueChanged
/** * Compares the value with the reference. If they match, returns false. * * @param fieldValue * @param referenceValue * @return */ private static boolean valueChanged(JsonValue fieldValue, JsonValue referenceValue) { if (fieldValue instanceof JsonNull) { fieldValue = null; } if (fi...
3.68
flink_AbstractTopNFunction_setKeyContext
/** * Sets keyContext to RankFunction. * * @param keyContext keyContext of current function. */ public void setKeyContext(KeyContext keyContext) { this.keyContext = keyContext; }
3.68
hadoop_BulkDeleteRetryHandler_incrementStatistic
/** * Increment a statistic by a specific value. * This increments both the instrumentation and storage statistics. * @param statistic The operation to increment * @param count the count to increment */ protected void incrementStatistic(Statistic statistic, long count) { instrumentation.incrementCounter(statisti...
3.68
framework_InfoSection_show
/* * (non-Javadoc) * * @see com.vaadin.client.debug.internal.Section#show() */ @Override public void show() { refresh(); }
3.68
framework_VaadinSession_createConnectorId
/** * Generate an id for the given Connector. Connectors must not call this * method more than once, the first time they need an id. * * @param connector * A connector that has not yet been assigned an id. * @return A new id for the connector * * @deprecated As of 7.0. Use * {@link Vaadi...
3.68
flink_ParquetColumnarRowSplitReader_seekToRow
/** Seek to a particular row number. */ public void seekToRow(long rowCount) throws IOException { if (totalCountLoadedSoFar != 0) { throw new UnsupportedOperationException("Only support seek at first."); } List<BlockMetaData> blockMetaData = reader.getRowGroups(); for (BlockMetaData metaData :...
3.68
dubbo_DubboNamespaceHandler_registerAnnotationConfigProcessors
/** * Register the processors for the Spring Annotation-Driven features * * @param registry {@link BeanDefinitionRegistry} * @see AnnotationConfigUtils * @since 2.7.5 */ private void registerAnnotationConfigProcessors(BeanDefinitionRegistry registry) { AnnotationConfigUtils.registerAnnotationConfigProcessors(...
3.68
framework_ColorPickerPopup_setValue
/** * Sets the value of this object. If the new value is not equal to * {@code getValue()}, fires a {@link ValueChangeEvent}. Throws * {@code NullPointerException} if the value is null. * * @param color * the new value, not {@code null} * @throws NullPointerException * if {@code color} is...
3.68
pulsar_ResourceUsageTopicTransportManager_registerResourceUsagePublisher
/* * Register a resource owner (resource-group, tenant, namespace, topic etc). * * @param resource usage publisher */ public void registerResourceUsagePublisher(ResourceUsagePublisher r) { publisherMap.put(r.getID(), r); }
3.68
starts_Loadables_findUnreached
/** * This method takes (i) the dependencies that jdeps found and (i) the map from tests to reachable * types in the graph, and uses these to find types jdeps found but which are not reachable by any test. * @param deps The dependencies that jdeps found. * @param testDeps The map from test to types that can b...
3.68
hbase_StripeStoreFileManager_removeCompactedFiles
/** * Remove compacted files. */ private void removeCompactedFiles() { for (HStoreFile oldFile : this.compactedFiles) { byte[] oldEndRow = endOf(oldFile); List<HStoreFile> source = null; if (isInvalid(oldEndRow)) { source = getLevel0Copy(); } else { int stripeIndex = findStripeIndexByEnd...
3.68
framework_VCalendarPanel_isDateInsideRange
/** * Checks inclusively whether a date is inside a range of dates or not. * * @param date * @return */ private boolean isDateInsideRange(Date date, Resolution minResolution) { assert (date != null); return isAcceptedByRangeEnd(date, minResolution) && isAcceptedByRangeStart(date, minResolution...
3.68
zxing_BinaryBitmap_isCropSupported
/** * @return Whether this bitmap can be cropped. */ public boolean isCropSupported() { return binarizer.getLuminanceSource().isCropSupported(); }
3.68
flink_KvStateRegistry_getKvState
/** * Returns the {@link KvStateEntry} containing the requested instance as identified by the given * KvStateID, along with its {@link KvStateInfo} or <code>null</code> if none is registered. * * @param kvStateId KvStateID to identify the KvState instance * @return The {@link KvStateEntry} instance identified by t...
3.68
flink_BinaryStringDataUtil_hash
/** Calculate the hash value of a given string use {@link MessageDigest}. */ public static BinaryStringData hash(BinaryStringData str, MessageDigest md) { return hash(str.toBytes(), md); }
3.68
zilla_HpackContext_staticIndex15
// Index in static table for the given name of length 15 private static int staticIndex15(DirectBuffer name) { switch (name.getByte(14)) { case 'e': if (STATIC_TABLE[17].name.equals(name)) // accept-language { return 17; } break; case 'g': if (...
3.68
hadoop_RequestFactoryImpl_withStorageClass
/** * Storage class. * @param value new value * @return the builder */ public RequestFactoryBuilder withStorageClass(final StorageClass value) { storageClass = value; return this; }
3.68
hudi_CleanTask_newBuilder
/** * Utility to create builder for {@link CleanTask}. * * @return Builder for {@link CleanTask}. */ public static Builder newBuilder() { return new Builder(); }
3.68
graphhopper_DistanceCalcEarth_calcNormalizedDist
/** * Returns the specified length in normalized meter. */ @Override public double calcNormalizedDist(double dist) { double tmp = sin(dist / 2 / R); return tmp * tmp; }
3.68
flink_TemplateUtils_findResultOnlyTemplate
/** Hints that only declare a result (either accumulator or output). */ static @Nullable FunctionResultTemplate findResultOnlyTemplate( Set<FunctionResultTemplate> globalResultOnly, Set<FunctionResultTemplate> localResultOnly, Set<FunctionTemplate> explicitMappings, Function<FunctionTemp...
3.68
hbase_ConcurrentMapUtils_computeIfAbsentEx
/** * In HBASE-16648 we found that ConcurrentHashMap.get is much faster than computeIfAbsent if the * value already exists. So here we copy the implementation of * {@link ConcurrentMap#computeIfAbsent(Object, java.util.function.Function)}. It uses get and * putIfAbsent to implement computeIfAbsent. And notice that ...
3.68
morf_SchemaAdapter_getView
/** * @see org.alfasoftware.morf.metadata.Schema#getView(java.lang.String) */ @Override public View getView(String name) { return delegate.getView(name); }
3.68
hbase_ExampleMasterObserverWithMetrics_getMaxMemory
/** Returns the max memory of the process. We will use this to define a gauge metric */ private long getMaxMemory() { return Runtime.getRuntime().maxMemory(); }
3.68
hibernate-validator_GroupSequenceCheck_redefinesDefaultGroupSequence
/** * Check if the given {@link TypeMirror} redefines the default group sequence for the annotated class. * <p> * Note that it is only the case if the annotated element is a class. */ private boolean redefinesDefaultGroupSequence(TypeElement annotatedElement, TypeMirror typeMirror) { return ElementKind.CLASS.equal...
3.68
flink_CloseableIterable_empty
/** Returns an empty iterator. */ static <T> CloseableIterable<T> empty() { return new CloseableIterable.Empty<>(); }
3.68
flink_CsvReader_tupleType
/** * Configures the reader to read the CSV data and parse it to the given type. The type must be a * subclass of {@link Tuple}. The type information for the fields is obtained from the type * class. The type consequently needs to specify all generic field types of the tuple. * * @param targetType The class of the...
3.68