id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
47973088_1103
{ "fields": [ { "declarator": "NAMED_VIEW_NAME = \"namedViewName\"", "modifier": "private static final", "original_string": "private static final String NAMED_VIEW_NAME = \"namedViewName\";", "type": "String", "var_name": "NAMED_VIEW_NAME" }, { "declarator": "NESTED_NAM...
{ "body": "@Test\n public void shouldResolveNestedNamedViews() throws CacheOperationFailedException {\n // Given\n final NamedView nestedNamedView = new NamedView.Builder().name(NESTED_NAMED_VIEW_NAME).entity(TestGroups.ENTITY_2).build();\n final NamedViewDetail nestedNamedViewDetail = new Nam...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedViewCache cache;", "type": "NamedViewCache", "var_name": "cache" } ], "file": "core/graph/src/main/java/uk/gov/gchq/gaffer/graph/hook/NamedViewResolver.java", "identif...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n resolveViews(opChain, context);\n }", "class_method_signature": "NamedViewResolver.preExecute(final OperationChain<?> opChain, final Context context)", "constructor": false, "full_signature": "...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_982
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/FloatSerialiserTest.java", "identifier": "FloatSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Float>" }
{ "body": "@Test\n public void canSerialiseFloatClass() {\n assertTrue(serialiser.canHandle(Float.class));\n }", "class_method_signature": "FloatSerialiserTest.canSerialiseFloatClass()", "constructor": false, "full_signature": "@Test public void canSerialiseFloatClass()", "identifier": "canSerial...
{ "fields": [ { "declarator": "serialVersionUID = -4732565151514793209L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -4732565151514793209L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisat...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Float.class.equals(clazz);\n }", "class_method_signature": "FloatSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identifier": "...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1046
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/raw/RawDateSerialiserTest.java", "identifier": "RawDateSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Date>" }
{ "body": "@Test\n public void cantSerialiseStringClass() {\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "RawDateSerialiserTest.cantSerialiseStringClass()", "constructor": false, "full_signature": "@Test public void cantSerialiseStringClass()", "identifier": ...
{ "fields": [ { "declarator": "serialVersionUID = -1470994471883677977L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1470994471883677977L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisat...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Date.class.equals(clazz);\n }", "class_method_signature": "RawDateSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identifier": ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_594
{ "fields": [ { "declarator": "schema", "modifier": "private static", "original_string": "private static Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "serialiser", "modifier": "private static", "original_string": "private static...
{ "body": "@Test\n public void testDeserialiseEmpty() throws SerialisationException {\n assertEquals(null, serialiser.deserialiseEmpty());\n }", "class_method_signature": "GroupedPropertiesSerialiserTest.testDeserialiseEmpty()", "constructor": false, "full_signature": "@Test public void testDeseria...
{ "fields": [ { "declarator": "serialVersionUID = 3307260143698122796L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 3307260143698122796L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "strin...
{ "body": "@Override\n public GroupedProperties deserialiseEmpty() throws SerialisationException {\n return null;\n }", "class_method_signature": "GroupedPropertiesSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public GroupedProperties deserialiseEmpty()", "ide...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_351
{ "fields": [ { "declarator": "EDGE_AB = new Edge.Builder().group(TestGroups.EDGE).source(\"A\").dest(\"B\").directed(true).build()", "modifier": "private static final", "original_string": "private static final Edge EDGE_AB = new Edge.Builder().group(TestGroups.EDGE).source(\"A\").dest(\"B\").di...
{ "body": "@Test\n public void shouldReturnEntitiesFromWalkObject() {\n // Given\n final Function<Walk, Iterable<Set<Entity>>> function = new ExtractWalkEntities();\n final Walk walk = new Walk.Builder()\n .entity(ENTITY_A)\n .edge(EDGE_AB)\n .entit...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/graph/function/walk/ExtractWalkEntities.java", "identifier": "ExtractWalkEntities", "interfaces": "", "methods": [ { "class_method_signature": "ExtractWalkEntities.apply(final Walk walk)", "constructor": false, "ful...
{ "body": "@Override\n public Iterable<Set<Entity>> apply(final Walk walk) {\n if (null == walk) {\n throw new IllegalArgumentException(\"Walk cannot be null\");\n }\n return walk.getEntities();\n }", "class_method_signature": "ExtractWalkEntities.apply(final Walk walk)", "co...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_701
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/compare/MinHandlerTest.java", "identifier": "MinHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldFindMinBasedOnMultipleProperties() throws OperationException {\n // Given\n final Entity entity1 = makeEntity(1, 1);\n final Entity entity2 = makeEntity(1, 2);\n final Entity entity3 = makeEntity(2, 2);\n final Entity entity4 = makeEntity(2, 1...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/compare/MinHandler.java", "identifier": "MinHandler", "interfaces": "implements OutputOperationHandler<Min, Element>", "methods": [ { "class_method_signature": "MinHandler.doOperation(final Min operation, fi...
{ "body": "@Override\n public Element doOperation(final Min operation, final Context context, final Store store) throws OperationException {\n // If there is no input or there are no comparators, we return null\n if (null == operation.getInput()\n || null == operation.getComparators()\...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_63
{ "fields": [ { "declarator": "EXPECTED_GRAPH_ID = \"testGraphID\"", "modifier": "private static final", "original_string": "private static final String EXPECTED_GRAPH_ID = \"testGraphID\";", "type": "String", "var_name": "EXPECTED_GRAPH_ID" } ], "file": "store-implementation...
{ "body": "@Test\n @Override\n public void builderShouldCreatePopulatedOperation() {\n RemoveGraph op = new Builder()\n .graphId(EXPECTED_GRAPH_ID)\n .build();\n\n assertEquals(EXPECTED_GRAPH_ID, op.getGraphId());\n }", "class_method_signature": "RemoveGraphTest....
{ "fields": [ { "declarator": "graphId", "modifier": "@Required\n private", "original_string": "@Required\n private String graphId;", "type": "String", "var_name": "graphId" }, { "declarator": "options", "modifier": "private", "original_string": "priva...
{ "body": "public String getGraphId() {\n return graphId;\n }", "class_method_signature": "RemoveGraph.getGraphId()", "constructor": false, "full_signature": "public String getGraphId()", "identifier": "getGraphId", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Str...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_214
{ "fields": [ { "declarator": "SCHEMA = Schema.fromJson(StreamUtil.schemas(HBaseStoreTest.class))", "modifier": "private static final", "original_string": "private static final Schema SCHEMA = Schema.fromJson(StreamUtil.schemas(HBaseStoreTest.class));", "type": "Schema", "var_name": ...
{ "body": "@Test\n public void shouldCreateAStoreUsingGraphIdIfItIsEqualToTableName() throws Exception {\n // Given\n final HBaseProperties properties = HBaseProperties.loadStoreProperties(StreamUtil.storeProps(HBaseStoreTest.class));\n properties.setTable(\"tableName\");\n final Single...
{ "fields": [ { "declarator": "TRAITS =\n Collections.unmodifiableSet(Sets.newHashSet(\n ORDERED,\n VISIBILITY,\n PRE_AGGREGATION_FILTERING,\n POST_AGGREGATION_FILTERING,\n POST_TRANSFORMATION_FILTERING...
{ "body": "@Override\n public void initialise(final String graphId, final Schema schema, final StoreProperties properties)\n throws StoreException {\n preInitialise(graphId, schema, properties);\n TableUtils.ensureTableExists(this);\n }", "class_method_signature": "HBaseStore.initiali...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_644
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/StorePropertiesTest.java", "identifier": "StorePropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetUnknownProperty() {\n // Given\n final StoreProperties props = createStoreProperties();\n\n // When\n String value = props.get(\"a key that does not exist\");\n\n // Then\n assertNull(value);\n }", "class_method_signature": "Sto...
{ "fields": [ { "declarator": "STORE_CLASS = \"gaffer.store.class\"", "modifier": "public static final", "original_string": "public static final String STORE_CLASS = \"gaffer.store.class\";", "type": "String", "var_name": "STORE_CLASS" }, { "declarator": "SCHEMA_CLASS =...
{ "body": "public String get(final String key) {\n return props.getProperty(key);\n }", "class_method_signature": "StoreProperties.get(final String key)", "constructor": false, "full_signature": "public String get(final String key)", "identifier": "get", "invocations": [ "getProperty" ], "...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_994
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/util/JsonSerialisationUtilTest.java", "identifier": "JsonSerialisationUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testClassWithTypeParamAndOtherField() {\n // Given\n final String classWithTypeParamAndOtherFieldName = ClassWithTypeParamAndOtherField.class.getName();\n\n // When\n final Map<String, String> result =\n JsonSerialisationUtil.getSerialisedFi...
{ "fields": [ { "declarator": "cache = Collections.emptyMap()", "modifier": "private static", "original_string": "private static Map<String, Map<String, String>> cache = Collections.emptyMap();", "type": "Map<String, Map<String, String>>", "var_name": "cache" } ], "file": "co...
{ "body": "public static Map<String, String> getSerialisedFieldClasses(final String className) {\n final Map<String, String> cachedResult = cache.get(className);\n if (null != cachedResult) {\n return cachedResult;\n }\n\n final Class<?> clazz;\n try {\n clazz ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1115
{ "fields": [ { "declarator": "OP_AUTHS_PATH = \"/opAuthoriser.json\"", "modifier": "private static final", "original_string": "private static final String OP_AUTHS_PATH = \"/opAuthoriser.json\";", "type": "String", "var_name": "OP_AUTHS_PATH" }, { "declarator": "USER =...
{ "body": "@Test\n public void shouldRejectOperationChainWhenUserDoesntHaveSuperAuthForAddNamedOperation() {\n // Given\n final OperationAuthoriser hook = fromJson(OP_AUTHS_PATH);\n final AddNamedOperation addNamedOperation = new AddNamedOperation.Builder()\n .operationChain(\"{...
{ "fields": [ { "declarator": "allAuths = new HashSet<>()", "modifier": "private final", "original_string": "private final Set<String> allAuths = new HashSet<>();", "type": "Set<String>", "var_name": "allAuths" }, { "declarator": "auths = new HashMap<>()", "modifi...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n if (null != opChain) {\n for (final Operation operation : opChain.getOperations()) {\n authorise(operation, context.getUser());\n }\n authorise(opChain, c...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_428
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/UnwrapEntityIdTest.java", "identifier": "UnwrapEntityIdTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldReturnNullForNullValue() {\n // Given\n final UnwrapEntityId function = new UnwrapEntityId();\n\n // When\n final Object result = function.apply(null);\n\n // Then\n assertNull(result);\n }", "class_method_signature": "UnwrapEntity...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/function/UnwrapEntityId.java", "identifier": "UnwrapEntityId", "interfaces": "", "methods": [ { "class_method_signature": "UnwrapEntityId.apply(final Object item)", "constructor": false, "full_signature": "@...
{ "body": "@Override\n public Object apply(final Object item) {\n return null != item ? item instanceof EntityId ? ((EntityId) item).getVertex() : item : null;\n }", "class_method_signature": "UnwrapEntityId.apply(final Object item)", "constructor": false, "full_signature": "@Override public Object...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_582
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/types/function/ToTypeSubTypeValueTest.java", "identifier": "ToTypeSubTypeValueTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldConvertObjectToTypeSubTypeValue() {\n // Given\n final ToTypeSubTypeValue function = new ToTypeSubTypeValue();\n final Object value = 1L;\n\n // When\n final TypeSubTypeValue result = function.apply(value);\n\n // Then\n assertEq...
{ "fields": [], "file": "core/type/src/main/java/uk/gov/gchq/gaffer/types/function/ToTypeSubTypeValue.java", "identifier": "ToTypeSubTypeValue", "interfaces": "", "methods": [ { "class_method_signature": "ToTypeSubTypeValue.apply(final Object value)", "constructor": false, "full_signatur...
{ "body": "@Override\n public TypeSubTypeValue apply(final Object value) {\n return new TypeSubTypeValue(null, null, null != value ? value.toString() : null);\n }", "class_method_signature": "ToTypeSubTypeValue.apply(final Object value)", "constructor": false, "full_signature": "@Override public Ty...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1050
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/raw/RawLongSerialiserTest.java", "identifier": "RawLongSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Long>" }
{ "body": "@Test\n public void canSerialiseLongClass() {\n assertTrue(serialiser.canHandle(Long.class));\n }", "class_method_signature": "RawLongSerialiserTest.canSerialiseLongClass()", "constructor": false, "full_signature": "@Test public void canSerialiseLongClass()", "identifier": "canSerialis...
{ "fields": [ { "declarator": "serialVersionUID = 369129707952407270L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 369129707952407270L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisation/...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Long.class.equals(clazz);\n }", "class_method_signature": "RawLongSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identifier": ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1284
{ "fields": [ { "declarator": "cache", "modifier": "private static", "original_string": "private static HazelcastCache<String, Integer> cache;", "type": "HazelcastCache<String, Integer>", "var_name": "cache" } ], "file": "library/cache-library/hazelcast-cache-service/src/test...
{ "body": "@Test\n public void shouldThrowExceptionWhenAddingNullKeyToCache() {\n try {\n cache.put(null, 2);\n fail(\"Expected an exception\");\n } catch (final CacheOperationException e) {\n assertNotNull(e.getMessage());\n }\n }", "class_method_signatur...
{ "fields": [ { "declarator": "distributedMap", "modifier": "private final", "original_string": "private final IMap<K, V> distributedMap;", "type": "IMap<K, V>", "var_name": "distributedMap" } ], "file": "library/cache-library/hazelcast-cache-service/src/main/java/uk/gov/gchq...
{ "body": "@Override\n public void put(final K key, final V value) throws CacheOperationException {\n try {\n distributedMap.put(key, value);\n } catch (final Exception e) {\n throw new CacheOperationException(e);\n }\n }", "class_method_signature": "HazelcastCache.p...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_756
{ "fields": [ { "declarator": "store = mock(Store.class)", "modifier": "private final", "original_string": "private final Store store = mock(Store.class);", "type": "Store", "var_name": "store" }, { "declarator": "key1 = \"key1\"", "modifier": "private final", ...
{ "body": "@Test\n public void shouldGetAllVariableValuesWhenAllPresent() throws OperationException {\n final Context context = mock(Context.class);\n // Given\n given(context.getVariable(key1)).willReturn(val1);\n given(context.getVariable(key2)).willReturn(val2);\n given(contex...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/GetVariablesHandler.java", "identifier": "GetVariablesHandler", "interfaces": "implements OperationHandler<GetVariables>", "methods": [ { "class_method_signature": "GetVariablesHandler.doOperation(final GetV...
{ "body": "@Override\n public Map<String, Object> doOperation(final GetVariables operation, final Context context, final Store store) throws OperationException {\n final Map<String, Object> variableMap = new HashMap<>();\n List<String> variableNames = operation.getVariableNames() != null ? operation....
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_306
{ "fields": [ { "declarator": "READ_ACCESS_PREDICATE = new AccessPredicate(new CustomUserPredicate())", "modifier": "private static final", "original_string": "private static final AccessPredicate READ_ACCESS_PREDICATE = new AccessPredicate(new CustomUserPredicate());", "type": "AccessPred...
{ "body": "@Test\n public void shouldConfigureUnrestrictedAccessPredicateForReadAccessTestByDefault() {\n final NamedViewDetail namedViewDetail = createNamedViewDetailBuilder().build();\n assertEquals(\n new UnrestrictedAccessPredicate(),\n namedViewDetail.getReadAccessP...
{ "fields": [ { "declarator": "serialVersionUID = -8354836093398004122L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8354836093398004122L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "CHA...
{ "body": "public AccessPredicate getReadAccessPredicate() {\n return readAccessPredicate != null ? deserialise(readAccessPredicate) : null;\n }", "class_method_signature": "NamedViewDetail.getReadAccessPredicate()", "constructor": false, "full_signature": "public AccessPredicate getReadAccessPredicat...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_613
{ "fields": [ { "declarator": "schema", "modifier": "private static", "original_string": "private static Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "serialiser", "modifier": "private static", "original_string": "private static...
{ "body": "@Test\n public void testCanSerialiseEdgeClass() throws SerialisationException {\n assertTrue(serialiser.canHandle(Edge.class));\n }", "class_method_signature": "EdgeSerialiserTest.testCanSerialiseEdgeClass()", "constructor": false, "full_signature": "@Test public void testCanSerialiseEdg...
{ "fields": [ { "declarator": "serialVersionUID = 2205438497836765935L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 2205438497836765935L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "boole...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Edge.class.isAssignableFrom(clazz);\n }", "class_method_signature": "EdgeSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identi...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_243
{ "fields": [ { "declarator": "GRAPH_ID = \"graphId\"", "modifier": "private static final", "original_string": "private static final String GRAPH_ID = \"graphId\";", "type": "String", "var_name": "GRAPH_ID" }, { "declarator": "service", "modifier": "@InjectMocks\n...
{ "body": "@Test\n public void shouldGetNextOperations() throws IOException {\n // Given\n final Set<Class<? extends Operation>> expectedNextOperations = mock(Set.class);\n lenient().when(store.getNextOperations(GetElements.class)).thenReturn(expectedNextOperations);\n\n // When\n ...
{ "fields": [ { "declarator": "graphFactory", "modifier": "@Inject\n private", "original_string": "@Inject\n private GraphFactory graphFactory;", "type": "GraphFactory", "var_name": "graphFactory" }, { "declarator": "userFactory", "modifier": "@Inject\n p...
{ "body": "@Override\n public Set<Class> getNextOperations(final String operationClassName) {\n Class<? extends Operation> opClass;\n try {\n opClass = Class.forName(SimpleClassNameIdResolver.getClassName(operationClassName)).asSubclass(Operation.class);\n } catch (final ClassNotFou...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_34
{ "fields": [ { "declarator": "ID_SCHEMA_ENTITY = \"basicEntitySchema\"", "modifier": "public static final", "original_string": "public static final String ID_SCHEMA_ENTITY = \"basicEntitySchema\";", "type": "String", "var_name": "ID_SCHEMA_ENTITY" }, { "declarator": "I...
{ "body": "@Test\n public void shouldReturnSpecificGraphsFromCSVString() throws Exception {\n // Given\n final List<Collection<GraphSerialisable>> graphLists = populateGraphs(1, 2, 4);\n final Collection<GraphSerialisable> expectedGraphs = graphLists.get(0);\n final Collection<GraphSeri...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Store.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Store.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": ...
{ "body": "public Collection<Graph> getGraphs(final User user, final String graphIdsCsv, final Operation operation) {\n Collection<Graph> rtn = new ArrayList<>();\n if (nonNull(operation)) {\n String optionKey = FEDERATED_STORE_PROCESSED + id;\n boolean isIdFound = !operation.getOp...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_490
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/StringUtilTest.java", "identifier": "StringUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void unescapeCommaShouldNotRemoveComma() {\n assertEquals(\"don'tRemove,Comma\", StringUtil.unescapeComma(\"don'tRemove,Comma\"));\n }", "class_method_signature": "StringUtilTest.unescapeCommaShouldNotRemoveComma()", "constructor": false, "full_signature": "@Test public vo...
{ "fields": [ { "declarator": "COMMA = ','", "modifier": "public static final", "original_string": "public static final char COMMA = ',';", "type": "char", "var_name": "COMMA" }, { "declarator": "ESCAPE_CHAR = '\\\\'", "modifier": "private static final", "or...
{ "body": "public static String unescapeComma(final String escapedStr) {\n final StringBuilder str = new StringBuilder(escapedStr.length());\n boolean isEscaped = false;\n for (int i = 0; i < escapedStr.length(); i++) {\n char c = escapedStr.charAt(i);\n if (isEscaped) {\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_869
{ "fields": [ { "declarator": "cache", "modifier": "private static", "original_string": "private static NamedOperationCache cache;", "type": "NamedOperationCache", "var_name": "cache" }, { "declarator": "GAFFER_USER = \"gaffer user\"", "modifier": "private static ...
{ "body": "@Test\n public void shouldThrowExceptionIfUnauthorisedUserTriesToOverwriteOperation() throws CacheOperationFailedException {\n cache.addNamedOperation(alternative, false, advancedUser);\n assertThrows(CacheOperationFailedException.class, () -> cache.addNamedOperation(standard, true, standa...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NamedOperationCache.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NamedOperationCache.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "public void addNamedOperation(final NamedOperationDetail namedOperation, final boolean overwrite, final User user) throws CacheOperationFailedException {\n add(namedOperation, overwrite, user, null);\n }", "class_method_signature": "NamedOperationCache.addNamedOperation(final NamedOperationDeta...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1142
{ "fields": [ { "declarator": "validEdge = new Edge.Builder()\n .group(\"result\")\n .source(\"jobId\")\n .dest(\"exportId\")\n .directed(true)\n .property(\"opAuths\", CollectionUtil.treeSet(\"user01\"))\n .property(\"timestamp\", System.cur...
{ "body": "@Test\n public void shouldThrowExceptionIfStorePropertiesAreNull() {\n // When / Then\n try {\n GafferResultCacheUtil.createGraph(\"graphId\", null, GafferResultCacheUtil.DEFAULT_TIME_TO_LIVE);\n fail(\"Exception expected\");\n } catch (final IllegalArgumentExc...
{ "fields": [ { "declarator": "ONE_DAY_IN_MILLISECONDS = 24 * 60 * 60 * 1000L", "modifier": "public static final", "original_string": "public static final long ONE_DAY_IN_MILLISECONDS = 24 * 60 * 60 * 1000L;", "type": "long", "var_name": "ONE_DAY_IN_MILLISECONDS" }, { "...
{ "body": "public static Graph createGraph(final String graphId, final String cacheStorePropertiesPath, final Long timeToLive) {\n if (null == cacheStorePropertiesPath) {\n throw new IllegalArgumentException(\"Gaffer result cache Store properties are required\");\n }\n\n final Graph.Bu...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1007
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/ordered/OrderedLongSerialiserTest.java", "identifier": "OrderedLongSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Long>" }
{ "body": "@Test\n public void cantSerialiseStringClass() {\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "OrderedLongSerialiserTest.cantSerialiseStringClass()", "constructor": false, "full_signature": "@Test public void cantSerialiseStringClass()", "identifie...
{ "fields": [ { "declarator": "serialVersionUID = -8948380879926929233L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8948380879926929233L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisat...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Long.class.equals(clazz);\n }", "class_method_signature": "OrderedLongSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identifie...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_886
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/ElementValidatorTest.java", "identifier": "ElementValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFalseWhenSchemaValidateWithInvalidElement() {\n // Given\n final Schema schema = mock(Schema.class);\n final String group = TestGroups.EDGE;\n final Element elm = mock(Element.class);\n final SchemaElementDefinition elementDef = mock(Sch...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ElementValidator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ElementValidator.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public boolean validate(final Element element) {\n if (null == element) {\n return false;\n }\n\n if (null != schema) {\n return validateWithSchema(element);\n }\n\n if (null != view) {\n return validateAgainstViewFilter(ele...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_185
{ "fields": [ { "declarator": "SCHEMA = new Schema.Builder()\n .type(\"string\", new TypeDefinition.Builder()\n .clazz(String.class)\n .aggregateFunction(new StringConcat())\n .build())\n .type(\"type\", Boolean.class)\n ...
{ "body": "@Test\n public void shouldThrowErrorWhenInvalidExtras() throws OperationException, IOException {\n // Given\n final Scan scan = mock(Scan.class);\n given(scan.getAttribute(HBaseStoreConstants.VIEW)).willReturn(null);\n given(scan.getAttribute(HBaseStoreConstants.EXTRA_PROCESS...
{ "fields": [], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasestore/coprocessor/scanner/QueryScanner.java", "identifier": "QueryScanner", "interfaces": "implements RegionScanner", "methods": [ { "class_method_signature": "QueryScanner.QueryScanner(final RegionScanne...
{ "body": "protected static List<GafferScannerProcessor> createProcessors(\n final Scan scan,\n final Schema schema,\n final ElementSerialisation serialisation) {\n final List<GafferScannerProcessor> processors = new ArrayList<>();\n final Set<Class<? extends GafferScann...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_408
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ElementAggregatorTest.java", "identifier": "ElementAggregatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldAggregateWithNoPropertiesOrFunctions() {\n // Given\n final ElementAggregator aggregator = new ElementAggregator();\n final Edge edge1 = new Edge.Builder().group(\"group\").build();\n final Edge edge2 = new Edge.Builder().group(\"group\").build();\n\...
{ "fields": [ { "declarator": "stateTuple = new PropertiesTuple()", "modifier": "private final", "original_string": "private final PropertiesTuple stateTuple = new PropertiesTuple();", "type": "PropertiesTuple", "var_name": "stateTuple" }, { "declarator": "propertiesTup...
{ "body": "public Element apply(final Element state, final Element element) {\n if (null == state) {\n return element;\n }\n\n apply(state.getProperties(), element.getProperties());\n return state;\n }", "class_method_signature": "ElementAggregator.apply(final Element state...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1070
{ "fields": [ { "declarator": "GRAPH_ID = \"graphId\"", "modifier": "private static final", "original_string": "private static final String GRAPH_ID = \"graphId\";", "type": "String", "var_name": "GRAPH_ID" }, { "declarator": "SCHEMA_ID_1 = \"schemaId1\"", "modifi...
{ "body": "@Test\n public void shouldAddHookFromPathAndGetGraphHooks() throws Exception {\n // Given\n final StoreProperties storeProperties = new StoreProperties();\n storeProperties.setStoreClass(TestStoreImpl.class.getName());\n\n final File graphHook1File = tempDir.resolve(\"opChain...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Graph.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Graph.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": ...
{ "body": "public List<Class<? extends GraphHook>> getGraphHooks() {\n if (config.getHooks().isEmpty()) {\n return Collections.emptyList();\n }\n\n return (List) config.getHooks().stream().map(GraphHook::getClass).collect(Collectors.toList());\n }", "class_method_signature": "Grap...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1135
{ "fields": [], "file": "core/graph/src/test/java/uk/gov/gchq/gaffer/graph/hook/NamedOperationResolverTest.java", "identifier": "NamedOperationResolverTest", "interfaces": "", "superclass": "extends GraphHookTest<NamedOperationResolver>" }
{ "body": "@Test\n public void shouldNotExecuteNamedOperationWithWrongParameterName() throws OperationException, CacheOperationFailedException {\n // Given\n final String opName = \"opName\";\n final NamedOperationCache cache = mock(NamedOperationCache.class);\n final NamedOperationReso...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedOperationCache cache;", "type": "NamedOperationCache", "var_name": "cache" } ], "file": "core/graph/src/main/java/uk/gov/gchq/gaffer/graph/hook/NamedOperationResolver.ja...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n resolveNamedOperations(opChain, context.getUser());\n }", "class_method_signature": "NamedOperationResolver.preExecute(final OperationChain<?> opChain, final Context context)", "constructor": fal...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_43
{ "fields": [], "file": "store-implementation/federated-store/src/test/java/uk/gov/gchq/gaffer/federatedstore/operation/FederatedOperationChainTest.java", "identifier": "FederatedOperationChainTest", "interfaces": "", "superclass": "extends OperationTest<FederatedOperationChain>" }
{ "body": "@Test\n @Override\n public void builderShouldCreatePopulatedOperation() {\n // Given\n final OperationChain<CloseableIterable<? extends Element>> opChain = new OperationChain.Builder()\n .first(new GetAllElements())\n .build();\n\n // When\n f...
{ "fields": [ { "declarator": "operationChain", "modifier": "@Required\n private", "original_string": "@Required\n private OperationChain operationChain;", "type": "OperationChain", "var_name": "operationChain" }, { "declarator": "options", "modifier": "priv...
{ "body": "@JsonIgnore\n public OperationChain getOperationChain() {\n return operationChain;\n }", "class_method_signature": "FederatedOperationChain.getOperationChain()", "constructor": false, "full_signature": "@JsonIgnore public OperationChain getOperationChain()", "identifier": "getOperation...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_234
{ "fields": [ { "declarator": "GRAPH_ID = \"graphId\"", "modifier": "private static final", "original_string": "private static final String GRAPH_ID = \"graphId\";", "type": "String", "var_name": "GRAPH_ID" }, { "declarator": "service", "modifier": "@InjectMocks\n...
{ "body": "@Test\n public void shouldGetTransformFunctions() {\n // When\n final Set<Class> classes = (Set<Class>) service.getTransformFunctions().getEntity();\n\n // Then\n assertFalse(classes.isEmpty());\n }", "class_method_signature": "GraphConfigurationServiceV2Test.shouldGetTr...
{ "fields": [ { "declarator": "graphFactory", "modifier": "@Inject\n private", "original_string": "@Inject\n private GraphFactory graphFactory;", "type": "GraphFactory", "var_name": "graphFactory" }, { "declarator": "userFactory", "modifier": "@Inject\n p...
{ "body": "@Override\n public Response getTransformFunctions() {\n return Response.ok(ReflectionUtil.getSubTypes(Function.class))\n .header(GAFFER_MEDIA_TYPE_HEADER, GAFFER_MEDIA_TYPE)\n .build();\n }", "class_method_signature": "GraphConfigurationServiceV2.getTransformFun...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_664
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/resolver/IfScoreResolverTest.java", "identifier": "IfScoreResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetScoreWithFullyPopulatedOperation() {\n // Given\n final Count count = mock(Count.class);\n final GetAllElements getAllElements = mock(GetAllElements.class);\n final GetWalks getWalks = mock(GetWalks.class);\n final Conditional conditional =...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(IfScoreResolver.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(IfScoreResolver.class);", "type": "Logger", "var_name": "LOGGER" } ], ...
{ "body": "@Override\n public Integer getScore(final If operation) {\n throw new UnsupportedOperationException(\"Default Score Resolver has not been provided.\");\n }", "class_method_signature": "IfScoreResolver.getScore(final If operation)", "constructor": false, "full_signature": "@Override publi...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_371
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/comparison/ComparableOrToStringComparatorTest.java", "identifier": "ComparableOrToStringComparatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCompareEqualIntegerArrays() {\n final ComparableOrToStringComparator comparator = new ComparableOrToStringComparator();\n\n final int result = comparator.compare(new Integer[] {1, 2}, new Integer[] {1, 2});\n\n assertEquals(0, result);\n }", "class_met...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/comparison/ComparableOrToStringComparator.java", "identifier": "ComparableOrToStringComparator", "interfaces": "implements Comparator<Object>, Serializable", "methods": [ { "class_method_signature": "ComparableOrToStrin...
{ "body": "@Override\n public int compare(final Object vertex1, final Object vertex2) {\n if (null == vertex1) {\n if (null == vertex2) {\n return 0;\n }\n return 1;\n }\n\n if (null == vertex2) {\n return -1;\n }\n\n if ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_721
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/SetVariableHandlerTest.java", "identifier": "SetVariableHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void setTwoVarsWithoutFailure() throws OperationException {\n // Given\n final Context context = new Context(new User());\n final Store store = mock(Store.class);\n final String varName = \"testVarName\";\n final String varVal = \"varVal\";\n fina...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/SetVariableHandler.java", "identifier": "SetVariableHandler", "interfaces": "implements OperationHandler<SetVariable>", "methods": [ { "class_method_signature": "SetVariableHandler.doOperation(final SetVaria...
{ "body": "@Override\n public Void doOperation(final SetVariable operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getVariableName()) {\n throw new IllegalArgumentException(\"Variable name cannot be null\");\n }\n\n if (null == ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1359
{ "fields": [ { "declarator": "DELTA = 0.00001D", "modifier": "private static final", "original_string": "private static final double DELTA = 0.00001D;", "type": "double", "var_name": "DELTA" }, { "declarator": "hllSketchWithCardinality5", "modifier": "private sta...
{ "body": "@Test\n public void shouldAcceptWhenLessThan() {\n // Given\n final HllSketchIsLessThan filter = new HllSketchIsLessThan(15);\n // When\n boolean accepted = filter.test(hllSketchWithCardinality5);\n // Then\n assertTrue(accepted);\n }", "class_method_signat...
{ "fields": [ { "declarator": "controlValue", "modifier": "private", "original_string": "private long controlValue;", "type": "long", "var_name": "controlValue" }, { "declarator": "orEqualTo", "modifier": "private", "original_string": "private boolean orEqua...
{ "body": "@Override\n public boolean test(final HllSketch input) {\n if (null == input) {\n return false;\n }\n final long cardinality = Math.round(input.getEstimate());\n if (orEqualTo) {\n return cardinality <= controlValue;\n } else {\n return...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1027
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/NullSerialiserTest.java", "identifier": "NullSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Object>" }
{ "body": "@Test\n @Override\n public void shouldDeserialiseEmpty() throws SerialisationException {\n assertNull(serialiser.deserialiseEmpty());\n }", "class_method_signature": "NullSerialiserTest.shouldDeserialiseEmpty()", "constructor": false, "full_signature": "@Test @Override public void sho...
{ "fields": [ { "declarator": "serialVersionUID = 282624951140644367L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 282624951140644367L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisation/...
{ "body": "@Override\n public Object deserialiseEmpty() {\n return null;\n }", "class_method_signature": "NullSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public Object deserialiseEmpty()", "identifier": "deserialiseEmpty", "invocations": [], "modifiers":...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_849
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/job/GetAllJobDetailsHandlerTest.java", "identifier": "GetAllJobDetailsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetAllJobDetailsByDelegatingToJobTracker() throws OperationException {\n // Given\n final GetAllJobDetailsHandler handler = new GetAllJobDetailsHandler();\n final GetAllJobDetails operation = mock(GetAllJobDetails.class);\n final Store store = mock(S...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/job/GetAllJobDetailsHandler.java", "identifier": "GetAllJobDetailsHandler", "interfaces": "implements OutputOperationHandler<GetAllJobDetails, CloseableIterable<JobDetail>>", "methods": [ { "class_method_sig...
{ "body": "@Override\n public CloseableIterable<JobDetail> doOperation(final GetAllJobDetails operation, final Context context, final Store store) throws OperationException {\n if (null == store.getJobTracker()) {\n throw new OperationException(\"The Job Tracker has not been configured\", SERVICE...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1162
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/util/OperationUtilTest.java", "identifier": "OperationUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConvertFromElementIds() {\n // Given\n final Iterable<ElementId> input = Arrays.asList(\n new EntitySeed(1),\n new EntitySeed(\"2\"),\n new EntitySeed(\"3\"),\n new Entity(\"group\", \"4\"),\n ...
{ "fields": [], "file": "core/operation/src/main/java/uk/gov/gchq/gaffer/operation/util/OperationUtil.java", "identifier": "OperationUtil", "interfaces": "", "methods": [ { "class_method_signature": "OperationUtil.OperationUtil()", "constructor": true, "full_signature": "private Operati...
{ "body": "public static Iterable<?> fromElementIds(final Iterable<? extends ElementId> input) {\n if (null == input) {\n return null;\n }\n return IterableUtil.map(input, new FromElementId());\n }", "class_method_signature": "OperationUtil.fromElementIds(final Iterable<? extends ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_633
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/SerialisationFactoryTest.java", "identifier": "SerialisationFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnSerialiserForAString() throws SerialisationException {\n // Given\n final SerialisationFactory factory = new SerialisationFactory();\n final Class<?> clazz = String.class;\n\n // When\n final Serialiser serialiser = factory.getSerialiser...
{ "fields": [ { "declarator": "serialisers", "modifier": "private final", "original_string": "private final List<Serialiser> serialisers;", "type": "List<Serialiser>", "var_name": "serialisers" }, { "declarator": "LAST_RESORT_FINALISER = new JavaSerialiser()", "mo...
{ "body": "public Serialiser getSerialiser(final Class<?> objClass) {\n return getSerialiser(objClass, false, false);\n }", "class_method_signature": "SerialisationFactory.getSerialiser(final Class<?> objClass)", "constructor": false, "full_signature": "public Serialiser getSerialiser(final Class<?> o...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_263
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/IsEdgeValidatorTest.java", "identifier": "IsEdgeValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidateWhenEdge() {\n final Element element = new Edge.Builder()\n .group(TestGroups.EDGE)\n .build();\n\n final boolean valid = new IsEdgeValidator().validate(element);\n\n assertTrue(valid);\n }", "class_method_signatur...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/IsEdgeValidator.java", "identifier": "IsEdgeValidator", "interfaces": "implements Validator<Element>", "methods": [ { "class_method_signature": "IsEdgeValidator.validate(final Element element)", "constructor": false, ...
{ "body": "@Override\n public boolean validate(final Element element) {\n return element instanceof Edge;\n }", "class_method_signature": "IsEdgeValidator.validate(final Element element)", "constructor": false, "full_signature": "@Override public boolean validate(final Element element)", "identif...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_799
{ "fields": [ { "declarator": "SCHEMA = new Schema.Builder()\n .edge(TestGroups.EDGE, new SchemaEdgeDefinition())\n .edge(TestGroups.EDGE_2, new SchemaEdgeDefinition())\n .entity(TestGroups.ENTITY, new SchemaEntityDefinition())\n .entity(TestGroups.ENTITY_2, new S...
{ "body": "@Test\n public void shouldFailValidationWhenSchemaElementDefinitionsAreNull() {\n // Given\n given(store.getSchema()).willReturn(new Schema());\n\n final Edge edge = new Edge.Builder()\n .group(TestGroups.EDGE)\n .source(\"junctionA\")\n ...
{ "fields": [ { "declarator": "validator = new FilterValidator()", "modifier": "private final", "original_string": "private final FunctionValidator<Filter> validator = new FilterValidator();", "type": "FunctionValidator<Filter>", "var_name": "validator" } ], "file": "core/sto...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final Filter operation, final Context context, final Store store) throws OperationException {\n return doOperation(operation, store.getSchema());\n }", "class_method_signature": "FilterHandler.doOperation(final Filter operation, fina...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_14
{ "fields": [], "file": "store-implementation/federated-store/src/test/java/uk/gov/gchq/gaffer/federatedstore/util/FederatedStoreUtilTest.java", "identifier": "FederatedStoreUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetEmptyStringsWhenEmptyCsv() {\n // Given\n final String csv = \"\";\n\n // When\n final List<String> values = FederatedStoreUtil.getCleanStrings(csv);\n\n // Then\n assertEquals(Collections.emptyList(), values);\n }", "class_meth...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(FederatedStoreUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FederatedStoreUtil.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "public static List<String> getCleanStrings(final String value) {\n final List<String> values;\n if (value != null) {\n values = Lists.newArrayList(StringUtils.stripAll(value.split(SCHEMA_DEL_REGEX)));\n values.removeAll(STRINGS_TO_REMOVE);\n } else {\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_776
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/ScoreOperationChainHandlerTest.java", "identifier": "ScoreOperationChainHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldAddDefaultScoreResolvers() {\n // Given\n final Map<Class<? extends Operation>, ScoreResolver> defaultResolvers = ScoreOperationChainHandler.getDefaultScoreResolvers();\n\n // When / Then\n assertTrue(defaultResolvers.keySet().contains(NamedOperation...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ScoreOperationChainHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ScoreOperationChainHandler.class);", "type": "Logger", "var_name": ...
{ "body": "public static Map<Class<? extends Operation>, ScoreResolver> getDefaultScoreResolvers() {\n return Collections.unmodifiableMap(DEFAULT_SCORE_RESOLVERS);\n }", "class_method_signature": "ScoreOperationChainHandler.getDefaultScoreResolvers()", "constructor": false, "full_signature": "public s...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_326
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/graph/adjacency/AdjacencyMapTest.java", "identifier": "AdjacencyMapTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetEmptyEdgeSet() {\n final AdjacencyMap adjacencyMap = getAdjacencyMap();\n\n final Set<Edge> results = adjacencyMap.getEdges(1, 6);\n\n assertThat(results, is(empty()));\n }", "class_method_signature": "AdjacencyMapTest.shouldGetEmptyEdgeSet()", "c...
{ "fields": [ { "declarator": "edgeGraph = HashBasedTable.create()", "modifier": "private final", "original_string": "private final HashBasedTable<Object, Object, Set<Edge>> edgeGraph = HashBasedTable.create();", "type": "HashBasedTable<Object, Object, Set<Edge>>", "var_name": "edgeG...
{ "body": "public Set<Edge> getEdges(final Object source, final Object destination) {\n final Set<Edge> results = edgeGraph.get(source, destination);\n return null != results ? results : Collections.emptySet();\n }", "class_method_signature": "AdjacencyMap.getEdges(final Object source, final Object...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_449
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/IsElementValidatorTest.java", "identifier": "IsElementValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidateWhenEdge() {\n final Element element = new Edge.Builder()\n .group(TestGroups.EDGE)\n .build();\n\n final boolean valid = new IsElementValidator().validate(element);\n\n assertTrue(valid);\n }", "class_method_signa...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/IsElementValidator.java", "identifier": "IsElementValidator", "interfaces": "implements Validator<Object>", "methods": [ { "class_method_signature": "IsElementValidator.validate(final Object object)", "constructor": false...
{ "body": "@Override\n public boolean validate(final Object object) {\n return object instanceof Element;\n }", "class_method_signature": "IsElementValidator.validate(final Object object)", "constructor": false, "full_signature": "@Override public boolean validate(final Object object)", "identifi...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1031
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/NullSerialiserTest.java", "identifier": "NullSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Object>" }
{ "body": "@Test\n @Override\n public void shouldSerialiseWithHistoricValues() throws Exception {\n for (final Pair<Object, byte[]> pair : historicSerialisationPairs) {\n serialiseFirst(pair);\n\n assertNull(serialiser.deserialise(pair.getSecond()));\n }\n }", "class_met...
{ "fields": [ { "declarator": "serialVersionUID = 282624951140644367L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 282624951140644367L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisation/...
{ "body": "@Override\n public Object deserialise(final byte[] bytes) throws SerialisationException {\n return null;\n }", "class_method_signature": "NullSerialiser.deserialise(final byte[] bytes)", "constructor": false, "full_signature": "@Override public Object deserialise(final byte[] bytes)", ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1174
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/function/FromEntityIdTest.java", "identifier": "FromEntityIdTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldUnwrapIfInputIsAnEntity() {\n // Given\n final Entity input = new Entity(\"group\", \"item\");\n final FromEntityId function = new FromEntityId();\n\n // When\n final Object output = function.apply(input);\n\n // Then\n assertSam...
{ "fields": [], "file": "core/operation/src/main/java/uk/gov/gchq/gaffer/operation/function/FromEntityId.java", "identifier": "FromEntityId", "interfaces": "", "methods": [ { "class_method_signature": "FromEntityId.apply(final EntityId e)", "constructor": false, "full_signature": "@Overr...
{ "body": "@Override\n public Object apply(final EntityId e) {\n if (null == e) {\n return null;\n }\n return e.getVertex();\n }", "class_method_signature": "FromEntityId.apply(final EntityId e)", "constructor": false, "full_signature": "@Override public Object apply(final ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_275
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/elementdefinition/view/ViewTest.java", "identifier": "ViewTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<View>" }
{ "body": "@Test\n public void shouldReturnTrueWhenViewHasPostTransformEntityFilters() {\n // Given\n final View view = new View.Builder()\n .entity(TestGroups.ENTITY, new ViewElementDefinition.Builder()\n .postTransformFilter(new ElementFilter.Builder()\n ...
{ "fields": [ { "declarator": "globalElements", "modifier": "private", "original_string": "private List<GlobalViewElementDefinition> globalElements;", "type": "List<GlobalViewElementDefinition>", "var_name": "globalElements" }, { "declarator": "globalEntities", "m...
{ "body": "public boolean hasPostTransformFilters() {\n return hasFilters(ViewElementDefinition::hasPostTransformFilters);\n }", "class_method_signature": "View.hasPostTransformFilters()", "constructor": false, "full_signature": "public boolean hasPostTransformFilters()", "identifier": "hasPostTrans...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_625
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/util/AggregatorUtilTest.java", "identifier": "AggregatorUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldIngestAggregateElementsWhenProvidedIterableCanOnlyBeConsumedOnce() {\n // given\n final Schema schema = Schema.fromJson(StreamUtil.openStreams(getClass(), \"schema-groupby\"));\n\n final List<Element> elements = Arrays.asList(\n new Entity.Bu...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/util/AggregatorUtil.java", "identifier": "AggregatorUtil", "interfaces": "", "methods": [ { "class_method_signature": "AggregatorUtil.AggregatorUtil()", "constructor": true, "full_signature": "private AggregatorU...
{ "body": "public static CloseableIterable<Element> ingestAggregate(final Iterable<? extends Element> elements, final Schema schema) {\n if (null == schema) {\n throw new IllegalArgumentException(\"Schema is required\");\n }\n final Collection<String> aggregatedGroups = schema.getAggre...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_330
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/graph/adjacency/AdjacencyMapTest.java", "identifier": "AdjacencyMapTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetAllSources() {\n final AdjacencyMap adjacencyMap = getAdjacencyMap();\n\n final Set<Object> results = adjacencyMap.getAllSources();\n\n assertThat(results, hasItems(1, 2, 4, 5, 6));\n }", "class_method_signature": "AdjacencyMapTest.shouldGetAllSourc...
{ "fields": [ { "declarator": "edgeGraph = HashBasedTable.create()", "modifier": "private final", "original_string": "private final HashBasedTable<Object, Object, Set<Edge>> edgeGraph = HashBasedTable.create();", "type": "HashBasedTable<Object, Object, Set<Edge>>", "var_name": "edgeG...
{ "body": "public Set<Object> getAllSources() {\n return Collections.unmodifiableSet(edgeGraph.rowKeySet());\n }", "class_method_signature": "AdjacencyMap.getAllSources()", "constructor": false, "full_signature": "public Set<Object> getAllSources()", "identifier": "getAllSources", "invocations": [...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_760
{ "fields": [ { "declarator": "store = mock(Store.class)", "modifier": "private final", "original_string": "private final Store store = mock(Store.class);", "type": "Store", "var_name": "store" }, { "declarator": "key1 = \"key1\"", "modifier": "private final", ...
{ "body": "@Test\n public void shouldReturnNothingWhenGetVariablesKeysAreNull() throws OperationException {\n // Given\n final Context context = mock(Context.class);\n final GetVariables op = new GetVariables.Builder().variableNames(Arrays.asList(null, null)).build();\n\n // When\n ...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/GetVariablesHandler.java", "identifier": "GetVariablesHandler", "interfaces": "implements OperationHandler<GetVariables>", "methods": [ { "class_method_signature": "GetVariablesHandler.doOperation(final GetV...
{ "body": "@Override\n public Map<String, Object> doOperation(final GetVariables operation, final Context context, final Store store) throws OperationException {\n final Map<String, Object> variableMap = new HashMap<>();\n List<String> variableNames = operation.getVariableNames() != null ? operation....
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1318
{ "fields": [], "file": "library/time-library/src/test/java/uk/gov/gchq/gaffer/time/serialisation/RBMBackedTimestampSetSerialiserTest.java", "identifier": "RBMBackedTimestampSetSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<RBMBackedTimestampSet>" }
{ "body": "@Test\n public void testSerialisationSizesQuotedInJavadoc() throws SerialisationException {\n // Given\n final Random random = new Random(123456789L);\n final Instant instant = ZonedDateTime.of(2017, 1, 1, 1, 1, 1, 0, ZoneId.of(\"UTC\")).toInstant();\n // Set of 100 minutes i...
{ "fields": [ { "declarator": "serialVersionUID = -5820977643949438174L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -5820977643949438174L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/time-li...
{ "body": "@Override\n public byte[] serialise(final RBMBackedTimestampSet rbmBackedTimestampSet) throws SerialisationException {\n if (null == rbmBackedTimestampSet) {\n return EMPTY_BYTES;\n }\n final ByteArrayOutputStream baos = new ByteArrayOutputStream();\n final DataOut...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1066
{ "fields": [ { "declarator": "GRAPH_ID = \"graphId\"", "modifier": "private static final", "original_string": "private static final String GRAPH_ID = \"graphId\";", "type": "String", "var_name": "GRAPH_ID" }, { "declarator": "SCHEMA_ID_1 = \"schemaId1\"", "modifi...
{ "body": "@Test\n public void shouldGetSchemaFromStoreIfSchemaIsEmpty() throws OperationException {\n // Given\n final Store store = mock(Store.class);\n final Schema schema = new Schema.Builder()\n .entity(TestGroups.ENTITY, new SchemaEntityDefinition.Builder()\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Graph.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Graph.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": ...
{ "body": "public Schema getSchema() {\n return store.getOriginalSchema();\n }", "class_method_signature": "Graph.getSchema()", "constructor": false, "full_signature": "public Schema getSchema()", "identifier": "getSchema", "invocations": [ "getOriginalSchema" ], "modifiers": "public", "...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_808
{ "fields": [ { "declarator": "input", "modifier": "private", "original_string": "private List<Element> input;", "type": "List<Element>", "var_name": "input" }, { "declarator": "expected", "modifier": "private", "original_string": "private List<Element> expe...
{ "body": "@Test\n public void shouldFailValidationWhenSchemaElementDefinitionsAreNull() {\n // Given\n given(store.getSchema()).willReturn(new Schema());\n\n final Entity entity = new Entity.Builder()\n .group(TestGroups.ENTITY)\n .property(TestPropertyNames.PROP...
{ "fields": [ { "declarator": "validator = new TransformValidator()", "modifier": "private final", "original_string": "private final FunctionValidator<Transform> validator = new TransformValidator();", "type": "FunctionValidator<Transform>", "var_name": "validator" } ], "file...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final Transform operation, final Context context, final Store store) throws OperationException {\n return doOperation(operation, store.getSchema());\n }", "class_method_signature": "TransformHandler.doOperation(final Transform operat...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1123
{ "fields": [ { "declarator": "ADD_OPERATIONS_TO_CHAIN_RESOURCE_PATH = \"addOperationsToChain.json\"", "modifier": "private static final", "original_string": "private static final String ADD_OPERATIONS_TO_CHAIN_RESOURCE_PATH = \"addOperationsToChain.json\";", "type": "String", "var_n...
{ "body": "@Test\n public void shouldAddAllOperationsWithNoAuthsGivenPath() throws IOException {\n // Given\n AddOperationsToChain hook = fromJson(ADD_OPERATIONS_TO_CHAIN_RESOURCE_PATH);\n\n Operation discardOutput = new DiscardOutput();\n Operation splitStore = new SplitStoreFromFile()...
{ "fields": [ { "declarator": "defaultOperations = new AdditionalOperations()", "modifier": "private final", "original_string": "private final AdditionalOperations defaultOperations = new AdditionalOperations();", "type": "AdditionalOperations", "var_name": "defaultOperations" },...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n final List<Operation> newOpList = new ArrayList<>();\n\n boolean hasAuth = false;\n if (!authorisedOps.isEmpty() && !context.getUser().getOpAuths().isEmpty()) {\n for (final Str...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1089
{ "fields": [ { "declarator": "TEST_WITH_VALUE = \"withTestValue\"", "modifier": "public static final", "original_string": "public static final String TEST_WITH_VALUE = \"withTestValue\";", "type": "String", "var_name": "TEST_WITH_VALUE" }, { "declarator": "TEST_WITHOUT...
{ "body": "@Test\n public void shouldFailMissingAuth() throws Exception {\n userAuths.add(B);\n validAuths.add(A);\n\n assertFalse(updateViewHook.validateAuths(userAuths, validAuths, true));\n }", "class_method_signature": "UpdateViewHookTest.shouldFailMissingAuth()", "constructor": fal...
{ "fields": [ { "declarator": "ADD_EXTRA_GROUPS_DEFAULT = false", "modifier": "public static final", "original_string": "public static final boolean ADD_EXTRA_GROUPS_DEFAULT = false;", "type": "boolean", "var_name": "ADD_EXTRA_GROUPS_DEFAULT" }, { "declarator": "withOpA...
{ "body": "protected final boolean validateAuths(final Set<String> userAuths, final Set<String> validAuth, final boolean ifValidAuthIsNull) {\n boolean rtn = ifValidAuthIsNull;\n if (null != validAuth) {\n if (null == userAuths) {\n rtn = validAuth.isEmpty();\n } els...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_672
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/OperationUtilTest.java", "identifier": "OperationUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidateOutputInputTypes() {\n // When / Then\n assertTrue(OperationUtil.isValid(Iterable.class, Iterable.class).isValid());\n assertTrue(OperationUtil.isValid(CloseableIterable.class, Iterable.class).isValid());\n assertTrue(OperationUtil.isValid(It...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/OperationUtil.java", "identifier": "OperationUtil", "interfaces": "", "methods": [ { "class_method_signature": "OperationUtil.OperationUtil()", "constructor": true, "full_signature": "private OperationU...
{ "body": "public static ValidationResult isValid(final Class<?> output, final Class<?> input) {\n ValidationResult result = new ValidationResult();\n if (null != input && null != output\n && !UnknownGenericType.class.equals(output)\n && !UnknownGenericType.class.equals(inp...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_388
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/GroupedPropertiesTest.java", "identifier": "GroupedPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConstructGroupedProperties() {\n final String group = \"group1\";\n\n final GroupedProperties groupedProperties = new GroupedProperties(group);\n\n assertEquals(group, groupedProperties.getGroup());\n }", "class_method_signature": "GroupedPropertiesTes...
{ "fields": [ { "declarator": "serialVersionUID = -3424853199115841290L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -3424853199115841290L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "gro...
{ "body": "public String getGroup() {\n return group;\n }", "class_method_signature": "GroupedProperties.getGroup()", "constructor": false, "full_signature": "public String getGroup()", "identifier": "getGroup", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String"...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_222
{ "fields": [], "file": "store-implementation/map-store/src/test/java/uk/gov/gchq/gaffer/mapstore/utils/ElementClonerTest.java", "identifier": "ElementClonerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testElementCloner() throws StoreException {\n // Given\n final ElementCloner cloner = new ElementCloner();\n final MapStore mapStore = new MapStore();\n mapStore.initialise(\"graphId\", GetAllElementsHandlerTest.getSchema(), new MapStoreProperties());\n\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ElementCloner.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ElementCloner.class);", "type": "Logger", "var_name": "LOGGER" } ], "fil...
{ "body": "public Element cloneElement(final Element element, final Schema schema) {\n try {\n final Element clone = element.emptyClone();\n final SchemaElementDefinition sed = schema.getElement(clone.getGroup());\n for (final String propertyName : element.getProperties().keySe...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_55
{ "fields": [ { "declarator": "TEST_GRAPH_ID = \"testGraphId\"", "modifier": "private static final", "original_string": "private static final String TEST_GRAPH_ID = \"testGraphId\";", "type": "String", "var_name": "TEST_GRAPH_ID" }, { "declarator": "user", "modifi...
{ "body": "@Test\n public void shouldNotThrowExceptionBecauseSkipFlagSetTrue() throws Exception {\n // Given\n final String graphID = \"1,3\";\n final Operation op = mock(Operation.class);\n when(op.getOption(KEY_OPERATION_OPTIONS_GRAPH_IDS)).thenReturn(graphID);\n when(op.getOpt...
{ "fields": [], "file": "store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/operation/handler/FederatedOperationHandler.java", "identifier": "FederatedOperationHandler", "interfaces": "implements OperationHandler<Operation>", "methods": [ { "class_method_signature":...
{ "body": "public Object doOperation(final Operation operation, final Context context, final Store store) throws OperationException {\n final Collection<Graph> graphs = ((FederatedStore) store).getGraphs(context.getUser(), operation.getOption(KEY_OPERATION_OPTIONS_GRAPH_IDS), operation);\n for (final Gr...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_737
{ "fields": [ { "declarator": "ENDPOINT_BASE_PATH = \"http://127.0.0.1:\"", "modifier": "private static final", "original_string": "private static final String ENDPOINT_BASE_PATH = \"http://127.0.0.1:\";", "type": "String", "var_name": "ENDPOINT_BASE_PATH" }, { "declara...
{ "body": "@Test\n public void shouldThrowExceptionWithMalformedEndpoint() {\n final String endpointString = \"malformedUrl:\" + port + ENDPOINT_PATH;\n GetFromEndpoint op = new GetFromEndpoint.Builder()\n .endpoint(endpointString)\n .build();\n\n // When / Then\n...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/GetFromEndpointHandler.java", "identifier": "GetFromEndpointHandler", "interfaces": "implements OutputOperationHandler<GetFromEndpoint, String>", "methods": [ { "class_method_signature": "GetFromEndpointHand...
{ "body": "@Override\n public String doOperation(final GetFromEndpoint operation, final Context context, final Store store) throws OperationException {\n try {\n return IOUtils.toString(new URL(operation.getEndpoint()));\n } catch (final IOException e) {\n throw new OperationExc...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_367
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/comparison/ComparableOrToStringComparatorTest.java", "identifier": "ComparableOrToStringComparatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCompareEqualIntegers() {\n final ComparableOrToStringComparator comparator = new ComparableOrToStringComparator();\n\n final int result = comparator.compare(1, 1);\n\n assertEquals(0, result);\n }", "class_method_signature": "ComparableOrToStringCompar...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/comparison/ComparableOrToStringComparator.java", "identifier": "ComparableOrToStringComparator", "interfaces": "implements Comparator<Object>, Serializable", "methods": [ { "class_method_signature": "ComparableOrToStrin...
{ "body": "@Override\n public int compare(final Object vertex1, final Object vertex2) {\n if (null == vertex1) {\n if (null == vertex2) {\n return 0;\n }\n return 1;\n }\n\n if (null == vertex2) {\n return -1;\n }\n\n if ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_170
{ "fields": [ { "declarator": "SCHEMA = new Schema.Builder()\n .type(\"string\", new TypeDefinition.Builder()\n .clazz(String.class)\n .serialiser(new StringSerialiser())\n .build())\n .type(\"int\", new TypeDefinition.Builder()\...
{ "body": "@Test\n public void shouldDoNothingIfNoElementsProvided() throws OperationException, StoreException, IOException {\n // Given\n final AddElementsHandler handler = new AddElementsHandler();\n final AddElements addElements = new AddElements();\n final Context context = mock(Con...
{ "fields": [], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasestore/operation/handler/AddElementsHandler.java", "identifier": "AddElementsHandler", "interfaces": "implements OperationHandler<AddElements>", "methods": [ { "class_method_signature": "AddElementsHandler...
{ "body": "@Override\n public Void doOperation(final AddElements operation,\n final Context context, final Store store)\n throws OperationException {\n addElements(operation, (HBaseStore) store);\n return null;\n }", "class_method_signature": "AddElementsHan...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_4
{ "fields": [ { "declarator": "TEST_USER = new User.Builder().userId(\"TestUser\").opAuths(\"auth1\", \"auth2\").build()", "modifier": "private static final", "original_string": "private static final User TEST_USER = new User.Builder().userId(\"TestUser\").opAuths(\"auth1\", \"auth2\").build();"...
{ "body": "@Test\n public void shouldReturnTrueForAdministratorWithAnyAdminAuths() {\n assertTrue(createAccessPredicate(TEST_USER.getUserId(), NO_AUTHS, NON_PUBLIC).test(new User.Builder().userId(\"AdminUser\").opAuths(\"auth1\", \"auth2\").build(), \"authX,authY,auth1\"));\n }", "class_method_signatur...
{ "fields": [], "file": "store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/access/predicate/FederatedGraphReadAccessPredicate.java", "identifier": "FederatedGraphReadAccessPredicate", "interfaces": "", "methods": [ { "class_method_signature": "FederatedGraphReadAcc...
{ "body": "@Override\n public boolean test(final User user, final String adminAuth) {\n return super.test(user, adminAuth);\n }", "class_method_signature": "FederatedGraphReadAccessPredicate.test(final User user, final String adminAuth)", "constructor": false, "full_signature": "@Override public bo...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_520
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/CollectionUtilTest.java", "identifier": "CollectionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnTrueWhenDistinctCalledWithCollectionOfUniqueValues() {\n // Given\n final Collection<Integer> collection = Lists.newArrayList(1, 2, 3, 4, 5);\n\n // When\n final boolean result = CollectionUtil.distinct(collection);\n\n // Then\n ...
{ "fields": [], "file": "core/common-util/src/main/java/uk/gov/gchq/gaffer/commonutil/CollectionUtil.java", "identifier": "CollectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtil.CollectionUtil()", "constructor": true, "full_signature": "private Colle...
{ "body": "public static <T> boolean distinct(final Collection<T> collection) {\n final Set<T> set = new HashSet<>();\n\n for (final T t : collection) {\n if (!set.add(t)) {\n return false;\n }\n }\n\n return true;\n }", "class_method_signature": "...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_873
{ "fields": [ { "declarator": "namedViewCache = new NamedViewCache()", "modifier": "private final", "original_string": "private final NamedViewCache namedViewCache = new NamedViewCache();", "type": "NamedViewCache", "var_name": "namedViewCache" }, { "declarator": "handl...
{ "body": "@Test\n public void shouldAddNamedViewContainingCustomAccessPredicatesCorrectly() throws OperationException, CacheOperationFailedException {\n final AccessPredicate readAccessPredicate = new AccessPredicate(new CustomUserPredicate());\n final AccessPredicate writeAccessPredicate = new Acce...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedViewCache cache;", "type": "NamedViewCache", "var_name": "cache" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/named/AddNamedViewHand...
{ "body": "@Override\n public Object doOperation(final AddNamedView operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getName() || operation.getName().isEmpty()) {\n throw new IllegalArgumentException(\"NamedView name must be set and not empt...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1158
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/util/OperationUtilTest.java", "identifier": "OperationUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnNullIfConvertObjectArrayToElementIdsWithNullInput() {\n // Given\n final Object[] input = null;\n\n // When\n final Iterable<? extends ElementId> output = OperationUtil.toElementIds(input);\n\n // Then\n assertNull(output);\n }...
{ "fields": [], "file": "core/operation/src/main/java/uk/gov/gchq/gaffer/operation/util/OperationUtil.java", "identifier": "OperationUtil", "interfaces": "", "methods": [ { "class_method_signature": "OperationUtil.OperationUtil()", "constructor": true, "full_signature": "private Operati...
{ "body": "public static Iterable<? extends ElementId> toElementIds(final Object... input) {\n if (null == input) {\n return null;\n }\n return Arrays.stream(input).map(new ToElementId()).collect(Collectors.toList());\n }", "class_method_signature": "OperationUtil.toElementIds(fin...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_936
{ "fields": [ { "declarator": "ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values())", "modifier": "public static final", "original_string": "public static final Set<StoreTrait> ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values());", "type": "Set<StoreTrait>", "var_name": "ALL_S...
{ "body": "@Test\n public void shouldValidateAndReturnTrueForAndFilter() {\n // Given\n final ViewValidator validator = new ViewValidator();\n final View view = new View.Builder()\n .entity(TestGroups.ENTITY, new ViewElementDefinition.Builder()\n .preAggre...
{ "fields": [ { "declarator": "SKIP_VIEW_VALIDATION = \"skipViewValidation\"", "modifier": "public static final", "original_string": "public static final String SKIP_VIEW_VALIDATION = \"skipViewValidation\";", "type": "String", "var_name": "SKIP_VIEW_VALIDATION" }, { "d...
{ "body": "public ValidationResult validate(final View view, final Schema schema, final Set<StoreTrait> storeTraits) {\n final boolean isStoreOrdered = storeTraits.contains(StoreTrait.ORDERED);\n\n final ValidationResult result = new ValidationResult();\n\n if (null != view) {\n valida...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_465
{ "fields": [ { "declarator": "ve = new VisibilityEvaluator(new Authorisations(\"one\", \"two\", \"three\", \"four\"))", "modifier": "final", "original_string": "final VisibilityEvaluator ve = new VisibilityEvaluator(new Authorisations(\"one\", \"two\", \"three\", \"four\"));", "type": "Vi...
{ "body": "@Test\n public void testQuotedExpressions() throws VisibilityParseException {\n final Authorisations auths = new Authorisations(\"A#C\", \"A\\\"C\", \"A\\\\C\", \"AC\");\n final VisibilityEvaluator ve = new VisibilityEvaluator(auths);\n\n assertTrue(ve.evaluate(new ElementVisibility...
{ "fields": [ { "declarator": "auths", "modifier": "private", "original_string": "private Authorisations auths;", "type": "Authorisations", "var_name": "auths" } ], "file": "core/common-util/src/main/java/uk/gov/gchq/gaffer/commonutil/elementvisibilityutil/VisibilityEvaluator...
{ "body": "public boolean evaluate(final ElementVisibility visibility) throws VisibilityParseException {\n return this.evaluate(visibility.getExpression(), visibility.getParseTree());\n }", "class_method_signature": "VisibilityEvaluator.evaluate(final ElementVisibility visibility)", "constructor": false...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1334
{ "fields": [], "file": "library/spark/spark-library/src/test/java/uk/gov/gchq/gaffer/spark/operation/graphframe/GetGraphFrameOfElementsTest.java", "identifier": "GetGraphFrameOfElementsTest", "interfaces": "", "superclass": "extends OperationTest<GetGraphFrameOfElements>" }
{ "body": "@Test\n public void shouldValidateOperationWhenViewContainsElementsWithReservedPropertyNames() {\n // Given\n final Operation op = new GetGraphFrameOfElements.Builder()\n .view(new View.Builder()\n .entity(TestGroups.ENTITY, new ViewElementDefinition.B...
{ "fields": [ { "declarator": "converters", "modifier": "private", "original_string": "private List<Converter> converters;", "type": "List<Converter>", "var_name": "converters" }, { "declarator": "options", "modifier": "private", "original_string": "private ...
{ "body": "@Override\n public ValidationResult validate() {\n final ValidationResult result = Output.super.validate();\n\n if (result.isValid() && !view.hasEdges() && !view.hasEntities()) {\n result.addError(\"Cannot create a GraphFrame unless the View contains edges or entities.\");\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_609
{ "fields": [ { "declarator": "schema", "modifier": "private static", "original_string": "private static Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "serialiser", "modifier": "private static", "original_string": "private static...
{ "body": "@Test\n public void testDeserialiseEmpty() throws SerialisationException {\n assertEquals(null, serialiser.deserialiseEmpty());\n }", "class_method_signature": "ElementIdSerialiserTest.testDeserialiseEmpty()", "constructor": false, "full_signature": "@Test public void testDeserialiseEmpt...
{ "fields": [ { "declarator": "serialVersionUID = 2116809339334801784L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 2116809339334801784L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "entit...
{ "body": "@Override\n public ElementId deserialiseEmpty() throws SerialisationException {\n return null;\n }", "class_method_signature": "ElementIdSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public ElementId deserialiseEmpty()", "identifier": "deserialiseEm...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_259
{ "fields": [], "file": "core/access/src/test/java/uk/gov/gchq/gaffer/user/UserTest.java", "identifier": "UserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReplaceEmptyIdWithUnknownIdWhenBuildingUser() {\n // Given\n final String userId = \"\";\n\n // When\n final User user = new User.Builder()\n .userId(userId)\n .build();\n\n // Then\n assertEquals(User.UNKN...
{ "fields": [ { "declarator": "serialVersionUID = -2446354817298439281L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2446354817298439281L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "UNK...
{ "body": "public String getUserId() {\n return userId;\n }", "class_method_signature": "User.getUserId()", "constructor": false, "full_signature": "public String getUserId()", "identifier": "getUserId", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "sig...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1271
{ "fields": [ { "declarator": "service = new JcsCacheService()", "modifier": "private", "original_string": "private JcsCacheService service = new JcsCacheService();", "type": "JcsCacheService", "var_name": "service" }, { "declarator": "TEST_REGION = \"test\"", "mo...
{ "body": "@Test\n public void shouldOnlyUpdateIfInstructed() throws CacheOperationException {\n service.initialise(serviceProps);\n service.putInCache(TEST_REGION, \"test\", 1);\n\n try {\n service.putSafeInCache(TEST_REGION, \"test\", 2);\n fail(\"Expected an exception\...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(JcsCacheService.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(JcsCacheService.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Override\n public void initialise(final Properties properties) {\n String configFile = properties.getProperty(CacheProperties.CACHE_CONFIG_FILE);\n manager = CompositeCacheManager.getUnconfiguredInstance();\n\n if (null != configFile) {\n try {\n Propertie...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_824
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToArrayHandlerTest.java", "identifier": "ToArrayHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConvertIterableOfElementsToArray() throws OperationException {\n // Given\n final Element[] originalArray = new Element[]{\n new Entity.Builder()\n .group(\"entity\")\n .build(),\n new Edg...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToArrayHandler.java", "identifier": "ToArrayHandler", "interfaces": "implements OutputOperationHandler<ToArray<T>, T[]>", "methods": [ { "class_method_signature": "ToArrayHandler.doOperation(final ToA...
{ "body": "@SuppressFBWarnings(value = \"PZLA_PREFER_ZERO_LENGTH_ARRAYS\")\n @Override\n public T[] doOperation(final ToArray<T> operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getInput() || Iterables.isEmpty(operation.getInput())) {\n r...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_577
{ "fields": [ { "declarator": "freqMap", "modifier": "private", "original_string": "private FreqMap freqMap;", "type": "FreqMap", "var_name": "freqMap" } ], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/types/function/FreqMapPredicatorTest.java", "identifier": "FreqMa...
{ "body": "@Test\n public void shouldFilterMapWithSingleResult() {\n //given\n final Regex predicate = new Regex(\"^c.*o.*g$\");\n final FreqMapPredicator fRegexPredicator = new FreqMapPredicator(predicate);\n\n //when\n final FreqMap fRegex = fRegexPredicator.apply(freqMap);\n\n...
{ "fields": [ { "declarator": "predicate", "modifier": "private", "original_string": "private KoryphePredicate<String> predicate;", "type": "KoryphePredicate<String>", "var_name": "predicate" } ], "file": "core/type/src/main/java/uk/gov/gchq/gaffer/types/function/FreqMapPredi...
{ "body": "@Override\n public FreqMap apply(final FreqMap freqMap) {\n return filterPredicate(freqMap);\n }", "class_method_signature": "FreqMapPredicator.apply(final FreqMap freqMap)", "constructor": false, "full_signature": "@Override public FreqMap apply(final FreqMap freqMap)", "identifier": ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_127
{ "fields": [ { "declarator": "a", "modifier": "private", "original_string": "private byte[] a;", "type": "byte[]", "var_name": "a" }, { "declarator": "b", "modifier": "private", "original_string": "private byte[] b;", "type": "byte[]", "var_name...
{ "body": "@Test\n public void shouldThrowExceptionEmptyArrayWithLength() throws Exception {\n br1 = new BytesAndRange(f, 0, 1);\n br2 = new BytesAndRange(f, 0, 1);\n assertThrows(ArrayIndexOutOfBoundsException.class,\n () -> assertFalse(ByteUtils.areKeyBytesEqual(br1, br2)));\n...
{ "fields": [], "file": "store-implementation/accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/utils/ByteUtils.java", "identifier": "ByteUtils", "interfaces": "", "methods": [ { "class_method_signature": "ByteUtils.ByteUtils()", "constructor": true, "full_signature": "privat...
{ "body": "public static boolean areKeyBytesEqual(final byte[] bytes1, final byte[] bytes2) {\n if (Arrays.equals(bytes1, bytes2)) {\n return true;\n }\n\n int last = bytes1.length;\n\n if (last != bytes2.length) {\n return false;\n }\n\n if (last == 0) ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_432
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ElementTransformerTest.java", "identifier": "ElementTransformerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldTransformElementUsingIdentityFunction() {\n // Given\n final ElementTransformer transformer = new ElementTransformer.Builder()\n .select(\"prop1\")\n .execute(new Identity())\n .project(\"prop3\")\n .buil...
{ "fields": [ { "declarator": "elementTuple = new ElementTuple()", "modifier": "private final", "original_string": "private final ElementTuple elementTuple = new ElementTuple();", "type": "ElementTuple", "var_name": "elementTuple" } ], "file": "core/data/src/main/java/uk/gov/...
{ "body": "public Element apply(final Element element) {\n elementTuple.setElement(element);\n apply(elementTuple);\n return element;\n }", "class_method_signature": "ElementTransformer.apply(final Element element)", "constructor": false, "full_signature": "public Element apply(final Ele...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_598
{ "fields": [ { "declarator": "schema", "modifier": "private static", "original_string": "private static Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "serialiser", "modifier": "private static", "original_string": "private static...
{ "body": "@Test\n public void testDeserialiseEmpty() throws SerialisationException {\n assertEquals(null, serialiser.deserialiseEmpty());\n }", "class_method_signature": "ElementSerialiserTest.testDeserialiseEmpty()", "constructor": false, "full_signature": "@Test public void testDeserialiseEmpty(...
{ "fields": [ { "declarator": "serialVersionUID = 4640352297806229672L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 4640352297806229672L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "entit...
{ "body": "@Override\n public Element deserialiseEmpty() throws SerialisationException {\n return null;\n }", "class_method_signature": "ElementSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public Element deserialiseEmpty()", "identifier": "deserialiseEmpty", ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_961
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/schema/SchemaElementDefinitionValidatorTest.java", "identifier": "SchemaElementDefinitionValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidateComponentTypesAndReturnFalseForInvalidPropertyClass() {\n // Given\n final SchemaElementDefinition elementDef = mock(SchemaElementDefinition.class);\n final SchemaElementDefinitionValidator validator = new SchemaElementDefinitionValidator();\n\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class);", "type": "Logger", ...
{ "body": "protected ValidationResult validateComponentTypes(final SchemaElementDefinition elementDef) {\n final ValidationResult result = new ValidationResult();\n for (final IdentifierType idType : elementDef.getIdentifiers()) {\n try {\n if (null == elementDef.getIdentifierC...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1363
{ "fields": [ { "declarator": "DELTA = 0.00001D", "modifier": "private static final", "original_string": "private static final double DELTA = 0.00001D;", "type": "double", "var_name": "DELTA" }, { "declarator": "hllSketchWithCardinality5", "modifier": "private sta...
{ "body": "@Test\n public void shouldRejectWhenInputIsNull() {\n // Given\n final HllSketchIsLessThan filter = new HllSketchIsLessThan(15);\n // When\n boolean accepted = filter.test(null);\n // Then\n assertFalse(accepted);\n }", "class_method_signature": "HllSketchI...
{ "fields": [ { "declarator": "controlValue", "modifier": "private", "original_string": "private long controlValue;", "type": "long", "var_name": "controlValue" }, { "declarator": "orEqualTo", "modifier": "private", "original_string": "private boolean orEqua...
{ "body": "@Override\n public boolean test(final HllSketch input) {\n if (null == input) {\n return false;\n }\n final long cardinality = Math.round(input.getEstimate());\n if (orEqualTo) {\n return cardinality <= controlValue;\n } else {\n return...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_96
{ "fields": [], "file": "store-implementation/parquet-store/src/test/java/uk/gov/gchq/gaffer/parquetstore/partitioner/PartitionKeyTest.java", "identifier": "PartitionKeyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCompare() {\n // Given\n final PartitionKey[] partitionKeys = new PartitionKey[6];\n partitionKeys[0] = new PartitionKey(new Object[]{1L, 50, \"A\"});\n partitionKeys[1] = new PartitionKey(new Object[]{1L, 50, \"B\"});\n partitionKeys[2] = new P...
{ "fields": [ { "declarator": "partitionKey", "modifier": "private final", "original_string": "private final Object[] partitionKey;", "type": "Object[]", "var_name": "partitionKey" } ], "file": "store-implementation/parquet-store/src/main/java/uk/gov/gchq/gaffer/parquetstore/...
{ "body": "@Override\n public int compareTo(final PartitionKey other) {\n if (other instanceof NegativeInfinityPartitionKey) {\n return 1;\n }\n if (other instanceof PositiveInfinityPartitionKey) {\n return -1;\n }\n if (this.partitionKey.length != other.par...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1226
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/get/GetAdjacentIdsTest.java", "identifier": "GetAdjacentIdsTest", "interfaces": "", "superclass": "extends OperationTest<GetAdjacentIds>" }
{ "body": "@Test\n public void shouldSetIncludeIncomingOutgoingTypeToBoth() {\n final EntityId elementId = new EntitySeed(\"identifier\");\n\n // When\n final GetAdjacentIds op = new GetAdjacentIds.Builder()\n .input(elementId)\n .inOutType(IncludeIncomingOutgoing...
{ "fields": [ { "declarator": "view", "modifier": "private", "original_string": "private View view;", "type": "View", "var_name": "view" }, { "declarator": "input", "modifier": "private", "original_string": "private Iterable<? extends EntityId> input;", ...
{ "body": "@Override\n public IncludeIncomingOutgoingType getIncludeIncomingOutGoing() {\n return includeIncomingOutGoing;\n }", "class_method_signature": "GetAdjacentIds.getIncludeIncomingOutGoing()", "constructor": false, "full_signature": "@Override public IncludeIncomingOutgoingType getIncludeI...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_79
{ "fields": [], "file": "store-implementation/parquet-store/src/test/java/uk/gov/gchq/gaffer/parquetstore/operation/handler/AddElementsHandlerTest.java", "identifier": "AddElementsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOnePartitionAllGroups(@TempDir java.nio.file.Path tempDir)\n throws IOException, OperationException, StoreException {\n // Given\n final List<Element> elementsToAdd = new ArrayList<>();\n // - Data for TestGroups.ENTITY\n elementsToAdd.addA...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AddElementsHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AddElementsHandler.class);", "type": "Logger", "var_name": "LOGGER" } ...
{ "body": "@Override\n public Void doOperation(final AddElements operation,\n final Context context,\n final Store store) throws OperationException {\n addElements(operation, context, (ParquetStore) store);\n return null;\n }", "class_method_...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_131
{ "fields": [ { "declarator": "a", "modifier": "private", "original_string": "private byte[] a;", "type": "byte[]", "var_name": "a" }, { "declarator": "b", "modifier": "private", "original_string": "private byte[] b;", "type": "byte[]", "var_name...
{ "body": "@Test\n public void shouldFailWithEmptyAndZeroRangeAndOffset() throws Exception {\n br1 = new BytesAndRange(a, 3, 0);\n br2 = new BytesAndRange(f, 0, 0);\n assertTrue(ByteUtils.areKeyBytesEqual(br1, br2));\n }", "class_method_signature": "ByteUtilsTest.shouldFailWithEmptyAndZer...
{ "fields": [], "file": "store-implementation/accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/utils/ByteUtils.java", "identifier": "ByteUtils", "interfaces": "", "methods": [ { "class_method_signature": "ByteUtils.ByteUtils()", "constructor": true, "full_signature": "privat...
{ "body": "public static boolean areKeyBytesEqual(final byte[] bytes1, final byte[] bytes2) {\n if (Arrays.equals(bytes1, bytes2)) {\n return true;\n }\n\n int last = bytes1.length;\n\n if (last != bytes2.length) {\n return false;\n }\n\n if (last == 0) ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_561
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/serialisation/FreqMapSerialiserTest.java", "identifier": "FreqMapSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<FreqMap>" }
{ "body": "@Test\n @Override\n public void shouldDeserialiseEmpty() throws SerialisationException {\n // When\n final FreqMap value = serialiser.deserialiseEmpty();\n\n // Then\n assertEquals(new FreqMap(), value);\n }", "class_method_signature": "FreqMapSerialiserTest.shouldDes...
{ "fields": [ { "declarator": "serialVersionUID = 6530929395214726384L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6530929395214726384L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "longS...
{ "body": "@Override\n public FreqMap deserialiseEmpty() {\n return new FreqMap();\n }", "class_method_signature": "FreqMapSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public FreqMap deserialiseEmpty()", "identifier": "deserialiseEmpty", "invocations": [], ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_832
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToSetHandlerTest.java", "identifier": "ToSetHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConvertIterableToSetAndMaintainOrder() throws OperationException {\n // Given\n final Iterable originalResults = new WrappedCloseableIterable<>(Arrays.asList(10, 9, 8, 10, 7, 8, 7, 6, 6, 5, 6, 9, 4, 5, 3, 4, 2, 2, 2, 1, 1));\n final ToSetHandler<Integer> ha...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToSetHandler.java", "identifier": "ToSetHandler", "interfaces": "implements OutputOperationHandler<ToSet<T>, Set<? extends T>>", "methods": [ { "class_method_signature": "ToSetHandler.doOperation(fina...
{ "body": "@Override\n public Set<T> doOperation(final ToSet<T> operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getInput()) {\n return null;\n }\n\n return Streams.toStream(operation.getInput())\n .collect...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1119
{ "fields": [ { "declarator": "OP_AUTHS_PATH = \"/opAuthoriser.json\"", "modifier": "private static final", "original_string": "private static final String OP_AUTHS_PATH = \"/opAuthoriser.json\";", "type": "String", "var_name": "OP_AUTHS_PATH" }, { "declarator": "USER =...
{ "body": "@Test\n public void shouldRejectOperationChainWhenUserDoesntHaveAllowedAuth() throws OperationException {\n // Given\n final OperationAuthoriser hook = fromJson(OP_AUTHS_PATH);\n final OperationChain opChain = new OperationChain.Builder()\n .first(new GetAdjacentIds()...
{ "fields": [ { "declarator": "allAuths = new HashSet<>()", "modifier": "private final", "original_string": "private final Set<String> allAuths = new HashSet<>();", "type": "Set<String>", "var_name": "allAuths" }, { "declarator": "auths = new HashMap<>()", "modifi...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n if (null != opChain) {\n for (final Operation operation : opChain.getOperations()) {\n authorise(operation, context.getUser());\n }\n authorise(opChain, c...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_998
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/IntegerSerialiserTest.java", "identifier": "IntegerSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Integer>" }
{ "body": "@Test\n public void canSerialiseIntegerClass() {\n assertTrue(serialiser.canHandle(Integer.class));\n }", "class_method_signature": "IntegerSerialiserTest.canSerialiseIntegerClass()", "constructor": false, "full_signature": "@Test public void canSerialiseIntegerClass()", "identifier": ...
{ "fields": [ { "declarator": "serialVersionUID = 5647756843689779437L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5647756843689779437L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisatio...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Integer.class.equals(clazz);\n }", "class_method_signature": "IntegerSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identifier...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_977
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/schema/SchemaElementDefinitionValidatorTest.java", "identifier": "SchemaElementDefinitionValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidateAndReturnFalseWhenGroupByIsAggregatedWithNonGroupByProperty() {\n // Given\n final SchemaElementDefinitionValidator validator = new SchemaElementDefinitionValidator();\n final BinaryOperator<Integer> function1 = mock(BinaryOperator.class);\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class);", "type": "Logger", ...
{ "body": "public ValidationResult validate(final SchemaElementDefinition elementDef) {\n final ValidationResult result = new ValidationResult();\n\n final ElementFilter validator = elementDef.getValidator();\n final ElementAggregator aggregator = elementDef.getFullAggregator();\n result.a...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_424
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ToPropertiesTupleTest.java", "identifier": "ToPropertiesTupleTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldReturnNullForNullValue() {\n final ToPropertiesTuple function = new ToPropertiesTuple();\n\n final Object result = function.apply(null);\n\n assertNull(result);\n }", "class_method_signature": "ToPropertiesTupleTest.shouldReturnNullForNullValue()", "...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/function/ToPropertiesTuple.java", "identifier": "ToPropertiesTuple", "interfaces": "", "methods": [ { "class_method_signature": "ToPropertiesTuple.apply(final Properties properties)", "constructor": false, "...
{ "body": "@Override\n public PropertiesTuple apply(final Properties properties) {\n if (isNull(properties)) {\n return null;\n }\n\n return new PropertiesTuple(properties);\n }", "class_method_signature": "ToPropertiesTuple.apply(final Properties properties)", "constructor":...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_80
{ "fields": [], "file": "store-implementation/parquet-store/src/test/java/uk/gov/gchq/gaffer/parquetstore/operation/handler/AddElementsHandlerTest.java", "identifier": "AddElementsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRepeatedCallsOfAddElementsHandler(@TempDir java.nio.file.Path tempDir)\n throws IOException, OperationException, StoreException {\n // Given\n final List<Element> elementsToAdd = new ArrayList<>();\n // - Data for TestGroups.ENTITY\n elemen...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AddElementsHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AddElementsHandler.class);", "type": "Logger", "var_name": "LOGGER" } ...
{ "body": "@Override\n public Void doOperation(final AddElements operation,\n final Context context,\n final Store store) throws OperationException {\n addElements(operation, context, (ParquetStore) store);\n return null;\n }", "class_method_...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_648
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/resolver/DefaultScoreResolverTest.java", "identifier": "DefaultScoreResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetScore() {\n // Given\n final GetAdjacentIds op1 = mock(GetAdjacentIds.class);\n\n final Map<Class<? extends Operation>, Integer> opScores = new LinkedHashMap<>();\n opScores.put(Operation.class, 1);\n opScores.put(GetAdjacentIds.class, 2);\...
{ "fields": [ { "declarator": "DEFAULT_OPERATION_SCORE = 1", "modifier": "public static final", "original_string": "public static final int DEFAULT_OPERATION_SCORE = 1;", "type": "int", "var_name": "DEFAULT_OPERATION_SCORE" }, { "declarator": "scoreResolvers", "mo...
{ "body": "@Override\n public Integer getScore(final Operation operation) {\n if (null == operation) {\n return 0;\n }\n\n // Named operations should use their custom resolver despite implementing Operations\n if (operation instanceof Operations && !(operation instanceof Name...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_218
{ "fields": [], "file": "store-implementation/map-store/src/test/java/uk/gov/gchq/gaffer/mapstore/multimap/MapOfSetsTest.java", "identifier": "MapOfSetsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldPutValueInExistingMapSet() throws StoreException {\n // Given\n final String key = \"key1\";\n final String value = \"value1\";\n final Map<String, Set<String>> map = new HashMap<>();\n final Set<String> set = mock(Set.class);\n final M...
{ "fields": [ { "declarator": "multiMap", "modifier": "private final", "original_string": "private final Map<K, Set<V>> multiMap;", "type": "Map<K, Set<V>>", "var_name": "multiMap" }, { "declarator": "setClass", "modifier": "private final", "original_string"...
{ "body": "@Override\n public boolean put(final K key, final V value) {\n final Set<V> values = multiMap.computeIfAbsent(key, k -> createSet());\n return values.add(value);\n }", "class_method_signature": "MapOfSets.put(final K key, final V value)", "constructor": false, "full_signature": "@...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1230
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/get/GetAllElementsTest.java", "identifier": "GetAllElementsTest", "interfaces": "", "superclass": "extends OperationTest<GetAllElements>" }
{ "body": "@Test\n public void shouldSetDirectedTypeToBoth() {\n // When\n final GetAllElements op = new GetAllElements.Builder()\n .directedType(DirectedType.EITHER)\n .build();\n\n // Then\n assertEquals(DirectedType.EITHER, op.getDirectedType());\n }"...
{ "fields": [ { "declarator": "view", "modifier": "private", "original_string": "private View view;", "type": "View", "var_name": "view" }, { "declarator": "directedType", "modifier": "private", "original_string": "private DirectedType directedType;", ...
{ "body": "@Override\n public DirectedType getDirectedType() {\n return directedType;\n }", "class_method_signature": "GetAllElements.getDirectedType()", "constructor": false, "full_signature": "@Override public DirectedType getDirectedType()", "identifier": "getDirectedType", "invocations": []...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_865
{ "fields": [ { "declarator": "cache", "modifier": "private static", "original_string": "private static NamedViewCache cache;", "type": "NamedViewCache", "var_name": "cache" }, { "declarator": "GAFFER_USER = \"gaffer user\"", "modifier": "private static final", ...
{ "body": "@Test\n public void shouldAllowUserToAddWithAdminAuth() throws CacheOperationFailedException {\n // Given\n cache.addNamedView(alternative, false, advancedUser, EMPTY_ADMIN_AUTH);\n\n NamedViewDetail alternativeWithADifferentView = new NamedViewDetail.Builder()\n .nam...
{ "fields": [ { "declarator": "CACHE_NAME = \"NamedView\"", "modifier": "private static final", "original_string": "private static final String CACHE_NAME = \"NamedView\";", "type": "String", "var_name": "CACHE_NAME" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/s...
{ "body": "public void addNamedView(final NamedViewDetail namedViewDetail, final boolean overwrite) throws CacheOperationFailedException {\n add(namedViewDetail, overwrite, null, null);\n }", "class_method_signature": "NamedViewCache.addNamedView(final NamedViewDetail namedViewDetail, final boolean overwr...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_536
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/iterable/WrappedCloseableIterableTest.java", "identifier": "WrappedCloseableIterableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDelegateCloseToWrappedCloseableIterable() {\n final CloseableIterable<Object> closeableIterable = mock(CloseableIterable.class);\n final WrappedCloseableIterable<Object> wrappedIterable = new WrappedCloseableIterable<>(closeableIterable);\n\n wrappedIterabl...
{ "fields": [ { "declarator": "iterable", "modifier": "private final", "original_string": "private final Iterable<T> iterable;", "type": "Iterable<T>", "var_name": "iterable" } ], "file": "core/common-util/src/main/java/uk/gov/gchq/gaffer/commonutil/iterable/WrappedCloseableI...
{ "body": "@Override\n public void close() {\n CloseableUtil.close(iterable);\n }", "class_method_signature": "WrappedCloseableIterable.close()", "constructor": false, "full_signature": "@Override public void close()", "identifier": "close", "invocations": [ "close" ], "modifiers": "@Ov...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_166
{ "fields": [ { "declarator": "serialisation", "modifier": "private", "original_string": "private ElementSerialisation serialisation;", "type": "ElementSerialisation", "var_name": "serialisation" } ], "file": "store-implementation/hbase-store/src/test/java/uk/gov/gchq/gaffer/...
{ "body": "@Test\n public void shouldThrowExceptionWhenGetPropertiesFromTimestampWhenGroupIsNotFound() {\n // Given\n final long timestamp = System.currentTimeMillis();\n final String group = \"unknownGroup\";\n\n // When / Then\n try {\n serialisation.getPropertiesFro...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ElementSerialisation.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ElementSerialisation.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "public Properties getPropertiesFromTimestamp(final String group, final long timestamp)\n throws SerialisationException {\n final SchemaElementDefinition elementDefinition = schema.getElement(group);\n if (null == elementDefinition) {\n throw new SerialisationException(\"...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_473
{ "fields": [ { "declarator": "abs", "modifier": "", "original_string": "ArrayByteSequence abs;", "type": "ArrayByteSequence", "var_name": "abs" }, { "declarator": "data", "modifier": "", "original_string": "byte[] data;", "type": "byte[]", "var_...
{ "body": "@Test\n public void testFromByteBuffer() {\n final ByteBuffer bb = ByteBuffer.wrap(data, 1, 4);\n abs = new ArrayByteSequence(bb);\n\n assertEquals(\"mile\", abs.toString());\n }", "class_method_signature": "ArrayByteSequenceTest.testFromByteBuffer()", "constructor": false, ...
{ "fields": [ { "declarator": "serialVersionUID = 4850846929226802566L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 4850846929226802566L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "data"...
{ "body": "public String toString() {\n return new String(this.data, this.offset, this.length, StandardCharsets.UTF_8);\n }", "class_method_signature": "ArrayByteSequence.toString()", "constructor": false, "full_signature": "public String toString()", "identifier": "toString", "invocations": [], ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_189
{ "fields": [ { "declarator": "SCHEMA = new Schema.Builder()\n .type(\"string\", String.class)\n .type(\"type\", Boolean.class)\n .edge(TestGroups.EDGE, new SchemaEdgeDefinition.Builder()\n .source(\"string\")\n .destination(\"string\")\...
{ "body": "@Test\n public void shouldConstructWithView() throws OperationException, SerialisationException {\n final GroupFilterProcessor processor = new GroupFilterProcessor(VIEW);\n assertEquals(VIEW, processor.getView());\n }", "class_method_signature": "GroupFilterProcessorTest.shouldConstru...
{ "fields": [ { "declarator": "view", "modifier": "private final", "original_string": "private final View view;", "type": "View", "var_name": "view" } ], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasestore/coprocessor/processor/GroupFilterPro...
{ "body": "public View getView() {\n return view;\n }", "class_method_signature": "GroupFilterProcessor.getView()", "constructor": false, "full_signature": "public View getView()", "identifier": "getView", "invocations": [], "modifiers": "public", "parameters": "()", "return": "View", "sig...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_920
{ "fields": [ { "declarator": "ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values())", "modifier": "public static final", "original_string": "public static final Set<StoreTrait> ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values());", "type": "Set<StoreTrait>", "var_name": "ALL_S...
{ "body": "@Test\n public void shouldValidateAndReturnTrueWithMatchedVertexFilter() {\n // Given\n final ViewValidator validator = new ViewValidator();\n final View view = new View.Builder()\n .edge(TestGroups.EDGE, new ViewElementDefinition.Builder()\n .p...
{ "fields": [ { "declarator": "SKIP_VIEW_VALIDATION = \"skipViewValidation\"", "modifier": "public static final", "original_string": "public static final String SKIP_VIEW_VALIDATION = \"skipViewValidation\";", "type": "String", "var_name": "SKIP_VIEW_VALIDATION" }, { "d...
{ "body": "public ValidationResult validate(final View view, final Schema schema, final Set<StoreTrait> storeTraits) {\n final boolean isStoreOrdered = storeTraits.contains(StoreTrait.ORDERED);\n\n final ValidationResult result = new ValidationResult();\n\n if (null != view) {\n valida...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...