Unnamed: 0 int64 0 6.45k | func stringlengths 29 253k | target class label 2
classes | project stringlengths 36 167 |
|---|---|---|---|
1,105 | @RunWith(HazelcastParallelClassRunner.class)
@Category(QuickTest.class)
public class SemaphoreConfigTest {
@Test
public void testSetInitialPermits() {
SemaphoreConfig semaphoreConfig = new SemaphoreConfig().setInitialPermits(1234);
assertTrue(semaphoreConfig.getInitialPermits() == 1234);
}
... | 0true | hazelcast_src_test_java_com_hazelcast_config_SemaphoreConfigTest.java |
3,136 | public class InternalEngineModule extends AbstractModule {
@Override
protected void configure() {
bind(Engine.class).to(InternalEngine.class).asEagerSingleton();
}
} | 0true | src_main_java_org_elasticsearch_index_engine_internal_InternalEngineModule.java |
250 | fCollapseComments= new FoldingAction(getResourceBundle(), "Projection.CollapseComments.") {
public void run() {
if (editor instanceof CeylonEditor) {
ProjectionAnnotationModel pam = ((CeylonEditor) editor).getCeylonSourceViewer()
.getPr... | 0true | plugins_com.redhat.ceylon.eclipse.ui_src_com_redhat_ceylon_eclipse_code_editor_FoldingActionGroup.java |
19 | static class ByteVertex extends Vertex {
private final LongObjectMap<ConcurrentSkipListSet<ByteEntry>> tx;
private final SortedSet<ByteEntry> set;
ByteVertex(long id, LongObjectMap<ConcurrentSkipListSet<ByteEntry>> tx) {
super(id);
this.tx = tx;
this.set... | 0true | titan-test_src_main_java_com_thinkaurelius_titan_TestByteBuffer.java |
679 | private final class EntryIterator implements Iterator<Entry<K, V>> {
private int currentIndex;
private EntryIterator(int currentIndex) {
this.currentIndex = currentIndex;
}
@Override
public boolean hasNext() {
return currentIndex < size();
}
@Override
public Entry<K, V> ... | 0true | core_src_main_java_com_orientechnologies_orient_core_index_hashindex_local_OHashIndexBucket.java |
3,516 | public class MergeContext {
private final DocumentMapper documentMapper;
private final DocumentMapper.MergeFlags mergeFlags;
private final List<String> mergeConflicts = Lists.newArrayList();
public MergeContext(DocumentMapper documentMapper, DocumentMapper.MergeFlags mergeFlags) {
this.documen... | 0true | src_main_java_org_elasticsearch_index_mapper_MergeContext.java |
1,741 | public class CompressorFactory {
private static final LZFCompressor LZF = new LZFCompressor();
private static final Compressor[] compressors;
private static final ImmutableMap<String, Compressor> compressorsByType;
private static Compressor defaultCompressor;
static {
List<Compressor> com... | 0true | src_main_java_org_elasticsearch_common_compress_CompressorFactory.java |
1,603 | Set<SystemLog> sorted = new TreeSet<SystemLog>(new Comparator<SystemLog>() {
public int compare(SystemLog o1, SystemLog o2) {
long thisVal = o1.date;
long anotherVal = o2.date;
return (thisVal < anotherVal ? -1 : (thisVal == anotherVal ? 0 : 1));
... | 0true | hazelcast_src_main_java_com_hazelcast_logging_SystemLogService.java |
1,804 | interface CreationListener {
void notify(Errors errors);
} | 0true | src_main_java_org_elasticsearch_common_inject_BindingProcessor.java |
4,680 | final static class MatchAndSort extends QueryCollector {
private final TopScoreDocCollector topDocsCollector;
MatchAndSort(ESLogger logger, PercolateContext context) {
super(logger, context);
// TODO: Use TopFieldCollector.create(...) for ascending and decending scoring?
... | 1no label | src_main_java_org_elasticsearch_percolator_QueryCollector.java |
2,173 | static class IteratorBasedIterator extends DocIdSetIterator {
final class Item {
public final DocIdSetIterator iter;
public int doc;
public Item(DocIdSetIterator iter) {
this.iter = iter;
this.doc = -1;
}
}
pr... | 0true | src_main_java_org_elasticsearch_common_lucene_docset_OrDocIdSet.java |
3,134 | public class QueueIterator<E> implements Iterator<E> {
private final Iterator<Data> iterator;
private final SerializationService serializationService;
private final boolean binary;
public QueueIterator(Iterator<Data> iterator, SerializationService serializationService, boolean binary) {
this.i... | 1no label | hazelcast_src_main_java_com_hazelcast_queue_proxy_QueueIterator.java |
158 | private final Function<String, Locker> ASTYANAX_RECIPE_LOCKER_CREATOR = new Function<String, Locker>() {
@Override
public Locker apply(String lockerName) {
String expectedManagerName = "com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager";
String act... | 0true | titan-core_src_main_java_com_thinkaurelius_titan_diskstorage_Backend.java |
235 | .registerHookValue(profilerPrefix + "enabled", "Cache enabled", METRIC_TYPE.ENABLED, new OProfilerHookValue() {
public Object getValue() {
return isEnabled();
}
}, profilerMetadataPrefix + "enabled"); | 0true | core_src_main_java_com_orientechnologies_orient_core_cache_OAbstractRecordCache.java |
540 | public class DeleteMappingRequest extends AcknowledgedRequest<DeleteMappingRequest> {
private String[] indices;
private IndicesOptions indicesOptions = IndicesOptions.fromOptions(false, false, true, false);
private String[] types;
DeleteMappingRequest() {
}
/**
* Constructs a new delete ... | 0true | src_main_java_org_elasticsearch_action_admin_indices_mapping_delete_DeleteMappingRequest.java |
560 | public class RandomLB extends AbstractLoadBalancer {
private final Random random = new Random();
@Override
public Member next() {
Member[] members = getMembers();
if (members == null || members.length == 0) {
return null;
}
int index = random.nextInt(members.len... | 0true | hazelcast-client_src_main_java_com_hazelcast_client_util_RandomLB.java |
2,998 | public static class FilterCacheValueWeigher implements Weigher<WeightedFilterCache.FilterCacheKey, DocIdSet> {
@Override
public int weigh(FilterCacheKey key, DocIdSet value) {
int weight = (int) Math.min(DocIdSets.sizeInBytes(value), Integer.MAX_VALUE);
return weight == 0 ? ... | 0true | src_main_java_org_elasticsearch_index_cache_filter_weighted_WeightedFilterCache.java |
157 | public class ConcurrentLinkedDeque<E>
extends AbstractCollection<E>
implements Deque<E>, java.io.Serializable {
/*
* This is an implementation of a concurrent lock-free deque
* supporting interior removes but not interior insertions, as
* required to support the entire Deque interface.
... | 0true | src_main_java_jsr166y_ConcurrentLinkedDeque.java |
126 | public enum METRIC_TYPE {
CHRONO, COUNTER, STAT, SIZE, ENABLED, TEXT
} | 0true | commons_src_main_java_com_orientechnologies_common_profiler_OProfilerMBean.java |
2,642 | transportService.sendRequest(requestingNode, MulticastPingResponseRequestHandler.ACTION, multicastPingResponse, new EmptyTransportResponseHandler(ThreadPool.Names.SAME) {
@Override
public void handleException(TransportException exp) {
logge... | 0true | src_main_java_org_elasticsearch_discovery_zen_ping_multicast_MulticastZenPing.java |
918 | public class PlainActionFuture<T> extends AdapterActionFuture<T, T> {
public static <T> PlainActionFuture<T> newFuture() {
return new PlainActionFuture<T>();
}
@Override
protected T convert(T listenerResponse) {
return listenerResponse;
}
} | 0true | src_main_java_org_elasticsearch_action_support_PlainActionFuture.java |
1,596 | public class ThrottlingAllocationDecider extends AllocationDecider {
public static final String CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES = "cluster.routing.allocation.node_initial_primaries_recoveries";
public static final String CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES = "clus... | 1no label | src_main_java_org_elasticsearch_cluster_routing_allocation_decider_ThrottlingAllocationDecider.java |
274 | private final class GotoListener implements KeyListener {
@Override
public void keyReleased(KeyEvent e) {}
@Override
public void keyPressed(KeyEvent e) {
if (e.character == 0x1B) // ESC
dispose();
if (EditorUtil.triggersBinding(e, getCommandBi... | 0true | plugins_com.redhat.ceylon.eclipse.ui_src_com_redhat_ceylon_eclipse_code_editor_PeekDefinitionPopup.java |
683 | public interface CategoryProductXref extends Serializable {
/**
* Gets the category.
*
* @return the category
*/
Category getCategory();
/**
* Sets the category.
*
* @param category the new category
*/
void setCategory(Category category);
/**
* Gets ... | 0true | core_broadleaf-framework_src_main_java_org_broadleafcommerce_core_catalog_domain_CategoryProductXref.java |
1,387 | @XmlRootElement(name = "categories")
@XmlAccessorType(value = XmlAccessType.FIELD)
public class CategoriesWrapper extends BaseWrapper implements APIWrapper<List<Category>> {
@XmlElement(name = "category")
protected List<CategoryWrapper> categories = new ArrayList<CategoryWrapper>();
@Override
public v... | 0true | core_broadleaf-framework-web_src_main_java_org_broadleafcommerce_core_web_api_wrapper_CategoriesWrapper.java |
822 | public class MultiSearchRequestTests extends ElasticsearchTestCase {
@Test
public void simpleAdd() throws Exception {
byte[] data = Streams.copyToBytesFromClasspath("/org/elasticsearch/action/search/simple-msearch1.json");
MultiSearchRequest request = new MultiSearchRequest().add(data, 0, data.... | 0true | src_test_java_org_elasticsearch_action_search_MultiSearchRequestTests.java |
1,472 | public class BroadleafSocialRegisterController extends BroadleafRegisterController {
//Pre-populate portions of the RegisterCustomerForm from ProviderSignInUtils.getConnection();
public String register(RegisterCustomerForm registerCustomerForm, HttpServletRequest request,
HttpServlet... | 0true | core_broadleaf-framework-web_src_main_java_org_broadleafcommerce_core_web_controller_account_BroadleafSocialRegisterController.java |
3,380 | public static class Builder implements IndexFieldData.Builder {
private NumericType numericType;
public Builder setNumericType(NumericType numericType) {
this.numericType = numericType;
return this;
}
@Override
public IndexFieldData<AtomicNumericFie... | 0true | src_main_java_org_elasticsearch_index_fielddata_plain_PackedArrayIndexFieldData.java |
440 | @Deprecated
public @interface AdminPresentationAdornedTargetCollectionOverride {
/**
* The name of the property whose AdminPresentation annotation should be overwritten
*
* @return the name of the property that should be overwritten
*/
String name();
/**
* The AdminPresentation to... | 0true | common_src_main_java_org_broadleafcommerce_common_presentation_override_AdminPresentationAdornedTargetCollectionOverride.java |
1,993 | private static class AndMatcher<T> extends AbstractMatcher<T> implements Serializable {
private final Matcher<? super T> a, b;
public AndMatcher(Matcher<? super T> a, Matcher<? super T> b) {
this.a = a;
this.b = b;
}
public boolean matches(T t) {
... | 0true | src_main_java_org_elasticsearch_common_inject_matcher_AbstractMatcher.java |
722 | @RunWith(HazelcastParallelClassRunner.class)
@Category(QuickTest.class)
public class ListTest extends HazelcastTestSupport {
@Test
@ClientCompatibleTest
public void testListMethods() throws Exception {
Config config = new Config();
final String name = "defList";
final int count = 10... | 0true | hazelcast_src_test_java_com_hazelcast_collection_ListTest.java |
3,390 | abstract class SortedSetDVAtomicFieldData {
private final AtomicReader reader;
private final String field;
private volatile IntArray hashes;
SortedSetDVAtomicFieldData(AtomicReader reader, String field) {
this.reader = reader;
this.field = field;
}
public boolean isMultiValued... | 0true | src_main_java_org_elasticsearch_index_fielddata_plain_SortedSetDVAtomicFieldData.java |
595 | public class PlotConstants {
/*
* Default Plot Properties.
*/
public static final int DEFAULT_NUMBER_OF_SUBPLOTS = 1;
public static final boolean LOCAL_CONTROLS_ENABLED_BY_DEFAULT = true;
public static final YAxisMaximumLocationSetting DEFAULT_Y_AXIS_MAX_LOCATION_SETTING = YAxisMaximumLocationSetting.MAXIMUM_A... | 1no label | fastPlotViews_src_main_java_gov_nasa_arc_mct_fastplot_bridge_PlotConstants.java |
403 | public class TransportCreateSnapshotAction extends TransportMasterNodeOperationAction<CreateSnapshotRequest, CreateSnapshotResponse> {
private final SnapshotsService snapshotsService;
@Inject
public TransportCreateSnapshotAction(Settings settings, TransportService transportService, ClusterService clusterSe... | 1no label | src_main_java_org_elasticsearch_action_admin_cluster_snapshots_create_TransportCreateSnapshotAction.java |
355 | future.andThen(new ExecutionCallback<Map<String, List<Integer>>>() {
@Override
public void onResponse(Map<String, List<Integer>> response) {
listenerResults.putAll(response);
semaphore.release();
}
@Override
public void... | 0true | hazelcast-client_src_test_java_com_hazelcast_client_mapreduce_ClientMapReduceTest.java |
3,283 | private static class OrdinalsStore {
private static final int PAGE_SIZE = 1 << 12;
/**
* Number of slots at <code>level</code>
*/
private static int numSlots(int level) {
return 1 << level;
}
private static int slotsMask(int level) {
... | 0true | src_main_java_org_elasticsearch_index_fielddata_ordinals_OrdinalsBuilder.java |
3,596 | private ThreadLocal<NumericTokenStream> tokenStream = new ThreadLocal<NumericTokenStream>() {
@Override
protected NumericTokenStream initialValue() {
return new NumericTokenStream(precisionStep);
}
}; | 0true | src_main_java_org_elasticsearch_index_mapper_core_NumberFieldMapper.java |
710 | public interface ProductOption extends Serializable {
/**
* Returns unique identifier of the product option.
* @return
*/
public Long getId();
/**
* Sets the unique identifier of the product option.
* @param id
*/
public void setId(Long id);
/**
* Returns th... | 0true | core_broadleaf-framework_src_main_java_org_broadleafcommerce_core_catalog_domain_ProductOption.java |
1,692 | @Entity
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "BLC_ADMIN_PASSWORD_TOKEN")
public class ForgotPasswordSecurityTokenImpl implements ForgotPasswordSecurityToken {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "PASSWORD_TOKEN", nullable = false)
protected S... | 1no label | admin_broadleaf-open-admin-platform_src_main_java_org_broadleafcommerce_openadmin_server_security_domain_ForgotPasswordSecurityTokenImpl.java |
363 | public class HBaseIDAuthorityTest extends IDAuthorityTest {
public HBaseIDAuthorityTest(WriteConfiguration baseConfig) {
super(baseConfig);
}
@BeforeClass
public static void startHBase() throws IOException {
HBaseStorageSetup.startHBase();
}
@AfterClass
public static void ... | 0true | titan-hbase-parent_titan-hbase-core_src_test_java_com_thinkaurelius_titan_diskstorage_hbase_HBaseIDAuthorityTest.java |
3,508 | class InternalFieldMapperListener extends FieldMapperListener {
@Override
public void fieldMapper(FieldMapper fieldMapper) {
addFieldMappers(Arrays.asList(fieldMapper));
}
@Override
public void fieldMappers(Iterable<FieldMapper> fieldMappers) {
addFi... | 0true | src_main_java_org_elasticsearch_index_mapper_MapperService.java |
55 | new Visitor() {
@Override
public void visit(Tree.StaticMemberOrTypeExpression that) {
Tree.TypeArguments tal = that.getTypeArguments();
Integer startIndex = tal==null ?
null : that.getTypeArguments().getStartIndex();
... | 0true | plugins_com.redhat.ceylon.eclipse.ui_src_com_redhat_ceylon_eclipse_code_complete_TypeArgumentListCompletions.java |
653 | public class TransportGetIndexTemplatesAction extends TransportMasterNodeReadOperationAction<GetIndexTemplatesRequest, GetIndexTemplatesResponse> {
@Inject
public TransportGetIndexTemplatesAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool) {
... | 1no label | src_main_java_org_elasticsearch_action_admin_indices_template_get_TransportGetIndexTemplatesAction.java |
1,305 | public static final class RemoteDBRunner {
public static void main(String[] args) throws Exception {
OGlobalConfiguration.CACHE_LEVEL1_ENABLED.setValue(false);
OGlobalConfiguration.CACHE_LEVEL1_SIZE.setValue(0);
OGlobalConfiguration.CACHE_LEVEL2_ENABLED.setValue(false);
OGlobalConfiguratio... | 0true | server_src_test_java_com_orientechnologies_orient_core_storage_impl_local_paginated_LocalPaginatedStorageUpdateCrashRestore.java |
696 | class LRUEntry {
OCacheEntry cacheEntry;
long hashCode;
LRUEntry next;
LRUEntry after;
LRUEntry before;
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
LRUEntry lruEntry = (LRUEn... | 0true | core_src_main_java_com_orientechnologies_orient_core_index_hashindex_local_cache_LRUEntry.java |
1,170 | public static enum ORDER {
/**
* Used when order compared to other operator can not be evaluated or has no consequences.
*/
UNKNOWNED,
/**
* Used when this operator must be before the other one
*/
BEFORE,
/**
* Used when this operator must be after the other one
*/
... | 0true | core_src_main_java_com_orientechnologies_orient_core_sql_operator_OQueryOperator.java |
157 | public abstract class AbstractStructuredContentRuleProcessor implements StructuredContentRuleProcessor {
private static final Log LOG = LogFactory.getLog(AbstractStructuredContentRuleProcessor.class);
private Map expressionCache = Collections.synchronizedMap(new LRUMap(1000));
private ParserContext parserC... | 0true | admin_broadleaf-contentmanagement-module_src_main_java_org_broadleafcommerce_cms_structure_service_AbstractStructuredContentRuleProcessor.java |
2,248 | return new TokenStream() {
boolean finished = true;
final CharTermAttribute term = addAttribute(CharTermAttribute.class);
final PayloadAttribute payload = addAttribute(PayloadAttribute.class);
@Override
public boolean incrementT... | 0true | src_test_java_org_elasticsearch_common_lucene_uid_VersionsTests.java |
1,773 | map.addEntryListener(new EntryAdapter<Object, Object>() {
@Override
public void entryEvicted(EntryEvent<Object, Object> event) {
count.incrementAndGet();
}
}, true); | 0true | hazelcast_src_test_java_com_hazelcast_map_EvictionTest.java |
11 | static final class AsyncApply<T,U> extends Async {
final T arg;
final Fun<? super T,? extends U> fn;
final CompletableFuture<U> dst;
AsyncApply(T arg, Fun<? super T,? extends U> fn,
CompletableFuture<U> dst) {
this.arg = arg; this.fn = fn; this.dst = ds... | 0true | src_main_java_jsr166e_CompletableFuture.java |
4,876 | public class RestAllocationAction extends AbstractCatAction {
@Inject
public RestAllocationAction(Settings settings, Client client, RestController controller) {
super(settings, client);
controller.registerHandler(GET, "/_cat/allocation", this);
controller.registerHandler(GET, "/_cat/all... | 1no label | src_main_java_org_elasticsearch_rest_action_cat_RestAllocationAction.java |
395 | private final Comparator<CacheRecord<K>> comparator = new Comparator<CacheRecord<K>>() {
public int compare(CacheRecord<K> o1, CacheRecord<K> o2) {
if (EvictionPolicy.LRU.equals(evictionPolicy)) {
return ((Long) o1.lastAccessTime).compareTo((o2.lastAccessTime));
} els... | 0true | hazelcast-client_src_main_java_com_hazelcast_client_nearcache_ClientNearCache.java |
304 | public class OContextConfiguration {
private Map<String, Object> config = new HashMap<String, Object>(); ;
/**
* Empty constructor to create just a proxy for the OGlobalConfiguration. No values are setted.
*/
public OContextConfiguration() {
}
/**
* Initializes the context with custom parameters.
... | 0true | core_src_main_java_com_orientechnologies_orient_core_config_OContextConfiguration.java |
1,250 | public interface FulfillmentPricingProvider {
/**
* Calculates the total cost for this FulfillmentGroup. Specific configurations for calculating
* this cost can come from {@link FulfillmentGroup#getFulfillmentOption()}. This method is invoked
* during the pricing workflow and will only be called if ... | 0true | core_broadleaf-framework_src_main_java_org_broadleafcommerce_core_pricing_service_fulfillment_provider_FulfillmentPricingProvider.java |
391 | @SuppressWarnings({ "serial" })
public class ORecordLazyList extends ORecordTrackedList implements ORecordLazyMultiValue {
protected ORecordLazyListener listener;
protected final byte recordType;
protected ORecordMultiValueHelper.MULTIVALUE_CONTENT_... | 0true | core_src_main_java_com_orientechnologies_orient_core_db_record_ORecordLazyList.java |
1,101 | public final class SSLConfig {
private boolean enabled = false;
private String factoryClassName = null;
private Object factoryImplementation = null;
private Properties properties = new Properties();
/**
* Returns the name of the {@link com.hazelcast.nio.ssl.SSLContextFactory} implementation c... | 0true | hazelcast_src_main_java_com_hazelcast_config_SSLConfig.java |
1,986 | public class ToStringBuilder {
// Linked hash map ensures ordering.
final Map<String, Object> map = new LinkedHashMap<String, Object>();
final String name;
public ToStringBuilder(String name) {
this.name = name;
}
public ToStringBuilder(Class type) {
this.name = type.getSimpl... | 0true | src_main_java_org_elasticsearch_common_inject_internal_ToStringBuilder.java |
604 | public final class IndexMetadata {
private final String name;
private final OIndexDefinition indexDefinition;
private final Set<String> clustersToIndex;
private final String type;
private final String algorithm;
private final String valueContainerAl... | 0true | core_src_main_java_com_orientechnologies_orient_core_index_OIndexInternal.java |
1,221 | public class PaymentSeed implements CompositePaymentResponse {
private Order order;
private Map<PaymentInfo, Referenced> infos;
private PaymentResponse paymentResponse;
private Money transactionAmount;
public PaymentSeed(Order order, Map<PaymentInfo, Referenced> infos, PaymentResponse paymentRespo... | 0true | core_broadleaf-framework_src_main_java_org_broadleafcommerce_core_payment_service_workflow_PaymentSeed.java |
End of preview. Expand in Data Studio
- Downloads last month
- 2