id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
47973088_700
{ "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 shouldFindMinBasedOnProperty() throws OperationException {\n // Given\n final Entity entity1 = makeEntity(\"property\", 1);\n final Entity entity2 = makeEntity(\"property\", 2);\n final Entity entity3 = makeEntity(\"property\", 3);\n final Entity en...
{ "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_62
{ "fields": [ { "declarator": "EXPECTED_GRAPH_ID = \"testGraphID\"", "modifier": "private static final", "original_string": "private static final String EXPECTED_GRAPH_ID = \"testGraphID\";", "type": "String", "var_name": "EXPECTED_GRAPH_ID" } ], "file": "store-implementation...
{ "body": "@Test\n public void shouldSerialiseAndDeserialiseOperation() throws SerialisationException, JsonProcessingException {\n\n RemoveGraph op = new Builder()\n .graphId(EXPECTED_GRAPH_ID)\n .build();\n\n byte[] serialise = toJson(op);\n RemoveGraph deseriali...
{ "fields": [ { "declarator": "graphId", "modifier": "@Required\n private", "original_string": "@Required\n private String graphId;", "type": "String", "var_name": "graphId" }, { "declarator": "options", "modifier": "private", "original_string": "priva...
{ "body": "public String getGraphId() {\n return graphId;\n }", "class_method_signature": "RemoveGraph.getGraphId()", "constructor": false, "full_signature": "public String getGraphId()", "identifier": "getGraphId", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Str...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_215
{ "fields": [ { "declarator": "SCHEMA = Schema.fromJson(StreamUtil.schemas(HBaseStoreTest.class))", "modifier": "private static final", "original_string": "private static final Schema SCHEMA = Schema.fromJson(StreamUtil.schemas(HBaseStoreTest.class));", "type": "Schema", "var_name": ...
{ "body": "@Test\n public void shouldThrowExceptionIfGraphIdAndTableNameAreProvidedAndDifferent() throws Exception {\n // Given\n final HBaseProperties properties = HBaseProperties.loadStoreProperties(StreamUtil.storeProps(HBaseStoreTest.class));\n properties.setTable(\"tableName\");\n ...
{ "fields": [ { "declarator": "TRAITS =\n Collections.unmodifiableSet(Sets.newHashSet(\n ORDERED,\n VISIBILITY,\n PRE_AGGREGATION_FILTERING,\n POST_AGGREGATION_FILTERING,\n POST_TRANSFORMATION_FILTERING...
{ "body": "@Override\n public void initialise(final String graphId, final Schema schema, final StoreProperties properties)\n throws StoreException {\n preInitialise(graphId, schema, properties);\n TableUtils.ensureTableExists(this);\n }", "class_method_signature": "HBaseStore.initiali...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_645
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/StorePropertiesTest.java", "identifier": "StorePropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetUnknownPropertyWithDefaultValue() {\n // Given\n final StoreProperties props = createStoreProperties();\n\n // When\n String value = props.get(\"a key that does not exist\", \"property not found\");\n\n // Then\n assertEquals(\"prope...
{ "fields": [ { "declarator": "STORE_CLASS = \"gaffer.store.class\"", "modifier": "public static final", "original_string": "public static final String STORE_CLASS = \"gaffer.store.class\";", "type": "String", "var_name": "STORE_CLASS" }, { "declarator": "SCHEMA_CLASS =...
{ "body": "public String get(final String key) {\n return props.getProperty(key);\n }", "class_method_signature": "StoreProperties.get(final String key)", "constructor": false, "full_signature": "public String get(final String key)", "identifier": "get", "invocations": [ "getProperty" ], "...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_829
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToArrayHandlerTest.java", "identifier": "ToArrayHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldHandleNullInput() throws OperationException {\n // Given\n final ToArrayHandler<Integer> handler = new ToArrayHandler<>();\n final ToArray operation = mock(ToArray.class);\n\n given(operation.getInput()).willReturn(null);\n\n //When\n f...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToArrayHandler.java", "identifier": "ToArrayHandler", "interfaces": "implements OutputOperationHandler<ToArray<T>, T[]>", "methods": [ { "class_method_signature": "ToArrayHandler.doOperation(final ToA...
{ "body": "@SuppressFBWarnings(value = \"PZLA_PREFER_ZERO_LENGTH_ARRAYS\")\n @Override\n public T[] doOperation(final ToArray<T> operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getInput() || Iterables.isEmpty(operation.getInput())) {\n r...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1102
{ "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 shouldResolveNamedViewAndMergeAnotherNamedView() throws CacheOperationFailedException {\n // Given\n given(CACHE.getNamedView(NAMED_VIEW_NAME, CONTEXT.getUser())).willReturn(FULL_NAMED_VIEW_DETAIL);\n final NamedView namedViewToMerge = new NamedView.Builder().nam...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedViewCache cache;", "type": "NamedViewCache", "var_name": "cache" } ], "file": "core/graph/src/main/java/uk/gov/gchq/gaffer/graph/hook/NamedViewResolver.java", "identif...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n resolveViews(opChain, context);\n }", "class_method_signature": "NamedViewResolver.preExecute(final OperationChain<?> opChain, final Context context)", "constructor": false, "full_signature": "...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_983
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/DateSerialiserTest.java", "identifier": "DateSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Date>" }
{ "body": "@Test\n public void cantSerialiseStringClass() {\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "DateSerialiserTest.cantSerialiseStringClass()", "constructor": false, "full_signature": "@Test public void cantSerialiseStringClass()", "identifier": "ca...
{ "fields": [ { "declarator": "serialVersionUID = 5647756843689779437L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5647756843689779437L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisatio...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Date.class.equals(clazz);\n }", "class_method_signature": "DateSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identifier": "ca...
{ "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_1047
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/raw/RawDateSerialiserTest.java", "identifier": "RawDateSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Date>" }
{ "body": "@Test\n public void canSerialiseDateClass() {\n assertTrue(serialiser.canHandle(Date.class));\n }", "class_method_signature": "RawDateSerialiserTest.canSerialiseDateClass()", "constructor": false, "full_signature": "@Test public void canSerialiseDateClass()", "identifier": "canSerialis...
{ "fields": [ { "declarator": "serialVersionUID = -1470994471883677977L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1470994471883677977L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisat...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Date.class.equals(clazz);\n }", "class_method_signature": "RawDateSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identifier": ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_595
{ "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 testGetGroup() throws SerialisationException {\n // Given\n final Edge edge = new Edge.Builder().group(TestGroups.ENTITY)\n .source(\"source\")\n .dest(\"destination\")\n .directed(true)\n .build();\n\n ...
{ "fields": [ { "declarator": "serialVersionUID = 4640352297806229672L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 4640352297806229672L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "entit...
{ "body": "public String getGroup(final byte[] bytes) throws SerialisationException {\n return StringUtil.toString(LengthValueBytesSerialiserUtil.deserialise(bytes, 0));\n }", "class_method_signature": "ElementSerialiser.getGroup(final byte[] bytes)", "constructor": false, "full_signature": "public St...
{ "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_716
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/LimitHandlerTest.java", "identifier": "LimitHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotLimitResultsOfGetOperationWhenLimitIsNull() throws Exception {\n // Given\n final CloseableIterable<Integer> input = new WrappedCloseableIterable<>(Arrays.asList(1, 2, 3, 4, 5));\n final Integer resultLimit = null;\n final Limit<Integer> limit = n...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/LimitHandler.java", "identifier": "LimitHandler", "interfaces": "implements OutputOperationHandler<Limit<T>, Iterable<? extends T>>", "methods": [ { "class_method_signature": "LimitHandler.doOperation(final ...
{ "body": "@Override\n public Iterable<? extends T> doOperation(final Limit<T> operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getInput()) {\n return null;\n }\n\n if (null != operation.getResultLimit()) {\n return ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_346
{ "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 shouldGetSourceVertexFromWalk() {\n // Given\n // [A] -> [B] -> [C]\n // \\ \\\n // (BasicEntity) (BasicEntity)\n\n final Walk walk = new Walk.Builder()\n .entity(ENTITY_A)\n .edges(EDGE_AB, 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 Object getSourceVertex() {\n return entities.get(0).getKey();\n }", "class_method_signature": "Walk.getSourceVertex()", "constructor": false, "full_signature": "@JsonIgnore public Object getSourceVertex()", "identifier": "getSourceVertex", "invocations": [ "g...
{ "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_653
{ "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 shouldGetScoreForOperationChainContainingNamedOperation() throws OperationException {\n // Given\n final ScoreResolver mockResolver = mock(NamedOperationScoreResolver.class);\n\n final Map<Class<? extends Operation>, Integer> opScores = new LinkedHashMap<>();\n ...
{ "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_203
{ "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 shouldNotFilterOutValidEdge() throws OperationException, SerialisationException {\n // Given\n final ValidationProcessor processor = new ValidationProcessor(SCHEMA);\n\n // When / Then\n assertTrue(processor.test(CellUtil.getLazyCell(\n new ...
{ "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.validateWithSchema(elementCell.getElement());\n }", "class_method_signature": "ValidationProcessor.test(final LazyElementCell elementCell)", "constructor": false, "full_signature": "@Override public 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_74
{ "fields": [], "file": "store-implementation/parquet-store/src/test/java/uk/gov/gchq/gaffer/parquetstore/query/ParquetFileQueryTest.java", "identifier": "ParquetFileQueryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEqualsAndHashCode() {\n // Given\n final ParquetFileQuery q1 = new ParquetFileQuery(new Path(\"1\"),\n eq(FilterApi.binaryColumn(\"A\"), Binary.fromString(\"T\")), true);\n final ParquetFileQuery q2 = new ParquetFileQuery(new Path(\"1\"),\n ...
{ "fields": [ { "declarator": "file", "modifier": "private", "original_string": "private Path file;", "type": "Path", "var_name": "file" }, { "declarator": "filter", "modifier": "private", "original_string": "private FilterPredicate filter;", "type": "...
{ "body": "@Override\n public int hashCode() {\n return new HashCodeBuilder(17, 37)\n .append(file)\n .append(filter)\n .append(fullyApplied)\n .toHashCode();\n }", "class_method_signature": "ParquetFileQuery.hashCode()", "constructor": fals...
{ "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_1155
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/data/EdgeSeedTest.java", "identifier": "EdgeSeedTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<EdgeSeed>" }
{ "body": "@Test\n public void shouldDeserialiseFromJsonWhenDirectedTypeIsDirected() {\n // Given\n final String json = \"{\\\"class\\\": \\\"uk.gov.gchq.gaffer.operation.data.EdgeSeed\\\", \\\"directedType\\\": \\\"DIRECTED\\\"}\";\n\n // When\n final EdgeSeed deserialisedEdgeSeed = fr...
{ "fields": [ { "declarator": "serialVersionUID = -8137886975649690000L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8137886975649690000L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "VER...
{ "body": "@Override\n public DirectedType getDirectedType() {\n return directed;\n }", "class_method_signature": "EdgeSeed.getDirectedType()", "constructor": false, "full_signature": "@Override public DirectedType getDirectedType()", "identifier": "getDirectedType", "invocations": [], "modif...
{ "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_487
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/OneOrMoreTest.java", "identifier": "OneOrMoreTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotBeEqualWhenDeduplicateDifferent() {\n final OneOrMore<Integer> collection1 = new OneOrMore<>(false, 1);\n final OneOrMore<Integer> collection2 = new OneOrMore<>(true, 1);\n\n assertNotEquals(collection1, collection2);\n assertNotEquals(collection1...
{ "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": "@Override\n public int hashCode() {\n return new HashCodeBuilder(13, 31)\n .append(deduplicate)\n .append(singleItem)\n .append(collection)\n .toHashCode();\n }", "class_method_signature": "OneOrMore.hashCode()", "constructor": fa...
{ "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_9
{ "fields": [], "file": "store-implementation/federated-store/src/test/java/uk/gov/gchq/gaffer/federatedstore/util/FederatedStoreUtilTest.java", "identifier": "FederatedStoreUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetGraphIdsAndSkipEmptiesAndWhitespace() {\n // Given\n final Map<String, String> config = new HashMap<>();\n config.put(FederatedStoreConstants.KEY_OPERATION_OPTIONS_GRAPH_IDS, \" graph1 , graph2,,graph3 \");\n\n // When\n final List<String> ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(FederatedStoreUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FederatedStoreUtil.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "public static List<String> getGraphIds(final Map<String, String> config) {\n if (null == config) {\n return null;\n }\n\n return getCleanStrings(config.get(KEY_OPERATION_OPTIONS_GRAPH_IDS));\n }", "class_method_signature": "FederatedStoreUtil.getGraphIds(final Map<Strin...
{ "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_468
{ "fields": [ { "declarator": "abs", "modifier": "", "original_string": "ArrayByteSequence abs;", "type": "ArrayByteSequence", "var_name": "abs" }, { "declarator": "data", "modifier": "", "original_string": "byte[] data;", "type": "byte[]", "var_...
{ "body": "@Test\n public void testInvalidByteAt1ShouldThrowIAX() {\n assertThrows(IllegalArgumentException.class, () -> abs.byteAt(data.length));\n }", "class_method_signature": "ArrayByteSequenceTest.testInvalidByteAt1ShouldThrowIAX()", "constructor": false, "full_signature": "@Test public void t...
{ "fields": [ { "declarator": "serialVersionUID = 4850846929226802566L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 4850846929226802566L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "data"...
{ "body": "public byte byteAt(final int i) {\n if (i < 0) {\n throw new IllegalArgumentException(\"i < 0, \" + i);\n } else if (i >= this.length) {\n throw new IllegalArgumentException(\"i >= length, \" + i + \" >= \" + this.length);\n } else {\n return this.data[...
{ "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_192
{ "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 shouldFilterOutEdgeNotInView() throws OperationException, SerialisationException {\n // Given\n final GroupFilterProcessor processor = new GroupFilterProcessor(VIEW);\n\n // When\n final boolean result = processor.test(CellUtil.getLazyCell(\n ...
{ "fields": [ { "declarator": "view", "modifier": "private final", "original_string": "private final View view;", "type": "View", "var_name": "view" } ], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasestore/coprocessor/processor/GroupFilterPro...
{ "body": "@Override\n public boolean test(final LazyElementCell elementCell) {\n final String group = elementCell.getGroup();\n return view.isEntity(group) || view.isEdge(group);\n }", "class_method_signature": "GroupFilterProcessor.test(final LazyElementCell elementCell)", "constructor": fal...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_891
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/ElementValidatorTest.java", "identifier": "ElementValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFalseWhenNoViewElementDefinition() {\n // Given\n final View view = mock(View.class);\n final String group = TestGroups.EDGE;\n final Element elm = mock(Element.class);\n final ElementValidator validator = new ElementValidator(view);\n\n...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ElementValidator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ElementValidator.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public boolean validate(final Element element) {\n if (null == element) {\n return false;\n }\n\n if (null != schema) {\n return validateWithSchema(element);\n }\n\n if (null != view) {\n return validateAgainstViewFilter(ele...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1010
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/ordered/OrderedIntegerSerialiserTest.java", "identifier": "OrderedIntegerSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Integer>" }
{ "body": "@Test\n public void cantSerialiseStringClass() {\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "OrderedIntegerSerialiserTest.cantSerialiseStringClass()", "constructor": false, "full_signature": "@Test public void cantSerialiseStringClass()", "identi...
{ "fields": [ { "declarator": "serialVersionUID = 5671653945533196758L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5671653945533196758L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisatio...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Integer.class.equals(clazz);\n }", "class_method_signature": "OrderedIntegerSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "ide...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_311
{ "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 shouldKeepOnlyProvidedProperties() {\n //Given\n final View view = new View.Builder()\n .edge(TestGroups.EDGE, new ViewElementDefinition.Builder()\n .properties(TestPropertyNames.PROP_1)\n .build())\n ...
{ "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 void removeProperties(final View view, final Element element) {\n if (null != view && null != element) {\n removeProperties(view.getElement(element.getGroup()), element);\n }\n }", "class_method_signature": "ViewUtil.removeProperties(final View view, final Elemen...
{ "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_741
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/ReduceHandlerTest.java", "identifier": "ReduceHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldHandleNullInput() throws Exception {\n // Given\n final Iterable<Integer> input = null;\n final Reduce<Integer> reduce = new Reduce.Builder<Integer>()\n .input(input)\n .build();\n\n final ReduceHandler<Integer> handler ...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/ReduceHandler.java", "identifier": "ReduceHandler", "interfaces": "implements OutputOperationHandler<Reduce<T>, T>", "methods": [ { "class_method_signature": "ReduceHandler.doOperation(final Reduce<T> operat...
{ "body": "@Override\n public T doOperation(final Reduce<T> operation, final Context context, final Store store) throws OperationException {\n if (null == operation) {\n throw new OperationException(\"Operation cannot be null\");\n }\n\n Iterable<? extends T> input = operation.getIn...
{ "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_1339
{ "fields": [], "file": "library/spark/spark-accumulo-library/src/test/java/uk/gov/gchq/gaffer/sparkaccumulo/operation/rfilereaderrdd/RFileReaderIteratorTest.java", "identifier": "RFileReaderIteratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void initWithAnyConfigShouldNotHaveNextIterator() {\n final AccumuloTablet partition = new AccumuloTablet(0, 0, \"a\", \"b\");\n final TaskContext taskContext = mock(TaskContext.class);\n final Set<String> auths = new HashSet<>();\n\n final Configuration config...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(RFileReaderIterator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RFileReaderIterator.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@Override\n public boolean hasNext() {\n return iteratorAfterIterators.hasTop();\n }", "class_method_signature": "RFileReaderIterator.hasNext()", "constructor": false, "full_signature": "@Override public boolean hasNext()", "identifier": "hasNext", "invocations": [ "hasTop" ], ...
{ "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_1293
{ "fields": [], "file": "library/flink-library/src/test/java/uk/gov/gchq/gaffer/flink/operation/handler/GafferOutputTest.java", "identifier": "GafferOutputTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDelegateOpenToGafferAddedInitialise() throws Exception {\n // Given\n final GafferAdder adder = mock(GafferAdder.class);\n final GafferOutput output = new GafferOutput(adder);\n\n // When\n output.open(1, 2);\n\n // Then\n verify...
{ "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 open(final int taskNumber, final int numTasks) throws IOException {\n adder.initialise();\n }", "class_method_signature": "GafferOutput.open(final int taskNumber, final int numTasks)", "constructor": false, "full_signature": "@Override public void open(final int t...
{ "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_23
{ "fields": [], "file": "store-implementation/federated-store/src/test/java/uk/gov/gchq/gaffer/federatedstore/util/FederatedStoreUtilTest.java", "identifier": "FederatedStoreUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldUpdateAddElementsFlagsWhenNullInputAndValidateFalse() {\n // Given\n final Graph graph = createGraph();\n final AddElements operation = new AddElements.Builder()\n .validate(false)\n .skipInvalidElements(true)\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(FederatedStoreUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FederatedStoreUtil.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "public static <OP extends Operation> OP updateOperationForGraph(final OP operation, final Graph graph) {\n OP resultOp = operation;\n if (operation instanceof Operations) {\n resultOp = (OP) operation.shallowClone();\n final Operations<Operation> operations = (Operations...
{ "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_254
{ "fields": [], "file": "rest-api/core-rest/src/test/java/uk/gov/gchq/gaffer/rest/serialisation/TextMessageBodyWriterTest.java", "identifier": "TextMessageBodyWriterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldSerialiseObjectToJsonAndWrite() throws IOException {\n // Given\n final TextMessageBodyWriter writer = new TextMessageBodyWriter();\n final Object object = new Entity.Builder()\n .group(TestGroups.ENTITY)\n .vertex(\"vertex1\")...
{ "fields": [], "file": "rest-api/core-rest/src/main/java/uk/gov/gchq/gaffer/rest/serialisation/TextMessageBodyWriter.java", "identifier": "TextMessageBodyWriter", "interfaces": "implements MessageBodyWriter<Object>", "methods": [ { "class_method_signature": "TextMessageBodyWriter.isWriteable(final ...
{ "body": "@Override\n public void writeTo(final Object object, final Class<?> type,\n final Type genericType, final Annotation[] annotations,\n final MediaType mediaType,\n final MultivaluedMap<String, Object> httpHeaders,\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_604
{ "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 testCantSerialiseIntegerClass() throws SerialisationException {\n assertFalse(serialiser.canHandle(Integer.class));\n }", "class_method_signature": "EntitySerialiserTest.testCantSerialiseIntegerClass()", "constructor": false, "full_signature": "@Test public void testC...
{ "fields": [ { "declarator": "serialVersionUID = -2582396256747930962L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2582396256747930962L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "str...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Entity.class.isAssignableFrom(clazz);\n }", "class_method_signature": "EntitySerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "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_413
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ExtractPropertyTest.java", "identifier": "ExtractPropertyTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldReturnNullWithNoNameProvided() {\n final Element element = mock(Element.class);\n final ExtractProperty extractor = new ExtractProperty();\n\n final Object result = extractor.apply(element);\n\n assertNull(result);\n }", "class_method_signature"...
{ "fields": [ { "declarator": "name", "modifier": "private", "original_string": "private String name;", "type": "String", "var_name": "name" } ], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/function/ExtractProperty.java", "identifier": "ExtractProperty"...
{ "body": "@Override\n public Object apply(final Element element) {\n return null != element ? element.getProperty(name) : null;\n }", "class_method_signature": "ExtractProperty.apply(final Element element)", "constructor": false, "full_signature": "@Override public Object apply(final Element eleme...
{ "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_940
{ "fields": [ { "declarator": "ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values())", "modifier": "public static final", "original_string": "public static final Set<StoreTrait> ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values());", "type": "Set<StoreTrait>", "var_name": "ALL_S...
{ "body": "@Test\n public void shouldValidateAndReturnTrueWhenAggregatorSelectionUnknownProperty() {\n // Given\n final ViewValidator validator = new ViewValidator();\n final View view = new View.Builder()\n .entity(TestGroups.ENTITY, new ViewElementDefinition.Builder()\n ...
{ "fields": [ { "declarator": "SKIP_VIEW_VALIDATION = \"skipViewValidation\"", "modifier": "public static final", "original_string": "public static final String SKIP_VIEW_VALIDATION = \"skipViewValidation\";", "type": "String", "var_name": "SKIP_VIEW_VALIDATION" }, { "d...
{ "body": "public ValidationResult validate(final View view, final Schema schema, final Set<StoreTrait> storeTraits) {\n final boolean isStoreOrdered = storeTraits.contains(StoreTrait.ORDERED);\n\n final ValidationResult result = new ValidationResult();\n\n if (null != view) {\n valida...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1084
{ "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 shouldMaintainOperationChainInputIfItSerialises() {\n // Given\n FunctionAuthoriser authoriser = new FunctionAuthoriser(Lists.newArrayList(Identity.class));\n\n List fakeInput = Lists.newArrayList(new EntitySeed(1), new EntitySeed(2), new EntitySeed(3));\n ...
{ "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_805
{ "fields": [ { "declarator": "input", "modifier": "private", "original_string": "private List<Element> input;", "type": "List<Element>", "var_name": "input" }, { "declarator": "expected", "modifier": "private", "original_string": "private List<Element> expe...
{ "body": "@Test\n public void shouldTransformElementsUsingIdentityFunction() throws OperationException {\n // Given\n given(store.getSchema()).willReturn(schema);\n\n final Entity entity = new Entity.Builder()\n .group(TestGroups.ENTITY)\n .property(TestPropertyN...
{ "fields": [ { "declarator": "validator = new TransformValidator()", "modifier": "private final", "original_string": "private final FunctionValidator<Transform> validator = new TransformValidator();", "type": "FunctionValidator<Transform>", "var_name": "validator" } ], "file...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final Transform operation, final Context context, final Store store) throws OperationException {\n return doOperation(operation, store.getSchema());\n }", "class_method_signature": "TransformHandler.doOperation(final Transform operat...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_556
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/iterable/TransformIterableTest.java", "identifier": "TransformIterableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowNoElementExceptionWhenNextCalledWhenNoNextString() {\n // Given\n final String item1 = \"item 1\";\n final Iterable<String> items = Arrays.asList(item1);\n final Validator<String> validator = mock(Validator.class);\n final TransformIterab...
{ "fields": [ { "declarator": "input", "modifier": "private final", "original_string": "private final Iterable<? extends I> input;", "type": "Iterable<? extends I>", "var_name": "input" }, { "declarator": "validator", "modifier": "private final", "original_s...
{ "body": "@Override\n public CloseableIterator<O> iterator() {\n return new CloseableIterator<O>() {\n @Override\n public void close() {\n CloseableUtil.close(inputItr);\n }\n\n private final Iterator<? extends I> inputItr = input.iterator();\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_106
{ "fields": [], "file": "store-implementation/accumulo-store/src/test/java/uk/gov/gchq/gaffer/accumulostore/AccumuloPropertiesTest.java", "identifier": "AccumuloPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldMergeAccumuloJsonModules() {\n // Given\n final AccumuloProperties props = new AccumuloProperties();\n props.setJsonSerialiserModules(TestCustomJsonModules1.class.getName() + \",\" + TestCustomJsonModules2.class.getName());\n\n // When\n final...
{ "fields": [ { "declarator": "KEY_PACKAGE_CLASS = \"gaffer.store.accumulo.keypackage.class\"", "modifier": "public static final", "original_string": "public static final String KEY_PACKAGE_CLASS = \"gaffer.store.accumulo.keypackage.class\";", "type": "String", "var_name": "KEY_PACKA...
{ "body": "@Override\n public String getJsonSerialiserModules() {\n return new StringDeduplicateConcat().apply(\n SketchesJsonModules.class.getName(),\n super.getJsonSerialiserModules()\n );\n }", "class_method_signature": "AccumuloProperties.getJsonSerialiserModule...
{ "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_1207
{ "fields": [ { "declarator": "TEST_INPUT = asList(\"one\", \"two\", \"three\")", "modifier": "private static final", "original_string": "private static final List<String> TEST_INPUT = asList(\"one\", \"two\", \"three\");", "type": "List<String>", "var_name": "TEST_INPUT" }, ...
{ "body": "@Test\n @Override\n public void shouldShallowCloneOperation() {\n // Given\n final GenerateSplitPointsFromSample op = getTestObject();\n\n // When\n final GenerateSplitPointsFromSample clone = op.shallowClone();\n\n // Then\n assertExpected(clone);\n }", ...
{ "fields": [ { "declarator": "input", "modifier": "private", "original_string": "private Iterable<? extends T> input;", "type": "Iterable<? extends T>", "var_name": "input" }, { "declarator": "numSplits", "modifier": "private", "original_string": "private I...
{ "body": "@Override\n public GenerateSplitPointsFromSample<T> shallowClone() throws CloneFailedException {\n return new GenerateSplitPointsFromSample.Builder<T>()\n .input(input)\n .numSplits(numSplits)\n .options(options)\n .build();\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_58
{ "fields": [ { "declarator": "FEDERATEDSTORE_GRAPH_ID = \"federatedStore\"", "modifier": "private static final", "original_string": "private static final String FEDERATEDSTORE_GRAPH_ID = \"federatedStore\";", "type": "String", "var_name": "FEDERATEDSTORE_GRAPH_ID" }, { ...
{ "body": "@Test\n public void shouldNotRemoveGraphConfiguredWithNoAccessWritePredicate() throws Exception {\n FederatedStore store = new FederatedStore();\n final FederatedStoreProperties federatedStoreProperties = new FederatedStoreProperties();\n federatedStoreProperties.setCacheProperties(...
{ "fields": [], "file": "store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/operation/handler/impl/FederatedRemoveGraphHandler.java", "identifier": "FederatedRemoveGraphHandler", "interfaces": "implements OutputOperationHandler<RemoveGraph, Boolean>", "methods": [ { ...
{ "body": "@Override\n public Boolean doOperation(final RemoveGraph operation, final Context context, final Store store) throws OperationException {\n try {\n final boolean userRequestingAdminUsage = isUserRequestingAdminUsage(operation);\n return ((FederatedStore) store).remove(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_385
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/EntityTest.java", "identifier": "EntityTest", "interfaces": "", "superclass": "extends ElementTest" }
{ "body": "@Test\n public void shouldConstructEntity() {\n final String vertex = \"vertex1\";\n final String propValue = \"propValue\";\n\n final Entity entity = new Entity(TestGroups.ENTITY, vertex);\n entity.putProperty(TestPropertyNames.STRING, propValue);\n\n assertEquals(Tes...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Entity.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Entity.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator"...
{ "body": "@Override\n public Object getVertex() {\n return vertex;\n }", "class_method_signature": "Entity.getVertex()", "constructor": false, "full_signature": "@Override public Object getVertex()", "identifier": "getVertex", "invocations": [], "modifiers": "@Override public", "parameters...
{ "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_690
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/compare/SortHandlerTest.java", "identifier": "SortHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotThrowExceptionIfIterableIsEmpty() throws OperationException {\n // Given\n final List<Entity> input = Lists.newArrayList();\n\n final Sort sort = new Sort.Builder().input(input).comparators(new ElementPropertyComparator.Builde...
{ "fields": [ { "declarator": "MAX_HANDLER = new MaxHandler()", "modifier": "private static final", "original_string": "private static final MaxHandler MAX_HANDLER = new MaxHandler();", "type": "MaxHandler", "var_name": "MAX_HANDLER" } ], "file": "core/store/src/main/java/uk/...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final Sort 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 == 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_1342
{ "fields": [], "file": "library/spark/spark-accumulo-library/src/test/java/uk/gov/gchq/gaffer/sparkaccumulo/operation/rfilereaderrdd/AccumuloTabletTest.java", "identifier": "AccumuloTabletTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccumuloTabletHashCodeAndEquals() {\n final AccumuloTablet accumuloTablet = new AccumuloTablet(0, 0, \"a\", \"b\");\n\n final AccumuloTablet expected = new AccumuloTablet(0, 0, \"a\", \"b\");\n assertTrue(accumuloTablet.equals(expected));\n }", "class_me...
{ "fields": [ { "declarator": "rddId", "modifier": "private final", "original_string": "private final int rddId;", "type": "int", "var_name": "rddId" }, { "declarator": "index", "modifier": "private final", "original_string": "private final int index;", ...
{ "body": "@Override\n public boolean equals(final Object obj) {\n if (this == obj) {\n return true;\n }\n\n if (null == obj || getClass() != obj.getClass()) {\n return false;\n }\n\n final AccumuloTablet accumuloTablet = (AccumuloTablet) obj;\n\n ret...
{ "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_917
{ "fields": [ { "declarator": "ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values())", "modifier": "public static final", "original_string": "public static final Set<StoreTrait> ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values());", "type": "Set<StoreTrait>", "var_name": "ALL_S...
{ "body": "@Test\n public void shouldValidateAndReturnTrueWhenEntityTransformerSelectionUnknownProperty() {\n // Given\n final ViewValidator validator = new ViewValidator();\n final View view = new View.Builder()\n .entity(TestGroups.ENTITY, new ViewElementDefinition.Builder()\n...
{ "fields": [ { "declarator": "SKIP_VIEW_VALIDATION = \"skipViewValidation\"", "modifier": "public static final", "original_string": "public static final String SKIP_VIEW_VALIDATION = \"skipViewValidation\";", "type": "String", "var_name": "SKIP_VIEW_VALIDATION" }, { "d...
{ "body": "public ValidationResult validate(final View view, final Schema schema, final Set<StoreTrait> storeTraits) {\n final boolean isStoreOrdered = storeTraits.contains(StoreTrait.ORDERED);\n\n final ValidationResult result = new ValidationResult();\n\n if (null != view) {\n valida...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1196
{ "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 shouldValidateWhenOperationContainsMultipleHops() {\n // Given\n final GetWalks getWalks = new GetWalks.Builder().input(new EntitySeed(\"1\"), new EntitySeed(\"2\"))\n .operations(new OperationChain.Builder().first(new ...
{ "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_444
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/EdgeTest.java", "identifier": "EdgeTest", "interfaces": "", "superclass": "extends ElementTest" }
{ "body": "@Test\n public void shouldDeserialiseFromJsonUsingDirectedFalseField() throws SerialisationException {\n final String json = \"{\\\"class\\\": \\\"uk.gov.gchq.gaffer.data.element.Edge\\\", \\\"directed\\\": false}\";\n\n final Edge deserialisedEdge = JSONSerialiser.deserialise(json.getByte...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Edge.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Edge.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "s...
{ "body": "@JsonIgnore(false)\n @JsonGetter(\"directed\")\n @Override\n public boolean isDirected() {\n return directed;\n }", "class_method_signature": "Edge.isDirected()", "constructor": false, "full_signature": "@JsonIgnore(false) @JsonGetter(\"directed\") @Override public boolean isDirect...
{ "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_151
{ "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 shouldReturnIteratorValidatorIterator() throws Exception {\n // Given\n final AccumuloStore store = mock(AccumuloStore.class);\n final Schema schema = new Schema.Builder()\n .merge(createSchema())\n .type(\"str\", new TypeDefinition....
{ "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 getValidatorIteratorSetting(final AccumuloStore store) {\n if (!store.getSchema().hasValidation()) {\n LOGGER.debug(\"Returning null from getValidatorIteratorSetting as store.getSchema().hasValidation() = {}\",\n store.getSchema().h...
{ "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_501
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/TextUtilTest.java", "identifier": "TextUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetBytes() {\n final Text text = new Text(\"Some text\");\n\n assertEquals(9, TextUtil.getBytes(text).length);\n assertEquals(new Text(\"Some text\"), new Text(TextUtil.getBytes(text)));\n }", "class_method_signature": "TextUtilTest.testGetBytes()", "c...
{ "fields": [], "file": "core/common-util/src/main/java/uk/gov/gchq/gaffer/commonutil/TextUtil.java", "identifier": "TextUtil", "interfaces": "", "methods": [ { "class_method_signature": "TextUtil.TextUtil()", "constructor": true, "full_signature": "private TextUtil()", "identifie...
{ "body": "public static byte[] getBytes(final Text text) {\n byte[] bytes = text.getBytes();\n if (bytes.length != text.getLength()) {\n bytes = new byte[text.getLength()];\n System.arraycopy(text.getBytes(), 0, bytes, 0, bytes.length);\n }\n return bytes;\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_852
{ "fields": [ { "declarator": "varName = \"varName\"", "modifier": "private final", "original_string": "private final String varName = \"varName\";", "type": "String", "var_name": "varName" }, { "declarator": "varVal = \"varVal\"", "modifier": "private final", ...
{ "body": "@Test\n public void shouldThrowExceptionWhenVariableKeyIsNull() throws OperationException {\n // Given\n final Context context = mock(Context.class);\n final GetVariableHandler handler = new GetVariableHandler();\n final GetVariable op = new GetVariable.Builder().variableName...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/GetVariableHandler.java", "identifier": "GetVariableHandler", "interfaces": "implements OperationHandler<GetVariable>", "methods": [ { "class_method_signature": "GetVariableHandler.doOperation(final GetVaria...
{ "body": "@Override\n public Object doOperation(final GetVariable operation, final Context context, final Store store) throws OperationException {\n if (operation.getVariableName() == null) {\n throw new IllegalArgumentException(\"Variable name cannot be null\");\n }\n return conte...
{ "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_1179
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/function/ToElementIdTest.java", "identifier": "ToElementIdTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnNullIfTheInputIsNull() {\n // Given\n final Object input = null;\n final ToElementId function = new ToElementId();\n\n // When\n final ElementId output = function.apply(input);\n\n // Then\n assertNull(output);\n }", "...
{ "fields": [], "file": "core/operation/src/main/java/uk/gov/gchq/gaffer/operation/function/ToElementId.java", "identifier": "ToElementId", "interfaces": "", "methods": [ { "class_method_signature": "ToElementId.apply(final Object obj)", "constructor": false, "full_signature": "@Override...
{ "body": "@Override\n public ElementId apply(final Object obj) {\n if (null == obj) {\n return null;\n }\n return obj instanceof ElementId ? (ElementId) obj : new EntitySeed(obj);\n }", "class_method_signature": "ToElementId.apply(final Object obj)", "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_628
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/util/AggregatorUtilTest.java", "identifier": "AggregatorUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowExceptionWhenQueryAggregatedIfSchemaIsNull() {\n // given\n final Schema schema = null;\n final View view = new View();\n\n // When / Then\n try {\n AggregatorUtil.queryAggregate(Collections.emptyList(), schema, view);\n ...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/util/AggregatorUtil.java", "identifier": "AggregatorUtil", "interfaces": "", "methods": [ { "class_method_signature": "AggregatorUtil.AggregatorUtil()", "constructor": true, "full_signature": "private AggregatorU...
{ "body": "public static CloseableIterable<Element> queryAggregate(final Iterable<? extends Element> elements, final Schema schema, final View view) {\n if (null == schema) {\n throw new IllegalArgumentException(\"Schema is required\");\n }\n if (null == view) {\n throw new ...
{ "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_278
{ "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 shouldReturnFalseWhenViewHasEmptyPostTransformEdgeFilters() {\n // Given\n final View view = new View.Builder()\n .edge(TestGroups.EDGE, new ViewElementDefinition.Builder()\n .postTransformFilter(new ElementFilter.Builder()\n ...
{ "fields": [ { "declarator": "globalElements", "modifier": "private", "original_string": "private List<GlobalViewElementDefinition> globalElements;", "type": "List<GlobalViewElementDefinition>", "var_name": "globalElements" }, { "declarator": "globalEntities", "m...
{ "body": "public boolean hasPostTransformFilters() {\n return hasFilters(ViewElementDefinition::hasPostTransformFilters);\n }", "class_method_signature": "View.hasPostTransformFilters()", "constructor": false, "full_signature": "public boolean hasPostTransformFilters()", "identifier": "hasPostTrans...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_782
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/generate/GenerateElementsHandlerTest.java", "identifier": "GenerateElementsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnElements() throws OperationException {\n // Given\n final GenerateElementsHandler<String> handler = new GenerateElementsHandler<>();\n final Store store = mock(Store.class);\n final GenerateElements<String> operation = mock(GenerateElements.cla...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/generate/GenerateElementsHandler.java", "identifier": "GenerateElementsHandler", "interfaces": "implements OutputOperationHandler<GenerateElements<OBJ>, Iterable<? extends Element>>", "methods": [ { "class_m...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final GenerateElements<OBJ> operation,\n final Context context, final Store store)\n throws OperationException {\n return operation.getElementGenerator().apply(operation.getInpu...
{ "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_1250
{ "fields": [ { "declarator": "namedViewName = \"testNamedViewName\"", "modifier": "private final", "original_string": "private final String namedViewName = \"testNamedViewName\";", "type": "String", "var_name": "namedViewName" } ], "file": "core/operation/src/test/java/uk/go...
{ "body": "@Test\n @Override\n public void builderShouldCreatePopulatedOperation() {\n // Given / When\n DeleteNamedView operation = new DeleteNamedView.Builder().name(namedViewName).build();\n\n // Then\n assertEquals(namedViewName, operation.getName());\n }", "class_method_sig...
{ "fields": [ { "declarator": "name", "modifier": "@Required\n private", "original_string": "@Required\n private String name;", "type": "String", "var_name": "name" }, { "declarator": "options", "modifier": "private", "original_string": "private Map<St...
{ "body": "public String getName() {\n return name;\n }", "class_method_signature": "DeleteNamedView.getName()", "constructor": false, "full_signature": "public String getName()", "identifier": "getName", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "si...
{ "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_1315
{ "fields": [ { "declarator": "RBM_BACKED_TIMESTAMP_SET_AGGREGATOR\n = new RBMBackedTimestampSetAggregator()", "modifier": "private static final", "original_string": "private static final RBMBackedTimestampSetAggregator RBM_BACKED_TIMESTAMP_SET_AGGREGATOR\n = new RBMBackedT...
{ "body": "@Test\n public void testAggregate() {\n // Given\n final RBMBackedTimestampSet rbmBackedTimestampSet1 = new RBMBackedTimestampSet(CommonTimeUtil.TimeBucket.SECOND);\n rbmBackedTimestampSet1.add(Instant.ofEpochMilli(1000L));\n rbmBackedTimestampSet1.add(Instant.ofEpochMilli(10...
{ "fields": [], "file": "library/time-library/src/main/java/uk/gov/gchq/gaffer/time/binaryoperator/RBMBackedTimestampSetAggregator.java", "identifier": "RBMBackedTimestampSetAggregator", "interfaces": "", "methods": [ { "class_method_signature": "RBMBackedTimestampSetAggregator._apply(final RBMBacke...
{ "body": "@Override\n protected RBMBackedTimestampSet _apply(final RBMBackedTimestampSet a, final RBMBackedTimestampSet b) {\n if (!b.getTimeBucket().equals(a.getTimeBucket())) {\n throw new RuntimeException(\"Can't aggregate two RBMBackedTimestampSet with different time buckets: \"\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_297
{ "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 shouldOverrideEmptyGlobalElementPropertiesAndIncludeEntityGroupProperties() {\n // Given\n final View view = new View.Builder()\n .globalElements(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_452
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/IsEntityValidatorTest.java", "identifier": "IsEntityValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotValidateWhenEdge() {\n final Element element = new Edge.Builder()\n .group(TestGroups.EDGE)\n .build();\n\n final boolean valid = new IsEntityValidator().validate(element);\n\n assertFalse(valid);\n }", "class_method_si...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/IsEntityValidator.java", "identifier": "IsEntityValidator", "interfaces": "implements Validator<Element>", "methods": [ { "class_method_signature": "IsEntityValidator.validate(final Element element)", "constructor": false...
{ "body": "@Override\n public boolean validate(final Element element) {\n return element instanceof Entity;\n }", "class_method_signature": "IsEntityValidator.validate(final Element element)", "constructor": false, "full_signature": "@Override public boolean validate(final Element element)", "ide...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1180
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/function/ToElementIdTest.java", "identifier": "ToElementIdTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnEntitySeedIfInputIsAnObject() {\n // Given\n final Object input = \"item\";\n final ToElementId function = new ToElementId();\n\n // When\n final ElementId output = function.apply(input);\n\n // Then\n assertEquals(new Enti...
{ "fields": [], "file": "core/operation/src/main/java/uk/gov/gchq/gaffer/operation/function/ToElementId.java", "identifier": "ToElementId", "interfaces": "", "methods": [ { "class_method_signature": "ToElementId.apply(final Object obj)", "constructor": false, "full_signature": "@Override...
{ "body": "@Override\n public ElementId apply(final Object obj) {\n if (null == obj) {\n return null;\n }\n return obj instanceof ElementId ? (ElementId) obj : new EntitySeed(obj);\n }", "class_method_signature": "ToElementId.apply(final Object obj)", "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_901
{ "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 shouldReturnFullAggregatorWithMultiPropertyAggregator() {\n // Given\n final T elementDef = createBuilder()\n .property(\"property1\", PROPERTY_STRING_TYPE)\n .property(\"property2\", PROPERTY_STRING_TYPE)\n .property(\"prope...
{ "fields": [ { "declarator": "elementDefValidator", "modifier": "private final", "original_string": "private final SchemaElementDefinitionValidator elementDefValidator;", "type": "SchemaElementDefinitionValidator", "var_name": "elementDefValidator" }, { "declarator": "...
{ "body": "@JsonIgnore\n public ElementAggregator getFullAggregator() {\n if (null == fullAggregatorCache) {\n createFullAggregator();\n }\n return fullAggregatorCache;\n }", "class_method_signature": "SchemaElementDefinition.getFullAggregator()", "constructor": false, "ful...
{ "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_844
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/job/GetJobDetailsHandlerTest.java", "identifier": "GetJobDetailsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetJobDetailsByDelegatingToJobTrackerWithOperationJobId() throws OperationException {\n // Given\n final String jobId = \"jobId\";\n final GetJobDetailsHandler handler = new GetJobDetailsHandler();\n final GetJobDetails operation = new GetJobDetails....
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/job/GetJobDetailsHandler.java", "identifier": "GetJobDetailsHandler", "interfaces": "implements OutputOperationHandler<GetJobDetails, JobDetail>", "methods": [ { "class_method_signature": "GetJobDetailsHandl...
{ "body": "@Override\n public JobDetail doOperation(final GetJobDetails operation, final Context context, final Store store) throws OperationException {\n if (null == store.getJobTracker()) {\n throw new OperationException(\"The Job Tracker has not been configured\", SERVICE_UNAVAILABLE);\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_517
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/CollectionUtilTest.java", "identifier": "CollectionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFalseWhenAnyMissingCalledWithNullValue() {\n // Given\n final Collection<Integer> collection = Sets.newHashSet(10, 20, 30);\n\n // When\n final boolean result = CollectionUtil.anyMissing(collection, null);\n\n // Then\n assertFals...
{ "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 anyMissing(final Collection collection, final Object[] objects) {\n boolean result = false;\n if (null == collection || collection.isEmpty()) {\n if (null != objects && 0 < objects.length) {\n result = true;\n }\n } else if (nu...
{ "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_147
{ "fields": [], "file": "store-implementation/accumulo-store/src/test/java/uk/gov/gchq/gaffer/accumulostore/operation/impl/GetElementsWithinSetTest.java", "identifier": "GetElementsWithinSetTest", "interfaces": "", "superclass": "extends OperationTest<GetElementsWithinSet>" }
{ "body": "@Test\n public void shouldJSONSerialiseAndDeserialise() throws SerialisationException {\n // Given\n final GetElementsWithinSet op = new GetElementsWithinSet.Builder()\n .input(AccumuloTestData.SEED_SOURCE_1,\n AccumuloTestData.SEED_DESTINATION_1,\n ...
{ "fields": [ { "declarator": "view", "modifier": "private", "original_string": "private View view;", "type": "View", "var_name": "view" }, { "declarator": "directedType", "modifier": "private", "original_string": "private DirectedType directedType;", ...
{ "body": "@Override\n public Iterable<? extends EntityId> getInput() {\n return input;\n }", "class_method_signature": "GetElementsWithinSet.getInput()", "constructor": false, "full_signature": "@Override public Iterable<? extends EntityId> getInput()", "identifier": "getInput", "invocations":...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1246
{ "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 shouldCloseAllOperationInputs() throws IOException {\n // Given\n final Operation[] operations = {\n mock(Operation.class),\n mock(Input.class),\n mock(Input.class),\n mock(MultiInput.class),\n m...
{ "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 public void close() throws IOException {\n for (final Operation operation : operations) {\n CloseableUtil.close(operation);\n }\n }", "class_method_signature": "OperationChain.close()", "constructor": false, "full_signature": "@Override public void close()",...
{ "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_19
{ "fields": [], "file": "store-implementation/federated-store/src/test/java/uk/gov/gchq/gaffer/federatedstore/util/FederatedStoreUtilTest.java", "identifier": "FederatedStoreUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldUpdateOperationViewAndReturnNullIfViewHasNoGroups() {\n // Given\n final Graph graph = createGraph();\n final GetElements operation = new GetElements.Builder()\n .view(new View.Builder()\n .edge(TestGroups.EDGE_2, new V...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(FederatedStoreUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FederatedStoreUtil.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "public static <OP extends Operation> OP updateOperationForGraph(final OP operation, final Graph graph) {\n OP resultOp = operation;\n if (operation instanceof Operations) {\n resultOp = (OP) operation.shallowClone();\n final Operations<Operation> operations = (Operations...
{ "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_794
{ "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 shouldApplyGlobalFilterAndReturnOnlySpecifiedEdges() 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 ...
{ "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_281
{ "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 shouldOverrideEmptyGlobalPropertiesAndIncludeEntityGroupProperties() {\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_1303
{ "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 public void testGetTimeBucket() {\n // Given\n final LongTimeSeries timeSeries1 = new LongTimeSeries(TimeBucket.MINUTE);\n final LongTimeSeries timeSeries2 = new LongTimeSeries(TimeBucket.HOUR);\n\n // When\n final TimeBucket bucket1 = timeSeries1.getTimeBucket...
{ "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": "public TimeBucket getTimeBucket() {\n return timeBucket;\n }", "class_method_signature": "LongTimeSeries.getTimeBucket()", "constructor": false, "full_signature": "public TimeBucket getTimeBucket()", "identifier": "getTimeBucket", "invocations": [], "modifiers": "public", "parameter...
{ "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_956
{ "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 shouldReturnFalseWhenSchemaHasNullValidatorEdgeFilters() {\n // Given\n final Schema schema = new Schema.Builder()\n .edge(TestGroups.EDGE, new SchemaEdgeDefinition.Builder().validator(null).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": "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_405
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ElementAggregatorTest.java", "identifier": "ElementAggregatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldAggregateProperties() {\n // Given\n final String reference = \"reference1\";\n final Integer value1 = 1;\n final Integer value2 = 2;\n final Integer valueResult = 3;\n\n final BinaryOperator<Integer> function = mock(BinaryOperator.clas...
{ "fields": [ { "declarator": "stateTuple = new PropertiesTuple()", "modifier": "private final", "original_string": "private final PropertiesTuple stateTuple = new PropertiesTuple();", "type": "PropertiesTuple", "var_name": "stateTuple" }, { "declarator": "propertiesTup...
{ "body": "public Element apply(final Element state, final Element element) {\n if (null == state) {\n return element;\n }\n\n apply(state.getProperties(), element.getProperties());\n return state;\n }", "class_method_signature": "ElementAggregator.apply(final Element state...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_110
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AddUpdateTableIteratorTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AddUpdateTableIteratorTest.class);", "type": "Logger", "var_name": ...
{ "body": "@Test\n public void shouldRunMainWithNoGraphLibrary() throws Exception {\n // Given\n final String[] args = {GRAPH_ID, SCHEMA_DIR, STORE_PROPS_PATH_UPDATED, \"update\"};\n\n // When\n AddUpdateTableIterator.main(args);\n\n // Then - no exceptions\n final Pair<Sc...
{ "fields": [ { "declarator": "UPDATE_KEY = \"update\"", "modifier": "public static final", "original_string": "public static final String UPDATE_KEY = \"update\";", "type": "String", "var_name": "UPDATE_KEY" }, { "declarator": "REMOVE_KEY = \"remove\"", "modifier...
{ "body": "public static void main(final String[] args) throws Exception {\n if (args.length < NUM_REQUIRED_ARGS) {\n System.err.println(\"Wrong number of arguments. \\nUsage: \"\n + \"<graphId> \"\n + \"<comma separated schema paths> <store properties path> \"\...
{ "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_540
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/iterable/TransformOneToManyIterableTest.java", "identifier": "TransformOneToManyIterableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCreateIteratorThatThrowsExceptionOnInvalidString() {\n // Given\n final String item1 = \"item 1\";\n final String item2 = \"item 2a invalid,item 2b\";\n final String item3 = \"item 3\";\n final Iterable<String> items = Arrays.asList(item1, ite...
{ "fields": [ { "declarator": "input", "modifier": "private final", "original_string": "private final Iterable<? extends I> input;", "type": "Iterable<? extends I>", "var_name": "input" }, { "declarator": "validator", "modifier": "private final", "original_s...
{ "body": "@Override\n public CloseableIterator<O> iterator() {\n return new CloseableIterator<O>() {\n private final Iterator<? extends I> inputItr = input.iterator();\n\n private Iterator<O> nextElements;\n private Boolean hasNext;\n\n @Override\n 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_813
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/DiscardOutputHandlerTest.java", "identifier": "DiscardOutputHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDiscardOutput() throws OperationException {\n // Given\n final DiscardOutputHandler handler = new DiscardOutputHandler();\n final DiscardOutput operation = mock(DiscardOutput.class);\n\n given(operation.getInput()).willReturn(null);\n\n // Whe...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/DiscardOutputHandler.java", "identifier": "DiscardOutputHandler", "interfaces": "implements OperationHandler<DiscardOutput>", "methods": [ { "class_method_signature": "DiscardOutputHandler.doOperation(final ...
{ "body": "@Override\n public Void doOperation(final DiscardOutput operation, final Context context, final Store store)\n throws OperationException {\n return null;\n }", "class_method_signature": "DiscardOutputHandler.doOperation(final DiscardOutput operation, final Context context, 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_1138
{ "fields": [], "file": "core/graph/src/test/java/uk/gov/gchq/gaffer/graph/GraphConfigTest.java", "identifier": "GraphConfigTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<GraphConfig>" }
{ "body": "@Test\n public void shouldReturnClonedView() throws Exception {\n // Given\n final String graphId = \"graphId\";\n final View view = new View.Builder().entity(TestGroups.ENTITY).build();\n\n // When\n final GraphConfig config = new GraphConfig.Builder()\n ...
{ "fields": [ { "declarator": "graphId", "modifier": "private", "original_string": "private String graphId;", "type": "String", "var_name": "graphId" }, { "declarator": "view", "modifier": "private", "original_string": "private byte[] view;", "type": "...
{ "body": "public View getView() {\n return null != view ? View.fromJson(view) : null;\n }", "class_method_signature": "GraphConfig.getView()", "constructor": false, "full_signature": "public View getView()", "identifier": "getView", "invocations": [ "fromJson" ], "modifiers": "public", ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1092
{ "fields": [ { "declarator": "TEST_WITH_VALUE = \"withTestValue\"", "modifier": "public static final", "original_string": "public static final String TEST_WITH_VALUE = \"withTestValue\";", "type": "String", "var_name": "TEST_WITH_VALUE" }, { "declarator": "TEST_WITHOUT...
{ "body": "@Test\n public void shouldPassNullValid() throws Exception {\n\n assertTrue(updateViewHook.validateAuths(userAuths, null, true));\n }", "class_method_signature": "UpdateViewHookTest.shouldPassNullValid()", "constructor": false, "full_signature": "@Test public void shouldPassNullValid()",...
{ "fields": [ { "declarator": "ADD_EXTRA_GROUPS_DEFAULT = false", "modifier": "public static final", "original_string": "public static final boolean ADD_EXTRA_GROUPS_DEFAULT = false;", "type": "boolean", "var_name": "ADD_EXTRA_GROUPS_DEFAULT" }, { "declarator": "withOpA...
{ "body": "protected final boolean validateAuths(final Set<String> userAuths, final Set<String> validAuth, final boolean ifValidAuthIsNull) {\n boolean rtn = ifValidAuthIsNull;\n if (null != validAuth) {\n if (null == userAuths) {\n rtn = validAuth.isEmpty();\n } els...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_669
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/resolver/named/NamedOperationScoreResolverTest.java", "identifier": "NamedOperationScoreResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetScoreFromOperationsInParameters() throws CacheOperationFailedException {\n //Given\n final Integer expectedScore = 8;\n\n final String opName = \"otherOp\";\n final NamedOperation<Element, Iterable<? extends Element>> namedOp = mock(NamedOperation...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedOperationCache cache;", "type": "NamedOperationCache", "var_name": "cache" }, { "declarator": "LOGGER = LoggerFactory.getLogger(NamedOperationScoreResolver.class)"...
{ "body": "@Override\n public Integer getScore(final NamedOperation operation) {\n return getScore(operation, null);\n }", "class_method_signature": "NamedOperationScoreResolver.getScore(final NamedOperation operation)", "constructor": false, "full_signature": "@Override public Integer getScore(fin...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_393
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/PropertiesTest.java", "identifier": "PropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldRemovePropertyIfAddedWithNullValue() {\n // Given\n final Properties properties = new Properties();\n properties.put(\"property1\", \"propertyValue1\");\n properties.put(\"property2\", \"propertyValue2\");\n\n // When\n properties.put(\...
{ "fields": [ { "declarator": "serialVersionUID = -5412533432398907359L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -5412533432398907359L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/data/src/m...
{ "body": "@Override\n public Object put(final String name, final Object value) {\n if (null != name) {\n if (null == value) {\n return super.remove(name);\n } else {\n return super.put(name, value);\n }\n }\n return null;\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_239
{ "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 shouldGetFilterFunctionsWithInputClass() throws IOException {\n // When\n final Set<Class> classes = service.getFilterFunctions(Long.class.getName());\n\n // Then\n assertThat(classes, IsCollectionContaining.hasItem(IsLessThan.class));\n assertThat(...
{ "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> getFilterFunctions() {\n return ReflectionUtil.getSubTypes(Predicate.class);\n }", "class_method_signature": "GraphConfigurationService.getFilterFunctions()", "constructor": false, "full_signature": "@Override public Set<Class> getFilterFunctions()", "iden...
{ "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_1211
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/output/ToEntitySeedsTest.java", "identifier": "ToEntitySeedsTest", "interfaces": "", "superclass": "extends OperationTest<ToEntitySeeds>" }
{ "body": "@Test\n @Override\n public void builderShouldCreatePopulatedOperation() {\n // Given\n final ToEntitySeeds toEntitySeeds = new ToEntitySeeds.Builder().input(\"1\", \"2\").build();\n\n // Then\n assertThat(toEntitySeeds.getInput(), is(notNullValue()));\n assertThat(t...
{ "fields": [ { "declarator": "input", "modifier": "private", "original_string": "private Iterable<? extends Object> input;", "type": "Iterable<? extends Object>", "var_name": "input" }, { "declarator": "options", "modifier": "private", "original_string": "p...
{ "body": "@Override\n public Iterable<? extends Object> getInput() {\n return input;\n }", "class_method_signature": "ToEntitySeeds.getInput()", "constructor": false, "full_signature": "@Override public Iterable<? extends Object> getInput()", "identifier": "getInput", "invocations": [], "mod...
{ "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_1354
{ "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 DoublesSketchSerialiser()", "modifier": "...
{ "body": "@Test\n public void testCanHandleDoublesUnion() {\n assertTrue(SERIALISER.canHandle(DoublesSketch.class));\n assertFalse(SERIALISER.canHandle(String.class));\n }", "class_method_signature": "DoublesSketchSerialiserTest.testCanHandleDoublesUnion()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "serialVersionUID = -8961920881003350151L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8961920881003350151L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/sketche...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return DoublesSketch.class.equals(clazz);\n }", "class_method_signature": "DoublesSketchSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class 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_686
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/compare/SortHandlerTest.java", "identifier": "SortHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldSortBasedOn2Properties() throws OperationException, JsonProcessingException {\n // Given\n final Entity entity1 = new Entity.Builder().group(TestGroups.ENTITY).property(\"property1\", 1)\n .property(\"property2\",...
{ "fields": [ { "declarator": "MAX_HANDLER = new MaxHandler()", "modifier": "private static final", "original_string": "private static final MaxHandler MAX_HANDLER = new MaxHandler();", "type": "MaxHandler", "var_name": "MAX_HANDLER" } ], "file": "core/store/src/main/java/uk/...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final Sort 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 == 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_1076
{ "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 shouldThrowExceptionOnExecuteJobUsingJobWithANullOperation() throws OperationException {\n // Given\n final Context context = new Context();\n\n final Graph graph = new Graph.Builder()\n .config(new GraphConfig.Builder()\n .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_1099
{ "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 shouldReturnResultWithoutModification() {\n // Given\n final OperationChainLimiter hook = fromJson(OP_CHAIN_LIMITER_PATH);\n final Object result = mock(Object.class);\n final OperationChain opChain = new OperationChain.Builder()\n .first(new...
{ "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 <T> T postExecute(final T result, final OperationChain<?> opChain, final Context context) {\n // This method can be overridden to add additional authorisation checks on the results.\n return result;\n }", "class_method_signature": "OperationChainLimiter.postExecute(...
{ "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_818
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToSingletonListHandlerTest.java", "identifier": "ToSingletonListHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldHandleNullInput() throws OperationException {\n // Given\n final ToSingletonListHandler handler = new ToSingletonListHandler();\n final ToSingletonList<Integer> operation = new ToSingletonList.Builder<Integer>().input(null).build();\n\n // When\n ...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToSingletonListHandler.java", "identifier": "ToSingletonListHandler", "interfaces": "implements OutputOperationHandler<ToSingletonList<T>, List<? extends T>>", "methods": [ { "class_method_signature":...
{ "body": "@Override\n public List<? extends T> doOperation(final ToSingletonList<T> operation, final Context context, final Store store) throws OperationException {\n if (null != operation.getInput()) {\n return Collections.singletonList(operation.getInput());\n } else {\n thro...
{ "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_1133
{ "fields": [], "file": "core/graph/src/test/java/uk/gov/gchq/gaffer/graph/hook/NamedOperationResolverTest.java", "identifier": "NamedOperationResolverTest", "interfaces": "", "superclass": "extends GraphHookTest<NamedOperationResolver>" }
{ "body": "@Test\n public void shouldResolveNamedOperationWithParameter() throws OperationException, CacheOperationFailedException {\n // Given\n final String opName = \"opName\";\n final NamedOperationCache cache = mock(NamedOperationCache.class);\n final NamedOperationResolver resolve...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedOperationCache cache;", "type": "NamedOperationCache", "var_name": "cache" } ], "file": "core/graph/src/main/java/uk/gov/gchq/gaffer/graph/hook/NamedOperationResolver.ja...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n resolveNamedOperations(opChain, context.getUser());\n }", "class_method_signature": "NamedOperationResolver.preExecute(final OperationChain<?> opChain, final Context context)", "constructor": fal...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_232
{ "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 shouldThrowExceptionWhenGetSerialisedFieldsWithUnknownClassName() {\n // When / Then\n try {\n service.getSerialisedFields(\"unknown className\");\n fail(\"Exception expected\");\n } catch (final IllegalArgumentException e) {\n as...
{ "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": "@SuppressFBWarnings(value = \"REC_CATCH_EXCEPTION\", justification = \"Need to wrap all runtime exceptions before they are given to the user\")\n @Override\n public Response getSerialisedFields(final String className) {\n final Class<?> clazz;\n try {\n clazz = Class.forName(...
{ "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_662
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/resolver/WhileScoreResolverTest.java", "identifier": "WhileScoreResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowErrorWhenNoDefaultResolverConfigured() {\n // Given\n final WhileScoreResolver resolver = new WhileScoreResolver();\n\n final While operation = new While.Builder<>()\n .conditional(new Conditional())\n .operation(new GetAl...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(WhileScoreResolver.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(WhileScoreResolver.class);", "type": "Logger", "var_name": "LOGGER" } ...
{ "body": "@Override\n public Integer getScore(final While operation) {\n throw new UnsupportedOperationException(\"Default Score Resolver has not been provided.\");\n }", "class_method_signature": "WhileScoreResolver.getScore(final While operation)", "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_398
{ "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 shouldBuildFilter() {\n // Given\n final String property1 = \"property 1\";\n final String property2a = \"property 2a\";\n final String property2b = \"property 2b\";\n final String property3 = \"property 3\";\n\n final Predicate func1 = mock(...
{ "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": "@Override\n public List<TupleAdaptedPredicate<String, ?>> getComponents() {\n if (readOnly) {\n return Collections.unmodifiableList(super.getComponents());\n }\n\n return super.getComponents();\n }", "class_method_signature": "ElementFilter.getComponents()", "const...
{ "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_45
{ "fields": [ { "declarator": "handler", "modifier": "private", "original_string": "private FederatedGetSchemaHandler handler;", "type": "FederatedGetSchemaHandler", "var_name": "handler" }, { "declarator": "fStore", "modifier": "private", "original_string":...
{ "body": "@Test\n public void shouldReturnSchemaOnlyForEnabledGraphs() throws OperationException {\n library.addProperties(ACC_PROP_ID, PROPERTIES);\n fStore.setGraphLibrary(library);\n\n final Schema edgeSchema1 = new Schema.Builder()\n .edge(\"edge\", new SchemaEdgeDefinition...
{ "fields": [], "file": "store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/operation/handler/FederatedGetSchemaHandler.java", "identifier": "FederatedGetSchemaHandler", "interfaces": "implements OutputOperationHandler<GetSchema, Schema>", "methods": [ { "class_meth...
{ "body": "@Override\n public Schema doOperation(final GetSchema operation, final Context context, final Store store) throws OperationException {\n if (null == operation) {\n throw new OperationException(\"Operation cannot be null\");\n }\n return ((FederatedStore) store).getSchema(...
{ "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_377
{ "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 shouldCompareWhenFirstElementHasMissingProperties() {\n // Given\n final Entity smallEntity = makeEntity(TestGroups.ENTITY, TestPropertyNames.PROP_1, 1);\n final Entity largeEntity = makeEntity(TestGroups.ENTITY, TestPropertyNames.PROP_2, 2);\n\n final Ele...
{ "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_727
{ "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 shouldMapMultipleObjectsAtOnce() throws OperationException {\n // Given\n final MapHandler<Iterable<Integer>, String> handler = new MapHandler<>();\n\n final Map<Iterable<Integer>, String> operation = new Map.Builder<Iterable<Integer>>()\n .input(A...
{ "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_459
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/JsonUtilTest.java", "identifier": "JsonUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFalseWhenJsonObjectsAreNotEqual() {\n final String json1 = \"{\\\"a\\\": 1, \\\"b\\\": 2}\";\n final String json2 = \"{\\\"a\\\": 1, \\\"b\\\": 3}\";\n\n assertFalse(JsonUtil.equals(json1, json2));\n assertFalse(JsonUtil.equals(json1.getBytes()...
{ "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_1021
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/BytesSerialiserTest.java", "identifier": "BytesSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<byte[]>" }
{ "body": "@Test\n public void shouldSerialiseBytesByJustReturningTheProvidedBytes() throws SerialisationException {\n // Given\n final byte[] bytes = {0, 1};\n\n // When\n final byte[] serialisedBytes = serialiser.serialise(bytes);\n\n // Then\n assertSame(bytes, serialis...
{ "fields": [ { "declarator": "serialVersionUID = -7718650654168267452L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -7718650654168267452L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisat...
{ "body": "@Override\n public byte[] serialise(final byte[] value) throws SerialisationException {\n return value;\n }", "class_method_signature": "BytesSerialiser.serialise(final byte[] value)", "constructor": false, "full_signature": "@Override public byte[] serialise(final byte[] value)", "ide...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1164
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/util/OperationUtilTest.java", "identifier": "OperationUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConvertObjectArrayToEntityIds() {\n // Given\n final Object[] input = {\n 1,\n \"2\",\n new EntitySeed(\"3\"),\n new Entity(\"group\", \"4\"),\n null\n };\n\n // When\n ...
{ "fields": [], "file": "core/operation/src/main/java/uk/gov/gchq/gaffer/operation/util/OperationUtil.java", "identifier": "OperationUtil", "interfaces": "", "methods": [ { "class_method_signature": "OperationUtil.OperationUtil()", "constructor": true, "full_signature": "private Operati...
{ "body": "public static Iterable<? extends EntityId> toEntityIds(final Object... input) {\n if (null == input) {\n return null;\n }\n return Arrays.stream(input).map(new ToEntityId()).collect(Collectors.toList());\n }", "class_method_signature": "OperationUtil.toEntityIds(final 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_12
{ "fields": [], "file": "store-implementation/federated-store/src/test/java/uk/gov/gchq/gaffer/federatedstore/util/FederatedStoreUtilTest.java", "identifier": "FederatedStoreUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetNullGraphIdsWhenNoCsvEntry() {\n // Given\n final Map<String, String> config = new HashMap<>();\n config.put(\"some other key\", \"some value\");\n\n // When\n final List<String> graphIds = FederatedStoreUtil.getGraphIds(config);\n\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(FederatedStoreUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FederatedStoreUtil.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "public static List<String> getGraphIds(final Map<String, String> config) {\n if (null == config) {\n return null;\n }\n\n return getCleanStrings(config.get(KEY_OPERATION_OPTIONS_GRAPH_IDS));\n }", "class_method_signature": "FederatedStoreUtil.getGraphIds(final Map<Strin...
{ "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_635
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/SerialisationFactoryTest.java", "identifier": "SerialisationFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnSerialiserForAnInteger() throws SerialisationException {\n // Given\n final SerialisationFactory factory = new SerialisationFactory();\n final Class<?> clazz = Integer.class;\n\n // When\n final Serialiser serialiser = factory.getSeriali...
{ "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_265
{ "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 shouldCreateViewWithGlobalDefinitions() {\n // Given\n final View view = new View.Builder()\n .globalElements(new GlobalViewElementDefinition.Builder()\n .preAggregationFilter(new ElementFilter.Builder()\n ...
{ "fields": [ { "declarator": "globalElements", "modifier": "private", "original_string": "private List<GlobalViewElementDefinition> globalElements;", "type": "List<GlobalViewElementDefinition>", "var_name": "globalElements" }, { "declarator": "globalEntities", "m...
{ "body": "public 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_770
{ "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 shouldCorrectlyExecutePrePredicateTransformUsingConditional() throws OperationException {\n // Given\n final Object input = Arrays.asList(new EntitySeed(\"A\"), new EntitySeed(\"B\"));\n final Object intermediate = Arrays.asList(new EntitySeed(\"1\"), new EntityS...
{ "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_320
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/graph/entity/EntityMapTest.java", "identifier": "EntityMapTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetEntities() {\n final EntityMap entityMap = getEntityMap();\n\n final Set<Object> results = entityMap.getVertices();\n\n assertThat(results, hasItems(1));\n }", "class_method_signature": "EntityMapTest.shouldGetEntities()", "constructor": false, ...
{ "fields": [ { "declarator": "backingMap = HashMultimap.create()", "modifier": "private final", "original_string": "private final SetMultimap<Object, Entity> backingMap = HashMultimap.create();", "type": "SetMultimap<Object, Entity>", "var_name": "backingMap" } ], "file": "c...
{ "body": "public Set<Object> getVertices() {\n return Collections.unmodifiableSet(backingMap.keySet());\n }", "class_method_signature": "EntityMap.getVertices()", "constructor": false, "full_signature": "public Set<Object> getVertices()", "identifier": "getVertices", "invocations": [ "unmodif...
{ "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_1308
{ "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 testAggregateWhenBothInSampleState() {\n // Given\n final BoundedTimestampSet boundedTimestampSet1 = new BoundedTimestampSet(CommonTimeUtil.TimeBucket.SECOND, 10);\n final Set<Instant> instants1 = new HashSet<>();\n IntStream.range(0, 100)\n ...
{ "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_1037
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/TreeSetStringSerialiserTest.java", "identifier": "TreeSetStringSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<TreeSet<String>>" }
{ "body": "@Test\n @Override\n public void shouldDeserialiseEmpty() throws SerialisationException {\n // Given When\n final TreeSet<String> tree = serialiser.deserialiseEmpty();\n\n // Then\n assertNotNull(tree);\n assertTrue(tree.isEmpty());\n }", "class_method_signature...
{ "fields": [ { "declarator": "serialVersionUID = -8241328807929077861L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8241328807929077861L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "COM...
{ "body": "@Override\n public TreeSet<String> deserialiseEmpty() {\n return new TreeSet<>();\n }", "class_method_signature": "TreeSetStringSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public TreeSet<String> 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_859
{ "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 shouldCustomAccessPredicateAddNamedOperationFieldsToNamedOperationDetailCorrectly() throws OperationException, CacheOperationFailedException {\n final AccessPredicate readAccessPredicate = new AccessPredicate(new CustomUserPredicate());\n final AccessPredicate writeAcce...
{ "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_1172
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/function/FromEntityIdTest.java", "identifier": "FromEntityIdTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnNullIfTheInputIsNull() {\n // Given\n final EntityId input = null;\n final FromEntityId function = new FromEntityId();\n\n // When\n final Object output = function.apply(input);\n\n // Then\n assertNull(output);\n }", ...
{ "fields": [], "file": "core/operation/src/main/java/uk/gov/gchq/gaffer/operation/function/FromEntityId.java", "identifier": "FromEntityId", "interfaces": "", "methods": [ { "class_method_signature": "FromEntityId.apply(final EntityId e)", "constructor": false, "full_signature": "@Overr...
{ "body": "@Override\n public Object apply(final EntityId e) {\n if (null == e) {\n return null;\n }\n return e.getVertex();\n }", "class_method_signature": "FromEntityId.apply(final EntityId e)", "constructor": false, "full_signature": "@Override public Object apply(final ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_273
{ "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 shouldReturnFalseWhenViewHasNullPostAggEdgeFilters() {\n // Given\n final View view = new View.Builder()\n .edge(TestGroups.EDGE, new ViewElementDefinition.Builder()\n .postAggregationFilter(null)\n .build())\...
{ "fields": [ { "declarator": "globalElements", "modifier": "private", "original_string": "private List<GlobalViewElementDefinition> globalElements;", "type": "List<GlobalViewElementDefinition>", "var_name": "globalElements" }, { "declarator": "globalEntities", "m...
{ "body": "public boolean hasPostAggregationFilters() {\n return hasFilters(ViewElementDefinition::hasPostAggregationFilters);\n }", "class_method_signature": "View.hasPostAggregationFilters()", "constructor": false, "full_signature": "public boolean hasPostAggregationFilters()", "identifier": "hasP...
{ "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_789
{ "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 shouldFailValidationWhenElementAggregatorOperationIsNull() {\n // Given\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" ...