id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
47973088_181
{ "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 shouldDelegatePreCompactWithRequestToStoreScanner() throws IOException {\n // Given\n final ObserverContext<RegionCoprocessorEnvironment> e = mock(ObserverContext.class);\n final Store store = mock(Store.class);\n final InternalScanner scanner = mock(Inter...
{ "fields": [ { "declarator": "schema", "modifier": "private", "original_string": "private Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "serialisation", "modifier": "private", "original_string": "private ElementSerialisation ser...
{ "body": "@Override\n public InternalScanner preCompact(final ObserverContext<RegionCoprocessorEnvironment> e,\n final Store store,\n final InternalScanner scanner,\n final ScanType scanType,\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_494
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/StringUtilTest.java", "identifier": "StringUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void toBytesWhenStringIsValid() {\n assertArrayEquals(\"isValid\".getBytes(), StringUtil.toBytes(\"isValid\"));\n }", "class_method_signature": "StringUtilTest.toBytesWhenStringIsValid()", "constructor": false, "full_signature": "@Test public void toBytesWhenStringIsValid(...
{ "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 byte[] toBytes(final String string) {\n if (null == string) {\n return new byte[0];\n }\n try {\n return string.getBytes(CommonConstants.UTF_8);\n } catch (final UnsupportedEncodingException e) {\n throw new RuntimeException(\"Unabl...
{ "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_1146
{ "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": "STORE_PROPS_ID = \"storePropsId\"", "...
{ "body": "@Test\n public void shouldCreateExporter() throws OperationException {\n // Given\n graphLibrary.add(GRAPH_ID + 1, SCHEMA_ID, schema, STORE_PROPS_ID, storeProperties);\n final Context context = mock(Context.class);\n final User user = new User();\n given(context.getUse...
{ "fields": [], "file": "core/graph/src/main/java/uk/gov/gchq/gaffer/operation/export/graph/handler/ExportToOtherGraphHandler.java", "identifier": "ExportToOtherGraphHandler", "interfaces": "", "methods": [ { "class_method_signature": "ExportToOtherGraphHandler.getExporterClass()", "constructo...
{ "body": "@Override\n protected OtherGraphExporter createExporter(final ExportToOtherGraph export, final Context context, final Store store) {\n return new OtherGraphExporter(context, new GraphForExportDelegate.Builder()\n .store(store)\n .graphId(export.getGraphId())\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_617
{ "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": "EntityIdSerialiserTest.testDeserialiseEmpty()", "constructor": false, "full_signature": "@Test public void testDeserialiseEmpty...
{ "fields": [ { "declarator": "serialVersionUID = -8190219367679033911L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8190219367679033911L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ver...
{ "body": "@Override\n public EntityId deserialiseEmpty() throws SerialisationException {\n return null;\n }", "class_method_signature": "EntityIdSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public EntityId 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_247
{ "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() throws IOException {\n // When\n final Set<Class> classes = service.getTransformFunctions();\n\n // Then\n assertTrue(!classes.isEmpty());\n }", "class_method_signature": "GraphConfigurationServiceTest.shouldGetTransformF...
{ "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> getTransformFunctions() {\n return ReflectionUtil.getSubTypes(Function.class);\n }", "class_method_signature": "GraphConfigurationService.getTransformFunctions()", "constructor": false, "full_signature": "@Override public Set<Class> getTransformFunctions()",...
{ "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_30
{ "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 shouldAddTwoGraphs() throws Exception {\n // Given\n int sizeBefore = store.getGraphs(blankUser, null, ignore).size();\n\n // When\n addGraphWithPaths(ACC_ID_2, PROPERTIES_ALT, PATH_BASIC_ENTITY_SCHEMA_JSON);\n addGraphWithPaths(ACC_ID_1, PROPERTIES...
{ "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_1280
{ "fields": [ { "declarator": "cache", "modifier": "private static", "original_string": "private static JcsCache<String, Integer> cache;", "type": "JcsCache<String, Integer>", "var_name": "cache" } ], "file": "library/cache-library/jcs-cache-service/src/test/java/uk/gov/gchq/...
{ "body": "@Test\n public void shouldThrowExceptionIfAddingNullValue() {\n try {\n cache.put(\"test\", null);\n fail(\"Expected an exception\");\n } catch (final CacheOperationException e) {\n assertNotNull(e.getMessage());\n }\n }", "class_method_signatur...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final GroupCacheAccess<K, V> cache;", "type": "GroupCacheAccess<K, V>", "var_name": "cache" }, { "declarator": "groupName", "modifier": "private final", "original...
{ "body": "@Override\n public void put(final K key, final V value) throws CacheOperationException {\n if (null == key) {\n throw new CacheOperationException(\"Key must not be null\");\n }\n try {\n cache.putInGroup(key, groupName, value);\n } catch (final CacheExce...
{ "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_752
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/ValidateHandlerTest.java", "identifier": "ValidateHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidatedElements() throws OperationException {\n // Given\n final ValidateHandler handler = new ValidateHandler();\n final Store store = mock(Store.class);\n final Validate validate = mock(Validate.class);\n final Element elm1 = mock(Element....
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/ValidateHandler.java", "identifier": "ValidateHandler", "interfaces": "implements OutputOperationHandler<Validate, Iterable<? extends Element>>", "methods": [ { "class_method_signature": "ValidateHandler.doO...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final Validate operation,\n final Context context, final Store store)\n throws OperationException {\n return doOperation(operation, store.getSchema());\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_302
{ "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 shouldAddGlobalElementTransformToEntityGroup() {\n // Given\n final ElementTransformer elementTransformer = new ElementTransformer.Builder()\n .select(TestPropertyNames.PROP_3)\n .execute(new Identity())\n .project(TestProper...
{ "fields": [ { "declarator": "globalElements", "modifier": "private", "original_string": "private List<GlobalViewElementDefinition> globalElements;", "type": "List<GlobalViewElementDefinition>", "var_name": "globalElements" }, { "declarator": "globalEntities", "m...
{ "body": "public void expandGlobalDefinitions() {\n if (null != globalEntities && !globalEntities.isEmpty()) {\n setEntities(expandGlobalDefinitions(getEntities(), getEntityGroups(), globalEntities, false));\n globalEntities = null;\n }\n\n if (null != globalEdges && !globa...
{ "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_586
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/types/function/ToFreqMapTest.java", "identifier": "ToFreqMapTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldConvertNullToFreqMap() {\n // Given\n final ToFreqMap function = new ToFreqMap();\n\n // When\n final FreqMap result = function.apply(null);\n\n // Then\n assertEquals(new FreqMap((String) null), result);\n }", "class_method_signat...
{ "fields": [], "file": "core/type/src/main/java/uk/gov/gchq/gaffer/types/function/ToFreqMap.java", "identifier": "ToFreqMap", "interfaces": "", "methods": [ { "class_method_signature": "ToFreqMap.apply(final Object value)", "constructor": false, "full_signature": "@Override public FreqM...
{ "body": "@Override\n public FreqMap apply(final Object value) {\n return new FreqMap(null != value ? value.toString() : null);\n }", "class_method_signature": "ToFreqMap.apply(final Object value)", "constructor": false, "full_signature": "@Override public FreqMap apply(final Object value)", "id...
{ "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_1054
{ "fields": [ { "declarator": "PATH = \"multiSerialiser.json\"", "modifier": "private static final", "original_string": "private static final String PATH = \"multiSerialiser.json\";", "type": "String", "var_name": "PATH" } ], "file": "core/serialisation/src/test/java/uk/gov/g...
{ "body": "@Test\n public void shouldNotAddMultiSerialiser() {\n try {\n new MultiSerialiser().addSerialiser((byte) 0, new MultiSerialiser(), Object.class);\n fail(\"exception not thrown\");\n } catch (GafferCheckedException e) {\n assertEquals(MultiSerialiserStorage....
{ "fields": [ { "declarator": "serialVersionUID = 8206706506883696003L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 8206706506883696003L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "suppo...
{ "body": "public MultiSerialiser addSerialiser(final byte key, final ToBytesSerialiser serialiser, final Class aClass) throws GafferCheckedException {\n supportedSerialisers.addSerialiserDetails(key, serialiser, aClass);\n return this;\n }", "class_method_signature": "MultiSerialiser.addSerialiser...
{ "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_990
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/util/JsonSerialisationUtilTest.java", "identifier": "JsonSerialisationUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testClassWithBuilder() {\n // Given\n final String className = ClassWithBuilder.class.getName();\n\n // When\n final Map<String, String> result = JsonSerialisationUtil.getSerialisedFieldClasses(className);\n\n // Then\n final Map<String, Stri...
{ "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_1111
{ "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 shouldAcceptOperationChainWhenUserHasAllOpAuths() {\n // Given\n final OperationAuthoriser hook = fromJson(OP_AUTHS_PATH);\n final OperationChain opChain = new OperationChain.Builder()\n .first(new GetElements())\n .then(new Generate...
{ "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_569
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/serialisation/TypeValueSerialiserTest.java", "identifier": "TypeValueSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<TypeValue>" }
{ "body": "@Test\n @Override\n public void shouldDeserialiseEmpty() throws SerialisationException {\n final TypeValue value = serialiser.deserialiseEmpty();\n\n assertNull(value);\n }", "class_method_signature": "TypeValueSerialiserTest.shouldDeserialiseEmpty()", "constructor": false, "fu...
{ "fields": [ { "declarator": "serialVersionUID = 8675867261911636738L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 8675867261911636738L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/type/src/mai...
{ "body": "@Override\n public TypeValue deserialiseEmpty() throws SerialisationException {\n return null;\n }", "class_method_signature": "TypeValueSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public TypeValue 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_139
{ "fields": [ { "declarator": "SCHEMA = Schema.fromJson(StreamUtil.schemas(AccumuloAddElementsFromHdfsJobFactoryTest.class))", "modifier": "private static final", "original_string": "private static final Schema SCHEMA = Schema.fromJson(StreamUtil.schemas(AccumuloAddElementsFromHdfsJobFactoryTest...
{ "body": "@Test\n public void shouldSetNoMoreThanMaxNumberOfReducersSpecified() throws IOException, StoreException, OperationException {\n // Given\n store.initialise(\"graphId\", SCHEMA, PROPERTIES);\n final JobConf localConf = createLocalConf();\n final FileSystem fs = FileSystem.get...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AccumuloAddElementsFromHdfsJobFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AccumuloAddElementsFromHdfsJobFactory.class);", "type": "Logge...
{ "body": "@Override\n public void setupJob(final Job job, final AddElementsFromHdfs operation, final String mapperGenerator, final Store store) throws IOException {\n job.setJarByClass(getClass());\n job.setJobName(getJobName(mapperGenerator, operation.getOutputPath()));\n\n setupMapper(job);...
{ "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_67
{ "fields": [ { "declarator": "GRAPH_ID_A = \"a\"", "modifier": "public static final", "original_string": "public static final String GRAPH_ID_A = \"a\";", "type": "String", "var_name": "GRAPH_ID_A" }, { "declarator": "GRAPH_ID_B = \"b\"", "modifier": "public stat...
{ "body": "@Test\n public void checkSchemaNotLeakedWhenAlreadyExistsUnderDifferentAccessWithOtherGraphs() throws Exception {\n // Given\n final String unusualType = \"unusualType\";\n final String groupEnt = \"ent\";\n final String groupEdge = \"edg\";\n Schema schemaNotToBeExpos...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(FederatedGraphStorage.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FederatedGraphStorage.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "public void put(final Collection<GraphSerialisable> graphs, final FederatedAccess access) throws StorageException {\n for (final GraphSerialisable graph : graphs) {\n put(graph, access);\n }\n }", "class_method_signature": "FederatedGraphStorage.put(final Collection<GraphSeria...
{ "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_1238
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/IfTest.java", "identifier": "IfTest", "interfaces": "", "superclass": "extends OperationTest<If>" }
{ "body": "@Test\n @Override\n public void shouldJsonSerialiseAndDeserialise() {\n // Given\n final If op = new If.Builder<>()\n .input(Arrays.asList(new EntitySeed(\"1\"), new EntitySeed(\"2\")))\n .condition(true)\n .then(new GetElements())\n ...
{ "fields": [ { "declarator": "condition", "modifier": "private", "original_string": "private Boolean condition;", "type": "Boolean", "var_name": "condition" }, { "declarator": "conditional", "modifier": "private", "original_string": "private Conditional con...
{ "body": "@Override\n public String toString() {\n return new ToStringBuilder(this)\n .append(getInput())\n .append(condition)\n .append(conditional)\n .append(then)\n .append(otherwise)\n .append(options)\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_210
{ "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 shouldFilterOutInvalidEntity() throws OperationException, SerialisationException {\n // Given\n final PreAggregationFilterProcessor processor = new PreAggregationFilterProcessor(VIEW);\n\n // When / Then\n assertFalse(processor.test(CellUtil.getLazyCell(ne...
{ "fields": [ { "declarator": "validator", "modifier": "private final", "original_string": "private final ElementValidator validator;", "type": "ElementValidator", "var_name": "validator" } ], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasesto...
{ "body": "@Override\n public boolean test(final LazyElementCell elementCell) {\n return validator.validateInput(elementCell.getElement());\n }", "class_method_signature": "PreAggregationFilterProcessor.test(final LazyElementCell elementCell)", "constructor": false, "full_signature": "@Override pub...
{ "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_640
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/SerialisationFactoryTest.java", "identifier": "SerialisationFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnJavaSerialiserIfNoCustomSerialiserFound() throws SerialisationException {\n // Given\n final Serialiser[] serialisers = new Serialiser[]{\n new RawDateSerialiser(),\n new RawDoubleSerialiser(),\n new RawFloatSeria...
{ "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_355
{ "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 shouldReturnEdgesFromWalkObject() {\n // Given\n final Function<Walk, Set<Edge>> function = new ExtractWalkEdgesFromHop(1);\n final Walk walk = new Walk.Builder()\n .edge(EDGE_AB)\n .entity(ENTITY_B)\n .edge(EDGE_BC)\n...
{ "fields": [ { "declarator": "hop", "modifier": "private", "original_string": "private int hop;", "type": "int", "var_name": "hop" } ], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/graph/function/walk/ExtractWalkEdgesFromHop.java", "identifier": "ExtractWalkEdg...
{ "body": "@Override\n public Set<Edge> apply(final Walk walk) {\n if (null == walk) {\n throw new IllegalArgumentException(\"Walk cannot be null\");\n }\n return walk.getEdges().get(hop);\n }", "class_method_signature": "ExtractWalkEdgesFromHop.apply(final Walk walk)", "cons...
{ "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_705
{ "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 shouldReturnNullIfBothComparatorsAreNull() throws OperationException {\n // Given\n final List<Entity> input = Lists.newArrayList();\n final Min min = new Min.Builder().input(input)\n .build();\n\n final MinHandler handler = new MinHandler()...
{ "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_88
{ "fields": [], "file": "store-implementation/parquet-store/src/test/java/uk/gov/gchq/gaffer/parquetstore/partitioner/GroupPartitionerTest.java", "identifier": "GroupPartitionerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetPartitionIds() {\n // Given\n final PartitionKey key1 = new PartitionKey(new Object[]{1L, 4L});\n final PartitionKey key2 = new PartitionKey(new Object[]{1L, 7L});\n final PartitionKey key3 = new PartitionKey(new Object[]{1L, 9L});\n final Pa...
{ "fields": [ { "declarator": "group", "modifier": "private final", "original_string": "private final String group;", "type": "String", "var_name": "group" }, { "declarator": "splitPoints", "modifier": "private final", "original_string": "private final List<...
{ "body": "public List<Integer> getPartitionIds(final Object[] partialKey) {\n if (null == partialKey) {\n throw new IllegalArgumentException(\"getPartitionIds cannot be called with null partialKey\");\n }\n if (splitPoints.isEmpty()) {\n return Collections.singletonList(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_969
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/schema/SchemaElementDefinitionValidatorTest.java", "identifier": "SchemaElementDefinitionValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidateAndReturnFalseWhenAggregatorIsInvalid() {\n // Given\n final SchemaElementDefinition elementDef = mock(SchemaElementDefinition.class);\n final SchemaElementDefinitionValidator validator = new SchemaElementDefinitionValidator();\n final Map<St...
{ "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_1042
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/raw/RawDoubleSerialiserTest.java", "identifier": "RawDoubleSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Double>" }
{ "body": "@Test\n public void cantSerialiseStringClass() {\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "RawDoubleSerialiserTest.cantSerialiseStringClass()", "constructor": false, "full_signature": "@Test public void cantSerialiseStringClass()", "identifier"...
{ "fields": [ { "declarator": "serialVersionUID = 1568251281744704278L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1568251281744704278L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisatio...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Double.class.equals(clazz);\n }", "class_method_signature": "RawDoubleSerialiser.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_590
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/types/TypeValueTest.java", "identifier": "TypeValueTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testComparisonsAreAsExpected() {\n TypeValue typeValue = new TypeValue(\"a\", \"b\");\n\n assertEquals(0, typeValue.compareTo(new TypeValue(\"a\", \"b\")));\n\n assertTrue(typeValue.compareTo(null) > 0);\n\n assertTrue(typeValue.compareTo(new TypeValue()) ...
{ "fields": [ { "declarator": "stringComparator = Comparator\n .nullsFirst(String::compareTo)", "modifier": "private static", "original_string": "private static Comparator<String> stringComparator = Comparator\n .nullsFirst(String::compareTo);", "type": "Comparator<St...
{ "body": "@Override\n public int compareTo(final TypeValue typeValue) {\n if (null == typeValue) {\n return 1;\n }\n int i = stringComparator.compare(type, typeValue.getType());\n if (i != 0) {\n return i;\n }\n return stringComparator.compare(value,...
{ "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_1107
{ "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 shouldResolveMultipleNestedNamedViews() 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 =...
{ "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_986
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/util/LengthValueBytesSerialiserUtilTest.java", "identifier": "LengthValueBytesSerialiserUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDeserialiseNullValue() throws IOException {\n // Given\n final byte[] bytes = null;\n\n // When\n final byte[] deserialisedBytes = LengthValueBytesSerialiserUtil.deserialise(bytes);\n\n // Then\n assertArrayEquals(new byte[0], deseriali...
{ "fields": [ { "declarator": "EMPTY_BYTES = new byte[0]", "modifier": "private static final", "original_string": "private static final byte[] EMPTY_BYTES = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTES" } ], "file": "core/serialisation/src/main/java/uk/gov/gchq/g...
{ "body": "public static <T> T deserialise(final ToBytesSerialiser<T> serialiser, final byte[] allBytes) throws SerialisationException {\n return deserialise(serialiser, allBytes, 0);\n }", "class_method_signature": "LengthValueBytesSerialiserUtil.deserialise(final ToBytesSerialiser<T> serialiser, final b...
{ "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_656
{ "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 shouldGetScoreForOperationChainWithMultipleScoreResolvers() throws OperationException {\n // Given\n final Map<Class<? extends Operation>, ScoreResolver> resolvers = new HashMap<>();\n\n final ScoreResolver mockResolver = mock(NamedOperationScoreResolver.class);\...
{ "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_206
{ "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 shouldNotFilterOutValidEntity() throws OperationException, SerialisationException {\n // Given\n final PostAggregationFilterProcessor processor = new PostAggregationFilterProcessor(VIEW);\n\n // When / Then\n assertTrue(processor.test(CellUtil.getLazyCell(...
{ "fields": [ { "declarator": "validator", "modifier": "private final", "original_string": "private final ElementValidator validator;", "type": "ElementValidator", "var_name": "validator" } ], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasesto...
{ "body": "@Override\n public boolean test(final LazyElementCell elementCell) {\n return validator.validateAggregation(elementCell.getElement());\n }", "class_method_signature": "PostAggregationFilterProcessor.test(final LazyElementCell elementCell)", "constructor": false, "full_signature": "@Overr...
{ "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_71
{ "fields": [ { "declarator": "schema = new LongVertexOperationsTest().createSchema()", "modifier": "private", "original_string": "private Schema schema = new LongVertexOperationsTest().createSchema();", "type": "Schema", "var_name": "schema" } ], "file": "store-implementatio...
{ "body": "@Test\n public void testQueryGeneratorForGetAllElements(@TempDir java.nio.file.Path tempDir)\n throws IOException, OperationException {\n // Given\n // - Create snapshot folder\n final String folder = String.format(\"file:///%s\", tempDir.toString());\n final Strin...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryGenerator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryGenerator.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public ParquetQuery getParquetQuery(final Operation operation) throws IOException, OperationException {\n if (operation instanceof GetAllElements) {\n return getPathsAndFiltersForAllElements((GetAllElements) operation);\n } else if (operation instanceof GetElements) {\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_713
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/GetWalksHandlerTest.java", "identifier": "GetWalksHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldHandleNullInput() throws Exception {\n // Given\n final GetElements getElements = new GetElements.Builder()\n .view(new View.Builder()\n .edge(TestGroups.EDGE)\n .build())\n .build();\n ...
{ "fields": [ { "declarator": "maxHops = null", "modifier": "private", "original_string": "private Integer maxHops = null;", "type": "Integer", "var_name": "maxHops" }, { "declarator": "prune = true", "modifier": "private", "original_string": "private boolea...
{ "body": "@Override\n public Iterable<Walk> doOperation(final GetWalks getWalks, final Context context, final Store store) throws OperationException {\n // Check input\n if (null == getWalks.getInput()) {\n return null;\n }\n\n // Check there are some operations\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_343
{ "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 shouldGetNotTrail() {\n // Given\n // [A] -> [B] -> [C] -> [B] -> [C]\n\n // When\n final Walk walk = new Walk.Builder()\n .edge(EDGE_AB)\n .edge(EDGE_BC)\n .edge(EDGE_CB)\n .edge(EDGE_BC)\n ...
{ "fields": [ { "declarator": "edges", "modifier": "private final", "original_string": "private final List<Set<Edge>> edges;", "type": "List<Set<Edge>>", "var_name": "edges" }, { "declarator": "entities", "modifier": "private final", "original_string": "priv...
{ "body": "@JsonIgnore\n public boolean isTrail() {\n return Sets.newHashSet(edges).size() == edges.size();\n }", "class_method_signature": "Walk.isTrail()", "constructor": false, "full_signature": "@JsonIgnore public boolean isTrail()", "identifier": "isTrail", "invocations": [ "size", ...
{ "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_197
{ "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 shouldAcceptOnlyEntities() throws OperationException, SerialisationException {\n // Given\n final ElementDedupeFilterProcessor processor = new ElementDedupeFilterProcessor(true, false, null);\n\n // When / Then\n for (final Element element : ELEMENTS) {\n ...
{ "fields": [ { "declarator": "elementSerialisation = new ElementSerialisation(null)", "modifier": "private final", "original_string": "private final ElementSerialisation elementSerialisation = new ElementSerialisation(null);", "type": "ElementSerialisation", "var_name": "elementSeri...
{ "body": "@Override\n public boolean test(final LazyElementCell elementCell) {\n final Cell cell = elementCell.getCell();\n final byte flag = getFlag(cell);\n final boolean isEdge = flag != HBaseStoreConstants.ENTITY;\n\n if (!edges && isEdge) {\n return false;\n }\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_894
{ "fields": [ { "declarator": "stringType", "modifier": "private", "original_string": "private TypeDefinition stringType;", "type": "TypeDefinition", "var_name": "stringType" }, { "declarator": "intType", "modifier": "private", "original_string": "private Ty...
{ "body": "@Test\n public void shouldThrowExceptionIfDefaultVertexSerialiserCouldNotBeFound() {\n //Given\n final SchemaOptimiser optimiser = new SchemaOptimiser();\n final boolean isOrdered = true;\n\n // Add a new entity with vertex that can't be serialised\n schema = new Schem...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SchemaOptimiser.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SchemaOptimiser.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public Schema optimise(final Schema schema, final boolean isStoreOrdered) {\n if (null != schema && null != schema.getTypes()) {\n return new Schema.Builder()\n .merge(schema)\n .types(getOptimisedTypes(schema, isStoreOrdered))\n .v...
{ "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_1015
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/ordered/OrderedDateSerialiserTest.java", "identifier": "OrderedDateSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Date>" }
{ "body": "@Test\n public void cantSerialiseStringClass() {\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "OrderedDateSerialiserTest.cantSerialiseStringClass()", "constructor": false, "full_signature": "@Test public void cantSerialiseStringClass()", "identifie...
{ "fields": [ { "declarator": "serialVersionUID = 6636121009320739764L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6636121009320739764L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "LONG_...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Date.class.equals(clazz);\n }", "class_method_signature": "OrderedDateSerialiser.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_1150
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/data/EntitySeedTest.java", "identifier": "EntitySeedTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<EntitySeed>" }
{ "body": "@Test\n public void shouldSerialiseAndDeserialiseCustomVertexObjects() throws SerialisationException {\n // Given\n final CustomVertex vertex = new CustomVertex();\n vertex.setType(\"type\");\n vertex.setValue(\"value\");\n final EntityId seed = new EntitySeed(vertex);...
{ "fields": [ { "declarator": "serialVersionUID = -1668220155074029644L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1668220155074029644L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ver...
{ "body": "@Override\n public Object getVertex() {\n return vertex;\n }", "class_method_signature": "EntitySeed.getVertex()", "constructor": false, "full_signature": "@Override public Object getVertex()", "identifier": "getVertex", "invocations": [], "modifiers": "@Override public", "parame...
{ "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_528
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/LongUtilTest.java", "identifier": "LongUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetDifferentPositiveTimeBasedRandoms() {\n final int n = 1000;\n\n final Set<Long> timestamps = new HashSet<>(n);\n for (int i = 0; i < n; i++) {\n timestamps.add(LongUtil.getTimeBasedRandom());\n }\n\n assertEquals(1000, timestamps...
{ "fields": [ { "declarator": "RANDOM = new SplittableRandom()", "modifier": "private static final", "original_string": "private static final SplittableRandom RANDOM = new SplittableRandom();", "type": "SplittableRandom", "var_name": "RANDOM" } ], "file": "core/common-util/sr...
{ "body": "public static long getTimeBasedRandom() {\n final long random = (System.currentTimeMillis() << 32) | RANDOM.nextInt(Integer.MAX_VALUE);\n return Long.MIN_VALUE == random ? Long.MAX_VALUE : Math.abs(random);\n }", "class_method_signature": "LongUtil.getTimeBasedRandom()", "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_178
{ "fields": [], "file": "store-implementation/hbase-store/src/test/java/uk/gov/gchq/gaffer/hbasestore/operation/handler/GetAdjacentIdsHandlerTest.java", "identifier": "GetAdjacentIdsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnHBaseRetriever() throws OperationException, StoreException {\n // Given\n final Iterable<EntityId> ids = mock(Iterable.class);\n final Context context = mock(Context.class);\n final User user = mock(User.class);\n final HBaseStore store ...
{ "fields": [], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasestore/operation/handler/GetAdjacentIdsHandler.java", "identifier": "GetAdjacentIdsHandler", "interfaces": "implements OutputOperationHandler<GetAdjacentIds, CloseableIterable<? extends EntityId>>", "methods": [ ...
{ "body": "@Override\n public CloseableIterable<? extends EntityId> doOperation(final GetAdjacentIds operation,\n final Context context, final Store store)\n throws OperationException {\n return doOperation(operation, context.getUser(), ...
{ "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_482
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/OneOrMoreTest.java", "identifier": "OneOrMoreTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldAddAllItemsWithDeduplicate() {\n // Given\n final boolean deduplicate = true;\n final OneOrMore<Integer> collection = new OneOrMore<>(deduplicate);\n\n final Set<Integer> expectedItems = new HashSet<>();\n IntStream.rangeClosed(1, 200).forEach...
{ "fields": [ { "declarator": "newCollection", "modifier": "private final", "original_string": "private final Function<T, Collection<T>> newCollection;", "type": "Function<T, Collection<T>>", "var_name": "newCollection" }, { "declarator": "deduplicate", "modifier"...
{ "body": "public boolean addAll(final Collection<? extends T> items) {\n boolean result = false;\n for (final T item : items) {\n if (add(item)) {\n result = true;\n }\n }\n return result;\n }", "class_method_signature": "OneOrMore.addAll(final 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_26
{ "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 shouldLoadGraphsWithIds() throws Exception {\n // When\n int before = store.getGraphs(blankUser, null, ignore).size();\n\n addGraphWithIds(ACC_ID_2, ID_PROPS_ACC_2, ID_SCHEMA_EDGE);\n addGraphWithIds(ACC_ID_1, ID_PROPS_ACC_1, ID_SCHEMA_ENTITY);\n\n ...
{ "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_1279
{ "fields": [ { "declarator": "cache", "modifier": "private static", "original_string": "private static JcsCache<String, Integer> cache;", "type": "JcsCache<String, Integer>", "var_name": "cache" } ], "file": "library/cache-library/jcs-cache-service/src/test/java/uk/gov/gchq/...
{ "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": "cache", "modifier": "private final", "original_string": "private final GroupCacheAccess<K, V> cache;", "type": "GroupCacheAccess<K, V>", "var_name": "cache" }, { "declarator": "groupName", "modifier": "private final", "original...
{ "body": "@Override\n public void put(final K key, final V value) throws CacheOperationException {\n if (null == key) {\n throw new CacheOperationException(\"Key must not be null\");\n }\n try {\n cache.putInGroup(key, groupName, value);\n } catch (final CacheExce...
{ "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_251
{ "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 shouldSerialiseAndDeserialiseGetStoreTraits() throws IOException {\n // When\n byte[] bytes = JSONSerialiser.serialise(service.getStoreTraits());\n final Set<StoreTrait> traits = JSONSerialiser.deserialise(bytes, Set.class);\n\n // Then\n assertNotN...
{ "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<StoreTrait> getStoreTraits() {\n return graphFactory.getGraph().getStoreTraits();\n }", "class_method_signature": "GraphConfigurationService.getStoreTraits()", "constructor": false, "full_signature": "@Override public Set<StoreTrait> getStoreTraits()", "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_601
{ "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": "EdgeIdSerialiserTest.testDeserialiseEmpty()", "constructor": false, "full_signature": "@Test public void testDeserialiseEmpty()...
{ "fields": [ { "declarator": "serialVersionUID = -7123572023129773512L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -7123572023129773512L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "boo...
{ "body": "@Override\n public EdgeId deserialiseEmpty() throws SerialisationException {\n return null;\n }", "class_method_signature": "EdgeIdSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public EdgeId 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_314
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/elementdefinition/view/ViewUtilTest.java", "identifier": "ViewUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldIgnoreRemovingGroupFromViewWhenNotSet() {\n final View view = new View.Builder()\n .edge(TestGroups.EDGE)\n .build();\n\n final View viewAfterRemove = ViewUtil.removeGroups(view, TestGroups.ENTITY);\n\n JsonAssert.assertEquals(...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/elementdefinition/view/ViewUtil.java", "identifier": "ViewUtil", "interfaces": "", "methods": [ { "class_method_signature": "ViewUtil.ViewUtil()", "constructor": true, "full_signature": "private ViewUtil()", ...
{ "body": "public static View removeGroups(final View view, final String... groups) {\n if (null == view) {\n throw new IllegalArgumentException(\"View cannot be null\");\n }\n\n final LinkedHashMap<String, ViewElementDefinition> entities = new LinkedHashMap<>(view.getEntities());\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_744
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/WhileHandlerTest.java", "identifier": "WhileHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldRepeatWhileConditionIsTrue() throws OperationException {\n // Given\n final List<EntitySeed> input = Collections.singletonList(mock(EntitySeed.class));\n final boolean condition = true;\n final int maxRepeats = 3;\n final GetElements delegate ...
{ "fields": [ { "declarator": "maxRepeats = While.MAX_REPEATS", "modifier": "private", "original_string": "private int maxRepeats = While.MAX_REPEATS;", "type": "int", "var_name": "maxRepeats" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/W...
{ "body": "@Override\n public Object doOperation(final While operation,\n final Context context,\n final Store store) throws OperationException {\n validateMaxRepeats(operation);\n\n Object input = operation.getInput();\n for (int repea...
{ "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_1296
{ "fields": [], "file": "library/flink-library/src/test/java/uk/gov/gchq/gaffer/flink/operation/handler/GafferSinkTest.java", "identifier": "GafferSinkTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDelegateInvokeToGafferAddedInitialise() throws Exception {\n // Given\n final GafferAdder adder = mock(GafferAdder.class);\n final GafferSink sink = new GafferSink(adder);\n final Element element = mock(Element.class);\n\n // When\n sin...
{ "fields": [ { "declarator": "serialVersionUID = 1569145256866410621L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1569145256866410621L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "adder...
{ "body": "@Override\n public void invoke(final Element element) throws Exception {\n adder.add(element);\n }", "class_method_signature": "GafferSink.invoke(final Element element)", "constructor": false, "full_signature": "@Override public void invoke(final Element element)", "identifier": "invok...
{ "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_1081
{ "fields": [ { "declarator": "JSON_PATH = \"/functionAuthoriser.json\"", "modifier": "private static final", "original_string": "private static final String JSON_PATH = \"/functionAuthoriser.json\";", "type": "String", "var_name": "JSON_PATH" } ], "file": "core/graph/src/tes...
{ "body": "@Test\n public void shouldAllowAllFunctionsWhenUnauthorisedFunctionsAreEmpty() {\n // Given\n OperationChain chain = generateOperation(Identity.class, ToString.class);\n\n // When\n FunctionAuthoriser authoriser = new FunctionAuthoriser(new ArrayList<>());\n\n // Then ...
{ "fields": [ { "declarator": "ERROR_MESSAGE_PREFIX = \"Operation chain contained an unauthorised function: \"", "modifier": "private static final", "original_string": "private static final String ERROR_MESSAGE_PREFIX = \"Operation chain contained an unauthorised function: \";", "type": "S...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n if (unauthorisedFunctions == null || unauthorisedFunctions.isEmpty()) {\n return;\n }\n\n Object input = null;\n // Null the input to avoid serialising potentially large ...
{ "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_800
{ "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 shouldFailValidationWhenElementFilterOperationIsNull() {\n // Given\n given(store.getSchema()).willReturn(SCHEMA);\n\n final Edge edge = new Edge.Builder()\n .group(TestGroups.EDGE)\n .source(\"junctionA\")\n .dest(\"j...
{ "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_553
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/iterable/StreamIterableTest.java", "identifier": "StreamIterableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDelegateCloseToStreamIterable() throws IOException {\n // Given\n final StreamSupplier<Object> streamSupplier = mock(StreamSupplier.class);\n final Stream<Object> stream = mock(Stream.class);\n given(streamSupplier.get()).willReturn(stream);\n ...
{ "fields": [ { "declarator": "streamSupplier", "modifier": "private final", "original_string": "private final StreamSupplier<T> streamSupplier;", "type": "StreamSupplier<T>", "var_name": "streamSupplier" } ], "file": "core/common-util/src/main/java/uk/gov/gchq/gaffer/commonu...
{ "body": "@Override\n public void close() {\n CloseableUtil.close(streamSupplier);\n }", "class_method_signature": "StreamIterable.close()", "constructor": false, "full_signature": "@Override public void close()", "identifier": "close", "invocations": [ "close" ], "modifiers": "@Overri...
{ "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_103
{ "fields": [ { "declarator": "BYTE_ENTITY_GRAPH = \"byteEntityGraph\"", "modifier": "private static final", "original_string": "private static final String BYTE_ENTITY_GRAPH = \"byteEntityGraph\";", "type": "String", "var_name": "BYTE_ENTITY_GRAPH" }, { "declarator": "...
{ "body": "@Test\n public void shouldValidateTimestampPropertyHasMaxAggregator() throws Exception {\n // Given\n final AccumuloStore store = new AccumuloStore();\n final Schema schema = new Schema.Builder()\n .entity(TestGroups.ENTITY, new SchemaEntityDefinition.Builder()\n ...
{ "fields": [ { "declarator": "TRAITS =\n Collections.unmodifiableSet(Sets.newHashSet(\n ORDERED,\n VISIBILITY,\n INGEST_AGGREGATION,\n QUERY_AGGREGATION,\n PRE_AGGREGATION_FILTERING,\n ...
{ "body": "@Override\n public void initialise(final String graphId, final Schema schema, final StoreProperties properties) throws StoreException {\n preInitialise(graphId, schema, properties);\n TableUtils.ensureTableExists(this);\n }", "class_method_signature": "AccumuloStore.initialise(final 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_416
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ExtractIdTest.java", "identifier": "ExtractIdTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldReturnNullForNullElement() {\n final ExtractId extractor = new ExtractId();\n\n final Object result = extractor.apply(null);\n\n assertNull(result);\n }", "class_method_signature": "ExtractIdTest.shouldReturnNullForNullElement()", "constructor": fals...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private IdentifierType id;", "type": "IdentifierType", "var_name": "id" } ], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/function/ExtractId.java", "identifier": "ExtractId", ...
{ "body": "@Override\n public Object apply(final Element element) {\n return null != element ? element.getIdentifier(id) : null;\n }", "class_method_signature": "ExtractId.apply(final Element element)", "constructor": false, "full_signature": "@Override public Object apply(final Element element)", ...
{ "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_945
{ "fields": [ { "declarator": "EDGE_DESCRIPTION = \"Edge description\"", "modifier": "public static final", "original_string": "public static final String EDGE_DESCRIPTION = \"Edge description\";", "type": "String", "var_name": "EDGE_DESCRIPTION" }, { "declarator": "ENT...
{ "body": "@Test\n public void shouldReturnTrueWhenSchemaHasAggregationEnabled() {\n final Schema schemaWithAggregators = new Schema.Builder()\n .entity(TestGroups.ENTITY, new SchemaEntityDefinition.Builder().aggregate(true).build())\n ...
{ "fields": [ { "declarator": "unknownType = new TypeDefinition()", "modifier": "private final", "original_string": "private final TypeDefinition unknownType = new TypeDefinition();", "type": "TypeDefinition", "var_name": "unknownType" }, { "declarator": "id", "mo...
{ "body": "@JsonIgnore\n public boolean isAggregationEnabled() {\n boolean isEnabled = false;\n\n for (final Entry<String, ? extends SchemaElementDefinition> entry : getElementDefinitions()) {\n if (null != entry.getValue() && entry.getValue().isAggregate()) {\n isEnabled = ...
{ "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_695
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/compare/MaxHandlerTest.java", "identifier": "MaxHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldFindMaxBasedOnMultipleProperties() 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/MaxHandler.java", "identifier": "MaxHandler", "interfaces": "implements OutputOperationHandler<Max, Element>", "methods": [ { "class_method_signature": "MaxHandler.doOperation(final Max operation, fi...
{ "body": "@Override\n public Element doOperation(final Max 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_1347
{ "fields": [], "file": "library/sketches-library/src/test/java/uk/gov/gchq/gaffer/sketches/datasketches/sampling/serialisation/ReservoirStringsUnionSerialiserTest.java", "identifier": "ReservoirStringsUnionSerialiserTest", "interfaces": "", "superclass": "extends ViaCalculatedArrayValueSerialiserTest<Reservo...
{ "body": "@Test\n public void testCanHandleReservoirItemsUnion() {\n assertTrue(serialiser.canHandle(ReservoirItemsUnion.class));\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "ReservoirStringsUnionSerialiserTest.testCanHandleReservoirItemsUnion()", "const...
{ "fields": [ { "declarator": "serialVersionUID = 5669266109027616942L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5669266109027616942L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "SERIA...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return ReservoirItemsUnion.class.equals(clazz);\n }", "class_method_signature": "ReservoirStringsUnionSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Cl...
{ "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_1202
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/function/FilterTest.java", "identifier": "FilterTest", "interfaces": "", "superclass": "extends OperationTest<Filter>" }
{ "body": "@Test\n @Override\n public void builderShouldCreatePopulatedOperation() {\n // Given\n final Filter filter = new Filter.Builder()\n .input(new Entity(\"road\"), new Edge(\"railway\"))\n .entity(\"road\", new ElementFilter.Builder()\n ...
{ "fields": [ { "declarator": "input", "modifier": "private", "original_string": "private Iterable<? extends Element> input;", "type": "Iterable<? extends Element>", "var_name": "input" }, { "declarator": "edges", "modifier": "private", "original_string": "p...
{ "body": "@Override\n public Iterable<? extends Element> getInput() {\n return input;\n }", "class_method_signature": "Filter.getInput()", "constructor": false, "full_signature": "@Override public Iterable<? extends Element> getInput()", "identifier": "getInput", "invocations": [], "modifier...
{ "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_380
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/comparison/ElementPropertyComparatorTest.java", "identifier": "ElementPropertyComparatorTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<ElementPropertyComparator>" }
{ "body": "@Test\n public void shouldCompareWhenFirstElementsHasWrongGroup() {\n // Given\n final Entity smallEntity = makeEntity(TestGroups.ENTITY, TestPropertyNames.PROP_1, 1);\n final Entity largeEntity = makeEntity(TestGroups.ENTITY_2, TestPropertyNames.PROP_1, 2);\n\n final Element...
{ "fields": [ { "declarator": "comparator", "modifier": "private", "original_string": "private Comparator comparator;", "type": "Comparator", "var_name": "comparator" }, { "declarator": "count = 0", "modifier": "public static", "original_string": "public sta...
{ "body": "@Override\n public int compare(final Element e1, final Element e2) {\n count++;\n\n if (null == e1) {\n if (null == e2) {\n return 0;\n }\n return 1;\n }\n if (null == e2) {\n return -1;\n }\n\n if (!gro...
{ "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_154
{ "fields": [ { "declarator": "factory", "modifier": "private final", "original_string": "private final AbstractCoreKeyIteratorSettingsFactory factory;", "type": "AbstractCoreKeyIteratorSettingsFactory", "var_name": "factory" } ], "file": "store-implementation/accumulo-store/...
{ "body": "@Test\n public void shouldReturnNullPostAggFilterIfNoPreAggFilters() throws Exception {\n // Given\n final AccumuloStore store = mock(AccumuloStore.class);\n final Schema schema = createSchema();\n final View view = new View.Builder()\n .edge(TestGroups.EDGE, n...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AbstractCoreKeyIteratorSettingsFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCoreKeyIteratorSettingsFactory.class);", "type": "Log...
{ "body": "@Override\n public IteratorSetting getElementPostAggregationFilterIteratorSetting(final View view, final AccumuloStore store)\n throws IteratorSettingException {\n if (!view.hasPostAggregationFilters()) {\n LOGGER.debug(\"Returning null from getElementPostAggregationFilterIt...
{ "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_504
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/CollectionUtilTest.java", "identifier": "CollectionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnTreeSetWithProvidedItems() {\n final String[] items = {\"test item 1\", \"test item 2\", null};\n\n final TreeSet<String> treeSet = CollectionUtil.treeSet(items);\n\n assertEquals(2, treeSet.size());\n for (final String item : items) {\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> TreeSet<T> treeSet(final T item) {\n final TreeSet<T> treeSet = new TreeSet<>();\n if (null != item) {\n treeSet.add(item);\n }\n\n return treeSet;\n }", "class_method_signature": "CollectionUtil.treeSet(final T item)", "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_857
{ "fields": [ { "declarator": "EMPTY_ADMIN_AUTH = \"\"", "modifier": "private static final", "original_string": "private static final String EMPTY_ADMIN_AUTH = \"\";", "type": "String", "var_name": "EMPTY_ADMIN_AUTH" }, { "declarator": "mockCache = mock(NamedOperationCa...
{ "body": "@Test\n public void shouldNotAllowForOperationChainWithParameterNotInOperationString() throws OperationException {\n final String opChainJSON = \"{ \\\"operations\\\": [ { \\\"class\\\":\\\"uk.gov.gchq.gaffer.operation.impl.get.GetAllElements\\\" }, { \\\"class\\\":\\\"uk.gov.gchq.gaffer.operatio...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedOperationCache cache;", "type": "NamedOperationCache", "var_name": "cache" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/named/AddNam...
{ "body": "@Override\n public Void doOperation(final AddNamedOperation operation, final Context context, final Store store) throws OperationException {\n try {\n final NamedOperationDetail namedOperationDetail = new NamedOperationDetail.Builder()\n .operationChain(operation.get...
{ "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_912
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/schema/SchemaEntityDefinitionTest.java", "identifier": "SchemaEntityDefinitionTest", "interfaces": "", "superclass": "extends SchemaElementDefinitionTest<SchemaEntityDefinition>" }
{ "body": "@Test\n public void shouldOverrideVertexWhenMerging() {\n // Given\n final SchemaEntityDefinition elementDef1 = new SchemaEntityDefinition.Builder()\n .vertex(\"vertex.integer\")\n .build();\n\n final SchemaEntityDefinition elementDef2 = new SchemaEntit...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/schema/SchemaEntityDefinition.java", "identifier": "SchemaEntityDefinition", "interfaces": "", "methods": [ { "class_method_signature": "SchemaEntityDefinition.getVertex()", "constructor": false, "full_signature":...
{ "body": "public String getVertex() {\n return getIdentifierTypeName(IdentifierType.VERTEX);\n }", "class_method_signature": "SchemaEntityDefinition.getVertex()", "constructor": false, "full_signature": "public String getVertex()", "identifier": "getVertex", "invocations": [ "getIdentifierTyp...
{ "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_1039
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/raw/CompactRawLongSerialiserTest.java", "identifier": "CompactRawLongSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Long>" }
{ "body": "@Test\n public void canSerialiseLongClass() {\n assertTrue(serialiser.canHandle(Long.class));\n }", "class_method_signature": "CompactRawLongSerialiserTest.canSerialiseLongClass()", "constructor": false, "full_signature": "@Test public void canSerialiseLongClass()", "identifier": "canS...
{ "fields": [ { "declarator": "serialVersionUID = 6104372357426908732L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6104372357426908732L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisatio...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Long.class.equals(clazz);\n }", "class_method_signature": "CompactRawLongSerialiser.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_1193
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/GetWalksTest.java", "identifier": "GetWalksTest", "interfaces": "", "superclass": "extends OperationTest<GetWalks>" }
{ "body": "@Test\n public void shouldValidateWhenPreFiltersContainsAnOperationWhichDoesNotAllowAnInput() {\n // Given\n final GetWalks getWalks = new GetWalks.Builder().input(new EntitySeed(\"1\"), new EntitySeed(\"2\"))\n .operations(new OperationCh...
{ "fields": [ { "declarator": "HOP_DEFINITION = \"A hop is a GetElements operation that selects at least 1 edge group.\"", "modifier": "public static final", "original_string": "public static final String HOP_DEFINITION = \"A hop is a GetElements operation that selects at least 1 edge group.\";"...
{ "body": "@Override\n public ValidationResult validate() {\n final ValidationResult result = InputOutput.super.validate();\n\n final int getEdgeOperations = getNumberOfGetEdgeOperations();\n\n if (getEdgeOperations < 1) {\n result.addError(\"No hops were provided. \" + HOP_DEFINITI...
{ "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_441
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/ElementTest.java", "identifier": "ElementTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnItselfForGetElement() {\n final Element element = newElement(\"group\");\n\n final Element result = element.getElement();\n\n assertSame(element, result);\n }", "class_method_signature": "ElementTest.shouldReturnItselfForGetElement()", "constru...
{ "fields": [ { "declarator": "DEFAULT_GROUP = \"UNKNOWN\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_GROUP = \"UNKNOWN\";", "type": "String", "var_name": "DEFAULT_GROUP" }, { "declarator": "properties", "modifier":...
{ "body": "@JsonIgnore\n public Element getElement() {\n return this;\n }", "class_method_signature": "Element.getElement()", "constructor": false, "full_signature": "@JsonIgnore public Element getElement()", "identifier": "getElement", "invocations": [], "modifiers": "@JsonIgnore 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_1310
{ "fields": [ { "declarator": "BOUNDED_TIMESTAMP_SET_AGGREGATOR\n = new BoundedTimestampSetAggregator()", "modifier": "private static final", "original_string": "private static final BoundedTimestampSetAggregator BOUNDED_TIMESTAMP_SET_AGGREGATOR\n = new BoundedTimestampSetA...
{ "body": "@Test\n public void testAggregateWhenAIsInSampleStateAndBIsInNotFullState() {\n // Given\n final BoundedTimestampSet boundedTimestampSet1 = new BoundedTimestampSet(CommonTimeUtil.TimeBucket.SECOND, 10);\n final Set<Instant> instants1 = new HashSet<>();\n instants1.add(Instant...
{ "fields": [], "file": "library/time-library/src/main/java/uk/gov/gchq/gaffer/time/binaryoperator/BoundedTimestampSetAggregator.java", "identifier": "BoundedTimestampSetAggregator", "interfaces": "", "methods": [ { "class_method_signature": "BoundedTimestampSetAggregator._apply(final BoundedTimesta...
{ "body": "@Override\n protected BoundedTimestampSet _apply(final BoundedTimestampSet a, final BoundedTimestampSet b) {\n // Can only be merged if they have the same time bucket and maximum size.\n if (!a.getTimeBucket().equals(b.getTimeBucket())) {\n throw new IllegalArgumentException(\"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_768
{ "fields": [ { "declarator": "store = mock(Store.class)", "modifier": "private final", "original_string": "private final Store store = mock(Store.class);", "type": "Store", "var_name": "store" }, { "declarator": "context = new Context(new User())", "modifier": "p...
{ "body": "@Test\n public void shouldExecuteThenWithBooleanCondition() throws OperationException {\n // Given\n final Object input = Arrays.asList(new EntitySeed(\"1\"), new EntitySeed(\"2\"));\n final GetElements then = mock(GetElements.class);\n final GetAllElements otherwise = mock(G...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/IfHandler.java", "identifier": "IfHandler", "interfaces": "implements OutputOperationHandler<If<Object, Object>, Object>", "methods": [ { "class_method_signature": "IfHandler.doOperation(final If operation, ...
{ "body": "@Override\n public Object doOperation(final If operation, final Context context, final Store store) throws OperationException {\n final Object input = operation.getInput();\n\n boolean computedCondition;\n\n if (null == operation.getCondition()) {\n if (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_292
{ "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 shouldOverrideGlobalExcludePropertiesWhenSpecificEdgeGroupExcludePropertiesSet() {\n // Given\n final View view = new View.Builder()\n .globalEdges(new GlobalViewElementDefinition.Builder()\n .groups(TestGroups.EDGE)\n ...
{ "fields": [ { "declarator": "globalElements", "modifier": "private", "original_string": "private List<GlobalViewElementDefinition> globalElements;", "type": "List<GlobalViewElementDefinition>", "var_name": "globalElements" }, { "declarator": "globalEntities", "m...
{ "body": "public void expandGlobalDefinitions() {\n if (null != globalEntities && !globalEntities.isEmpty()) {\n setEntities(expandGlobalDefinitions(getEntities(), getEntityGroups(), globalEntities, false));\n globalEntities = null;\n }\n\n if (null != globalEdges && !globa...
{ "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_338
{ "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 shouldGetEntitiesForVertices() {\n // Given\n // [A] -> [E] -> [D]\n // \\ \\ \\\n // (BasicEntity) (BasicEntity) (BasicEntity)\n\n // When\n final Walk walk = new Walk.Builder()\n .enti...
{ "fields": [ { "declarator": "edges", "modifier": "private final", "original_string": "private final List<Set<Edge>> edges;", "type": "List<Set<Edge>>", "var_name": "edges" }, { "declarator": "entities", "modifier": "private final", "original_string": "priv...
{ "body": "@JsonIgnore\n public Set<Entity> getEntitiesForVertex(final Object vertex) {\n return entities.stream()\n .filter(e -> e.getKey().equals(vertex))\n .map(Entry::getValue)\n .flatMap(Set::stream)\n .collect(toSet());\n }", "class_meth...
{ "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_787
{ "fields": [ { "declarator": "store = mock(Store.class)", "modifier": "private final", "original_string": "private final Store store = mock(Store.class);", "type": "Store", "var_name": "store" }, { "declarator": "context = new Context()", "modifier": "private fin...
{ "body": "@Test\n public void shouldAggregateEdgesFromMultipleGroups() throws OperationException {\n final Schema schema = new Schema.Builder()\n .edge(TestGroups.EDGE, new SchemaEdgeDefinition.Builder()\n .aggregator(new ElementAggregator.Builder()\n ...
{ "fields": [ { "declarator": "validator = new AggregateValidator()", "modifier": "private final", "original_string": "private final FunctionValidator<Aggregate> validator = new AggregateValidator();", "type": "FunctionValidator<Aggregate>", "var_name": "validator" } ], "file...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final Aggregate operation, final Context context, final Store store) throws OperationException {\n return doOperation(operation, store.getSchema());\n }", "class_method_signature": "AggregateHandler.doOperation(final Aggregate 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_1255
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/named/operation/NamedOperationDetailTest.java", "identifier": "NamedOperationDetailTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConfigureCustomWriteAccessPredicateWhenSpecified() {\n final AccessPredicate customAccessPredicate = new AccessPredicate(new CustomUserPredicate());\n final NamedOperationDetail namedOperationDetail = getBaseNamedOperationDetailBuilder()\n .writeAcc...
{ "fields": [ { "declarator": "serialVersionUID = -8831783492657131469L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8831783492657131469L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "CHA...
{ "body": "public AccessPredicate getWriteAccessPredicate() {\n try {\n return writeAccessPredicateJson != null ? JSONSerialiser.deserialise(writeAccessPredicateJson, AccessPredicate.class) : null;\n } catch (final SerialisationException e) {\n throw new IllegalArgumentException(\"...
{ "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_841
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToListHandlerTest.java", "identifier": "ToListHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConvertIterableToList() throws OperationException {\n // Given\n final List<Integer> originalList = Arrays.asList(1, 2, 3);\n\n final Iterable originalResults = new WrappedCloseableIterable<>(originalList);\n final ToListHandler handler = new ToListH...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToListHandler.java", "identifier": "ToListHandler", "interfaces": "implements OutputOperationHandler<ToList<T>, List<? extends T>>", "methods": [ { "class_method_signature": "ToListHandler.doOperation...
{ "body": "@Override\n public List<T> doOperation(final ToList<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 .colle...
{ "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_512
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/CollectionUtilTest.java", "identifier": "CollectionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFalseWhenContainsAnyCalledWithNullValue() {\n // Given\n final Collection<Integer> collection = Sets.newHashSet(10, 20, 30);\n\n // When\n final boolean result = CollectionUtil.containsAny(collection, null);\n\n // Then\n assertFa...
{ "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 boolean containsAny(final Collection collection, final Object[] objects) {\n boolean result = false;\n if (null != collection && null != objects) {\n for (final Object object : objects) {\n if (collection.contains(object)) {\n result ...
{ "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_142
{ "fields": [ { "declarator": "SCHEMA = Schema.fromJson(StreamUtil.schemas(AccumuloAddElementsFromHdfsJobFactoryTest.class))", "modifier": "private static final", "original_string": "private static final Schema SCHEMA = Schema.fromJson(StreamUtil.schemas(AccumuloAddElementsFromHdfsJobFactoryTest...
{ "body": "@Test\n public void shouldThrowExceptionWhenMaxReducersSetOutsideOfRange() throws IOException, StoreException, OperationException {\n // Given\n store.initialise(\"graphId\", SCHEMA, PROPERTIES);\n final JobConf localConf = createLocalConf();\n final FileSystem fs = FileSyste...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AccumuloAddElementsFromHdfsJobFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AccumuloAddElementsFromHdfsJobFactory.class);", "type": "Logge...
{ "body": "@Override\n public void setupJob(final Job job, final AddElementsFromHdfs operation, final String mapperGenerator, final Store store) throws IOException {\n job.setJarByClass(getClass());\n job.setJobName(getJobName(mapperGenerator, operation.getOutputPath()));\n\n setupMapper(job);...
{ "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_457
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/JsonUtilTest.java", "identifier": "JsonUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnTrueWhenJsonObjectsAreEqualButInADifferentOrder() {\n final String json1 = \"{\\\"a\\\": 1, \\\"b\\\": 2}\";\n final String json2 = \"{\\\"b\\\": 2, \\\"a\\\": 1}\";\n\n assertTrue(JsonUtil.equals(json1, json2));\n assertTrue(JsonUtil.equals(js...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(JsonUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(JsonUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "declara...
{ "body": "public static boolean equals(final String expectedJson, final String actualJson) {\n try {\n final Map expectedSchemaMap = null != expectedJson ? OBJECT_MAPPER.readValue(expectedJson, Map.class) : Collections.emptyMap();\n final Map actualSchemaMap = null != actualJson ? 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_1185
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/compare/MinTest.java", "identifier": "MinTest", "interfaces": "", "superclass": "extends OperationTest<Min>" }
{ "body": "@Test\n @Override\n public void builderShouldCreatePopulatedOperation() {\n // Given\n final Min min = new Builder().input(new Entity.Builder()\n .group(TestGroups.ENTITY)\n .property(\"property\", 1)\n .build(), new Entity.Builder()\n ...
{ "fields": [ { "declarator": "input", "modifier": "private", "original_string": "private Iterable<? extends Element> input;", "type": "Iterable<? extends Element>", "var_name": "input" }, { "declarator": "comparators", "modifier": "@Required\n private", ...
{ "body": "@Override\n public Iterable<? extends Element> getInput() {\n return input;\n }", "class_method_signature": "Min.getInput()", "constructor": false, "full_signature": "@Override public Iterable<? extends Element> getInput()", "identifier": "getInput", "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_904
{ "fields": [ { "declarator": "PROPERTY_STRING_TYPE = \"property.string\"", "modifier": "public static final", "original_string": "public static final String PROPERTY_STRING_TYPE = \"property.string\";", "type": "String", "var_name": "PROPERTY_STRING_TYPE" } ], "file": "core/...
{ "body": "@Test\n public void shouldReturnQueryAggregator() {\n // Given\n final T elementDef = createBuilder()\n .property(\"property1\", PROPERTY_STRING_TYPE)\n .property(\"property2\", PROPERTY_STRING_TYPE)\n .property(\"property3\", PROPERTY_STRING_TY...
{ "fields": [ { "declarator": "elementDefValidator", "modifier": "private final", "original_string": "private final SchemaElementDefinitionValidator elementDefValidator;", "type": "SchemaElementDefinitionValidator", "var_name": "elementDefValidator" }, { "declarator": "...
{ "body": "@JsonIgnore\n public ElementAggregator getQueryAggregator(final Set<String> viewGroupBy, final ElementAggregator viewAggregator) {\n if (null == viewAggregator) {\n return getQueryAggregatorForNullViewAggregator(viewGroupBy);\n }\n return getQueryAggregatorForNonNullViewA...
{ "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_284
{ "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 shouldOverrideGlobalExcludePropertiesWhenSpecificEntityGroupExcludePropertiesSet() {\n // Given\n final View view = new View.Builder()\n .globalEntities(new GlobalViewElementDefinition.Builder()\n .groups(TestGroups.ENTITY)\n ...
{ "fields": [ { "declarator": "globalElements", "modifier": "private", "original_string": "private List<GlobalViewElementDefinition> globalElements;", "type": "List<GlobalViewElementDefinition>", "var_name": "globalElements" }, { "declarator": "globalEntities", "m...
{ "body": "public void expandGlobalDefinitions() {\n if (null != globalEntities && !globalEntities.isEmpty()) {\n setEntities(expandGlobalDefinitions(getEntities(), getEntityGroups(), globalEntities, false));\n globalEntities = null;\n }\n\n if (null != globalEdges && !globa...
{ "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_1306
{ "fields": [], "file": "library/time-library/src/test/java/uk/gov/gchq/gaffer/time/LongTimeSeriesTest.java", "identifier": "LongTimeSeriesTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<LongTimeSeries>" }
{ "body": "@Test\n @Override\n public void shouldJsonSerialiseAndDeserialise() {\n // Given\n final LongTimeSeries obj = getTestObject();\n\n // When\n final byte[] json = toJson(obj);\n final LongTimeSeries deserialisedObj = fromJson(json);\n\n // Then\n JsonAss...
{ "fields": [ { "declarator": "VALID_TIME_BUCKETS = Sets.newHashSet(\n MILLISECOND,\n SECOND,\n MINUTE,\n HOUR,\n DAY,\n WEEK,\n MONTH,\n YEAR\n )", "modifier": "private static final", "original_string": "...
{ "body": "@Override\n public String toString() {\n return new ToStringBuilder(this)\n .append(\"timeBucket\", timeBucket)\n .append(\"timeSeries\", timeSeries)\n .build();\n }", "class_method_signature": "LongTimeSeries.toString()", "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_1243
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/OperationChainTest.java", "identifier": "OperationChainTest", "interfaces": "", "superclass": "extends OperationsTest<OperationChain>" }
{ "body": "@Test\n public void shouldBuildOperationChainWithSingleOperation() {\n // Given\n final GetAdjacentIds getAdjacentIds = mock(GetAdjacentIds.class);\n\n // When\n final OperationChain opChain = new OperationChain.Builder()\n .first(getAdjacentIds)\n ...
{ "fields": [ { "declarator": "operations", "modifier": "private", "original_string": "private List<Operation> operations;", "type": "List<Operation>", "var_name": "operations" }, { "declarator": "options", "modifier": "private", "original_string": "private ...
{ "body": "@Override\n @JsonIgnore\n public List<Operation> getOperations() {\n return operations;\n }", "class_method_signature": "OperationChain.getOperations()", "constructor": false, "full_signature": "@Override @JsonIgnore public List<Operation> getOperations()", "identifier": "getOperati...
{ "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_791
{ "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 shouldFilterByGroup() throws OperationException {\n // Given\n given(store.getSchema()).willReturn(SCHEMA);\n\n final Edge edge = new Edge.Builder()\n .group(TestGroups.EDGE)\n .source(\"junctionA\")\n .dest(\"junction...
{ "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_115
{ "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 shouldPassWithSameArraysAndMatchingRange() throws Exception {\n br1 = new BytesAndRange(a, 0, a.length);\n br2 = new BytesAndRange(a, 0, a.length);\n assertTrue(ByteUtils.areKeyBytesEqual(br1, br2));\n }", "class_method_signature": "ByteUtilsTest.shouldPassW...
{ "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_545
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/iterable/LimitedInMemorySortedIterableTest.java", "identifier": "LimitedInMemorySortedIterableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDeduplicateEntries() {\n final LimitedInMemorySortedIterable<Integer> list = new LimitedInMemorySortedIterable<Integer>(Comparator.naturalOrder(), 100, true);\n\n list.add(1);\n list.add(1);\n\n assertEquals(Collections.singletonList(1), Lists.newArr...
{ "fields": [ { "declarator": "comparator", "modifier": "private final", "original_string": "private final Comparator<E> comparator;", "type": "Comparator<E>", "var_name": "comparator" }, { "declarator": "deduplicate", "modifier": "private final", "original_...
{ "body": "public boolean add(final E e) {\n boolean result = false;\n\n final OneOrMore<E> values = backingMap.get(e);\n // Skip the item if we are deduplicating and the item already exists\n boolean skipItem = (deduplicate && null != values && values.contains(e));\n if (!skipItem)...
{ "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_816
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToEntitySeedsHandlerTest.java", "identifier": "ToEntitySeedsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldHandleNullInput() throws OperationException {\n // Given\n final ToEntitySeedsHandler handler = new ToEntitySeedsHandler();\n final ToEntitySeeds operation = mock(ToEntitySeeds.class);\n\n given(operation.getInput()).willReturn(null);\n\n //Wh...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToEntitySeedsHandler.java", "identifier": "ToEntitySeedsHandler", "interfaces": "implements OutputOperationHandler<ToEntitySeeds, Iterable<? extends EntitySeed>>", "methods": [ { "class_method_signatu...
{ "body": "@Override\n public Iterable<EntitySeed> doOperation(final ToEntitySeeds operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getInput()) {\n return null;\n }\n\n return new StreamMapIterable<>(\n 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_1097
{ "fields": [ { "declarator": "OP_CHAIN_LIMITER_PATH = \"opChainLimiter.json\"", "modifier": "private static final", "original_string": "private static final String OP_CHAIN_LIMITER_PATH = \"opChainLimiter.json\";", "type": "String", "var_name": "OP_CHAIN_LIMITER_PATH" } ], "...
{ "body": "@Test\n public void shouldRejectOperationChainWhenUserHasMaxAuthScoreLessThanChainScore() {\n // Given\n final OperationChainLimiter hook = fromJson(OP_CHAIN_LIMITER_PATH);\n final OperationChain opChain = new OperationChain.Builder()\n .first(new GetAllElements())\n ...
{ "fields": [ { "declarator": "scorer = new ScoreOperationChainHandler()", "modifier": "private", "original_string": "private ScoreOperationChainHandler scorer = new ScoreOperationChainHandler();", "type": "ScoreOperationChainHandler", "var_name": "scorer" } ], "file": "core/...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n if (null != opChain) {\n Integer chainScore = scorer.getChainScore(opChain, context.getUser());\n Integer maxAuthScore = scorer.getMaxUserAuthScore(context.getUser().getOpAuths());...
{ "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_953
{ "fields": [ { "declarator": "EDGE_DESCRIPTION = \"Edge description\"", "modifier": "public static final", "original_string": "public static final String EDGE_DESCRIPTION = \"Edge description\";", "type": "String", "var_name": "EDGE_DESCRIPTION" }, { "declarator": "ENT...
{ "body": "@Test\n public void shouldReturnTrueWhenSchemaHasValidatorEdgeFilters() {\n // Given\n final Schema schema = new Schema.Builder()\n .edge(TestGroups.EDGE,\n new SchemaEdgeDefinition.Builder()....
{ "fields": [ { "declarator": "unknownType = new TypeDefinition()", "modifier": "private final", "original_string": "private final TypeDefinition unknownType = new TypeDefinition();", "type": "TypeDefinition", "var_name": "unknownType" }, { "declarator": "id", "mo...
{ "body": "public boolean hasValidation() {\n for (final SchemaElementDefinition elementDef : new ChainedIterable<SchemaElementDefinition>(getEntities().values(), getEdges().values())) {\n if (null != elementDef) {\n if (elementDef.hasValidation()) {\n return true;\...
{ "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_1078
{ "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 shouldThrowExceptionOnExecuteJobUsingJobWithANullUser() throws OperationException {\n // Given\n final User user = null;\n final OperationChain opChain = mock(OperationChain.class);\n\n final Graph graph = new Graph.Builder()\n .config(new G...
{ "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 JobDetail executeJob(final Operation operation, final User user) throws OperationException {\n return executeJob(new GraphRequest<>(operation, user)).getResult();\n }", "class_method_signature": "Graph.executeJob(final Operation operation, final User user)", "constructor": false, "fu...
{ "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_400
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ElementFilterTest.java", "identifier": "ElementFilterTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<ElementFilter>" }
{ "body": "@Test\n public void shouldExecuteNotPredicates() {\n final ElementFilter filter = new ElementFilter.Builder()\n .select(TestPropertyNames.PROP_1, TestPropertyNames.PROP_2)\n .execute(new Not<>(new Or.Builder<>()\n .select(0)\n ...
{ "fields": [ { "declarator": "elementTuple = new ElementTuple()", "modifier": "private final", "original_string": "private final ElementTuple elementTuple = new ElementTuple();", "type": "ElementTuple", "var_name": "elementTuple" }, { "declarator": "readOnly", "m...
{ "body": "public boolean test(final Element element) {\n elementTuple.setElement(element);\n return test(elementTuple);\n }", "class_method_signature": "ElementFilter.test(final Element element)", "constructor": false, "full_signature": "public boolean test(final Element element)", "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_1351
{ "fields": [ { "declarator": "DELTA = 0.01D", "modifier": "private static final", "original_string": "private static final double DELTA = 0.01D;", "type": "double", "var_name": "DELTA" } ], "file": "library/sketches-library/src/test/java/uk/gov/gchq/gaffer/sketches/datasketc...
{ "body": "@Test\n public void testCanHandleUnion() {\n assertTrue(serialiser.canHandle(Union.class));\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "UnionSerialiserTest.testCanHandleUnion()", "constructor": false, "full_signature": "@Test public void tes...
{ "fields": [ { "declarator": "serialVersionUID = -7510002118163110532L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -7510002118163110532L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/sketche...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Union.class.equals(clazz);\n }", "class_method_signature": "UnionSerialiser.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_729
{ "fields": [ { "declarator": "context", "modifier": "private", "original_string": "private Context context;", "type": "Context", "var_name": "context" }, { "declarator": "store", "modifier": "private", "original_string": "private Store store;", "type"...
{ "body": "@Test\n public void shouldExtractFirstItem() throws OperationException {\n // Given\n final MapHandler<Iterable<Iterable<Integer>>, Iterable<Integer>> handler = new MapHandler<>();\n\n final Map<Iterable<Iterable<Integer>>, Iterable<Integer>> operation = new Map.Builder<Iterable<Ite...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/MapHandler.java", "identifier": "MapHandler", "interfaces": "implements OutputOperationHandler<Map<I, O>, O>", "methods": [ { "class_method_signature": "MapHandler.doOperation(final Map<I, O> operation, fina...
{ "body": "@Override\n public O doOperation(final Map<I, O> operation, final Context context, final Store store) throws OperationException {\n if (null == operation) {\n throw new OperationException(\"Operation cannot be null\");\n }\n\n Object input = operation.getInput();\n\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_379
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/comparison/ElementPropertyComparatorTest.java", "identifier": "ElementPropertyComparatorTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<ElementPropertyComparator>" }
{ "body": "@Test\n public void shouldCompareWhenBothElementsHaveWrongGroup() {\n // Given\n final Entity smallEntity = makeEntity(TestGroups.ENTITY, TestPropertyNames.PROP_1, 1);\n final Entity largeEntity = makeEntity(TestGroups.ENTITY, TestPropertyNames.PROP_1, 2);\n\n final ElementPr...
{ "fields": [ { "declarator": "comparator", "modifier": "private", "original_string": "private Comparator comparator;", "type": "Comparator", "var_name": "comparator" }, { "declarator": "count = 0", "modifier": "public static", "original_string": "public sta...
{ "body": "@Override\n public int compare(final Element e1, final Element e2) {\n count++;\n\n if (null == e1) {\n if (null == e2) {\n return 0;\n }\n return 1;\n }\n if (null == e2) {\n return -1;\n }\n\n if (!gro...
{ "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_683
{ "fields": [ { "declarator": "GROUP1 = \"GROUP1\"", "modifier": "private static final", "original_string": "private static final String GROUP1 = \"GROUP1\";", "type": "String", "var_name": "GROUP1" }, { "declarator": "GROUP2 = \"GROUP2\"", "modifier": "private st...
{ "body": "@Test\n public void shouldReturnGroupCountsUpToLimit() throws OperationException, IOException {\n // Given\n final CountGroupsHandler handler = new CountGroupsHandler();\n final Store store = mock(Store.class);\n final CountGroups countGroups = mock(CountGroups.class);\n ...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/CountGroupsHandler.java", "identifier": "CountGroupsHandler", "interfaces": "implements OutputOperationHandler<CountGroups, GroupCounts>", "methods": [ { "class_method_signature": "CountGroupsHandler.doOpera...
{ "body": "@Override\n public GroupCounts doOperation(final CountGroups operation,\n final Context context, final Store store)\n throws OperationException {\n final GroupCounts groupCounts = new GroupCounts();\n try {\n int count = 0;\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_396
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ElementFilterTest.java", "identifier": "ElementFilterTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<ElementFilter>" }
{ "body": "@Test\n public void shouldTestElementOnLambdaPredicate() {\n // Given\n final Predicate<Object> predicate = p -> null == p || String.class.isAssignableFrom(p.getClass());\n final ElementFilter filter = new ElementFilter.Builder()\n .select(TestPropertyNames.PROP_1)\n ...
{ "fields": [ { "declarator": "elementTuple = new ElementTuple()", "modifier": "private final", "original_string": "private final ElementTuple elementTuple = new ElementTuple();", "type": "ElementTuple", "var_name": "elementTuple" }, { "declarator": "readOnly", "m...
{ "body": "public boolean test(final Element element) {\n elementTuple.setElement(element);\n return test(elementTuple);\n }", "class_method_signature": "ElementFilter.test(final Element element)", "constructor": false, "full_signature": "public boolean test(final Element element)", "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_1214
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/SampleElementsForSplitPointsTest.java", "identifier": "SampleElementsForSplitPointsTest", "interfaces": "", "superclass": "extends OperationTest<SampleElementsForSplitPoints>" }
{ "body": "@Test\n public void shouldFailValidationIfNumSplitsIsLessThan1() {\n // Given\n final SampleElementsForSplitPoints op = new SampleElementsForSplitPoints.Builder<>().numSplits(0).build();\n\n // When\n final ValidationResult result = op.validate();\n\n // Then\n ...
{ "fields": [ { "declarator": "input", "modifier": "private", "original_string": "private Iterable<? extends Element> input;", "type": "Iterable<? extends Element>", "var_name": "input" }, { "declarator": "numSplits", "modifier": "private", "original_string"...
{ "body": "@Override\n public ValidationResult validate() {\n final ValidationResult result = InputOutput.super.validate();\n if (null != numSplits && numSplits < 1) {\n result.addError(\"numSplits must be null or greater than 0\");\n }\n if (proportionToSample > 1 || proport...
{ "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_1350
{ "fields": [ { "declarator": "DELTA = 0.01D", "modifier": "private static final", "original_string": "private static final double DELTA = 0.01D;", "type": "double", "var_name": "DELTA" }, { "declarator": "SERIALISER = new SketchSerialiser()", "modifier": "private...
{ "body": "@Test\n public void testCanHandleUnion() {\n assertTrue(SERIALISER.canHandle(Sketch.class));\n assertFalse(SERIALISER.canHandle(String.class));\n }", "class_method_signature": "SketchSerialiserTest.testCanHandleUnion()", "constructor": false, "full_signature": "@Test public void t...
{ "fields": [ { "declarator": "serialVersionUID = 7334348024327614467L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7334348024327614467L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/sketches-...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Sketch.class.equals(clazz);\n }", "class_method_signature": "SketchSerialiser.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_728
{ "fields": [ { "declarator": "context", "modifier": "private", "original_string": "private Context context;", "type": "Context", "var_name": "context" }, { "declarator": "store", "modifier": "private", "original_string": "private Store store;", "type"...
{ "body": "@Test\n public void shouldMapMultipleObjects() throws OperationException {\n // Given\n final MapHandler<Iterable<Integer>, Iterable<String>> handler = new MapHandler<>();\n\n final Map<Iterable<Integer>, Iterable<String>> operation = new Map.Builder<Iterable<Integer>>()\n ...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/MapHandler.java", "identifier": "MapHandler", "interfaces": "implements OutputOperationHandler<Map<I, O>, O>", "methods": [ { "class_method_signature": "MapHandler.doOperation(final Map<I, O> operation, fina...
{ "body": "@Override\n public O doOperation(final Map<I, O> operation, final Context context, final Store store) throws OperationException {\n if (null == operation) {\n throw new OperationException(\"Operation cannot be null\");\n }\n\n Object input = operation.getInput();\n\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_378
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/comparison/ElementPropertyComparatorTest.java", "identifier": "ElementPropertyComparatorTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<ElementPropertyComparator>" }
{ "body": "@Test\n public void shouldCompareWhenSecondElementHasMissingProperties() {\n // Given\n final Entity smallEntity = makeEntity(TestGroups.ENTITY, TestPropertyNames.PROP_2, 1);\n final Entity largeEntity = makeEntity(TestGroups.ENTITY, TestPropertyNames.PROP_1, 2);\n\n final El...
{ "fields": [ { "declarator": "comparator", "modifier": "private", "original_string": "private Comparator comparator;", "type": "Comparator", "var_name": "comparator" }, { "declarator": "count = 0", "modifier": "public static", "original_string": "public sta...
{ "body": "@Override\n public int compare(final Element e1, final Element e2) {\n count++;\n\n if (null == e1) {\n if (null == e2) {\n return 0;\n }\n return 1;\n }\n if (null == e2) {\n return -1;\n }\n\n if (!gro...
{ "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_682
{ "fields": [ { "declarator": "GROUP1 = \"GROUP1\"", "modifier": "private static final", "original_string": "private static final String GROUP1 = \"GROUP1\";", "type": "String", "var_name": "GROUP1" }, { "declarator": "GROUP2 = \"GROUP2\"", "modifier": "private st...
{ "body": "@Test\n public void shouldReturnAllGroupCountsWhenLessThanLimit() throws OperationException, IOException {\n // Given\n final CountGroupsHandler handler = new CountGroupsHandler();\n final Store store = mock(Store.class);\n final CountGroups countGroups = mock(CountGroups.cla...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/CountGroupsHandler.java", "identifier": "CountGroupsHandler", "interfaces": "implements OutputOperationHandler<CountGroups, GroupCounts>", "methods": [ { "class_method_signature": "CountGroupsHandler.doOpera...
{ "body": "@Override\n public GroupCounts doOperation(final CountGroups operation,\n final Context context, final Store store)\n throws OperationException {\n final GroupCounts groupCounts = new GroupCounts();\n try {\n int count = 0;\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_397
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ElementFilterTest.java", "identifier": "ElementFilterTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<ElementFilter>" }
{ "body": "@Test\n public void shouldTestElementOnComplexLambdaPredicate() {\n // Given\n final Predicate<Object> predicate1 = p -> Integer.class.isAssignableFrom(p.getClass());\n final Predicate<Object> predicate2 = \"value\"::equals;\n final ElementFilter filter = new ElementFilter.Bu...
{ "fields": [ { "declarator": "elementTuple = new ElementTuple()", "modifier": "private final", "original_string": "private final ElementTuple elementTuple = new ElementTuple();", "type": "ElementTuple", "var_name": "elementTuple" }, { "declarator": "readOnly", "m...
{ "body": "public boolean test(final Element element) {\n elementTuple.setElement(element);\n return test(elementTuple);\n }", "class_method_signature": "ElementFilter.test(final Element element)", "constructor": false, "full_signature": "public boolean test(final Element element)", "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_1215
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/SampleElementsForSplitPointsTest.java", "identifier": "SampleElementsForSplitPointsTest", "interfaces": "", "superclass": "extends OperationTest<SampleElementsForSplitPoints>" }
{ "body": "@Test\n public void shouldFailValidationIfProportionToSampleIsNotIn0_1Range() {\n // Given\n final SampleElementsForSplitPoints op = new SampleElementsForSplitPoints.Builder<>().proportionToSample(1.1f)\n .build();\n\n // When\n final ValidationResult result = ...
{ "fields": [ { "declarator": "input", "modifier": "private", "original_string": "private Iterable<? extends Element> input;", "type": "Iterable<? extends Element>", "var_name": "input" }, { "declarator": "numSplits", "modifier": "private", "original_string"...
{ "body": "@Override\n public ValidationResult validate() {\n final ValidationResult result = InputOutput.super.validate();\n if (null != numSplits && numSplits < 1) {\n result.addError(\"numSplits must be null or greater than 0\");\n }\n if (proportionToSample > 1 || proport...
{ "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_114
{ "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 shouldPassWithSameByteRangeObject() throws Exception {\n br1 = new BytesAndRange(a, 0, a.length);\n assertTrue(ByteUtils.areKeyBytesEqual(br1, br1));\n }", "class_method_signature": "ByteUtilsTest.shouldPassWithSameByteRangeObject()", "constructor": false, "ful...
{ "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_544
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/iterable/LimitedInMemorySortedIterableTest.java", "identifier": "LimitedInMemorySortedIterableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldLimitAndDeduplicateEntries() {\n final LimitedInMemorySortedIterable<Integer> list = new LimitedInMemorySortedIterable<Integer>(Comparator.naturalOrder(), 2, true);\n\n list.add(1);\n list.add(1);\n list.add(2);\n list.add(1);\n list.ad...
{ "fields": [ { "declarator": "comparator", "modifier": "private final", "original_string": "private final Comparator<E> comparator;", "type": "Comparator<E>", "var_name": "comparator" }, { "declarator": "deduplicate", "modifier": "private final", "original_...
{ "body": "public boolean add(final E e) {\n boolean result = false;\n\n final OneOrMore<E> values = backingMap.get(e);\n // Skip the item if we are deduplicating and the item already exists\n boolean skipItem = (deduplicate && null != values && values.contains(e));\n if (!skipItem)...
{ "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" ...