Dataset Viewer
Auto-converted to Parquet Duplicate
Unnamed: 0
int64
0
6.7k
func
stringlengths
12
89.6k
target
bool
2 classes
project
stringlengths
45
151
0
{ @Override public void enteredCluster( ClusterConfiguration clusterConfiguration ) { System.out.println( "Entered cluster:" + clusterConfiguration ); } @Override public void joinedCluster( I...
true
enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_atomicbroadcast_multipaxos_MultiPaxosServer.java
1
public class MultiPaxosServer { private AtomicBroadcastSerializer broadcastSerializer; private ProtocolServer server; public static void main( String[] args ) throws IOException, InvocationTargetException, IllegalAccessException { new MultiPaxosServer().start(); } protected...
true
enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_atomicbroadcast_multipaxos_MultiPaxosServer.java
2
public class Prover { private final Queue<ClusterState> unexploredKnownStates = new LinkedList<>( ); private final ProofDatabase db = new ProofDatabase("./clusterproof"); public static void main(String ... args) throws Exception { new Prover().prove(); } public void prove() throws Exc...
true
enterprise_ha_src_test_java_org_neo4j_ha_correctness_Prover.java
3
{ @Override public void enteredCluster( ClusterConfiguration clusterConfiguration ) { clusterClient.performRoleElections(); clusterClient.removeClusterListener( this ); } });
true
enterprise_ha_src_main_java_org_neo4j_kernel_ha_backup_HaBackupProvider.java
4
{ private long lowerLimit = System.currentTimeMillis() - unit.toMillis( timeToKeep ); @Override public boolean reached( File file, long version, LogLoader source ) { try { ...
true
community_kernel_src_main_java_org_neo4j_kernel_impl_transaction_xaframework_LogPruneStrategies.java
5
public class NetworkReceiver implements MessageSource, Lifecycle { public interface Configuration { HostnamePort clusterServer(); int defaultPort(); String name(); // Name of this cluster instance. Null in most cases, but tools may use e.g. "Backup" } public interfac...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_com_NetworkReceiver.java
6
public class StateHandlingStatementOperations implements KeyReadOperations, KeyWriteOperations, EntityOperations, SchemaReadOperations, SchemaWriteOperations { private final StoreReadLayer storeLayer; private final LegacyPropertyTrackers legacyPropertyTrackers; privat...
true
community_kernel_src_main_java_org_neo4j_kernel_impl_api_StateHandlingStatementOperations.java
7
class ClusterInstance { private final Executor stateMachineExecutor; private final Logging logging; private final MultiPaxosServerFactory factory; private final ProtocolServer server; private final MultiPaxosContext ctx; private final InMemoryAcceptorInstanceStore acceptorInstanceStore; priv...
true
enterprise_ha_src_test_java_org_neo4j_ha_correctness_ClusterInstance.java
8
private class OutgoingMessageHolder implements MessageHolder { private Deque<Message<? extends MessageType>> outgoingMessages = new ArrayDeque<Message<? extends MessageType>>(); @Override public synchronized void offer( Message<? extends MessageType> message ) { outg...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_StateMachines.java
9
{ private Long highest; @Override public boolean reached( File file, long version, LogLoader source ) { // Here we know that the log version exists (checked in AbstractPruneStrategy#prune) ...
true
community_kernel_src_main_java_org_neo4j_kernel_impl_transaction_xaframework_LogPruneStrategies.java
10
private class MessageReceiver extends SimpleChannelHandler { @Override public void channelOpen( ChannelHandlerContext ctx, ChannelStateEvent e ) throws Exception { Channel ctxChannel = ctx.getChannel(); openedChannel( getURI( (InetSocketAddress) ctxCha...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_com_NetworkReceiver.java
11
private static class ClusterInstanceInput implements MessageSource, MessageProcessor { private final List<MessageProcessor> processors = new ArrayList<>(); @Override public boolean process( Message<? extends MessageType> message ) { for ( MessageProcessor processor :...
true
enterprise_ha_src_test_java_org_neo4j_ha_correctness_ClusterInstance.java
12
public class NetworkSender implements MessageSender, Lifecycle { public interface Configuration { int defaultPort(); // This is the default port to try to connect to int port(); // This is the port we are listening on } public interface NetworkChannelsListener { voi...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_com_NetworkSender.java
13
{ @Override public boolean accept( Throwable item ) { return !(item instanceof LifecycleException); } }));
true
enterprise_ha_src_main_java_org_neo4j_kernel_ha_backup_HaBackupProvider.java
14
{ @Override public void operationComplete( ChannelFuture future ) throws Exception { if ( !future.isSuccess() ) { msgLog.debug( "Unable to w...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_com_NetworkSender.java
15
{ OutgoingMessageHolder temporaryOutgoing = new OutgoingMessageHolder(); @Override public void run() { lock.writeLock().lock(); try { // Lock timeouts while we are processing the message ...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_StateMachines.java
16
public static class TransactionTimeSpanPruneStrategy extends AbstractPruneStrategy { private final int timeToKeep; private final TimeUnit unit; public TransactionTimeSpanPruneStrategy( FileSystemAbstraction fileSystem, int timeToKeep, TimeUnit unit ) { super( fileSys...
true
community_kernel_src_main_java_org_neo4j_kernel_impl_transaction_xaframework_LogPruneStrategies.java
17
@Service.Implementation(BackupExtensionService.class) public final class HaBackupProvider extends BackupExtensionService { public HaBackupProvider() { super( "ha" ); } @Override public URI resolve( URI address, Args args, Logging logging ) { String master = null; StringL...
true
enterprise_ha_src_main_java_org_neo4j_kernel_ha_backup_HaBackupProvider.java
18
public static class TransactionCountPruneStrategy extends AbstractPruneStrategy { private final int maxTransactionCount; public TransactionCountPruneStrategy( FileSystemAbstraction fileSystem, int maxTransactionCount ) { super( fileSystem ); this.maxTransactionCo...
true
community_kernel_src_main_java_org_neo4j_kernel_impl_transaction_xaframework_LogPruneStrategies.java
19
private class NetworkMessageSender extends SimpleChannelHandler { @Override public void channelConnected( ChannelHandlerContext ctx, ChannelStateEvent e ) throws Exception { Channel ctxChannel = ctx.getChannel(); openedChannel( getURI( (InetSocketAddre...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_com_NetworkSender.java
20
public class IllegalLogFormatException extends IOException { public IllegalLogFormatException( long expected, long was ) { super( "Invalid log format version found, expected " + expected + " but was " + was + ". To be able to upgrade from an older log format version there must have " + ...
true
community_kernel_src_main_java_org_neo4j_kernel_impl_transaction_xaframework_IllegalLogFormatException.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...
true
community_kernel_src_main_java_org_neo4j_kernel_impl_transaction_xaframework_InMemoryLogBuffer.java
22
public class LogPruneStrategies { public static final LogPruneStrategy NO_PRUNING = new LogPruneStrategy() { @Override public void prune( LogLoader source ) { // Don't prune logs at all. } @Override public String toString() { return ...
true
community_kernel_src_main_java_org_neo4j_kernel_impl_transaction_xaframework_LogPruneStrategies.java
23
{ @Override public boolean matchesSafely( LogEntry.Done done ) { return done != null && done.getIdentifier() == identifier; } @Override public void describeTo( Description description ) { descri...
true
community_kernel_src_test_java_org_neo4j_kernel_impl_transaction_xaframework_LogMatchers.java
24
public class LogMatchers { public static List<LogEntry> logEntries( FileSystemAbstraction fileSystem, String logPath ) throws IOException { StoreChannel fileChannel = fileSystem.open( new File( logPath ), "r" ); ByteBuffer buffer = ByteBuffer.allocateDirect( 9 + Xid.MAXGTRIDSIZE + Xid.MAXBQUALSI...
true
community_kernel_src_test_java_org_neo4j_kernel_impl_transaction_xaframework_LogMatchers.java
25
private class HAMClusterListener extends ClusterListener.Adapter { @Override public void enteredCluster( ClusterConfiguration configuration ) { Map<InstanceId, ClusterMember> newMembers = new HashMap<InstanceId, ClusterMember>(); for ( InstanceId memberClusterUri ...
true
enterprise_ha_src_main_java_org_neo4j_kernel_ha_cluster_member_ClusterMembers.java
26
public class CacheLayer implements StoreReadLayer { private static final Function<? super SchemaRule, IndexDescriptor> TO_INDEX_RULE = new Function<SchemaRule, IndexDescriptor>() { @Override public IndexDescriptor apply( SchemaRule from ) { IndexRule rule = (Index...
true
community_kernel_src_main_java_org_neo4j_kernel_impl_api_store_CacheLayer.java
27
public class ClusterMembers { public static final Predicate<ClusterMember> ALIVE = new Predicate<ClusterMember>() { @Override public boolean accept( ClusterMember item ) { return item.isAlive(); } }; private final InstanceId me; public static Predicate<C...
true
enterprise_ha_src_main_java_org_neo4j_kernel_ha_cluster_member_ClusterMembers.java
28
{ volatile private StateTransitionLogger logger = null; @Override public void listeningAt( URI me ) { server.listeningAt( me ); if (logger == null) { logger = new StateTransitionLogger( logging )...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterClient.java
29
{ @Override public int defaultPort() { return 5001; } @Override public int port() { return config.getAddress().getPort(); } }, receiver, logging);
true
enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterClient.java
30
{ @Override public int getServerId() { return config.get( ClusterSettings.server_id ); } @Override public List<HostnamePort> getInitialHosts() { return config.get( ClusterSettings.initial_hosts )...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterClient.java
31
public class ClusterClient extends LifecycleAdapter implements ClusterMonitor, Cluster, AtomicBroadcast, Snapshot, Election, BindingNotifier { public static final Setting<Long> clusterJoinTimeout = Settings.setting("ha.cluster_join_timeout", Settings.DURATION, "0s"); public interface Configuration ...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterClient.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;...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_StateMachines.java
33
{ @Override public void run() { Channel channel = getChannel( to ); try { if ( channel == null ) { channel = openChannel( to ); openedChann...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_com_NetworkSender.java
34
public abstract class Adapter implements ClusterListener { @Override public void enteredCluster( ClusterConfiguration clusterConfiguration ) { } @Override public void joinedCluster( InstanceId instanceId, URI member ) { } @Ove...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_cluster_ClusterListener.java
35
{ @Override public HostnamePort clusterServer() { return config.get( ClusterSettings.cluster_server ); } @Override public int defaultPort() { return 5001; } @Override ...
true
enterprise_cluster_src_main_java_org_neo4j_cluster_NetworkedServerFactory.java
36
public class StandaloneClusterClientIT { @Test public void canJoinWithExplicitInitialHosts() throws Exception { startAndAssertJoined( 5003, // Config file stringMap(), // Arguments stringMap( initial_hosts.name()...
true
enterprise_server-enterprise_src_test_java_org_neo4j_server_enterprise_StandaloneClusterClientIT.java
End of preview. Expand in Data Studio

Dataset Card for "neo4j_java_function"

More Information needed

Downloads last month
11