id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
47973088_98
{ "fields": [], "file": "store-implementation/accumulo-store/src/test/java/uk/gov/gchq/gaffer/accumulostore/data/element/AccumuloEdgeValueLoaderTest.java", "identifier": "AccumuloEdgeValueLoaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldLoadAllIdentifiers() throws SerialisationException {\n // Given\n final String group = TestGroups.EDGE;\n final Key key = mock(Key.class);\n final Value value = mock(Value.class);\n final AccumuloElementConverter converter = mock(AccumuloEleme...
{ "fields": [ { "declarator": "serialVersionUID = 6857884477152298375L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6857884477152298375L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "inclu...
{ "body": "@SuppressFBWarnings(value = \"BC_UNCONFIRMED_CAST\", justification = \"element provided should always be an Edge\")\n @Override\n public void loadIdentifiers(final Element edge) {\n final EdgeId edgeId = (EdgeId) elementConverter.getElementId(key, includeMatchedVertex);\n ((Edge) edge)....
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_892
{ "fields": [ { "declarator": "stringType", "modifier": "private", "original_string": "private TypeDefinition stringType;", "type": "TypeDefinition", "var_name": "stringType" }, { "declarator": "intType", "modifier": "private", "original_string": "private Ty...
{ "body": "@Test\n public void shouldRemoveUnusedTypes() {\n //Given\n final SchemaOptimiser optimiser = new SchemaOptimiser();\n final boolean isOrdered = true;\n\n // When\n final Schema optimisedSchema = optimiser.optimise(schema, isOrdered);\n\n // Then\n assert...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SchemaOptimiser.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SchemaOptimiser.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public Schema optimise(final Schema schema, final boolean isStoreOrdered) {\n if (null != schema && null != schema.getTypes()) {\n return new Schema.Builder()\n .merge(schema)\n .types(getOptimisedTypes(schema, isStoreOrdered))\n .v...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_938
{ "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 shouldValidateAndReturnTrueForNotFilter() {\n // Given\n final ViewValidator validator = new ViewValidator();\n final View view = new View.Builder()\n .entity(TestGroups.ENTITY, new ViewElementDefinition.Builder()\n .preAggre...
{ "fields": [ { "declarator": "SKIP_VIEW_VALIDATION = \"skipViewValidation\"", "modifier": "public static final", "original_string": "public static final String SKIP_VIEW_VALIDATION = \"skipViewValidation\";", "type": "String", "var_name": "SKIP_VIEW_VALIDATION" }, { "d...
{ "body": "public ValidationResult validate(final View view, final Schema schema, final Set<StoreTrait> storeTraits) {\n final boolean isStoreOrdered = storeTraits.contains(StoreTrait.ORDERED);\n\n final ValidationResult result = new ValidationResult();\n\n if (null != view) {\n valida...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1013
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/ordered/OrderedDoubleSerialiserTest.java", "identifier": "OrderedDoubleSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Double>" }
{ "body": "@Test\n public void cantSerialiseStringClass() {\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "OrderedDoubleSerialiserTest.cantSerialiseStringClass()", "constructor": false, "full_signature": "@Test public void cantSerialiseStringClass()", "identif...
{ "fields": [ { "declarator": "serialVersionUID = -4750738170126596560L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -4750738170126596560L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "LON...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Double.class.equals(clazz);\n }", "class_method_signature": "OrderedDoubleSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "ident...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_191
{ "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 shouldNotFilterOutEntityInView() throws OperationException, SerialisationException {\n // Given\n final GroupFilterProcessor processor = new GroupFilterProcessor(VIEW);\n\n // When\n final boolean result = processor.test(CellUtil.getLazyCell(new Entity(Tes...
{ "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_484
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/OneOrMoreTest.java", "identifier": "OneOrMoreTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldBeEqual() {\n final OneOrMore<Integer> collection1 = new OneOrMore<>(false, 1);\n final OneOrMore<Integer> collection2 = new OneOrMore<>(false, 1);\n\n assertEquals(collection1, collection2);\n assertEquals(collection1.hashCode(), collection2.hashCod...
{ "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_1156
{ "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 shouldDeserialiseFromJsonWhenDirectedTypeIsUndirected() {\n // Given\n final String json = \"{\\\"class\\\": \\\"uk.gov.gchq.gaffer.operation.data.EdgeSeed\\\", \\\"directedType\\\": \\\"UNDIRECTED\\\"}\";\n\n // When\n final EdgeSeed deserialisedEdgeSeed ...
{ "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_257
{ "fields": [ { "declarator": "DETAILED_MSG = \"detailedMessage\"", "modifier": "private static final", "original_string": "private static final String DETAILED_MSG = \"detailedMessage\";", "type": "String", "var_name": "DETAILED_MSG" }, { "declarator": "SIMPLE_MSG = \"...
{ "body": "@Test\n public void shouldNotBuildDetailedMessageWithIncorrectPropertyFlag() {\n setDebugMode(\"wrong\");\n\n final Error error = new ErrorBuilder()\n .simpleMessage(SIMPLE_MSG)\n .detailMessage(DETAILED_MSG)\n .build();\n\n assertNotEqua...
{ "fields": [ { "declarator": "statusCode", "modifier": "private final", "original_string": "private final int statusCode;", "type": "int", "var_name": "statusCode" }, { "declarator": "status", "modifier": "private final", "original_string": "private final S...
{ "body": "public String getDetailMessage() {\n return detailMessage;\n }", "class_method_signature": "Error.getDetailMessage()", "constructor": false, "full_signature": "public String getDetailMessage()", "identifier": "getDetailMessage", "invocations": [], "modifiers": "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_607
{ "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": "ElementIdSerialiserTest.testCantSerialiseIntegerClass()", "constructor": false, "full_signature": "@Test public void te...
{ "fields": [ { "declarator": "serialVersionUID = 2116809339334801784L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 2116809339334801784L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "entit...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return ElementId.class.isAssignableFrom(clazz);\n }", "class_method_signature": "ElementIdSerialiser.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_20
{ "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 shouldUpdateOperationChainAndReturnNullIfNestedOperationViewHasNoGroups() {\n // Given\n final Graph graph = createGraph();\n final OperationChain<?> operation = new OperationChain.Builder()\n .first(new GetElements.Builder()\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_1290
{ "fields": [ { "declarator": "mockGenerator", "modifier": "private static", "original_string": "private static ElementGenerator<String> mockGenerator;", "type": "ElementGenerator<String>", "var_name": "mockGenerator" }, { "declarator": "mockOneToOneGenerator", "m...
{ "body": "@Test\n public void shouldDelegateToGafferElementGenerator() throws Exception {\n // Given\n final String csv = \"1,2,3,4\";\n final GafferMapFunction function = new GafferMapFunction<>(String.class, MockedGenerator.class);\n final Iterable expectedResults = Arrays.asList(\n ...
{ "fields": [ { "declarator": "serialVersionUID = -2338397824952911347L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2338397824952911347L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "gen...
{ "body": "@Override\n public void flatMap(final T item, final Collector<Element> out) throws Exception {\n if (null == out) {\n throw new IllegalArgumentException(\"Element collector is required\");\n }\n\n if (null == elementGenerator) {\n elementGenerator = generatorCl...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_312
{ "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 shouldRemoveExcludedProperties() {\n //Given\n final View view = new View.Builder()\n .edge(TestGroups.EDGE, new ViewElementDefinition.Builder()\n .excludeProperties(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_742
{ "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 shouldHandleNullOperation() throws Exception {\n // Given\n final ReduceHandler<Integer> handler = new ReduceHandler<>();\n\n // When\n try {\n final Integer result = handler.doOperation(null, null, null);\n } catch (final OperationExcept...
{ "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_555
{ "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 shouldThrowIAXExceptionWhenNextItemIsInvalidString() {\n // Given\n final String item1 = \"valid item 1\";\n final String item2 = \"invalid item 2 invalid\";\n final String item3 = \"valid item 3\";\n final Iterable<String> items = Arrays.asList(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 @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_105
{ "fields": [ { "declarator": "BYTE_ENTITY_GRAPH = \"byteEntityGraph\"", "modifier": "private static final", "original_string": "private static final String BYTE_ENTITY_GRAPH = \"byteEntityGraph\";", "type": "String", "var_name": "BYTE_ENTITY_GRAPH" }, { "declarator": "...
{ "body": "@Test\n public void shouldFailSchemaValidationWhenTimestampPropertyDoesNotHaveMaxAggregator() throws StoreException {\n // Given\n final AccumuloStore store = new AccumuloStore();\n final Schema schema = new Schema.Builder()\n .entity(TestGroups.ENTITY, new SchemaEnti...
{ "fields": [ { "declarator": "TRAITS =\n Collections.unmodifiableSet(Sets.newHashSet(\n ORDERED,\n VISIBILITY,\n INGEST_AGGREGATION,\n QUERY_AGGREGATION,\n PRE_AGGREGATION_FILTERING,\n ...
{ "body": "@Override\n public void initialise(final String graphId, final Schema schema, final StoreProperties properties) throws StoreException {\n preInitialise(graphId, schema, properties);\n TableUtils.ensureTableExists(this);\n }", "class_method_signature": "AccumuloStore.initialise(final S...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1087
{ "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 shouldPassExcessAuth() throws Exception {\n userAuths.add(A);\n userAuths.add(B);\n validAuths.add(A);\n\n assertTrue(updateViewHook.validateAuths(userAuths, validAuths, true));\n }", "class_method_signature": "UpdateViewHookTest.shouldPassExcessAuth(...
{ "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_806
{ "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 shouldTransformElementsUsingInlineFunction() throws OperationException {\n // Given\n final Function<String, Integer> function = String::length;\n final Map<String, ElementTransformer> entities = new HashMap<>();\n given(store.getSchema()).willReturn(schem...
{ "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_943
{ "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 shouldDeserialiseAndReserialiseIntoTheSameJson() throws SerialisationException {\n // Given\n final byte[] json1 = schema.toCompactJson();\n final Schema schema2 = new Schema.Builder().json(json1).build();\n\n // When\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 byte[] toCompactJson() throws SchemaException {\n return toJson(false, \"description\");\n }", "class_method_signature": "Schema.toCompactJson()", "constructor": false, "full_signature": "public byte[] toCompactJson()", "identifier": "toCompactJson", "invocations": [ "toJson"...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1068
{ "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 shouldAddHooksVarArgsAndGetGraphHooks() throws Exception {\n // Given\n final StoreProperties storeProperties = new StoreProperties();\n storeProperties.setStoreClass(TestStoreImpl.class.getName());\n final GraphHook graphHook1 = mock(GraphHook.class);\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Graph.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Graph.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": ...
{ "body": "public List<Class<? extends GraphHook>> getGraphHooks() {\n if (config.getHooks().isEmpty()) {\n return Collections.emptyList();\n }\n\n return (List) config.getHooks().stream().map(GraphHook::getClass).collect(Collectors.toList());\n }", "class_method_signature": "Grap...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_410
{ "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 shouldAggregateWithTuple2BinaryOperator() {\n // Given\n final String property1 = \"property 1\";\n final String property2 = \"property 2\";\n final BinaryOperator func1 = new ExampleTuple2BinaryOperator();\n final ElementAggregator aggregator = new...
{ "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_1341
{ "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 initWithNullAuthsDoesNotHaveNextIterator() {\n final Partition partition = new AccumuloTablet(0, 0, \"a\", \"b\");\n final TaskContext taskContext = mock(TaskContext.class);\n\n final RFileReaderIterator iterator = new RFileReaderIterator(partition, taskContext, ...
{ "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_369
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/comparison/ComparableOrToStringComparatorTest.java", "identifier": "ComparableOrToStringComparatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCompareIntegerArrays() {\n final ComparableOrToStringComparator comparator = new ComparableOrToStringComparator();\n\n final int result = comparator.compare(new Integer[] {1, 1}, new Integer[] {1, 2});\n\n assertTrue(result < 0, \"Should be less than 0\");\...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/comparison/ComparableOrToStringComparator.java", "identifier": "ComparableOrToStringComparator", "interfaces": "implements Comparator<Object>, Serializable", "methods": [ { "class_method_signature": "ComparableOrToStrin...
{ "body": "@Override\n public int compare(final Object vertex1, final Object vertex2) {\n if (null == vertex1) {\n if (null == vertex2) {\n return 0;\n }\n return 1;\n }\n\n if (null == vertex2) {\n return -1;\n }\n\n if ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_693
{ "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 shouldSortLargeNumberOfElements() throws OperationException {\n // Given\n final int streamSize = 10000;\n final int resultLimit = 5000;\n final Stream<Element> stream = new Random().ints(streamSize * 2) // generate a fe...
{ "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_739
{ "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 shouldAggregateResultsWithIdentity() throws Exception {\n // Given\n final List<Integer> input = Arrays.asList(1, 2, 3, 4, 5);\n final Integer identity = 10;\n final Integer expectedResult = 10;\n final Reduce<Integer> reduce = new Reduce.Builder<In...
{ "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_386
{ "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 shouldCloneEntity() {\n final String vertex = \"vertex1\";\n\n final Entity entity = new Entity(TestGroups.ENTITY, vertex);\n final Entity clone = entity.emptyClone();\n\n assertEquals(clone, entity);\n }", "class_method_signature": "EntityTest.should...
{ "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 Entity emptyClone() {\n return new Entity(this.getGroup(), this.getVertex());\n }", "class_method_signature": "Entity.emptyClone()", "constructor": false, "full_signature": "@Override public Entity emptyClone()", "identifier": "emptyClone", "invocations": [ "ge...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1204
{ "fields": [ { "declarator": "ADD_ELEMENTS_JSON = String.format(\"{%n\" +\n \" \\\"class\\\" : \\\"uk.gov.gchq.gaffer.operation.impl.add.AddElements\\\",%n\" +\n \" \\\"validate\\\" : true,%n\" +\n \" \\\"skipInvalidElements\\\" : false,%n\" +\n \" \\\"input\...
{ "body": "@Test\n public void shouldDeserialiseAddElementsOperation() throws IOException {\n // Given / When\n final AddElements addElements = JSONSerialiser.deserialise(ADD_ELEMENTS_JSON.getBytes(), AddElements.class);\n\n // Then\n final Iterator<? extends Element> itr = addElements....
{ "fields": [ { "declarator": "validate = true", "modifier": "private", "original_string": "private boolean validate = true;", "type": "boolean", "var_name": "validate" }, { "declarator": "skipInvalidElements", "modifier": "private", "original_string": "priv...
{ "body": "@Override\n public Iterable<? extends Element> getInput() {\n return elements;\n }", "class_method_signature": "AddElements.getInput()", "constructor": false, "full_signature": "@Override public Iterable<? extends Element> 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_851
{ "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 shouldReturnNullWhenVariableDoesntExist() 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(v...
{ "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_152
{ "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 shouldReturnNullPreAggFilterIfNoPreAggFilters() throws Exception {\n // Given\n final AccumuloStore store = mock(AccumuloStore.class);\n final Schema schema = createSchema();\n final View view = new View.Builder()\n .edge(TestGroups.EDGE, ne...
{ "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 getElementPreAggregationFilterIteratorSetting(final View view, final AccumuloStore store)\n throws IteratorSettingException {\n if (!view.hasPreAggregationFilters()) {\n LOGGER.debug(\"Returning null from getElementPreAggregationFilterItera...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_502
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/CollectionUtilTest.java", "identifier": "CollectionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnTreeSetWithProvidedItem() {\n final String item = \"test item\";\n\n final TreeSet<String> treeSet = CollectionUtil.treeSet(item);\n\n assertEquals(1, treeSet.size());\n assertTrue(treeSet.contains(item));\n }", "class_method_signature": "...
{ "fields": [], "file": "core/common-util/src/main/java/uk/gov/gchq/gaffer/commonutil/CollectionUtil.java", "identifier": "CollectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtil.CollectionUtil()", "constructor": true, "full_signature": "private Colle...
{ "body": "public static <T> TreeSet<T> treeSet(final T item) {\n final TreeSet<T> treeSet = new TreeSet<>();\n if (null != item) {\n treeSet.add(item);\n }\n\n return treeSet;\n }", "class_method_signature": "CollectionUtil.treeSet(final T item)", "constructor": false, ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_447
{ "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 shouldDeserialiseFromJsonWhenDirectedTypeIsEither() throws SerialisationException {\n final String json = \"{\\\"class\\\": \\\"uk.gov.gchq.gaffer.data.element.Edge\\\", \\\"directedType\\\": \\\"EITHER\\\"}\";\n\n final Edge deserialisedEdge = JSONSerialiser.deserialis...
{ "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_914
{ "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 shouldValidateAndReturnFalseWhenEntityTransientPropertyIsInSchema() {\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_1195
{ "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 shouldValidateWhenOperationListDoesNotContainAGetElementsOperation() {\n // Given\n final GetWalks getWalks = new GetWalks.Builder().input(new EntitySeed(\"1\"), new EntitySeed(\"2\"))\n .operations(new GetElements.Buil...
{ "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_294
{ "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 shouldThrowExceptionWhenGlobalExcludePropertiesAndEdgePropertiesSet() {\n // Given\n final View view = new View.Builder()\n .globalEdges(new GlobalViewElementDefinition.Builder()\n .groups(TestGroups.EDGE)\n ....
{ "fields": [ { "declarator": "globalElements", "modifier": "private", "original_string": "private List<GlobalViewElementDefinition> globalElements;", "type": "List<GlobalViewElementDefinition>", "var_name": "globalElements" }, { "declarator": "globalEntities", "m...
{ "body": "public void expandGlobalDefinitions() {\n if (null != globalEntities && !globalEntities.isEmpty()) {\n setEntities(expandGlobalDefinitions(getEntities(), getEntityGroups(), globalEntities, false));\n globalEntities = null;\n }\n\n if (null != globalEdges && !globa...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1316
{ "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 testCantMergeIfDifferentTimeBucket() {\n try {\n final RBMBackedTimestampSet rbmBackedTimestampSet1 = new RBMBackedTimestampSet(CommonTimeUtil.TimeBucket.SECOND);\n final RBMBackedTimestampSet rbmBackedTimestampSet2 = new RBMBackedTimestampSet(CommonTimeU...
{ "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_1253
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/named/operation/NamedOperationDetailTest.java", "identifier": "NamedOperationDetailTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDefaultWriteAccessPredicateIfNoneSpecified() {\n final NamedOperationDetail namedOperationDetail = getBaseNamedOperationDetailBuilder().build();\n assertEquals(\n new AccessPredicate(new User.Builder().userId(\"creatorUserId\").build(), asList(\"wri...
{ "fields": [ { "declarator": "serialVersionUID = -8831783492657131469L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8831783492657131469L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "CHA...
{ "body": "public AccessPredicate getWriteAccessPredicate() {\n try {\n return writeAccessPredicateJson != null ? JSONSerialiser.deserialise(writeAccessPredicateJson, AccessPredicate.class) : null;\n } catch (final SerialisationException e) {\n throw new IllegalArgumentException(\"...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_781
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/generate/GenerateObjectsHandlerTest.java", "identifier": "GenerateObjectsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnObjects() throws OperationException {\n // Given\n final GenerateObjectsHandler<String> handler = new GenerateObjectsHandler<>();\n final Store store = mock(Store.class);\n final GenerateObjects<String> operation = mock(GenerateObjects.class);\...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/generate/GenerateObjectsHandler.java", "identifier": "GenerateObjectsHandler", "interfaces": "implements OutputOperationHandler<GenerateObjects<OBJ>, Iterable<? extends OBJ>>", "methods": [ { "class_method_s...
{ "body": "@Override\n public Iterable<? extends OBJ> doOperation(final GenerateObjects<OBJ> operation,\n final Context context, final Store store)\n throws OperationException {\n return operation.getElementGenerator().apply(operation.getInput());\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_514
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/CollectionUtilTest.java", "identifier": "CollectionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFalseWhenAnyMissingCalledWhenTheCollectionContainsAllValues() {\n // Given\n final Collection<Integer> collection = Sets.newHashSet(10, 20, 30);\n final Object[] values = new Object[] {10, 20, 30};\n\n // When\n final boolean result = Co...
{ "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_144
{ "fields": [], "file": "store-implementation/accumulo-store/src/test/java/uk/gov/gchq/gaffer/accumulostore/operation/handler/GetElementsHandlerTest.java", "identifier": "GetElementsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldFailIfOperationInputIsUndefined() {\n // Given\n final GetElementsHandler handler = new GetElementsHandler();\n final GetElements op = new GetElements.Builder()\n .build();\n\n // When / Then\n try {\n handler.doOpera...
{ "fields": [], "file": "store-implementation/accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/operation/handler/GetElementsHandler.java", "identifier": "GetElementsHandler", "interfaces": "implements OutputOperationHandler<GetElements, CloseableIterable<? extends Element>>", "methods": [ { ...
{ "body": "@Override\n public CloseableIterable<? extends Element> doOperation(final GetElements operation,\n final Context context, final Store store)\n throws OperationException {\n return doOperation(operation, context.getUser(), (Accu...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_847
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/job/CancelScheduledJobHandlerTest.java", "identifier": "CancelScheduledJobHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowExceptionIfJobTrackerIsNotConfigured() {\n // Given\n final CancelScheduledJobHandler handler = new CancelScheduledJobHandler();\n final CancelScheduledJob operation = mock(CancelScheduledJob.class);\n final Store store = mock(Store.class);\n ...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/job/CancelScheduledJobHandler.java", "identifier": "CancelScheduledJobHandler", "interfaces": "implements OperationHandler<CancelScheduledJob>", "methods": [ { "class_method_signature": "CancelScheduledJobHa...
{ "body": "@Override\n public Void doOperation(final CancelScheduledJob operation, final Context context, final Store store) throws OperationException {\n if (null == store.getJobTracker()) {\n throw new OperationException(\"JobTracker not enabled\");\n }\n if (null == 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_1183
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/function/ToElementIdTest.java", "identifier": "ToElementIdTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnOriginalValueIfInputIsAnEdge() {\n // Given\n final Edge input = new Edge(\"group\");\n final ToElementId function = new ToElementId();\n\n // When\n final ElementId output = function.apply(input);\n\n // Then\n assertSame(...
{ "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_902
{ "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 shouldReturnIngestAggregator() {\n // Given\n final T elementDef = createBuilder()\n .property(\"property1\", PROPERTY_STRING_TYPE)\n .property(\"property2\", PROPERTY_STRING_TYPE)\n .property(\"property3\", PROPERTY_STRING_T...
{ "fields": [ { "declarator": "elementDefValidator", "modifier": "private final", "original_string": "private final SchemaElementDefinitionValidator elementDefValidator;", "type": "SchemaElementDefinitionValidator", "var_name": "elementDefValidator" }, { "declarator": "...
{ "body": "@JsonIgnore\n public ElementAggregator getIngestAggregator() {\n if (null == ingestAggregatorCache) {\n createIngestAggregator();\n }\n return ingestAggregatorCache;\n }", "class_method_signature": "SchemaElementDefinition.getIngestAggregator()", "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_1029
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/NullSerialiserTest.java", "identifier": "NullSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Object>" }
{ "body": "@Test\n public void shouldBeConsistent() {\n assertTrue(serialiser.isConsistent());\n }", "class_method_signature": "NullSerialiserTest.shouldBeConsistent()", "constructor": false, "full_signature": "@Test public void shouldBeConsistent()", "identifier": "shouldBeConsistent", "invoca...
{ "fields": [ { "declarator": "serialVersionUID = 282624951140644367L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 282624951140644367L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisation/...
{ "body": "@Override\n public boolean isConsistent() {\n return true;\n }", "class_method_signature": "NullSerialiser.isConsistent()", "constructor": false, "full_signature": "@Override public boolean isConsistent()", "identifier": "isConsistent", "invocations": [], "modifiers": "@Override pu...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_451
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/IsEntityValidatorTest.java", "identifier": "IsEntityValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidateWhenEntity() {\n final Element element = new Entity.Builder()\n .group(TestGroups.ENTITY)\n .build();\n\n final boolean valid = new IsEntityValidator().validate(element);\n\n assertTrue(valid);\n }", "class_method_...
{ "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_1300
{ "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 testUpsert() {\n // Given\n final LongTimeSeries timeSeries = new LongTimeSeries(TimeBucket.MINUTE);\n final Instant instant = Instant.ofEpochMilli(1000L * 60);\n\n // When\n timeSeries.put(instant, 100L);\n timeSeries.upsert(instant, 200L);\...
{ "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 void upsert(final Instant instant, final long count) {\n final long bucket = toLong(timeBucket, instant.toEpochMilli());\n timeSeries.merge(bucket, count, (x, y) -> x + y);\n }", "class_method_signature": "LongTimeSeries.upsert(final Instant instant, final long count)", "constru...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_328
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/graph/adjacency/AdjacencyMapTest.java", "identifier": "AdjacencyMapTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetAllDestinations() {\n final AdjacencyMap adjacencyMap = getAdjacencyMap();\n\n final Set<Object> results = adjacencyMap.getAllDestinations();\n\n assertThat(results, hasItems(1, 2, 3, 4, 5, 6));\n }", "class_method_signature": "AdjacencyMapTest.shou...
{ "fields": [ { "declarator": "edgeGraph = HashBasedTable.create()", "modifier": "private final", "original_string": "private final HashBasedTable<Object, Object, Set<Edge>> edgeGraph = HashBasedTable.create();", "type": "HashBasedTable<Object, Object, Set<Edge>>", "var_name": "edgeG...
{ "body": "public Set<Object> getAllDestinations() {\n return Collections.unmodifiableSet(edgeGraph.columnKeySet());\n }", "class_method_signature": "AdjacencyMap.getAllDestinations()", "constructor": false, "full_signature": "public Set<Object> getAllDestinations()", "identifier": "getAllDestinatio...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_778
{ "fields": [ { "declarator": "schema = new Schema.Builder().build()", "modifier": "protected", "original_string": "protected Schema schema = new Schema.Builder().build();", "type": "Schema", "var_name": "schema" } ], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store...
{ "body": "@Test\n public void shouldReturnEmptyCollectionIfNumSplitsIsLessThan1() throws OperationException {\n // Given\n final List<String> sample = createSampleOfSize(100);\n final AbstractGenerateSplitPointsFromSampleHandler<?, S> handler = createHandler();\n final GenerateSplitPoi...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/AbstractGenerateSplitPointsFromSampleHandler.java", "identifier": "AbstractGenerateSplitPointsFromSampleHandler", "interfaces": "implements OutputOperationHandler<GenerateSplitPointsFromSample<T>, List<T>>", "methods"...
{ "body": "@Override\n public List<T> doOperation(final GenerateSplitPointsFromSample<T> operation, final Context context, final Store store) throws OperationException {\n\n final S typedStore = (S) store;\n\n validate(operation, typedStore);\n\n final Integer numSplits = getNumSplits(operatio...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_282
{ "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 shouldOverrideGlobalPropertiesWhenSpecificEntityGroupPropertiesSet() {\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_797
{ "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 shouldThrowErrorForNullInput() {\n // Given\n given(store.getSchema()).willReturn(SCHEMA);\n\n final Filter filter = new Filter.Builder()\n .globalElements(new ElementFilter())\n .build();\n\n // When / Then\n try {\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_1245
{ "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 shouldDetermineOperationChainOutputType() {\n // Given\n final Operation operation1 = mock(Operation.class);\n final GetElements operation2 = mock(GetElements.class);\n final TypeReference typeRef = mock(TypeReference.class);\n\n given(operation2.ge...
{ "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": "@JsonIgnore\n @Override\n public TypeReference<OUT> getOutputTypeReference() {\n if (!operations.isEmpty()) {\n final Operation lastOp = operations.get(operations.size() - 1);\n if (lastOp instanceof Output) {\n return ((Output) lastOp).getOutputTypeReferen...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_810
{ "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 shouldFailValidationWhenFunctionSignatureIsInvalid() {\n // Given\n final Schema schema = new Schema.Builder()\n .entity(TestGroups.ENTITY, new SchemaEntityDefinition.Builder()\n .property(TestPropertyNames.PROP_1, TestPropertyNames...
{ "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_1091
{ "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 shouldFailNullUserAuths() throws Exception {\n validAuths.add(A);\n\n assertFalse(updateViewHook.validateAuths(null, validAuths, true));\n }", "class_method_signature": "UpdateViewHookTest.shouldFailNullUserAuths()", "constructor": false, "full_signature": "@Te...
{ "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_113
{ "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 shouldReturnInvalidFilePathErrorWhenPathDoesNotExist() throws Exception {\n // Given\n final String[] args = {GRAPH_ID, SCHEMA_DIR, \"invalid/file/path\", \"update\", FILE_GRAPH_LIBRARY_TEST_PATH};\n\n // When\n RuntimeException actual = assertThrows(Runti...
{ "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_543
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/iterable/LimitedInMemorySortedIterableTest.java", "identifier": "LimitedInMemorySortedIterableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldLimitEntries() {\n final LimitedInMemorySortedIterable<Integer> list = new LimitedInMemorySortedIterable<Integer>(Comparator.naturalOrder(), 100);\n final List<Integer> expectedItems = new ArrayList<>();\n IntStream.rangeClosed(1, 100).forEach(expectedItems...
{ "fields": [ { "declarator": "comparator", "modifier": "private final", "original_string": "private final Comparator<E> comparator;", "type": "Comparator<E>", "var_name": "comparator" }, { "declarator": "deduplicate", "modifier": "private final", "original_...
{ "body": "public boolean add(final E e) {\n boolean result = false;\n\n final OneOrMore<E> values = backingMap.get(e);\n // Skip the item if we are deduplicating and the item already exists\n boolean skipItem = (deduplicate && null != values && values.contains(e));\n if (!skipItem)...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_406
{ "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 shouldAggregatePropertiesWithMultipleOfFunctions() {\n // Given\n final BinaryOperator<Integer> max = Math::max;\n final BinaryOperator<Integer> min = Math::min;\n\n final ElementAggregator aggregator = new ElementAggregator.Builder()\n .sel...
{ "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_955
{ "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 shouldReturnTrueWhenSchemaHasValidatorEdgeIdentifierFilters() {\n // Given\n final Schema schema = new Schema.Builder()\n .edge(TestGroups.EDGE,\n new SchemaEdgeDefinition....
{ "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_685
{ "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 shouldSortBasedOnProperty_reversed() throws OperationException, JsonProcessingException {\n // Given\n final Entity entity1 = new Entity.Builder().group(TestGroups.ENTITY).property(\"property\", 1).build();\n final Entity entity2 = new...
{ "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_1357
{ "fields": [ { "declarator": "DELTA = 0.01D", "modifier": "private static final", "original_string": "private static final double DELTA = 0.01D;", "type": "double", "var_name": "DELTA" } ], "file": "library/sketches-library/src/test/java/uk/gov/gchq/gaffer/sketches/datasketc...
{ "body": "@Test\n public void testCanHandleDoublesUnion() {\n assertTrue(serialiser.canHandle(DoublesUnion.class));\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "DoublesUnionSerialiserTest.testCanHandleDoublesUnion()", "constructor": false, "full_signat...
{ "fields": [ { "declarator": "serialVersionUID = 7855827433100904609L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7855827433100904609L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/sketches-...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return DoublesUnion.class.equals(clazz);\n }", "class_method_signature": "DoublesUnionSerialiser.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_1212
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/output/ToSetTest.java", "identifier": "ToSetTest", "interfaces": "", "superclass": "extends OperationTest<ToSet>" }
{ "body": "@Test\n @Override\n public void builderShouldCreatePopulatedOperation() {\n // Given\n final ToSet<String> toSet = new ToSet.Builder<String>().input(\"1\", \"2\").build();\n\n // Then\n assertThat(toSet.getInput(), is(notNullValue()));\n assertThat(toSet.getInput(),...
{ "fields": [ { "declarator": "input", "modifier": "private", "original_string": "private Iterable<? extends T> input;", "type": "Iterable<? extends T>", "var_name": "input" }, { "declarator": "options", "modifier": "private", "original_string": "private Map...
{ "body": "@Override\n public Iterable<? extends T> getInput() {\n return input;\n }", "class_method_signature": "ToSet.getInput()", "constructor": false, "full_signature": "@Override public Iterable<? extends T> getInput()", "identifier": "getInput", "invocations": [], "modifiers": "@Overrid...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_390
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/LazyEntityTest.java", "identifier": "LazyEntityTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetLazyProperties() {\n // Given\n final Entity entity = new Entity(\"group\");\n final ElementValueLoader entityLoader = mock(ElementValueLoader.class);\n final LazyEntity lazyEntity = new LazyEntity(entity, entityLoader);\n\n // When\n ...
{ "fields": [ { "declarator": "serialVersionUID = 8067424362415322354L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 8067424362415322354L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "entit...
{ "body": "@Override\n public LazyProperties getProperties() {\n return lazyProperties;\n }", "class_method_signature": "LazyEntity.getProperties()", "constructor": false, "full_signature": "@Override public LazyProperties getProperties()", "identifier": "getProperties", "invocations": [], "m...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1265
{ "fields": [ { "declarator": "cache = new HashMapCache<>()", "modifier": "private", "original_string": "private HashMapCache<String, Integer> cache = new HashMapCache<>();", "type": "HashMapCache<String, Integer>", "var_name": "cache" } ], "file": "core/cache/src/test/java/u...
{ "body": "@DisplayName(\"Should not cause JavaSerialisableException when serialisation flag is false\")\n @Test\n public void shouldNotThrowAnyExceptions() {\n final HashMapCache<String, Object> map = new HashMapCache<>(false);\n\n map.put(\"test1\", \"hello\");\n\n class TempClass {\n ...
{ "fields": [ { "declarator": "JAVA_SERIALISER = new JavaSerialiser()", "modifier": "private static final", "original_string": "private static final JavaSerialiser JAVA_SERIALISER = new JavaSerialiser();", "type": "JavaSerialiser", "var_name": "JAVA_SERIALISER" }, { "de...
{ "body": "@Override\n public void put(final K key, final V value) {\n if (useJavaSerialisation) {\n try {\n cache.put(key, JAVA_SERIALISER.serialise(value));\n } catch (final SerialisationException e) {\n throw new RuntimeException(e);\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_1320
{ "fields": [ { "declarator": "SERIALISER = new DeltaLongTimeSeriesSerialiser()", "modifier": "private static final", "original_string": "private static final DeltaLongTimeSeriesSerialiser SERIALISER = new DeltaLongTimeSeriesSerialiser();", "type": "DeltaLongTimeSeriesSerialiser", "v...
{ "body": "@Test\n public void testCanHandle() throws SerialisationException {\n assertTrue(SERIALISER.canHandle(LongTimeSeries.class));\n assertFalse(SERIALISER.canHandle(String.class));\n }", "class_method_signature": "DeltaLongTimeSeriesSerialiserTest.testCanHandle()", "constructor": false,...
{ "fields": [ { "declarator": "HALF_MAX_VALUE = Long.MAX_VALUE / 2", "modifier": "private static final", "original_string": "private static final long HALF_MAX_VALUE = Long.MAX_VALUE / 2;", "type": "long", "var_name": "HALF_MAX_VALUE" }, { "declarator": "serialVersionUI...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return LongTimeSeries.class.equals(clazz);\n }", "class_method_signature": "DeltaLongTimeSeriesSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class cla...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_308
{ "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 shouldNotRemovePropertiesWhenNotSet() {\n //Given\n final View view = new View.Builder()\n .edge(TestGroups.EDGE, new ViewElementDefinition.Builder()\n .allProperties()\n .build())\n .entity(Tes...
{ "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_758
{ "fields": [ { "declarator": "store = mock(Store.class)", "modifier": "private final", "original_string": "private final Store store = mock(Store.class);", "type": "Store", "var_name": "store" }, { "declarator": "key1 = \"key1\"", "modifier": "private final", ...
{ "body": "@Test\n public void shouldReturnPartiallyFilledMapWhenSomeValuesPresent() throws OperationException {\n // Given\n final Context context = mock(Context.class);\n given(context.getVariable(key1)).willReturn(val1);\n given(context.getVariable(key2)).willReturn(null);\n g...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/GetVariablesHandler.java", "identifier": "GetVariablesHandler", "interfaces": "implements OperationHandler<GetVariables>", "methods": [ { "class_method_signature": "GetVariablesHandler.doOperation(final GetV...
{ "body": "@Override\n public Map<String, Object> doOperation(final GetVariables operation, final Context context, final Store store) throws OperationException {\n final Map<String, Object> variableMap = new HashMap<>();\n List<String> variableNames = operation.getVariableNames() != null ? operation....
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_888
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/ElementValidatorTest.java", "identifier": "ElementValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFalseWhenNoSchemaElementDefinition() {\n // Given\n final Schema schema = mock(Schema.class);\n final String group = TestGroups.EDGE;\n final Element elm = mock(Element.class);\n final boolean includeIsA = true;\n final ElementVal...
{ "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_922
{ "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 shouldValidateAndReturnTrueWhenEdgeTransientPropertyIsNotInSchema() {\n // Given\n final ViewValidator validator = new ViewValidator();\n final View view = new View.Builder()\n .edge(TestGroups.EDGE, 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_1009
{ "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 checkOrderPreserved() throws SerialisationException {\n // Given\n byte[] startBytes = serialiser.serialise(0);\n for (Integer test = 1; test >= 10; test++) {\n // When\n byte[] newTestBytes = serialiser.serialise(test);\n\n // Th...
{ "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 byte[] serialise(final Integer object) {\n final Integer signedI = object ^ 0x80000000;\n int shift = 56;\n int prefix = (signedI.intValue()) < 0 ? 255 : 0;\n\n int index;\n for (index = 0; index < 4 && (signedI.intValue() >> shift & 255) == prefix; ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_471
{ "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 testInvalidSubsequence1ShouldThrowIAX() {\n assertThrows(IllegalArgumentException.class, () -> abs.subSequence(-1, 1));\n }", "class_method_signature": "ArrayByteSequenceTest.testInvalidSubsequence1ShouldThrowIAX()", "constructor": false, "full_signature": "@Test publ...
{ "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 ArrayByteSequence subSequence(final int start, final int end) {\n\n if (start > end || start < 0 || end > length) {\n throw new IllegalArgumentException(\"Bad start and/end start = \" + start + \" end=\" + end + \" offset=\" + offset + \" length=\" + length);\n }\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_534
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/iterable/WrappedCloseableIterableTest.java", "identifier": "WrappedCloseableIterableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDelegateIteratorToWrappedCloseableIterable() {\n final CloseableIterable<Object> closeableIterable = mock(CloseableIterable.class);\n final WrappedCloseableIterable<Object> wrappedIterable = new WrappedCloseableIterable<>(closeableIterable);\n final Closeab...
{ "fields": [ { "declarator": "iterable", "modifier": "private final", "original_string": "private final Iterable<T> iterable;", "type": "Iterable<T>", "var_name": "iterable" } ], "file": "core/common-util/src/main/java/uk/gov/gchq/gaffer/commonutil/iterable/WrappedCloseableI...
{ "body": "@Override\n public CloseableIterator<T> iterator() {\n final Iterator<T> iterator = iterable.iterator();\n if (iterator instanceof CloseableIterator) {\n return (CloseableIterator<T>) iterator;\n }\n\n return new WrappedCloseableIterator<>(iterator);\n }", "cl...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_164
{ "fields": [ { "declarator": "serialisation", "modifier": "private", "original_string": "private ElementSerialisation serialisation;", "type": "ElementSerialisation", "var_name": "serialisation" } ], "file": "store-implementation/hbase-store/src/test/java/uk/gov/gchq/gaffer/...
{ "body": "@Test\n public void shouldGetEmptyPropertiesFromTimestampWhenNoTimestampPropertyInGroup() throws Exception {\n // Given\n // add timestamp property name but don't add the property to the edge group\n final Schema schema = new Schema.Builder().json(StreamUtil.schemas(getClass())).bui...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ElementSerialisation.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ElementSerialisation.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "public Properties getPropertiesFromTimestamp(final String group, final long timestamp)\n throws SerialisationException {\n final SchemaElementDefinition elementDefinition = schema.getElement(group);\n if (null == elementDefinition) {\n throw new SerialisationException(\"...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_867
{ "fields": [ { "declarator": "cache", "modifier": "private static", "original_string": "private static NamedOperationCache cache;", "type": "NamedOperationCache", "var_name": "cache" }, { "declarator": "GAFFER_USER = \"gaffer user\"", "modifier": "private static ...
{ "body": "@Test\n public void shouldThrowExceptionWhenGettingIfKeyIsNull() throws CacheOperationFailedException {\n assertThrows(CacheOperationFailedException.class, () -> cache.getNamedOperation(null, advancedUser));\n }", "class_method_signature": "NamedOperationCacheTest.shouldThrowExceptionWhenGet...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NamedOperationCache.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NamedOperationCache.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "public NamedOperationDetail getNamedOperation(final String name, final User user) throws CacheOperationFailedException {\n return get(name, user, null);\n }", "class_method_signature": "NamedOperationCache.getNamedOperation(final String name, final User user)", "constructor": false, "full_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_1232
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/get/GetAllElementsTest.java", "identifier": "GetAllElementsTest", "interfaces": "", "superclass": "extends OperationTest<GetAllElements>" }
{ "body": "@Test\n @Override\n public void builderShouldCreatePopulatedOperation() {\n GetAllElements getAllElements = new GetAllElements.Builder()\n .view(new View.Builder()\n .edge(TestGroups.EDGE)\n .build())\n .build();\n\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 View getView() {\n return view;\n }", "class_method_signature": "GetAllElements.getView()", "constructor": false, "full_signature": "@Override public View getView()", "identifier": "getView", "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_82
{ "fields": [], "file": "store-implementation/parquet-store/src/test/java/uk/gov/gchq/gaffer/parquetstore/operation/handler/spark/utilities/WriteDataTest.java", "identifier": "WriteDataTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTwoWritesToSamePartitionDoesntThrowException(@TempDir java.nio.file.Path tempDir)\n throws Exception {\n // Given\n final Schema schema = new Schema.Builder()\n .type(\"int\", new TypeDefinition.Builder()\n .clazz(Int...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(WriteData.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(WriteData.class);", "type": "Logger", "var_name": "LOGGER" }, { "decla...
{ "body": "@Override\n public void call(final Iterator<Element> elements) throws Exception {\n final TaskContext taskContext = TaskContext.get();\n if (null == taskContext) {\n throw new OperationException(\"Method call(Iterator<Element>) should only be called from within a Spark job\");\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_426
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ToElementTupleTest.java", "identifier": "ToElementTupleTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldReturnNullForNullValue() {\n final ToElementTuple function = new ToElementTuple();\n\n final Object result = function.apply(null);\n\n assertNull(result);\n }", "class_method_signature": "ToElementTupleTest.shouldReturnNullForNullValue()", "construct...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/function/ToElementTuple.java", "identifier": "ToElementTuple", "interfaces": "", "methods": [ { "class_method_signature": "ToElementTuple.apply(final Element element)", "constructor": false, "full_signature"...
{ "body": "@Override\n public ElementTuple apply(final Element element) {\n if (isNull(element)) {\n return null;\n }\n\n return new ElementTuple(element);\n }", "class_method_signature": "ToElementTuple.apply(final Element element)", "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_975
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/schema/SchemaElementDefinitionValidatorTest.java", "identifier": "SchemaElementDefinitionValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidateAndReturnTrueWhenTimestampIsAggregatedWithANonGroupByProperty() {\n // Given\n final SchemaElementDefinitionValidator validator = new SchemaElementDefinitionValidator();\n final BinaryOperator<Integer> function1 = mock(BinaryOperator.class);\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class);", "type": "Logger", ...
{ "body": "public ValidationResult validate(final SchemaElementDefinition elementDef) {\n final ValidationResult result = new ValidationResult();\n\n final ElementFilter validator = elementDef.getValidator();\n final ElementAggregator aggregator = elementDef.getFullAggregator();\n result.a...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_830
{ "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 shouldHandleZeroLengthInput() throws OperationException {\n // Given\n final Integer[] originalArray = new Integer[]{};\n\n final Iterable<Integer> originalResults = new WrappedCloseableIterable<>(Arrays.asList(originalArray));\n final ToArrayHandler<Integ...
{ "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_133
{ "fields": [], "file": "store-implementation/accumulo-store/src/test/java/uk/gov/gchq/gaffer/accumulostore/utils/IteratorSettingBuilderTest.java", "identifier": "IteratorSettingBuilderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldAddCompactViewToIteratorSetting() throws Exception {\n // Given\n final IteratorSetting setting = mock(IteratorSetting.class);\n final View view = mock(View.class);\n final String compactSchemaJson = \"CompactSchema\";\n\n given(view.toCompact...
{ "fields": [ { "declarator": "setting", "modifier": "private final", "original_string": "private final IteratorSetting setting;", "type": "IteratorSetting", "var_name": "setting" } ], "file": "store-implementation/accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore...
{ "body": "public IteratorSettingBuilder view(final View view) {\n try {\n setting.addOption(AccumuloStoreConstants.VIEW, new String(view.toCompactJson(), CommonConstants.UTF_8));\n } catch (final UnsupportedEncodingException e) {\n throw new SchemaException(\"Unable to deserialise...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_563
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/serialisation/FreqMapSerialiserTest.java", "identifier": "FreqMapSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<FreqMap>" }
{ "body": "@Test\n public void canSerialiseFreqMap() {\n assertTrue(serialiser.canHandle(FreqMap.class));\n }", "class_method_signature": "FreqMapSerialiserTest.canSerialiseFreqMap()", "constructor": false, "full_signature": "@Test public void canSerialiseFreqMap()", "identifier": "canSerialiseFr...
{ "fields": [ { "declarator": "serialVersionUID = 6530929395214726384L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6530929395214726384L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "longS...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return FreqMap.class.equals(clazz);\n }", "class_method_signature": "FreqMapSerialiser.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_1224
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/get/GetAdjacentIdsTest.java", "identifier": "GetAdjacentIdsTest", "interfaces": "", "superclass": "extends OperationTest<GetAdjacentIds>" }
{ "body": "@Test\n public void shouldSetDirectedTypeToBoth() {\n // Given\n final EntityId elementId1 = new EntitySeed(\"identifier\");\n\n // When\n final GetAdjacentIds op = new GetAdjacentIds.Builder()\n .input(elementId1)\n .directedType(DirectedType.EI...
{ "fields": [ { "declarator": "view", "modifier": "private", "original_string": "private View view;", "type": "View", "var_name": "view" }, { "declarator": "input", "modifier": "private", "original_string": "private Iterable<? extends EntityId> input;", ...
{ "body": "@Override\n public DirectedType getDirectedType() {\n return directedType;\n }", "class_method_signature": "GetAdjacentIds.getDirectedType()", "constructor": false, "full_signature": "@Override public DirectedType getDirectedType()", "identifier": "getDirectedType", "invocations": []...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1361
{ "fields": [ { "declarator": "DELTA = 0.00001D", "modifier": "private static final", "original_string": "private static final double DELTA = 0.00001D;", "type": "double", "var_name": "DELTA" }, { "declarator": "hllSketchWithCardinality5", "modifier": "private sta...
{ "body": "@Test\n public void shouldAcceptWhenEqualToAndEqualToIsTrue() {\n // Given\n final HllSketchIsLessThan filter = new HllSketchIsLessThan(18, true);\n // When\n boolean accepted = filter.test(hllSketchWithCardinality18);\n // Then\n assertTrue(accepted);\n }", ...
{ "fields": [ { "declarator": "controlValue", "modifier": "private", "original_string": "private long controlValue;", "type": "long", "var_name": "controlValue" }, { "declarator": "orEqualTo", "modifier": "private", "original_string": "private boolean orEqua...
{ "body": "@Override\n public boolean test(final HllSketch input) {\n if (null == input) {\n return false;\n }\n final long cardinality = Math.round(input.getEstimate());\n if (orEqualTo) {\n return cardinality <= controlValue;\n } else {\n return...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_94
{ "fields": [], "file": "store-implementation/parquet-store/src/test/java/uk/gov/gchq/gaffer/parquetstore/partitioner/GraphPartitionerTest.java", "identifier": "GraphPartitionerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testReturnsUsefulExceptionIfAskForPartitionerForNonExistentGroup() {\n // Given\n final GraphPartitioner graphPartitioner = new GraphPartitioner();\n\n // When / Then\n try {\n final GroupPartitioner partitioner = graphPartitioner.getGroupPartit...
{ "fields": [ { "declarator": "groupToPartitioner", "modifier": "private final", "original_string": "private final Map<String, GroupPartitioner> groupToPartitioner;", "type": "Map<String, GroupPartitioner>", "var_name": "groupToPartitioner" }, { "declarator": "reversedE...
{ "body": "public GroupPartitioner getGroupPartitioner(final String group) {\n if (!groupToPartitioner.containsKey(group)) {\n throw new IllegalArgumentException(\"No GroupPartitioner for key \" + group + \" exists for groupToPartitioner\");\n }\n return groupToPartitioner.get(group);\...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_349
{ "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 shouldGetDestinationVertexFromWalkWithNoEntities() {\n // Given\n // [A] -> [B] -> [C]\n\n final Walk walk = new Walk.Builder()\n .edges(EDGE_AB, EDGE_BC)\n .build();\n\n // When\n final Object result = walk.getDestinat...
{ "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 getDestinationVertex() {\n return entities.get(entities.size() - 1).getKey();\n }", "class_method_signature": "Walk.getDestinationVertex()", "constructor": false, "full_signature": "@JsonIgnore public Object getDestinationVertex()", "identifier": "getDestina...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_719
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/SetVariableHandlerTest.java", "identifier": "SetVariableHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowExceptionWithNullVariableKey() throws OperationException {\n // Given\n final Context context = new Context(new User());\n final Store store = mock(Store.class);\n\n SetVariableHandler handler = new SetVariableHandler();\n SetVariable op ...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/SetVariableHandler.java", "identifier": "SetVariableHandler", "interfaces": "implements OperationHandler<SetVariable>", "methods": [ { "class_method_signature": "SetVariableHandler.doOperation(final SetVaria...
{ "body": "@Override\n public Void doOperation(final SetVariable operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getVariableName()) {\n throw new IllegalArgumentException(\"Variable name cannot be null\");\n }\n\n if (null == ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_963
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/schema/SchemaElementDefinitionValidatorTest.java", "identifier": "SchemaElementDefinitionValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidateFunctionSelectionsAndReturnTrueWhenNoFunctionsSet() {\n // Given\n final SchemaElementDefinition elementDef = mock(SchemaElementDefinition.class);\n final ElementFilter elementFilter = new ElementFilter();\n final SchemaElementDefinitionValid...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class);", "type": "Logger", ...
{ "body": "protected ValidationResult validateFunctionArgumentTypes(\n final ElementFilter filter, final SchemaElementDefinition schemaElDef) {\n final ValidationResult result = new ValidationResult();\n if (null != filter && null != filter.getComponents()) {\n for (final TupleAdap...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1048
{ "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 checkOrderPreserved() throws SerialisationException {\n Date now = new Date(1L);\n Date aDayLater = new Date(now.getTime() + 24 * 60 * 60 * 1000L);\n assertTrue(compare(serialiser.serialise(now), serialiser.serialise(aDayLater)) < 0);\n }", "class_method_sig...
{ "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 byte[] serialise(final Date date) throws SerialisationException {\n final byte[] out = new byte[8];\n final long value = date.getTime();\n // NB Serialise high-order bits first\n out[0] = (byte) ((value >> 56) & 255);\n out[1] = (byte) ((value >> 48)...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_430
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/UnwrapEntityIdTest.java", "identifier": "UnwrapEntityIdTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldUnwrapEntityIds() {\n final EntityId value = mock(EntityId.class);\n final Object vertex = mock(Object.class);\n given(value.getVertex()).willReturn(vertex);\n\n final UnwrapEntityId function = new UnwrapEntityId();\n\n final Object result = f...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/function/UnwrapEntityId.java", "identifier": "UnwrapEntityId", "interfaces": "", "methods": [ { "class_method_signature": "UnwrapEntityId.apply(final Object item)", "constructor": false, "full_signature": "@...
{ "body": "@Override\n public Object apply(final Object item) {\n return null != item ? item instanceof EntityId ? ((EntityId) item).getVertex() : item : null;\n }", "class_method_signature": "UnwrapEntityId.apply(final Object item)", "constructor": false, "full_signature": "@Override public Object...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_575
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/types/binaryoperator/CustomMapAggregatorTest.java", "identifier": "CustomMapAggregatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMapAggregation() {\n int inA = 1;\n int inB = 2;\n\n int noInputs = 3;\n\n CustomMap<String, Integer>[] inputs = new CustomMap[noInputs];\n for (int i = 0; i < noInputs; i++) {\n inputs[i] = new CustomMap<>(new StringSerialiser(), new...
{ "fields": [ { "declarator": "binaryOperator", "modifier": "@JsonTypeInfo(\n use = Id.CLASS,\n include = As.PROPERTY,\n property = \"class\"\n )\n private", "original_string": "@JsonTypeInfo(\n use = Id.CLASS,\n include = As.PROPERTY,...
{ "body": "public void setBinaryOperator(final BinaryOperator<V> binaryOperator) {\n this.binaryOperator = binaryOperator;\n }", "class_method_signature": "CustomMapAggregator.setBinaryOperator(final BinaryOperator<V> binaryOperator)", "constructor": false, "full_signature": "public void setBinaryOper...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_125
{ "fields": [ { "declarator": "a", "modifier": "private", "original_string": "private byte[] a;", "type": "byte[]", "var_name": "a" }, { "declarator": "b", "modifier": "private", "original_string": "private byte[] b;", "type": "byte[]", "var_name...
{ "body": "@Test\n public void shouldThrowExceptionFailWithCorrectBackingArraysButInvalidMatchingLength() throws Exception {\n br1 = new BytesAndRange(a, 0, 999);\n br2 = new BytesAndRange(d, 0, 999);\n assertThrows(ArrayIndexOutOfBoundsException.class,\n () -> assertFalse(ByteU...
{ "fields": [], "file": "store-implementation/accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/utils/ByteUtils.java", "identifier": "ByteUtils", "interfaces": "", "methods": [ { "class_method_signature": "ByteUtils.ByteUtils()", "constructor": true, "full_signature": "privat...
{ "body": "public static boolean areKeyBytesEqual(final byte[] bytes1, final byte[] bytes2) {\n if (Arrays.equals(bytes1, bytes2)) {\n return true;\n }\n\n int last = bytes1.length;\n\n if (last != bytes2.length) {\n return false;\n }\n\n if (last == 0) ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_826
{ "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 shouldConvertIterableOfElementsAndElementIdsToArray() throws OperationException {\n // Given\n final ElementId[] originalArray = new ElementId[]{\n new Entity.Builder()\n .group(\"entity\")\n .build(),\n ...
{ "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_1273
{ "fields": [ { "declarator": "service = new JcsCacheService()", "modifier": "private", "original_string": "private JcsCacheService service = new JcsCacheService();", "type": "JcsCacheService", "var_name": "service" }, { "declarator": "TEST_REGION = \"test\"", "mo...
{ "body": "@Test\n public void shouldBeAbleToClearCache() throws CacheOperationException {\n service.initialise(serviceProps);\n service.putInCache(TEST_REGION, \"test1\", 1);\n service.putInCache(TEST_REGION, \"test2\", 2);\n service.putInCache(TEST_REGION, \"test3\", 3);\n\n\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(JcsCacheService.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(JcsCacheService.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Override\n public void initialise(final Properties properties) {\n String configFile = properties.getProperty(CacheProperties.CACHE_CONFIG_FILE);\n manager = CompositeCacheManager.getUnconfiguredInstance();\n\n if (null != configFile) {\n try {\n Propertie...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1336
{ "fields": [], "file": "library/spark/spark-library/src/test/java/uk/gov/gchq/gaffer/spark/function/GraphFrameToIterableRowTest.java", "identifier": "GraphFrameToIterableRowTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConvertGraphFrameToIterableOfRows() {\n // Given\n final SparkSession sparkSession = SparkSessionProvider.getSparkSession();\n\n final Function<GraphFrame, Iterable<? extends Row>> function = new GraphFrameToIterableRow();\n\n final GraphFrame graphF...
{ "fields": [], "file": "library/spark/spark-library/src/main/java/uk/gov/gchq/gaffer/spark/function/GraphFrameToIterableRow.java", "identifier": "GraphFrameToIterableRow", "interfaces": "implements Function<GraphFrame, Iterable<? extends Row>>", "methods": [ { "class_method_signature": "GraphFrameT...
{ "body": "@Override\n public Iterable<Row> apply(final GraphFrame graphFrame) {\n final Iterator<Row> vertices = graphFrame.vertices().toLocalIterator();\n final Iterator<Row> edges = graphFrame.edges().toLocalIterator();\n\n return () -> Iterators.concat(vertices, edges);\n }", "class_m...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_467
{ "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 testInvalidByteAt0ShouldThrowIAX() {\n assertThrows(IllegalArgumentException.class, () -> abs.byteAt(-1));\n }", "class_method_signature": "ArrayByteSequenceTest.testInvalidByteAt0ShouldThrowIAX()", "constructor": false, "full_signature": "@Test public void testInvali...
{ "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_934
{ "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 shouldValidateAndReturnTrueForOrFilter() {\n // Given\n final ViewValidator validator = new ViewValidator();\n final View view = new View.Builder()\n .entity(TestGroups.ENTITY, new ViewElementDefinition.Builder()\n .preAggreg...
{ "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_871
{ "fields": [ { "declarator": "cache", "modifier": "private static", "original_string": "private static NamedOperationCache cache;", "type": "NamedOperationCache", "var_name": "cache" }, { "declarator": "GAFFER_USER = \"gaffer user\"", "modifier": "private static ...
{ "body": "@Test\n public void shouldAllowAddingWhenUserHasAdminAuth() throws CacheOperationFailedException {\n cache.addNamedOperation(alternative, false, advancedUser, EMPTY_ADMIN_AUTH);\n NamedOperationDetail alt = new NamedOperationDetail.Builder()\n .operationName(alternative.getO...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NamedOperationCache.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NamedOperationCache.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "public void addNamedOperation(final NamedOperationDetail namedOperation, final boolean overwrite, final User user) throws CacheOperationFailedException {\n add(namedOperation, overwrite, user, null);\n }", "class_method_signature": "NamedOperationCache.addNamedOperation(final NamedOperationDeta...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_6
{ "fields": [ { "declarator": "TEST_USER = new User.Builder().userId(\"TestUser\").opAuths(\"auth1\", \"auth2\").build()", "modifier": "private static final", "original_string": "private static final User TEST_USER = new User.Builder().userId(\"TestUser\").opAuths(\"auth1\", \"auth2\").build();"...
{ "body": "@Test\n public void shouldReturnTrueForUserWithPermission() {\n assertTrue(createAccessPredicate(TEST_USER.getUserId(), asList(\"auth1\"), NON_PUBLIC).test(new User.Builder().userId(\"AnotherUser\").opAuths(\"auth1\", \"auth2\").build(), null));\n }", "class_method_signature": "FederatedGrap...
{ "fields": [], "file": "store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/access/predicate/FederatedGraphReadAccessPredicate.java", "identifier": "FederatedGraphReadAccessPredicate", "interfaces": "", "methods": [ { "class_method_signature": "FederatedGraphReadAcc...
{ "body": "@Override\n public boolean test(final User user, final String adminAuth) {\n return super.test(user, adminAuth);\n }", "class_method_signature": "FederatedGraphReadAccessPredicate.test(final User user, final String adminAuth)", "constructor": false, "full_signature": "@Override public bo...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_172
{ "fields": [], "file": "store-implementation/hbase-store/src/test/java/uk/gov/gchq/gaffer/hbasestore/operation/handler/GetElementsHandlerTest.java", "identifier": "GetElementsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowExceptionIfAnOldOperationOptionIsUsed() throws OperationException, StoreException {\n // Given\n final Iterable<EntityId> ids = mock(Iterable.class);\n final GetElementsHandler handler = new GetElementsHandler();\n final GetElements getElements ...
{ "fields": [], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasestore/operation/handler/GetElementsHandler.java", "identifier": "GetElementsHandler", "interfaces": "implements OutputOperationHandler<GetElements, CloseableIterable<? extends Element>>", "methods": [ { "...
{ "body": "@Override\n public CloseableIterable<? extends Element> doOperation(final GetElements operation, final Context context, final Store store) throws OperationException {\n return doOperation(operation, context.getUser(), (HBaseStore) store);\n }", "class_method_signature": "GetElementsHandler.d...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_488
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/StringUtilTest.java", "identifier": "StringUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void unescapeCommaShouldReplaceBackslashesWithComma() {\n assertEquals(\"replaceBackslashesWith,Comma\", StringUtil.unescapeComma(\"replaceBackslashesWith\\\\\\\\Comma\"));\n }", "class_method_signature": "StringUtilTest.unescapeCommaShouldReplaceBackslashesWithComma()", "co...
{ "fields": [ { "declarator": "COMMA = ','", "modifier": "public static final", "original_string": "public static final char COMMA = ',';", "type": "char", "var_name": "COMMA" }, { "declarator": "ESCAPE_CHAR = '\\\\'", "modifier": "private static final", "or...
{ "body": "public static String unescapeComma(final String escapedStr) {\n final StringBuilder str = new StringBuilder(escapedStr.length());\n boolean isEscaped = false;\n for (int i = 0; i < escapedStr.length(); i++) {\n char c = escapedStr.charAt(i);\n if (isEscaped) {\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_522
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/stream/StreamsTest.java", "identifier": "StreamsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCloseIteratorWhenStreamIsClosed() throws Throwable {\n // Given\n final CloseableIterator<String> iterator = mock(CloseableIterator.class);\n given(iterator.hasNext()).willReturn(true, false);\n final String first = \"first item\";\n given(ite...
{ "fields": [], "file": "core/common-util/src/main/java/uk/gov/gchq/gaffer/commonutil/stream/Streams.java", "identifier": "Streams", "interfaces": "", "methods": [ { "class_method_signature": "Streams.toStream(final Iterable<T> iterable)", "constructor": false, "full_signature": "public ...
{ "body": "public static <T> Stream<T> toStream(final Iterable<T> iterable) {\n if (iterable instanceof StreamIterable) {\n return ((StreamIterable<T>) iterable).getStream();\n }\n\n return StreamSupport.stream(iterable.spliterator(), false)\n .onClose(() -> CloseableUti...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_735
{ "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 shouldBuildWithInvalidArgumentsAndFailExecution() throws OperationException {\n final List<Function> functions = new ArrayList<>();\n final Function<Long, Double> func = Double::longBitsToDouble;\n final Function<String, Integer> func1 = Integer::valueOf;\n\n ...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/MapHandler.java", "identifier": "MapHandler", "interfaces": "implements OutputOperationHandler<Map<I, O>, O>", "methods": [ { "class_method_signature": "MapHandler.doOperation(final Map<I, O> operation, fina...
{ "body": "@Override\n public O doOperation(final Map<I, O> operation, final Context context, final Store store) throws OperationException {\n if (null == operation) {\n throw new OperationException(\"Operation cannot be null\");\n }\n\n Object input = operation.getInput();\n\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_365
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/comparison/ComparableOrToStringComparatorTest.java", "identifier": "ComparableOrToStringComparatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCompareIntegers() {\n final ComparableOrToStringComparator comparator = new ComparableOrToStringComparator();\n\n final int result = comparator.compare(1, 2);\n\n assertTrue(result < 0, \"Should be less than 0\");\n }", "class_method_signature": "Compa...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/comparison/ComparableOrToStringComparator.java", "identifier": "ComparableOrToStringComparator", "interfaces": "implements Comparator<Object>, Serializable", "methods": [ { "class_method_signature": "ComparableOrToStrin...
{ "body": "@Override\n public int compare(final Object vertex1, final Object vertex2) {\n if (null == vertex1) {\n if (null == vertex2) {\n return 0;\n }\n return 1;\n }\n\n if (null == vertex2) {\n return -1;\n }\n\n if ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_57
{ "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 shouldNotRemoveGraphForNonAddingUser() throws Exception {\n FederatedStore store = new FederatedStore();\n final FederatedStoreProperties federatedStoreProperties = new FederatedStoreProperties();\n federatedStoreProperties.setCacheProperties(CACHE_SERVICE_CLASS_...
{ "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" ...