name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
morf_OracleDialect_getSqlForYYYYMMDDToDate_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForYYYYMMDDToDate(org.alfasoftware.morf.sql.element.Function) */ @Override protected String getSqlForYYYYMMDDToDate(Function function) { return ("TO_DATE(" + getSqlFrom(function.getArguments().get(0))) + ", 'yyyymmdd')"; }
3.26
morf_OracleDialect_prepareBooleanParameter_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#prepareBooleanParameter(org.alfasoftware.morf.jdbc.NamedParameterPreparedStatement, java.lang.Boolean, org.alfasoftware.morf.sql.element.SqlParameter) */ @Override protected void prepareBooleanParameter(NamedParameterPreparedStatement statement, Boolean boolVal, S...
3.26
morf_OracleDialect_alterTableDropColumnStatements_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#alterTableDropColumnStatements(org.alfasoftware.morf.metadata.Table, org.alfasoftware.morf.metadata.Column) */ @Override public Collection<String> alterTableDropColumnStatements(Table table, Column column) { List<String> result = new ArrayList<>(); String tr...
3.26
morf_OracleDialect_columnComment_rdh
/** * Build the comment comment that allows the metadata reader to determine the correct lower case table names and types. */ private String columnComment(Column column, String tableName) { StringB...
3.26
morf_OracleDialect_defaultNullOrder_rdh
/** * {@inheritDoc } * * @see org.alfasoftware.morf.jdbc.SqlDialect#defaultNullOrder() */@Override protected String defaultNullOrder() { return DEFAULT_NULL_ORDER; }
3.26
morf_OracleDialect_updateStatementPreTableDirectives_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#updateStatementPreTableDirectives(org.alfasoftware.morf.sql.UpdateStatement) */ @Override protected String updateStatementPreTableDirectives(UpdateStatement updateStatement) { if (updateStatement.getHints().isEmpty()) { return ""; } StringBuilder...
3.26
morf_OracleDialect_getSqlForDateToYyyymmddHHmmss_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForDateToYyyymmddHHmmss(org.alfasoftware.morf.sql.element.Function) */ @Override protected String getSqlForDateToYyyymmddHHmmss(Function function) { return String.format("TO_NUMBER(TO_CHAR(%s, 'yyyymmddHH24MISS'))", getSqlFrom(function.getArguments().get(...
3.26
morf_OracleDialect_getFromDummyTable_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#getFromDummyTable() */ @Override protected String getFromDummyTable() { return " FROM dual"; }
3.26
morf_OracleDialect_getSqlForRandom_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForRandom() */ @Override protected String getSqlForRandom() { return "dbms_random.value"; }
3.26
morf_OracleDialect_getSubstringFunctionName_rdh
/** * {@inheritDoc } * * @see org.alfasoftware.morf.jdbc.SqlDialect#getSubstringFunctionName() */ @Overrideprotected String getSubstringFunctionName() { return "SUBSTR"; }
3.26
morf_OracleDialect_getSqlForOrderByFieldNullValueHandling_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForOrderByFieldNullValueHandling(org.alfasoftware.morf.sql.element.FieldReference) */ @Override protected String getSqlForOrderByFieldNullValueHandling(FieldReference orderByField) { if (orderByField.getNullValueHandling().isPresent()) { switch (or...
3.26
morf_OracleDialect_buildSQLToStartTracing_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#buildSQLToStartTracing(java.lang.String) */ @Override public List<String> buildSQLToStartTracing(String identifier) { return Arrays.asList(("ALTER SESSION SET tracefile_identifier = '" + identifier) + "'", "ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FORE...
3.26
morf_OracleDialect_primaryKeyConstraint_rdh
/** * CONSTRAINT DEF_PK PRIMARY KEY (X, Y, Z) */ private String primaryKeyConstraint(Table table) { return primaryKeyConstraint(table.getName(), namesOfColumns(primaryKeysForTable(table))); }
3.26
morf_OracleDialect_selectStatementPreFieldDirectives_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#selectStatementPreFieldDirectives(org.alfasoftware.morf.sql.SelectStatement) */ @Override protected String selectStatementPreFieldDirectives(SelectStatement selectStatement) { StringBuilder builder = new StringBuilder(); for (Hint hint : selectStatement.getH...
3.26
morf_OracleDialect_rebuildSequenceAndTrigger_rdh
/** * If the table has an auto-numbered column, rebuild its sequence and trigger. * * @param table * The {@link Table}. * @return The SQL statements to run. */ private Collection<String> rebuildSequenceAndTrigger(Table table, Column sequence) { // This requires drop/create trigger/sequence privileges so w...
3.26
morf_OracleDialect_getSqlForInsertInto_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForInsertInto(org.alfasoftware.morf.sql.InsertStatement) */ @Override protected String getSqlForInsertInto(InsertStatement insertStatement) { return ("INSERT " + insertStatementPreIntoDirectives(insertStatement)) + "INTO "; }
3.26
morf_OracleDialect_buildRemainingStatementsAndComments_rdh
/** * Builds the remaining statements (triggers, sequences and comments). * * @param table * The table to create the statements. * @return the collection of statements. */ private Collection<String> buildRemainingStatementsAndComments(Table table) { List<String> statements = Lists.newArrayList(); Column...
3.26
morf_OracleDialect_formatSqlStatement_rdh
/** * SqlPlus requires sql statement lines to be less than 2500 characters in length. * Additionally PL\SQL statements must be ended with "/". * * @see org.alfasoftware.morf.jdbc.SqlDialect#formatSqlStatement(java.la...
3.26
morf_OracleDialect_changePrimaryKeyColumns_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#changePrimaryKeyColumns(Table, java.util.List, java.util.List) */ @Override public Collection<String> changePrimaryKeyColumns(Table table, List<String> oldPrimaryKeyColumns, List<String> newPrimaryKeyColumns) { List<String> v30 = new ArrayList<>(); String ta...
3.26
morf_OracleDialect_renameTableStatements_rdh
/** * * @see org.alfasoftware.morf.jdbc.SqlDialect#renameTableStatements(org.alfasoftware.morf.metadata.Table, org.alfasoftware.morf.metadata.Table) */ @Override public Collection<String> renameTableStatements(Table fromTable, Table toTable) { String from = truncatedTableName(fromTable.getName()); String fr...
3.26
aws-saas-boost_KeycloakUserDataAccessLayer_toSystemUser_rdh
// VisibleForTesting static SystemUser toSystemUser(UserRepresentation keycloakUser) { SystemUser user = null; if (keycloakUser != null) { user = new SystemUser(); user.setId(keycloakUser.getId()); user.setCreated(LocalDateTime.ofInstant(Instant.ofEpochMilli(keycloakUser.getCrea...
3.26
aws-saas-boost_UpdateWorkflow_updateCloudFormationStack_rdh
// TODO all CloudFormation activities (reading params, updating stacks) // should be extracted to a class for easier mocking/testing private void updateCloudFormationStack(String stackName, Map<String, String> paramsMap, String yamlFile) { List<Parameter> templateParameters = paramsMap.entrySet().stream().map(entry ->...
3.26
aws-saas-boost_UpdateWorkflow_findChangedPaths_rdh
// TODO git functionality should be extracted to a "gitToolbox" object for easier mock/testing protected List<Path> findChangedPaths(Map<String, String> cloudFormationParamMap) {// list all staged and committed changes against the last updated commit String versionParameter = cloudFormationParamMap.get(...
3.26
aws-saas-boost_UpdateWorkflow_runApiGatewayDeployment_rdh
// VisibleForTesting protected void runApiGatewayDeployment(Map<String, String> cloudFormationParamMap) { // CloudFormation will not redeploy an API Gateway stage on update outputMessage("Updating API Gateway deployment for stages");try { String publicApiName = ("sb-" + environment.getName()) + "-public-api"; String pr...
3.26
aws-saas-boost_ExistingEnvironmentFactory_getExistingSaaSBoostLambdasFolder_rdh
// VisibleForTesting static String getExistingSaaSBoostLambdasFolder(SsmClient ssm, String environmentName) { LOGGER.debug("Getting existing SaaS Boost Lambdas folder from Parameter Store"); String lambdasFolder = null; try { GetParameterResponse response = ssm.getParameter(request -> request.name((...
3.26
aws-saas-boost_ExistingEnvironmentFactory_getExistingSaaSBoostStackDetails_rdh
// VisibleForTesting static Map<String, String> getExistingSaaSBoostStackDetails(CloudFormationClient cfn, String baseCloudFormationStackName) { LOGGER.debug("Getting CloudFormation stack details for SaaS Boost stack {}", baseCloudFormationStackName); Map<String, String> details = new Ha...
3.26
aws-saas-boost_ExistingEnvironmentFactory_getExistingSaaSBoostAnalyticsDeployed_rdh
// VisibleForTesting static boolean getExistingSaaSBoostAnalyticsDeployed(SsmClient ssm, String environmentName) { LOGGER.debug("Getting existing SaaS Boost Analytics module deployed from Parameter Store"); boolean analyticsDeployed = false; try { GetParameterResponse response = ssm.getParameter(req...
3.26
aws-saas-boost_ExistingEnvironmentFactory_getExistingSaaSBoostStackName_rdh
// VisibleForTesting static String getExistingSaaSBoostStackName(SsmClient ssm, String environmentName) { LOGGER.debug("Getting existing SaaS Boost CloudFormation stack name from Parameter Store"); String stackName = null; try { GetParameterResponse response = ssm.getParameter(request -> re...
3.26
aws-saas-boost_ExistingEnvironmentFactory_getExistingSaaSBoostArtifactBucket_rdh
// VisibleForTesting static SaaSBoostArtifactsBucket getExistingSaaSBoostArtifactBucket(SsmClient ssm, String environmentName, Region region) { LOGGER.debug("Getting existing SaaS Boost artifact bucket name from Parameter Store"); String artifactsBucket = null; try { // note: this currently assum...
3.26
aws-saas-boost_KeycloakApi_toKeycloakUser_rdh
// VisibleForTesting static UserRepresentation toKeycloakUser(Map<String, Object> user) { if (user != null) { final UserRepresentation keycloakUser = new UserRepresentation(); // for each "set" function in UserRepresentation, parse the mapped value from user Arrays.stream(UserRepresentation.class.getMe...
3.26
aws-saas-boost_Environment_builder_rdh
/** * Constructs a {@link Environment.Builder} using the provided {@link Environment} as a baseline. * * It will always be true that calling <code>build</code> on the {@link Environment.Builder} returned * by this function will create an {@link Environment} equal to the provided {@link Environment}. In other words:...
3.26
aws-saas-boost_DynamoTier_updateAttributeNames_rdh
// because name is a reserved keyword in DynamoDB update expressions, we need to change the update expression from // something like // SET name=:name,description=:description // to // SET #name=:name,#description=:description public Map<String, String> updateAttributeNames() { Map<String, String> updateAttributeNa...
3.26
aws-saas-boost_RefreshingProfileDefaultCredentialsProvider_resolveCredentials_rdh
/** * * @see AwsCredentialsProvider#resolveCredentials() */ @Override public AwsCredentials resolveCredentials() { if (profileFilename == null) { return curriedBuilder.build().resolveCredentials(); } curriedBuilder.profileFile(ProfileFile.builder().type(Type.CREDENTIALS).content(Path.of(new ...
3.26
aws-saas-boost_KeycloakKeyProvider_jwksUrl_rdh
// https://www.keycloak.org/docs/latest/securing_apps/index.html#_certificate_endpoint protected static URL jwksUrl() { URL url = null; try { url = new URL(((KEYCLOAK_HOST + "/realms/") + KEYCLOAK_REALM) + "/protocol/openid-connect/certs"); } catch (MalformedURLException e) { LO...
3.26
aws-saas-boost_AwsClientBuilderFactory_decorateBuilderWithDefaults_rdh
// VisibleForTesting <C extends SdkClient, B extends AwsClientBuilder<B, C>> B decorateBuilderWithDefaults(B builder) { return builder.credentialsProvider(credentialsProvider).region(awsRegion); }
3.26
aws-saas-boost_SaaSBoostArtifactsBucket_getBucketUrl_rdh
/** * * @see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html">S3 Documentation</a> * @return the S3 URL the Bucket object represents */ public String getBucketUrl() { return String.format("https://%s.s3.%s.%s/", bucketName, region, Utils.endpointSuffix(region)); }
3.26
aws-saas-boost_UpdateAction_addTarget_rdh
/** * Adds a new target to this <code>UpdateAction</code>. * * e.g. if this is a <code>SERVICE</code>, the list of targets may be * <code>[ "onboarding", "tenant" ]</code>. * * @param target * the target to add */ public void addTarget(String target) { targets.add(target); }
3.26
aws-saas-boost_CognitoKeyProvider_jwksUrl_rdh
// https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-verifying-a-jwt.html protected static URL jwksUrl() { URL url = null;try { url = new URL(((("https://cognito-idp." + AWS_REGION) + ".amazonaws.com/") + USER_POOL_ID) + "/.well-known/jwks.json"); } catch...
3.26
hbase_FSVisitor_visitRegionStoreFiles
/** * Iterate over the region store files * @param fs {@link FileSystem} * @param regionDir {@link Path} to the region directory * @param visitor callback object to get the store files * @throws IOException if an error occurred while scanning the directory */ public static void visitRegionStoreFiles(fina...
3.68
hbase_AbstractMemStore_getLowest
/* * @return Return lowest of a or b or null if both a and b are null */ protected Cell getLowest(final Cell a, final Cell b) { if (a == null) { return b; } if (b == null) { return a; } return comparator.compareRows(a, b) <= 0 ? a : b; }
3.68
framework_AbsoluteLayout_setBottomUnits
/** * Sets the unit for the 'bottom' attribute. * * @param bottomUnits * See {@link Sizeable} UNIT_SYMBOLS for a description of the * available units. */ public void setBottomUnits(Unit bottomUnits) { this.bottomUnits = bottomUnits; markAsDirty(); }
3.68
flink_LongZeroConvergence_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
flink_Transformation_getDescription
/** Returns the description of this {@code Transformation}. */ public String getDescription() { return description; }
3.68
AreaShop_RegionGroup_addWorld
/** * Adds a world from which all regions should be added to the group. * @param world World from which all regions should be added * @return true if the region was not already added, otherwise false */ public boolean addWorld(String world) { if(worlds.add(world)) { setSetting("regionsFromWorlds", new ArrayList<...
3.68
hbase_EventHandler_getSeqid
/** Returns This events' sequence id. */ public long getSeqid() { return this.seqid; }
3.68
hadoop_Hash_parseHashType
/** * This utility method converts String representation of hash function name * to a symbolic constant. Currently two function types are supported, * "jenkins" and "murmur". * @param name hash function name * @return one of the predefined constants */ public static int parseHashType(String name) { if ("jenkins...
3.68
hbase_HRegion_hasReferences
/** Returns True if this region has references. */ public boolean hasReferences() { return stores.values().stream().anyMatch(HStore::hasReferences); }
3.68
hudi_StreamSync_getCheckpointToResume
/** * Process previous commit metadata and checkpoint configs set by user to determine the checkpoint to resume from. * * @param commitsTimelineOpt commits timeline of interest, including .commit and .deltacommit. * @return the checkpoint to resume from if applicable. * @throws IOException */ private Option<Strin...
3.68
hbase_HelloHBase_deleteRow
/** * Invokes Table#delete to delete test data (i.e. the row) * @param table Standard Table object * @throws IOException If IO problem is encountered */ static void deleteRow(final Table table) throws IOException { System.out.println("Deleting row [" + Bytes.toString(MY_ROW_ID) + "] from Table [" + table.getN...
3.68
hbase_RequestConverter_buildAddColumnRequest
/** * Create a protocol buffer AddColumnRequest * @return an AddColumnRequest */ public static AddColumnRequest buildAddColumnRequest(final TableName tableName, final ColumnFamilyDescriptor column, final long nonceGroup, final long nonce) { AddColumnRequest.Builder builder = AddColumnRequest.newBuilder(); buil...
3.68
hbase_LruCachedBlock_access
/** * Block has been accessed. * @param accessTime Last access; this is actually a incremented sequence number rather than an * actual time. */ public void access(long accessTime) { this.accessTime = accessTime; if (this.priority == BlockPriority.SINGLE) { this.priority = BlockPriority.MUL...
3.68
flink_Pattern_within
/** * Defines the maximum time interval in which a matching pattern has to be completed in order to * be considered valid. This interval corresponds to the maximum time gap between events. * * @param withinType Type of the within interval between events * @param windowTime Time of the matching window * @return Th...
3.68
flink_TypeSerializerSchemaCompatibility_compatibleWithReconfiguredSerializer
/** * Returns a result that indicates a reconfigured version of the new serializer is compatible, * and should be used instead of the original new serializer. * * @param reconfiguredSerializer the reconfigured version of the new serializer. * @return a result that indicates a reconfigured version of the new serial...
3.68
hadoop_AbfsCountersImpl_trackDuration
/** * Tracks the duration of a statistic. * * @param key name of the statistic. * @return DurationTracker for that statistic. */ @Override public DurationTracker trackDuration(String key) { return ioStatisticsStore.trackDuration(key); }
3.68
hbase_MobStoreEngine_createCompactor
/** * Creates the DefaultMobCompactor. */ @Override protected void createCompactor(Configuration conf, HStore store) throws IOException { String className = conf.get(MOB_COMPACTOR_CLASS_KEY, DefaultMobStoreCompactor.class.getName()); try { compactor = ReflectionUtils.instantiateWithCustomCtor(className, ...
3.68
pulsar_ConcurrentLongLongPairHashMap_get
/** * @param key1 * @param key2 * @return the value or -1 if the key was not present. */ public LongPair get(long key1, long key2) { checkBiggerEqualZero(key1); long h = hash(key1, key2); return getSection(h).get(key1, key2, (int) h); }
3.68
flink_TypeInferenceOperandChecker_castTo
/** Adopted from {@link org.apache.calcite.sql.validate.implicit.AbstractTypeCoercion}. */ private SqlNode castTo(SqlNode node, RelDataType type) { return SqlStdOperatorTable.CAST.createCall( SqlParserPos.ZERO, node, SqlTypeUtil.convertTypeToSpec(type).withNullable(type.isNullabl...
3.68
hadoop_StartupProgress_lazyInitStep
/** * Lazily initializes the internal data structure for tracking the specified * phase and step. Returns either the newly initialized data structure or the * existing one. Initialization is atomic, so there is no risk of lost updates * even if multiple threads attempt to initialize the same step simultaneously. ...
3.68
hudi_MetadataMessage_isNewFileCreation
/** * Returns true if message corresponds to new file creation, false if not. * Ref: https://cloud.google.com/storage/docs/pubsub-notifications#events */ private boolean isNewFileCreation() { return EVENT_NAME_OBJECT_FINALIZE.equals(getEventType()); }
3.68
flink_HadoopDataInputStream_skipFully
/** * Skips over a given amount of bytes in the stream. * * @param bytes the number of bytes to skip. * @throws IOException */ public void skipFully(long bytes) throws IOException { while (bytes > 0) { bytes -= fsDataInputStream.skip(bytes); } }
3.68
dubbo_FileSystemDynamicConfiguration_processWatchEvents
/** * Process the {@link WatchEvent WatchEvents} loop in async execution * * @param watchService {@link WatchService} */ private void processWatchEvents(WatchService watchService) { getWatchEventsLoopThreadPool() .execute( () -> { // WatchEvents Loop while...
3.68
framework_GridAddReplaceMove_setup
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. * VaadinRequest) */ @Override protected void setup(VaadinRequest request) { buildLayout(); super.setup(request); }
3.68
cron-utils_ValidationFieldExpressionVisitor_isInRange
/** * Check if given number is greater or equal to start range and minor or equal to end range. * * @param fieldValue - to be validated * @throws IllegalArgumentException - if not in range */ @VisibleForTesting protected void isInRange(final FieldValue<?> fieldValue) { if (fieldValue instanceof IntegerFieldVal...
3.68
flink_Predicates_getClassSimpleNameFromFqName
/** * Extracts the class name from the given fully qualified class name. * * <p>Example: * * <pre> * getClassFromFqName("com.example.MyClass"); // Returns: "MyClass" * </pre> */ public static String getClassSimpleNameFromFqName(String fqClassName) { // Not using Preconditions to avoid adding non-test f...
3.68
hudi_EmbeddedTimelineServerHelper_updateWriteConfigWithTimelineServer
/** * Adjusts hoodie write config with timeline server settings. * @param timelineServer Embedded Timeline Server * @param config Hoodie Write Config */ public static void updateWriteConfigWithTimelineServer(EmbeddedTimelineService timelineServer, HoodieWriteC...
3.68
framework_VAbstractCalendarPanel_isShowISOWeekNumbers
/** * Returns whether ISO 8601 week numbers should be shown in the value * selector or not. ISO 8601 defines that a week always starts with a Monday * so the week numbers are only shown if this is the case. * * @return {@code true} if week number should be shown, {@code false} * otherwise */ public boole...
3.68
framework_BeanItem_expandProperty
/** * Expands nested bean properties by replacing a top-level property with * some or all of its sub-properties. The expansion is not recursive. * * @param propertyId * property id for the property whose sub-properties are to be * expanded, * @param subPropertyIds * sub-properti...
3.68
flink_DataStream_writeAsCsv
/** * Writes a DataStream to the file specified by the path parameter. The writing is performed * periodically every millis milliseconds. * * <p>For every field of an element of the DataStream the result of {@link Object#toString()} is * written. This method can only be used on data streams of tuples. * * @param...
3.68
flink_PartitionLoader_moveFiles
/** Moves files from srcDir to destDir. */ private void moveFiles(List<Path> srcPaths, Path destDir, boolean srcPathIsDir) throws Exception { if (srcPathIsDir) { // if the src path is still a directory, list the directory to get the files that needed // to be moved. for (Path srcDir ...
3.68
framework_EventCellReference_getSection
/** * Gets the Grid section where the referenced cell is. * * @since 7.5 * @return grid section */ public Section getSection() { return section; }
3.68
hbase_MasterObserver_postModifyColumnFamilyStoreFileTracker
/** * Called after modifying a family store file tracker. Called as part of modify family store file * tracker RPC call. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param family the column family * @param dstSFT the store file trac...
3.68
hbase_VisibilityLabelsCache_getUserAuthsAsOrdinals
/** * Returns the list of ordinals of labels associated with the user * @param user Not null value. * @return the list of ordinals */ public Set<Integer> getUserAuthsAsOrdinals(String user) { this.lock.readLock().lock(); try { Set<Integer> auths = userAuths.get(user); return (auths == null) ? EMPTY_SET ...
3.68
morf_H2Dialect_getSqlForRandomString
/** * @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForRandomString(org.alfasoftware.morf.sql.element.Function) */ @Override protected String getSqlForRandomString(Function function) { return String.format("SUBSTRING(REPLACE(RANDOM_UUID(),'-'), 1, %s)", getSqlFrom(function.getArguments().get(0))); }
3.68
hbase_FilterBase_transformCell
/** * By default no transformation takes place {@inheritDoc} */ @Override public Cell transformCell(Cell v) throws IOException { return v; }
3.68
morf_GraphBasedUpgradeSchemaChangeVisitor_visitPortableSqlStatement
/** * Produce and write the statement based on {@link PortableSqlStatement}. * * @param sql The {@link PortableSqlStatement} */ private void visitPortableSqlStatement(PortableSqlStatement sql) { sql.inplaceUpdateTransitionalTableNames(tracker); writeStatement(sql.getStatement(sqlDialect.getDatabaseType().identi...
3.68
framework_VScrollTable_isSelectable
/** For internal use only. May be removed or replaced in the future. */ public boolean isSelectable() { return selectMode.getId() > SelectMode.NONE.getId(); }
3.68
hmily_HmilyRepositoryStorage_removeHmilyParticipantUndo
/** * Remove hmily participant undo. * * @param hmilyParticipantUndo the hmily participant undo */ public static void removeHmilyParticipantUndo(final HmilyParticipantUndo hmilyParticipantUndo) { if (Objects.nonNull(hmilyParticipantUndo)) { PUBLISHER.publishEvent(hmilyParticipantUndo, EventTypeEnum.REMO...
3.68
hbase_RawInteger_encodeInt
/** * Write instance {@code val} into buffer {@code buff}. */ public int encodeInt(byte[] buff, int offset, int val) { return Bytes.putInt(buff, offset, val); }
3.68
streampipes_JdbcClient_ensureDatabaseExists
/** * If this method returns successfully a database with the given name exists on the server, specified by the url. * * @param databaseName The name of the database that should exist * @throws SpRuntimeException If the database does not exists and could not be created */ protected void ensureDatabaseExists(String...
3.68
hadoop_SecureableZone_getNXTRecord
/** * Return a NXT record appropriate for the query. * @param queryRecord the query record. * @param zone the zone to search. * @return the NXT record describing the insertion point. */ @SuppressWarnings({"unchecked"}) public Record getNXTRecord(Record queryRecord, Zone zone) { Collections.sort(records); int...
3.68
querydsl_LuceneSerializer_toField
/** * template method, override to customize * * @param path path * @return field name */ protected String toField(Path<?> path) { PathMetadata md = path.getMetadata(); if (md.getPathType() == PathType.COLLECTION_ANY) { return toField(md.getParent()); } else { String rv = md.getName(); ...
3.68
morf_Function_addDays
/** * Helper method to create an instance of the "addDays" SQL function. * * @param expression the expression to evaluate * @param number an expression evaluating to the number of days to add (or if negative, subtract) * @return an instance of the addDays function */ public static Function addDays(AliasedField ex...
3.68
hbase_RegionCoprocessorHost_preScannerOpen
/** * @param scan the Scan specification * @exception IOException Exception */ public void preScannerOpen(final Scan scan) throws IOException { execOperation(coprocEnvironments.isEmpty() ? null : new RegionObserverOperationWithoutResult() { @Override public void call(RegionObserver observer) throws IOExcep...
3.68
zxing_MultiFormatReader_setHints
/** * This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls * to decodeWithState(image) can reuse the same set of readers without reallocating memory. This * is important for performance in continuous scan clients. * * @param hints The set of hints to use for subsequent calls...
3.68
framework_WidgetSet_ensureConnectorLoaded
/** * Due its nature, GWT does not support dynamic classloading. To bypass this * limitation, widgetset must have function that returns Class by its fully * qualified name. * * @param tag * @param applicationConfiguration * @return */ public void ensureConnectorLoaded(int tag, ApplicationConfiguration conf) { ...
3.68
morf_NamedParameterPreparedStatement_forEachOccurrenceOfParameter
/** * Allows arbitrary code to be executed for each index position at which the named parameter can be found. */ private void forEachOccurrenceOfParameter(SqlParameter parameter, Operation operation) throws SQLException { List<Integer> indexes = indexMap.get(parameter.getImpliedName()); if (indexes == null) { ...
3.68
flink_PrioritizedOperatorSubtaskState_computePrioritizedAlternatives
/** * This method creates an alternative recovery option by replacing as much job manager state * with higher prioritized (=local) alternatives as possible. * * @param jobManagerState the state that the task got assigned from the job manager (this * state lives in remote storage). * @param alternativesByPrior...
3.68
hbase_MasterProcedureUtil_getTablePriority
/** * Return the priority for the given table. Now meta table is 3, other system tables are 2, and * user tables are 1. */ public static int getTablePriority(TableName tableName) { if (TableName.isMetaTableName(tableName)) { return 3; } else if (tableName.isSystemTable()) { return 2; } else { retur...
3.68
hbase_ReplicationSourceWALReader_checkBufferQuota
// returns false if we've already exceeded the global quota private boolean checkBufferQuota() { // try not to go over total quota if (!this.getSourceManager().checkBufferQuota(this.source.getPeerId())) { Threads.sleep(sleepForRetries); return false; } return true; }
3.68
flink_HiveParserTypeCheckProcFactory_getDateTimeExprProcessor
/** Factory method to get DateExprProcessor. */ public HiveParserTypeCheckProcFactory.DateTimeExprProcessor getDateTimeExprProcessor() { return new HiveParserTypeCheckProcFactory.DateTimeExprProcessor(); }
3.68
framework_VDateField_setCurrentDate
/** * Set the current date using a map with date values. * <p> * The map contains integer representation of values per resolution. The * method should construct a date based on the map and set it via * {@link #setCurrentDate(Date)} * * @param dateValues * a map with date values to convert into a date...
3.68
hbase_WALSplitter_getNumOpenWriters
/** * Get current open writers */ private int getNumOpenWriters() { int result = 0; if (this.outputSink != null) { result += this.outputSink.getNumOpenWriters(); } return result; }
3.68
flink_SkipListKeyComparator_compareNamespaceAndNode
/** * Compares the namespace in the memory segment with the namespace in the node . Returns a * negative integer, zero, or a positive integer as the first node is less than, equal to, or * greater than the second. * * @param namespaceSegment memory segment to store the namespace. * @param namespaceOffset offset o...
3.68
hbase_MasterObserver_preSetNamespaceQuota
/** * Called before the quota for the namespace is stored. * @param ctx the environment to interact with the framework and master * @param namespace the name of the namespace * @param quotas the current quota for the namespace */ default void preSetNamespaceQuota(final ObserverContext<MasterCoprocessorEnv...
3.68
morf_H2Dialect_getSqlForAddMonths
/** * @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForAddMonths(org.alfasoftware.morf.sql.element.Function) */ @Override protected String getSqlForAddMonths(Function function) { return String.format( "DATEADD('MONTH', %s, %s)", getSqlFrom(function.getArguments().get(1)), getSqlFrom(function.getArgum...
3.68
framework_TypeDataStore_addOnStateChangeMethod
/** * Adds data about a method annotated with {@link OnStateChange} for the * given connector type. * * @since 7.2 * @param clazz * the connector type * @param method * the state change method data */ public void addOnStateChangeMethod(Class<?> clazz, OnStateChangeMethod method) {...
3.68
dubbo_ClientStreamObserver_disableAutoRequest
/** * Swaps to manual flow control where no message will be delivered to {@link * StreamObserver#onNext(Object)} unless it is {@link #request request()}ed. Since {@code * request()} may not be called before the call is started, a number of initial requests may be * specified. */ default void disableAutoRequest() {...
3.68
morf_Join_getType
/** * Get the type of join. * * @return the type */ public JoinType getType() { return type; }
3.68
flink_CatalogTableStatistics_copy
/** * Create a deep copy of "this" instance. * * @return a deep copy */ public CatalogTableStatistics copy() { return new CatalogTableStatistics( this.rowCount, this.fileCount, this.totalSize, this.rawDataSize, new HashMap<>(this.properties)); }
3.68
morf_AbstractSqlDialectTest_testSelectWithCountFunction
/** * Tests the count function in a select. */ @Test public void testSelectWithCountFunction() { SelectStatement stmt = new SelectStatement(new FieldReference(STRING_FIELD), count()) .from(new TableReference(ALTERNATE_TABLE)) .groupBy(new FieldReference(STRING_FIELD)); String expectedSql = "SELECT stringFiel...
3.68