name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_Preconditions_format | /**
* A simplified formatting method. Similar to {@link String#format(String, Object...)}, but with
* lower overhead (only String parameters, no locale, no format validation).
*
* <p>This method is taken quasi verbatim from the Guava Preconditions class.
*/
private static String format(@Nullable String template, @... | 3.68 |
flink_TimeWindow_getWindowStartWithOffset | /**
* Method to get the window start for a timestamp.
*
* @param timestamp epoch millisecond to get the window start.
* @param offset The offset which window start would be shifted by.
* @param windowSize The size of the generated windows.
* @return window start
*/
public static long getWindowStartWithOffset(lon... | 3.68 |
dubbo_AbstractRegistryFactory_createRegistryCacheKey | /**
* Create the key for the registries cache.
* This method may be overridden by the sub-class.
*
* @param url the registration {@link URL url}
* @return non-null
*/
protected String createRegistryCacheKey(URL url) {
return url.toServiceStringWithoutResolving();
} | 3.68 |
flink_BufferConsumer_isDataAvailable | /** Returns true if there is new data available for reading. */
public boolean isDataAvailable() {
return currentReaderPosition < writerPosition.getLatest();
} | 3.68 |
framework_VColorPickerArea_refreshColor | /**
* Update the color area with the currently set color.
*/
public void refreshColor() {
if (color != null) {
// Set the color
area.getElement().getStyle().setProperty("background", color);
}
} | 3.68 |
hadoop_YarnRegistryViewForProviders_registerSelf | /**
* Add a service under a path for the current user.
* @param record service record
* @param deleteTreeFirst perform recursive delete of the path first
* @return the path the service was created at
* @throws IOException
*/
public String registerSelf(
ServiceRecord record,
boolean deleteTreeFirst) throws... | 3.68 |
flink_TimeWindowUtil_toEpochMills | /**
* Convert a timestamp mills with the given timezone to epoch mills.
*
* @param utcTimestampMills the timezone that the given timestamp mills has been shifted.
* @param shiftTimeZone the timezone that the given timestamp mills has been shifted.
* @return the epoch mills.
*/
public static long toEpochMills(long... | 3.68 |
flink_JoinOperator_projectTuple8 | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7>
ProjectJoin<I1, I2, Tuple8<T0, T1, T2, ... | 3.68 |
hbase_MultiTableSnapshotInputFormatImpl_getSnapshotsToScans | /**
* Retrieve the snapshot name -> list<scan> mapping pushed to configuration by
* {@link #setSnapshotToScans(Configuration, Map)}
* @param conf Configuration to extract name -> list<scan> mappings from.
* @return the snapshot name -> list<scan> mapping pushed to configuration
*/
public... | 3.68 |
flink_ExceptionUtils_findThrowable | /**
* Checks whether a throwable chain contains an exception matching a predicate and returns it.
*
* @param throwable the throwable chain to check.
* @param predicate the predicate of the exception to search for in the chain.
* @return Optional throwable of the requested type if available, otherwise empty
*/
pub... | 3.68 |
framework_TestBench_getTestableClassesForPackage | /**
* Return all testable classes within given package. Class is considered
* testable if it's superclass is Application or CustomComponent.
*
* @param packageName
* @return
* @throws ClassNotFoundException
*/
public static List<Class<?>> getTestableClassesForPackage(
String packageName) throws Exception... | 3.68 |
graphhopper_WayToEdgesMap_reserve | /**
* We need to reserve a way before we can put the associated edges into the map.
* This way we can define a set of keys/ways for which we shall add edges later.
*/
public void reserve(long way) {
offsetIndexByWay.put(way, RESERVED);
} | 3.68 |
framework_SelectItemCaptionRefresh_getTicketNumber | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
protected Integer getTicketNumber() {
return 9250;
} | 3.68 |
dubbo_InjvmExporterListener_exported | /**
* Overrides the exported method to add the given exporter to the exporters ConcurrentHashMap,
* <p>
* and to notify all registered ExporterChangeListeners of the export event.
*
* @param exporter The Exporter instance that has been exported.
* @throws RpcException If there is an error during the export proces... | 3.68 |
hbase_HBaseTestingUtility_loadTable | /**
* Load table of multiple column families with rows from 'aaa' to 'zzz'.
* @param t Table
* @param f Array of Families to load
* @param value the values of the cells. If null is passed, the row key is used as value
* @return Count of rows loaded.
*/
public int loadTable(final Table t, final byte[][] f,... | 3.68 |
hbase_OrderedBytes_isBlobCopy | /**
* Return true when the next encoded value in {@code src} uses BlobCopy encoding, false otherwise.
*/
public static boolean isBlobCopy(PositionedByteRange src) {
return BLOB_COPY
== (-1 == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
} | 3.68 |
querydsl_BeanMap_setValue | /**
* Sets the value.
*
* @param value the new value for the entry
* @return the old value for the entry
*/
@Override
public Object setValue(Object value) {
String key = getKey();
Object oldValue = owner.get(key);
owner.put(key, value);
Object newValue = owner.get(key);
this.value = newValue;
... | 3.68 |
streampipes_AbstractProcessingElementBuilder_setStream1 | /**
* @deprecated Use {@link #requiredStream(CollectedStreamRequirements)} instead
*/
@Deprecated(since = "0.90.0", forRemoval = true)
public K setStream1() {
stream1 = true;
return me();
} | 3.68 |
querydsl_Expressions_setPath | /**
* Create a new Path expression
*
* @param type element type
* @param queryType element expression type
* @param metadata path metadata
* @param <E> element type
* @param <Q> element expression type
* @return path expression
*/
public static <E, Q extends SimpleExpression<? super E>> SetPath<E, Q> setPath(C... | 3.68 |
hudi_OrcUtils_fetchRecordKeysWithPositions | /**
* Fetch {@link HoodieKey}s from the given ORC file.
*
* @param filePath The ORC file path.
* @param configuration configuration to build fs object
* @return {@link List} of {@link HoodieKey}s fetched from the ORC file
*/
@Override
public List<Pair<HoodieKey, Long>> fetchRecordKeysWithPositions(Configurat... | 3.68 |
pulsar_LoadSimulationController_handleGroupTrade | // Handle the command line arguments associated with the group trade command.
private void handleGroupTrade(final ShellArguments arguments) throws Exception {
final List<String> commandArguments = arguments.commandArguments;
// Group trade expects 3 application arguments: tenant name, group name,
// and num... | 3.68 |
hadoop_DataNodeFaultInjector_badDecoding | /**
* Used as a hook to inject data pollution
* into an erasure coding reconstruction.
*/
public void badDecoding(ByteBuffer[] outputs) {} | 3.68 |
hbase_HBaseTestingUtility_countRows | /**
* Return the number of rows in the given table.
*/
public int countRows(final TableName tableName) throws IOException {
Table table = getConnection().getTable(tableName);
try {
return countRows(table);
} finally {
table.close();
}
} | 3.68 |
graphhopper_VectorTile_hasUintValue | /**
* <code>optional uint64 uint_value = 5;</code>
*/
public boolean hasUintValue() {
return ((bitField0_ & 0x00000010) == 0x00000010);
} | 3.68 |
framework_BackEndDataProvider_setSortOrders | /**
* Sets the sort order to use, given a {@link QuerySortOrderBuilder}.
* Shorthand for {@code setSortOrders(builder.build())}.
*
* @see QuerySortOrderBuilder
*
* @param builder
* the sort builder to retrieve the sort order from
* @throws NullPointerException
* if builder is null
*/
de... | 3.68 |
hbase_BackupManager_readBackupStartCode | /**
* Read the last backup start code (timestamp) of last successful backup. Will return null if
* there is no startcode stored in backup system table or the value is of length 0. These two
* cases indicate there is no successful backup completed so far.
* @return the timestamp of a last successful backup
* @throw... | 3.68 |
flink_CheckpointedInputGate_getNumberOfInputChannels | /** @return number of underlying input channels. */
public int getNumberOfInputChannels() {
return inputGate.getNumberOfInputChannels();
} | 3.68 |
hadoop_TimelineStateStore_serviceStop | /**
* Shutdown the state storage.
*
* @throws IOException
*/
@Override
public void serviceStop() throws IOException {
closeStorage();
} | 3.68 |
hadoop_FlowRunCoprocessor_preScannerOpen | /*
* (non-Javadoc)
*
* Ensures that max versions are set for the Scan so that metrics can be
* correctly aggregated and min/max can be correctly determined.
*
* @see
* org.apache.hadoop.hbase.coprocessor.BaseRegionObserver#preScannerOpen(org
* .apache.hadoop.hbase.coprocessor.ObserverContext,
* org.apache.hado... | 3.68 |
hbase_HRegionFileSystem_getStoreDir | // ===========================================================================
// Store/StoreFile Helpers
// ===========================================================================
/**
* Returns the directory path of the specified family
* @param familyName Column Family Name
* @return {@link Path} to the direct... | 3.68 |
hadoop_LongLong_toString | /** {@inheritDoc} */
@Override
public String toString() {
final int remainder = BITS_PER_LONG % 4;
return String.format("%x*2^%d + %016x", d1<<remainder, BITS_PER_LONG-remainder, d0);
} | 3.68 |
shardingsphere-elasticjob_TaskContext_getTaskName | /**
* Get task name.
*
* @return task name
*/
public String getTaskName() {
return String.join(DELIMITER, metaInfo.toString(), type.toString(), slaveId);
} | 3.68 |
framework_AbstractSelect_setItemIcon | /**
* Sets the icon for an item.
*
* @param itemId
* the id of the item to be assigned an icon.
* @param icon
* the icon to use or null.
*/
public void setItemIcon(Object itemId, Resource icon) {
if (itemId != null) {
if (icon == null) {
itemIcons.remove(itemId);
... | 3.68 |
pulsar_WorkerServiceLoader_load | /**
* Load the worker services for the given <tt>protocol</tt> list.
*
* @param wsNarPackage worker service nar package
* @param narExtractionDirectory the directory to extract nar directory
* @return the worker service
*/
static WorkerService load(String wsNarPackage, String narExtractionDirectory) {
if (isE... | 3.68 |
flink_MemoryManager_getPageSize | /**
* Gets the size of the pages handled by the memory manager.
*
* @return The size of the pages handled by the memory manager.
*/
public int getPageSize() {
return (int) pageSize;
} | 3.68 |
zxing_MinimalEncoder_getDataBytes | // Important: The function does not return the length bytes (one or two) in case of B256 encoding
byte[] getDataBytes() {
switch (mode) {
case ASCII:
if (input.isECI(fromPosition)) {
return getBytes(241,input.getECIValue(fromPosition) + 1);
} else if (isExtendedASCII(input.charAt(fromPosition)... | 3.68 |
hudi_HoodieMetaSyncOperations_getAllPartitions | /**
* Get all partitions for the table in the metastore.
*/
default List<Partition> getAllPartitions(String tableName) {
return Collections.emptyList();
} | 3.68 |
flink_BlobLibraryCacheManager_getNumberOfReferenceHolders | /**
* Gets the number of tasks holding {@link ClassLoader} references for the given job.
*
* @param jobId ID of a job
* @return number of reference holders
*/
int getNumberOfReferenceHolders(JobID jobId) {
synchronized (lockObject) {
LibraryCacheEntry entry = cacheEntries.get(jobId);
return ent... | 3.68 |
hbase_RegionInfo_getTable | /**
* Gets the table name from the specified region name.
* @param regionName to extract the table name from
* @return Table name
*/
@InterfaceAudience.Private
// This method should never be used. Its awful doing parse from bytes.
// It is fallback in case we can't get the tablename any other way. Could try removin... | 3.68 |
flink_TpchResultComparator_round | /** Rounding function defined in TPC-H standard specification v2.18.0 chapter 10. */
private static double round(double x, int m) {
if (x < 0) {
throw new IllegalArgumentException("x must be non-negative");
}
double y = x + 5 * Math.pow(10, -m - 1);
double z = y * Math.pow(10, m);
double q =... | 3.68 |
morf_SqlScriptExecutor_withQueryTimeout | /**
* @see org.alfasoftware.morf.jdbc.SqlScriptExecutor.QueryBuilder#withQueryTimeout(int)
*/
@Override
public QueryBuilder withQueryTimeout(int queryTimeout) {
this.queryTimeout = Optional.of(queryTimeout);
return this;
} | 3.68 |
graphhopper_Instruction_getSign | /**
* The instruction for the person/driver to execute.
*/
public int getSign() {
return sign;
} | 3.68 |
framework_DesignContext_writePackageMappings | /**
* Writes the package mappings (prefix -> package name) of this object to
* the specified document.
* <p>
* The prefixes are stored as <meta> tags under <head> in the document.
*
* @param doc
* the Jsoup document tree where the package mappings are written
*/
public void writePackageMappings(Docum... | 3.68 |
flink_PythonEnvUtils_startGatewayServer | /**
* Creates a GatewayServer run in a daemon thread.
*
* @return The created GatewayServer
*/
static GatewayServer startGatewayServer() throws ExecutionException, InterruptedException {
CompletableFuture<GatewayServer> gatewayServerFuture = new CompletableFuture<>();
Thread thread =
new Thread(... | 3.68 |
framework_ApplicationConfiguration_isDebugMode | /**
* Checks if client side is in debug mode. Practically this is invoked by
* adding ?debug parameter to URI. Please note that debug mode is always
* disabled if production mode is enabled, but disabling production mode
* does not automatically enable debug mode.
*
* @see #isProductionMode()
*
* @return true i... | 3.68 |
hibernate-validator_ISBNValidator_checkChecksumISBN10 | /**
* Check the digits for ISBN 10 using algorithm from
* <a href="https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digits">Wikipedia</a>.
*/
private static boolean checkChecksumISBN10(String isbn) {
int sum = 0;
for ( int i = 0; i < isbn.length() - 1; i++ ) {
sum += ( isbn.charAt( ... | 3.68 |
flink_TypeExtractionUtils_sameTypeVars | /** Checks whether two types are type variables describing the same. */
public static boolean sameTypeVars(Type t1, Type t2) {
return t1 instanceof TypeVariable
&& t2 instanceof TypeVariable
&& ((TypeVariable<?>) t1).getName().equals(((TypeVariable<?>) t2).getName())
&& ((TypeVar... | 3.68 |
morf_AbstractSqlDialectTest_expectedUsesNVARCHARforStrings | /**
* Override to set the expected NVARCHAR behaviour.
* @return whether to use NVARCHAR for strings or not
*/
protected boolean expectedUsesNVARCHARforStrings() {
return false;
} | 3.68 |
flink_ExtractionUtils_extractConstructorParameterNames | /**
* Extracts ordered parameter names from a constructor that takes all of the given fields with
* matching (possibly primitive and lenient) type and name.
*/
private static @Nullable List<String> extractConstructorParameterNames(
Constructor<?> constructor, List<Field> fields) {
final Type[] parameterT... | 3.68 |
framework_Range_intersects | /**
* Checks whether this range and another range are at least partially
* covering the same values.
*
* @param other
* the other range to check against
* @return <code>true</code> if this and <code>other</code> intersect
*/
public boolean intersects(final Range other) {
return getStart() < other.... | 3.68 |
pulsar_ResourceUnitRanking_estimateMaxCapacity | /**
* Estimate the maximum number of namespace bundles ths ResourceUnit is able to handle with all resource.
*/
public long estimateMaxCapacity(ResourceQuota defaultQuota) {
return calculateBrokerMaxCapacity(this.systemResourceUsage, defaultQuota);
} | 3.68 |
streampipes_TextDocument_getTitle | /**
* Returns the "main" title for this document, or <code>null</code> if no such title has ben set.
*
* @return The "main" title.
*/
public String getTitle() {
return title;
} | 3.68 |
hadoop_User_getLastLogin | /**
* Get the time of the last login.
* @return the number of milliseconds since the beginning of time.
*/
public long getLastLogin() {
return lastLogin;
} | 3.68 |
flink_OperationManager_closeOperation | /**
* Close the operation and release all resources used by the {@link Operation}.
*
* @param operationHandle identifies the {@link Operation}.
*/
public void closeOperation(OperationHandle operationHandle) {
writeLock(
() -> {
Operation opToRemove = submittedOperations.remove(operat... | 3.68 |
hadoop_LongBitFormat_retrieve | /** Retrieve the value from the record. */
public long retrieve(long record) {
return (record & MASK) >>> OFFSET;
} | 3.68 |
flink_ExtractionUtils_collectStructuredMethods | /** Collects all methods that qualify as methods of a {@link StructuredType}. */
static List<Method> collectStructuredMethods(Class<?> clazz) {
final List<Method> methods = new ArrayList<>();
while (clazz != Object.class) {
final Method[] declaredMethods = clazz.getDeclaredMethods();
Stream.of(d... | 3.68 |
dubbo_ConfigurationUtils_getEnvConfiguration | /**
* For compact single instance
*
* @deprecated Replaced to {@link ConfigurationUtils#getEnvConfiguration(ScopeModel)}
*/
@Deprecated
public static Configuration getEnvConfiguration() {
return ApplicationModel.defaultModel().modelEnvironment().getEnvironmentConfiguration();
} | 3.68 |
flink_FlinkExtendedParser_parseSet | /**
* Convert the statement to {@link SetOperation} with Flink's parse rule.
*
* @return the {@link SetOperation}, empty if the statement is not set command.
*/
public static Optional<Operation> parseSet(String statement) {
if (SetOperationParseStrategy.INSTANCE.match(statement)) {
return Optional.of(Se... | 3.68 |
rocketmq-connect_ColumnDefinition_displaySize | /**
* Indicates the column's normal maximum width in characters.
*
* @return the normal maximum number of characters allowed as the width of the designated column
*/
public int displaySize() {
return displaySize;
} | 3.68 |
hibernate-validator_Filters_excludeInterfaces | /**
* Returns a filter which excludes interfaces.
*
* @return a filter which excludes interfaces
*/
public static Filter excludeInterfaces() {
return INTERFACES_FILTER;
} | 3.68 |
zxing_DataBlock_getDataBlocks | /**
* <p>When QR Codes use multiple data blocks, they are actually interleaved.
* That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This
* method will separate the data into original blocks.</p>
*
* @param rawCodewords bytes as read directly from the QR Code
* @param versi... | 3.68 |
framework_GridConnector_purgeRemovedColumns | /**
* Removes any orphan columns that has been removed from the state from the
* grid
*/
private void purgeRemovedColumns() {
// Get columns still registered in the state
Set<String> columnsInState = new HashSet<String>();
for (GridColumnState columnState : getState().columns) {
columnsInState.a... | 3.68 |
hbase_SnapshotInfo_getMobStoreFilePercentage | /** Returns the percentage of the mob store files */
public float getMobStoreFilePercentage() {
return ((float) hfilesMobSize.get() / (getStoreFilesSize())) * 100;
} | 3.68 |
flink_AliasOperationUtils_createAliasList | /**
* Creates a list of valid alias expressions. Resulting expression might still contain {@link
* UnresolvedReferenceExpression}.
*
* @param aliases aliases to validate
* @param child relational operation on top of which to apply the aliases
* @return validated list of aliases
*/
static List<Expression> createA... | 3.68 |
querydsl_MultiSurfaceExpression_area | /**
* The area of this MultiSurface, as measured in the spatial reference system of this MultiSurface.
*
* @return area
*/
public NumberExpression<Double> area() {
if (area == null) {
area = Expressions.numberOperation(Double.class, SpatialOps.AREA, mixin);
}
return area;
} | 3.68 |
pulsar_AdminProxyHandler_copyRequest | /**
* Ensure the Authorization header is carried over after a 307 redirect
* from brokers.
*/
@Override
protected Request copyRequest(HttpRequest oldRequest, URI newURI) {
String authorization = oldRequest.getHeaders().get(HttpHeader.AUTHORIZATION);
Request newRequest = super.copyRequest(oldRequest, newURI);... | 3.68 |
hbase_FilterList_filterRowCells | /**
* Filters that never filter by modifying the returned List of Cells can inherit this
* implementation that does nothing. {@inheritDoc}
*/
@Override
public void filterRowCells(List<Cell> cells) throws IOException {
filterListBase.filterRowCells(cells);
} | 3.68 |
flink_SplitsChange_splits | /** @return the list of splits. */
public List<SplitT> splits() {
return Collections.unmodifiableList(splits);
} | 3.68 |
morf_GraphBasedUpgradeBuilder_analyzeDependency | /**
* Checks dependencies of current node and previously processed node to
* establish if an edge should be added.
*
* @param processed previously processed node
* @param node current node
* @param remainingReads read-level dependencies which haven't been reflected in the graph so far
* @param remainingModifies ... | 3.68 |
hadoop_AbstractRouterPolicy_getReservationHomeSubcluster | /**
* This method provides a wrapper of all policy functionalities for routing a
* reservation. Internally it manages configuration changes, and policy
* init/reinit.
*
* @param request the reservation to route.
*
* @return the id of the subcluster that will be the "home" for this
* reservation.
*
* @... | 3.68 |
flink_ExecutableOperationUtils_createDynamicTableSink | /**
* Creates a {@link DynamicTableSink} from a {@link CatalogTable}.
*
* <p>It'll try to create table sink from to {@param catalog}, then try to create from {@param
* sinkFactorySupplier} passed secondly. Otherwise, an attempt is made to discover a matching
* factory using Java SPI (see {@link Factory} for detail... | 3.68 |
hbase_ServerListener_waiting | /**
* Started waiting on RegionServers to check-in.
*/
default void waiting() {
} | 3.68 |
hadoop_RouterAuditLogger_add | /**
* Appends the key-val pair to the passed builder in the following format
* <pair-delim>key=value.
*/
static void add(Keys key, String value, StringBuilder b) {
b.append(AuditConstants.PAIR_SEPARATOR).append(key.name())
.append(AuditConstants.KEY_VAL_SEPARATOR).append(value);
} | 3.68 |
flink_FileChannelOutputView_getBlockCount | /**
* Gets the number of blocks written by this output view.
*
* @return The number of blocks written by this output view.
*/
public int getBlockCount() {
return numBlocksWritten;
} | 3.68 |
framework_HasFilterableDataProvider_setDataProvider | /**
* Sets the data provider for this listing. The data provider is queried for
* displayed items as needed.
*
* @param dataProvider
* the data provider, not <code>null</code>
*/
public default void setDataProvider(DataProvider<T, F> dataProvider) {
setDataProvider(dataProvider, SerializableFunctio... | 3.68 |
framework_Color_setBlue | /**
* Sets the blue value of the color. Value must be within the range [0,
* 255].
*
* @param blue
* new blue value
*/
public void setBlue(int blue) {
if (withinRange(blue)) {
this.blue = blue;
} else {
throw new IllegalArgumentException(OUTOFRANGE + blue);
}
} | 3.68 |
hbase_StorageClusterStatusModel_getDeadNode | /**
* @param index the index
* @return the dead region server's name
*/
public String getDeadNode(int index) {
return deadNodes.get(index);
} | 3.68 |
hbase_LoadBalancerFactory_getLoadBalancer | /**
* Create a loadbalancer from the given conf.
* @return A {@link LoadBalancer}
*/
public static LoadBalancer getLoadBalancer(Configuration conf) {
// Create the balancer
Class<? extends LoadBalancer> balancerKlass =
conf.getClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, getDefaultLoadBalancerClass(),
... | 3.68 |
hbase_RegionSplitter_getRegionServerCount | /**
* Alternative getCurrentNrHRS which is no longer available.
* @return Rough count of regionservers out on cluster.
* @throws IOException if a remote or network exception occurs
*/
private static int getRegionServerCount(final Connection connection) throws IOException {
try (Admin admin = connection.getAdmin()... | 3.68 |
morf_AbstractSqlDialectTest_testMathsDivide | /**
* Test that adding numbers returns as expected.
*/
@Test
public void testMathsDivide() {
String result = testDialect.getSqlFrom(new MathsField(new FieldLiteral(1), MathsOperator.DIVIDE, new FieldLiteral(1)));
assertEquals(expectedMathsDivide(), result);
} | 3.68 |
framework_VFilterSelect_handleMouseDownEvent | /**
* Handles special behavior of the mouse down event
*
* @param event
*/
private void handleMouseDownEvent(Event event) {
/*
* Prevent the keyboard focus from leaving the textfield by preventing
* the default behavior of the browser. Fixes #4285.
*/
if (event.getTypeInt() == Event.ONMOUSEDO... | 3.68 |
hbase_MasterRegionFlusherAndCompactor_setupConf | // inject our flush related configurations
static void setupConf(Configuration conf, long flushSize, long flushPerChanges,
long flushIntervalMs) {
conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, flushSize);
conf.setLong(HRegion.MEMSTORE_FLUSH_PER_CHANGES, flushPerChanges);
conf.setLong(HRegion.MEMSTORE_PER... | 3.68 |
hbase_Response_getCode | /** Returns the HTTP response code */
public int getCode() {
return code;
} | 3.68 |
framework_AbstractSingleComponentContainerConnector_getContentWidget | /**
* Returns the widget (if any) of the content of the container.
*
* @return widget of the only/first connector of the container, null if no
* content or if there is no widget for the connector
*/
protected Widget getContentWidget() {
ComponentConnector content = getContent();
if (null != content... | 3.68 |
hadoop_RenameOperation_copyEmptyDirectoryMarkers | /**
* Process all directory markers at the end of the rename.
* All leaf markers are queued to be copied in the store;
* <p>
* Why not simply create new markers? All the metadata
* gets copied too, so if there was anything relevant then
* it would be preserved.
* <p>
* At the same time: markers aren't valued mu... | 3.68 |
framework_DragSourceExtensionConnector_fixDragImageTransformForMobile | /**
* Fix drag image offset for touch devices when the dragged image has been
* offset with css transform: translate/translate3d.
* <p>
* This necessary for e.g grid rows.
* <p>
* This method is NOOP for non-touch browsers.
*
* @param draggedElement
* the element that forms the drag image
*/
protec... | 3.68 |
framework_Form_removeAllActionHandlers | /**
* Removes all action handlers.
*/
public void removeAllActionHandlers() {
if (ownActionManager != null) {
ownActionManager.removeAllActionHandlers();
}
} | 3.68 |
shardingsphere-elasticjob_JobFacade_misfireIfRunning | /**
* Set task misfire flag.
*
* @param shardingItems sharding items to be set misfire flag
* @return whether satisfy misfire condition
*/
public boolean misfireIfRunning(final Collection<Integer> shardingItems) {
return executionService.misfireIfHasRunningItems(shardingItems);
} | 3.68 |
framework_AbstractComponent_getId | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.Component#getId()
*/
@Override
public String getId() {
return getState(false).id;
} | 3.68 |
flink_NFACompiler_setCurrentGroupPatternFirstOfLoop | /**
* Marks the current group pattern as the head of the TIMES quantifier or not.
*
* @param isFirstOfLoop whether the current group pattern is the head of the TIMES
* quantifier
*/
@SuppressWarnings("unchecked")
private void setCurrentGroupPatternFirstOfLoop(boolean isFirstOfLoop) {
if (currentPattern ins... | 3.68 |
graphhopper_CustomModelParser_createClazz | /**
* This method does the following:
* <ul>
* <li>0. optionally we already checked the right-hand side expressions before this method call in FindMinMax.checkLMConstraints
* (only the client-side custom model statements)
* </li>
* <li>1. determine minimum and maximum values via parsing the right-hand side ex... | 3.68 |
framework_ListSet_removeFromSet | /**
* Removes "e" from the set if it no longer exists in the list.
*
* @param e
*/
private void removeFromSet(E e) {
Integer dupl = duplicates.get(e);
if (dupl != null) {
// A duplicate was present so we only decrement the duplicate count
// and continue
if (dupl == 1) {
... | 3.68 |
morf_HumanReadableStatementProducer_changeColumn | /** @see org.alfasoftware.morf.upgrade.SchemaEditor#changeColumn(java.lang.String, org.alfasoftware.morf.metadata.Column, org.alfasoftware.morf.metadata.Column) **/
@Override
public void changeColumn(String tableName, Column fromDefinition, Column toDefinition) {
consumer.schemaChange(HumanReadableStatementHelper.gen... | 3.68 |
hbase_StoreFileReader_passesTimerangeFilter | /**
* Check if this storeFile may contain keys within the TimeRange that have not expired (i.e. not
* older than oldestUnexpiredTS).
* @param tr the timeRange to restrict
* @param oldestUnexpiredTS the oldest timestamp that is not expired, as determined by the column
* famil... | 3.68 |
flink_KeyGroupRangeOffsets_getIntersection | /**
* Returns a key-group range with offsets which is the intersection of the internal key-group
* range with the given key-group range.
*
* @param keyGroupRange Key-group range to intersect with the internal key-group range.
* @return The key-group range with offsets for the intersection of the internal key-group... | 3.68 |
framework_Button_getRelativeX | /**
* Returns the relative mouse position (x coordinate) when the click
* took place. The position is relative to the clicked component.
*
* @return The mouse cursor x position relative to the clicked layout
* component or -1 if no x coordinate available
*/
public int getRelativeX() {
if (null != deta... | 3.68 |
shardingsphere-elasticjob_HandlerMappingRegistry_addMapping | /**
* Add a Handler for a path pattern.
*
* @param method HTTP method
* @param pathPattern path pattern
* @param handler handler
*/
public void addMapping(final HttpMethod method, final String pathPattern, final Handler handler) {
UrlPatternMap<Handler> urlPatternMap = mappings.computeIfAbsent(method, httpMet... | 3.68 |
flink_LegacySinkTransformation_getOperatorFactory | /** Returns the {@link StreamOperatorFactory} of this {@code LegacySinkTransformation}. */
public StreamOperatorFactory<Object> getOperatorFactory() {
return operatorFactory;
} | 3.68 |
hbase_BlockCacheUtil_getSize | /** Returns size of blocks in the cache */
public long getSize() {
return size;
} | 3.68 |
hadoop_StageConfig_withJobAttemptNumber | /**
* Set the job attempt number.
* @param value new value
* @return this
*/
public StageConfig withJobAttemptNumber(final int value) {
checkOpen();
jobAttemptNumber = value;
return this;
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.