Unnamed: 0 int64 0 6.7k | func stringlengths 12 89.6k | target bool 2
classes | project stringlengths 45 151 |
|---|---|---|---|
2,400 | {
@Override
Representation convert( Object obj )
{
return ValueRepresentation.number( ( (Number) obj ).doubleValue() );
}
}, BOOL_RESULT = new ValueResult( RepresentationType.BOOLEAN ) | false | community_server_src_main_java_org_neo4j_server_plugins_ResultConverter.java |
2,401 | {
@Override
Representation convert( Object obj )
{
return ValueRepresentation.number( ( (Number) obj ).longValue() );
}
}, DOUBLE_RESULT = new ValueResult( RepresentationType.DOUBLE ) | false | community_server_src_main_java_org_neo4j_server_plugins_ResultConverter.java |
2,402 | {
@Override
Representation convert( Object obj )
{
return ValueRepresentation.string( (String) obj );
}
}, LONG_RESULT = new ValueResult( RepresentationType.LONG ) | false | community_server_src_main_java_org_neo4j_server_plugins_ResultConverter.java |
2,403 | {
@Override
Representation convert( Object obj )
{
return new PathRepresentation<Path>( (Path) obj );
}
}, STRING_RESULT = new ValueResult( RepresentationType.STRING ) | false | community_server_src_main_java_org_neo4j_server_plugins_ResultConverter.java |
2,404 | {
@Override
Representation convert( Object obj )
{
return new RelationshipRepresentation( (Relationship) obj );
}
}, PATH_RESULT = new ValueResult( RepresentationType.PATH ) | false | community_server_src_main_java_org_neo4j_server_plugins_ResultConverter.java |
2,405 | {
@Override
Representation convert( Object obj )
{
return new NodeRepresentation( (Node) obj );
}
}, RELATIONSHIP_RESULT = new ValueResult( RepresentationType.RELATIONSHIP ) | false | community_server_src_main_java_org_neo4j_server_plugins_ResultConverter.java |
2,406 | {
@Override
Representation convert( Object obj )
{
return Representation.emptyRepresentation();
}
}; | false | community_server_src_main_java_org_neo4j_server_plugins_ResultConverter.java |
2,407 | {
@Override
@SuppressWarnings( "boxing" )
Representation convert( Object obj )
{
return ValueRepresentation.number( (Character) obj );
}
}, VOID_RESULT = new ValueResult( RepresentationType.NOTHIN... | false | community_server_src_main_java_org_neo4j_server_plugins_ResultConverter.java |
2,408 | {
@Override
Representation convert( Object obj )
{
return (Representation) obj;
}
@Override
RepresentationType type()
{
return null;
}
... | false | community_server_src_main_java_org_neo4j_server_plugins_ResultConverter.java |
2,409 | abstract class ResultConverter
{
static ResultConverter get( Type type )
{
return get( type, true );
}
private static ResultConverter get( Type type, boolean allowComplex )
{
if ( type instanceof Class<?> )
{
Class<?> cls = (Class<?>) type;
if ( allow... | false | community_server_src_main_java_org_neo4j_server_plugins_ResultConverter.java |
2,410 | class RelationshipTypeTypeCaster extends TypeCaster
{
@Override
Object get( GraphDatabaseAPI graphDb, ParameterList parameters, String name ) throws BadInputException
{
String typeName = parameters.getString( name );
if ( typeName == null ) return null;
return DynamicRelationshipType... | false | community_server_src_main_java_org_neo4j_server_plugins_RelationshipTypeTypeCaster.java |
2,411 | class RelationshipTypeCaster extends TypeCaster
{
@Override
Object get( GraphDatabaseAPI graphDb, ParameterList parameters, String name ) throws BadInputException
{
return parameters.getRelationship( graphDb, name );
}
@Override
Object[] getList( GraphDatabaseAPI graphDb, ParameterList ... | false | community_server_src_main_java_org_neo4j_server_plugins_RelationshipTypeCaster.java |
2,412 | {
@Override
Object convert( Object[] result )
{
return result;
}
}; | false | community_server_src_main_java_org_neo4j_server_plugins_PluginPointFactoryImpl.java |
2,413 | {
@Override
Object convert( Object[] result )
{
return result;
}
}; | false | community_server_src_main_java_org_neo4j_server_plugins_PluginPointFactoryImpl.java |
2,414 | {
@Override
Object convert( Object[] result )
{
return Arrays.asList( result );
}
}; | false | community_server_src_main_java_org_neo4j_server_plugins_PluginPointFactoryImpl.java |
2,415 | {
@Override
Object convert( Object[] result )
{
return new HashSet<Object>( Arrays.asList( result ) );
}
}; | false | community_server_src_main_java_org_neo4j_server_plugins_PluginPointFactoryImpl.java |
2,416 | class PluginPointFactoryImpl implements PluginPointFactory
{
public PluginPoint createFrom( ServerPlugin plugin, Method method, Class<?> discovery )
{
ResultConverter result = ResultConverter.get( method.getGenericReturnType() );
Type[] types = method.getGenericParameterTypes();
Annotat... | false | community_server_src_main_java_org_neo4j_server_plugins_PluginPointFactoryImpl.java |
2,417 | public abstract class PluginPoint
{
private final String name;
private final Class<?> extendsType;
private final String description;
protected PluginPoint( Class<?> type, String name, String description )
{
this.extendsType = type;
this.description = description == null ? "" : descr... | false | community_server-api_src_main_java_org_neo4j_server_plugins_PluginPoint.java |
2,418 | class PluginMethod extends PluginPoint
{
private final ServerPlugin plugin;
private final Method method;
private final DataExtractor[] extractors;
private final ResultConverter result;
PluginMethod( String name, Class<?> discovery, ServerPlugin plugin, ResultConverter result, Method method,
... | false | community_server_src_main_java_org_neo4j_server_plugins_PluginMethod.java |
2,419 | public class ServerClassNameTest
{
@Test
public void shouldMaintainNamingOfCommunityNeoServerSoThatTheNeo4jEditionIsCorrectlyShownToRESTAPICallers()
throws Exception
{
assertEquals( getErrorMessage( CommunityNeoServer.class ), "communityneoserver",
CommunityNeoServer.clas... | false | enterprise_server-enterprise_src_test_java_org_neo4j_server_enterprise_ServerClassNameTest.java |
2,420 | public class Neo4jHAPropertiesMustExistRuleTest
{
@Rule
public TemporaryFolder folder = new TemporaryFolder( );
public static final String CONFIG_KEY_OLD_SERVER_ID = "ha.machine_id";
public static final String CONFIG_KEY_OLD_COORDINATORS = "ha.zoo_keeper_servers";
// TODO: write more tests
@... | false | enterprise_server-enterprise_src_test_java_org_neo4j_server_enterprise_Neo4jHAPropertiesMustExistRuleTest.java |
2,421 | public class EnterpriseNeoServerBootstrapperTest
{
@Test
public void bootstrapperLoadsEnterpriseServerBootstrapper() throws Exception
{
assertThat( Bootstrapper.loadMostDerivedBootstrapper(), is( instanceOf( EnterpriseBootstrapper.class ) ));
}
} | false | enterprise_server-enterprise_src_test_java_org_neo4j_server_enterprise_EnterpriseNeoServerBootstrapperTest.java |
2,422 | new Runnable() {
@Override
public void run()
{
stopModules();
}
}, | false | community_server_src_main_java_org_neo4j_server_AbstractNeoServer.java |
2,423 | {
@Override
public void run()
{
module.stop();
}
}; | false | community_server_src_main_java_org_neo4j_server_AbstractNeoServer.java |
2,424 | {
@Override
public Runnable apply( final ServerModule module )
{
return new Runnable()
{
@Override
public void run()
{
module.stop();
}
... | false | community_server_src_main_java_org_neo4j_server_AbstractNeoServer.java |
2,425 | {
@Override
public void run()
{
long maxAge = clock.currentTimeMillis() - timeoutMillis;
transactionRegistry.rollbackSuspendedTransactionsIdleSince( maxAge );
}
}, runEvery, MILLISECONDS ); | false | community_server_src_main_java_org_neo4j_server_AbstractNeoServer.java |
2,426 | public abstract class AbstractNeoServer implements NeoServer
{
private static final long MINIMUM_TIMEOUT = 1000L;
/**
* We add a second to the timeout if the user configures a 1-second timeout.
*
* This ensures the expiry time displayed to the user is always at least 1 second, even after it is ro... | false | community_server_src_main_java_org_neo4j_server_AbstractNeoServer.java |
2,427 | @Ignore( "Not a test, just a helper for DumpProcessInformationTest" )
public class DumpableProcess extends UnicastRemoteObject
{
public DumpableProcess() throws RemoteException
{
super();
}
public static void main( String[] args ) throws Exception
{
new DumpableProcess().traceableMe... | false | community_kernel_src_test_java_org_neo4j_qa_tooling_DumpableProcess.java |
2,428 | public class DumpVmInformation
{
public static void dumpVmInfo( File directory ) throws IOException
{
File file = new File( directory, "main-vm-dump-" + System.currentTimeMillis() );
PrintStream out = null;
try
{
out = new PrintStream( file );
dumpVmInfo( ... | false | community_kernel_src_test_java_org_neo4j_qa_tooling_DumpVmInformation.java |
2,429 | public class DumpProcessInformationTest
{
@Test
public void shouldDumpProcessInformation() throws Exception
{
// GIVEN
// a process spawned from this test which pauses at a specific point of execution
Process process = getRuntime().exec( new String[] { "java", "-cp", getProperty( "ja... | false | community_kernel_src_test_java_org_neo4j_qa_tooling_DumpProcessInformationTest.java |
2,430 | {
@Override
public Void call() throws Exception
{
dump();
return null;
}
}, duration, timeUnit ); | false | community_kernel_src_test_java_org_neo4j_qa_tooling_DumpProcessInformationRule.java |
2,431 | {
@Override
public void dump() throws Exception
{
new DumpProcessInformation( new SystemOutLogging(), baseDir ).doThreadDump( processFilter );
}
}; | false | community_kernel_src_test_java_org_neo4j_qa_tooling_DumpProcessInformationRule.java |
2,432 | {
@Override
public void dump()
{
DumpVmInformation.dumpVmInfo( out );
}
}; | false | community_kernel_src_test_java_org_neo4j_qa_tooling_DumpProcessInformationRule.java |
2,433 | public class DumpProcessInformationRule extends ExternalResource
{
public interface Dump
{
void dump() throws Exception;
}
public static Dump localVm( final PrintStream out )
{
return new Dump()
{
@Override
public void dump()
{
... | false | community_kernel_src_test_java_org_neo4j_qa_tooling_DumpProcessInformationRule.java |
2,434 | public class DumpProcessInformation
{
public static void main( String[] args ) throws Exception
{
Args arg = new Args( args == null ? new String[0] : args );
boolean doHeapDump = arg.getBoolean( "heap", false, true );
String[] containing = arg.orphans().toArray( new String[arg.orphans().... | false | community_kernel_src_test_java_org_neo4j_qa_tooling_DumpProcessInformation.java |
2,435 | public class ProcessHelper
{
public static void exec( File directory, String program, String... arguments ) throws IOException, InterruptedException
{
List<String> programPlusArgs = new ArrayList<String>( asList( program ) );
programPlusArgs.addAll( asList( arguments ) );
int resultCode... | false | packaging_qa_src_test_java_org_neo4j_qa_features_support_ProcessHelper.java |
2,436 | public class FileHelper
{
public static void copyFile( File srcFile, File dstFile ) throws IOException
{
//noinspection ResultOfMethodCallIgnored
dstFile.getParentFile().mkdirs();
FileInputStream input = null;
FileOutputStream output = null;
try
{
inpu... | false | packaging_qa_src_test_java_org_neo4j_qa_features_support_FileHelper.java |
2,437 | public class StartAndStopFeatureTest
{
@Before
public void The_Neo4j_package_is_expanded_at_neo4j_home() throws Exception
{
String product = "neo4j-community";
String version = System.getProperty( "project_version" );
String platform = "unix";
String archiveName = product + "... | false | packaging_qa_src_test_java_org_neo4j_qa_features_StartAndStopFeatureTest.java |
2,438 | public class MemoryMappingConfiguration
{
public static void addLegacyMemoryMappingConfiguration( Map<String, String> config, String totalMappedMemory )
{
long mappedMemory = Settings.BYTES.apply( totalMappedMemory );
long memoryUnit = mappedMemory / 472;
config.put( "neostore.nodestore... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_windowpool_MemoryMappingConfiguration.java |
2,439 | private static abstract class SettingAdapter<FROM, TO> extends Setting<TO>
{
private final Setting<FROM> source;
SettingAdapter( Setting<FROM> source )
{
super( source.name, null );
this.source = source;
}
@Override
TO parse( String value... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Setting.java |
2,440 | {
@Override
TO adapt( FROM value )
{
return conversion.convert( value );
}
}; | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Setting.java |
2,441 | {
@Override
List<T> parse( String value )
{
if ( value.trim().equals( "" ) )
{
return emptyList();
}
String[] parts = value.split( "," );
List<T> result = new ArrayList<T>( par... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Setting.java |
2,442 | new Runnable() {
@Override
public void run()
{
stopWebServer();
}
}, | false | community_server_src_main_java_org_neo4j_server_AbstractNeoServer.java |
2,443 | new Runnable() {
@Override
public void run()
{
stopRrdDb();
}
}, | false | community_server_src_main_java_org_neo4j_server_AbstractNeoServer.java |
2,444 | {
@Override
T parse( String value )
{
return Enum.valueOf( enumType, value );
}
}; | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Setting.java |
2,445 | new Runnable() {
@Override
public void run()
{
stopDatabase();
}
} | false | community_server_src_main_java_org_neo4j_server_AbstractNeoServer.java |
2,446 | public class NeoServerDefaultPortAndHostnameDocIT extends AbstractRestFunctionalTestBase
{
@Test
public void shouldDefaultToSensiblePortIfNoneSpecifiedInConfig() throws Exception {
FunctionalTestHelper functionalTestHelper = new FunctionalTestHelper(server());
JaxRsResponse response = function... | false | community_server_src_test_java_org_neo4j_server_NeoServerDefaultPortAndHostnameDocIT.java |
2,447 | @Provider
public class LoggingProvider extends InjectableProvider<Logging>
{
private final Logging logging;
public LoggingProvider( Logging logging )
{
super( Logging.class );
this.logging = logging;
}
@Override
public Logging getValue( HttpContext c )
{
return logg... | false | community_server_src_main_java_org_neo4j_server_LoggingProvider.java |
2,448 | public class JAXRSHelper
{
public static List<String> listFrom( String... strings )
{
ArrayList<String> al = new ArrayList<String>();
if ( strings != null )
{
al.addAll( Arrays.asList( strings ) );
}
return al;
}
public static URI generateUriFor( UR... | false | community_server_src_main_java_org_neo4j_server_JAXRSHelper.java |
2,449 | private static class NoOpInterruptThreadTimer extends InterruptThreadTimer
{
private State state = State.IDLE;
public NoOpInterruptThreadTimer()
{
}
@Override
public void startCountdown()
{
state = State.COUNTING;
}
@Override
public void stopCountdown()
{
... | false | community_server_src_main_java_org_neo4j_server_InterruptThreadTimer.java |
2,450 | public static class InterruptThreadTask extends TimerTask
{
private final Thread threadToInterrupt;
private boolean wasExecuted = false;
public InterruptThreadTask(Thread threadToInterrupt)
{
this.threadToInterrupt = threadToInterrupt;
}
@Override
public void run()
{
wasExecuted = true;
... | false | community_server_src_main_java_org_neo4j_server_InterruptThreadTimer.java |
2,451 | private static class ActualInterruptThreadTimer extends InterruptThreadTimer
{
private final Timer timer = new Timer();
private final InterruptThreadTask task;
private final long timeout;
private State state = State.IDLE;
public ActualInterruptThreadTimer(long timeoutMillis, Thread threadToInterrupt)... | false | community_server_src_main_java_org_neo4j_server_InterruptThreadTimer.java |
2,452 | public abstract class InterruptThreadTimer
{
public enum State
{
COUNTING,
IDLE
}
public static class InterruptThreadTask extends TimerTask
{
private final Thread threadToInterrupt;
private boolean wasExecuted = false;
public InterruptThreadTask(Thread threadToInterrupt)
{
... | false | community_server_src_main_java_org_neo4j_server_InterruptThreadTimer.java |
2,453 | {
public void checkClientTrusted( X509Certificate[] arg0, String arg1 )
throws CertificateException
{
}
public void checkServerTrusted( X509Certificate[] arg0, String arg1 )
throws CertificateException
{
... | false | community_server_src_test_java_org_neo4j_server_HttpsEnabledDocIT.java |
2,454 | public class HttpsEnabledDocIT extends ExclusiveServerTestBase
{
private CommunityNeoServer server;
public @Rule
TestData<RESTDocsGenerator> gen = TestData.producedThrough( RESTDocsGenerator.PRODUCER );
@After
public void stopTheServer()
{
server.stop();
}
@Test
public vo... | false | community_server_src_test_java_org_neo4j_server_HttpsEnabledDocIT.java |
2,455 | public class DatabaseTuningDocIT extends ExclusiveServerTestBase
{
@Ignore("Relies on internal config, which is bad")
@Test
public void shouldLoadAKnownGoodPropertyFile() throws IOException
{
CommunityNeoServer server = CommunityServerBuilder.server()
.usingDatabaseDir( folder.ge... | false | community_server_src_test_java_org_neo4j_server_DatabaseTuningDocIT.java |
2,456 | public class CommunityNeoServer extends AbstractNeoServer
{
public CommunityNeoServer( Logging logging )
{
super( logging );
}
public CommunityNeoServer( Configurator configurator, Logging logging )
{
super( logging );
this.configurator = configurator;
init();
}
... | false | community_server_src_main_java_org_neo4j_server_CommunityNeoServer.java |
2,457 | public class CommunityBootstrapper extends Bootstrapper
{
@Override
protected NeoServer createNeoServer()
{
return new CommunityNeoServer( configurator, logging );
}
} | false | community_server_src_main_java_org_neo4j_server_CommunityBootstrapper.java |
2,458 | private static class MoreDerivedBootstrapper extends CommunityBootstrapper
{
} | false | community_server_src_test_java_org_neo4j_server_BootstrapperTest.java |
2,459 | public class BootstrapperTest
{
@Test
public void shouldFindTheMostDerivedType() throws Exception
{
Bootstrapper bs = new CommunityBootstrapper();
Bootstrapper other = new MoreDerivedBootstrapper();
assertFalse( bs.isMoreDerivedThan( other ) );
assertTrue( other.isMoreDerived... | false | community_server_src_test_java_org_neo4j_server_BootstrapperTest.java |
2,460 | {
@Override
public void run()
{
log.log( "Neo4j Server shutdown initiated by request" );
if ( server != null )
{
server.stop();
}
}
}; | false | community_server_src_main_java_org_neo4j_server_Bootstrapper.java |
2,461 | public abstract class Bootstrapper
{
public static final Integer OK = 0;
public static final Integer WEB_SERVER_STARTUP_ERROR_CODE = 1;
public static final Integer GRAPH_DATABASE_STARTUP_ERROR_CODE = 2;
protected final LifeSupport life = new LifeSupport();
protected NeoServer server;
protected Con... | false | community_server_src_main_java_org_neo4j_server_Bootstrapper.java |
2,462 | public class BatchOperationHeaderDocIT extends ExclusiveServerTestBase
{
private NeoServer server;
@Rule
public TemporaryFolder folder = new TemporaryFolder();
@Before
public void cleanTheDatabase() throws IOException
{
server = server().withThirdPartyJaxRsPackage( "org.dummy.web.servi... | false | community_server_src_test_java_org_neo4j_server_BatchOperationHeaderDocIT.java |
2,463 | public class AcceptorConfigurationIT extends ExclusiveServerTestBase
{
private CommunityNeoServer server;
@After
public void stopTheServer()
{
server.stop();
}
@Test
public void serverShouldNotHangWithThreadPoolSizeSmallerThanCpuCount() throws Exception
{
server = serv... | false | community_server_src_test_java_org_neo4j_server_AcceptorConfigurationIT.java |
2,464 | {
private <T> T resolveKnownSingleDependency( Class<T> type )
{
if ( type.equals( Database.class ) )
{
//noinspection unchecked
return (T) database;
}
else if ( type.equals( PreFlightTasks.class ) )
{
... | false | community_server_src_main_java_org_neo4j_server_AbstractNeoServer.java |
2,465 | {
@Override
T parse( String value )
{
return Enum.valueOf( enumType, value );
}
}; | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Setting.java |
2,466 | {
@Override
T adapt( T value )
{
for ( Predicate<? super T> predicate : predicates )
{
if ( !predicate.matches( value ) )
{
throw new IllegalArgumentException(
... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Setting.java |
2,467 | public class EnterpriseNeoServer extends AdvancedNeoServer
{
public EnterpriseNeoServer( Configurator configurator, Logging logging )
{
super( logging );
this.configurator = configurator;
init();
}
@Override
protected PreFlightTasks createPreflightTasks()
{
retu... | false | enterprise_server-enterprise_src_main_java_org_neo4j_server_enterprise_EnterpriseNeoServer.java |
2,468 | SINGLE_STRING
{
@Override
Object generate()
{
return name();
}
}, | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_generator_PropertyGenerator.java |
2,469 | {
@Override
public boolean matchesSafely( Map<String, Object> item )
{
return item.size() == size;
}
@Override
public void describeTo( Description description )
{
description.appendText( "Map<Str... | false | enterprise_enterprise-performance-tests_src_test_java_org_neo4j_perftest_enterprise_generator_DataGeneratorTest.java |
2,470 | {
@Override
public boolean matchesSafely( RelationshipType item )
{
return name.equals( item.name() );
}
@Override
public void describeTo( Description description )
{
description.appendText( "Rel... | false | enterprise_enterprise-performance-tests_src_test_java_org_neo4j_perftest_enterprise_generator_DataGeneratorTest.java |
2,471 | public class DataGeneratorTest
{
@Test
public void shouldGenerateNodesAndRelationshipsWithProperties() throws Exception
{
// given
Configuration.Builder config = Configuration.builder();
config.setValue( DataGenerator.node_count, 5 );
config.setValue( DataGenerator.relationsh... | false | enterprise_enterprise-performance-tests_src_test_java_org_neo4j_perftest_enterprise_generator_DataGeneratorTest.java |
2,472 | public class DataGenerator
{
public static final Setting<String> store_dir = stringSetting( "neo4j.store_dir", "target/generated-data/graph.db" );
public static final Setting<Boolean> report_progress = booleanSetting( "report_progress", false );
static final Setting<Boolean> report_stats = booleanSetting( "... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_generator_DataGenerator.java |
2,473 | public final class IndexMap implements Cloneable
{
private final Map<Long, IndexProxy> indexesById;
private final Map<IndexDescriptor, IndexProxy> indexesByDescriptor;
public IndexMap()
{
this( new HashMap<Long, IndexProxy>(), new HashMap<IndexDescriptor, IndexProxy>() );
}
private Ind... | false | community_kernel_src_main_java_org_neo4j_kernel_impl_api_index_IndexMap.java |
2,474 | private class ProgressIndicator extends Indicator.Decorator
{
private final Timer total;
private Map<String, Timer> timers;
ProgressIndicator( String process )
{
super( TimingProgress.this.actual, process );
total = new Timer( null );
timers =... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_ccheck_TimingProgress.java |
2,475 | public class TimingProgress extends ProgressMonitorFactory
{
public interface Visitor
{
void beginTimingProgress( long totalElementCount, long totalTimeNanos ) throws IOException;
void phaseTimingProgress( String phase, long elementCount, long timeNanos ) throws IOException;
void endTi... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_ccheck_TimingProgress.java |
2,476 | class TimeLogger implements TimingProgress.Visitor
{
private final TimingProgress.Visitor next;
public TimeLogger( TimingProgress.Visitor next )
{
this.next = next;
}
static double nanosToMillis( long nanoTime )
{
return nanoTime / 1000000.0;
}
@Override
public voi... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_ccheck_TimeLogger.java |
2,477 | class JsonReportWriter implements TimingProgress.Visitor
{
private final File target;
private JsonGenerator json;
private boolean writeRecordsPerSecond = true;
private final Configuration configuration;
private final Config tuningConfiguration;
JsonReportWriter( Configuration configuration, Con... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_ccheck_JsonReportWriter.java |
2,478 | public class ConsistencyPerformanceCheck
{
static final Setting<Boolean> generate_graph = booleanSetting( "generate_graph", false );
static final Setting<String> report_file = stringSetting( "report_file", "target/report.json" );
static final Setting<CheckerVersion> checker_version = enumSetting( "checker_v... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_ccheck_ConsistencyPerformanceCheck.java |
2,479 | NEW
{
@Override
void run( ProgressMonitorFactory progress, DirectStoreAccess directStoreAccess, Config tuningConfiguration ) throws ConsistencyCheckIncompleteException
{
new FullCheck( tuningConfiguration, progress ).execute( directStoreAccess, StringLogger.DEV_NULL );
... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_ccheck_CheckerVersion.java |
2,480 | public class MetricsLogExtensionFactory
extends KernelExtensionFactory<MetricsLogExtensionFactory.Dependencies>
{
public interface Dependencies
{
Monitors monitors();
Config config();
FileSystemAbstraction fileSystem();
TxManager txManager();
}
public MetricsLogExten... | false | enterprise_ha_src_test_java_org_neo4j_metrics_MetricsLogExtensionFactory.java |
2,481 | {
@Override
public void run()
{
try
{
csv.print( System.currentTimeMillis(),
diskCounterMetrics.getBytesWritten(), diskCounterMetrics.getBytesRead(),
networkCounterMetr... | false | enterprise_ha_src_test_java_org_neo4j_metrics_MetricsLogExtension.java |
2,482 | public class MetricsLogExtension implements Lifecycle
{
private Monitors monitors;
private Config config;
private FileSystemAbstraction fileSystemAbstraction;
private TxManager txManager;
private ByteCounterMetrics networkCounterMetrics;
private ByteCounterMetrics diskCounterMetrics;
private... | false | enterprise_ha_src_test_java_org_neo4j_metrics_MetricsLogExtension.java |
2,483 | public class CSVFile
implements Closeable
{
private final OutputStream out;
public CSVFile(OutputStream outStream, Iterable<String> columns)
throws IOException
{
this.out = outStream;
// Print header
StringBuilder builder = new StringBuilder( );
String sepa... | false | enterprise_ha_src_test_java_org_neo4j_metrics_CSVFile.java |
2,484 | public class ByteCounterMetrics
implements ByteCounterMonitor
{
private long bytesWritten;
private long bytesRead;
@Override
public void bytesWritten( long numberOfBytes )
{
bytesWritten++;
}
@Override
public void bytesRead( long numberOfBytes )
{
bytesRead++;
... | false | enterprise_ha_src_test_java_org_neo4j_metrics_ByteCounterMetrics.java |
2,485 | public class TestJavaTestDocsGenerator implements GraphHolder
{
private static GraphDatabaseService graphdb;
public @Rule
TestData<Map<String, Node>> data = TestData.producedThrough( GraphDescription.createGraphFor(
this, true ) );
public @Rule
TestData<JavaTestDocsGenerator> gen = Test... | false | community_kernel_src_test_java_org_neo4j_metatest_TestJavaTestDocsGenerator.java |
2,486 | public class TestImpermanentGraphDatabase
{
private ImpermanentGraphDatabase db;
@Before
public void createDb()
{
db = new ImpermanentGraphDatabase();
}
@After
public void tearDown()
{
db.shutdown();
}
@Test
public void should_keep_data_between_start_and_sh... | false | community_kernel_src_test_java_org_neo4j_metatest_TestImpermanentGraphDatabase.java |
2,487 | public class TestGraphDescription implements GraphHolder
{
private static GraphDatabaseService graphdb;
public @Rule
TestData<Map<String, Node>> data = TestData.producedThrough( GraphDescription.createGraphFor(
this, true ) );
@Test
public void havingNoGraphAnnotationCreatesAnEmptyDataC... | false | community_neo4j_src_test_java_org_neo4j_metatest_TestGraphDescription.java |
2,488 | INTEGER
{
@Override
Object generate()
{
return DataGenerator.RANDOM.nextInt( 16 );
}
}, | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_generator_PropertyGenerator.java |
2,489 | STRING
{
@Override
Object generate()
{
int length = 50 + DataGenerator.RANDOM.nextInt( 70 );
StringBuilder result = new StringBuilder( length );
for ( int i = 0; i < length; i++ )
... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_generator_PropertyGenerator.java |
2,490 | {
@Override
Boolean parse( String value )
{
return Boolean.parseBoolean( value );
}
@Override
boolean isBoolean()
{
return true;
}
}; | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Setting.java |
2,491 | BYTE_ARRAY
{
@Override
Object generate()
{
// int length = 4 + RANDOM.nextInt( 60 );
int length = 50;
int[] array = new int[length];
for ( int i = 0; i < length; i++ )
... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_generator_PropertyGenerator.java |
2,492 | {
@Override
Long parse( String value )
{
return Long.parseLong( value );
}
}; | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Setting.java |
2,493 | {
@Override
String parse( String value )
{
return value;
}
}; | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Setting.java |
2,494 | public abstract class Setting<T>
{
public static Setting<String> stringSetting( String name )
{
return stringSetting( name, null );
}
public static Setting<String> stringSetting( String name, String defaultValue )
{
return new Setting<String>( name, defaultValue )
{
... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Setting.java |
2,495 | {
@Override
boolean matches( Long value )
{
return value <= maxValue && value >= minValue;
}
@Override
public String toString()
{
return String.format( "%s, %s", minValue == null ? "]-inf" : ("["... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Predicate.java |
2,496 | public abstract class Predicate<T>
{
public static Predicate<Long> integerRange( final Long minValue, final Long maxValue )
{
return new Predicate<Long>()
{
@Override
boolean matches( Long value )
{
return value <= maxValue && value >= minValue... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Predicate.java |
2,497 | {
@Override
public Configuration convert( String[] args )
{
Configuration.Builder configurationBuilder = Configuration.builder();
if ( parser.parse( configurationBuilder, args ).length != 0 )
{
throw new Ille... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Parameters.java |
2,498 | public class Parameters
{
public static Conversion<String[], Configuration> configuration( final Configuration defaultConfiguration,
Setting<?>... settings )
{
final Parameters parser = parser( settings );
return new Conversion... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_Parameters.java |
2,499 | public class DirectlyCorrelatedParameter
{
public static Map<String, String> passOn( Configuration configuration, DirectlyCorrelatedParameter... parameters )
{
HashMap<String, String> map = new HashMap<String, String>();
for ( DirectlyCorrelatedParameter parameter : parameters )
{
... | false | enterprise_enterprise-performance-tests_src_main_java_org_neo4j_perftest_enterprise_util_DirectlyCorrelatedParameter.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.