Unnamed: 0 int64 0 6.7k | func stringlengths 12 89.6k | target bool 2
classes | project stringlengths 45 151 |
|---|---|---|---|
2,000 | private static class RotateIndexLogTask implements Task
{
@Override
public void run( GraphDatabaseAPI graphdb )
{
try
{
graphdb.getDependencyResolver().resolveDependency( XaDataSourceManager.class )
.getXaDataSource( LuceneD... | false | community_neo4j_src_test_java_synchronization_TestConcurrentRotation.java |
2,001 | private static class LoadIndexesTask implements Task
{
private final int count;
private final boolean resume;
public LoadIndexesTask( int count, boolean resume )
{
this.count = count;
this.resume = resume;
}
@Override
public void ... | false | community_neo4j_src_test_java_synchronization_TestConcurrentRotation.java |
2,002 | private static class CreateInitialStateTask implements Task
{
@Override
public void run( GraphDatabaseAPI graphdb )
{
try(Transaction tx = graphdb.beginTx())
{
for ( int i = 0; i < 3; i++ ) graphdb.index().forNodes( "index" + i ).add( graphdb.creat... | false | community_neo4j_src_test_java_synchronization_TestConcurrentRotation.java |
2,003 | {
@Override
protected void callback( DebugInterface debug ) throws KillSubProcess
{
this.disable();
barrier2.countDown();
}
}; | false | community_neo4j_src_test_java_synchronization_TestConcurrentRotation.java |
2,004 | {
@Override
protected void callback( DebugInterface debug ) throws KillSubProcess
{
thread.resume();
this.disable();
}
}; | false | community_neo4j_src_test_java_synchronization_TestConcurrentRotation.java |
2,005 | {
private int counter = 0;
@Override
protected void callback( DebugInterface debug ) throws KillSubProcess
{
if ( counter++ > 0 ) return;
thread = debug.thread().suspend( this );
this.disable();
barrier1.countDown();
}
... | false | community_neo4j_src_test_java_synchronization_TestConcurrentRotation.java |
2,006 | {
@Override
protected void callback( DebugInterface debug ) throws KillSubProcess
{
if ( twoPhaseCommitIn( debug.thread() ) )
{
debug.thread().suspend( null );
this.disable... | false | community_neo4j_src_test_java_recovery_TestRecoveryIssues.java |
2,007 | {
@Override
public boolean accept( LogEntry item )
{
// Let through everything exception COMMIT/DONE for the last tx
boolean shouldPruneEntry = item.getIdentifier() == lastIdentifier.get() &&
(item instanceof LogEntry.Co... | false | community_neo4j_src_test_java_recovery_TestIndexingServiceRecovery.java |
2,008 | abstract class RelationshipTypeColor extends RelationshipColor
{
private final Map<String, String> colors = new HashMap<String, String>();
private final Map<String, String> fontColors = new HashMap<String, String>();
@Override
protected final String getColor( Relationship relationship )
{
RelationshipTy... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,009 | INCOMING()
{
@Override
void configure( AutoNodeColor style )
{
style.directions = new Direction[] { Direction.INCOMING };
style.differentiateOnDirection = false;
}
}, | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_color_AutoNodeColor.java |
2,010 | BOTH()
{
@Override
void configure( AutoNodeColor style )
{
style.directions = new Direction[] { Direction.INCOMING,
Direction.OUTGOING };
style.differentiateOnDirection = true;
}
}, | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_color_AutoNodeColor.java |
2,011 | DEFAULT()
{
@Override
void configure( AutoNodeColor style )
{
BOTH_IGNORE_DIRECTION.configure( style );
}
}, | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_color_AutoNodeColor.java |
2,012 | public class AutoNodeColor extends StyleParameter.NodeColor
{
private final DefaultColorMapping<Set<String>> colors;
private Direction[] directions;
private boolean differentiateOnDirection;
private boolean differentiateOnDirectionOnly = false;
private ColorMapper<Node> ncm = null;
public AutoN... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_color_AutoNodeColor.java |
2,013 | public class TestNewGraphvizWriter
{
enum type implements RelationshipType
{
KNOWS, WORKS_FOR
}
private GraphDatabaseService neo;
@Before
public void setUp()
{
neo = new GraphDatabaseFactory().newEmbeddedDatabase( "target/neo" );
}
@After
public void tearDown()
{
neo.shutdown();
}
@Test
public ... | false | community_graphviz_src_test_java_org_neo4j_visualization_graphviz_TestNewGraphvizWriter.java |
2,014 | {
@Override
protected Iterable<Node> nodes()
{
return asList( emil, tobias, johan );
}
@Override
protected Iterable<Relationship> relationships()
{
return ... | false | community_graphviz_src_test_java_org_neo4j_visualization_graphviz_TestGraphvizSubgraphOutput.java |
2,015 | {
@Override
public String getSubgraphFor( Node node )
{
if ( node.hasProperty( "country_of_residence" ) )
{
return (String) node.getProperty( "country_of_residence" );
}
... | false | community_graphviz_src_test_java_org_neo4j_visualization_graphviz_TestGraphvizSubgraphOutput.java |
2,016 | public class TestGraphvizSubgraphOutput
{
enum type implements RelationshipType
{
KNOWS, WORKS_FOR
}
private GraphDatabaseService neo;
@Before
public void setUp()
{
neo = new GraphDatabaseFactory().newEmbeddedDatabase( "target/neo" );
}
@After
public void tearD... | false | community_graphviz_src_test_java_org_neo4j_visualization_graphviz_TestGraphvizSubgraphOutput.java |
2,017 | {
public String format( String key, PropertyType type,
Object value )
{
return configuration.escapeLabel( key ) + " : "
+ type.typeName;
}
}; | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,018 | PROPERTY_AS_KEY_COLON_TYPE
{
@Override
public final void configure( final StyleConfiguration configuration )
{
PropertyFormatter format = new PropertyFormatter()
{
public String format( String key, PropertyType type,
Object value )
{
return config... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,019 | {
public String format( String key, PropertyType type,
Object value )
{
return configuration.escapeLabel( key )
+ " = "
+ configuration.escapeLabel( PropertyType.format( value ) );
}
}; | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,020 | PROPERTY_AS_KEY_EQUALS_VALUE
{
@Override
public final void configure( final StyleConfiguration configuration )
{
PropertyFormatter format = new PropertyFormatter()
{
public String format( String key, PropertyType type,
Object value )
{
return conf... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,021 | {
public String format( String key, PropertyType type,
Object value )
{
return configuration.escapeLabel( key ) + " = " + configuration.escapeLabel(PropertyType.format( value ))
+ " : " + type.typeName;
}
}; | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,022 | PROPERTY_AS_KEY_EQUALS_VALUE_COLON_TYPE
{
@Override
public final void configure( final StyleConfiguration configuration )
{
PropertyFormatter format = new PropertyFormatter()
{
public String format( String key, PropertyType type,
Object value )
{
return configuration.escape... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,023 | NO_RELATIONSHIP_LABEL
{
@Override
public final void configure( StyleConfiguration configuration )
{
configuration.displayRelationshipLabel( false );
}
}, | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,024 | {
public boolean acceptProperty( String key )
{
return false;
}
} ); | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,025 | NO_RELATIONSHIP_PROPERTIES
{
@Override
public final void configure( StyleConfiguration configuration )
{
configuration
.setRelationshipPropertyFilter( new PropertyFilter()
{
public boolean acceptProperty( String key )
{
return false;
}
} );
... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,026 | {
public boolean accept( Relationship item )
{
return reversedOrder( item );
}
} ); | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,027 | abstract class ReverseRelationshipOrder implements StyleParameter
{
public void configure( StyleConfiguration configuration )
{
configuration.setRelationshipReverseOrderPredicate( new Predicate<Relationship>()
{
public boolean accept( Relationship item )
... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,028 | final class ReverseOrderRelationshipTypes extends ReverseRelationshipOrder
{
private final Set<String> reversedTypes = new HashSet<String>();
public ReverseOrderRelationshipTypes( RelationshipType... types )
{
for ( RelationshipType type : types )
{
... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java |
2,029 | BOTH_IGNORE_DIRECTION()
{
@Override
void configure( AutoNodeColor style )
{
style.directions = new Direction[] { Direction.INCOMING,
Direction.OUTGOING };
style.differentiateOnDirection = false;
}
... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_color_AutoNodeColor.java |
2,030 | OUTGOING()
{
@Override
void configure( AutoNodeColor style )
{
style.directions = new Direction[] { Direction.OUTGOING };
style.differentiateOnDirection = false;
}
}, | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_color_AutoNodeColor.java |
2,031 | {
@Override
protected void createNeoDataSource()
{
// Register our little special recovery listener
neoDataSource = new NeoStoreXaDataSource( config,
storeFactory, ... | false | community_neo4j_src_test_java_recovery_TestIndexingServiceRecovery.java |
2,032 | DIRECTION()
{
@Override
void configure( AutoNodeColor style )
{
style.directions = new Direction[] { Direction.INCOMING,
Direction.OUTGOING };
style.differentiateOnDirectionOnly = true;
}
}; | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_color_AutoNodeColor.java |
2,033 | {
@SuppressWarnings( "deprecation" )
@Override
public GraphDatabaseService newEmbeddedDatabase( String path )
{
GraphDatabaseFactoryState state = getStateCopy();
return new EmbeddedGraphDatabase( path, stringMap(),
... | false | community_neo4j_src_test_java_recovery_TestIndexingServiceRecovery.java |
2,034 | {
@Override
public void applyingRecoveredData( Collection<Long> nodeIds )
{
affectedNodeIds.addAll( nodeIds );
}
@Override
public void appliedRecoveredData( Iterable<NodePropertyUpdate> updates )
{
... | false | community_neo4j_src_test_java_recovery_TestIndexingServiceRecovery.java |
2,035 | public class TestIndexingServiceRecovery
{
@Test
public void shouldRecoverSchemaIndexesAfterNeoStoreFullyRecovered() throws Exception
{
// GIVEN a db with schema and some data in it
File storeDir = forTest( getClass() ).makeGraphDbDir();
Long[] nodeIds = createSchemaData( storeDir );... | false | community_neo4j_src_test_java_recovery_TestIndexingServiceRecovery.java |
2,036 | static class WriteTransaction implements Task
{
@Override
public void run( GraphDatabaseAPI graphdb )
{
Transaction tx = graphdb.beginTx();
Node node;
try
{ // hack to get around another bug
node = graphdb.createNode();
... | false | enterprise_ha_src_test_java_recovery_TestDoubleRecovery.java |
2,037 | static class Verification implements Task
{
@Override
public void run( GraphDatabaseAPI graphdb )
{
assertNotNull( "No graph database", graphdb );
Index<Node> index = graphdb.index().forNodes( "nodes" );
assertNotNull( "No index", index );
... | false | enterprise_ha_src_test_java_recovery_TestDoubleRecovery.java |
2,038 | static class Crash implements Task
{
@Override
public void run( GraphDatabaseAPI graphdb )
{
throw new AssertionError( "Should not reach here - the breakpoint should avoid it" );
}
} | false | enterprise_ha_src_test_java_recovery_TestDoubleRecovery.java |
2,039 | {
@Override
protected void shutdown( GraphDatabaseService graphdb, boolean normal )
{
if ( normal ) super.shutdown( graphdb, normal );
}
}; | false | enterprise_ha_src_test_java_recovery_TestDoubleRecovery.java |
2,040 | {
@Override
protected void callback( DebugInterface debug ) throws KillSubProcess
{
if ( twoPhaseCommitIn( debug.thread() ) )
{
debug.thread().suspend( null );
this.disable();
afterWrite.countDown();
thro... | false | enterprise_ha_src_test_java_recovery_TestDoubleRecovery.java |
2,041 | {
@Override
protected void callback( DebugInterface debug ) throws KillSubProcess
{
afterCrash.countDown();
throw KillSubProcess.withExitCode( -1 );
}
}; | false | enterprise_ha_src_test_java_recovery_TestDoubleRecovery.java |
2,042 | @SuppressWarnings( "serial" )
@Ignore
public class TestDoubleRecovery extends AbstractSubProcessTestBase
{
private static final byte[] NEOKERNL = { 'N', 'E', 'O', 'K', 'E', 'R', 'N', 'L', '\0' };
private final CountDownLatch afterWrite = new CountDownLatch( 1 ), afterCrash = new CountDownLatch( 1 );
/*
... | false | enterprise_ha_src_test_java_recovery_TestDoubleRecovery.java |
2,043 | {
private final Set<Integer> prune = new HashSet<Integer>();
@Override
public boolean accept( LogEntry item )
{
if ( item instanceof TwoPhaseCommit )
{
prune.add( item.getIdentifier() );
... | false | community_neo4j_src_test_java_recovery_CreateTransactionsAndDie.java |
2,044 | @Ignore( "Used from another test case and is not a test case in itself" )
public class CreateTransactionsAndDie
{
public static void main( String[] args )
{
String storeDir = args[0];
int count = parseInt( args[1] );
GraphDatabaseService db = new GraphDatabaseFactory().newEmbeddedDatabas... | false | community_neo4j_src_test_java_recovery_CreateTransactionsAndDie.java |
2,045 | {
@Override
public <R, E extends Throwable> R accept( Visitor<R, E> visitor ) throws E
{
for ( Node node : nodes )
{
visitor.visitNode( node );
for ( Relationship relationship : node.getRelationships( typ... | false | community_graphviz_src_main_java_org_neo4j_walk_Walker.java |
2,046 | {
@Override
public <R, E extends Throwable> R accept( Visitor<R, E> visitor ) throws E
{
for ( Node node : GlobalGraphOperations.at( graphDb ).getAllNodes() )
{
visitor.visitNode( node );
for ( Relationsh... | false | community_graphviz_src_main_java_org_neo4j_walk_Walker.java |
2,047 | public abstract class Walker
{
public abstract <R, E extends Throwable> R accept( Visitor<R, E> visitor ) throws E;
public static Walker fullGraph( final GraphDatabaseService graphDb )
{
return new Walker()
{
@Override
public <R, E extends Throwable> R accept( Visito... | false | community_graphviz_src_main_java_org_neo4j_walk_Walker.java |
2,048 | public class SimpleRelationshipTypeColorMapper implements
ColorMapper<RelationshipType>
{
private final Map<String, Color> mappings;
/**
* Map relationship types represented as strings to colors.
*
* @param mappings relationship type names to color mappings
*/
public SimpleRela... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_color_SimpleRelationshipTypeColorMapper.java |
2,049 | public class SimpleNodeColorMapper implements ColorMapper<Node>
{
private final Map<Object, Color> mappings;
private final String propertyKey;
/**
* Map from property values to colors.
*
* @param propertyKey the key to the value we will map
* @param mappings property values to color ma... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_color_SimpleNodeColorMapper.java |
2,050 | public class DefaultColorMapping<E>
{
private final List<String> availableColors = new ArrayList<String>();
private int usedAvailableColors = 0;
private final Map<E, String> colorMappings = new HashMap<E, String>();
/**
* Map colors using the full set of colors in {@link Color}.
*/
public... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_color_DefaultColorMapping.java |
2,051 | public class AutoRelationshipTypeColor extends RelationshipTypeColor
{
private final DefaultColorMapping<String> colors;
private ColorMapper<RelationshipType> rtcm = null;
/**
* Use default color mappings.
*/
public AutoRelationshipTypeColor()
{
this.colors = new DefaultColorMappi... | false | community_graphviz_src_main_java_org_neo4j_visualization_graphviz_color_AutoRelationshipTypeColor.java |
2,052 | {
@Override
public Iterator<Node> iterator()
{
return nodeManager.getAllNodes();
}
}; | false | community_kernel_src_main_java_org_neo4j_tooling_GlobalGraphOperations.java |
2,053 | public class GlobalGraphOperations
{
private final NodeManager nodeManager;
private final ThreadToStatementContextBridge statementCtxProvider;
private GlobalGraphOperations( GraphDatabaseService db )
{
GraphDatabaseAPI dbApi = (GraphDatabaseAPI) db;
DependencyResolver resolver = dbApi.g... | false | community_kernel_src_main_java_org_neo4j_tooling_GlobalGraphOperations.java |
2,054 | public class GenerateDefaultNeo4jProperties
{
public static void main( String[] args )
throws ClassNotFoundException
{
for( String settingsClassName : args )
{
Class settingsClass = GenerateDefaultNeo4jProperties.class.getClassLoader().loadClass( settingsClassName );
... | false | community_kernel_src_main_java_org_neo4j_tooling_GenerateDefaultNeo4jProperties.java |
2,055 | {
@Override
public void evaluate() throws Throwable
{
try
{
base.evaluate();
}
finally
{
for ( Closeable resource : resources )
{
... | false | community_kernel_src_test_java_org_neo4j_test_ResourceCollection.java |
2,056 | private static class RepeatStatement extends Statement
{
private final int times;
private final Statement statement;
private RepeatStatement( int times, Statement statement )
{
this.times = times;
this.statement = statement;
}
@Override
... | false | community_kernel_src_test_java_org_neo4j_test_RepeatRule.java |
2,057 | public class RepeatRule implements TestRule
{
@Retention( RetentionPolicy.RUNTIME )
@Target(ElementType.METHOD)
public @interface Repeat
{
public abstract int times();
}
private static class RepeatStatement extends Statement
{
private final int times;
private final S... | false | community_kernel_src_test_java_org_neo4j_test_RepeatRule.java |
2,058 | public class ReflectionUtil
{
private static final ReflectionFactory reflectionFactory = ReflectionFactory.getReflectionFactory();
public static void setStaticFinalField( Field field, Object value )
throws NoSuchFieldException, IllegalAccessException
{
field.setAccessible( true );
... | false | community_kernel_src_test_java_org_neo4j_test_ReflectionUtil.java |
2,059 | public final class Property
{
public static Property property( String key, Object value )
{
return new Property( key, value );
}
public static <E extends PropertyContainer> E set( E entity, Property... properties )
{
for ( Property property : properties )
{
entit... | false | community_kernel_src_test_java_org_neo4j_test_Property.java |
2,060 | {
@Override
public boolean cancel( boolean mayInterruptIfRunning )
{
try
{
return realFuture.cancel( mayInterruptIfRunning );
}
finally
{
processOutput.done... | false | community_kernel_src_test_java_org_neo4j_test_ProcessUtil.java |
2,061 | public class ProcessUtil
{
public static void executeSubProcess( Class<?> mainClass, long timeout, TimeUnit unit,
String... arguments ) throws Exception
{
Future<Integer> future = startSubProcess( mainClass, arguments );
int result = future.get( timeout, unit );
if ( result !... | false | community_kernel_src_test_java_org_neo4j_test_ProcessUtil.java |
2,062 | public class ProcessStreamHandler
{
private final Thread out;
private final Thread err;
private final Process process;
/**
* Convenience constructor assuming the local output streams are
* {@link System.out} and {@link System.err} for the process's OutputStream
* and ErrorStream respecti... | false | community_kernel_src_test_java_org_neo4j_test_ProcessStreamHandler.java |
2,063 | {
@Override
public void evaluate() throws Throwable
{
executor = new OtherThreadExecutor<>( description.getDisplayName(), timeout, unit, initialState() );
try
{
base.evaluate();
}
... | false | community_kernel_src_test_java_org_neo4j_test_OtherThreadRule.java |
2,064 | {
@Override
protected boolean matchesSafely( OtherThreadRule rule )
{
try
{
rule.executor.waitUntilThreadState( Thread.State.WAITING, Thread.State.TIMED_WAITING );
return true;
}
... | false | community_kernel_src_test_java_org_neo4j_test_OtherThreadRule.java |
2,065 | public class OtherThreadRule<STATE> implements TestRule
{
private final long timeout;
private final TimeUnit unit;
private volatile OtherThreadExecutor<STATE> executor;
public OtherThreadRule()
{
this( 10, SECONDS );
}
public OtherThreadRule( long timeout, TimeUnit unit )
{
... | false | community_kernel_src_test_java_org_neo4j_test_OtherThreadRule.java |
2,066 | public static class WaitDetails
{
private final StackTraceElement[] stackTrace;
public WaitDetails( StackTraceElement[] stackTrace )
{
this.stackTrace = stackTrace;
}
@Override
public String toString()
{
StringBuilder builder = ne... | false | community_kernel_src_test_java_org_neo4j_test_OtherThreadExecutor.java |
2,067 | private static final class AnyThreadState implements Predicate<Thread>
{
private final Set<State> possibleStates;
private final Set<Thread.State> seenStates = new HashSet<>();
private AnyThreadState( State... possibleStates )
{
this.possibleStates = new HashSet<>( as... | false | community_kernel_src_test_java_org_neo4j_test_OtherThreadExecutor.java |
2,068 | {
@Override
public void run()
{
try
{
super.run();
}
finally
{
OtherThreadExecutor.this.thread = null;
}
}
}; | false | community_kernel_src_test_java_org_neo4j_test_OtherThreadExecutor.java |
2,069 | {
@Override
public R call() throws Exception
{
executionState = ExecutionState.EXECUTING;
try
{
return cmd.doWork( state );
}
finally
{
exec... | false | community_kernel_src_test_java_org_neo4j_test_OtherThreadExecutor.java |
2,070 | {
@Override
public boolean accept( Thread thread )
{
return actual.accept( thread ) || executionState == ExecutionState.EXECUTED;
}
}; | false | community_kernel_src_test_java_org_neo4j_test_OtherThreadExecutor.java |
2,071 | public class OtherThreadExecutor<T> implements ThreadFactory, Visitor<LineLogger, RuntimeException>, Closeable
{
private final ExecutorService commandExecutor = newSingleThreadExecutor( this );
protected final T state;
private volatile Thread thread;
private volatile ExecutionState executionState;
p... | false | community_kernel_src_test_java_org_neo4j_test_OtherThreadExecutor.java |
2,072 | private static abstract class Voice
{
abstract void restore( boolean failure ) throws IOException;
} | false | community_kernel_src_test_java_org_neo4j_test_Mute.java |
2,073 | {
@Override
void restore( boolean failure ) throws IOException
{
replace( old ).flush();
if ( failure )
{
old.write( buffer.toByteArray() );
}
... | false | community_kernel_src_test_java_org_neo4j_test_Mute.java |
2,074 | err
{
@Override
PrintStream replace( PrintStream replacement )
{
PrintStream old = java.lang.System.err;
java.lang.System.setErr( replacement );
return old;
}
}; | false | community_kernel_src_test_java_org_neo4j_test_Mute.java |
2,075 | public class ResourceCollection implements TestRule
{
private final LinkedList<Closeable> resources = new LinkedList<Closeable>();
@Override
public Statement apply( final Statement base, Description description )
{
return new Statement()
{
@Override
public void e... | false | community_kernel_src_test_java_org_neo4j_test_ResourceCollection.java |
2,076 | public class StreamConsumer implements Runnable
{
public interface StreamExceptionHandler
{
void handle( IOException failure );
}
public static StreamExceptionHandler PRINT_FAILURES = new StreamExceptionHandler()
{
@Override
public void handle( IOException failure )
... | false | community_kernel_src_test_java_org_neo4j_test_StreamConsumer.java |
2,077 | {
@Override
public void evaluate() throws Throwable
{
Voice[] voices = captureVoices();
boolean failure = true;
try
{
base.evaluate();
failure = false;
}
... | false | community_kernel_src_test_java_org_neo4j_test_Mute.java |
2,078 | {
@Override
public void handle( IOException failure )
{
failure.printStackTrace();
}
}; | false | community_kernel_src_test_java_org_neo4j_test_StreamConsumer.java |
2,079 | {
@Override
public boolean accept( ManagedCluster cluster )
{
return count( cluster.getMaster().getDependencyResolver().resolveDependency( Slaves.class ).getSlaves
() ) >= cluster.size() - 1;
}
@Override
... | false | enterprise_ha_src_test_java_org_neo4j_test_ha_ClusterManager.java |
2,080 | {
@Override
public boolean accept( ManagedCluster cluster )
{
return count( cluster.getMaster().getDependencyResolver().resolveDependency( Slaves.class ).getSlaves
() ) >= count;
}
@Override
public S... | false | enterprise_ha_src_test_java_org_neo4j_test_ha_ClusterManager.java |
2,081 | {
@Override
public Clusters clusters() throws Throwable
{
return clusters;
}
}; | false | enterprise_ha_src_test_java_org_neo4j_test_ha_ClusterManager.java |
2,082 | {
@Override
public Clusters clusters() throws Exception
{
DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document clustersXmlDoc = documentBuilder.parse( clustersXml.toURL().openStream() );
... | false | enterprise_ha_src_test_java_org_neo4j_test_ha_ClusterManager.java |
2,083 | {
@Override
public void evaluate() throws Throwable
{
if ( file.exists() )
{
assertTrue( file + " should not exist", file.isFile() && file.delete() );
}
writer = new PrintWriter( file );
... | false | community_kernel_src_test_java_org_neo4j_test_docs_DocsIncludeFile.java |
2,084 | public class DocsIncludeFile implements TestRule
{
public static DocsIncludeFile inSection( String section )
{
return new DocsIncludeFile( section );
}
public void printf( String format, Object... parameters )
{
writer.printf( format, parameters );
}
public void println( St... | false | community_kernel_src_test_java_org_neo4j_test_docs_DocsIncludeFile.java |
2,085 | public class TestGraphDatabaseFactoryState extends GraphDatabaseFactoryState
{
private FileSystemAbstraction fileSystem;
private boolean systemOutLogging;
public TestGraphDatabaseFactoryState()
{
fileSystem = null;
systemOutLogging = false;
}
public TestGraphDatabaseFactoryStat... | false | community_kernel_src_test_java_org_neo4j_test_TestGraphDatabaseFactoryState.java |
2,086 | {
@Override
protected FileSystemAbstraction createFileSystemAbstraction()
{
FileSystemAbstraction fs = state.getFileSystem();
if ( fs != null )
{
... | false | community_kernel_src_test_java_org_neo4j_test_TestGraphDatabaseFactory.java |
2,087 | {
@Override
@SuppressWarnings("deprecation")
public GraphDatabaseService newDatabase( Map<String, String> config )
{
return new ImpermanentGraphDatabase( storeDir, config, state.databaseDependencies() )
{
@Overri... | false | community_kernel_src_test_java_org_neo4j_test_TestGraphDatabaseFactory.java |
2,088 | public class TestGraphDatabaseFactory extends GraphDatabaseFactory
{
public TestGraphDatabaseFactory()
{
super( new TestGraphDatabaseFactoryState() );
}
public TestGraphDatabaseFactory( Logging logging )
{
super( new TestGraphDatabaseFactoryState() );
setLogging( logging );
... | false | community_kernel_src_test_java_org_neo4j_test_TestGraphDatabaseFactory.java |
2,089 | public class TestGraphDatabaseBuilder extends GraphDatabaseBuilder
{
public TestGraphDatabaseBuilder( DatabaseCreator creator )
{
super( creator );
}
} | false | community_kernel_src_test_java_org_neo4j_test_TestGraphDatabaseBuilder.java |
2,090 | private static final class Lazy
{
private volatile Object productOrFactory;
Lazy( GraphDefinition graph, String title, String documentation )
{
productOrFactory = new Factory( graph, title, documentation );
}
@SuppressWarnings( "unchecked"/*cast to T*/)
... | false | community_kernel_src_test_java_org_neo4j_test_TestData.java |
2,091 | private static final class Factory
{
private final GraphDefinition graph;
private final String title;
private final String documentation;
Factory( GraphDefinition graph, String title, String documentation )
{
this.graph = graph;
this.title = title... | false | community_kernel_src_test_java_org_neo4j_test_TestData.java |
2,092 | {
@Override
public void evaluate() throws Throwable
{
product.set( create( graph, title == null ? null : title.value(), doc == null ? null : doc.value(),
description.getMethodName() ) );
try
{
... | false | community_kernel_src_test_java_org_neo4j_test_TestData.java |
2,093 | @Ignore( "this is not a test, it is a testing utility" )
public class TestData<T> implements TestRule
{
@Target( ElementType.METHOD )
@Retention( RetentionPolicy.RUNTIME )
public @interface Title
{
String value();
}
public interface Producer<T>
{
T create( GraphDefinition gr... | false | community_kernel_src_test_java_org_neo4j_test_TestData.java |
2,094 | {
@Override
public void evaluate() throws Throwable
{
base.evaluate();
}
}; | false | community_kernel_src_test_java_org_neo4j_test_TargetDirectory.java |
2,095 | public class TestDirectory implements TestRule
{
private File subdir = null;
private TestDirectory() { }
public String absolutePath()
{
return directory().getAbsolutePath();
}
public File directory()
{
if ( subdir == null ) throw... | false | community_kernel_src_test_java_org_neo4j_test_TargetDirectory.java |
2,096 | public class TargetDirectory
{
public class TestDirectory implements TestRule
{
private File subdir = null;
private TestDirectory() { }
public String absolutePath()
{
return directory().getAbsolutePath();
}
public File directory()
{
... | false | community_kernel_src_test_java_org_neo4j_test_TargetDirectory.java |
2,097 | {
@Override
public void handle( IOException failure )
{
}
}; | false | community_kernel_src_test_java_org_neo4j_test_StreamConsumer.java |
2,098 | out
{
@Override
PrintStream replace( PrintStream replacement )
{
PrintStream old = java.lang.System.out;
java.lang.System.setOut( replacement );
return old;
}
}, | false | community_kernel_src_test_java_org_neo4j_test_Mute.java |
2,099 | {
@Override
void restore( boolean failure ) throws IOException
{
for ( Handler handler : handlers )
{
logger.addHandler( handler );
}
... | false | community_kernel_src_test_java_org_neo4j_test_Mute.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.