Unnamed: 0
int64
0
6.7k
func
stringlengths
12
89.6k
target
bool
2 classes
project
stringlengths
45
151
1,600
{ @Override public void run() { try { task.run( graphdb ); } catch ( RuntimeException e ) { e.addSuppressed( sta...
false
community_kernel_src_test_java_org_neo4j_test_AbstractSubProcessTestBase.java
1,601
@SuppressWarnings("serial") private static class ThreadTask implements Task { private final Task task; private final Exception stackTraceOfOrigin; ThreadTask( Task task ) { this.task = task; this.stackTraceOfOrigin = new Exception("Stack trace of thre...
false
community_kernel_src_test_java_org_neo4j_test_AbstractSubProcessTestBase.java
1,602
@SuppressWarnings({"hiding", "serial"}) private static class SubInstance extends SubProcess<Instance, Bootstrapper> implements Instance { private volatile GraphDatabaseAPI graphdb; private static final AtomicReferenceFieldUpdater<SubInstance, GraphDatabaseAPI> GRAPHDB = Atomi...
false
community_kernel_src_test_java_org_neo4j_test_AbstractSubProcessTestBase.java
1,603
@SuppressWarnings("serial") private static class StartupFailureException extends RuntimeException { StartupFailureException( Throwable failure ) { super( failure ); } }
false
community_kernel_src_test_java_org_neo4j_test_AbstractSubProcessTestBase.java
1,604
public static class KillAwareBootstrapper extends Bootstrapper { public KillAwareBootstrapper( AbstractSubProcessTestBase test, int instance, Map<String, String> dbConfiguration ) throws IOException { super( test, instance, dbConfiguration ); ...
false
community_kernel_src_test_java_org_neo4j_test_AbstractSubProcessTestBase.java
1,605
@SuppressWarnings("serial") public static class Bootstrapper implements Serializable { protected final String storeDir; private final Map<String, String> dbConfiguration; public Bootstrapper( AbstractSubProcessTestBase test, int instance ) throws IOException ...
false
community_kernel_src_test_java_org_neo4j_test_AbstractSubProcessTestBase.java
1,606
public class AbstractSubProcessTestBase { protected final TargetDirectory target; protected final Pair<Instance, BreakPoint[]>[] instances; public AbstractSubProcessTestBase() { this( 1 ); } @SuppressWarnings("unchecked") protected AbstractSubProcessTestBase( int instances ) { ...
false
community_kernel_src_test_java_org_neo4j_test_AbstractSubProcessTestBase.java
1,607
{ @Override protected void config( GraphDatabaseBuilder builder, String clusterName, int serverId ) { super.config( builder, clusterName, serverId ); configureClusterMember( builder, clusterName, serverId ); } ...
false
enterprise_ha_src_test_java_org_neo4j_test_AbstractClusterTest.java
1,608
public abstract class AbstractClusterTest { public @Rule TestName testName = new TestName(); private File dir; protected LifeSupport life = new LifeSupport(); private final Provider provider; protected ClusterManager clusterManager; protected ManagedCluster cluster; protected AbstractCl...
false
enterprise_ha_src_test_java_org_neo4j_test_AbstractClusterTest.java
1,609
public class JSONTokener { private int index; private Reader reader; private char lastChar; private boolean useLastChar; /** * Construct a JSONTokener from a string. * * @param reader A reader. */ public JSONTokener(Reader reader) { this.reader = reader.markSup...
false
community_shell_src_main_java_org_neo4j_shell_util_json_JSONTokener.java
1,610
public class JSONParser { public static Object parse( String json ) throws ShellException { try { final String input = json.trim(); if ( input.isEmpty() ) { return null; } if ( input.charAt( 0 ) == '{' ) { ...
false
community_shell_src_main_java_org_neo4j_shell_util_json_JSONParser.java
1,611
private static final class Null { /** * There is only intended to be a single instance of the NULL object, * so the clone method returns itself. * @return NULL. */ @Override protected final Object clone() { return this; } ...
false
community_shell_src_main_java_org_neo4j_shell_util_json_JSONObject.java
1,612
public class JSONObject { /** * JSONObject.NULL is equivalent to the value that JavaScript calls null, * whilst Java's null is equivalent to the value that JavaScript calls * undefined. */ private static final class Null { /** * There is only intended to be a single insta...
false
community_shell_src_main_java_org_neo4j_shell_util_json_JSONObject.java
1,613
public class JSONException extends Exception { private Throwable cause; /** * Constructs a JSONException with an explanatory message. * @param message Detail about the reason for the exception. */ public JSONException(String message) { super(message); } public JSONException(...
false
community_shell_src_main_java_org_neo4j_shell_util_json_JSONException.java
1,614
public class JSONArray { /** * The arrayList where the JSONArray's properties are kept. */ private ArrayList<Object> myArrayList; /** * Construct an empty JSONArray. */ public JSONArray() { this.myArrayList = new ArrayList<Object>(); } public List<Object> toList(...
false
community_shell_src_main_java_org_neo4j_shell_util_json_JSONArray.java
1,615
public abstract class AsciiDocGenerator { private static final String DOCUMENTATION_END = "\n...\n"; private final Logger log = Logger.getLogger( AsciiDocGenerator.class.getName() ); protected final String title; protected String section; protected String description = null; protected GraphDatab...
false
community_kernel_src_test_java_org_neo4j_test_AsciiDocGenerator.java
1,616
public class AwaitAnswer<T> implements Answer<T> { public static AwaitAnswer<Void> afterAwaiting( CountDownLatch latch ) { return new AwaitAnswer<Void>( latch, null ); } private final CountDownLatch latch; private final Answer<T> result; public AwaitAnswer( CountDownLatch latch, Answer...
false
community_kernel_src_test_java_org_neo4j_test_AwaitAnswer.java
1,617
@Service.Implementation(App.class) public class Start extends TransactionProvidingApp { private ExecutionEngine engine; @Override public String getDescription() { String className = this.getClass().getSimpleName().toUpperCase(); return MessageFormat.format( "Executes a Cypher query. Usa...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Start.java
1,618
public class BatchTransaction implements AutoCloseable { private static final int DEFAULT_INTERMEDIARY_SIZE = 10000; public static BatchTransaction beginBatchTx( GraphDatabaseService db ) { return new BatchTransaction( db ); } private final GraphDatabaseService db; private Transaction ...
false
community_kernel_src_test_java_org_neo4j_test_BatchTransaction.java
1,619
public class EmbeddedDatabaseRule extends DatabaseRule { private final TempDirectory temp; public EmbeddedDatabaseRule() { this.temp = new TempDirectory() { private final TemporaryFolder folder = new TemporaryFolder(); @Override public Fi...
false
community_kernel_src_test_java_org_neo4j_test_EmbeddedDatabaseRule.java
1,620
public class DumpTxLog { public static void main( String[] args ) throws IOException { FileSystemAbstraction fileSystemAbstraction = new DefaultFileSystemAbstraction(); String file = arg( args, 0, "graph db store directory or file" ); if ( new File( file ).isDirectory() ) // ...
false
community_kernel_src_test_java_org_neo4j_test_DumpTxLog.java
1,621
public class DoubleLatch { private final CountDownLatch startSignal; private final CountDownLatch finishSignal; private final int numberOfContestants; public DoubleLatch() { this( 1 ); } public DoubleLatch( int numberOfContestants ) { this.numberOfContestants = ...
false
community_kernel_src_test_java_org_neo4j_test_DoubleLatch.java
1,622
private static class PropertiesRep implements Serializable { private final Map<String, Serializable> props = new HashMap<String, Serializable>(); private final String entityToString; private final long entityId; PropertiesRep( PropertyContainer entity, long id ) { ...
false
community_kernel_src_test_java_org_neo4j_test_DbRepresentation.java
1,623
private static class NodeRep implements Serializable { private final PropertiesRep properties; private final Map<Long, PropertiesRep> outRelationships = new HashMap<Long, PropertiesRep>(); private final long highestRelationshipId; private final long id; private final Map<...
false
community_kernel_src_test_java_org_neo4j_test_DbRepresentation.java
1,624
private static class CollectionDiffReport implements DiffReport { private final Collection<String> collection; public CollectionDiffReport( Collection<String> collection ) { this.collection = collection; } @Override public void add( String re...
false
community_kernel_src_test_java_org_neo4j_test_DbRepresentation.java
1,625
public class DbRepresentation implements Serializable { private final Map<Long, NodeRep> nodes = new TreeMap<Long, NodeRep>(); private long highestNodeId; private long highestRelationshipId; public static DbRepresentation of( GraphDatabaseService db ) { return of( db, true ); } ...
false
community_kernel_src_test_java_org_neo4j_test_DbRepresentation.java
1,626
{ @Override public TO apply( GraphDatabaseService graphDb ) { return function.apply( from ); } } );
false
community_kernel_src_test_java_org_neo4j_test_DatabaseRule.java
1,627
{ @Override public TO apply( final FROM from ) { return executeAndCommit( new Function<GraphDatabaseService, TO>() { @Override public TO apply( GraphDatabaseService graphDb ) { ...
false
community_kernel_src_test_java_org_neo4j_test_DatabaseRule.java
1,628
public abstract class DatabaseRule extends ExternalResource { GraphDatabaseBuilder databaseBuilder; GraphDatabaseAPI database; private String storeDir; public <T> T when( Function<GraphDatabaseService, T> function ) { return function.apply( getGraphDatabaseService() ); } public <T>...
false
community_kernel_src_test_java_org_neo4j_test_DatabaseRule.java
1,629
{ @Override public Void apply( GraphDatabaseService graphDb ) { graphDb.schema().awaitIndexesOnline( timeout, unit ); return null; } };
false
community_kernel_src_test_java_org_neo4j_test_DatabaseFunctions.java
1,630
{ @Override public Void apply( GraphDatabaseService graphDb ) { graphDb.schema().constraintFor( label ).assertPropertyIsUnique( propertyKey ).create(); return null; } };
false
community_kernel_src_test_java_org_neo4j_test_DatabaseFunctions.java
1,631
{ @Override public Void apply( GraphDatabaseService graphDb ) { graphDb.schema().indexFor( label ).on( propertyKey ).create(); return null; } };
false
community_kernel_src_test_java_org_neo4j_test_DatabaseFunctions.java
1,632
{ @Override public Node apply( Node node ) { node.setProperty( propertyKey, value ); return node; } };
false
community_kernel_src_test_java_org_neo4j_test_DatabaseFunctions.java
1,633
{ @Override public Node apply( Node node ) { node.addLabel( label ); return node; } };
false
community_kernel_src_test_java_org_neo4j_test_DatabaseFunctions.java
1,634
{ @Override public Node apply( GraphDatabaseService graphDb ) { return graphDb.createNode(); } };
false
community_kernel_src_test_java_org_neo4j_test_DatabaseFunctions.java
1,635
public class DatabaseFunctions { public static AlgebraicFunction<GraphDatabaseService, Node> createNode() { return new AlgebraicFunction<GraphDatabaseService, Node>() { @Override public Node apply( GraphDatabaseService graphDb ) { return graphD...
false
community_kernel_src_test_java_org_neo4j_test_DatabaseFunctions.java
1,636
public class CleanupRule extends ExternalResource { private final List<Closeable> toCloseAfterwards = new ArrayList<>(); @Override protected void after() { for ( Closeable toClose : toCloseAfterwards ) { try { toClose.close(); } ...
false
community_kernel_src_test_java_org_neo4j_test_CleanupRule.java
1,637
public class BufferingLogging implements Logging { private final BufferingLogger log = new BufferingLogger(); private final BufferingConsoleLogger console = new BufferingConsoleLogger(); @Override public StringLogger getMessagesLog( Class loggingClass ) { return log; } @Override ...
false
community_kernel_src_test_java_org_neo4j_test_BufferingLogging.java
1,638
@Service.Implementation( App.class ) public class With extends Start { }
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_With.java
1,639
@Service.Implementation( App.class ) public class Return extends Start { }
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Return.java
1,640
public class Eval extends TransactionProvidingApp { private ScriptEngineViaReflection scripting; @Override public String getDescription() { return "Pass JavaScript to be executed on the shell server, directly on the database. " + "There are predefined variables you can use:\n" +...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Eval.java
1,641
{ @Override public String apply( IndexDefinition index ) { return index.getLabel().name(); } };
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Schema.java
1,642
@Service.Implementation(App.class) public class Rollback extends NonTransactionProvidingApp { @Override public String getDescription() { return "Rolls back all open transactions"; } @Override protected Continuation exec( AppCommandParser parser, Session session, Output out ) ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Rollback.java
1,643
@Service.Implementation( App.class ) public class Rmrel extends TransactionProvidingApp { /** * Constructs a new application which can delete relationships in Neo4j. */ public Rmrel() { this.addOptionDefinition( "f", new OptionDefinition( OptionValueType.NONE, "Force deletion, ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Rmrel.java
1,644
@Service.Implementation( App.class ) public class Rmnode extends TransactionProvidingApp { public Rmnode() { addOptionDefinition( "f", new OptionDefinition( OptionValueType.NONE, "Force deletion, will delete all relationships prior to deleting the node" ) ); } @Override ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Rmnode.java
1,645
@Service.Implementation( App.class ) public class Rm extends TransactionProvidingApp { { addOptionDefinition( "p", new OptionDefinition( OptionValueType.NONE, "Removes a property" ) ); addOptionDefinition( "l", new OptionDefinition( OptionValueType.MUST, "Removes one ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Rm.java
1,646
@Service.Implementation( App.class ) public class Pwd extends TransactionProvidingApp { @Override public String getDescription() { return "Prints path to current node or relationship"; } @Override protected Continuation exec( AppCommandParser parser, Session session, Output out ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Pwd.java
1,647
public abstract class NonTransactionProvidingApp extends TransactionProvidingApp { @Override public Continuation execute( AppCommandParser parser, Session session, Output out ) throws Exception { return this.exec( parser, session, out ); } }
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_NonTransactionProvidingApp.java
1,648
static class WrapRelationship extends NodeOrRelationship { private WrapRelationship( Relationship rel ) { super( rel ); } private Relationship object() { return asRelationship(); } @Override public String getType() ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_NodeOrRelationship.java
1,649
static class WrapNode extends NodeOrRelationship { private WrapNode( Node node ) { super( node ); } private Node object() { return asNode(); } @Override public String getType() { return TYPE_NODE; ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_NodeOrRelationship.java
1,650
public abstract class NodeOrRelationship { public static final String TYPE_NODE = "n"; public static final String TYPE_RELATIONSHIP = "r"; public static NodeOrRelationship wrap( Node node ) { return new WrapNode( node ); } public static NodeOrRelationship wrap( Relationship rel ) {...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_NodeOrRelationship.java
1,651
@Service.Implementation( App.class ) public class Mv extends TransactionProvidingApp { /** * Constructs a new "mv" application. */ public Mv() { super(); this.addOptionDefinition( "o", new OptionDefinition( OptionValueType.NONE, "To override if the key already exists" )...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Mv.java
1,652
@Service.Implementation( App.class ) public class Mkrel extends TransactionProvidingApp { public static final String KEY_LAST_CREATED_NODE = "LAST_CREATED_NODE"; public static final String KEY_LAST_CREATED_RELATIONSHIP = "LAST_CREATED_RELATIONSHIP"; /** * Constructs a new application which can create ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Mkrel.java
1,653
@Service.Implementation( App.class ) public class Mknode extends TransactionProvidingApp { { addOptionDefinition( "np", new OptionDefinition( OptionValueType.MUST, "Properties (a json map) to set for the new node (if one is created)" ) ); addOptionDefinition( "cd", new OptionDefiniti...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Mknode.java
1,654
private static class LimitPerTypeFilter implements Predicate<Relationship> { private final int maxRelsPerType; private final Map<String, AtomicInteger> encounteredRelationships = new HashMap<String, AtomicInteger>(); private int typesMaxedOut = 0; private final AtomicBoolean iter...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Ls.java
1,655
{ @Override protected Relationship fetchNextOrNull() { return handBreak.get() ? null : super.fetchNextOrNull(); } };
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Ls.java
1,656
{ @Override public int compare( String item1, String item2 ) { return item1.toLowerCase().compareTo( item2.toLowerCase() ); } } );
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Ls.java
1,657
@Service.Implementation( App.class ) public class Ls extends TransactionProvidingApp { private static final int DEFAULT_MAX_RELS_PER_TYPE_LIMIT = 10; { addOptionDefinition( "b", new OptionDefinition( OptionValueType.NONE, "Brief summary instead of full content" ) ); addOptionDef...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Ls.java
1,658
@Service.Implementation( App.class ) public class Jsh extends TransactionProvidingApp { private App sh = new org.neo4j.shell.apps.extra.Jsh(); @Override public String getDescription() { return this.sh.getDescription(); } @Override public String getDescription( String option ) {...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Jsh.java
1,659
@Service.Implementation( App.class ) public class IndexProviderShellApp extends TransactionProvidingApp { { addOptionDefinition( "g", new OptionDefinition( OptionValueType.NONE, "Get entities for the given key and value" ) ); addOptionDefinition( "q", new OptionDefinition( OptionValu...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_IndexProviderShellApp.java
1,660
@Service.Implementation( App.class ) public class Gsh extends TransactionProvidingApp { private App sh = new org.neo4j.shell.apps.extra.Gsh(); @Override public String getDescription() { return this.sh.getDescription(); } @Override public String getDescription( String option ) {...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Gsh.java
1,661
public class Schema extends TransactionProvidingApp { private static final Function<IndexDefinition, String> LABEL_COMPARE_FUNCTION = new Function<IndexDefinition, String>() { @Override public String apply( IndexDefinition index ) { ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Schema.java
1,662
{ @Override public boolean accept( IndexDefinition index ) { return indexOf( property, index.getPropertyKeys() ) != -1; } }, indexes );
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Schema.java
1,663
@Service.Implementation( App.class ) public class Profile extends Start { public Profile() { super(); } @Override public String getDescription() { return "Executes a Cypher query and prints out execution plan and other profiling information. " + "Usage: profile <...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Profile.java
1,664
{ @Override public boolean accept( ConstraintDefinition constraint ) { return hasLabel( constraint, labels ) && isMatchingConstraint( constraint, property ); } }, schema.getConstraints() );
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Schema.java
1,665
@Service.Implementation( App.class ) public class Optional extends Start { }
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Optional.java
1,666
@Service.Implementation( App.class ) public class Merge extends Start { }
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Merge.java
1,667
@Service.Implementation( App.class ) public class Match extends Start { }
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Match.java
1,668
@Service.Implementation( App.class ) public class Load extends Start { }
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Load.java
1,669
public class Exporter { private final SubGraphExporter exporter; Exporter(SubGraph graph) { exporter = new SubGraphExporter( graph ); } public void export( Output out ) throws RemoteException, ShellException { begin( out ); exporter.export(asWriter(out)); out.pr...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Exporter.java
1,670
@Service.Implementation( App.class ) public class Dump extends Start { @Override public String getDescription() { return "Executes a Cypher query to export a subgraph. Usage: DUMP start <rest of query>;\n" + "Example: DUMP start n = node({self}) MATCH n-[r]->m RETURN n,r,m;\n" + ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Dump.java
1,671
@Service.Implementation( App.class ) public class Drop extends Start { }
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Drop.java
1,672
@Service.Implementation( App.class ) public class Cypher extends Start { @Override public String getDescription() { return "Executes a Cypher query with an older parser. " + "Usage: cypher <version> start <rest of query>\n" + "Example: CYPHER 1.5 START me = node({self...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Cypher.java
1,673
@Service.Implementation( App.class ) public class Create extends Start { }
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_cypher_Create.java
1,674
class TypedId { private final String type; private final long id; private final boolean isNode; /** * @param typedId the serialized string. */ public TypedId( String typedId ) { this( typedId.substring( 0, 1 ), Long.parseLong( typedId.substring( 1 ) ) ); } ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_TypedId.java
1,675
private class CompiledScriptEvaluator implements Evaluator { private final Object compiledScript; private final Object context; CompiledScriptEvaluator( Object compiledScript ) throws Exception { this.compiledScript = compiledScript; this.context = script...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Trav.java
1,676
@Service.Implementation( App.class ) public class Trav extends TransactionProvidingApp { private ScriptEngineViaReflection scripting; /** * Constructs a new command which can traverse the graph. */ public Trav() { this.addOptionDefinition( "o", new OptionDefinition( OptionValueTyp...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Trav.java
1,677
{ @Override public PathExpander reverse() { return this; } @Override public Iterable<Relationship> expand( Path path, BranchState state ) { return Collections.emptyList(); } };
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_TransactionProvidingApp.java
1,678
public abstract class TransactionProvidingApp extends AbstractApp { private static final Label[] EMPTY_LABELS = new Label[0]; protected static final String[] STANDARD_EVAL_IMPORTS = new String[] { "org.neo4j.graphdb", "org.neo4j.graphdb.event", "org.neo4j.graphdb.index", "org.ne...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_TransactionProvidingApp.java
1,679
private static class ValueTypeContext { private final Class<?> fundamentalClass; private final Class<?> boxClass; private final Class<?> fundamentalArrayClass; private final Class<?> boxArrayClass; ValueTypeContext( Class<?> fundamentalClass, Class<?> boxClass, ...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Set.java
1,680
private static class ValueType { private final ValueTypeContext context; private final boolean isArray; ValueType( ValueTypeContext context, boolean isArray ) { this.context = context; this.isArray = isArray; } }
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Set.java
1,681
@Service.Implementation( App.class ) public class Set extends TransactionProvidingApp { private static class ValueTypeContext { private final Class<?> fundamentalClass; private final Class<?> boxClass; private final Class<?> fundamentalArrayClass; private final Class<?> boxArrayC...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Set.java
1,682
public class ScriptEngineViaReflection { private static final String JAVAX_SCRIPT_SCRIPT_ENGINE_MANAGER = "javax.script.ScriptEngineManager"; private static final String JAVAX_SCRIPT_SCRIPT_CONTEXT = "javax.script.ScriptContext"; private final Object scriptEngineManager; private final int engineSco...
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_ScriptEngineViaReflection.java
1,683
{ @Override public boolean accept( IndexDefinition item ) { return item.getLabel().name().equals( label.name() ); } }, indexes );
false
community_shell_src_main_java_org_neo4j_shell_kernel_apps_Schema.java
1,684
class FakeShellServer extends GraphDatabaseShellServer { public FakeShellServer( GraphDatabaseAPI graphDb ) throws RemoteException { super( graphDb ); } public int getActiveTransactionCount() { return transactions.size(); } }
false
community_shell_src_test_java_org_neo4j_shell_TestTransactionApps.java
1,685
public class DontShutdownClient { public static void main( String[] args ) throws Exception { GraphDatabaseShellServer server = new GraphDatabaseShellServer( args[0], false, null ); new SameJvmClient( new HashMap<String, Serializable>(), server, /* Temporary, switch back to SilentOut...
false
community_shell_src_test_java_org_neo4j_shell_DontShutdownClient.java
1,686
public class TestEphemeralFileChannel { @Test public void smoke() throws Exception { EphemeralFileSystemAbstraction fs = new EphemeralFileSystemAbstraction(); StoreChannel channel = fs.open( new File( "yo" ), "rw" ); // Clear it because we depend on it to be zeros where we h...
false
community_kernel_src_test_java_org_neo4j_metatest_TestEphemeralFileChannel.java
1,687
@Ignore("This feature has to be done some other way") public class ExecutionTimeLimitTest { // ------------------------------ FIELDS ------------------------------ private WrappingNeoServerBootstrapper testBootstrapper; private InternalAbstractGraphDatabase db; private long wait; // ----------------------...
false
community_server_src_test_java_org_neo4j_server_web_ExecutionTimeLimitTest.java
1,688
public class StatisticRecord implements Serializable { private final long timeStamp; private final long period; private final long requests; private final StatisticData duration; private final StatisticData size; public StatisticRecord( long timeStamp, long period, long requests, ...
false
community_server_src_main_java_org_neo4j_server_statistic_StatisticRecord.java
1,689
public class StatisticFilter implements Filter { private final StatisticCollector collector; public StatisticFilter( final StatisticCollector collector ) { this.collector = collector; } @Override public void init( FilterConfig filterConfig ) throws ServletException { } @O...
false
community_server_src_main_java_org_neo4j_server_statistic_StatisticFilter.java
1,690
public class StatisticData implements Serializable { private static final long serialVersionUID = 1006656694124740870L; private static final int MEDIAN_MAX = 3000; private int[] requests = new int[MEDIAN_MAX]; private int count = 0; private double sum = 0; private double sumSq = 0; priv...
false
community_server_src_main_java_org_neo4j_server_statistic_StatisticData.java
1,691
public class StatisticCollector { private volatile long start = System.currentTimeMillis(); private volatile StatisticData currentSize = new StatisticData(); private volatile StatisticData currentDuration = new StatisticData(); private final AtomicLong count = new AtomicLong( 0l ); private Statistic...
false
community_server_src_main_java_org_neo4j_server_statistic_StatisticCollector.java
1,692
public class TestSslCertificateFactory { private File cPath; private File pkPath; @Test public void shouldCreateASelfSignedCertificate() throws Exception { SslCertificateFactory sslFactory = new SslCertificateFactory(); sslFactory.createSelfSignedCertificate( cPath, pkPath, "myhost"...
false
community_server_src_test_java_org_neo4j_server_security_TestSslCertificateFactory.java
1,693
public class SslSocketConnectorFactory extends HttpConnectorFactory { public ServerConnector createConnector( Server server, KeyStoreInformation config, String host, int port, int jettyMaxThreads ) { SslConnectionFactory sslConnectionFactory = createSslConnectionFactory( config ); return supe...
false
community_server_src_main_java_org_neo4j_server_security_SslSocketConnectorFactory.java
1,694
public class SslCertificateFactory { private static final String CERTIFICATE_TYPE = "X.509"; private static final String KEY_ENCRYPTION = "RSA"; { Security.addProvider(new BouncyCastleProvider()); } public void createSelfSignedCertificate(File certificatePath, File pri...
false
community_server_src_main_java_org_neo4j_server_security_SslCertificateFactory.java
1,695
public class KeyStoreInformation { private final String keyStorePath; private final char[] keyStorePassword; private final char[] keyPassword; public KeyStoreInformation(String keyStorePath, char[] keyStorePassword, char[] keyPassword) { this.keyStorePassword = keyStorePassword; th...
false
community_server_src_main_java_org_neo4j_server_security_KeyStoreInformation.java
1,696
public class KeyStoreFactoryTest { @Test public void shouldCreateKeyStoreForGivenKeyPair() throws Exception { // given File certificatePath = File.createTempFile( "cert", "test" ); File privateKeyPath = File.createTempFile( "privatekey", "test" ); File keyStorePath = File.cre...
false
community_server_src_test_java_org_neo4j_server_security_KeyStoreFactoryTest.java
1,697
public class KeyStoreFactory { private SslCertificateFactory sslCertificateFactory; public KeyStoreFactory() { this.sslCertificateFactory = new SslCertificateFactory(); } public KeyStoreInformation createKeyStore( File keyStorePath, File privateKeyPath, File certificatePath ) { ...
false
community_server_src_main_java_org_neo4j_server_security_KeyStoreFactory.java
1,698
public static class JavascriptJavaObject extends NativeJavaObject { public JavascriptJavaObject( Scriptable scope, Object javaObject, Class type ) { // we pass 'null' to object. NativeJavaObject uses // passed 'type' to reflect fields and methods when // objec...
false
community_server_src_main_java_org_neo4j_server_scripting_javascript_WhiteListJavaWrapper.java
1,699
public class WhiteListJavaWrapper extends WrapFactory { private final ClassShutter classShutter; public WhiteListJavaWrapper( ClassShutter classShutter ) { this.classShutter = classShutter; } public static class JavascriptJavaObject extends NativeJavaObject { public Javascript...
false
community_server_src_main_java_org_neo4j_server_scripting_javascript_WhiteListJavaWrapper.java