Unnamed: 0 int64 0 6.45k | func stringlengths 29 253k | target class label 2
classes | project stringlengths 36 167 |
|---|---|---|---|
1,679 | public class FsImmutableBlobContainer extends AbstractFsBlobContainer implements ImmutableBlobContainer {
public FsImmutableBlobContainer(FsBlobStore blobStore, BlobPath blobPath, File path) {
super(blobStore, blobPath, path);
}
@Override
public void writeBlob(final String blobName, final Inpu... | 0true | src_main_java_org_elasticsearch_common_blobstore_fs_FsImmutableBlobContainer.java |
1,620 | public class SecurityConfig {
private String ceilingEntityFullyQualifiedName;
private List<EntityOperationType> requiredTypes;
private List<String> permissions = new ArrayList<String>();
private List<String> roles = new ArrayList<String>();
public String getCeilingEntityFullyQualifiedName() {
... | 0true | admin_broadleaf-open-admin-platform_src_main_java_org_broadleafcommerce_openadmin_security_SecurityConfig.java |
43 | public interface BiFun<A,B,T> { T apply(A a, B b); } | 0true | src_main_java_jsr166e_ConcurrentHashMapV8.java |
518 | public class OFetchException extends OException {
private static final long serialVersionUID = 7247597939953323863L;
public OFetchException(String message, Throwable cause) {
super(message, cause);
}
public OFetchException(String message) {
super(message);
}
} | 0true | core_src_main_java_com_orientechnologies_orient_core_exception_OFetchException.java |
1,032 | public interface OrderItemContainer {
List<? extends OrderItem> getOrderItems();
/**
* Returns true if the contained items can be discounted.
* @return
*/
boolean getAllowDiscountsOnChildItems();
/**
* Returns true if pricing operations are at the container level (as opposed to be... | 0true | core_broadleaf-framework_src_main_java_org_broadleafcommerce_core_order_domain_OrderItemContainer.java |
1,507 | public static class EntityObjectVersion {
@OId
private ORID rid;
@OVersion
private Object version;
public EntityObjectVersion() {
}
public ORID getRid() {
return rid;
}
public Object getVersion() {
return version;
}
} | 0true | object_src_test_java_com_orientechnologies_orient_object_enhancement_OVersionSerializationTest.java |
5,306 | public class LongTerms extends InternalTerms {
public static final Type TYPE = new Type("terms", "lterms");
public static AggregationStreams.Stream STREAM = new AggregationStreams.Stream() {
@Override
public LongTerms readResult(StreamInput in) throws IOException {
LongTerms bucket... | 1no label | src_main_java_org_elasticsearch_search_aggregations_bucket_terms_LongTerms.java |
256 | public static interface Provider {
StoreRateLimiting rateLimiting();
} | 0true | src_main_java_org_apache_lucene_store_StoreRateLimiting.java |
1,015 | @SuppressWarnings({"unchecked", "rawtypes"})
public class OChainedIndexProxy<T> implements OIndex<T> {
private final OIndex<T> index;
private final List<OIndex<?>> indexChain;
private final OIndex<?> lastIndex;
private final boolean isOneValue;
/**
* Create proxies that support maximum number of differen... | 1no label | core_src_main_java_com_orientechnologies_orient_core_sql_OChainedIndexProxy.java |
1,806 | @RunWith(HazelcastParallelClassRunner.class)
@Category(QuickTest.class)
public class LocalMapStatsTest extends HazelcastTestSupport {
private final String name = "fooMap";
@Test
public void testLastAccessTime() throws InterruptedException {
final TimeUnit timeUnit = TimeUnit.NANOSECONDS;
f... | 0true | hazelcast_src_test_java_com_hazelcast_map_LocalMapStatsTest.java |
203 | public class HydratedSetup {
private static final Log LOG = LogFactory.getLog(HydratedSetup.class);
private static Map<String, String> inheritanceHierarchyRoots = Collections.synchronizedMap(new HashMap<String, String>());
private static String getInheritanceHierarchyRoot(Class<?> myEntityClass) {
... | 0true | common_src_main_java_org_broadleafcommerce_common_cache_HydratedSetup.java |
165 | public class SpecifyTypeProposal implements ICompletionProposal,
ICompletionProposalExtension6 {
private final ProducedType infType;
private final String desc;
private final Tree.Type typeNode;
private CeylonEditor editor;
private final Tree.CompilationUnit rootNode;
private Point selec... | 0true | plugins_com.redhat.ceylon.eclipse.ui_src_com_redhat_ceylon_eclipse_code_correct_SpecifyTypeProposal.java |
956 | public abstract class AbstractIsLockedRequest extends KeyBasedClientRequest {
protected Data key;
private long threadId;
public AbstractIsLockedRequest() {
}
public AbstractIsLockedRequest(Data key) {
this.key = key;
}
protected AbstractIsLockedRequest(Data key, long threadId) {
... | 0true | hazelcast_src_main_java_com_hazelcast_concurrent_lock_client_AbstractIsLockedRequest.java |
191 | public class TimeDTO {
@AdminPresentation(excluded = true)
private Calendar cal;
@AdminPresentation(friendlyName = "TimeDTO_Hour_Of_Day", fieldType = SupportedFieldType.BROADLEAF_ENUMERATION, broadleafEnumeration = "org.broadleafcommerce.common.time.HourOfDayType")
private Integer hour;
@AdminPre... | 0true | common_src_main_java_org_broadleafcommerce_common_TimeDTO.java |
3,307 | public abstract class DoubleArrayAtomicFieldData extends AbstractAtomicNumericFieldData {
public static DoubleArrayAtomicFieldData empty(int numDocs) {
return new Empty(numDocs);
}
private final int numDocs;
protected long size = -1;
public DoubleArrayAtomicFieldData(int numDocs) {
... | 1no label | src_main_java_org_elasticsearch_index_fielddata_plain_DoubleArrayAtomicFieldData.java |
1,685 | blobContainer.writeBlob(blobName, is, sizeInBytes, new ImmutableBlobContainer.WriterListener() {
@Override
public void onCompleted() {
latch.countDown();
}
@Override
public void onFailure(Throwable t) {
failure.set(t);
... | 0true | src_main_java_org_elasticsearch_common_blobstore_support_BlobStores.java |
207 | Callable<Object> response = new Callable<Object>() {
public Object call() throws Exception {
Boolean result;
try {
OStorageRemoteThreadLocal.INSTANCE.get().sessionId = sessionId;
beginResponse(network);
result = network.readByte() == 1... | 0true | client_src_main_java_com_orientechnologies_orient_client_remote_OStorageRemote.java |
638 | public class PeerRecoveryStatus {
public enum Stage {
INIT((byte) 0),
INDEX((byte) 1),
TRANSLOG((byte) 2),
FINALIZE((byte) 3),
DONE((byte) 4);
private final byte value;
Stage(byte value) {
this.value = value;
}
public byte value... | 0true | src_main_java_org_elasticsearch_action_admin_indices_status_PeerRecoveryStatus.java |
226 | public final class SimpleNeoStoreProvider implements NeoStoreProvider
{
private NeoStore neoStore;
public SimpleNeoStoreProvider( NeoStore neoStore )
{
this.neoStore = neoStore;
}
@Override
public NeoStore evaluate()
{
return neoStore;
}
} | 0true | community_kernel_src_main_java_org_neo4j_kernel_impl_nioneo_xa_SimpleNeoStoreProvider.java |
80 | @SuppressWarnings("serial")
static final class MapReduceMappingsToLongTask<K,V>
extends BulkTask<K,V,Long> {
final ObjectByObjectToLong<? super K, ? super V> transformer;
final LongByLongToLong reducer;
final long basis;
long result;
MapReduceMappingsToLongTask<K,... | 0true | src_main_java_jsr166e_ConcurrentHashMapV8.java |
210 | public static class Command extends LogEntry
{
private final XaCommand command;
Command( int identifier, XaCommand command )
{
super( identifier );
this.command = command;
}
public XaCommand getXaCommand()
{
return command;
... | 0true | community_kernel_src_main_java_org_neo4j_kernel_impl_transaction_xaframework_LogEntry.java |
531 | @SuppressWarnings("serial")
public class OValidationException extends RuntimeException {
public OValidationException(String string) {
super(string);
}
public OValidationException(String message, Throwable cause) {
super(message, cause);
}
} | 0true | core_src_main_java_com_orientechnologies_orient_core_exception_OValidationException.java |
2,367 | public class ByteSizeUnitTests extends ElasticsearchTestCase {
@Test
public void testBytes() {
assertThat(BYTES.toBytes(1), equalTo(1l));
assertThat(BYTES.toKB(1024), equalTo(1l));
assertThat(BYTES.toMB(1024 * 1024), equalTo(1l));
assertThat(BYTES.toGB(1024 * 1024 * 1024), equal... | 0true | src_test_java_org_elasticsearch_common_unit_ByteSizeUnitTests.java |
416 | static final class Fields {
static final XContentBuilderString SNAPSHOTS = new XContentBuilderString("snapshots");
} | 0true | src_main_java_org_elasticsearch_action_admin_cluster_snapshots_get_GetSnapshotsResponse.java |
2,986 | static final class Fields {
static final XContentBuilderString FILTER_CACHE = new XContentBuilderString("filter_cache");
static final XContentBuilderString MEMORY_SIZE = new XContentBuilderString("memory_size");
static final XContentBuilderString MEMORY_SIZE_IN_BYTES = new XContentBuilderStr... | 0true | src_main_java_org_elasticsearch_index_cache_filter_FilterCacheStats.java |
954 | private class TransportHandler extends BaseTransportRequestHandler<Request> {
@Override
public Request newInstance() {
return newRequest();
}
@Override
public String executor() {
return ThreadPool.Names.SAME;
}
@Override
publ... | 0true | src_main_java_org_elasticsearch_action_support_master_TransportMasterNodeOperationAction.java |
402 | add(store, "expiring-doc1", new HashMap<String, Object>() {{
put(NAME, "first");
put(TIME, 1L);
put(WEIGHT, 10.2d);
}}, true, 2); | 0true | titan-test_src_main_java_com_thinkaurelius_titan_diskstorage_indexing_IndexProviderTest.java |
2,050 | public class EntrySetOperationFactory implements OperationFactory {
String name;
public EntrySetOperationFactory() {
}
public EntrySetOperationFactory(String name) {
this.name = name;
}
@Override
public Operation createOperation() {
return new MapEntrySetOperation(name);
... | 0true | hazelcast_src_main_java_com_hazelcast_map_operation_EntrySetOperationFactory.java |
3,268 | public static class Docs implements Ordinals.Docs {
private final DocIdOrdinals parent;
private final LongsRef longsScratch = new LongsRef(new long[1], 0, 1);
private int docId = -1;
private long currentOrdinal = -1;
public Docs(DocIdOrdinals parent) {
this.pare... | 0true | src_main_java_org_elasticsearch_index_fielddata_ordinals_DocIdOrdinals.java |
434 | map.addChangeListener(new OMultiValueChangeListener<Object, String>() {
public void onAfterRecordChanged(final OMultiValueChangeEvent<Object, String> event) {
changed.value = true;
}
}); | 0true | core_src_test_java_com_orientechnologies_orient_core_db_record_TrackedMapTest.java |
918 | public interface LockResource {
Data getKey();
boolean isLocked();
boolean isLockedBy(String owner, long threadId);
String getOwner();
boolean isTransactional();
long getThreadId();
int getLockCount();
long getAcquireTime();
long getRemainingLeaseTime();
} | 0true | hazelcast_src_main_java_com_hazelcast_concurrent_lock_LockResource.java |
2,401 | final class BigIntArray extends AbstractBigArray implements IntArray {
private int[][] pages;
/** Constructor. */
public BigIntArray(long size, PageCacheRecycler recycler, boolean clearOnResize) {
super(INT_PAGE_SIZE, recycler, clearOnResize);
this.size = size;
pages = new int[numP... | 0true | src_main_java_org_elasticsearch_common_util_BigIntArray.java |
581 | class ShardOptimizeResponse extends BroadcastShardOperationResponse {
ShardOptimizeResponse() {
}
public ShardOptimizeResponse(String index, int shardId) {
super(index, shardId);
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
}
... | 0true | src_main_java_org_elasticsearch_action_admin_indices_optimize_ShardOptimizeResponse.java |
36 | public class TitanGraphQueryTestSuite extends GraphQueryTestSuite {
public TitanGraphQueryTestSuite(final GraphTest graphTest) {
super(graphTest);
}
@Override
public void testGraphQueryForVertices() {
TitanGraph g = (TitanGraph) graphTest.generateGraph();
if (g.getRelationType... | 0true | titan-test_src_main_java_com_thinkaurelius_titan_blueprints_TitanGraphQueryTestSuite.java |
526 | public class FlushRequestBuilder extends BroadcastOperationRequestBuilder<FlushRequest, FlushResponse, FlushRequestBuilder> {
public FlushRequestBuilder(IndicesAdminClient indicesClient) {
super((InternalIndicesAdminClient) indicesClient, new FlushRequest());
}
public FlushRequestBuilder setFull(b... | 0true | src_main_java_org_elasticsearch_action_admin_indices_flush_FlushRequestBuilder.java |
3,638 | public static class Names {
public static final String LAT = "lat";
public static final String LAT_SUFFIX = "." + LAT;
public static final String LON = "lon";
public static final String LON_SUFFIX = "." + LON;
public static final String GEOHASH = "geohash";
public sta... | 0true | src_main_java_org_elasticsearch_index_mapper_geo_GeoPointFieldMapper.java |
2,638 | public class ClassDefinitionImpl extends BinaryClassDefinition implements ClassDefinition {
private final List<FieldDefinition> fieldDefinitions = new ArrayList<FieldDefinition>();
private final Map<String, FieldDefinition> fieldDefinitionsMap = new HashMap<String,
FieldDefinition>();
private f... | 1no label | hazelcast_src_main_java_com_hazelcast_nio_serialization_ClassDefinitionImpl.java |
1,399 | @SuppressWarnings("unchecked")
public class OMVRBTreeMapEntryProvider<K, V> extends OMVRBTreeEntryDataProviderAbstract<K, V> {
/**
* Current version of serialization format for single MVRBTree node. Versions have negative numbers for backward compatibility
* with previous format that does not have version numbe... | 0true | core_src_main_java_com_orientechnologies_orient_core_type_tree_provider_OMVRBTreeMapEntryProvider.java |
3,235 | list = new SlicedObjectList<String>(values.isMultiValued() ? new String[10] : new String[1]) {
@Override
public void grow(int newLength) {
assert offset == 0; // NOTE: senseless if offset != 0
if (values.length >= newLength) {
... | 0true | src_main_java_org_elasticsearch_index_fielddata_ScriptDocValues.java |
1,939 | static class DelegatingInvocationHandler<T> implements InvocationHandler {
T delegate;
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable {
if (delegate == null) {
throw new IllegalStateException("This is a proxy used to su... | 0true | src_main_java_org_elasticsearch_common_inject_internal_ConstructionContext.java |
1,623 | public class OAutomaticBackup extends OServerPluginAbstract {
public enum VARIABLES {
DBNAME, DATE
}
private Date firstTime = null;
private long delay = -1;
private String targetDirectory = "backup";
private String targetFileName;
private Set<String> include... | 0true | server_src_main_java_com_orientechnologies_orient_server_handler_OAutomaticBackup.java |
797 | public interface CandidateOffer extends Serializable {
public Long getId();
public void setId(Long id);
public Offer getOffer();
public void setOffer(Offer offer);
public int getPriority();
} | 0true | core_broadleaf-framework_src_main_java_org_broadleafcommerce_core_offer_domain_CandidateOffer.java |
2,982 | static class EntriesStats {
public final long sizeInBytes;
public final long count;
public EntriesStats(long sizeInBytes, long count) {
this.sizeInBytes = sizeInBytes;
this.count = count;
}
} | 0true | src_main_java_org_elasticsearch_index_cache_filter_FilterCache.java |
1,133 | public interface ClientService {
/**
* Returns all connected clients to this member.
*
* @return all connected clients to this member.
*/
Collection<Client> getConnectedClients();
/**
* @param clientListener ClientListener
*
* @return returns registration id.
*/
... | 0true | hazelcast_src_main_java_com_hazelcast_core_ClientService.java |
595 | public class ContainerShapeType implements Serializable, BroadleafEnumerationType {
private static final long serialVersionUID = 1L;
private static final Map<String, ContainerShapeType> TYPES = new LinkedHashMap<String, ContainerShapeType>();
public static ContainerShapeType getInstance(final String type... | 1no label | common_src_main_java_org_broadleafcommerce_common_vendor_service_type_ContainerShapeType.java |
32 | public class StateMachines
implements MessageProcessor, MessageSource
{
private final Logger logger = LoggerFactory.getLogger( StateMachines.class );
private final MessageSender sender;
private DelayedDirectExecutor executor;
private Executor stateMachineExecutor;
private Timeouts timeouts;... | 1no label | enterprise_cluster_src_main_java_org_neo4j_cluster_StateMachines.java |
126 | class FixMultilineStringIndentationProposal
extends CorrectionProposal {
public static void addFixMultilineStringIndentation(
Collection<ICompletionProposal> proposals,
IFile file, Tree.CompilationUnit cu, Node node) {
if (node instanceof Tree.StringLiteral) {
... | 0true | plugins_com.redhat.ceylon.eclipse.ui_src_com_redhat_ceylon_eclipse_code_correct_ChangeMultilineStringIndentionProposal.java |
1,225 | public class ShippingRateDataProvider {
@DataProvider(name = "basicShippingRates")
public static Object[][] provideBasicShippingRates(){
ShippingRateImpl sr = new ShippingRateImpl();
sr.setFeeType("SHIPPING");
sr.setFeeSubType("ALL");
sr.setFeeBand(1);
sr.setBandUnitQuan... | 0true | integration_src_test_java_org_broadleafcommerce_core_pricing_ShippingRateDataProvider.java |
22 | public interface Fun<A,T> { T apply(A a); } | 0true | src_main_java_jsr166e_CompletableFuture.java |
1,588 | class ApplySettings implements NodeSettingsService.Listener {
@Override
public void onRefreshSettings(Settings settings) {
ImmutableMap<String, String> requireMap = settings.getByPrefix(CLUSTER_ROUTING_REQUIRE_GROUP).getAsMap();
if (!requireMap.isEmpty()) {
cl... | 0true | src_main_java_org_elasticsearch_cluster_routing_allocation_decider_FilterAllocationDecider.java |
265 | public class ElasticsearchException extends RuntimeException {
/**
* Construct a <code>ElasticsearchException</code> with the specified detail message.
*
* @param msg the detail message
*/
public ElasticsearchException(String msg) {
super(msg);
}
/**
* Construct a <cod... | 0true | src_main_java_org_elasticsearch_ElasticsearchException.java |
1,134 | public class CartOperationProcessContextFactory implements ProcessContextFactory {
/**
* Creates the necessary context for cart operations
*/
public ProcessContext createContext(Object seedData) throws WorkflowException {
if (!(seedData instanceof CartOperationRequest)){
throw new... | 0true | core_broadleaf-framework_src_main_java_org_broadleafcommerce_core_order_service_workflow_CartOperationProcessContextFactory.java |
2,043 | public interface LinkedKeyBinding<T> extends Binding<T> {
/**
* Returns the linked key used to resolve injections. That binding can be retrieved from an
* injector using {@link org.elasticsearch.common.inject.Injector#getBinding(Key) Injector.getBinding(key)}.
*/
Key<? extends T> getLinkedKey();... | 0true | src_main_java_org_elasticsearch_common_inject_spi_LinkedKeyBinding.java |
2,047 | public interface PrivateElements extends Element {
/**
* Returns the configuration information in this private environment.
*/
List<Element> getElements();
/**
* Returns the child injector that hosts these private elements, or null if the elements haven't
* been used to create an injec... | 0true | src_main_java_org_elasticsearch_common_inject_spi_PrivateElements.java |
2,112 | future.andThen(new ExecutionCallback<Data>() {
@Override
public void onResponse(Data response) {
if (nearCacheEnabled) {
int partitionId = nodeEngine.getPartitionService().getPartitionId(key);
if (!nodeEngine... | 1no label | hazelcast_src_main_java_com_hazelcast_map_proxy_MapProxySupport.java |
17 | public interface DataBufferEnv {
public int getNumOfBufferPartitions();
public int getCurrentBufferPartition();
public long getBufferTime();
public long getBufferPartitionOverlap();
public int previousBufferPartition(int currentPartition);
public int getConcurrencyDegree... | 0true | timeSequenceFeedAggregator_src_main_java_gov_nasa_arc_mct_buffer_config_DataBufferEnv.java |
116 | public interface Gather<S,M> {
/**
* Gathers the adjacent vertex's state and the connecting edge's properties into a single object
* to be combined by a corresponding {@link Combiner} as configured in {@link OLAPQueryBuilder#edges(Gather, Combiner)}.
*
* @param state State of the adjacent verte... | 0true | titan-core_src_main_java_com_thinkaurelius_titan_core_olap_Gather.java |
450 | trackedSet.addChangeListener(new OMultiValueChangeListener<String, String>() {
public void onAfterRecordChanged(final OMultiValueChangeEvent<String, String> event) {
changed.value = true;
}
}); | 0true | core_src_test_java_com_orientechnologies_orient_core_db_record_TrackedSetTest.java |
491 | client.getClientExecutionService().executeInternal(new Runnable() {
@Override
public void run() {
for (MembershipListener listener : listeners.values()) {
listener.memberAttributeChanged(event);
}
... | 1no label | hazelcast-client_src_main_java_com_hazelcast_client_spi_impl_ClientClusterServiceImpl.java |
669 | sbTree.loadEntriesMinor(toKey, isInclusive, new OTreeInternal.RangeResultListener<Object, V>() {
@Override
public boolean addResult(Map.Entry<Object, V> entry) {
final Object key = entry.getKey();
final V value = entry.getValue();
return addToEntriesResult(transforme... | 0true | core_src_main_java_com_orientechnologies_orient_core_index_engine_OSBTreeIndexEngine.java |
441 | public class KCVMutation extends Mutation<Entry,StaticBuffer> {
public KCVMutation(List<Entry> additions, List<StaticBuffer> deletions) {
super(additions, deletions);
}
@Override
public void consolidate() {
super.consolidate(KCVEntryMutation.ENTRY2COLUMN_FCT, Functions.<StaticBuffer>id... | 0true | titan-core_src_main_java_com_thinkaurelius_titan_diskstorage_keycolumnvalue_KCVMutation.java |
1,249 | public class FulfillmentEstimationResponse {
protected Map<? extends FulfillmentOption, Money> fulfillmentOptionPrices;
public Map<? extends FulfillmentOption, Money> getFulfillmentOptionPrices() {
return fulfillmentOptionPrices;
}
public void setFulfillmentOptionPrices(Map<? extends Fulfillm... | 0true | core_broadleaf-framework_src_main_java_org_broadleafcommerce_core_pricing_service_fulfillment_provider_FulfillmentEstimationResponse.java |
1,585 | public enum Allocation {
NONE,
NEW_PRIMARIES,
PRIMARIES,
ALL;
public static Allocation parse(String strValue) {
if (strValue == null) {
return null;
} else {
strValue = strValue.toUpperCase(Locale.ROOT);
... | 0true | src_main_java_org_elasticsearch_cluster_routing_allocation_decider_EnableAllocationDecider.java |
1,577 | public class BasicFieldMetadata extends FieldMetadata {
private static final long serialVersionUID = 1L;
protected SupportedFieldType fieldType;
protected SupportedFieldType secondaryType = SupportedFieldType.INTEGER;
protected Integer length;
protected Boolean required;
protected Boolean uniq... | 1no label | admin_broadleaf-open-admin-platform_src_main_java_org_broadleafcommerce_openadmin_dto_BasicFieldMetadata.java |
321 | public class TransportNodesHotThreadsAction extends TransportNodesOperationAction<NodesHotThreadsRequest, NodesHotThreadsResponse, TransportNodesHotThreadsAction.NodeRequest, NodeHotThreads> {
@Inject
public TransportNodesHotThreadsAction(Settings settings, ClusterName clusterName, ThreadPool threadPool,
... | 0true | src_main_java_org_elasticsearch_action_admin_cluster_node_hotthreads_TransportNodesHotThreadsAction.java |
3,558 | public class ByteFieldMapper extends NumberFieldMapper<Byte> {
public static final String CONTENT_TYPE = "byte";
public static class Defaults extends NumberFieldMapper.Defaults {
public static final FieldType FIELD_TYPE = new FieldType(NumberFieldMapper.Defaults.FIELD_TYPE);
static {
... | 0true | src_main_java_org_elasticsearch_index_mapper_core_ByteFieldMapper.java |
2,420 | public interface ObjectArray<T> extends BigArray {
/**
* Get an element given its index.
*/
public abstract T get(long index);
/**
* Set a value at the given index and return the previous value.
*/
public abstract T set(long index, T value);
} | 0true | src_main_java_org_elasticsearch_common_util_ObjectArray.java |
600 | ex.execute(new Runnable() {
public void run() {
if (sleep) {
try {
Thread.sleep((int) (1000 * Math.random()));
} catch (InterruptedException ignored) {
}
... | 0true | hazelcast_src_test_java_com_hazelcast_cluster_JoinStressTest.java |
118 | static final class Submitter {
int seed;
Submitter(int s) { seed = s; }
} | 0true | src_main_java_jsr166e_ForkJoinPool.java |
2,652 | sendPingsHandler.executor().execute(new Runnable() {
@Override
public void run() {
try {
if (sendPingsHandler.isClosed()) {
return;
}
... | 0true | src_main_java_org_elasticsearch_discovery_zen_ping_unicast_UnicastZenPing.java |
1,853 | class MapSizeEstimator<T extends Record> implements SizeEstimator<T> {
private volatile long size;
public long getSize() {
return size;
}
public void add(long size) {
this.size += size;
}
public void reset() {
size = 0;
}
public long getCost(T record) {
... | 0true | hazelcast_src_main_java_com_hazelcast_map_MapSizeEstimator.java |
2,638 | private class Receiver implements Runnable {
private volatile boolean running = true;
public void stop() {
running = false;
}
@Override
public void run() {
while (running) {
try {
int id = -1;
... | 0true | src_main_java_org_elasticsearch_discovery_zen_ping_multicast_MulticastZenPing.java |
506 | public class SiteResolutionType implements Serializable, BroadleafEnumerationType {
private static final long serialVersionUID = 1L;
private static final Map<String, SiteResolutionType> TYPES = new LinkedHashMap<String, SiteResolutionType>();
public static final SiteResolutionType DOMAIN = new SiteResol... | 1no label | common_src_main_java_org_broadleafcommerce_common_site_service_type_SiteResolutionType.java |
16 | class CommandExecutor implements Runnable {
final TextCommand command;
CommandExecutor(TextCommand command) {
this.command = command;
}
@Override
public void run() {
try {
TextCommandType type = command.getType();
Text... | 0true | hazelcast_src_main_java_com_hazelcast_ascii_TextCommandServiceImpl.java |
295 | public abstract class BroadleafException extends Exception implements RootCauseAccessor {
private Throwable rootCause;
public BroadleafException() {
super();
}
public BroadleafException(String message, Throwable cause) {
super(message, cause);
if (cause != null) {
... | 0true | common_src_main_java_org_broadleafcommerce_common_exception_BroadleafException.java |
1,237 | @Deprecated
public interface ShippingService {
public FulfillmentGroup calculateShippingForFulfillmentGroup(FulfillmentGroup fulfillmentGroup) throws FulfillmentPriceException;
} | 0true | core_broadleaf-framework_src_main_java_org_broadleafcommerce_core_pricing_service_ShippingService.java |
346 | fViewer.getControl().addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent event) {
fActionSet.handleKeyEvent(event);
}
}); | 0true | plugins_com.redhat.ceylon.eclipse.ui_src_com_redhat_ceylon_eclipse_code_explorer_PackageExplorerPart.java |
1,781 | @Component("blMapStructurePersistenceModule")
@Scope("prototype")
public class MapStructurePersistenceModule extends BasicPersistenceModule {
private static final Log LOG = LogFactory.getLog(MapStructurePersistenceModule.class);
@Override
public boolean isCompatible(OperationType operationType) {
... | 1no label | admin_broadleaf-open-admin-platform_src_main_java_org_broadleafcommerce_openadmin_server_service_persistence_module_MapStructurePersistenceModule.java |
2,788 | public class VersionTypeTests extends ElasticsearchTestCase {
@Test
public void testInternalVersionConflict() throws Exception {
assertFalse(VersionType.INTERNAL.isVersionConflict(10, Versions.MATCH_ANY));
// if we don't have a version in the index we accept everything
assertFalse(Versi... | 0true | src_test_java_org_elasticsearch_index_VersionTypeTests.java |
144 | private static final class CharsetCorrection
implements IMarkerResolution, IMarkerResolution2 {
private final IProject project;
private final String encoding;
private CharsetCorrection(IProject project, String encoding) {
this.project = project;
... | 0true | plugins_com.redhat.ceylon.eclipse.ui_src_com_redhat_ceylon_eclipse_code_correct_MarkerResolutionGenerator.java |
172 | public abstract class DistributedStoreManagerTest<T extends DistributedStoreManager> {
protected T manager;
protected KeyColumnValueStore store;
@Test
@Category({ OrderedKeyStoreTests.class })
public void testGetDeployment() {
assertEquals(Deployment.LOCAL, manager.getDeployment())... | 0true | titan-test_src_main_java_com_thinkaurelius_titan_diskstorage_DistributedStoreManagerTest.java |
4,444 | public static class FieldDataWeigher implements Weigher<Key, AtomicFieldData> {
@Override
public int weigh(Key key, AtomicFieldData fieldData) {
int weight = (int) Math.min(fieldData.getMemorySizeInBytes(), Integer.MAX_VALUE);
return weight == 0 ? 1 : weight;
}
} | 1no label | src_main_java_org_elasticsearch_indices_fielddata_cache_IndicesFieldDataCache.java |
523 | public class BLCRequestUtils {
private static String OK_TO_USE_SESSION = "blOkToUseSession";
/**
* Broadleaf "Resolver" and "Filter" classes may need to know if they are allowed to utilize the session.
* BLC uses a pattern where we will store an attribute in the request indicating whether or... | 0true | common_src_main_java_org_broadleafcommerce_common_util_BLCRequestUtils.java |
3,427 | public static interface RecoveryListener {
void onRecoveryDone();
void onIgnoreRecovery(String reason);
void onRecoveryFailed(IndexShardGatewayRecoveryException e);
} | 0true | src_main_java_org_elasticsearch_index_gateway_IndexShardGatewayService.java |
21 | public class InMemoryLogBuffer implements LogBuffer, ReadableByteChannel
{
private byte[] bytes = new byte[1000];
private int writeIndex;
private int readIndex;
private ByteBuffer bufferForConversions = ByteBuffer.wrap( new byte[100] );
public InMemoryLogBuffer()
{
}
public voi... | 1no label | community_kernel_src_main_java_org_neo4j_kernel_impl_transaction_xaframework_InMemoryLogBuffer.java |
355 | public class NodeStats extends NodeOperationResponse implements ToXContent {
private long timestamp;
@Nullable
private NodeIndicesStats indices;
@Nullable
private OsStats os;
@Nullable
private ProcessStats process;
@Nullable
private JvmStats jvm;
@Nullable
private Threa... | 0true | src_main_java_org_elasticsearch_action_admin_cluster_node_stats_NodeStats.java |
362 | public static class GroupingTestMapper
implements Mapper<Integer, Integer, String, Integer> {
@Override
public void map(Integer key, Integer value, Context<String, Integer> collector) {
collector.emit(String.valueOf(key % 4), value);
}
} | 0true | hazelcast-client_src_test_java_com_hazelcast_client_mapreduce_ClientMapReduceTest.java |
1,798 | public interface Binder {
/**
* Binds a scope to an annotation.
*/
void bindScope(Class<? extends Annotation> annotationType, Scope scope);
/**
* See the EDSL examples at {@link Binder}.
*/
<T> LinkedBindingBuilder<T> bind(Key<T> key);
/**
* See the EDSL examples at {@lin... | 0true | src_main_java_org_elasticsearch_common_inject_Binder.java |
145 | {
@Override
public void bytesWritten( long numberOfBytes )
{
bytesWritten.addAndGet( numberOfBytes );
}
@Override
public void bytesRead( long numberOfBytes )
{
}
} ); | 0true | community_kernel_src_test_java_org_neo4j_kernel_impl_transaction_xaframework_TestDirectMappedLogBuffer.java |
1,210 | public class ODefaultClusterFactory implements OClusterFactory {
protected static final String[] TYPES = { OClusterLocal.TYPE, OClusterMemory.TYPE };
public OCluster createCluster(final String iType) {
if (iType.equalsIgnoreCase(OClusterLocal.TYPE))
return new OClusterLocal();
else if (iType.equalsIg... | 0true | core_src_main_java_com_orientechnologies_orient_core_storage_ODefaultClusterFactory.java |
296 | public class TimestampParsingException extends ElasticsearchException {
private final String timestamp;
public TimestampParsingException(String timestamp) {
super("failed to parse timestamp [" + timestamp + "]");
this.timestamp = timestamp;
}
public String timestamp() {
return... | 1no label | src_main_java_org_elasticsearch_action_TimestampParsingException.java |
1,315 | checkpointExecutor = Executors.newSingleThreadExecutor(new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread thread = new Thread(r);
thread.setDaemon(true);
return thread;
}
}); | 0true | core_src_main_java_com_orientechnologies_orient_core_storage_impl_local_paginated_OLocalPaginatedStorage.java |
1,066 | public class ODefaultCommandExecutorSQLFactory implements OCommandExecutorSQLFactory {
private static final Map<String, Class<? extends OCommandExecutorSQLAbstract>> COMMANDS;
static {
// COMMANDS
final Map<String, Class<? extends OCommandExecutorSQLAbstract>> commands = new HashMap<String, Class<? exten... | 0true | core_src_main_java_com_orientechnologies_orient_core_sql_ODefaultCommandExecutorSQLFactory.java |
272 | public class ServerInfo implements Serializable {
private static final long serialVersionUID = 1L;
private String serverName;
private Integer serverPort;
private Integer securePort;
private String appName;
public String getSecureHost() {
StringBuffer sb = new StringBuffer();
s... | 1no label | common_src_main_java_org_broadleafcommerce_common_email_service_info_ServerInfo.java |
170 | class ValueFunctionDefinitionGenerator extends DefinitionGenerator {
private final String brokenName;
private final MemberOrTypeExpression node;
private final CompilationUnit rootNode;
private final String desc;
private final Image image;
private final ProducedType returnType;
private f... | 1no label | plugins_com.redhat.ceylon.eclipse.ui_src_com_redhat_ceylon_eclipse_code_correct_ValueFunctionDefinitionGenerator.java |
2,722 | public class LocalGatewayMetaState extends AbstractComponent implements ClusterStateListener {
static enum AutoImportDangledState {
NO() {
@Override
public boolean shouldImport() {
return false;
}
},
YES() {
@Override
... | 0true | src_main_java_org_elasticsearch_gateway_local_state_meta_LocalGatewayMetaState.java |
3,603 | public abstract static class CustomNumericField extends Field {
protected final NumberFieldMapper mapper;
public CustomNumericField(NumberFieldMapper mapper, Number value, FieldType fieldType) {
super(mapper.names().indexName(), fieldType);
this.mapper = mapper;
... | 0true | src_main_java_org_elasticsearch_index_mapper_core_NumberFieldMapper.java |
597 | @RunWith(HazelcastSerialClassRunner.class)
@Category(NightlyTest.class)
public class JoinStressTest extends HazelcastTestSupport {
@Test
public void testTCPIPJoinWithManyNodes() throws UnknownHostException, InterruptedException {
final int count = 20;
final CountDownLatch latch = new CountDownL... | 0true | hazelcast_src_test_java_com_hazelcast_cluster_JoinStressTest.java |
59 | @SuppressWarnings("serial")
protected static class CountableLock extends ReentrantReadWriteLock {
protected int countLocks = 0;
public CountableLock() {
super(false);
}
} | 0true | commons_src_main_java_com_orientechnologies_common_concur_lock_OLockManager.java |
1,715 | return new UnmodifiableIterator<Long>() {
@Override
public boolean hasNext() {
return iterator.hasNext();
}
@Override
public Long next() {
return iterator.next().value;
}
}; | 0true | src_main_java_org_elasticsearch_common_collect_ImmutableOpenLongMap.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.