name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_WebBrowser_getBrowserMinorVersion | /**
* Gets the minor version of the browser the user is using.
*
* @see #getBrowserMajorVersion()
*
* @return The minor version of the browser or -1 if not known.
*/
public int getBrowserMinorVersion() {
if (browserDetails == null) {
return -1;
}
return browserDetails.getBrowserMinorVersion()... | 3.68 |
morf_AbstractSqlDialectTest_testDateToYyyymmdd | /**
* Test that YYYYMMDDToDate functionality behaves as expected.
*/
@Test
public void testDateToYyyymmdd() {
String result = testDialect.getSqlFrom(dateToYyyymmdd(field("testField")));
assertEquals(expectedDateToYyyymmdd(), result);
} | 3.68 |
hudi_AbstractTableFileSystemView_fetchAllLogsMergedFileSlice | /**
* Returns the file slice with all the file slice log files merged.
* <p> CAUTION: the method requires that all the file slices must only contain log files.
*
* @param fileGroup File Group for which the file slice belongs to
* @param maxInstantTime The max instant time
*/
private Option<FileSlice> fetchAllLogs... | 3.68 |
framework_WebBrowser_isSecureConnection | /** Is the connection made using HTTPS? */
public boolean isSecureConnection() {
return secureConnection;
} | 3.68 |
hbase_LogRollRegionServerProcedureManager_start | /**
* Start accepting backup procedure requests.
*/
@Override
public void start() {
if (!BackupManager.isBackupEnabled(rss.getConfiguration())) {
LOG.warn("Backup is not enabled. Check your " + BackupRestoreConstants.BACKUP_ENABLE_KEY
+ " setting");
return;
}
this.memberRpcs.start(rss.getServerNam... | 3.68 |
hadoop_AbstractRouterPolicy_prefilterSubClusters | /**
* Filter chosen SubCluster based on reservationId.
*
* @param reservationId the globally unique identifier for a reservation.
* @param activeSubClusters the map of ids to info for all active subclusters.
* @return the chosen sub-cluster
* @throws YarnException if the policy fails to choose a sub-cluster
*/
p... | 3.68 |
framework_Flash_setCodetype | /**
* This attribute specifies the content type of data expected when
* downloading the object specified by classid. This attribute is optional
* but recommended when classid is specified since it allows the user agent
* to avoid loading information for unsupported content types. When absent,
* it defaults to the ... | 3.68 |
morf_InsertStatement_values | /**
* Specifies the literal field values to insert.
*
* <p>
* Each field must have an alias which specifies the column to insert into.
* </p>
*
* @see AliasedField#as(String)
* @param fieldValues Literal field values to insert.
* @return a statement with the changes applied.
*/
public InsertStatement values(A... | 3.68 |
flink_Path_serializeToDataOutputView | /**
* Serialize the path to {@link DataInputView}.
*
* @param path the file path.
* @param out the data out put view.
* @throws IOException if an error happened.
*/
public static void serializeToDataOutputView(Path path, DataOutputView out) throws IOException {
URI uri = path.toUri();
if (uri == null) {
... | 3.68 |
hbase_ScanWildcardColumnTracker_getColumnHint | /**
* Used by matcher and scan/get to get a hint of the next column to seek to after checkColumn()
* returns SKIP. Returns the next interesting column we want, or NULL there is none (wildcard
* scanner).
* @return The column count.
*/
@Override
public ColumnCount getColumnHint() {
return null;
} | 3.68 |
flink_NettyMessage_readFrom | /**
* Parses the message header part and composes a new BufferResponse with an empty data
* buffer. The data buffer will be filled in later.
*
* @param messageHeader the serialized message header.
* @param bufferAllocator the allocator for network buffer.
* @return a BufferResponse object with the header parsed a... | 3.68 |
framework_ServerRpcQueue_isJavascriptRpc | /**
* Checks if the given method invocation originates from Javascript.
*
* @param invocation
* the invocation to check
* @return true if the method invocation originates from javascript, false
* otherwise
*/
public static boolean isJavascriptRpc(MethodInvocation invocation) {
return invoc... | 3.68 |
hbase_ReplicationPeerConfigUtil_updateReplicationBasePeerConfigs | /**
* Helper method to add/removev base peer configs from Configuration to ReplicationPeerConfig This
* merges the user supplied peer configuration
* {@link org.apache.hadoop.hbase.replication.ReplicationPeerConfig} with peer configs provided as
* property hbase.replication.peer.base.configs in hbase configuration.... | 3.68 |
hadoop_DefaultAppReportFetcher_getApplicationReport | /**
* Get an application report for the specified application id from the RM and
* fall back to the Application History Server if not found in RM.
*
* @param appId id of the application to get.
* @return the ApplicationReport for the appId.
* @throws YarnException on any error.
* @throws IOException connection... | 3.68 |
flink_LogUrlUtil_getValidLogUrlPattern | /** Validate and normalize log url pattern. */
public static Optional<String> getValidLogUrlPattern(
final Configuration config, final ConfigOption<String> option) {
String pattern = config.getString(option);
if (StringUtils.isNullOrWhitespaceOnly(pattern)) {
return Optional.empty();
}
... | 3.68 |
hbase_Bytes_compareTo | /**
* Lexicographically compare two arrays.
* @param buffer1 left operand
* @param buffer2 right operand
* @param offset1 Where to start comparing in the left buffer
* @param offset2 Where to start comparing in the right buffer
* @param length1 How much to compare from the left buffer
* @param length2 How much t... | 3.68 |
AreaShop_GeneralRegion_compareTo | /**
* Compare this region to another region by name.
* @param o The region to compare to
* @return 0 if the names are the same, below zero if this region is earlier in the alphabet, otherwise above zero
*/
@Override
public int compareTo(GeneralRegion o) {
return getName().compareTo(o.getName());
} | 3.68 |
pulsar_ResourceGroup_getRgRemoteUsageByteCount | // Visibility for unit testing
protected static double getRgRemoteUsageByteCount (String rgName, String monClassName, String brokerName) {
return rgRemoteUsageReportsBytes.labels(rgName, monClassName, brokerName).get();
} | 3.68 |
morf_XmlDataSetProducer_openPullParser | /**
* @param inputStream The inputstream to read from
* @return A new pull parser
*/
private static XMLStreamReader openPullParser(InputStream inputStream) {
try {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, Charsets.UTF_8));
Reader reader;
int version = Versio... | 3.68 |
hadoop_RouterDelegationTokenSecretManager_removeStoredMasterKey | /**
* The Router Supports Remove the master key.
* During this Process, Facade will call the specific StateStore to remove the MasterKey.
*
* @param delegationKey DelegationKey
*/
@Override
public void removeStoredMasterKey(DelegationKey delegationKey) {
try {
federationFacade.removeStoredMasterKey(delegatio... | 3.68 |
cron-utils_TimeNode_getNearestBackwardValue | /**
* We return same reference value if matches or previous one if does not match.
* Then we start applying shifts.
* This way we ensure same value is returned if no shift is requested.
*
* @param reference - reference value
* @param shiftsToApply - shifts to apply
* @return NearestValue instance, never null... | 3.68 |
framework_VAbsoluteLayout_getWidgetSlotWidth | /**
* Get the pixel width of an slot in the layout.
*
* @param child
* The widget in the layout.
* @return Returns the size in pixels, or 0 if child is not in the layout
*/
public int getWidgetSlotWidth(Widget child) {
AbsoluteWrapper wrapper = getChildWrapper(child);
if (wrapper != null) {
... | 3.68 |
framework_AbsoluteLayoutConnector_getWidget | /*
* (non-Javadoc)
*
* @see com.vaadin.client.ui.AbstractComponentConnector#getWidget()
*/
@Override
public VAbsoluteLayout getWidget() {
return (VAbsoluteLayout) super.getWidget();
} | 3.68 |
zxing_MatrixUtil_calculateBCHCode | // Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH
// code is used for encoding type information and version information.
// Example: Calculation of version information of 7.
// f(x) is created from 7.
// - 7 = 000111 in 6 bits
// - f(x) = x^2 + x^1 + x^0
// g(x) is give... | 3.68 |
hadoop_Validate_checkNotNullAndNumberOfElements | /**
* Validates that the given set is not null and has an exact number of items.
* @param <T> the type of collection's elements.
* @param collection the argument reference to validate.
* @param numElements the expected number of elements in the collection.
* @param argName the name of the argument being validated.... | 3.68 |
morf_AbstractSqlDialectTest_testSelectWithGroupBy | /**
* Tests the group by in a select.
*/
@Test
public void testSelectWithGroupBy() {
SelectStatement stmt = new SelectStatement(new FieldReference(STRING_FIELD), count(literal(1)), countDistinct(literal(1)))
.from(new TableReference(ALTERNATE_TABLE))
.groupBy(field(STRING_FIELD), field(INT_FIELD), field(FLOAT_F... | 3.68 |
hbase_Bytes_putBigDecimal | /**
* Put a BigDecimal value out to the specified byte array position.
* @param bytes the byte array
* @param offset position in the array
* @param val BigDecimal to write out
* @return incremented offset
*/
public static int putBigDecimal(byte[] bytes, int offset, BigDecimal val) {
if (bytes == null) {
... | 3.68 |
dubbo_ExpiringMap_startExpiring | /**
* start expiring Thread
*/
public void startExpiring() {
if (!running) {
running = true;
expirerThread.start();
}
} | 3.68 |
framework_DateCellDayEvent_clickTargetsResize | /**
* @return true if the current mouse movement is resizing
*/
private boolean clickTargetsResize() {
return weekGrid.getCalendar().isEventResizeAllowed()
&& (clickTarget == topResizeBar
|| clickTarget == bottomResizeBar);
} | 3.68 |
hbase_MasterProcedureScheduler_wakeGlobalExclusiveLock | /**
* Wake the procedures waiting for global.
* @see #waitGlobalExclusiveLock(Procedure, String)
* @param procedure the procedure releasing the lock
*/
public void wakeGlobalExclusiveLock(Procedure<?> procedure, String globalId) {
schedLock();
try {
final LockAndQueue lock = locking.getGlobalLock(globalId);... | 3.68 |
hudi_HoodieClusteringJob_validateRunningMode | // make sure that cfg.runningMode couldn't be null
private static void validateRunningMode(Config cfg) {
// --mode has a higher priority than --schedule
// If we remove --schedule option in the future we need to change runningMode default value to EXECUTE
if (StringUtils.isNullOrEmpty(cfg.runningMode)) {
cfg.... | 3.68 |
hadoop_DatanodeVolumeInfo_getDatanodeVolumeReport | /**
* get volume report.
*/
public String getDatanodeVolumeReport() {
StringBuilder report = new StringBuilder();
report
.append("Directory: " + path)
.append("\nStorageType: " + storageType)
.append(
"\nCapacity Used: " + usedSpace + "("
+ StringUtils.byteDesc(usedSpace)... | 3.68 |
flink_ContinuousFileMonitoringFunction_getInputSplitsSortedByModTime | /**
* Creates the input splits to be forwarded to the downstream tasks of the {@link
* ContinuousFileReaderOperator}. Splits are sorted <b>by modification time</b> before being
* forwarded and only splits belonging to files in the {@code eligibleFiles} list will be
* processed.
*
* @param eligibleFiles The files ... | 3.68 |
framework_LayoutDependencyTree_markWidthAsChanged | /**
* Marks the component's width as changed. Iterates through all components
* whose horizontal size depends on this component's size. If the dependent
* is a managed layout triggers need for horizontal layouting, otherwise
* triggers need for horizontal measuring for any dependent components of
* that component ... | 3.68 |
flink_ConfigurationUtils_assembleDynamicConfigsStr | /**
* Creates a dynamic parameter list {@code String} of the passed configuration map.
*
* @param config A {@code Map} containing parameter/value entries that shall be used in the
* dynamic parameter list.
* @return The dynamic parameter list {@code String}.
*/
public static String assembleDynamicConfigsStr(f... | 3.68 |
framework_ShowLastItem_getTestDescription | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
protected String getTestDescription() {
return "Show last item in Table by using setCurrentPageFirstItemId";
} | 3.68 |
hudi_CompactionUtils_buildFromFileSlice | /**
* Generate compaction operation from file-slice.
*
* @param partitionPath Partition path
* @param fileSlice File Slice
* @param metricsCaptureFunction Metrics Capture function
* @return Compaction Operation
*/
public static HoodieCompactionOperation buildFromFileSlice(String partitionPa... | 3.68 |
hbase_AbstractHBaseTool_newParser | /**
* Create the parser to use for parsing and validating the command line. Since commons-cli lacks
* the capability to validate arbitrary combination of options, it may be helpful to bake custom
* logic into a specialized parser implementation. See LoadTestTool for examples.
* @return a new parser specific to the ... | 3.68 |
morf_AnalyseTable_reverse | /**
* {@inheritDoc}
*
* @see org.alfasoftware.morf.upgrade.SchemaChange#reverse(Schema)
*/
@Override
public Schema reverse(Schema schema) {
return schema;
} | 3.68 |
flink_BlobUtils_createBlobCacheService | /**
* Creates the {@link BlobCacheService} from the given configuration, fallback storage
* directory, blob view and blob server address.
*
* @param configuration for the BlobCacheService
* @param fallbackStorageDirectory fallback storage directory
* @param blobView blob view
* @param serverAddress blob server a... | 3.68 |
flink_OneInputStateTransformation_setMaxParallelism | /**
* Sets the maximum parallelism of this operator.
*
* <p>The maximum parallelism specifies the upper bound for dynamic scaling. It also defines the
* number of key groups used for partitioned state.
*
* @param maxParallelism Maximum parallelism
* @return The operator with set maximum parallelism
*/
@PublicEv... | 3.68 |
hbase_ZKTableArchiveClient_createHFileArchiveManager | /**
* @return A new {@link HFileArchiveManager} to manage which tables' hfiles should be archived
* rather than deleted.
* @throws KeeperException if we can't reach zookeeper
* @throws IOException if an unexpected network issue occurs
*/
private synchronized HFileArchiveManager createHFileArchiveManage... | 3.68 |
flink_TaskSlot_clear | /** Removes all tasks from this task slot. */
public void clear() {
tasks.clear();
} | 3.68 |
hadoop_WriteOperationHelper_putObject | /**
* PUT an object directly (i.e. not via the transfer manager).
* Byte length is calculated from the file length, or, if there is no
* file, from the content length of the header.
* @param putObjectRequest the request
* @param putOptions put object options
* @param durationTrackerFactory factory for duration tr... | 3.68 |
hibernate-validator_ConstraintViolationAssert_assertCorrectPropertyPathStringRepresentations | /**
* Asserts that the given list of constraint violation paths matches the list of expected property paths.
*
* @param violations The violation list to verify.
* @param expectedPropertyPaths The expected property paths.
*/
public static void assertCorrectPropertyPathStringRepresentations(Set<? extends ConstraintV... | 3.68 |
dubbo_Configurator_compareTo | /**
* Sort by host, then by priority
* 1. the url with a specific host ip should have higher priority than 0.0.0.0
* 2. if two url has the same host, compare by priority value;
*/
@Override
default int compareTo(Configurator o) {
if (o == null) {
return -1;
}
int ipCompare = getUrl().getHost().... | 3.68 |
hbase_Append_setReturnResults | /**
* True (default) if the append operation should return the results. A client that is not
* interested in the result can save network bandwidth setting this to false.
*/
@Override
public Append setReturnResults(boolean returnResults) {
super.setReturnResults(returnResults);
return this;
} | 3.68 |
morf_ResultSetComparer_compareKeyColumn | /**
* Works out the mismatch type for a given key column over the two result sets.
*
*/
@SuppressWarnings({ "rawtypes" })
private MismatchType compareKeyColumn(ResultSet left, ResultSet right, int keyCol, int columnType, boolean leftHasRow, boolean rightHasRow) throws SQLException {
Optional<Comparable> leftValue ... | 3.68 |
framework_PropertysetItem_getItem | /**
* Gets the Item whose Property set has changed.
*
* @return source object of the event as an <code>Item</code>
*/
@Override
public Item getItem() {
return (Item) getSource();
} | 3.68 |
hadoop_FederationStateStoreFacade_getCurrentKeyId | /**
* Get CurrentKeyId from stateStore.
*
* @return currentKeyId.
*/
public int getCurrentKeyId() {
return stateStore.getCurrentKeyId();
} | 3.68 |
framework_RpcManager_applyInvocation | /**
* Perform server to client RPC invocation.
*
* @param invocation
* method to invoke
*/
public void applyInvocation(MethodInvocation invocation,
ServerConnector connector) {
Method method = getMethod(invocation);
Collection<ClientRpc> implementations = connector
.getRpcIm... | 3.68 |
framework_CalendarComponentEvents_isMonthlyMode | /**
* Gets the event's view mode. Calendar can be be either in monthly or
* weekly mode, depending on the active date range.
*
* @deprecated User {@link Calendar#isMonthlyMode()} instead
*
* @return Returns true when monthly view is active.
*/
@Deprecated
public boolean isMonthlyMode() {
return monthlyMode;
... | 3.68 |
framework_AbstractTransactionalQuery_rollback | /**
* Rolls back and releases the active connection.
*
* @throws SQLException
* if not in a transaction managed by this query
*/
public void rollback() throws UnsupportedOperationException, SQLException {
if (!isInTransaction()) {
throw new SQLException("No active transaction");
}
a... | 3.68 |
flink_BeamOperatorStateStore_getMapState | /** Returns a {@link BroadcastState} wrapped in {@link MapState} interface. */
@Override
public MapState<ByteArrayWrapper, byte[]> getMapState(BeamFnApi.StateRequest request)
throws Exception {
if (!request.getStateKey().hasMultimapKeysSideInput()) {
throw new RuntimeException("Unsupported broadcast... | 3.68 |
hmily_TransactionImpl_getContext | /**
* Gets context.
*
* @return the context
*/
public TransactionContext getContext() {
return context;
} | 3.68 |
morf_SchemaHomology_checkIndex | /**
* Check two indexes match.
*
* @param index1 index to compare
* @param index2 index to compare
*/
private void checkIndex(String tableName, Index index1, Index index2) {
matches("Index name on table [" + tableName + "]", index1.getName().toUpperCase(), index2.getName().toUpperCase());
matches("Index [" + i... | 3.68 |
framework_VCalendar_isRangeSelectAllowed | /**
* Is selecting a range allowed?
*/
public boolean isRangeSelectAllowed() {
return rangeSelectAllowed;
} | 3.68 |
shardingsphere-elasticjob_ElasticJobConfigurationProperties_toJobConfiguration | /**
* Convert to job configuration.
*
* @param jobName job name
* @return job configuration
*/
public JobConfiguration toJobConfiguration(final String jobName) {
JobConfiguration result = JobConfiguration.newBuilder(jobName, shardingTotalCount)
.cron(cron).timeZone(timeZone).shardingItemParameters(... | 3.68 |
flink_HiveTableUtil_relyConstraint | // returns a constraint trait that requires RELY
public static byte relyConstraint(byte trait) {
return (byte) (trait | HIVE_CONSTRAINT_RELY);
} | 3.68 |
flink_ExternalServiceDecorator_getNamespacedExternalServiceName | /**
* Generate namespaced name of the external rest Service by cluster Id, This is used by other
* project, so do not delete it.
*/
public static String getNamespacedExternalServiceName(String clusterId, String namespace) {
return getExternalServiceName(clusterId) + "." + namespace;
} | 3.68 |
hbase_ServerRpcConnection_sendConnectionHeaderResponseIfNeeded | /**
* Send the response for connection header
*/
private void sendConnectionHeaderResponseIfNeeded() throws FatalConnectionException {
Pair<RPCProtos.ConnectionHeaderResponse, CryptoAES> pair = setupCryptoCipher();
// Response the connection header if Crypto AES is enabled
if (pair == null) {
return;
}
... | 3.68 |
hadoop_TimelineCollectorWebService_about | /**
* Return the description of the timeline web services.
*
* @param req Servlet request.
* @param res Servlet response.
* @return description of timeline web service.
*/
@GET
@Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8
/* , MediaType.APPLICATION_XML */})
public AboutInfo about(
@Con... | 3.68 |
framework_AbstractOrderedLayout_getComponentAlignment | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.Layout.AlignmentHandler#getComponentAlignment(com
* .vaadin.ui.Component)
*/
@Override
public Alignment getComponentAlignment(Component childComponent) {
ChildComponentData childData = getState().childData.get(childComponent);
if (childData == null) {
throw... | 3.68 |
dubbo_Bytes_int2bytes | /**
* to byte array.
*
* @param v value.
* @param b byte array.
* @param off array offset.
*/
public static void int2bytes(int v, byte[] b, int off) {
b[off + 3] = (byte) v;
b[off + 2] = (byte) (v >>> 8);
b[off + 1] = (byte) (v >>> 16);
b[off + 0] = (byte) (v >>> 24);
} | 3.68 |
hbase_HBaseTestingUtility_getRegions | /**
* Returns all regions of the specified table
* @param tableName the table name
* @return all regions of the specified table
* @throws IOException when getting the regions fails.
*/
private List<RegionInfo> getRegions(TableName tableName) throws IOException {
try (Admin admin = getConnection().getAdmin()) {
... | 3.68 |
flink_RecordsBySplits_addFinishedSplit | /**
* Mark the split with the given ID as finished.
*
* @param splitId the ID of the finished split.
*/
public void addFinishedSplit(String splitId) {
finishedSplits.add(splitId);
} | 3.68 |
hadoop_Trash_isEnabled | /**
* Returns whether the trash is enabled for this filesystem.
*
* @return return if isEnabled true,not false.
*/
public boolean isEnabled() {
return trashPolicy.isEnabled();
} | 3.68 |
dubbo_ReflectUtils_desc2classArray | /**
* get class array instance.
*
* @param cl ClassLoader instance.
* @param desc desc.
* @return Class[] class array.
* @throws ClassNotFoundException
*/
private static Class<?>[] desc2classArray(ClassLoader cl, String desc) throws ClassNotFoundException {
if (desc.length() == 0) {
return EMPTY_CL... | 3.68 |
hadoop_StageConfig_getTaskManifestDir | /**
* Directory to put task manifests into.
* @return a path under the job attempt dir.
*/
public Path getTaskManifestDir() {
return taskManifestDir;
} | 3.68 |
hbase_MutableRegionInfo_getRegionNameAsString | /** Returns Region name as a String for use in logging, etc. */
@Override
public String getRegionNameAsString() {
return RegionInfo.getRegionNameAsString(this, this.regionName);
} | 3.68 |
framework_VSlider_setOrientation | /**
* Sets the slider orientation. Updates the style names if the given
* orientation differs from previously set orientation.
*
* @param orientation
* the orientation to use
*/
public void setOrientation(SliderOrientation orientation) {
if (this.orientation != orientation) {
this.orientati... | 3.68 |
open-banking-gateway_WebDriverBasedPaymentInitiation_sandbox_anton_brueckner_clicks_redirect_back_to_tpp_button_api_localhost_cookie_only | // Sending cookie with last request as it doesn't exist in browser for API tests
// null for cookieDomain is the valid value for localhost tests. This works correctly for localhost.
public SELF sandbox_anton_brueckner_clicks_redirect_back_to_tpp_button_api_localhost_cookie_only(WebDriver driver) {
acc.sandbox_anton... | 3.68 |
querydsl_GeometryExpressions_asGeometry | /**
* Create a new GeometryExpression
*
* @param value Geometry
* @return new GeometryExpression
*/
public static <T extends Geometry> GeometryExpression<T> asGeometry(T value) {
return asGeometry(Expressions.constant(value));
} | 3.68 |
morf_AbstractSelectStatementBuilder_getTable | /**
* Gets the first table
*
* @return the table
*/
TableReference getTable() {
return table;
} | 3.68 |
graphhopper_PrepareEncoder_getScDirMask | /**
* A bitmask for two directions
*/
public static int getScDirMask() {
return scDirMask;
} | 3.68 |
flink_SimpleVersionedSerialization_readVersionAndDeSerialize | /**
* Deserializes the version and datum from a byte array. The first four bytes will be read as
* the version, in <i>big-endian</i> encoding. The remaining bytes will be passed to the
* serializer for deserialization, via {@link SimpleVersionedSerializer#deserialize(int,
* byte[])}.
*
* @param serializer The ser... | 3.68 |
framework_ConnectorHierarchyWriter_write | /**
* Writes a JSON object containing the connector hierarchy (parent-child
* mappings) of the dirty connectors in the given UI.
*
* @param ui
* The {@link UI} whose hierarchy to write.
* @param writer
* The {@link Writer} used to write the JSON.
* @param stateUpdateConnectors
* ... | 3.68 |
framework_AbstractConnector_registerRpc | /**
* Registers an implementation for a server to client RPC interface.
*
* Multiple registrations can be made for a single interface, in which case
* all of them receive corresponding RPC calls.
*
* @param rpcInterface
* RPC interface
* @param implementation
* implementation that should ... | 3.68 |
framework_AbstractListing_extend | /**
* Adds this extension to the given parent listing.
*
* @param listing
* the parent component to add to
*/
public void extend(AbstractListing<T> listing) {
super.extend(listing);
listing.addDataGenerator(this);
} | 3.68 |
hmily_HmilyXaTransactionManager_getState | /**
* Gets state.
*
* @return the state
* @throws SystemException the system exception
*/
public Integer getState() throws SystemException {
Transaction transaction = getTransaction();
if (transaction == null) {
return XaState.STATUS_NO_TRANSACTION.getState();
}
return transaction.getStatus... | 3.68 |
hadoop_ShortWritable_get | /** @return Return the value of this ShortWritable. */
public short get() {
return value;
} | 3.68 |
pulsar_AdminResource_validateAdminAccessForTenant | // This is a stub method for Mockito
@Override
protected void validateAdminAccessForTenant(String property) {
super.validateAdminAccessForTenant(property);
} | 3.68 |
dubbo_ConfigurationUtils_getDynamicConfigurationFactory | /**
* Get an instance of {@link DynamicConfigurationFactory} by the specified name. If not found, take the default
* extension of {@link DynamicConfigurationFactory}
*
* @param name the name of extension of {@link DynamicConfigurationFactory}
* @return non-null
* @see 2.7.4
*/
public static DynamicConfigurationF... | 3.68 |
framework_AbsoluteLayoutRelativeSizeContent_createTableOnFixed | /**
* Creates an {@link AbsoluteLayout} of fixed size that contains a
* full-sized {@link Table}.
*
* @return the created layout
*/
private Component createTableOnFixed() {
AbsoluteLayout absoluteLayout = new AbsoluteLayout();
absoluteLayout.setWidth(200, Unit.PIXELS);
absoluteLayout.setHeight(200, Uni... | 3.68 |
hudi_HoodieTable_scheduleLogCompaction | /**
* Schedule log compaction for the instant time.
*
* @param context HoodieEngineContext
* @param instantTime Instant Time for scheduling log compaction
* @param extraMetadata additional metadata to write into plan
* @return
*/
public Option<HoodieCompactionPlan> scheduleLogCompaction(HoodieEngineContext conte... | 3.68 |
hbase_MiniHBaseCluster_resumeRegionServer | /**
* Resume the specified region server
* @param serverNumber Used as index into a list.
*/
public JVMClusterUtil.RegionServerThread resumeRegionServer(int serverNumber) {
JVMClusterUtil.RegionServerThread server = hbaseCluster.getRegionServers().get(serverNumber);
LOG.info("Resuming {}", server.toString());
... | 3.68 |
hbase_Query_doLoadColumnFamiliesOnDemand | /**
* Get the logical value indicating whether on-demand CF loading should be allowed.
*/
public boolean doLoadColumnFamiliesOnDemand() {
return (this.loadColumnFamiliesOnDemand != null) && this.loadColumnFamiliesOnDemand;
} | 3.68 |
flink_StreamProjection_projectTuple22 | /**
* Projects a {@link Tuple} {@link DataStream} to the previously selected fields.
*
* @return The projected DataStream.
* @see Tuple
* @see DataStream
*/
public <
T0,
T1,
T2,
T3,
T4,
T5,
T6,
... | 3.68 |
hudi_WriteMarkersFactory_get | /**
* @param markerType the type of markers to use
* @param table {@code HoodieTable} instance
* @param instantTime current instant time
* @return {@code WriteMarkers} instance based on the {@code MarkerType}
*/
public static WriteMarkers get(MarkerType markerType, HoodieTable table, String instantTime) {
LOG.d... | 3.68 |
querydsl_JTSGeometryExpressions_pointOperation | /**
* Create a new Point operation expression
*
* @param op operator
* @param args arguments
* @return operation expression
*/
public static JTSPointExpression<Point> pointOperation(Operator op, Expression<?>... args) {
return new JTSPointOperation<Point>(Point.class, op, args);
} | 3.68 |
druid_SQLCreateTableStatement_isUNI | /**
* only for show columns
*/
public boolean isUNI(String columnName) {
for (SQLTableElement element : this.tableElementList) {
if (element instanceof MySqlUnique) {
MySqlUnique unique = (MySqlUnique) element;
if (unique.getColumns().isEmpty()) {
continue;
... | 3.68 |
hbase_ZNodeClearer_deleteMyEphemeralNodeOnDisk | /**
* delete the znode file
*/
public static void deleteMyEphemeralNodeOnDisk() {
String fileName = getMyEphemeralNodeFileName();
if (fileName != null) {
new File(fileName).delete();
}
} | 3.68 |
hibernate-validator_NotEmptyValidatorForCharSequence_isValid | /**
* Checks the character sequence is not {@code null} and not empty.
*
* @param charSequence the character sequence to validate
* @param constraintValidatorContext context in which the constraint is evaluated
* @return returns {@code true} if the character sequence is not {@code null} and not empty.
*/
@Overrid... | 3.68 |
morf_SelectStatement_unionAll | /**
* Perform an UNION set operation with another {@code selectStatement},
* keeping all duplicate rows.
*
* @param selectStatement the other select statement to be united with the current select statement;
* @return a new select statement with the change applied.
* @see #union(SelectStatement)
*/
public SelectS... | 3.68 |
hbase_MasterAddressTracker_hasMaster | /**
* Check if there is a master available.
* @return true if there is a master set, false if not.
*/
public boolean hasMaster() {
return super.getData(false) != null;
} | 3.68 |
flink_ExecutionConfig_setTaskCancellationInterval | /**
* Sets the configuration parameter specifying the interval (in milliseconds) between
* consecutive attempts to cancel a running task.
*
* @param interval the interval (in milliseconds).
*/
public ExecutionConfig setTaskCancellationInterval(long interval) {
configuration.set(TaskManagerOptions.TASK_CANCELLA... | 3.68 |
flink_ParquetVectorizedInputFormat_clipParquetSchema | /** Clips `parquetSchema` according to `fieldNames`. */
private MessageType clipParquetSchema(
GroupType parquetSchema, Collection<Integer> unknownFieldsIndices) {
Type[] types = new Type[projectedFields.length];
if (isCaseSensitive) {
for (int i = 0; i < projectedFields.length; ++i) {
... | 3.68 |
morf_TableReference_equals | /**
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (obj == null)
return false;
if (obj == this)
return true;
// TODO incorrect - permits other types. Can't change this - need to fix existing misuse in subtypes
if (!(obj instanceof TableReference))
... | 3.68 |
flink_TestcontainersSettings_getBaseImage | /** @return The base image. */
public String getBaseImage() {
return baseImage;
} | 3.68 |
hudi_RocksDBDAO_addColumnFamily | /**
* Add a new column family to store.
*
* @param columnFamilyName Column family name
*/
public void addColumnFamily(String columnFamilyName) {
ValidationUtils.checkArgument(!closed);
managedDescriptorMap.computeIfAbsent(columnFamilyName, colFamilyName -> {
try {
ColumnFamilyDescriptor descriptor = ... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.