id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
47973088_802
{ "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 shouldFilterBasedOnMatchedVertex() throws OperationException {\n // Given\n final Schema schema = new Schema.Builder()\n .edge(TestGroups.EDGE, new SchemaEdgeDefinition.Builder()\n .source(\"vertex\")\n .desti...
{ "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_1129
{ "fields": [ { "declarator": "ADD_OPERATIONS_TO_CHAIN_RESOURCE_PATH = \"addOperationsToChain.json\"", "modifier": "private static final", "original_string": "private static final String ADD_OPERATIONS_TO_CHAIN_RESOURCE_PATH = \"addOperationsToChain.json\";", "type": "String", "var_n...
{ "body": "@Test\n public void shouldFailQuietlyIfNestedOperationsCannotBeModified() throws SerialisationException {\n // Given\n AddOperationsToChain hook = fromJson(ADD_OPERATIONS_TO_CHAIN_RESOURCE_PATH);\n\n Operation discardOutput = new DiscardOutput();\n Operation splitStore = new ...
{ "fields": [ { "declarator": "defaultOperations = new AdditionalOperations()", "modifier": "private final", "original_string": "private final AdditionalOperations defaultOperations = new AdditionalOperations();", "type": "AdditionalOperations", "var_name": "defaultOperations" },...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n final List<Operation> newOpList = new ArrayList<>();\n\n boolean hasAuth = false;\n if (!authorisedOps.isEmpty() && !context.getUser().getOpAuths().isEmpty()) {\n for (final Str...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1294
{ "fields": [], "file": "library/flink-library/src/test/java/uk/gov/gchq/gaffer/flink/operation/handler/GafferOutputTest.java", "identifier": "GafferOutputTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDelegateWriteRecordToGafferAddedInitialise() throws Exception {\n // Given\n final GafferAdder adder = mock(GafferAdder.class);\n final GafferOutput output = new GafferOutput(adder);\n final Element element = mock(Element.class);\n\n // When\n...
{ "fields": [ { "declarator": "serialVersionUID = 1569145256866410621L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1569145256866410621L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "adder...
{ "body": "@Override\n public void writeRecord(final Element element) {\n adder.add(element);\n }", "class_method_signature": "GafferOutput.writeRecord(final Element element)", "constructor": false, "full_signature": "@Override public void writeRecord(final Element element)", "identifier": "write...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_316
{ "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 shouldThrowExceptionOnWhenRemovingGroupFromNullView() {\n final Exception exception = assertThrows(IllegalArgumentException.class, () -> ViewUtil.removeGroups(null, TestGroups.EDGE));\n assertEquals(\"View cannot be null\", exception.getMessage());\n }", "class_met...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/elementdefinition/view/ViewUtil.java", "identifier": "ViewUtil", "interfaces": "", "methods": [ { "class_method_signature": "ViewUtil.ViewUtil()", "constructor": true, "full_signature": "private ViewUtil()", ...
{ "body": "public static View removeGroups(final View view, final String... groups) {\n if (null == view) {\n throw new IllegalArgumentException(\"View cannot be null\");\n }\n\n final LinkedHashMap<String, ViewElementDefinition> entities = new LinkedHashMap<>(view.getEntities());\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_746
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/WhileHandlerTest.java", "identifier": "WhileHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowExceptionWhenMaxConfiguredNumberOfRepeatsExceeded() throws OperationException {\n // Given\n final EntitySeed input = mock(EntitySeed.class);\n final int maxRepeats = 2500;\n final Operation delegate = mock(GetElements.class);\n final Con...
{ "fields": [ { "declarator": "maxRepeats = While.MAX_REPEATS", "modifier": "private", "original_string": "private int maxRepeats = While.MAX_REPEATS;", "type": "int", "var_name": "maxRepeats" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/W...
{ "body": "@Override\n public Object doOperation(final While operation,\n final Context context,\n final Store store) throws OperationException {\n validateMaxRepeats(operation);\n\n Object input = operation.getInput();\n for (int repea...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_253
{ "fields": [], "file": "rest-api/core-rest/src/test/java/uk/gov/gchq/gaffer/rest/serialisation/TextMessageBodyWriterTest.java", "identifier": "TextMessageBodyWriterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnSize0() {\n // Given\n final TextMessageBodyWriter writer = new TextMessageBodyWriter();\n\n // When\n final long size = writer.getSize(null, null, null, null, null);\n\n // Then\n assertEquals(0L, size);\n }", "class_method_...
{ "fields": [], "file": "rest-api/core-rest/src/main/java/uk/gov/gchq/gaffer/rest/serialisation/TextMessageBodyWriter.java", "identifier": "TextMessageBodyWriter", "interfaces": "implements MessageBodyWriter<Object>", "methods": [ { "class_method_signature": "TextMessageBodyWriter.isWriteable(final ...
{ "body": "@Override\n public long getSize(final Object object, final Class<?> type,\n final Type genericType, final Annotation[] annotations,\n final MediaType mediaType) {\n return 0;\n }", "class_method_signature": "TextMessageBodyWriter.getSize(final Ob...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_603
{ "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 testIsConsistent() {\n assertEquals(true, serialiser.isConsistent());\n }", "class_method_signature": "EdgeIdSerialiserTest.testIsConsistent()", "constructor": false, "full_signature": "@Test public void testIsConsistent()", "identifier": "testIsConsistent", "invo...
{ "fields": [ { "declarator": "serialVersionUID = -7123572023129773512L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -7123572023129773512L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "boo...
{ "body": "@Override\n public boolean isConsistent() {\n return null != vertexSerialiser && vertexSerialiser.isConsistent();\n }", "class_method_signature": "EdgeIdSerialiser.isConsistent()", "constructor": false, "full_signature": "@Override public boolean isConsistent()", "identifier": "isConsi...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_24
{ "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 shouldUpdateAddElementsFlagsWhenNullInputAndSkipFalse() {\n // Given\n final Graph graph = createGraph();\n final AddElements operation = new AddElements.Builder()\n .validate(true)\n .skipInvalidElements(false)\n .bui...
{ "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_480
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/elementvisibilityutil/AuthorisationsTest.java", "identifier": "AuthorisationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSerialization() {\n final Authorisations a1 = new Authorisations(\"a\", \"b\");\n final Authorisations a2 = new Authorisations(\"b\", \"a\");\n\n assertEquals(a1, a2);\n assertEquals(a1.serialise(), a2.serialise());\n }", "class_method_signature":...
{ "fields": [ { "declarator": "serialVersionUID = 8931467369628123909L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 8931467369628123909L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "auths...
{ "body": "public String serialise() {\n StringBuilder sb = new StringBuilder(HEADER);\n String sep = \"\";\n for (final byte[] auth : authsList) {\n sb.append(sep);\n sep = \",\";\n sb.append(Base64.getEncoder().encodeToString(auth));\n }\n\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_879
{ "fields": [ { "declarator": "cache = new NamedOperationCache()", "modifier": "private final", "original_string": "private final NamedOperationCache cache = new NamedOperationCache();", "type": "NamedOperationCache", "var_name": "cache" }, { "declarator": "addNamedOper...
{ "body": "@Test\n public void shouldReturnNamedOperationWithNoInputType() throws Exception {\n // Given\n AddNamedOperation addNamedOperation = new AddNamedOperation.Builder()\n .name(expectedOperationDetailWithoutInputType.getOperationName())\n .description(expectedOpe...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedOperationCache cache;", "type": "NamedOperationCache", "var_name": "cache" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/named/GetAll...
{ "body": "@Override\n public CloseableIterable<NamedOperationDetail> doOperation(final GetAllNamedOperations operation, final Context context, final Store store) throws OperationException {\n final CloseableIterable<NamedOperationDetail> ops = cache.getAllNamedOperations(context.getUser(), store.getPropert...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1152
{ "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 shouldBeNotEqualWhenDirectedNotEqual() {\n // Given\n final String source = \"source\";\n final String destination = \"destination\";\n final boolean directed = true;\n final EdgeId seed1 = new EdgeSeed(source, destination, directed);\n final...
{ "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 boolean equals(final Object obj) {\n return null != obj\n && (obj instanceof EdgeSeed)\n && isEqual((EdgeSeed) obj);\n }", "class_method_signature": "EdgeSeed.equals(final Object obj)", "constructor": false, "full_signature": "@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_896
{ "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 shouldNotBeAbleToAddIdentifiersOnceBuilt() {\n // Given\n final T elementDef = createBuilder().build();\n\n // When / Then\n try {\n elementDef.getIdentifierMap()\n .put(IdentifierType.SOURCE, \"string\");\n fail(\"...
{ "fields": [ { "declarator": "elementDefValidator", "modifier": "private final", "original_string": "private final SchemaElementDefinitionValidator elementDefValidator;", "type": "SchemaElementDefinitionValidator", "var_name": "elementDefValidator" }, { "declarator": "...
{ "body": "@JsonIgnore\n public Map<IdentifierType, String> getIdentifierMap() {\n return identifiers;\n }", "class_method_signature": "SchemaElementDefinition.getIdentifierMap()", "constructor": false, "full_signature": "@JsonIgnore public Map<IdentifierType, String> getIdentifierMap()", "identi...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1017
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/ordered/OrderedDateSerialiserTest.java", "identifier": "OrderedDateSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Date>" }
{ "body": "@Test\n public void checkOrderPreserved() throws SerialisationException {\n // Given\n Date testDate = new Date(1L);\n Date aDayLater = new Date(86400000L);\n\n // When / Then\n assertTrue(compare(serialiser.serialise(testDate), serialiser.serialise(aDayLater)) < 0);\n...
{ "fields": [ { "declarator": "serialVersionUID = 6636121009320739764L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6636121009320739764L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "LONG_...
{ "body": "@Override\n public byte[] serialise(final Date object) {\n return LONG_SERIALISER.serialise(object.getTime());\n }", "class_method_signature": "OrderedDateSerialiser.serialise(final Date object)", "constructor": false, "full_signature": "@Override public byte[] serialise(final Date objec...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_195
{ "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 shouldOnlyAcceptDirectedEdges() throws OperationException, SerialisationException {\n // Given\n final ElementDedupeFilterProcessor processor = new ElementDedupeFilterProcessor(false, true, DirectedType.DIRECTED);\n\n // When / Then\n for (final Element el...
{ "fields": [ { "declarator": "elementSerialisation = new ElementSerialisation(null)", "modifier": "private final", "original_string": "private final ElementSerialisation elementSerialisation = new ElementSerialisation(null);", "type": "ElementSerialisation", "var_name": "elementSeri...
{ "body": "@Override\n public boolean test(final LazyElementCell elementCell) {\n final Cell cell = elementCell.getCell();\n final byte flag = getFlag(cell);\n final boolean isEdge = flag != HBaseStoreConstants.ENTITY;\n\n if (!edges && isEdge) {\n return false;\n }\n\...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_711
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/OperationChainHandlerTest.java", "identifier": "OperationChainHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldHandleNestedOperationChain() throws OperationException {\n // Given\n final OperationChainValidator opChainValidator = mock(OperationChainValidator.class);\n final List<OperationChainOptimiser> opChainOptimisers = Collections.emptyList();\n\n final O...
{ "fields": [ { "declarator": "opChainValidator", "modifier": "private final", "original_string": "private final OperationChainValidator opChainValidator;", "type": "OperationChainValidator", "var_name": "opChainValidator" }, { "declarator": "opChainOptimisers", "...
{ "body": "@Override\n public OUT doOperation(final OperationChain<OUT> operationChain, final Context context, final Store store) throws OperationException {\n\n prepareOperationChain(operationChain, context, store);\n\n Object result = null;\n for (final Operation op : operationChain.getOpera...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_341
{ "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 shouldGetLength() {\n // Given\n // [A] -> [E] -> [D]\n // \\ \\ \\\n // (BasicEntity) (BasicEntity) (BasicEntity)\n\n // When\n final Walk walk = new Walk.Builder()\n .entity(ENTITY_A)\...
{ "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 int length() {\n return edges.size();\n }", "class_method_signature": "Walk.length()", "constructor": false, "full_signature": "@JsonIgnore public int length()", "identifier": "length", "invocations": [ "size" ], "modifiers": "@JsonIgnore public", "para...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1369
{ "fields": [ { "declarator": "hyperLogLogPlusWithCardinality5", "modifier": "private static", "original_string": "private static HyperLogLogPlus hyperLogLogPlusWithCardinality5;", "type": "HyperLogLogPlus", "var_name": "hyperLogLogPlusWithCardinality5" }, { "declarator...
{ "body": "@Test\n public void shouldRejectWhenMoreThan() {\n // Given\n final HyperLogLogPlusIsLessThan filter = new HyperLogLogPlusIsLessThan(15);\n // When\n boolean accepted = filter.test(hyperLogLogPlusWithCardinality31);\n // Then\n assertFalse(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 HyperLogLogPlus input) {\n if (null == input) {\n return false;\n }\n final long cardinality = input.cardinality();\n if (orEqualTo) {\n if (cardinality <= controlValue) {\n return true;\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_73
{ "fields": [ { "declarator": "schema = new LongVertexOperationsTest().createSchema()", "modifier": "private", "original_string": "private Schema schema = new LongVertexOperationsTest().createSchema();", "type": "Schema", "var_name": "schema" } ], "file": "store-implementatio...
{ "body": "@Test\n public void testQueryGeneratorForGetElementsWithEdgeSeeds(@TempDir java.nio.file.Path tempDir)\n throws IOException, OperationException {\n // Given\n // - Create snapshot folder\n final String folder = String.format(\"file:///%s\", tempDir.toString());\n f...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryGenerator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryGenerator.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public ParquetQuery getParquetQuery(final Operation operation) throws IOException, OperationException {\n if (operation instanceof GetAllElements) {\n return getPathsAndFiltersForAllElements((GetAllElements) operation);\n } else if (operation instanceof GetElements) {\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_654
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/resolver/DefaultScoreResolverTest.java", "identifier": "DefaultScoreResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldPreventInfiniteRecusion() throws OperationException {\n // Given\n final Map<Class<? extends Operation>, ScoreResolver> resolvers = new HashMap<>();\n resolvers.put(GetElements.class, new ScoreResolver() {\n @Override\n ...
{ "fields": [ { "declarator": "DEFAULT_OPERATION_SCORE = 1", "modifier": "public static final", "original_string": "public static final int DEFAULT_OPERATION_SCORE = 1;", "type": "int", "var_name": "DEFAULT_OPERATION_SCORE" }, { "declarator": "scoreResolvers", "mo...
{ "body": "@Override\n public Integer getScore(final Operation operation) {\n if (null == operation) {\n return 0;\n }\n\n // Named operations should use their custom resolver despite implementing Operations\n if (operation instanceof Operations && !(operation instanceof Name...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_204
{ "fields": [ { "declarator": "SCHEMA = new Schema.Builder()\n .type(\"string\", String.class)\n .type(\"type\", Boolean.class)\n .edge(TestGroups.EDGE, new SchemaEdgeDefinition.Builder()\n .source(\"string\")\n .destination(\"string\")\...
{ "body": "@Test\n public void shouldConstructWithView() throws OperationException, SerialisationException {\n final PostAggregationFilterProcessor processor = new PostAggregationFilterProcessor(VIEW);\n assertEquals(VIEW, processor.getView());\n }", "class_method_signature": "PostAggregationFil...
{ "fields": [ { "declarator": "validator", "modifier": "private final", "original_string": "private final ElementValidator validator;", "type": "ElementValidator", "var_name": "validator" } ], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasesto...
{ "body": "public View getView() {\n return validator.getView();\n }", "class_method_signature": "PostAggregationFilterProcessor.getView()", "constructor": false, "full_signature": "public View getView()", "identifier": "getView", "invocations": [ "getView" ], "modifiers": "public", "par...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1105
{ "fields": [ { "declarator": "NAMED_VIEW_NAME = \"namedViewName\"", "modifier": "private static final", "original_string": "private static final String NAMED_VIEW_NAME = \"namedViewName\";", "type": "String", "var_name": "NAMED_VIEW_NAME" }, { "declarator": "NESTED_NAM...
{ "body": "@Test\n public void shouldResolveNamedViewWithParametersToMakeCompleteFilter() throws CacheOperationFailedException {\n Map<String, Object> paramMap = Maps.newHashMap();\n paramMap.put(IS_MORE_THAN_X_PARAM_KEY, 7L);\n\n ViewParameterDetail param = new ViewParameterDetail.Builder()\n...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedViewCache cache;", "type": "NamedViewCache", "var_name": "cache" } ], "file": "core/graph/src/main/java/uk/gov/gchq/gaffer/graph/hook/NamedViewResolver.java", "identif...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n resolveViews(opChain, context);\n }", "class_method_signature": "NamedViewResolver.preExecute(final OperationChain<?> opChain, final Context context)", "constructor": false, "full_signature": "...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_984
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/DateSerialiserTest.java", "identifier": "DateSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Date>" }
{ "body": "@Test\n public void canSerialiseDateClass() {\n assertTrue(serialiser.canHandle(Date.class));\n }", "class_method_signature": "DateSerialiserTest.canSerialiseDateClass()", "constructor": false, "full_signature": "@Test public void canSerialiseDateClass()", "identifier": "canSerialiseDa...
{ "fields": [ { "declarator": "serialVersionUID = 5647756843689779437L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5647756843689779437L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisatio...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Date.class.equals(clazz);\n }", "class_method_signature": "DateSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identifier": "ca...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_592
{ "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": "GroupedPropertiesSerialiserTest.testCantSerialiseIntegerClass()", "constructor": false, "full_signature": "@Test public...
{ "fields": [ { "declarator": "serialVersionUID = 3307260143698122796L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 3307260143698122796L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "strin...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return GroupedProperties.class.isAssignableFrom(clazz);\n }", "class_method_signature": "GroupedPropertiesSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(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_438
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/ElementTest.java", "identifier": "ElementTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCreateElementWithGroup() {\n // Given\n final String group = \"group\";\n\n // When\n final Element element = newElement(group);\n\n // Then\n assertEquals(\"group\", element.getGroup());\n }", "class_method_signature": "ElementTes...
{ "fields": [ { "declarator": "DEFAULT_GROUP = \"UNKNOWN\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_GROUP = \"UNKNOWN\";", "type": "String", "var_name": "DEFAULT_GROUP" }, { "declarator": "properties", "modifier":...
{ "body": "public String getGroup() {\n return group;\n }", "class_method_signature": "Element.getGroup()", "constructor": false, "full_signature": "public String getGroup()", "identifier": "getGroup", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "signa...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1040
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/raw/RawIntegerSerialiserTest.java", "identifier": "RawIntegerSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Integer>" }
{ "body": "@Test\n public void cantSerialiseStringClass() {\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "RawIntegerSerialiserTest.cantSerialiseStringClass()", "constructor": false, "full_signature": "@Test public void cantSerialiseStringClass()", "identifier...
{ "fields": [ { "declarator": "serialVersionUID = -8344193425875811395L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8344193425875811395L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisat...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Integer.class.equals(clazz);\n }", "class_method_signature": "RawIntegerSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identif...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_357
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/LazyPropertiesTest.java", "identifier": "LazyPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotLoadPropertyWhenLoaded() {\n // Given\n final ElementValueLoader elementLoader = mock(ElementValueLoader.class);\n final String propertyName = \"property name\";\n final String exceptedPropertyValue = \"property value\";\n final Properties ...
{ "fields": [ { "declarator": "serialVersionUID = 9009552236887934877L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 9009552236887934877L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "value...
{ "body": "@Override\n public Object get(final Object name) {\n return get(name.toString());\n }", "class_method_signature": "LazyProperties.get(final Object name)", "constructor": false, "full_signature": "@Override public Object get(final Object name)", "identifier": "get", "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_707
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/ForEachHandlerTest.java", "identifier": "ForEachHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowExceptionWithNullInput() {\n // Given\n final Store store = mock(Store.class);\n final Context context = new Context(new User());\n final ForEach op = new ForEach.Builder<>()\n .operation(new GetElements())\n .build...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/ForEachHandler.java", "identifier": "ForEachHandler", "interfaces": "implements OutputOperationHandler<ForEach<I, O>, Iterable<? extends O>>", "methods": [ { "class_method_signature": "ForEachHandler.doOpera...
{ "body": "@Override\n public Iterable<? extends O> doOperation(final ForEach<I, O> forEach, final Context context, final Store store) throws OperationException {\n if (null == forEach.getOperation()) {\n throw new OperationException(\"Operation cannot be null\");\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_212
{ "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 shouldFilterOutInvalidEdge() throws OperationException, SerialisationException {\n // Given\n final PreAggregationFilterProcessor processor = new PreAggregationFilterProcessor(VIEW);\n\n // When / Then\n assertFalse(processor.test(CellUtil.getLazyCell(\n ...
{ "fields": [ { "declarator": "validator", "modifier": "private final", "original_string": "private final ElementValidator validator;", "type": "ElementValidator", "var_name": "validator" } ], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasesto...
{ "body": "@Override\n public boolean test(final LazyElementCell elementCell) {\n return validator.validateInput(elementCell.getElement());\n }", "class_method_signature": "PreAggregationFilterProcessor.test(final LazyElementCell elementCell)", "constructor": false, "full_signature": "@Override pub...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_642
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/StorePropertiesTest.java", "identifier": "StorePropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetProperty() {\n // Given\n final StoreProperties props = createStoreProperties();\n\n // When\n String value = props.get(\"key1\");\n\n // Then\n assertEquals(\"value1\", value);\n }", "class_method_signature": "StorePropertiesTe...
{ "fields": [ { "declarator": "STORE_CLASS = \"gaffer.store.class\"", "modifier": "public static final", "original_string": "public static final String STORE_CLASS = \"gaffer.store.class\";", "type": "String", "var_name": "STORE_CLASS" }, { "declarator": "SCHEMA_CLASS =...
{ "body": "public String get(final String key) {\n return props.getProperty(key);\n }", "class_method_signature": "StoreProperties.get(final String key)", "constructor": false, "full_signature": "public String get(final String key)", "identifier": "get", "invocations": [ "getProperty" ], "...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_65
{ "fields": [ { "declarator": "GRAPH_ID_A = \"a\"", "modifier": "public static final", "original_string": "public static final String GRAPH_ID_A = \"a\";", "type": "String", "var_name": "GRAPH_ID_A" }, { "declarator": "GRAPH_ID_B = \"b\"", "modifier": "public stat...
{ "body": "@Test\n public void shouldThrowExceptionWhenAddingNullSchema() {\n // Given\n GraphSerialisable nullGraph = null;\n\n // When / Then\n try {\n graphStorage.put(nullGraph, access);\n } catch (StorageException e) {\n assertEquals(\"Graph cannot be n...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(FederatedGraphStorage.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FederatedGraphStorage.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "public void put(final Collection<GraphSerialisable> graphs, final FederatedAccess access) throws StorageException {\n for (final GraphSerialisable graph : graphs) {\n put(graph, access);\n }\n }", "class_method_signature": "FederatedGraphStorage.put(final Collection<GraphSeria...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_992
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/util/JsonSerialisationUtilTest.java", "identifier": "JsonSerialisationUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInRange() {\n // Given\n final String className = InRange.class.getName();\n\n // When\n final Map<String, String> result = JsonSerialisationUtil.getSerialisedFieldClasses(className);\n\n // Then\n final Map<String, String> expectedValues...
{ "fields": [ { "declarator": "cache = Collections.emptyMap()", "modifier": "private static", "original_string": "private static Map<String, Map<String, String>> cache = Collections.emptyMap();", "type": "Map<String, Map<String, String>>", "var_name": "cache" } ], "file": "co...
{ "body": "public static Map<String, String> getSerialisedFieldClasses(final String className) {\n final Map<String, String> cachedResult = cache.get(className);\n if (null != cachedResult) {\n return cachedResult;\n }\n\n final Class<?> clazz;\n try {\n clazz ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_838
{ "fields": [ { "declarator": "vertex1", "modifier": "private", "original_string": "private Object vertex1, vertex2, vertex3,\n vertex4, vertex5, vertex6,\n vertex7, vertex8;", "type": "Object", "var_name": "vertex1" } ], "file": "core/store/src/test/jav...
{ "body": "@Test\n public void shouldCorrectlyConvertEdgeSeedsWithNoneUseMatchedVertex() throws OperationException {\n // Given\n final List elementIds = Arrays.asList(\n new EdgeSeed(vertex1, vertex2, false, null),\n new EdgeSeed(vertex3, vertex4, false, null),\n ...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToVerticesHandler.java", "identifier": "ToVerticesHandler", "interfaces": "implements OutputOperationHandler<ToVertices, Iterable<? extends Object>>", "methods": [ { "class_method_signature": "ToVerti...
{ "body": "@Override\n public Iterable<Object> doOperation(final ToVertices operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getInput()) {\n return null;\n }\n\n return new StreamFlatMapIterable<>(operation.getInput(), elementI...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1113
{ "fields": [ { "declarator": "OP_AUTHS_PATH = \"/opAuthoriser.json\"", "modifier": "private static final", "original_string": "private static final String OP_AUTHS_PATH = \"/opAuthoriser.json\";", "type": "String", "var_name": "OP_AUTHS_PATH" }, { "declarator": "USER =...
{ "body": "@Test\n public void shouldAcceptOperationChainWhenUserHasAllOpAuthsForAddNamedOperation() {\n // Given\n final OperationAuthoriser hook = fromJson(OP_AUTHS_PATH);\n final AddNamedOperation addNamedOperation = new AddNamedOperation.Builder()\n .operationChain(\"{\\\"op...
{ "fields": [ { "declarator": "allAuths = new HashSet<>()", "modifier": "private final", "original_string": "private final Set<String> allAuths = new HashSet<>();", "type": "Set<String>", "var_name": "allAuths" }, { "declarator": "auths = new HashMap<>()", "modifi...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n if (null != opChain) {\n for (final Operation operation : opChain.getOperations()) {\n authorise(operation, context.getUser());\n }\n authorise(opChain, c...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1056
{ "fields": [ { "declarator": "historicSerialisationPairs", "modifier": "private final", "original_string": "private final Pair<Object, byte[]>[] historicSerialisationPairs;", "type": "Pair<Object, byte[]>[]", "var_name": "historicSerialisationPairs" } ], "file": "core/serial...
{ "body": "@Test\n public void shouldNotPrettyPrintByDefaultWhenSerialising() throws SerialisationException {\n SimpleTestObject test = new SimpleTestObject();\n test.setX(\"TestValue1\");\n byte[] bytes = JSONSerialiser.serialise(test);\n assertEquals(\"{\\\"x\\\":\\\"TestValue1\\\"}\"...
{ "fields": [ { "declarator": "JSON_SERIALISER_CLASS_KEY = \"gaffer.serialiser.json.class\"", "modifier": "public static final", "original_string": "public static final String JSON_SERIALISER_CLASS_KEY = \"gaffer.serialiser.json.class\";", "type": "String", "var_name": "JSON_SERIALIS...
{ "body": "public static byte[] serialise(final Object object, final String... fieldsToExclude) throws SerialisationException {\n return serialise(object, false, fieldsToExclude);\n }", "class_method_signature": "JSONSerialiser.serialise(final Object object, final String... fieldsToExclude)", "construct...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_584
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/types/function/ToFreqMapTest.java", "identifier": "ToFreqMapTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldConvertStringToFreqMap() {\n // Given\n final ToFreqMap function = new ToFreqMap();\n final String value = \"value1\";\n\n // When\n final FreqMap result = function.apply(value);\n\n // Then\n assertEquals(new FreqMap(value), res...
{ "fields": [], "file": "core/type/src/main/java/uk/gov/gchq/gaffer/types/function/ToFreqMap.java", "identifier": "ToFreqMap", "interfaces": "", "methods": [ { "class_method_signature": "ToFreqMap.apply(final Object value)", "constructor": false, "full_signature": "@Override public FreqM...
{ "body": "@Override\n public FreqMap apply(final Object value) {\n return new FreqMap(null != value ? value.toString() : null);\n }", "class_method_signature": "ToFreqMap.apply(final Object value)", "constructor": false, "full_signature": "@Override public FreqMap apply(final Object value)", "id...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_750
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/WhileHandlerTest.java", "identifier": "WhileHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldExecuteNonOutputOperation() throws OperationException {\n // Given\n final AddElements addElements = new AddElements.Builder()\n .input(new Edge.Builder().build())\n .build();\n final Context context = mock(Context.class);\n ...
{ "fields": [ { "declarator": "maxRepeats = While.MAX_REPEATS", "modifier": "private", "original_string": "private int maxRepeats = While.MAX_REPEATS;", "type": "int", "var_name": "maxRepeats" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/W...
{ "body": "@Override\n public Object doOperation(final While operation,\n final Context context,\n final Store store) throws OperationException {\n validateMaxRepeats(operation);\n\n Object input = operation.getInput();\n for (int repea...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_300
{ "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 shouldOverrideGlobalExcludeElementPropertiesWhenSpecificEntityGroupExcludePropertiesSet() {\n // Given\n final View view = new View.Builder()\n .globalElements(new GlobalViewElementDefinition.Builder()\n .groups(TestGroups.ENTITY)\n...
{ "fields": [ { "declarator": "globalElements", "modifier": "private", "original_string": "private List<GlobalViewElementDefinition> globalElements;", "type": "List<GlobalViewElementDefinition>", "var_name": "globalElements" }, { "declarator": "globalEntities", "m...
{ "body": "public void expandGlobalDefinitions() {\n if (null != globalEntities && !globalEntities.isEmpty()) {\n setEntities(expandGlobalDefinitions(getEntities(), getEntityGroups(), globalEntities, false));\n globalEntities = null;\n }\n\n if (null != globalEdges && !globa...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1282
{ "fields": [ { "declarator": "service = new HazelcastCacheService()", "modifier": "private static", "original_string": "private static HazelcastCacheService service = new HazelcastCacheService();", "type": "HazelcastCacheService", "var_name": "service" }, { "declarator...
{ "body": "@Test\n public void shouldReUseCacheIfOneExists(@TempDir Path tempDir)\n throws CacheOperationException {\n\n // given\n initialiseWithTestConfig(tempDir);\n ICache<String, Integer> cache = service.getCache(CACHE_NAME);\n cache.put(\"key\", 1);\n\n // when\n...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(HazelcastCacheService.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(HazelcastCacheService.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "@Override\n public <K, V> ICache<K, V> getCache(final String cacheName) {\n final ICache<K, V> cache;\n if (null != hazelcast) {\n cache = new HazelcastCache<>(hazelcast.getMap(cacheName));\n } else {\n cache = null;\n }\n\n return cache;\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_1328
{ "fields": [ { "declarator": "HYPER_LOG_LOG_PLUS_CONVERTER = new HyperLogLogPlusConverter()", "modifier": "private static final", "original_string": "private static final HyperLogLogPlusConverter HYPER_LOG_LOG_PLUS_CONVERTER = new HyperLogLogPlusConverter();", "type": "HyperLogLogPlusConv...
{ "body": "@Test\n public void testConverter() throws ConversionException {\n final HyperLogLogPlus hyperLogLogPlus = new HyperLogLogPlus(5, 5);\n hyperLogLogPlus.offer(\"A\");\n hyperLogLogPlus.offer(\"B\");\n assertEquals(hyperLogLogPlus.cardinality(), (long) HYPER_LOG_LOG_PLUS_CONVER...
{ "fields": [ { "declarator": "serialVersionUID = -1867038905136086956L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1867038905136086956L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/spark/s...
{ "body": "@Override\n public Long convert(final Object object) throws ConversionException {\n return ((HyperLogLogPlus) object).cardinality();\n }", "class_method_signature": "HyperLogLogPlusConverter.convert(final Object object)", "constructor": false, "full_signature": "@Override public Long con...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_32
{ "fields": [ { "declarator": "ID_SCHEMA_ENTITY = \"basicEntitySchema\"", "modifier": "public static final", "original_string": "public static final String ID_SCHEMA_ENTITY = \"basicEntitySchema\";", "type": "String", "var_name": "ID_SCHEMA_ENTITY" }, { "declarator": "I...
{ "body": "@Test\n public void shouldNotUseSchema() throws Exception {\n // Given\n final Schema unusedMock = Mockito.mock(Schema.class);\n // When\n store.initialise(FEDERATED_STORE_ID, unusedMock, federatedProperties);\n addGraphWithPaths(ACC_ID_2, PROPERTIES_ALT, PATH_BASIC_ED...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Store.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Store.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": ...
{ "body": "@Override\n public void initialise(final String graphId, final Schema unused, final StoreProperties properties) throws StoreException {\n super.initialise(graphId, new Schema(), properties);\n customPropertiesAuths = getCustomPropertiesAuths();\n isPublicAccessAllowed = Boolean.valu...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_615
{ "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": "EntityIdSerialiserTest.testCantSerialiseIntegerClass()", "constructor": false, "full_signature": "@Test public void tes...
{ "fields": [ { "declarator": "serialVersionUID = -8190219367679033911L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8190219367679033911L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ver...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return EntityId.class.isAssignableFrom(clazz);\n }", "class_method_signature": "EntityIdSerialiser.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_245
{ "fields": [ { "declarator": "GRAPH_ID = \"graphId\"", "modifier": "private static final", "original_string": "private static final String GRAPH_ID = \"graphId\";", "type": "String", "var_name": "GRAPH_ID" }, { "declarator": "service", "modifier": "@InjectMocks\n...
{ "body": "@Test\n public void shouldThrowExceptionWhenGetNextOperationsWithNonOperationClassName() throws IOException {\n // When / Then\n try {\n service.getNextOperations(String.class.getName());\n fail(\"Exception expected\");\n } catch (final IllegalArgumentException...
{ "fields": [ { "declarator": "graphFactory", "modifier": "@Inject\n private", "original_string": "@Inject\n private GraphFactory graphFactory;", "type": "GraphFactory", "var_name": "graphFactory" }, { "declarator": "userFactory", "modifier": "@Inject\n p...
{ "body": "@Override\n public Set<Class> getNextOperations(final String operationClassName) {\n Class<? extends Operation> opClass;\n try {\n opClass = Class.forName(SimpleClassNameIdResolver.getClassName(operationClassName)).asSubclass(Operation.class);\n } catch (final ClassNotFou...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1144
{ "fields": [ { "declarator": "validEdge = new Edge.Builder()\n .group(\"result\")\n .source(\"jobId\")\n .dest(\"exportId\")\n .directed(true)\n .property(\"opAuths\", CollectionUtil.treeSet(\"user01\"))\n .property(\"timestamp\", System.cur...
{ "body": "@Test\n public void shouldCreateGraphWithValidSchemaWithoutAgeOff() {\n // Given\n final Graph graph = GafferResultCacheUtil.createGraph(\"graphId\", StreamUtil.STORE_PROPERTIES, null);\n final Schema schema = graph.getSchema();\n\n // When\n final boolean isValid = sc...
{ "fields": [ { "declarator": "ONE_DAY_IN_MILLISECONDS = 24 * 60 * 60 * 1000L", "modifier": "public static final", "original_string": "public static final long ONE_DAY_IN_MILLISECONDS = 24 * 60 * 60 * 1000L;", "type": "long", "var_name": "ONE_DAY_IN_MILLISECONDS" }, { "...
{ "body": "public static Graph createGraph(final String graphId, final String cacheStorePropertiesPath, final Long timeToLive) {\n if (null == cacheStorePropertiesPath) {\n throw new IllegalArgumentException(\"Gaffer result cache Store properties are required\");\n }\n\n final Graph.Bu...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_496
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/StringUtilTest.java", "identifier": "StringUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void toStringWhenBytesAreValid() {\n final byte[] validBytes = \"isValid\".getBytes();\n\n assertEquals(\"isValid\", StringUtil.toString(validBytes));\n }", "class_method_signature": "StringUtilTest.toStringWhenBytesAreValid()", "constructor": false, "full_signature...
{ "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 toString(final byte[] bytes) {\n try {\n return new String(bytes, CommonConstants.UTF_8);\n } catch (final UnsupportedEncodingException e) {\n throw new RuntimeException(\"Unable to convert bytes to string\", e);\n }\n }", "class_method_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_479
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/elementvisibilityutil/AuthorisationsTest.java", "identifier": "AuthorisationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEncodeMultiByteAuthorisations() {\n final Authorisations a = new Authorisations(\"五\", \"b\", \"c\", \"九\");\n final byte[] array = a.getAuthorisationsArray();\n final Authorisations b = new Authorisations(array);\n\n assertEquals(a, b);\n }", "cl...
{ "fields": [ { "declarator": "serialVersionUID = 8931467369628123909L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 8931467369628123909L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "auths...
{ "body": "public byte[] getAuthorisationsArray() {\n return serialise().getBytes(UTF_8);\n }", "class_method_signature": "Authorisations.getAuthorisationsArray()", "constructor": false, "full_signature": "public byte[] getAuthorisationsArray()", "identifier": "getAuthorisationsArray", "invocation...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_183
{ "fields": [ { "declarator": "SCHEMA = new Schema.Builder()\n .type(\"string\", new TypeDefinition.Builder()\n .clazz(String.class)\n .aggregateFunction(new StringConcat())\n .build())\n .type(\"type\", Boolean.class)\n ...
{ "body": "@Test\n public void shouldDelegatePostScannerOpenToQueryScanner() throws IOException {\n // Given\n final ObserverContext<RegionCoprocessorEnvironment> e = mock(ObserverContext.class);\n final Scan scan = mock(Scan.class);\n final RegionScanner scanner = mock(RegionScanner.cl...
{ "fields": [ { "declarator": "schema", "modifier": "private", "original_string": "private Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "serialisation", "modifier": "private", "original_string": "private ElementSerialisation ser...
{ "body": "@Override\n public RegionScanner postScannerOpen(final ObserverContext<RegionCoprocessorEnvironment> e, final Scan scan, final RegionScanner scanner) throws IOException {\n return new QueryScanner(scanner, scan, schema, serialisation);\n }", "class_method_signature": "GafferCoprocessor.postS...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1001
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/DoubleSerialiserTest.java", "identifier": "DoubleSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Double>" }
{ "body": "@Test\n public void cantSerialiseStringClass() {\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "DoubleSerialiserTest.cantSerialiseStringClass()", "constructor": false, "full_signature": "@Test public void cantSerialiseStringClass()", "identifier": "...
{ "fields": [ { "declarator": "serialVersionUID = 5647756843689779437L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5647756843689779437L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisatio...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Double.class.equals(clazz);\n }", "class_method_signature": "DoubleSerialiser.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_880
{ "fields": [ { "declarator": "WRITE_ACCESS_ROLE = \"writeRole\"", "modifier": "private static final", "original_string": "private static final String WRITE_ACCESS_ROLE = \"writeRole\";", "type": "String", "var_name": "WRITE_ACCESS_ROLE" }, { "declarator": "namedViewCac...
{ "body": "@Test\n public void shouldDeleteNamedViewCorrectly() throws OperationException, CacheOperationFailedException {\n assertTrue(cacheContains(testNamedViewName));\n // Given\n\n final DeleteNamedView deleteNamedView = new DeleteNamedView.Builder().name(testNamedViewName).build();\n\n ...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedViewCache cache;", "type": "NamedViewCache", "var_name": "cache" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/named/DeleteNamedViewH...
{ "body": "@Override\n public Void doOperation(final DeleteNamedView namedViewOp, final Context context, final Store store) throws OperationException {\n try {\n cache.deleteNamedView(namedViewOp.getName(), context.getUser(), store.getProperties().getAdminAuth());\n } catch (final CacheOpe...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1145
{ "fields": [ { "declarator": "GRAPH_ID = \"graphId\"", "modifier": "private static final", "original_string": "private static final String GRAPH_ID = \"graphId\";", "type": "String", "var_name": "GRAPH_ID" }, { "declarator": "STORE_PROPS_ID = \"storePropsId\"", "...
{ "body": "@Test\n public void shouldGetExporterClass() {\n final ExportToOtherGraphHandler handler = new ExportToOtherGraphHandler();\n\n assertEquals(OtherGraphExporter.class, handler.getExporterClass());\n }", "class_method_signature": "ExportToOtherGraphHandlerTest.shouldGetExporterClass()",...
{ "fields": [], "file": "core/graph/src/main/java/uk/gov/gchq/gaffer/operation/export/graph/handler/ExportToOtherGraphHandler.java", "identifier": "ExportToOtherGraphHandler", "interfaces": "", "methods": [ { "class_method_signature": "ExportToOtherGraphHandler.getExporterClass()", "constructo...
{ "body": "@Override\n protected Class<OtherGraphExporter> getExporterClass() {\n return OtherGraphExporter.class;\n }", "class_method_signature": "ExportToOtherGraphHandler.getExporterClass()", "constructor": false, "full_signature": "@Override protected Class<OtherGraphExporter> getExporterClass(...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_497
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/StringUtilTest.java", "identifier": "StringUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void ifEmptyStringTestReturnNull() {\n assertNull(StringUtil.nullIfEmpty(\"\"));\n }", "class_method_signature": "StringUtilTest.ifEmptyStringTestReturnNull()", "constructor": false, "full_signature": "@Test public void ifEmptyStringTestReturnNull()", "identifier": "ifEm...
{ "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 nullIfEmpty(final String string) {\n return null != string && string.isEmpty() ? null : string;\n }", "class_method_signature": "StringUtil.nullIfEmpty(final String string)", "constructor": false, "full_signature": "public static String nullIfEmpty(final String string)"...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_478
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/elementvisibilityutil/AuthorisationsTest.java", "identifier": "AuthorisationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEncodeEmptyAuthorisations() {\n final Authorisations a = new Authorisations();\n final byte[] array = a.getAuthorisationsArray();\n final Authorisations b = new Authorisations(array);\n\n assertEquals(a, b);\n }", "class_method_signature": "Author...
{ "fields": [ { "declarator": "serialVersionUID = 8931467369628123909L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 8931467369628123909L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "auths...
{ "body": "public byte[] getAuthorisationsArray() {\n return serialise().getBytes(UTF_8);\n }", "class_method_signature": "Authorisations.getAuthorisationsArray()", "constructor": false, "full_signature": "public byte[] getAuthorisationsArray()", "identifier": "getAuthorisationsArray", "invocation...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_182
{ "fields": [ { "declarator": "SCHEMA = new Schema.Builder()\n .type(\"string\", new TypeDefinition.Builder()\n .clazz(String.class)\n .aggregateFunction(new StringConcat())\n .build())\n .type(\"type\", Boolean.class)\n ...
{ "body": "@Test\n public void shouldDelegatePreCompactToStoreScanner() throws IOException {\n // Given\n final ObserverContext<RegionCoprocessorEnvironment> e = mock(ObserverContext.class);\n final Store store = mock(Store.class);\n final InternalScanner scanner = mock(InternalScanner....
{ "fields": [ { "declarator": "schema", "modifier": "private", "original_string": "private Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "serialisation", "modifier": "private", "original_string": "private ElementSerialisation ser...
{ "body": "@Override\n public InternalScanner preCompact(final ObserverContext<RegionCoprocessorEnvironment> e,\n final Store store,\n final InternalScanner scanner,\n final ScanType scanType,\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1000
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/LongSerialiserTest.java", "identifier": "LongSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Long>" }
{ "body": "@Test\n public void canSerialiseLongClass() {\n assertTrue(serialiser.canHandle(Long.class));\n }", "class_method_signature": "LongSerialiserTest.canSerialiseLongClass()", "constructor": false, "full_signature": "@Test public void canSerialiseLongClass()", "identifier": "canSerialiseLo...
{ "fields": [ { "declarator": "serialVersionUID = 5647756843689779437L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5647756843689779437L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisatio...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Long.class.equals(clazz);\n }", "class_method_signature": "LongSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identifier": "ca...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_881
{ "fields": [ { "declarator": "WRITE_ACCESS_ROLE = \"writeRole\"", "modifier": "private static final", "original_string": "private static final String WRITE_ACCESS_ROLE = \"writeRole\";", "type": "String", "var_name": "WRITE_ACCESS_ROLE" }, { "declarator": "namedViewCac...
{ "body": "@Test\n public void shouldNotThrowExceptionWhenNoNamedViewToDelete() throws CacheOperationFailedException, OperationException {\n assertTrue(cacheContains(testNamedViewName));\n\n // Given\n final DeleteNamedView deleteInvalidNamedView = new DeleteNamedView.Builder().name(invalidNam...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedViewCache cache;", "type": "NamedViewCache", "var_name": "cache" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/named/DeleteNamedViewH...
{ "body": "@Override\n public Void doOperation(final DeleteNamedView namedViewOp, final Context context, final Store store) throws OperationException {\n try {\n cache.deleteNamedView(namedViewOp.getName(), context.getUser(), store.getProperties().getAdminAuth());\n } catch (final CacheOpe...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_751
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/ValidateHandlerTest.java", "identifier": "ValidateHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnNullIfElementsAreNull() throws OperationException {\n // Given\n final ValidateHandler handler = new ValidateHandler();\n final Store store = mock(Store.class);\n final Validate validate = mock(Validate.class);\n given(validate.getInput(...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/ValidateHandler.java", "identifier": "ValidateHandler", "interfaces": "implements OutputOperationHandler<Validate, Iterable<? extends Element>>", "methods": [ { "class_method_signature": "ValidateHandler.doO...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final Validate operation,\n final Context context, final Store store)\n throws OperationException {\n return doOperation(operation, store.getSchema());\n }", "class_method_...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_301
{ "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 shouldAddGlobalElementTransformToEntityGroupFromBuilder() {\n // Given\n final ElementTransformer elementTransformer = new ElementTransformer.Builder()\n .select(TestPropertyNames.PROP_3)\n .execute(new Identity())\n .project...
{ "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_1283
{ "fields": [ { "declarator": "cache", "modifier": "private static", "original_string": "private static HazelcastCache<String, Integer> cache;", "type": "HazelcastCache<String, Integer>", "var_name": "cache" } ], "file": "library/cache-library/hazelcast-cache-service/src/test...
{ "body": "@Test\n public void shouldThrowAnExceptionIfEntryAlreadyExistsWhenUsingPutSafe() {\n try {\n cache.put(\"test\", 1);\n } catch (final CacheOperationException e) {\n fail(\"Did not expect Exception to occur here\");\n }\n try {\n cache.putSafe(...
{ "fields": [ { "declarator": "distributedMap", "modifier": "private final", "original_string": "private final IMap<K, V> distributedMap;", "type": "IMap<K, V>", "var_name": "distributedMap" } ], "file": "library/cache-library/hazelcast-cache-service/src/main/java/uk/gov/gchq...
{ "body": "@Override\n public void put(final K key, final V value) throws CacheOperationException {\n try {\n distributedMap.put(key, value);\n } catch (final Exception e) {\n throw new CacheOperationException(e);\n }\n }", "class_method_signature": "HazelcastCache.p...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1329
{ "fields": [ { "declarator": "HYPER_LOG_LOG_PLUS_CONVERTER = new HyperLogLogPlusConverter()", "modifier": "private static final", "original_string": "private static final HyperLogLogPlusConverter HYPER_LOG_LOG_PLUS_CONVERTER = new HyperLogLogPlusConverter();", "type": "HyperLogLogPlusConv...
{ "body": "@Test\n public void testCanHandleHyperLogLogPlus() {\n assertTrue(HYPER_LOG_LOG_PLUS_CONVERTER.canHandle(HyperLogLogPlus.class));\n assertFalse(HYPER_LOG_LOG_PLUS_CONVERTER.canHandle(String.class));\n }", "class_method_signature": "HyperLogLogPlusConverterTest.testCanHandleHyperLogLog...
{ "fields": [ { "declarator": "serialVersionUID = -1867038905136086956L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1867038905136086956L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/spark/s...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return HyperLogLogPlus.class.equals(clazz);\n }", "class_method_signature": "HyperLogLogPlusConverter.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_33
{ "fields": [ { "declarator": "ID_SCHEMA_ENTITY = \"basicEntitySchema\"", "modifier": "public static final", "original_string": "public static final String ID_SCHEMA_ENTITY = \"basicEntitySchema\";", "type": "String", "var_name": "ID_SCHEMA_ENTITY" }, { "declarator": "I...
{ "body": "@Test\n public void shouldFederatedIfUserHasCorrectAuths() throws Exception {\n // Given\n store.addGraphs(GRAPH_AUTHS, null, false, new GraphSerialisable.Builder()\n .config(new GraphConfig.Builder()\n .graphId(ACC_ID_2)\n .buil...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Store.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Store.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": ...
{ "body": "public void addGraphs(final Set<String> graphAuths, final String addingUserId, final boolean isPublic, final GraphSerialisable... graphs) throws StorageException {\n addGraphs(graphAuths, addingUserId, isPublic, FederatedGraphStorage.DEFAULT_DISABLED_BY_DEFAULT, graphs);\n }", "class_method_sig...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_614
{ "fields": [ { "declarator": "schema", "modifier": "private static", "original_string": "private static Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "serialiser", "modifier": "private static", "original_string": "private static...
{ "body": "@Test\n public void testDeserialiseEmpty() throws SerialisationException {\n assertEquals(null, serialiser.deserialiseEmpty());\n }", "class_method_signature": "EdgeSerialiserTest.testDeserialiseEmpty()", "constructor": false, "full_signature": "@Test public void testDeserialiseEmpty()",...
{ "fields": [ { "declarator": "serialVersionUID = 2205438497836765935L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 2205438497836765935L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "boole...
{ "body": "@Override\n public Edge deserialiseEmpty() throws SerialisationException {\n return null;\n }", "class_method_signature": "EdgeSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public Edge deserialiseEmpty()", "identifier": "deserialiseEmpty", "invoca...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_244
{ "fields": [ { "declarator": "GRAPH_ID = \"graphId\"", "modifier": "private static final", "original_string": "private static final String GRAPH_ID = \"graphId\";", "type": "String", "var_name": "GRAPH_ID" }, { "declarator": "service", "modifier": "@InjectMocks\n...
{ "body": "@Test\n public void shouldThrowExceptionWhenGetNextOperationsWithUnknownClassName() throws IOException {\n // When / Then\n try {\n service.getNextOperations(\"an unknown class name\");\n fail(\"Exception expected\");\n } catch (final IllegalArgumentException e...
{ "fields": [ { "declarator": "graphFactory", "modifier": "@Inject\n private", "original_string": "@Inject\n private GraphFactory graphFactory;", "type": "GraphFactory", "var_name": "graphFactory" }, { "declarator": "userFactory", "modifier": "@Inject\n p...
{ "body": "@Override\n public Set<Class> getNextOperations(final String operationClassName) {\n Class<? extends Operation> opClass;\n try {\n opClass = Class.forName(SimpleClassNameIdResolver.getClassName(operationClassName)).asSubclass(Operation.class);\n } catch (final ClassNotFou...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_993
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/util/JsonSerialisationUtilTest.java", "identifier": "JsonSerialisationUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInDateRangeAndInTimeRange() {\n // Given\n final String classNameIDR = InDateRange.class.getName();\n final String classNameITR = InTimeRange.class.getName();\n\n // When\n final Map<String, String> resultIDR = JsonSerialisationUtil.getSerialise...
{ "fields": [ { "declarator": "cache = Collections.emptyMap()", "modifier": "private static", "original_string": "private static Map<String, Map<String, String>> cache = Collections.emptyMap();", "type": "Map<String, Map<String, String>>", "var_name": "cache" } ], "file": "co...
{ "body": "public static Map<String, String> getSerialisedFieldClasses(final String className) {\n final Map<String, String> cachedResult = cache.get(className);\n if (null != cachedResult) {\n return cachedResult;\n }\n\n final Class<?> clazz;\n try {\n clazz ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_839
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToStreamHandlerTest.java", "identifier": "ToStreamHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConvertIterableToStream() throws OperationException {\n // Given\n final List<Integer> originalList = Arrays.asList(1, 2, 3);\n\n final Iterable<Integer> originalResults = new WrappedCloseableIterable<>(originalList);\n final ToStreamHandler<Integer>...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToStreamHandler.java", "identifier": "ToStreamHandler", "interfaces": "implements OutputOperationHandler<ToStream<T>, Stream<? extends T>>", "methods": [ { "class_method_signature": "ToStreamHandler.d...
{ "body": "@Override\n public Stream<? extends T> doOperation(final ToStream<T> operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getInput()) {\n return null;\n }\n\n return Streams.toStream(operation.getInput());\n }", "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_1112
{ "fields": [ { "declarator": "OP_AUTHS_PATH = \"/opAuthoriser.json\"", "modifier": "private static final", "original_string": "private static final String OP_AUTHS_PATH = \"/opAuthoriser.json\";", "type": "String", "var_name": "OP_AUTHS_PATH" }, { "declarator": "USER =...
{ "body": "@Test\n public void shouldRejectOperationChainWhenUserDoesntHaveAllOpAuthsForNestedOperations() {\n // Given\n final OperationAuthoriser hook = fromJson(OP_AUTHS_PATH);\n final OperationChain opChain = new OperationChain.Builder()\n .first(new GetElements())\n ...
{ "fields": [ { "declarator": "allAuths = new HashSet<>()", "modifier": "private final", "original_string": "private final Set<String> allAuths = new HashSet<>();", "type": "Set<String>", "var_name": "allAuths" }, { "declarator": "auths = new HashMap<>()", "modifi...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n if (null != opChain) {\n for (final Operation operation : opChain.getOperations()) {\n authorise(operation, context.getUser());\n }\n authorise(opChain, c...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1057
{ "fields": [ { "declarator": "historicSerialisationPairs", "modifier": "private final", "original_string": "private final Pair<Object, byte[]>[] historicSerialisationPairs;", "type": "Pair<Object, byte[]>[]", "var_name": "historicSerialisationPairs" } ], "file": "core/serial...
{ "body": "@Test\n public void shouldPrettyPrintWhenSerialisingAndSetToPrettyPrint() throws SerialisationException {\n SimpleTestObject test = new SimpleTestObject();\n test.setX(\"TestValue1\");\n byte[] bytes = JSONSerialiser.serialise(test, true);\n JsonAssert.assertEquals(String.for...
{ "fields": [ { "declarator": "JSON_SERIALISER_CLASS_KEY = \"gaffer.serialiser.json.class\"", "modifier": "public static final", "original_string": "public static final String JSON_SERIALISER_CLASS_KEY = \"gaffer.serialiser.json.class\";", "type": "String", "var_name": "JSON_SERIALIS...
{ "body": "public static byte[] serialise(final Object object, final String... fieldsToExclude) throws SerialisationException {\n return serialise(object, false, fieldsToExclude);\n }", "class_method_signature": "JSONSerialiser.serialise(final Object object, final String... fieldsToExclude)", "construct...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_585
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/types/function/ToFreqMapTest.java", "identifier": "ToFreqMapTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldConvertObjectToFreqMap() {\n // Given\n final ToFreqMap function = new ToFreqMap();\n final Object value = 1L;\n\n // When\n final FreqMap result = function.apply(value);\n\n // Then\n assertEquals(new FreqMap(value.toString()), ...
{ "fields": [], "file": "core/type/src/main/java/uk/gov/gchq/gaffer/types/function/ToFreqMap.java", "identifier": "ToFreqMap", "interfaces": "", "methods": [ { "class_method_signature": "ToFreqMap.apply(final Object value)", "constructor": false, "full_signature": "@Override public FreqM...
{ "body": "@Override\n public FreqMap apply(final Object value) {\n return new FreqMap(null != value ? value.toString() : null);\n }", "class_method_signature": "ToFreqMap.apply(final Object value)", "constructor": false, "full_signature": "@Override public FreqMap apply(final Object value)", "id...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_356
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/LazyPropertiesTest.java", "identifier": "LazyPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldLoadPropertyWhenNotLoaded() {\n // Given\n final ElementValueLoader elementLoader = mock(ElementValueLoader.class);\n final Properties properties = new Properties();\n final String propertyName = \"property name\";\n final String exceptedPrope...
{ "fields": [ { "declarator": "serialVersionUID = 9009552236887934877L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 9009552236887934877L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "value...
{ "body": "@Override\n public Object get(final Object name) {\n return get(name.toString());\n }", "class_method_signature": "LazyProperties.get(final Object name)", "constructor": false, "full_signature": "@Override public Object get(final Object name)", "identifier": "get", "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_706
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/ForEachHandlerTest.java", "identifier": "ForEachHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowExceptionWithNullOperation() {\n // Given\n final Store store = mock(Store.class);\n final Context context = new Context(new User());\n final ForEach op = new ForEach.Builder<>()\n .operation(null)\n .input(Arrays.a...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/ForEachHandler.java", "identifier": "ForEachHandler", "interfaces": "implements OutputOperationHandler<ForEach<I, O>, Iterable<? extends O>>", "methods": [ { "class_method_signature": "ForEachHandler.doOpera...
{ "body": "@Override\n public Iterable<? extends O> doOperation(final ForEach<I, O> forEach, final Context context, final Store store) throws OperationException {\n if (null == forEach.getOperation()) {\n throw new OperationException(\"Operation cannot be null\");\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_213
{ "fields": [ { "declarator": "SCHEMA = new Schema.Builder()\n .type(\"string\", String.class)\n .type(\"type\", Boolean.class)\n .edge(TestGroups.EDGE, new SchemaEdgeDefinition.Builder()\n .source(\"string\")\n .destination(\"string\")\...
{ "body": "@Test\n public void shouldNotFilterOutValidEdge() throws OperationException, SerialisationException {\n // Given\n final PreAggregationFilterProcessor processor = new PreAggregationFilterProcessor(VIEW);\n\n // When / Then\n assertTrue(processor.test(CellUtil.getLazyCell(\n ...
{ "fields": [ { "declarator": "validator", "modifier": "private final", "original_string": "private final ElementValidator validator;", "type": "ElementValidator", "var_name": "validator" } ], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasesto...
{ "body": "@Override\n public boolean test(final LazyElementCell elementCell) {\n return validator.validateInput(elementCell.getElement());\n }", "class_method_signature": "PreAggregationFilterProcessor.test(final LazyElementCell elementCell)", "constructor": false, "full_signature": "@Override pub...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_643
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/StorePropertiesTest.java", "identifier": "StorePropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetPropertyWithDefaultValue() {\n // Given\n final StoreProperties props = createStoreProperties();\n\n // When\n String value = props.get(\"key1\", \"property not found\");\n\n // Then\n assertEquals(\"value1\", value);\n }", "cla...
{ "fields": [ { "declarator": "STORE_CLASS = \"gaffer.store.class\"", "modifier": "public static final", "original_string": "public static final String STORE_CLASS = \"gaffer.store.class\";", "type": "String", "var_name": "STORE_CLASS" }, { "declarator": "SCHEMA_CLASS =...
{ "body": "public String get(final String key) {\n return props.getProperty(key);\n }", "class_method_signature": "StoreProperties.get(final String key)", "constructor": false, "full_signature": "public String get(final String key)", "identifier": "get", "invocations": [ "getProperty" ], "...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_64
{ "fields": [ { "declarator": "GRAPH_ID_A = \"a\"", "modifier": "public static final", "original_string": "public static final String GRAPH_ID_A = \"a\";", "type": "String", "var_name": "GRAPH_ID_A" }, { "declarator": "GRAPH_ID_B = \"b\"", "modifier": "public stat...
{ "body": "@Test\n public void shouldStartWithNoGraphs() throws Exception {\n final Collection<Graph> graphs = graphStorage.get(nullUser, null);\n assertEquals(0, graphs.size());\n }", "class_method_signature": "FederatedGraphStorageTest.shouldStartWithNoGraphs()", "constructor": false, "ful...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(FederatedGraphStorage.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FederatedGraphStorage.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "public Collection<Graph> get(final User user, final List<String> graphIds) {\n if (null == user) {\n return Collections.emptyList();\n }\n\n validateAllGivenGraphIdsAreVisibleForUser(user, graphIds);\n Stream<Graph> graphs = getStream(user, graphIds);\n if (nul...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1104
{ "fields": [ { "declarator": "NAMED_VIEW_NAME = \"namedViewName\"", "modifier": "private static final", "original_string": "private static final String NAMED_VIEW_NAME = \"namedViewName\";", "type": "String", "var_name": "NAMED_VIEW_NAME" }, { "declarator": "NESTED_NAM...
{ "body": "@Test\n public void shouldResolveNamedViewWithParameter() throws CacheOperationFailedException {\n Map<String, Object> paramMap = Maps.newHashMap();\n paramMap.put(EDGE_NAME_PARAM_KEY, TestGroups.EDGE_2);\n\n ViewParameterDetail param = new ViewParameterDetail.Builder()\n ...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedViewCache cache;", "type": "NamedViewCache", "var_name": "cache" } ], "file": "core/graph/src/main/java/uk/gov/gchq/gaffer/graph/hook/NamedViewResolver.java", "identif...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n resolveViews(opChain, context);\n }", "class_method_signature": "NamedViewResolver.preExecute(final OperationChain<?> opChain, final Context context)", "constructor": false, "full_signature": "...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_985
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/util/LengthValueBytesSerialiserUtilTest.java", "identifier": "LengthValueBytesSerialiserUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDeserialiseEmptyValue() throws IOException {\n // Given\n final byte[] bytes = new byte[0];\n\n // When\n final byte[] deserialisedBytes = LengthValueBytesSerialiserUtil.deserialise(bytes);\n\n // Then\n assertArrayEquals(bytes, deseria...
{ "fields": [ { "declarator": "EMPTY_BYTES = new byte[0]", "modifier": "private static final", "original_string": "private static final byte[] EMPTY_BYTES = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTES" } ], "file": "core/serialisation/src/main/java/uk/gov/gchq/g...
{ "body": "public static <T> T deserialise(final ToBytesSerialiser<T> serialiser, final byte[] allBytes) throws SerialisationException {\n return deserialise(serialiser, allBytes, 0);\n }", "class_method_signature": "LengthValueBytesSerialiserUtil.deserialise(final ToBytesSerialiser<T> serialiser, final b...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_593
{ "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 testCanSerialiseGroupedPropertiesClass() throws SerialisationException {\n assertTrue(serialiser.canHandle(GroupedProperties.class));\n }", "class_method_signature": "GroupedPropertiesSerialiserTest.testCanSerialiseGroupedPropertiesClass()", "constructor": false, "ful...
{ "fields": [ { "declarator": "serialVersionUID = 3307260143698122796L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 3307260143698122796L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "strin...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return GroupedProperties.class.isAssignableFrom(clazz);\n }", "class_method_signature": "GroupedPropertiesSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(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_439
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/ElementTest.java", "identifier": "ElementTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFalseForEqualsWithNullObject() {\n final Element element1 = newElement(\"group\");\n\n boolean isEqual = element1.equals((Object) null);\n\n assertFalse(isEqual);\n }", "class_method_signature": "ElementTest.shouldReturnFalseForEqualsWithNullObje...
{ "fields": [ { "declarator": "DEFAULT_GROUP = \"UNKNOWN\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_GROUP = \"UNKNOWN\";", "type": "String", "var_name": "DEFAULT_GROUP" }, { "declarator": "properties", "modifier":...
{ "body": "@Override\n public boolean equals(final Object obj) {\n if (this == obj) {\n return true;\n }\n\n if (null == obj || getClass() != obj.getClass()) {\n return false;\n }\n\n final Element element = (Element) obj;\n\n return new EqualsBuilder...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1041
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/raw/RawIntegerSerialiserTest.java", "identifier": "RawIntegerSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Integer>" }
{ "body": "@Test\n public void canSerialiseIntegerClass() {\n assertTrue(serialiser.canHandle(Integer.class));\n }", "class_method_signature": "RawIntegerSerialiserTest.canSerialiseIntegerClass()", "constructor": false, "full_signature": "@Test public void canSerialiseIntegerClass()", "identifier...
{ "fields": [ { "declarator": "serialVersionUID = -8344193425875811395L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8344193425875811395L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/serialisat...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Integer.class.equals(clazz);\n }", "class_method_signature": "RawIntegerSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identif...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_710
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/OperationChainHandlerTest.java", "identifier": "OperationChainHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldHandleNonInputOperation() throws OperationException {\n // Given\n final OperationChainValidator opChainValidator = mock(OperationChainValidator.class);\n final List<OperationChainOptimiser> opChainOptimisers = Collections.emptyList();\n\n final Oper...
{ "fields": [ { "declarator": "opChainValidator", "modifier": "private final", "original_string": "private final OperationChainValidator opChainValidator;", "type": "OperationChainValidator", "var_name": "opChainValidator" }, { "declarator": "opChainOptimisers", "...
{ "body": "@Override\n public OUT doOperation(final OperationChain<OUT> operationChain, final Context context, final Store store) throws OperationException {\n\n prepareOperationChain(operationChain, context, store);\n\n Object result = null;\n for (final Operation op : operationChain.getOpera...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_340
{ "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 shouldGetVertexSet() {\n // Given\n // [A] -> [E] -> [D]\n // \\ \\ \\\n // (BasicEntity) (BasicEntity) (BasicEntity)\n\n // When\n final Walk walk = new Walk.Builder()\n .entity(ENTITY_...
{ "fields": [ { "declarator": "edges", "modifier": "private final", "original_string": "private final List<Set<Edge>> edges;", "type": "List<Set<Edge>>", "var_name": "edges" }, { "declarator": "entities", "modifier": "private final", "original_string": "priv...
{ "body": "@JsonIgnore\n public Set<Object> getVertexSet() {\n return entities.stream().map(Entry::getKey).collect(toSet());\n }", "class_method_signature": "Walk.getVertexSet()", "constructor": false, "full_signature": "@JsonIgnore public Set<Object> getVertexSet()", "identifier": "getVertexSet"...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1368
{ "fields": [ { "declarator": "hyperLogLogPlusWithCardinality5", "modifier": "private static", "original_string": "private static HyperLogLogPlus hyperLogLogPlusWithCardinality5;", "type": "HyperLogLogPlus", "var_name": "hyperLogLogPlusWithCardinality5" }, { "declarator...
{ "body": "@Test\n public void shouldAcceptWhenEqualToAndEqualToIsTrue() {\n // Given\n final HyperLogLogPlusIsLessThan filter = new HyperLogLogPlusIsLessThan(15, true);\n // When\n boolean accepted = filter.test(hyperLogLogPlusWithCardinality15);\n // Then\n assertTrue(ac...
{ "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 HyperLogLogPlus input) {\n if (null == input) {\n return false;\n }\n final long cardinality = input.cardinality();\n if (orEqualTo) {\n if (cardinality <= controlValue) {\n return true;\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_72
{ "fields": [ { "declarator": "schema = new LongVertexOperationsTest().createSchema()", "modifier": "private", "original_string": "private Schema schema = new LongVertexOperationsTest().createSchema();", "type": "Schema", "var_name": "schema" } ], "file": "store-implementatio...
{ "body": "@Test\n public void testQueryGeneratorForGetElementsWithEntitySeeds(@TempDir java.nio.file.Path tempDir)\n throws IOException, OperationException {\n // Given\n // - Create snapshot folder\n final String folder = String.format(\"file:///%s\", tempDir.toString());\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryGenerator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryGenerator.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public ParquetQuery getParquetQuery(final Operation operation) throws IOException, OperationException {\n if (operation instanceof GetAllElements) {\n return getPathsAndFiltersForAllElements((GetAllElements) operation);\n } else if (operation instanceof GetElements) {\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_655
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/resolver/DefaultScoreResolverTest.java", "identifier": "DefaultScoreResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetScoreForOperationChainWhenNamedOperationScoreIsNull() throws OperationException {\n // Given\n\n final Map<Class<? extends Operation>, Integer> opScores = new LinkedHashMap<>();\n opScores.put(Operation.class, 1);\n opScores.put(GetAdjacentIds.cla...
{ "fields": [ { "declarator": "DEFAULT_OPERATION_SCORE = 1", "modifier": "public static final", "original_string": "public static final int DEFAULT_OPERATION_SCORE = 1;", "type": "int", "var_name": "DEFAULT_OPERATION_SCORE" }, { "declarator": "scoreResolvers", "mo...
{ "body": "@Override\n public Integer getScore(final Operation operation) {\n if (null == operation) {\n return 0;\n }\n\n // Named operations should use their custom resolver despite implementing Operations\n if (operation instanceof Operations && !(operation instanceof Name...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_205
{ "fields": [ { "declarator": "SCHEMA = new Schema.Builder()\n .type(\"string\", String.class)\n .type(\"type\", Boolean.class)\n .edge(TestGroups.EDGE, new SchemaEdgeDefinition.Builder()\n .source(\"string\")\n .destination(\"string\")\...
{ "body": "@Test\n public void shouldFilterOutInvalidEntity() throws OperationException, SerialisationException {\n // Given\n final PostAggregationFilterProcessor processor = new PostAggregationFilterProcessor(VIEW);\n\n // When / Then\n assertFalse(processor.test(CellUtil.getLazyCell(...
{ "fields": [ { "declarator": "validator", "modifier": "private final", "original_string": "private final ElementValidator validator;", "type": "ElementValidator", "var_name": "validator" } ], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasesto...
{ "body": "@Override\n public boolean test(final LazyElementCell elementCell) {\n return validator.validateAggregation(elementCell.getElement());\n }", "class_method_signature": "PostAggregationFilterProcessor.test(final LazyElementCell elementCell)", "constructor": false, "full_signature": "@Overr...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_481
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/OneOrMoreTest.java", "identifier": "OneOrMoreTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldAddItemsWithDeduplicate() {\n // Given\n final boolean deduplicate = true;\n final OneOrMore<Integer> collection = new OneOrMore<>(deduplicate);\n final Set<Integer> expectedItems = new HashSet<>();\n IntStream.rangeClosed(1, 200).forEach(expe...
{ "fields": [ { "declarator": "newCollection", "modifier": "private final", "original_string": "private final Function<T, Collection<T>> newCollection;", "type": "Function<T, Collection<T>>", "var_name": "newCollection" }, { "declarator": "deduplicate", "modifier"...
{ "body": "public boolean add(final T item) {\n if (null == collection) {\n if (null == singleItem) {\n singleItem = item;\n return true;\n }\n\n if (deduplicate && singleItem.equals(item)) {\n return false;\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_878
{ "fields": [ { "declarator": "cache = new NamedOperationCache()", "modifier": "private final", "original_string": "private final NamedOperationCache cache = new NamedOperationCache();", "type": "NamedOperationCache", "var_name": "cache" }, { "declarator": "addNamedOper...
{ "body": "@Test\n public void shouldReturnNamedOperationWithInputType() throws Exception {\n // Given\n AddNamedOperation addNamedOperation = new AddNamedOperation.Builder()\n .name(expectedOperationDetailWithInputType.getOperationName())\n .description(expectedOperatio...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedOperationCache cache;", "type": "NamedOperationCache", "var_name": "cache" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/named/GetAll...
{ "body": "@Override\n public CloseableIterable<NamedOperationDetail> doOperation(final GetAllNamedOperations operation, final Context context, final Store store) throws OperationException {\n final CloseableIterable<NamedOperationDetail> ops = cache.getAllNamedOperations(context.getUser(), store.getPropert...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1153
{ "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 shouldDeserialiseFromJsonUsingDirectedTrueField() {\n // Given\n final String json = \"{\\\"class\\\": \\\"uk.gov.gchq.gaffer.operation.data.EdgeSeed\\\", \\\"directed\\\": true}\";\n\n // When\n final EdgeSeed deserialisedEdgeSeed = fromJson(json.getBytes...
{ "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_897
{ "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 shouldNotBeAbleToModifyGroupByOnceBuilt() {\n // Given\n final T elementDef = createBuilder()\n .property(\"property\", PROPERTY_STRING_TYPE)\n .build();\n\n // When / Then\n try {\n elementDef.getGroupBy().add(\"pr...
{ "fields": [ { "declarator": "elementDefValidator", "modifier": "private final", "original_string": "private final SchemaElementDefinitionValidator elementDefValidator;", "type": "SchemaElementDefinitionValidator", "var_name": "elementDefValidator" }, { "declarator": "...
{ "body": "public Set<String> getGroupBy() {\n return groupBy;\n }", "class_method_signature": "SchemaElementDefinition.getGroupBy()", "constructor": false, "full_signature": "public Set<String> getGroupBy()", "identifier": "getGroupBy", "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_1016
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/ordered/OrderedDateSerialiserTest.java", "identifier": "OrderedDateSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<Date>" }
{ "body": "@Test\n public void canSerialiseDateClass() {\n assertTrue(serialiser.canHandle(Date.class));\n }", "class_method_signature": "OrderedDateSerialiserTest.canSerialiseDateClass()", "constructor": false, "full_signature": "@Test public void canSerialiseDateClass()", "identifier": "canSeri...
{ "fields": [ { "declarator": "serialVersionUID = 6636121009320739764L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6636121009320739764L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "LONG_...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Date.class.equals(clazz);\n }", "class_method_signature": "OrderedDateSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Class clazz)", "identifie...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_194
{ "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 shouldOnlyAcceptEdges() throws OperationException, SerialisationException {\n // Given\n final ElementDedupeFilterProcessor processor = new ElementDedupeFilterProcessor(false, true, DirectedType.EITHER);\n\n // When / Then\n for (final Element element : EL...
{ "fields": [ { "declarator": "elementSerialisation = new ElementSerialisation(null)", "modifier": "private final", "original_string": "private final ElementSerialisation elementSerialisation = new ElementSerialisation(null);", "type": "ElementSerialisation", "var_name": "elementSeri...
{ "body": "@Override\n public boolean test(final LazyElementCell elementCell) {\n final Cell cell = elementCell.getCell();\n final byte flag = getFlag(cell);\n final boolean isEdge = flag != HBaseStoreConstants.ENTITY;\n\n if (!edges && isEdge) {\n return false;\n }\n\...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1295
{ "fields": [], "file": "library/flink-library/src/test/java/uk/gov/gchq/gaffer/flink/operation/handler/GafferSinkTest.java", "identifier": "GafferSinkTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDelegateOpenToGafferAddedInitialise() throws Exception {\n // Given\n final GafferAdder adder = mock(GafferAdder.class);\n final GafferSink sink = new GafferSink(adder);\n\n // When\n sink.open(null);\n\n // Then\n verify(adder)....
{ "fields": [ { "declarator": "serialVersionUID = 1569145256866410621L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1569145256866410621L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "adder...
{ "body": "@Override\n public void open(final Configuration parameters) throws Exception {\n super.open(parameters);\n adder.initialise();\n }", "class_method_signature": "GafferSink.open(final Configuration parameters)", "constructor": false, "full_signature": "@Override public void open(fi...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_317
{ "fields": [ { "declarator": "TEST_VIEW_NAME = \"testViewName\"", "modifier": "private static final", "original_string": "private static final String TEST_VIEW_NAME = \"testViewName\";", "type": "String", "var_name": "TEST_VIEW_NAME" }, { "declarator": "TEST_PARAM_KEY ...
{ "body": "@Test\n public void shouldNotExpandGlobalDefinitions() {\n // Given\n final GlobalViewElementDefinition globalDef = mock(GlobalViewElementDefinition.class);\n final NamedView view = new NamedView.Builder()\n .name(\"name\")\n .globalElements(globalDef)\...
{ "fields": [ { "declarator": "name", "modifier": "@Required\n private", "original_string": "@Required\n private String name;", "type": "String", "var_name": "name" }, { "declarator": "parameters", "modifier": "private", "original_string": "private Map...
{ "body": "@Override\n public void expandGlobalDefinitions() {\n // As it is a named view - we should not expand the global definitions.\n // It should only be expanded after the named view is resolved.\n }", "class_method_signature": "NamedView.expandGlobalDefinitions()", "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_747
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/WhileHandlerTest.java", "identifier": "WhileHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowExceptionWhenPredicateCannotAcceptInputType() throws OperationException {\n // Given\n final Predicate predicate = new IsFalse();\n final Object input = new EntitySeed();\n final Conditional conditional = new Conditional(predicate);\n fin...
{ "fields": [ { "declarator": "maxRepeats = While.MAX_REPEATS", "modifier": "private", "original_string": "private int maxRepeats = While.MAX_REPEATS;", "type": "int", "var_name": "maxRepeats" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/W...
{ "body": "@Override\n public Object doOperation(final While operation,\n final Context context,\n final Store store) throws OperationException {\n validateMaxRepeats(operation);\n\n Object input = operation.getInput();\n for (int repea...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_252
{ "fields": [], "file": "rest-api/core-rest/src/test/java/uk/gov/gchq/gaffer/rest/serialisation/TextMessageBodyWriterTest.java", "identifier": "TextMessageBodyWriterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldHandleAllObjectTypes() {\n // Given\n final TextMessageBodyWriter writer = new TextMessageBodyWriter();\n\n // When / Then\n assertTrue(writer.isWriteable(null, null, null, null));\n assertTrue(writer.isWriteable(String.class, null, null, null...
{ "fields": [], "file": "rest-api/core-rest/src/main/java/uk/gov/gchq/gaffer/rest/serialisation/TextMessageBodyWriter.java", "identifier": "TextMessageBodyWriter", "interfaces": "implements MessageBodyWriter<Object>", "methods": [ { "class_method_signature": "TextMessageBodyWriter.isWriteable(final ...
{ "body": "@Override\n public boolean isWriteable(final Class<?> type, final Type genericType,\n final Annotation[] annotations, final MediaType mediaType) {\n\n return true;\n }", "class_method_signature": "TextMessageBodyWriter.isWriteable(final Class<?> type, final Type...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_602
{ "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 testPreserveObjectOrdering() throws SerialisationException {\n assertEquals(true, serialiser.preservesObjectOrdering());\n }", "class_method_signature": "EdgeIdSerialiserTest.testPreserveObjectOrdering()", "constructor": false, "full_signature": "@Test public void tes...
{ "fields": [ { "declarator": "serialVersionUID = -7123572023129773512L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -7123572023129773512L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "boo...
{ "body": "@Override\n public boolean preservesObjectOrdering() {\n return null != vertexSerialiser && vertexSerialiser.preservesObjectOrdering();\n }", "class_method_signature": "EdgeIdSerialiser.preservesObjectOrdering()", "constructor": false, "full_signature": "@Override public boolean preserve...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_25
{ "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 shouldUpdateAddElementsInput() {\n // Given\n final Graph graph = createGraph();\n final AddElements operation = new AddElements.Builder()\n .input(new Entity.Builder()\n .group(TestGroups.ENTITY)\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_946
{ "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 shouldReturnFalseWhenSchemaHasAggregationDisabled() {\n final Schema schemaNoAggregators = new Schema.Builder().entity(TestGroups.ENTITY,\n new SchemaEntityDefinition.Builder().aggregate(false).build()).build();\n asser...
{ "fields": [ { "declarator": "unknownType = new TypeDefinition()", "modifier": "private final", "original_string": "private final TypeDefinition unknownType = new TypeDefinition();", "type": "TypeDefinition", "var_name": "unknownType" }, { "declarator": "id", "mo...
{ "body": "@JsonIgnore\n public boolean isAggregationEnabled() {\n boolean isEnabled = false;\n\n for (final Entry<String, ? extends SchemaElementDefinition> entry : getElementDefinitions()) {\n if (null != entry.getValue() && entry.getValue().isAggregate()) {\n isEnabled = ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_415
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ExtractPropertyTest.java", "identifier": "ExtractPropertyTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldReturnValueOfProperty() {\n final Element element = mock(Element.class);\n final String propName = \"presentProperty\";\n final int propValue = 3;\n final ExtractProperty extractor = new ExtractProperty(propName);\n\n given(element.getProperty...
{ "fields": [ { "declarator": "name", "modifier": "private", "original_string": "private String name;", "type": "String", "var_name": "name" } ], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/function/ExtractProperty.java", "identifier": "ExtractProperty"...
{ "body": "@Override\n public Object apply(final Element element) {\n return null != element ? element.getProperty(name) : null;\n }", "class_method_signature": "ExtractProperty.apply(final Element element)", "constructor": false, "full_signature": "@Override public Object apply(final Element eleme...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_550
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/iterable/ConsumableBlockingQueueTest.java", "identifier": "ConsumableBlockingQueueTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldBlockOnAdditionWhenQueueIsFull() throws InterruptedException {\n // Given\n final ConsumableBlockingQueue<Integer> queue = new ConsumableBlockingQueue<>(5);\n\n final boolean[] finishedAdding = new boolean[] {false};\n new Thread(() -> {\n ...
{ "fields": [ { "declarator": "serialVersionUID = 4048319404021495269L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 4048319404021495269L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/common-util/...
{ "body": "@Override\n @Nonnull\n public Iterator<T> iterator() {\n return new Iterator<T>() {\n @Override\n public boolean hasNext() {\n return !isEmpty();\n }\n\n @Override\n public T next() {\n if (!hasNext()) {\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_100
{ "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 shouldThrowExceptionIfGraphIdAndTableNameAreProvidedAndDifferent() throws StoreException {\n // Given\n final AccumuloProperties properties = PROPERTIES.clone();\n properties.setTable(\"tableName\");\n final AccumuloStore store = new AccumuloStore();\n\n ...
{ "fields": [ { "declarator": "TRAITS =\n Collections.unmodifiableSet(Sets.newHashSet(\n ORDERED,\n VISIBILITY,\n INGEST_AGGREGATION,\n QUERY_AGGREGATION,\n PRE_AGGREGATION_FILTERING,\n ...
{ "body": "@Override\n public void initialise(final String graphId, final Schema schema, final StoreProperties properties) throws StoreException {\n preInitialise(graphId, schema, properties);\n TableUtils.ensureTableExists(this);\n }", "class_method_signature": "AccumuloStore.initialise(final S...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1082
{ "fields": [ { "declarator": "JSON_PATH = \"/functionAuthoriser.json\"", "modifier": "private static final", "original_string": "private static final String JSON_PATH = \"/functionAuthoriser.json\";", "type": "String", "var_name": "JSON_PATH" } ], "file": "core/graph/src/tes...
{ "body": "@Test\n public void shouldNotErrorIfFirstOperationIsNotInput() {\n // Given\n OperationChain chain = new OperationChain.Builder()\n .first(new GetAllElements()).build();\n\n // When\n FunctionAuthoriser authoriser = new FunctionAuthoriser(Lists.newArrayList(Ide...
{ "fields": [ { "declarator": "ERROR_MESSAGE_PREFIX = \"Operation chain contained an unauthorised function: \"", "modifier": "private static final", "original_string": "private static final String ERROR_MESSAGE_PREFIX = \"Operation chain contained an unauthorised function: \";", "type": "S...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n if (unauthorisedFunctions == null || unauthorisedFunctions.isEmpty()) {\n return;\n }\n\n Object input = null;\n // Null the input to avoid serialising potentially large ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_803
{ "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 shouldFilterBasedOnAdjacentMatchedVertex() throws OperationException {\n // Given\n final Schema schema = new Schema.Builder()\n .edge(TestGroups.EDGE, new SchemaEdgeDefinition.Builder()\n .source(\"vertex\")\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" ...