Unnamed: 0
int64
0
6.7k
func
stringlengths
12
89.6k
target
bool
2 classes
project
stringlengths
45
151
1,900
final class RelationshipFont implements StyleParameter { private final String name; private final int size; /** * Configure the font of relationships. * @param fontName * the name of the relationship font. * @param fontSize * the size of the relationship font. */ publi...
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,901
{ public String getParameterValue( Relationship relationship, String key ) { if ( key.equals( "color" ) ) { return getColor( relationship ); } else { ret...
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,902
abstract class RelationshipColor implements StyleParameter { public final void configure( StyleConfiguration configuration ) { ParameterGetter<Relationship> getter = new ParameterGetter<Relationship>() { public String getParameterValue( Relationship relationship, String key ) { ...
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,903
final class NodeTitleProperty extends NodeTitle { private final String key; /** * Get node title from a property. * @param key * the property key to use as title. */ public NodeTitleProperty( String key ) { this.key = key; } public String getTitle( Node node ) { return ( S...
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,904
abstract class NodeTitle implements StyleParameter, TitleGetter<Node> { public final void configure( StyleConfiguration configuration ) { configuration.setNodeTitleGetter( this ); } }
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,905
abstract class NodePropertyFormat implements StyleParameter, PropertyFormatter { public final void configure( StyleConfiguration configuration ) { configuration.setNodePropertyFomatter( this ); } }
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,906
abstract class NodePropertyFilter implements StyleParameter, PropertyFilter { public final void configure( StyleConfiguration configuration ) { configuration.setNodePropertyFilter( this ); } }
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,907
final class NodeFont implements StyleParameter { private final String name; private final int size; /** * Configure the font of nodes. * @param fontName * the name of the node font. * @param fontSize * the size of the node font. */ public NodeFont( String fontName, int...
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,908
{ public String getParameterValue( Node node, String key ) { if ( key.equals( "color" ) ) { return getColor( node ); } else if ( key.equals( "fontcolor" ) ) { return getFontColor( node ); } else { return getFillColor( node ); } } };
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,909
abstract class NodeColor implements StyleParameter { public final void configure( StyleConfiguration configuration ) { ParameterGetter<Node> getter = new ParameterGetter<Node>() { public String getParameterValue( Node node, String key ) { if ( key.equals( "color" ) ) { return getColo...
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,910
final class GraphLabel implements StyleParameter { private final String label; public GraphLabel( String label ) { this.label = label; } public void configure( StyleConfiguration configuration ) { configuration.setGraphProperty( "label", ...
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,911
abstract class GenericRelationshipParameters implements StyleParameter, ParameterGetter<Relationship> { /** * Add custom generic parameters to relationships. * @param keys * the parameters to add. */ protected GenericRelationshipParameters( String... keys ) { this.keys = keys; }...
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,912
abstract class GenericNodeParameters implements StyleParameter, ParameterGetter<Node> { /** * Add custom generic parameters to nodes. * @param keys * the parameters to add. */ protected GenericNodeParameters( String... keys ) { this.keys = Arrays.asList( keys ); } private fin...
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,913
final class DefaultRelationshipProperty implements StyleParameter { private final String property; private final String value; /** * Add a property to the general relationship configuration. * @param property * the property key. * @param value * the property value. */ ...
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,914
{ public String formatString( String string ) { string = string.replace( "\\n", "\\\\n" ); string = string.replace( "\\", "\\\\" ); string = string.replace( "\"", "\\\"" ); string = string.replace( "'", "\\\\'" ); string = string.replace( "\n", "\\\\n" ); string = string.replace( "<", "\\<"...
false
community_graphviz_src_main_java_org_neo4j_visualization_ValueFormatter.java
1,915
UNDEFINED( null, "Object" ) { @Override <T> T apply( ValueFormatter<T> formatter, Object value ) { return formatter.formatUnknownObject( value ); } };
false
community_graphviz_src_main_java_org_neo4j_visualization_PropertyType.java
1,916
abstract class RelationshipTitle implements StyleParameter, TitleGetter<Relationship> { public final void configure( StyleConfiguration configuration ) { configuration.setRelationshipTitleGetter( this ); } }
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,917
private class DependencyResolverImpl extends DependencyResolver.Adapter { @Override public <T> T resolveDependency( Class<T> type, SelectionStrategy selector ) throws IllegalArgumentException { if ( type.isInstance( fileSystem ) ) { return type.cas...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchInserterImpl.java
1,918
{ @Override public Iterator<Label> iterator() { NodeStore nodeStore = neoStore.getNodeStore(); long[] labels = parseLabelsField( nodeStore.getRecord( node ) ).get( getNodeStore() ); return map( labelIdToLabelFunction, asPrimitiv...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchInserterImpl.java
1,919
{ @Override public boolean visit( NodePropertyUpdate update ) throws IOException { // Do a lookup from which property has changed to a list of indexes worried about that property. int propertyKeyInQuestion = update.getPropertyKeyId(); ...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchInserterImpl.java
1,920
{ @Override public Label apply( long from ) { return label( labelTokens.nameOf( safeCastLongToInt( from ) ) ); } };
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchInserterImpl.java
1,921
public class BatchInserterImpl implements BatchInserter { private static final long MAX_NODE_ID = IdType.NODE.getMaxValue(); private final LifeSupport life; private final NeoStore neoStore; private final IndexStore indexStore; private final File storeDir; private final BatchTokenHolder property...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchInserterImpl.java
1,922
private static class RelationshipBatchImpl implements Relationship { private final BatchRelationship rel; private final BatchGraphDatabaseImpl graphDbService; private final Map<String, Object> properties; RelationshipBatchImpl( BatchRelationship rel, ...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchGraphDatabaseImpl.java
1,923
static class RelIterator implements Iterable<Relationship>, Iterator<Relationship> { private final BatchGraphDatabaseImpl graphDbService; private final Iterable<Long> relIds; private final Iterator<Long> relItr; private final long nodeId; private final Direct...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchGraphDatabaseImpl.java
1,924
private static class NodeBatchImpl implements Node { private final BatchGraphDatabaseImpl graphDbService; private final long id; private final Map<String, Object> properties; NodeBatchImpl( long id, BatchGraphDatabaseImpl graphDbService, Map<String, Objec...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchGraphDatabaseImpl.java
1,925
static class FakeTransaction implements Transaction { @Override public void failure() { throw new NotInTransactionException( "Batch insert mode, " + "failure is not an option." ); } @Override public void finish() { ...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchGraphDatabaseImpl.java
1,926
{ @Override public void elementCleaned( RelationshipBatchImpl rel ) { Map<String, Object> properties = rel.getProperties(); if ( properties != null ) { batchInserter.setRelatio...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchGraphDatabaseImpl.java
1,927
{ @Override public void elementCleaned( NodeBatchImpl node ) { Map<String, Object> properties = node.getProperties(); if ( properties != null ) { batchInserter.setNodePropertie...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchGraphDatabaseImpl.java
1,928
class BatchGraphDatabaseImpl implements GraphDatabaseService { final BatchInserter batchInserter; private final LruCache<Long, NodeBatchImpl> nodes = new LruCache<Long, NodeBatchImpl>( "NodeCache", 10000 ) { @Override public void elementCleaned( NodeBatch...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchGraphDatabaseImpl.java
1,929
public class GlobalGraphOperationsIT { @Rule public ImpermanentDatabaseRule dbRule = new ImpermanentDatabaseRule(); @Test public void shouldListAllPropertyKeys() throws Exception { // Given GraphDatabaseService db = dbRule.getGraphDatabaseAPI(); try( Transaction tx = db.beginTx...
false
community_kernel_src_test_java_org_neo4j_tooling_GlobalGraphOperationsIT.java
1,930
{ @Override public Node apply( long nodeId ) { return nodeManager.getNodeById( nodeId ); } }, nodeIds ) );
false
community_kernel_src_main_java_org_neo4j_tooling_GlobalGraphOperations.java
1,931
{ @Override public ResourceIterator<Node> iterator() { return allNodesWithLabel( label.name() ); } };
false
community_kernel_src_main_java_org_neo4j_tooling_GlobalGraphOperations.java
1,932
return ResourceClosingIterator.newResourceIterator( statement, map( new Function<Token, String>() { @Override public String apply( Token propertyToken ) { return propertyToken.name(); ...
false
community_kernel_src_main_java_org_neo4j_tooling_GlobalGraphOperations.java
1,933
{ @Override public ResourceIterator<String> iterator() { Statement statement = statementCtxProvider.instance(); return ResourceClosingIterator.newResourceIterator( statement, map( new Function<Token, String>() { @Ov...
false
community_kernel_src_main_java_org_neo4j_tooling_GlobalGraphOperations.java
1,934
{ @Override public Label apply( Token labelToken ) { return label( labelToken.name() ); } }, statement.readOperations().labelsG...
false
community_kernel_src_main_java_org_neo4j_tooling_GlobalGraphOperations.java
1,935
{ @Override public ResourceIterator<Label> iterator() { Statement statement = statementCtxProvider.instance(); return ResourceClosingIterator.newResourceIterator( statement, map( new Function<Token, Label>() { ...
false
community_kernel_src_main_java_org_neo4j_tooling_GlobalGraphOperations.java
1,936
{ @Override public Iterator<Relationship> iterator() { return nodeManager.getAllRelationships(); } };
false
community_kernel_src_main_java_org_neo4j_tooling_GlobalGraphOperations.java
1,937
private class BatchSchemaActions implements InternalSchemaActions { @Override public IndexDefinition createIndexDefinition( Label label, String propertyKey ) { createIndexRule( label, propertyKey ); return new IndexDefinitionImpl( this, label, propertyKey, false )...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchInserterImpl.java
1,938
{ @Override public NeoStore evaluate() { return neoStore; } } );
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchInserterImpl.java
1,939
STRING_ARRAY( String.class, "String[]", String[].class ) { @Override <T> T apply( ValueFormatter<T> formatter, Object value ) { return formatter.formatStringArray( ( String[] ) value ); } },
false
community_graphviz_src_main_java_org_neo4j_visualization_PropertyType.java
1,940
private class InitialNodeLabelCreationVisitor implements Visitor<NodeLabelUpdate, IOException> { LabelScanWriter writer = labelScanStore.newWriter(); @Override public boolean visit( NodeLabelUpdate update ) throws IOException { writer.write( update ); ret...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchInserterImpl.java
1,941
STRING( null, "String", String.class ) { @Override <T> T apply( ValueFormatter<T> formatter, Object value ) { return formatter.formatString( ( String ) value ); } },
false
community_graphviz_src_main_java_org_neo4j_visualization_PropertyType.java
1,942
public class TestLuceneSchemaBatchInsertIT { @Test public void shouldLoadAndUseLuceneProvider() throws Exception { // GIVEN String storeDir = forTest( getClass() ).makeGraphDbDir().getAbsolutePath(); BatchInserter inserter = inserter( storeDir ); inserter.createDeferredSchema...
false
community_lucene-index_src_test_java_org_neo4j_unsafe_batchinsert_TestLuceneSchemaBatchInsertIT.java
1,943
private static class ConfigurationParameter { private final Setting<?> key; private final String value; public ConfigurationParameter( Setting<?> key, String value ) { this.key = key; this.value = value; } }
false
community_lucene-index_src_test_java_org_neo4j_unsafe_batchinsert_TestLuceneBatchInsert.java
1,944
{ @Override public boolean accept( KernelExtensionFactory extension ) { if ( extension instanceof InMemoryLabelScanStoreExtension || extension instanceof InMemoryIndexProviderFactory ) { return false;...
false
community_lucene-index_src_test_java_org_neo4j_unsafe_batchinsert_TestLuceneBatchInsert.java
1,945
public class TestLuceneBatchInsert { @Test public void testSome() throws Exception { BatchInserterIndexProvider provider = new LuceneBatchInserterIndexProviderNewImpl( inserter ); String indexName = "users"; BatchInserterIndex index = provider.nodeIndex( indexName, EXACT_CONFIG ); ...
false
community_lucene-index_src_test_java_org_neo4j_unsafe_batchinsert_TestLuceneBatchInsert.java
1,946
{ @Override public void write( NodeLabelUpdate update ) throws IOException { addToCollection( Collections.singletonList( update ).iterator(), allUpdates ); } @Override public void close() thr...
false
community_kernel_src_test_java_org_neo4j_unsafe_batchinsert_TestBatchInsert.java
1,947
private static class UpdateTrackingLabelScanStore implements LabelScanStore { private final List<NodeLabelUpdate> allUpdates = new ArrayList<>(); int writersCreated; public void assertRecivedUpdate( long node, long... labels ) { for ( NodeLabelUpdate update : allUpda...
false
community_kernel_src_test_java_org_neo4j_unsafe_batchinsert_TestBatchInsert.java
1,948
private static class ControlledLabelScanStore extends KernelExtensionFactory<InMemoryLabelScanStoreExtension.NoDependencies> { private final LabelScanStore labelScanStore; public ControlledLabelScanStore( LabelScanStore labelScanStore ) { super( "batch" ); this.l...
false
community_kernel_src_test_java_org_neo4j_unsafe_batchinsert_TestBatchInsert.java
1,949
{ @Override public String apply( Label from ) { return from.name(); } }, nodeLabels );
false
community_kernel_src_test_java_org_neo4j_unsafe_batchinsert_TestBatchInsert.java
1,950
public class TestBatchInsert { private static Map<String,Object> properties = new HashMap<>(); private static enum RelTypes implements RelationshipType { BATCH_TEST, REL_TYPE1, REL_TYPE2, REL_TYPE3, REL_TYPE4, REL_TYPE5 } private static RelationshipT...
false
community_kernel_src_test_java_org_neo4j_unsafe_batchinsert_TestBatchInsert.java
1,951
public class TestBatchDatabase { private final String storeDir = "/tmp/dblala"; private EphemeralFileSystemAbstraction fs; @Test public void shouldCreateLabeledNodes() { // given GraphDatabaseService gdb = BatchInserters.batchDatabase( storeDir, fs ); Label luluLabel = lab...
false
community_kernel_src_test_java_org_neo4j_unsafe_batchinsert_TestBatchDatabase.java
1,952
{ @Override public void write( NodeLabelUpdate update ) throws IOException { // do nothing } @Override public void close() throws IOException { // nothing to close } };
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_LabelScanWriter.java
1,953
{ @Override public String getMethodName() { return BigBatchStoreIT.this.getClass().getSimpleName() + "#" + super.getMethodName(); } };
false
community_kernel_src_test_java_org_neo4j_unsafe_batchinsert_BigBatchStoreIT.java
1,954
public class BigBatchStoreIT implements RelationshipType { private static final String PATH = "target/var/bigb"; @Rule public EphemeralFileSystemRule fs = new EphemeralFileSystemRule(); private org.neo4j.unsafe.batchinsert.BatchInserter db; public @Rule TestName testName = new TestName() { ...
false
community_kernel_src_test_java_org_neo4j_unsafe_batchinsert_BigBatchStoreIT.java
1,955
class BatchTokenHolder { private final ArrayMap<String,Integer> nameToId = new ArrayMap<String,Integer>( (byte)5, false, false); private final ArrayMap<Integer,String> idToName = new ArrayMap<Integer,String>( (byte)5, false, false); BatchTokenHolder( Token[] tokens ) { for (...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchTokenHolder.java
1,956
public final class BatchRelationship { private final long id; private final long startNodeId; private final long endNodeId; private final RelationshipType type; BatchRelationship( long id, long startNodeId, long endNodeId, RelationshipType type ) { this.id = id; this.sta...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchRelationship.java
1,957
public final class BatchInserters { /** * Get a {@link BatchInserter} given a store directory. * * @param storeDir the store directory * @return a new {@link BatchInserter} */ public static BatchInserter inserter( String storeDir ) { return inserter( storeDir, stringMap() )...
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchInserters.java
1,958
public class BatchInserterImplTest { private void assumeNotWindows() { // Windows doesn't work well at all with memory mapping. The problem being that // in Java there's no way to unmap a memory mapping from a file, instead that // is handed over to GC and GC isn't deterministic. Well, a...
false
community_kernel_src_test_java_org_neo4j_unsafe_batchinsert_BatchInserterImplTest.java
1,959
private static class RelationshipTypeImpl implements RelationshipType { private final String name; RelationshipTypeImpl( String name ) { this.name = name; } @Override public String name() { return name; } }
false
community_kernel_src_main_java_org_neo4j_unsafe_batchinsert_BatchInserterImpl.java
1,960
{ public String getParameterValue( Relationship container, String key ) { return getTailLabel( container ); } } );
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,961
final class RelationshipTitleProperty extends RelationshipTitle { private final String key; /** * Get relationship title from a property. * @param key * the property key to use as title. */ public RelationshipTitleProperty( String key ) { this.key = key; } public String getTitl...
false
community_graphviz_src_main_java_org_neo4j_visualization_graphviz_StyleParameter.java
1,962
{ @Override public void run() { db.shutdown(); } };
false
community_kernel_src_test_java_org_neo4j_test_EphemeralFileSystemRule.java
1,963
private static class TestGraphDatabase extends InternalAbstractGraphDatabase { private final RecoveryVerifier verifier; TestGraphDatabase( String dir, RecoveryVerifier recoveryVerifier ) { super( dir, stringMap(), new DefaultGraphDatabaseDependencies() ); this.ve...
false
community_neo4j_src_test_java_recovery_TestRecoveryVerification.java
1,964
{ @Override public boolean isValid( TransactionInfo txInfo ) { return false; } };
false
community_neo4j_src_test_java_recovery_TestRecoveryVerification.java
1,965
public class TestRecoveryVerification { private static class TestGraphDatabase extends InternalAbstractGraphDatabase { private final RecoveryVerifier verifier; TestGraphDatabase( String dir, RecoveryVerifier recoveryVerifier ) { super( dir, stringMap(), new DefaultGraphDatab...
false
community_neo4j_src_test_java_recovery_TestRecoveryVerification.java
1,966
public class TestRecoveryScenarios { @Test public void shouldRecoverTransactionWhereNodeIsDeletedInTheFuture() throws Exception { // GIVEN Node node = createNodeWithProperty( "key", "value", label ); rotateLog(); setProperty( node, "other-key", 1 ); deleteNode( node )...
false
community_neo4j_src_test_java_recovery_TestRecoveryScenarios.java
1,967
{ @Override public boolean accept( LogEntry item ) { return !(item instanceof LogEntry.Done) && !(item instanceof LogEntry.TwoPhaseCommit); } } );
false
community_neo4j_src_test_java_recovery_TestRecoveryNotHappening.java
1,968
public class TestRecoveryNotHappening { private final File storeDirectory = TargetDirectory.forTest( getClass() ).makeGraphDbDir(); private GraphDatabaseService db; /* So this test is here to assert that even if we have a scenario where * there's a transaction which is started and prepared, but la...
false
community_neo4j_src_test_java_recovery_TestRecoveryNotHappening.java
1,969
public class TestRecoveryMultipleDataSources { private static final String dir = forTest( TestRecoveryMultipleDataSources.class ).makeGraphDbDir().getAbsolutePath(); /** * Tests an issue where loading all relationship types and property indexes after * the neostore data source had been started in...
false
community_neo4j_src_test_java_recovery_TestRecoveryMultipleDataSources.java
1,970
private static class VerifyLastTxId implements Task { private long tx; private String dataSource; VerifyLastTxId( String dataSource, long tx ) { this.dataSource = dataSource; this.tx = tx; } @Override @SuppressWarnings("de...
false
community_neo4j_src_test_java_recovery_TestRecoveryLogTimingIssues.java
1,971
static class Shutdown implements Task { @Override public void run( @SuppressWarnings("deprecation") GraphDatabaseAPI graphdb ) { graphdb.shutdown(); } }
false
community_neo4j_src_test_java_recovery_TestRecoveryLogTimingIssues.java
1,972
static class RotateLogs implements Task { private final Set<String> dataSources = new HashSet<>(); RotateLogs( String... dataSources ) { this.dataSources.addAll( Arrays.asList( dataSources ) ); } @Override @SuppressWarnings("deprecati...
false
community_neo4j_src_test_java_recovery_TestRecoveryLogTimingIssues.java
1,973
static class GetCommittedTransactions implements Task { private final long highestLogVersion; private final long highestTxId; public GetCommittedTransactions( long highestLogVersion, long highestTxId ) { this.highestLogVersion = highestLogVersion; this.hi...
false
community_neo4j_src_test_java_recovery_TestRecoveryLogTimingIssues.java
1,974
static class DoSimpleTransaction implements Task { @Override public void run( @SuppressWarnings("deprecation") GraphDatabaseAPI graphdb ) { try(Transaction tx = graphdb.beginTx()) { Node parent = graphdb.createNode(); for ( int i = ...
false
community_neo4j_src_test_java_recovery_TestRecoveryLogTimingIssues.java
1,975
static class DoGraphAndIndexTransaction implements Task { @Override public void run( @SuppressWarnings("deprecation") GraphDatabaseAPI graphdb ) { try(Transaction tx = graphdb.beginTx()) { Node parent = graphdb.createNode(); graphdb...
false
community_neo4j_src_test_java_recovery_TestRecoveryLogTimingIssues.java
1,976
public class TestRecoveryLogTimingIssues extends AbstractSubProcessTestBase { private static final DynamicRelationshipType TYPE = withName( "TYPE" ); private final CountDownLatch breakpointNotification = new CountDownLatch( 1 ); private final BreakPoint SET_VERSION = BreakPoint.thatCrashesTheProcess( break...
false
community_neo4j_src_test_java_recovery_TestRecoveryLogTimingIssues.java
1,977
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
community_neo4j_src_test_java_recovery_TestRecoveryIssues.java
1,978
static class TwoWriteTransactions implements Task { @Override public void run( GraphDatabaseAPI graphdb ) { Node node; try(Transaction tx = graphdb.beginTx()) { node = graphdb.createNode(); tx.success(); } ...
false
community_neo4j_src_test_java_recovery_TestRecoveryIssues.java
1,979
static class SingleWriteTransaction implements Task { @Override public void run( GraphDatabaseAPI graphdb ) { try(Transaction tx = graphdb.beginTx()) { Node node = graphdb.createNode(); node.setProperty( "correct", "yes" ); ...
false
community_neo4j_src_test_java_recovery_TestRecoveryIssues.java
1,980
static class Crash implements Task { @Override public void run( GraphDatabaseAPI graphdb ) { throw new AssertionError( "Should not reach here - the breakpoint should avoid it" ); } }
false
community_neo4j_src_test_java_recovery_TestRecoveryIssues.java
1,981
{ @Override protected void shutdown( GraphDatabaseService graphdb, boolean normal ) { if ( normal ) super.shutdown( graphdb, normal ); }; };
false
community_neo4j_src_test_java_recovery_TestRecoveryIssues.java
1,982
{ @Override protected void callback( DebugInterface debug ) throws KillSubProcess { afterCrash.countDown(); throw KillSubProcess.withExitCode( -1 ); } }, };
false
community_neo4j_src_test_java_recovery_TestRecoveryIssues.java
1,983
private static class CountingRecoveryVerifier implements RecoveryVerifier { private int count2PC; @Override public boolean isValid( TransactionInfo txInfo ) { if ( !txInfo.isOnePhase() ) { count2PC++; } return true;...
false
community_neo4j_src_test_java_recovery_TestRecoveryVerification.java
1,984
public class TestInstanceJoin { private final TargetDirectory dir = forTest( getClass() ); @Test public void makeSureSlaveCanJoinEvenIfTooFarBackComparedToMaster() throws Exception { String key = "foo"; String value = "bar"; HighlyAvailableGraphDatabase master = null; H...
false
enterprise_ha_src_test_java_slavetest_TestInstanceJoin.java
1,985
@SuppressWarnings( "serial" ) public class TestRecoveryIssues 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 ); //@Test pu...
false
community_neo4j_src_test_java_recovery_TestRecoveryIssues.java
1,986
public class TestConcurrentRotation extends AbstractSubProcessTestBase { private final CountDownLatch barrier1 = new CountDownLatch( 1 ), barrier2 = new CountDownLatch( 1 ); private DebuggedThread thread; private final BreakPoint commitIndexWriter = new BreakPoint( IndexWriter.class, "commit" ) ...
false
community_neo4j_src_test_java_synchronization_TestConcurrentRotation.java
1,987
private static class CreateData implements Task { @Override public void run( GraphDatabaseAPI graphdb ) { try(Transaction tx = graphdb.beginTx()) { Node node = graphdb.createNode(); node.setProperty( "value", "present" ); ...
false
community_neo4j_src_test_java_visibility_TestPropertyReadOnNewEntityBeforeLockRelease.java
1,988
{ @Override protected void callback( DebugInterface debug ) throws KillSubProcess { latch2.countDown(); this.disable(); } };
false
community_neo4j_src_test_java_visibility_TestPropertyReadOnNewEntityBeforeLockRelease.java
1,989
{ @Override protected void callback( DebugInterface debug ) throws KillSubProcess { thread.resume(); this.disable(); } }, done = new BreakPoint( TestPropertyReadOnNewEntityBeforeLockRelease.class, "done" )
false
community_neo4j_src_test_java_visibility_TestPropertyReadOnNewEntityBeforeLockRelease.java
1,990
{ @Override protected void callback( DebugInterface debug ) throws KillSubProcess { lockReleaserCommit.enable(); this.disable(); } }, resumeThread = new BreakPoint( TestPropertyReadOnNewEntityBeforeLockRelease.class, "resumeThread" )
false
community_neo4j_src_test_java_visibility_TestPropertyReadOnNewEntityBeforeLockRelease.java
1,991
class TaskRunner implements Runnable { private final Task task; TaskRunner( Task task ) { this.task = task; } @Override public void run() { try { task...
false
community_neo4j_src_test_java_visibility_TestPropertyReadOnNewEntityBeforeLockRelease.java
1,992
{ @Override protected void callback( DebugInterface debug ) throws KillSubProcess { thread = debug.thread().suspend( this ); resumeThread.enable(); this.disable(); latch1.countDown(); } }, enableBreakPoints = new BreakPoint( TestPro...
false
community_neo4j_src_test_java_visibility_TestPropertyReadOnNewEntityBeforeLockRelease.java
1,993
@SuppressWarnings( "serial" ) public class TestPropertyReadOnNewEntityBeforeLockRelease extends AbstractSubProcessTestBase { private final CountDownLatch latch1 = new CountDownLatch( 1 ), latch2 = new CountDownLatch( 1 ); @Test public void shouldBeAbleToReadPropertiesFromNewNodeReturnedFromIndex() throws E...
false
community_neo4j_src_test_java_visibility_TestPropertyReadOnNewEntityBeforeLockRelease.java
1,994
{ @Override public void run() { try(Transaction ignored = graphDatabaseService.beginTx()) { assertThat( (Integer) commonNode.getProperty( PROPERTY_NAME ), is( PROPERTY_VALUE ) ); }...
false
community_neo4j_src_test_java_visibility_TestDatasourceCommitOrderDataVisibility.java
1,995
{ @Override public void run() { try(Transaction ignored = graphDatabaseService.beginTx()) { Node node = graphDatabaseService.index().forNodes( INDEX_NAME ).get( INDEX_KEY, INDEX_VALUE ).getSingle(...
false
community_neo4j_src_test_java_visibility_TestDatasourceCommitOrderDataVisibility.java
1,996
{ @Override public void run() { try(Transaction ignored = graphDatabaseService.beginTx()) { assertThat( commonNode.hasProperty( PROPERTY_NAME ), is( false ) ); } catch ( Throwable t ) ...
false
community_neo4j_src_test_java_visibility_TestDatasourceCommitOrderDataVisibility.java
1,997
{ @Override public void run() { try(Transaction ignored = graphDatabaseService.beginTx()) { assertThat( graphDatabaseService.index().forNodes( INDEX_NAME ).get( INDEX_KEY, INDEX_VALUE ).size(), is...
false
community_neo4j_src_test_java_visibility_TestDatasourceCommitOrderDataVisibility.java
1,998
public class TestDatasourceCommitOrderDataVisibility { private static final String INDEX_NAME = "foo"; private static final String INDEX_KEY = "bar"; private static final String INDEX_VALUE = "baz"; private static final String PROPERTY_NAME = "quux"; private static final int PROPERTY_VALUE = 42; ...
false
community_neo4j_src_test_java_visibility_TestDatasourceCommitOrderDataVisibility.java
1,999
private static class Verifier implements Task { @Override public void run( GraphDatabaseAPI graphdb ) { try(Transaction ignored = graphdb.beginTx()) { // TODO: Pass a node reference around of assuming the id will be deterministically assigned, ...
false
community_neo4j_src_test_java_synchronization_TestConcurrentRotation.java