Unnamed: 0
int64
0
6.7k
func
stringlengths
12
89.6k
target
bool
2 classes
project
stringlengths
45
151
2,500
{ @Override public Integer convert( Number source ) { return source.intValue(); } };
false
enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Conversion.java
2,501
public static final class Builder { public Configuration build() { return fromMap( new HashMap<String, String>( config ) ); } private final Map<String, String> config; private Builder( HashMap<String, String> config ) { this.config = conf...
false
enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Configuration.java
2,502
{ @Override protected String getConfiguration( String name ) { return config.get( name ); } };
false
enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Configuration.java
2,503
{ @Override protected String getConfiguration( String name ) { for ( Configuration configuration : configurations ) { String value = configuration.getConfiguration( name ); if ( value != null ) ...
false
enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Configuration.java
2,504
{ @Override protected String getConfiguration( String name ) { return System.getProperty( name ); } };
false
enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Configuration.java
2,505
public abstract class Configuration { public static final Configuration SYSTEM_PROPERTIES = new Configuration() { @Override protected String getConfiguration( String name ) { return System.getProperty( name ); } }; public static Configuration combine( Configu...
false
enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Configuration.java
2,506
{ @Override public RelationshipSpec convert( String source ) { String[] parts = source.split( ":" ); if ( parts.length != 2 ) { throw new IllegalArgumentException( "value must have the format <relationship label>:<count>" ); } ...
false
enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_generator_RelationshipSpec.java
2,507
class RelationshipSpec implements RelationshipType { static final Conversion<String, RelationshipSpec> FROM_STRING = new Conversion<String, RelationshipSpec>() { @Override public RelationshipSpec convert( String source ) { String[] parts = source.split( ":" ); if ...
false
enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_generator_RelationshipSpec.java
2,508
class PropertyStats extends RecordStore.Processor<RuntimeException> { Map<Integer, Long> sizeHistogram = new TreeMap<Integer, Long>(); Map<PropertyType, Long> typeHistogram = new EnumMap<PropertyType, Long>( PropertyType.class ); @Override public void processProperty( RecordStore<PropertyRecord> store,...
false
enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_generator_PropertyStats.java
2,509
{ @Override public PropertySpec convert( String value ) { String[] tokens = value.split( ":" ); return new PropertySpec( PropertyGenerator.valueOf( tokens[0] ), Float.parseFloat( tokens[1] ) ); } };
false
enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_generator_PropertySpec.java
2,510
class PropertySpec { public static final Conversion<String,PropertySpec> PARSER = new Conversion<String, PropertySpec>() { @Override public PropertySpec convert( String value ) { String[] tokens = value.split( ":" ); return new PropertySpec( PropertyGenerator.valu...
false
enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_generator_PropertySpec.java
2,511
public class NeoServerDocIT extends AbstractRestFunctionalTestBase { private FunctionalTestHelper functionalTestHelper; @Before public void cleanTheDatabase() { cleanDatabase(); functionalTestHelper = new FunctionalTestHelper( server() ); } @Test public void whenServerIsSta...
false
community_server_src_test_java_org_neo4j_server_NeoServerDocIT.java
2,512
public class NeoServerJAXRSDocIT extends ExclusiveServerTestBase { private NeoServer server; @Before public void cleanTheDatabase() { ServerHelper.cleanTheDatabase( server ); } @After public void stopServer() { if ( server != null ) { server.stop(); ...
false
community_server_src_test_java_org_neo4j_server_NeoServerJAXRSDocIT.java
2,513
{ @Override public void doWork() { for ( int i = 0; i < numberOfNodes; i++ ) { graph.createNode(); } for ( Node n1 : GlobalGraphOperations.at(graph).getAllNodes() ) { ...
false
community_server_src_test_java_org_neo4j_server_NeoServerJAXRSDocIT.java
2,514
public class WebadminConfigurationRule implements ValidationRule { @Override public void validate( Configuration configuration ) throws RuleFailedException { String managementApi = validateConfigurationContainsKey( configuration, Configurator.MANAGEMENT_PATH_PROPERTY_KEY ); S...
false
community_server_src_main_java_org_neo4j_server_configuration_validation_WebadminConfigurationRule.java
2,515
{ @Override public void validate( Configuration configuration ) throws RuleFailedException { // do nothing } }, new ValidationRule()
false
community_server_src_test_java_org_neo4j_server_configuration_validation_ValidatorTest.java
2,516
{ @Override public void validate( Configuration configuration ) throws RuleFailedException { // do nothing } }, new ValidationRule()
false
community_server_src_test_java_org_neo4j_server_configuration_validation_ValidatorTest.java
2,517
{ @Override public void validate( Configuration configuration ) throws RuleFailedException { // do nothing } }, new ValidationRule()
false
community_server_src_test_java_org_neo4j_server_configuration_validation_ValidatorTest.java
2,518
{ @Override public void validate( Configuration configuration ) throws RuleFailedException { // do nothing } } );
false
community_server_src_test_java_org_neo4j_server_configuration_validation_ValidatorTest.java
2,519
{ @Override public void validate( Configuration configuration ) throws RuleFailedException { // do nothing } }, new ValidationRule()
false
community_server_src_test_java_org_neo4j_server_configuration_validation_ValidatorTest.java
2,520
{ @Override public void validate( Configuration configuration ) throws RuleFailedException { throw new RuleFailedException( "dummy rule failed during unit test" ); } }, new ValidationRule()
false
community_server_src_test_java_org_neo4j_server_configuration_validation_ValidatorTest.java
2,521
{ @Override public void validate( Configuration configuration ) throws RuleFailedException { // do nothing } }, new ValidationRule()
false
community_server_src_test_java_org_neo4j_server_configuration_validation_ValidatorTest.java
2,522
{ @Override public void validate( Configuration configuration ) throws RuleFailedException { throw new RuleFailedException( "dummy rule failed during unit test" ); } } );
false
community_server_src_test_java_org_neo4j_server_configuration_validation_ValidatorTest.java
2,523
public class ValidatorTest { @Test public void shouldFailWhenRuleFails() { Validator v = new Validator( new ValidationRule() { @Override public void validate( Configuration configuration ) throws RuleFailedException { throw new RuleFailedEx...
false
community_server_src_test_java_org_neo4j_server_configuration_validation_ValidatorTest.java
2,524
public class Validator { private final ArrayList<ValidationRule> validationRules = new ArrayList<ValidationRule>(); public Validator( ValidationRule... rules ) { if ( rules == null ) { return; } for ( ValidationRule r : rules ) { this.validati...
false
community_server_src_main_java_org_neo4j_server_configuration_validation_Validator.java
2,525
@SuppressWarnings( "serial" ) public class RuleFailedException extends Exception { public RuleFailedException( String message ) { super( message ); } public RuleFailedException( String message, Object... args ) { super( String.format( message, args ) ); } }
false
community_server_src_main_java_org_neo4j_server_configuration_validation_RuleFailedException.java
2,526
public class DatabaseLocationMustBeSpecifiedRuleTest { @Test( expected = RuleFailedException.class ) public void shouldFailWhenDatabaseLocationIsAbsentFromConfig() throws RuleFailedException { DatabaseLocationMustBeSpecifiedRule theRule = new DatabaseLocationMustBeSpecifiedRule(); BaseConfig...
false
community_server_src_test_java_org_neo4j_server_configuration_validation_DatabaseLocationMustBeSpecifiedRuleTest.java
2,527
public class DatabaseLocationMustBeSpecifiedRule implements ValidationRule { public void validate( Configuration configuration ) throws RuleFailedException { String dbLocation = configuration.getString( Configurator.DATABASE_LOCATION_PROPERTY_KEY ); if ( dbLocation == null || dbLocation.length()...
false
community_server_src_main_java_org_neo4j_server_configuration_validation_DatabaseLocationMustBeSpecifiedRule.java
2,528
public class ThirdPartyJaxRsPackage { private final String packageName; private final String mountPoint; public ThirdPartyJaxRsPackage( String packageName, String mountPoint ) { this.packageName = packageName; this.mountPoint = mountPoint; } public String getPackageName() {...
false
community_server_src_main_java_org_neo4j_server_configuration_ThirdPartyJaxRsPackage.java
2,529
public class ServerConfigurator extends Configurator.Adapter { private final MapBasedConfiguration config = new MapBasedConfiguration(); private final List<ThirdPartyJaxRsPackage> jaxRsPackages = new ArrayList<>(); public ServerConfigurator( GraphDatabaseAPI db ) { config.addProperty( DATABASE...
false
community_server_src_main_java_org_neo4j_server_configuration_ServerConfigurator.java
2,530
public class PropertyFileConfiguratorTest { @Rule public Mute mute = muteAll(); @Rule public TemporaryFolder folder = new TemporaryFolder( ); @Test public void whenDatabaseTuningFilePresentInDefaultLocationShouldLoadItEvenIfNotSpecified() throws IOException { File emptyPropertyFile...
false
community_server_src_test_java_org_neo4j_server_configuration_PropertyFileConfiguratorTest.java
2,531
{ @Override public boolean accept( File dir, String name ) { return name.toLowerCase() .equals( NEO4J_PROPERTIES_FILENAME ); } } );
false
community_server_src_main_java_org_neo4j_server_configuration_PropertyFileConfigurator.java
2,532
public class PropertyFileConfigurator extends Configurator.Adapter { private static final String NEO4J_PROPERTIES_FILENAME = "neo4j.properties"; private final CompositeConfiguration serverConfiguration = new CompositeConfiguration(); private File propertyFileDirectory; private final Validator validato...
false
community_server_src_main_java_org_neo4j_server_configuration_PropertyFileConfigurator.java
2,533
private static class Tuple { public Tuple( String name, String value ) { this.name = name; this.value = value; } public String name; public String value; }
false
community_server_src_test_java_org_neo4j_server_configuration_PropertyFileBuilder.java
2,534
{ @Override public void validate( Configuration configuration ) throws RuleFailedException { // do nothing } } );
false
community_server_src_test_java_org_neo4j_server_configuration_validation_ValidatorTest.java
2,535
public class WebadminConfigurationRuleTest { private static final boolean theValidatorHasPassed = true; @Test( expected = RuleFailedException.class ) public void shouldFailIfNoWebadminConfigSpecified() throws RuleFailedException { WebadminConfigurationRule rule = new WebadminConfigurationRule(...
false
community_server_src_test_java_org_neo4j_server_configuration_validation_WebadminConfigurationRuleTest.java
2,536
public class NeoServerPortConflictDocIT extends ExclusiveServerTestBase { @Test public void shouldComplainIfServerPortIsAlreadyTaken() throws IOException { int contestedPort = 9999; try ( ServerSocket ignored = new ServerSocket( contestedPort, 0, InetAddress.getByName(Jetty9WebServer.DEFAULT...
false
community_server_src_test_java_org_neo4j_server_NeoServerPortConflictDocIT.java
2,537
public class CommunityDatabase implements Database { protected final Configurator configurator; protected final Configuration serverConfiguration; protected final Logging logging; protected final ConsoleLogger log; private boolean isRunning = false; private AbstractGraphDatabase graph; @S...
false
community_server_src_main_java_org_neo4j_server_database_CommunityDatabase.java
2,538
{ @Override public Configuration configuration() { return new MapConfiguration( stringMap( DATABASE_LOCATION_PROPERTY_KEY, testDirectory.directory().getPath() ) ); } }, DevNullLoggingService.D...
false
enterprise_server-enterprise_src_test_java_org_neo4j_server_enterprise_EnterpriseDatabaseIT.java
2,539
public class EnterpriseDatabaseIT { @Rule public TargetDirectory.TestDirectory testDirectory = TargetDirectory.testDirForTest( getClass() ); @Test public void shouldStartInSingleModeByDefault() throws Throwable { EnterpriseDatabase db = new EnterpriseDatabase( new Configurator.Adapter() ...
false
enterprise_server-enterprise_src_test_java_org_neo4j_server_enterprise_EnterpriseDatabaseIT.java
2,540
HA { @Override public GraphDatabaseAPI createDatabase( String databaseStoreDirectory, Map<String, String> databaseProperties ) { return (GraphDatabaseAP...
false
enterprise_server-enterprise_src_main_java_org_neo4j_server_enterprise_EnterpriseDatabase.java
2,541
SINGLE { @Override public GraphDatabaseAPI createDatabase( String databaseStoreDirectory, Map<String, String> databaseProperties ) { return (GraphDataba...
false
enterprise_server-enterprise_src_main_java_org_neo4j_server_enterprise_EnterpriseDatabase.java
2,542
public class EnterpriseDatabase extends CommunityDatabase { enum DatabaseMode implements GraphDatabaseFactory { SINGLE { @Override public GraphDatabaseAPI createDatabase( String databaseStoreDirectory, ...
false
enterprise_server-enterprise_src_main_java_org_neo4j_server_enterprise_EnterpriseDatabase.java
2,543
public class EnterpriseBootstrapper extends AdvancedBootstrapper { @Override protected NeoServer createNeoServer() { return new EnterpriseNeoServer( configurator, logging ); } }
false
enterprise_server-enterprise_src_main_java_org_neo4j_server_enterprise_EnterpriseBootstrapper.java
2,544
public class EnsureEnterpriseNeo4jPropertiesExist extends EnsureNeo4jPropertiesExist { public static final String CONFIG_KEY_OLD_SERVER_ID = "ha.machine_id"; public static final String CONFIG_KEY_OLD_COORDINATORS = "ha.zoo_keeper_servers"; public EnsureEnterpriseNeo4jPropertiesExist( Configuration config )...
false
enterprise_server-enterprise_src_main_java_org_neo4j_server_enterprise_EnsureEnterpriseNeo4jPropertiesExist.java
2,545
public class WrappedDatabase extends CommunityDatabase { private final AbstractGraphDatabase db; public WrappedDatabase( AbstractGraphDatabase db ) { this( db, new ServerConfigurator( db ) ); } public WrappedDatabase( AbstractGraphDatabase db, Configurator configurator ) { supe...
false
community_server_src_main_java_org_neo4j_server_database_WrappedDatabase.java
2,546
{ @Override public Configuration configuration() { return new MapConfiguration( stringMap( Configurator.DATABASE_LOCATION_PROPERTY_KEY, tempDir.getAbsolutePath() ) ); } @Override public Map<String, S...
false
community_server_src_test_java_org_neo4j_server_database_TestCommunityDatabase.java
2,547
{ @Override public Configuration configuration() { return new MapConfiguration( serverProperties ); } };
false
community_server_src_test_java_org_neo4j_server_database_TestCommunityDatabase.java
2,548
public class TestCommunityDatabase { @Rule public Mute mute = muteAll(); private File databaseDirectory; private Database theDatabase; private boolean deletionFailureOk; private Logging logging; @Before public void setup() throws Exception { databaseDirectory = createTempDir...
false
community_server_src_test_java_org_neo4j_server_database_TestCommunityDatabase.java
2,549
static class Plain implements RrdDbWrapper { private final RrdDb db; public Plain( RrdDb db ) { this.db = db; } @Override public RrdDb get() { return db; } @Override public void close() throws IOEx...
false
community_server_src_main_java_org_neo4j_server_database_RrdDbWrapper.java
2,550
return new InjectableProvider<E>(componentClass) { @Override public E getValue(HttpContext httpContext) { return component; } };
false
community_server_src_main_java_org_neo4j_server_database_InjectableProvider.java
2,551
public abstract class InjectableProvider<E> extends AbstractHttpContextInjectable<E> implements com.sun.jersey.spi.inject.InjectableProvider<Context, Class<E>> { public final Class<E> t; public static <E> InjectableProvider<? extends E> providerForSingleton(final E component, final Class<E> componentCl...
false
community_server_src_main_java_org_neo4j_server_database_InjectableProvider.java
2,552
@Provider public class GraphDatabaseServiceProvider extends InjectableProvider<GraphDatabaseService> { public Database database; public GraphDatabaseServiceProvider( Database database ) { super( GraphDatabaseService.class ); this.database = database; } @Override public GraphDat...
false
community_server_src_main_java_org_neo4j_server_database_GraphDatabaseServiceProvider.java
2,553
public class EphemeralDatabase extends CommunityDatabase { public EphemeralDatabase( Configurator configurator ) { super( configurator, DevNullLoggingService.DEV_NULL ); } @Override protected AbstractGraphDatabase createDb() { return (AbstractGraphDatabase) new TestGraphDatabase...
false
community_server_src_test_java_org_neo4j_server_database_EphemeralDatabase.java
2,554
@Provider public class DatabaseProvider extends InjectableProvider<Database> { public Database db; public DatabaseProvider( Database db ) { super( Database.class ); this.db = db; } @Override public Database getValue( HttpContext httpContext ) { return db; } }
false
community_server_src_main_java_org_neo4j_server_database_DatabaseProvider.java
2,555
@Provider public class CypherExecutorProvider extends InjectableProvider<CypherExecutor> { public CypherExecutor cypherExecutor; public CypherExecutorProvider( CypherExecutor cypherExecutor ) { super( CypherExecutor.class ); this.cypherExecutor = cypherExecutor; } @Override pub...
false
community_server_src_main_java_org_neo4j_server_database_CypherExecutorProvider.java
2,556
public class CypherExecutor extends LifecycleAdapter { private final Database database; private final StringLogger logger; private ExecutionEngine executionEngine; public CypherExecutor( Database database, StringLogger logger ) { this.database = database; this.logger = logger; }...
false
community_server_src_main_java_org_neo4j_server_database_CypherExecutor.java
2,557
public class PropertyFileBuilder { private final String portNo = "7474"; private final String webAdminUri = "http://localhost:7474/db/manage/"; private final String webAdminDataUri = "http://localhost:7474/db/data/"; private String dbTuningPropertyFile = null; private final ArrayList<Tuple> nameValu...
false
community_server_src_test_java_org_neo4j_server_configuration_PropertyFileBuilder.java
2,558
public class MapBasedConfiguration extends AbstractConfiguration { private Map<String, Object> config = new HashMap<String, Object>(); @Override public boolean isEmpty() { return config.isEmpty(); } @Override public boolean containsKey( String key ) { return config.con...
false
community_server_src_main_java_org_neo4j_server_configuration_MapBasedConfiguration.java
2,559
@SuppressWarnings( "serial" ) public class InvalidServerConfigurationException extends RuntimeException { public InvalidServerConfigurationException( String message ) { super( message ); } }
false
community_server_src_main_java_org_neo4j_server_configuration_InvalidServerConfigurationException.java
2,560
public class DatabaseTuningPropertyFileBuilder { private File parentDirectory = null; private String mappedMemory = null; public static DatabaseTuningPropertyFileBuilder builder( File directory ) { return new DatabaseTuningPropertyFileBuilder( directory ); } private DatabaseTuningPrope...
false
community_server_src_test_java_org_neo4j_server_configuration_DatabaseTuningPropertyFileBuilder.java
2,561
public class StatisticsCollectionEnabledDocIT extends ExclusiveServerTestBase { private CommunityNeoServer server; @After public void stopTheServer() { server.stop(); } @Test public void statisticsShouldBeDisabledByDefault() throws Exception { server = server() ...
false
community_server_src_test_java_org_neo4j_server_StatisticsCollectionEnabledDocIT.java
2,562
private static class ConfiguratorBuilder { private final Configurator configurator; public ConfiguratorBuilder( Configurator initialConfigurator ) { this.configurator = initialConfigurator; } public ConfiguratorBuilder atPort( int port ) { configu...
false
community_server_src_test_java_org_neo4j_server_StartupTimeoutDocIT.java
2,563
{ @Override public void doWork() { deleteAllNodesAndRelationships( dbRule.getGraphDatabaseService() ); deleteAllIndexes( dbRule.getGraphDatabaseService() ); } private void deleteAllNodesAndRelationships( final GraphDat...
false
community_server_src_test_java_org_neo4j_server_StartupTimeoutDocIT.java
2,564
{ @Override public void start() { timerStartSignal.get().run(); try { Thread.sleep( 1000 * 5 ); } ...
false
community_server_src_test_java_org_neo4j_server_StartupTimeoutDocIT.java
2,565
{ @Override public void run() { realTimer.startCountdown(); } } );
false
community_server_src_test_java_org_neo4j_server_StartupTimeoutDocIT.java
2,566
{ @Override public boolean wasTriggered() { return realTimer.wasTriggered(); } @Override public void stopCountdown() { ...
false
community_server_src_test_java_org_neo4j_server_StartupTimeoutDocIT.java
2,567
{ @Override protected InterruptThreadTimer createInterruptStartupTimer() { /* Create an InterruptThreadTimer that won't start its count down until server modules have * started to load (and in the case of these tests wait long enough for the t...
false
community_server_src_test_java_org_neo4j_server_StartupTimeoutDocIT.java
2,568
{ @Override protected Iterable<ServerModule> createServerModules() { return Arrays.asList(); } };
false
community_server_src_test_java_org_neo4j_server_StartupTimeoutDocIT.java
2,569
public class StartupTimeoutDocIT { @Test public void shouldTimeoutIfStartupTakesLongerThanTimeout() throws IOException { // GIVEN Configurator configurator = buildProperties().withStartupTimeout( 1 ).atPort( 7480 ).build(); server = createSlowServer( configurator, true ); //...
false
community_server_src_test_java_org_neo4j_server_StartupTimeoutDocIT.java
2,570
{ @Override public GraphDatabaseAPI createDatabase( String databaseStoreDirectory, Map<String, String> databaseProperties ) { return (GraphDatabaseAPI) new TestGraphDatabaseFactory().newImpermanentDatabaseBuilder().setConfig( databaseProperties ).newGraphDatabase(...
false
community_server_src_test_java_org_neo4j_server_ServerTestUtils.java
2,571
{ @Override public GraphDatabaseAPI createDatabase( String databaseStoreDirectory, Map<String, String> databaseProperties ) { return (GraphDatabaseAPI) new org.neo4j.graphdb.factory.GraphDatabaseFactory().newEmbeddedDatabaseBuilder( databaseStoreDirectory ).setCon...
false
community_server_src_test_java_org_neo4j_server_ServerTestUtils.java
2,572
public class ServerTestUtils { public static final GraphDatabaseFactory EMBEDDED_GRAPH_DATABASE_FACTORY = new GraphDatabaseFactory() { @Override public GraphDatabaseAPI createDatabase( String databaseStoreDirectory, Map<String, String> databaseProperties ) { r...
false
community_server_src_test_java_org_neo4j_server_ServerTestUtils.java
2,573
public class ServerStartupException extends RuntimeException { /** * Creates a new exception with a message and an error code. * * @param message sensible explanation about the exception, excluding the * error code value, which will be automatically appended * @param errorCode u...
false
community_server_src_main_java_org_neo4j_server_ServerStartupException.java
2,574
public class ServerConfigDocIT extends ExclusiveServerTestBase { private CommunityNeoServer server; @After public void stopTheServer() { server.stop(); } @Test public void shouldPickUpPortFromConfig() throws Exception { final int NON_DEFAULT_PORT = 4321; server...
false
community_server_src_test_java_org_neo4j_server_ServerConfigDocIT.java
2,575
public class RoundRobinJobScheduler implements JobScheduler { private final List<ScheduledJob> scheduledJobs = new LinkedList<ScheduledJob>(); private final Logging logging; public RoundRobinJobScheduler( Logging logging ) { this.logging = logging; } @Override public void scheduleA...
false
community_server_src_main_java_org_neo4j_server_RoundRobinJobScheduler.java
2,576
public class PreflightTasksDocIT extends ExclusiveServerTestBase { private NeoServer server; @Test( expected = ServerStartupException.class ) public void shouldExitWhenFailedStartupHealthCheck() throws Throwable { server = CommunityServerBuilder.server() .usingDatabaseDir( fold...
false
community_server_src_test_java_org_neo4j_server_PreflightTasksDocIT.java
2,577
public class NeoServerStartupLoggingDocIT extends ExclusiveServerTestBase { private static Logging logging; private static NeoServer server; @BeforeClass public static void setupServer() throws IOException { logging = new BufferingLogging(); server = ServerHelper.createNonPersistent...
false
community_server_src_test_java_org_neo4j_server_NeoServerStartupLoggingDocIT.java
2,578
public class NeoServerShutdownLoggingDocIT extends ExclusiveServerTestBase { private Logging logging; private NeoServer server; @Before public void setupServer() throws IOException { logging = new BufferingLogging(); server = ServerHelper.createPersistentServer(folder.getRoot(), log...
false
community_server_src_test_java_org_neo4j_server_NeoServerShutdownLoggingDocIT.java
2,579
@Provider public class NeoServerProvider extends InjectableProvider<NeoServer> { public NeoServer neoServer; public NeoServerProvider( NeoServer db ) { super( NeoServer.class ); this.neoServer = db; } @Override public NeoServer getValue( HttpContext httpContext ) { ...
false
community_server_src_main_java_org_neo4j_server_NeoServerProvider.java
2,580
public class TestInterruptThreadTimer { @Test public void shouldInterruptIfTimeoutIsReached() { try { InterruptThreadTimer timer = InterruptThreadTimer.createTimer(100, Thread.currentThread()); timer.startCountdown(); Thread.sleep(3000); fail("Should have been interrupted."); } catch(InterruptedExce...
false
community_server_src_test_java_org_neo4j_server_TestInterruptThreadTimer.java
2,581
public class TransactionTimeoutDocIT extends ExclusiveServerTestBase { private CommunityNeoServer server; @After public void stopTheServer() { server.stop(); } @Test public void shouldHonorReallyLowSessionTimeout() throws Exception { // Given server = server().w...
false
community_server_src_test_java_org_neo4j_server_TransactionTimeoutDocIT.java
2,582
public class WebTestUtils { private static boolean available( int port ) { if ( port < 1111 || port > 9999 ) { throw new IllegalArgumentException( "Invalid start port: " + port ); } ServerSocket ss = null; DatagramSocket ds = null; try { ...
false
community_server_src_test_java_org_neo4j_server_WebTestUtils.java
2,583
{ @Override public void run() { server.stop(); server.start(); } };
false
advanced_server-advanced_src_main_java_org_neo4j_server_advanced_jmx_ServerManagement.java
2,584
public class ConfiguratorTest { @Rule public TemporaryFolder folder = new TemporaryFolder(); @Test public void shouldProvideAConfiguration() throws IOException { File configFile = PropertyFileBuilder.builder( folder.getRoot() ) .build(); Configuration config = new Pr...
false
community_server_src_test_java_org_neo4j_server_configuration_ConfiguratorTest.java
2,585
public static abstract class Adapter implements Configurator { @Override public List<ThirdPartyJaxRsPackage> getThirdpartyJaxRsClasses() { return getThirdpartyJaxRsPackages(); } @Override public List<ThirdPartyJaxRsPackage> getThirdpartyJaxRsPackages(...
false
community_server_src_main_java_org_neo4j_server_configuration_Configurator.java
2,586
{ };
false
community_server_src_main_java_org_neo4j_server_configuration_Configurator.java
2,587
{ final Iterator<?> keys = config.getKeys(); @Override protected String fetchNextOrNull() { while ( keys.hasNext() ) { Object key = keys.next(); ...
false
community_server_src_main_java_org_neo4j_server_configuration_Configurator.java
2,588
{ @Override public void dumpDiagnostics( final Configurator source, DiagnosticsPhase phase, StringLogger log ) { if ( phase.isInitialization() || phase.isExplicitlyRequested() ) { final Configuration config = source.configuration(); log...
false
community_server_src_main_java_org_neo4j_server_configuration_Configurator.java
2,589
List<String> DEFAULT_MANAGEMENT_CONSOLE_ENGINES = new ArrayList<String>(){ private static final long serialVersionUID = 6621747998288594121L; { add(new ShellSessionCreator().name()); }};
false
community_server_src_main_java_org_neo4j_server_configuration_Configurator.java
2,590
@Provider public class ConfigurationProvider extends InjectableProvider<Configuration> { private Configuration config; public ConfigurationProvider( Configuration config ) { super( Configuration.class ); this.config = config; } @Override public Configuration getValue( HttpConte...
false
community_server_src_main_java_org_neo4j_server_configuration_ConfigurationProvider.java
2,591
public class JMXManagementModule implements ServerModule { private final NeoServer server; public JMXManagementModule( NeoServer server ) { this.server = server; } @Override public void start() { try { ServerManagement serverManagement = new ServerManage...
false
advanced_server-advanced_src_main_java_org_neo4j_server_advanced_modules_JMXManagementModule.java
2,592
public final class ServerManagement implements ServerManagementMBean { private final NeoServer server; public ServerManagement(NeoServer bs) { this.server = bs; } @Override public synchronized void restartServer() { Thread thread = new Thread( "restart thread" ) { ...
false
advanced_server-advanced_src_main_java_org_neo4j_server_advanced_jmx_ServerManagement.java
2,593
public class WrappingNeoServer extends CommunityNeoServer { private final GraphDatabaseAPI db; public WrappingNeoServer( GraphDatabaseAPI db ) { this( db, new ServerConfigurator( db ) ); } public WrappingNeoServer( GraphDatabaseAPI db, Configurator configurator ) { super( db.ge...
false
community_server_src_main_java_org_neo4j_server_WrappingNeoServer.java
2,594
private class TestAdvancedNeoServer extends AdvancedNeoServer { private final File configFile; public TestAdvancedNeoServer( Configurator propertyFileConfigurator, File configFile, Logging logging ) { super( propertyFileConfigurator, logging ); this.configFile = ...
false
advanced_server-advanced_src_test_java_org_neo4j_server_advanced_helpers_AdvancedServerBuilder.java
2,595
public class AdvancedServerBuilder extends CommunityServerBuilder { public AdvancedServerBuilder( Logging logging ) { super( given( logging ) ); } public static AdvancedServerBuilder server( Logging logging ) { return new AdvancedServerBuilder( logging ); } public static Ad...
false
advanced_server-advanced_src_test_java_org_neo4j_server_advanced_helpers_AdvancedServerBuilder.java
2,596
public class BootstrapperTest { @Test public void shouldBeAbleToRestartServer() throws Exception { TargetDirectory target = TargetDirectory.forTest( getClass() ); String dbDir1 = target.cleanDirectory( "db1" ).getAbsolutePath(); Configurator config = new PropertyFileConfigurator( Val...
false
advanced_server-advanced_src_test_java_org_neo4j_server_advanced_BootstrapperTest.java
2,597
public class AdvancedNeoServer extends CommunityNeoServer { protected AdvancedNeoServer( Logging logging ) { super( logging ); } public AdvancedNeoServer( Configurator configurator, Logging logging ) { super( logging ); this.configurator = configurator; init(); } @Ov...
false
advanced_server-advanced_src_main_java_org_neo4j_server_advanced_AdvancedNeoServer.java
2,598
public class AdvancedBootstrapperTest { @Test public void bootstrapperLoadsAdvancedServerBootstrapper() throws Exception { assertThat( Bootstrapper.loadMostDerivedBootstrapper(), is( instanceOf( AdvancedBootstrapper.class ) ) ); } }
false
advanced_server-advanced_src_test_java_org_neo4j_server_advanced_AdvancedBootstrapperTest.java
2,599
public class AdvancedBootstrapper extends CommunityBootstrapper { @Override protected NeoServer createNeoServer() { return new AdvancedNeoServer( configurator, logging ); } }
false
advanced_server-advanced_src_main_java_org_neo4j_server_advanced_AdvancedBootstrapper.java