name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_Predicates_arePublicStaticFinalOfType | /**
* Tests that the field is {@code public static final} and has the fully qualified type name of
* {@code fqClassName}.
*/
public static DescribedPredicate<JavaField> arePublicStaticFinalOfType(String fqClassName) {
return arePublicStaticOfType(fqClassName).and(isFinal());
} | 3.68 |
hadoop_RLESparseResourceAllocation_toIntervalMap | /**
* Returns the representation of the current resources allocated over time as
* an interval map (in the defined non-null range).
*
* @return the representation of the current resources allocated over time as
* an interval map.
*/
public Map<ReservationInterval, Resource> toIntervalMap() {
readLock.l... | 3.68 |
framework_Margins_setMarginTop | /**
* Sets the height of the top margin.
*
* @param marginTop
* the top margin to set (in pixels)
*/
public void setMarginTop(int marginTop) {
this.marginTop = marginTop;
updateVertical();
} | 3.68 |
flink_HiveParserSemanticAnalyzer_doPhase1GetAllAggregations | // DFS-scan the expressionTree to find all aggregation subtrees and put them in aggregations.
private void doPhase1GetAllAggregations(
HiveParserASTNode expressionTree,
HashMap<String, HiveParserASTNode> aggregations,
List<HiveParserASTNode> wdwFns)
throws SemanticException {
int exp... | 3.68 |
dubbo_ServiceInstanceMetadataUtils_getEndpoint | /**
* Get the property value of port by the specified {@link ServiceInstance#getMetadata() the metadata of
* service instance} and protocol
*
* @param serviceInstance {@link ServiceInstance service instance}
* @param protocol the name of protocol, e.g, dubbo, rest, and so on
* @return if not found, return ... | 3.68 |
morf_DatabaseExceptionHelper_isCausedByTimeoutException | /**
* <p>Checks if the throwable was caused by timeout exception.</p>
* <b>This method has been tested for Oracle and MySQL only and might not work
* for other DB engines.</b>
*
* @param throwable to check
* @return true if the throwable is caused by a timeout, false otherwise
*/
public boolean isCausedByTimeout... | 3.68 |
zxing_CalendarParsedResult_isStartAllDay | /**
* @return true if start time was specified as a whole day
*/
public boolean isStartAllDay() {
return startAllDay;
} | 3.68 |
flink_FromJarEntryClassInformationProvider_getJobClassName | /**
* Returns the specified job class name that is either available in the corresponding {@code
* jarFile}. It can return an empty {@code Optional} if the job class is the entry class of the
* jar.
*
* @return Returns the job class that can be found in the respective {@code jarFile}. It can
* also return an e... | 3.68 |
hbase_UnsafeAccess_putInt | /**
* Put an int value out to the specified ByteBuffer offset in big-endian format.
* @param buf the ByteBuffer to write to
* @param offset offset in the ByteBuffer
* @param val int to write out
* @return incremented offset
*/
public static int putInt(ByteBuffer buf, int offset, int val) {
if (LITTLE_ENDI... | 3.68 |
hbase_RegionStates_addToOfflineRegions | // ==========================================================================
// Region offline helpers
// ==========================================================================
// TODO: Populated when we read meta but regions never make it out of here.
public void addToOfflineRegions(final RegionStateNode regionNo... | 3.68 |
framework_VaadinSession_removeRequestHandler | /**
* Removes a request handler from the session.
*
* @param handler
* the request handler to remove
*
* @since 7.0
*/
public void removeRequestHandler(RequestHandler handler) {
assert hasLock();
requestHandlers.remove(handler);
} | 3.68 |
hadoop_SinglePendingCommit_putExtraData | /**
* Set/Update an extra data entry.
* @param key key
* @param value value
*/
public void putExtraData(String key, String value) {
extraData.put(key, value);
} | 3.68 |
hbase_ServerManager_removeRegion | /**
* Called by delete table and similar to notify the ServerManager that a region was removed.
*/
public void removeRegion(final RegionInfo regionInfo) {
final byte[] encodedName = regionInfo.getEncodedNameAsBytes();
storeFlushedSequenceIdsByRegion.remove(encodedName);
flushedSequenceIdByRegion.remove(encodedN... | 3.68 |
framework_TouchScrollDelegate_readPositionAndSpeed | /**
*
* @param event
* @return
*/
private boolean readPositionAndSpeed(NativeEvent event) {
Touch touch = event.getChangedTouches().get(0);
lastClientY = touch.getClientY();
int eventIndx = nextEvent++;
eventIndx = eventIndx % EVENTS_FOR_SPEED_CALC;
eventTimeStamps[eventIndx] = getTimeStamp();
... | 3.68 |
flink_CompactingHashTable_assignPartition | /**
* Assigns a partition to a bucket.
*
* @param bucket bucket index
* @param numPartitions number of partitions
* @return The hash code for the integer.
*/
private static byte assignPartition(int bucket, byte numPartitions) {
return (byte) (bucket % numPartitions);
} | 3.68 |
hadoop_KMSMDCFilter_setContext | /**
* Sets the context with the given parameters.
* @param ugi the {@link UserGroupInformation} for the current request.
* @param method the http method
* @param requestURL the requested URL.
* @param remoteAddr the remote address of the client.
*/
@VisibleForTesting
public static void setContext(UserGroupInforma... | 3.68 |
hbase_ProcedureExecutor_bypassProcedure | /**
* Bypass a procedure. If the procedure is set to bypass, all the logic in execute/rollback will
* be ignored and it will return success, whatever. It is used to recover buggy stuck procedures,
* releasing the lock resources and letting other procedures run. Bypassing one procedure (and its
* ancestors will be b... | 3.68 |
hbase_HRegionFileSystem_getTempDir | // ===========================================================================
// Temp Helpers
// ===========================================================================
/** Returns {@link Path} to the region's temp directory, used for file creations */
public Path getTempDir() {
return new Path(getRegionDir(), R... | 3.68 |
hadoop_ResourceUsage_getReserved | /*
* Reserved
*/
public Resource getReserved() {
return getReserved(NL);
} | 3.68 |
pulsar_ConsumerConfiguration_getAckTimeoutMillis | /**
* @return the configured timeout in milliseconds for unacked messages.
*/
public long getAckTimeoutMillis() {
return conf.getAckTimeoutMillis();
} | 3.68 |
hbase_StoreFileListFile_listFiles | // file sequence id to path
private NavigableMap<Long, List<Path>> listFiles() throws IOException {
FileSystem fs = ctx.getRegionFileSystem().getFileSystem();
FileStatus[] statuses;
try {
statuses = fs.listStatus(trackFileDir);
} catch (FileNotFoundException e) {
LOG.debug("Track file directory {} does ... | 3.68 |
framework_Tree_removeAllActionHandlers | /**
* Removes all action handlers.
*/
public void removeAllActionHandlers() {
actionHandlers = null;
actionMapper = null;
markAsDirty();
} | 3.68 |
druid_StatViewServlet_process | /**
* 程序首先判断是否存在jmx连接地址,如果不存在,则直接调用本地的druid服务; 如果存在,则调用远程jmx服务。在进行jmx通信,首先判断一下jmx连接是否已经建立成功,如果已经
* 建立成功,则直接进行通信,如果之前没有成功建立,则会尝试重新建立一遍。.
*
* @param url 要连接的服务地址
* @return 调用服务后返回的json字符串
*/
protected String process(String url) {
String resp = null;
if (jmxUrl == null) {
resp = statService.service(u... | 3.68 |
framework_Table_setColumnReorderingAllowed | /**
* Sets whether column reordering is allowed or not.
*
* @param columnReorderingAllowed
* specifies whether column reordering is allowed.
*/
public void setColumnReorderingAllowed(boolean columnReorderingAllowed) {
if (columnReorderingAllowed != this.columnReorderingAllowed) {
this.column... | 3.68 |
hadoop_Trash_moveToTrash | /** Move a file or directory to the current trash directory.
*
* @param path the path.
* @return false if the item is already in the trash or trash is disabled
* @throws IOException raised on errors performing I/O.
*/
public boolean moveToTrash(Path path) throws IOException {
return trashPolicy.moveToTrash(path... | 3.68 |
flink_InputGateDeploymentDescriptor_getConsumedSubpartitionIndexRange | /** Return the index range of the consumed subpartitions. */
public IndexRange getConsumedSubpartitionIndexRange() {
return consumedSubpartitionIndexRange;
} | 3.68 |
flink_ProjectOperator_projectTuple11 | /**
* Projects a {@link Tuple} {@link DataSet} to the previously selected fields.
*
* @return The projected DataSet.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
ProjectOperator<T, Tuple11<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>>
projectTuple11()... | 3.68 |
framework_AbstractDateField_getDateStyles | /**
* Returns a map from dates to custom style names in each date's calendar
* cell.
*
* @return unmodifiable map from dates to custom style names in each date's
* calendar cell
*
* @see #setDateStyle(LocalDate, String)
* @since 8.3
*/
public Map<LocalDate, String> getDateStyles() {
HashMap<LocalDa... | 3.68 |
hadoop_CommonAuditContext_get | /**
* Get a context entry.
* @param key key
* @return value or null
*/
public String get(String key) {
Supplier<String> supplier = evaluatedEntries.get(key);
return supplier != null
? supplier.get()
: null;
} | 3.68 |
flink_StringColumnSummary_getEmptyCount | /** Number of empty strings e.g. java.lang.String.isEmpty(). */
public long getEmptyCount() {
return emptyCount;
} | 3.68 |
flink_DebeziumJsonFormatFactory_validateDecodingFormatOptions | /** Validator for debezium decoding format. */
private static void validateDecodingFormatOptions(ReadableConfig tableOptions) {
JsonFormatOptionsUtil.validateDecodingFormatOptions(tableOptions);
} | 3.68 |
hmily_HmilyTacParticipantCoordinator_buildHmilyParticipant | //TODO need review it with rpc.build-participant
private HmilyParticipant buildHmilyParticipant(final ProceedingJoinPoint point, final Long participantId, final Long participantRefId, final Long transId) {
HmilyParticipant hmilyParticipant = new HmilyParticipant();
if (null == participantId) {
hmilyPart... | 3.68 |
nifi-maven_NarDuplicateDependenciesMojo_execute | /*
* @see org.apache.maven.plugin.Mojo#execute()
*/
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
try {
NarDependencyUtils.ensureSingleNarDependencyExists(project);
// build the project for the nar artifact
final ProjectBuildingRequest narRequest = n... | 3.68 |
pulsar_BlobStoreBackedInputStreamImpl_refillBufferIfNeeded | /**
* Refill the buffered input if it is empty.
* @return true if there are bytes to read, false otherwise
*/
private boolean refillBufferIfNeeded() throws IOException {
if (buffer.readableBytes() == 0) {
if (cursor >= objectLen) {
return false;
}
long startRange = cursor;
... | 3.68 |
framework_VMenuBar_getSelected | /**
* Returns the currently selected item of this menu, or null if nothing is
* selected.
*
* @return
*/
public CustomMenuItem getSelected() {
return selected;
} | 3.68 |
hadoop_Endpoint_clone | /**
* Shallow clone: the lists of addresses are shared
* @return a cloned instance
* @throws CloneNotSupportedException
*/
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
} | 3.68 |
framework_FieldGroup_setItemDataSource | /**
* Updates the item that is used by this FieldBinder. Rebinds all fields to
* the properties in the new item.
*
* @param itemDataSource
* The new item to use
*/
public void setItemDataSource(Item itemDataSource) {
this.itemDataSource = itemDataSource;
bindFields();
} | 3.68 |
hadoop_AssumedRoleCredentialProvider_close | /**
* Propagate the close() call to the inner stsProvider.
*/
@Override
public void close() {
S3AUtils.closeAutocloseables(LOG, stsProvider, credentialsToSTS, stsClient);
} | 3.68 |
hbase_SequenceIdAccounting_update | /**
* We've been passed a new sequenceid for the region. Set it as highest seen for this region and
* if we are to record oldest, or lowest sequenceids, save it as oldest seen if nothing currently
* older.
* @param lowest Whether to keep running account of oldest sequence id.
*/
void update(byte[] encodedRegionNam... | 3.68 |
hadoop_EditLogInputStream_readOp | /**
* Read an operation from the stream
* @return an operation from the stream or null if at end of stream
* @throws IOException if there is an error reading from the stream
*/
public FSEditLogOp readOp() throws IOException {
FSEditLogOp ret;
if (cachedOp != null) {
ret = cachedOp;
cachedOp = null;
... | 3.68 |
zxing_EmailAddressParsedResult_getMailtoURI | /**
* @return "mailto:"
* @deprecated without replacement
*/
@Deprecated
public String getMailtoURI() {
return "mailto:";
} | 3.68 |
hbase_ScheduledChore_isValidTime | /** Return true if time is earlier or equal to current time */
private synchronized boolean isValidTime(final long time) {
return time > 0 && time <= EnvironmentEdgeManager.currentTime();
} | 3.68 |
hadoop_DeviceMappingManager_pickAndDoSchedule | /**
* If device plugin has own scheduler, then use it.
* Otherwise, pick our default scheduler to do scheduling.
* */
private void pickAndDoSchedule(Set<Device> allowed,
Map<Device, ContainerId> used, Set<Device> assigned,
Container c, int count, String resourceName,
DevicePluginScheduler dps)
throws... | 3.68 |
hadoop_AclUtil_getMinimalAcl | /**
* Translates the given permission bits to the equivalent minimal ACL.
*
* @param perm FsPermission to translate
* @return List<AclEntry> containing exactly 3 entries representing the
* owner, group and other permissions
*/
public static List<AclEntry> getMinimalAcl(FsPermission perm) {
return ... | 3.68 |
framework_ComplexRenderer_getConsumedEvents | /**
* Returns the events that the renderer should consume. These are also the
* events that the Grid will pass to
* {@link #onBrowserEvent(Cell, NativeEvent)} when they occur.
*
* @return a list of consumed events
*
* @see com.google.gwt.dom.client.BrowserEvents
*/
public Collection<String> getConsumedEvents() ... | 3.68 |
shardingsphere-elasticjob_TaskContext_from | /**
* Get task meta data info via string.
*
* @param value task meta data info string
* @return task meta data info
*/
public static MetaInfo from(final String value) {
String[] result = value.split(DELIMITER);
Preconditions.checkState(1 == result.length || 2 == result.length || 5 == result.length);
re... | 3.68 |
graphhopper_CustomModelParser_getVariableDeclaration | /**
* For the methods getSpeed and getPriority we declare variables that contain the encoded value of the current edge
* or if an area contains the current edge.
*/
private static String getVariableDeclaration(EncodedValueLookup lookup, final String arg) {
if (lookup.hasEncodedValue(arg)) {
EncodedValue ... | 3.68 |
framework_VTwinColSelect_isReadOnly | /**
* Returns {@code true} if this twin column select is in read only mode,
* {@code false} if not.
*
* @return {@code true} for read only, {@code false} for not read only
*/
public boolean isReadOnly() {
return readOnly;
} | 3.68 |
framework_AbstractTestUI_setContent | /**
* This method is inherited from the super class, but it should generally
* not be used. If you want to just add components to your test, use e.g.
* {@link #addComponent(Component)} instead to add the component to the
* layout used by this UI. If you don't want to use the top-level layout
* used by this class, ... | 3.68 |
querydsl_BooleanExpression_orAllOf | /**
* Create a {@code this or all(predicates)} expression
*
* <p>Return a union of this and the intersection of the given predicates</p>
*
* @param predicates intersection of predicates
* @return this or all(predicates)
*/
public BooleanExpression orAllOf(Predicate... predicates) {
return or(ExpressionUtils.... | 3.68 |
flink_Expander_substitute | /**
* Returns the SQL string with identifiers replaced according to the given unparse function.
*/
public String substitute(Function<SqlNode, String> fn) {
final SqlShuttle shuttle =
new SqlShuttle() {
@Override
public SqlNode visit(SqlCall call) {
S... | 3.68 |
flink_Conditions_haveLeafTypes | /**
* Tests leaf types of a method against the given predicate.
*
* <p>Given some {@link JavaType}, "leaf" types are recursively determined as described below.
* Leaf types are taken from argument, return, and (declared) exception types.
*
* <ul>
* <li>If the type is an array type, check its base component typ... | 3.68 |
morf_ObjectTreeTraverser_forCallback | /**
* Creates a new traverser for a callback.
* @param callback The callback
* @return the resulting traverser
*/
public static ObjectTreeTraverser forCallback(Callback callback) {
return new ObjectTreeTraverser(callback);
} | 3.68 |
hbase_PrivateCellUtil_getTags | /**
* Return tags in the given Cell as a List
* @param cell The Cell
* @return Tags in the given Cell as a List
*/
public static List<Tag> getTags(Cell cell) {
List<Tag> tags = new ArrayList<>();
Iterator<Tag> tagsItr = tagsIterator(cell);
while (tagsItr.hasNext()) {
tags.add(tagsItr.next());
}
return... | 3.68 |
dubbo_LoggerFactory_getAvailableAdapter | /**
* Get the available adapter names
*
* @return available adapter names
*/
public static List<String> getAvailableAdapter() {
Map<Class<? extends LoggerAdapter>, String> candidates = new HashMap<>();
candidates.put(Log4jLoggerAdapter.class, "log4j");
candidates.put(Slf4jLoggerAdapter.class, "slf4j");
... | 3.68 |
framework_AbstractComponentContainer_addComponent | /**
* This only implements the events and component parent calls. The extending
* classes must implement component list maintenance and call this method
* after component list maintenance.
*
* @see com.vaadin.ui.ComponentContainer#addComponent(Component)
*/
@Override
public void addComponent(Component c) {
//... | 3.68 |
flink_ResourceGuard_close | /**
* Closed the resource guard. This method will block until all calls to {@link
* #acquireResource()} have seen their matching call to {@link #releaseResource()}.
*/
@Override
public void close() {
closeUninterruptibly();
} | 3.68 |
framework_VAbstractSplitPanel_getSecondContainer | /**
* Gets the second region's container element.
*
* @since 7.5.1
* @return the container element
*/
protected Element getSecondContainer() {
return secondContainer;
} | 3.68 |
flink_CreditBasedPartitionRequestClientHandler_exceptionCaught | /**
* Called on exceptions in the client handler pipeline.
*
* <p>Remote exceptions are received as regular payload.
*/
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
if (cause instanceof TransportException) {
notifyAllChannelsOfErrorAndClose(cause);... | 3.68 |
hbase_StoreFileReader_passesBloomFilter | /**
* Checks whether the given scan passes the Bloom filter (if present). Only checks Bloom filters
* for single-row or single-row-column scans. Bloom filter checking for multi-gets is implemented
* as part of the store scanner system (see {@link StoreFileScanner#seek(Cell)} and uses the
* lower-level API {@link #p... | 3.68 |
hadoop_RBFMetrics_getDateString | /**
* Get time as a date string.
* @param time Seconds since 1970.
* @return String representing the date.
*/
@VisibleForTesting
static String getDateString(long time) {
if (time <= 0) {
return "-";
}
Date date = new Date(time);
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
return sdf.for... | 3.68 |
morf_MergeStatementBuilder_set | /**
* Adds a merge expression to be used when updating existing records.
*
* @param updateExpression the merge expressions, aliased as target field name.
* @return this, for method chaining.
*/
public UpdateValuesOverrider set(AliasedFieldBuilder updateExpression) {
expressions.add(updateExpression.build());
r... | 3.68 |
pulsar_AuthorizationService_canLookupAsync | /**
* Check whether the specified role can perform a lookup for the specified topic.
*
* For that the caller needs to have producer or consumer permission.
*
* @param topicName
* @param role
* @return
* @throws Exception
*/
public CompletableFuture<Boolean> canLookupAsync(TopicName topicName, String role,
... | 3.68 |
hbase_MobFileName_getStartKey | /**
* Gets the hex string of the md5 for a start key.
* @return The hex string of the md5 for a start key.
*/
public String getStartKey() {
return startKey;
} | 3.68 |
flink_DoubleZeroConvergence_isConverged | /**
* Returns true, if the aggregator value is zero, false otherwise.
*
* @param iteration The number of the iteration superstep. Ignored in this case.
* @param value The aggregator value, which is compared to zero.
* @return True, if the aggregator value is zero, false otherwise.
*/
@Override
public boolean isCo... | 3.68 |
hadoop_CommitContext_buildSubmitters | /**
* Build the submitters and thread pools if the number of committerThreads
* is greater than zero.
* This should only be called in constructors; it is synchronized to keep
* SpotBugs happy.
*/
private synchronized void buildSubmitters() {
if (committerThreads != 0) {
outerSubmitter = new PoolSubmitter(bui... | 3.68 |
dubbo_ApplicationModel_setConfigManager | /**
* @deprecated only for ut
*/
@Deprecated
public void setConfigManager(ConfigManager configManager) {
this.configManager = configManager;
} | 3.68 |
hbase_VersionInfo_getUser | /**
* The user that compiled hbase.
* @return the username of the user
*/
public static String getUser() {
return Version.user;
} | 3.68 |
morf_ChangeIndex_accept | /**
* {@inheritDoc}
*
* @see org.alfasoftware.morf.upgrade.SchemaChange#accept(org.alfasoftware.morf.upgrade.SchemaChangeVisitor)
*/
@Override
public void accept(SchemaChangeVisitor visitor) {
visitor.visit(this);
} | 3.68 |
flink_JobSubmissionResult_getJobID | /**
* Returns the JobID assigned to the job by the Flink runtime.
*
* @return jobID, or null if the job has been executed on a runtime without JobIDs or if the
* execution failed.
*/
public JobID getJobID() {
return jobID;
} | 3.68 |
hadoop_AzureFileSystemInstrumentation_rawBytesDownloaded | /**
* Indicate that we just downloaded some data to Azure storage.
* @param numberOfBytes The raw number of bytes downloaded (including overhead).
*/
public void rawBytesDownloaded(long numberOfBytes) {
rawBytesDownloaded.incr(numberOfBytes);
} | 3.68 |
AreaShop_CommandManager_showHelp | /**
* Shows the help page for the CommandSender.
* @param target The CommandSender to show the help to
*/
public void showHelp(CommandSender target) {
if(!target.hasPermission("areashop.help")) {
plugin.message(target, "help-noPermission");
return;
}
// Add all messages to a list
ArrayList<String> messages =... | 3.68 |
hadoop_AbstractS3ACommitter_initiateJobOperation | /**
* Start the final job commit/abort commit operations.
* If configured to collect statistics,
* The IO StatisticsContext is reset.
* @param context job context
* @return a commit context through which the operations can be invoked.
* @throws IOException failure.
*/
protected CommitContext initiateJobOperation... | 3.68 |
hbase_AuthMethod_getMechanismName | /** Return the SASL mechanism name */
public String getMechanismName() {
return mechanismName;
} | 3.68 |
flink_ProducerMergedPartitionFileWriter_calculateSizeAndFlushBuffers | /**
* Compute buffer's file offset and create buffers to be flushed.
*
* @param toWrite all buffers to write to create {@link
* ProducerMergedPartitionFileIndex.FlushedBuffer}s
* @param buffers receive the created {@link ProducerMergedPartitionFileIndex.FlushedBuffer}
*/
private void calculateSizeAndFlushBuff... | 3.68 |
hbase_StorageClusterStatusModel_setStores | /**
* @param stores the number of stores
*/
public void setStores(int stores) {
this.stores = stores;
} | 3.68 |
graphhopper_VectorTile_getKeysBytes | /**
* <pre>
* Dictionary encoding for keys
* </pre>
*
* <code>repeated string keys = 3;</code>
*/
public com.google.protobuf.ByteString
getKeysBytes(int index) {
return keys_.getByteString(index);
} | 3.68 |
AreaShop_BuyRegion_getBuyer | /**
* Get the UUID of the owner of this region.
* @return The UUID of the owner of this region
*/
public UUID getBuyer() {
String buyer = config.getString("buy.buyer");
if(buyer != null) {
try {
return UUID.fromString(buyer);
} catch(IllegalArgumentException e) {
// Incorrect UUID
}
}
return null;
} | 3.68 |
flink_NormalizedKeySorter_getIterator | /**
* Gets an iterator over all records in this buffer in their logical order.
*
* @return An iterator returning the records in their logical order.
*/
@Override
public final MutableObjectIterator<T> getIterator() {
return new MutableObjectIterator<T>() {
private final int size = size();
private... | 3.68 |
framework_VCalendar_setDayNames | /**
* Set the names of the week days.
*
* @param names
* The names of the days (Monday, Thursday,...)
*/
public void setDayNames(String[] names) {
assert (names.length == 7);
dayNames = names;
} | 3.68 |
MagicPlugin_Mage_setVelocity | // This does not actually apply velocity!
public void setVelocity(Vector velocity) {
this.velocity = velocity;
} | 3.68 |
hudi_HoodieInMemoryHashIndex_isImplicitWithStorage | /**
* Index needs to be explicitly updated after storage write.
*/
@Override
public boolean isImplicitWithStorage() {
return false;
} | 3.68 |
hadoop_StagingCommitter_taskAttemptWorkingPath | /**
* Get the work path for a task.
* @param context job/task complex
* @param uuid UUID
* @return a path
* @throws IOException failure to build the path
*/
private static Path taskAttemptWorkingPath(TaskAttemptContext context,
String uuid) throws IOException {
return getTaskAttemptPath(context,
Paths... | 3.68 |
framework_GridRefreshWithGetId_equals | /**
* The class intentionally has strange {@code hashCode()} and
* {@code equals()} implementation to ensure if {@code Grid} relies on
* bean id rather than on bean hashcode/equals identification.
*
* {@see Object.equals}
*/
@Override
public boolean equals(Object o) {
if (this == o)
return true;
i... | 3.68 |
hmily_HmilyMySQLUpdateStatement_getLimit | /**
* Get order by segment.
*
* @return order by segment
*/
public Optional<HmilyLimitSegment> getLimit() {
return Optional.ofNullable(limit);
} | 3.68 |
open-banking-gateway_ValidationIssue_toString | /**
* @return JSON representation of current object.
*/
@Override
public String toString() {
return "{"
+ "\"type\":\"" + type + "\""
+ ", \"scope\":\"" + scope + "\""
+ ", \"code\":\"" + code + "\""
+ ", \"captionMessage\":\"" + captionMessage + "\""
+ ... | 3.68 |
streampipes_PipelineManager_getAllPipelines | /**
* Returns all pipelines
*
* @return all pipelines
*/
public static List<Pipeline> getAllPipelines() {
return StorageDispatcher.INSTANCE.getNoSqlStore().getPipelineStorageAPI().getAllPipelines();
} | 3.68 |
flink_MemoryManager_availableMemory | /**
* Returns the available amount of memory handled by this memory manager.
*
* @return The available amount of memory.
*/
public long availableMemory() {
return memoryBudget.getAvailableMemorySize();
} | 3.68 |
querydsl_AbstractEvaluatorFactory_createEvaluator | /**
* Create a new Evaluator instance
*
* @param <T>
* projection type
* @param source
* expression in Java source code form
* @param projection
* type of the source expression
* @param names
* names of the arguments
* @param types
* types of the argum... | 3.68 |
flink_ModifyKindSet_newBuilder | /** Builder for configuring and creating instances of {@link ModifyKindSet}. */
public static Builder newBuilder() {
return new Builder();
} | 3.68 |
hmily_HmilyConsistentHashLoadBalance_select | /**
* Use load balancing to select invoker.
*
* @param invocation invocation
* @return Invoker
* @throws NoInvokerException NoInvokerException
*/
@Override
public Invoker<T> select(final InvokeContext invocation) throws NoInvokerException {
long consistentHash = Math.abs(StringUtils.convertLong(invocation.get... | 3.68 |
framework_VScrollTable_getNavigationPageUpKey | /**
* Get the key the moves the selection one page up in the table. By default
* this is the Page Up key but by overriding this you can change the key to
* whatever you want.
*
* @return
*/
protected int getNavigationPageUpKey() {
return KeyCodes.KEY_PAGEUP;
} | 3.68 |
AreaShop_GeneralRegion_getSignsFeature | /**
* Get the signs feature to manipulate and update signs.
* @return The SignsFeature of this region
*/
public SignsFeature getSignsFeature() {
return getFeature(SignsFeature.class);
} | 3.68 |
dubbo_URLParam_getRawParam | /**
* get raw string like parameters
*
* @return raw string like parameters
*/
public String getRawParam() {
if (StringUtils.isNotEmpty(rawParam)) {
return rawParam;
} else {
// empty if parameters have been modified or init by Map
return toString();
}
} | 3.68 |
hadoop_StagingCommitter_getPendingTaskAttemptsPath | /**
* Compute the path where the output of pending task attempts are stored.
* @param context the context of the job with pending tasks.
* @return the path where the output of pending task attempts are stored.
*/
private static Path getPendingTaskAttemptsPath(JobContext context, Path out) {
return new Path(getJob... | 3.68 |
framework_VaadinSession_getSession | /**
* Gets the underlying session to which this service session is currently
* associated.
*
* @return the wrapped session for this context
*/
public WrappedSession getSession() {
/*
* This is used to fetch the underlying session and there is no need for
* having a lock when doing this. On the contra... | 3.68 |
hadoop_ParentQueue_addDynamicChildQueue | // New method to add child queue
private CSQueue addDynamicChildQueue(String childQueuePath, boolean isLeaf)
throws SchedulerDynamicEditException {
writeLock.lock();
try {
// Check if queue exists, if queue exists, write a warning message (this
// should not happen, since it will be handled before calli... | 3.68 |
framework_LegacyLocatorStrategy_getDOMPathForElement | /**
* Generates a String locator using domChild[x] parts for the element
* relative to the baseElement.
*
* @param element
* The target element
* @param baseElement
* The starting point for the locator. The generated path is
* relative to this element.
* @return A String locato... | 3.68 |
hbase_BulkLoadHFilesTool_tableExists | /**
* @throws TableNotFoundException if table does not exist.
*/
private void tableExists(AsyncClusterConnection conn, TableName tableName) throws IOException {
if (!FutureUtils.get(conn.getAdmin().tableExists(tableName))) {
throwAndLogTableNotFoundException(tableName);
}
} | 3.68 |
flink_TSetClientInfoReq_isSetSessionHandle | /**
* Returns true if field sessionHandle is set (has been assigned a value) and false otherwise
*/
public boolean isSetSessionHandle() {
return this.sessionHandle != null;
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.