id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
47973088_1128
{ "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 shouldHandleIfOperationWithNoConditionalOrOtherwise() 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_229
{ "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 shouldGetSerialisedFieldsForGetElementsClass() {\n // When\n final Set<String> fields = (Set<String>) service.getSerialisedFields(GetElements.class.getName()).getEntity();\n\n final Set<String> expectedFields = new HashSet<>();\n expectedFields.add(\"input...
{ "fields": [ { "declarator": "graphFactory", "modifier": "@Inject\n private", "original_string": "@Inject\n private GraphFactory graphFactory;", "type": "GraphFactory", "var_name": "graphFactory" }, { "declarator": "userFactory", "modifier": "@Inject\n p...
{ "body": "@SuppressFBWarnings(value = \"REC_CATCH_EXCEPTION\", justification = \"Need to wrap all runtime exceptions before they are given to the user\")\n @Override\n public Response getSerialisedFields(final String className) {\n final Class<?> clazz;\n try {\n clazz = Class.forName(...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_679
{ "fields": [ { "declarator": "store = mock(Store.class)", "modifier": "private final", "original_string": "private final Store store = mock(Store.class);", "type": "Store", "var_name": "store" }, { "declarator": "context = new Context(new User())", "modifier": "p...
{ "body": "@Test\n public void shouldReturnValidationResultWithErrorsIfOperationChainInvalid() throws OperationException {\n // Given\n final AddElementsFromSocket addElementsFromSocket = new AddElementsFromSocket();\n\n OperationChain chain = new OperationChain.Builder().first(addElementsFrom...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/ValidateOperationChainHandler.java", "identifier": "ValidateOperationChainHandler", "interfaces": "implements OutputOperationHandler<ValidateOperationChain, ValidationResult>", "methods": [ { "class_method_s...
{ "body": "@Override\n public ValidationResult doOperation(final ValidateOperationChain operation, final Context context, final Store store) throws OperationException {\n return validateOperationChain(operation.getOperationChain(), context.getUser(), store);\n }", "class_method_signature": "ValidateOpe...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_383
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/comparison/ElementPropertyComparatorTest.java", "identifier": "ElementPropertyComparatorTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<ElementPropertyComparator>" }
{ "body": "@Test\n public void shouldCompareWithNoProvidedComparatorInstance() {\n // Given\n final Entity smallEntity = makeEntityWithPropertyValueAsPrimitiveInt(1);\n final Entity largeEntity = makeEntityWithPropertyValueAsPrimitiveInt(2);\n\n final ElementPropertyComparator comparato...
{ "fields": [ { "declarator": "comparator", "modifier": "private", "original_string": "private Comparator comparator;", "type": "Comparator", "var_name": "comparator" }, { "declarator": "count = 0", "modifier": "public static", "original_string": "public sta...
{ "body": "@Override\n public int compare(final Element e1, final Element e2) {\n count++;\n\n if (null == e1) {\n if (null == e2) {\n return 0;\n }\n return 1;\n }\n if (null == e2) {\n return -1;\n }\n\n if (!gro...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1201
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/generate/GenerateElementsTest.java", "identifier": "GenerateElementsTest", "interfaces": "", "superclass": "extends OperationTest<GenerateElements>" }
{ "body": "@Test\n @Override\n public void builderShouldCreatePopulatedOperation() {\n GenerateElements<?> generateElements = new GenerateElements.Builder<String>()\n .generator(new ElementGeneratorImpl())\n .input(\"Test1\", \"Test2\")\n .build();\n It...
{ "fields": [ { "declarator": "elementGenerator", "modifier": "@Required\n private", "original_string": "@Required\n private Function<Iterable<? extends OBJ>, Iterable<? extends Element>> elementGenerator;", "type": "Function<Iterable<? extends OBJ>, Iterable<? extends Element>>", ...
{ "body": "@Override\n public Iterable<? extends OBJ> getInput() {\n return input;\n }", "class_method_signature": "GenerateElements.getInput()", "constructor": false, "full_signature": "@Override public Iterable<? extends OBJ> getInput()", "identifier": "getInput", "invocations": [], "modifi...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1344
{ "fields": [], "file": "library/spark/spark-accumulo-library/src/test/java/uk/gov/gchq/gaffer/sparkaccumulo/operation/utils/AccumuloKeyRangePartitionerTest.java", "identifier": "AccumuloKeyRangePartitionerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetSplitsInOrder() throws Exception {\n // Given\n final AccumuloStore store = mock(AccumuloStore.class);\n final Connector connector = mock(ConnectorImpl.class);\n final TableOperations tableOperations = mock(TableOperations.class);\n final S...
{ "fields": [ { "declarator": "serialVersionUID = -5616778533667038166L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -5616778533667038166L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "spl...
{ "body": "public static synchronized String[] getSplits(final AccumuloStore store) throws OperationException {\n final Connector connector;\n try {\n connector = store.getConnection();\n } catch (final StoreException e) {\n throw new OperationException(\"Failed to create ac...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_696
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/compare/MaxHandlerTest.java", "identifier": "MaxHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldFindMaxBasedOnPropertyWithMissingProperty() throws OperationException {\n // Given\n final Entity entity1 = makeEntity(\"property1\", 1);\n final Entity entity2 = makeEntity(\"property1\", 2);\n final Entity entity3 = makeEntity(\"property1\", 3);\n ...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/compare/MaxHandler.java", "identifier": "MaxHandler", "interfaces": "implements OutputOperationHandler<Max, Element>", "methods": [ { "class_method_signature": "MaxHandler.doOperation(final Max operation, fi...
{ "body": "@Override\n public Element doOperation(final Max operation, final Context context, final Store store) throws OperationException {\n // If there is no input or there are no comparators, we return null\n if (null == operation.getInput()\n || null == operation.getComparators()\...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_442
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/EdgeTest.java", "identifier": "EdgeTest", "interfaces": "", "superclass": "extends ElementTest" }
{ "body": "@Test\n public void shouldCloneEdge() {\n // Given\n final String source = \"source vertex\";\n final String destination = \"dest vertex\";\n final boolean directed = true;\n\n // When\n final Edge edge = new Edge.Builder()\n .group(TestGroups.EDG...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Edge.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Edge.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "s...
{ "body": "@Override\n public Edge emptyClone() {\n return new Edge(\n getGroup(),\n getSource(),\n getDestination(),\n isDirected(),\n getMatchedVertex(),\n new Properties()\n );\n }", "class_method_signat...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_911
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/schema/SchemaEntityDefinitionTest.java", "identifier": "SchemaEntityDefinitionTest", "interfaces": "", "superclass": "extends SchemaElementDefinitionTest<SchemaEntityDefinition>" }
{ "body": "@Test\n public void shouldBuildEntityDefinition() {\n // When\n final SchemaEntityDefinition elementDef = createBuilder().build();\n setupSchema(elementDef);\n\n // Then\n assertEquals(1, elementDef.getIdentifiers().size());\n assertEquals(\"id.integer\", elemen...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/schema/SchemaEntityDefinition.java", "identifier": "SchemaEntityDefinition", "interfaces": "", "methods": [ { "class_method_signature": "SchemaEntityDefinition.getVertex()", "constructor": false, "full_signature":...
{ "body": "public String getVertex() {\n return getIdentifierTypeName(IdentifierType.VERTEX);\n }", "class_method_signature": "SchemaEntityDefinition.getVertex()", "constructor": false, "full_signature": "public String getVertex()", "identifier": "getVertex", "invocations": [ "getIdentifierTyp...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1190
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/GetWalksTest.java", "identifier": "GetWalksTest", "interfaces": "", "superclass": "extends OperationTest<GetWalks>" }
{ "body": "@Test\n public void shouldFailValidationWithNoHops() {\n // Given\n final GetWalks operation = getTestObject();\n\n // When\n ValidationResult result = operation.validate();\n Set<String> expectedErrors = Sets.newHashSet(\"No...
{ "fields": [ { "declarator": "HOP_DEFINITION = \"A hop is a GetElements operation that selects at least 1 edge group.\"", "modifier": "public static final", "original_string": "public static final String HOP_DEFINITION = \"A hop is a GetElements operation that selects at least 1 edge group.\";"...
{ "body": "@Override\n public ValidationResult validate() {\n final ValidationResult result = InputOutput.super.validate();\n\n final int getEdgeOperations = getNumberOfGetEdgeOperations();\n\n if (getEdgeOperations < 1) {\n result.addError(\"No hops were provided. \" + HOP_DEFINITI...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_854
{ "fields": [ { "declarator": "namedViewCache = new NamedViewCache()", "modifier": "private final", "original_string": "private final NamedViewCache namedViewCache = new NamedViewCache();", "type": "NamedViewCache", "var_name": "namedViewCache" }, { "declarator": "addNa...
{ "body": "@Test\n public void shouldGetAllAccessibleNamedViewsFromCache() throws OperationException {\n // Given\n initialiseCache();\n final NamedViewDetail namedViewAsDetail = new NamedViewDetail.Builder()\n .name(testNamedViewName)\n .view(view)\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/GetAllNamedViews...
{ "body": "@Override\n public CloseableIterable<NamedViewDetail> doOperation(final GetAllNamedViews operation, final Context context, final Store store) throws OperationException {\n try {\n return cache.getAllNamedViews(context.getUser());\n } catch (final CacheOperationFailedException e)...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_157
{ "fields": [], "file": "store-implementation/hbase-store/src/test/java/uk/gov/gchq/gaffer/hbasestore/HBasePropertiesTest.java", "identifier": "HBasePropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldMergeHBaseJsonModules() {\n // Given\n final HBaseProperties props = new HBaseProperties();\n props.setJsonSerialiserModules(TestCustomJsonModules1.class.getName() + \",\" + TestCustomJsonModules2.class.getName());\n\n // When\n final String m...
{ "fields": [ { "declarator": "ZOOKEEPERS = \"hbase.zookeepers\"", "modifier": "public static final", "original_string": "public static final String ZOOKEEPERS = \"hbase.zookeepers\";", "type": "String", "var_name": "ZOOKEEPERS" }, { "declarator": "TABLE = \"hbase.table...
{ "body": "@Override\n public String getJsonSerialiserModules() {\n return new StringDeduplicateConcat().apply(\n SketchesJsonModules.class.getName(),\n super.getJsonSerialiserModules()\n );\n }", "class_method_signature": "HBaseProperties.getJsonSerialiserModules()...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_507
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/CollectionUtilTest.java", "identifier": "CollectionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConvertMapToStringKeysWithProvidedMap() {\n // Given\n final Map<Class<? extends Number>, String> map = new HashMap<>();\n populateClassKeyMap(map);\n\n final Map<String, String> result = new LinkedHashMap<>();\n\n // When\n CollectionU...
{ "fields": [], "file": "core/common-util/src/main/java/uk/gov/gchq/gaffer/commonutil/CollectionUtil.java", "identifier": "CollectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtil.CollectionUtil()", "constructor": true, "full_signature": "private Colle...
{ "body": "public static <K, V> void toMapWithStringKeys(final Map<Class<? extends K>, V> map, final Map<String, V> mapAsStrings) {\n for (final Map.Entry<Class<? extends K>, V> entry : map.entrySet()) {\n mapAsStrings.put(\n entry.getKey().getName(),\n entry.ge...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1256
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/named/operation/NamedOperationDetailTest.java", "identifier": "NamedOperationDetailTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldDeserialiseStringOpChain() throws SerialisationException {\n // Given\n String json = \"{\" +\n \" \\\"operationName\\\": \\\"operationName\\\",\" +\n \" \\\"creatorId\\\": \\\"creatorUserId\\\",\" +\n \" \\\"oper...
{ "fields": [ { "declarator": "serialVersionUID = -8831783492657131469L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8831783492657131469L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "CHA...
{ "body": "public String getOperations() {\n return operations;\n }", "class_method_signature": "NamedOperationDetail.getOperations()", "constructor": false, "full_signature": "public String getOperations()", "identifier": "getOperations", "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_784
{ "fields": [ { "declarator": "store = mock(Store.class)", "modifier": "private final", "original_string": "private final Store store = mock(Store.class);", "type": "Store", "var_name": "store" }, { "declarator": "context = new Context()", "modifier": "private fin...
{ "body": "@Test\n public void shouldAggregateElementsWhenAggregatorNotProvidedInSchema() throws OperationException {\n // Given\n final Schema schema = new Schema.Builder()\n .entity(TestGroups.ENTITY, new SchemaEntityDefinition.Builder()\n .groupBy(\"timestamp\...
{ "fields": [ { "declarator": "validator = new AggregateValidator()", "modifier": "private final", "original_string": "private final FunctionValidator<Aggregate> validator = new AggregateValidator();", "type": "FunctionValidator<Aggregate>", "var_name": "validator" } ], "file...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final Aggregate operation, final Context context, final Store store) throws OperationException {\n return doOperation(operation, store.getSchema());\n }", "class_method_signature": "AggregateHandler.doOperation(final Aggregate operat...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_291
{ "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 shouldAddGlobalExcludePropertiesToEdgeGroup() {\n // Given\n final View view = new View.Builder()\n .globalEdges(new GlobalViewElementDefinition.Builder()\n .groups(TestGroups.EDGE)\n .excludeProperties(TestPr...
{ "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_1313
{ "fields": [ { "declarator": "LONG_TIME_SERIES_AGGREGATOR\n = new LongTimeSeriesAggregator()", "modifier": "private static final", "original_string": "private static final LongTimeSeriesAggregator LONG_TIME_SERIES_AGGREGATOR\n = new LongTimeSeriesAggregator();", "typ...
{ "body": "@Test\n public void testAggregate() {\n // Given\n final LongTimeSeries timeSeries1 = new LongTimeSeries(CommonTimeUtil.TimeBucket.SECOND);\n timeSeries1.put(Instant.ofEpochMilli(1_000L), 100L);\n timeSeries1.put(Instant.ofEpochMilli(10_000L), 200L);\n final LongTimeSe...
{ "fields": [], "file": "library/time-library/src/main/java/uk/gov/gchq/gaffer/time/binaryoperator/LongTimeSeriesAggregator.java", "identifier": "LongTimeSeriesAggregator", "interfaces": "", "methods": [ { "class_method_signature": "LongTimeSeriesAggregator._apply(final LongTimeSeries a, final LongT...
{ "body": "@Override\n protected LongTimeSeries _apply(final LongTimeSeries a, final LongTimeSeries b) {\n if (!b.getTimeBucket().equals(a.getTimeBucket())) {\n throw new RuntimeException(\"Can't aggregate two LongTimeSeries with different time buckets: \"\n + \"a had bucket \"...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1186
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/compare/SortTest.java", "identifier": "SortTest", "interfaces": "", "superclass": "extends OperationTest<Sort>" }
{ "body": "@Test\n @Override\n public void builderShouldCreatePopulatedOperation() {\n // Given\n final Sort sort = new Builder().input(new Entity.Builder()\n .group(TestGroups.ENTITY)\n .property(\"property\", 1)\n .build(), new Entity.Builder()\n ...
{ "fields": [ { "declarator": "input", "modifier": "private", "original_string": "private Iterable<? extends Element> input;", "type": "Iterable<? extends Element>", "var_name": "input" }, { "declarator": "comparators", "modifier": "@Required\n private", ...
{ "body": "@Override\n public Iterable<? extends Element> getInput() {\n return input;\n }", "class_method_signature": "Sort.getInput()", "constructor": false, "full_signature": "@Override public Iterable<? extends Element> getInput()", "identifier": "getInput", "invocations": [], "modifiers"...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_907
{ "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 shouldReturnQueryAggregatorWithViewAggregatorAndMultipleAgg() {\n // Given\n final T elementDef = createBuilder()\n .property(\"property1\", PROPERTY_STRING_TYPE)\n .property(\"property2\", PROPERTY_STRING_TYPE)\n .property(\...
{ "fields": [ { "declarator": "elementDefValidator", "modifier": "private final", "original_string": "private final SchemaElementDefinitionValidator elementDefValidator;", "type": "SchemaElementDefinitionValidator", "var_name": "elementDefValidator" }, { "declarator": "...
{ "body": "@JsonIgnore\n public ElementAggregator getQueryAggregator(final Set<String> viewGroupBy, final ElementAggregator viewAggregator) {\n if (null == viewAggregator) {\n return getQueryAggregatorForNullViewAggregator(viewGroupBy);\n }\n return getQueryAggregatorForNonNullViewA...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_454
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/FieldUtilTest.java", "identifier": "FieldUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNotNullField() {\n final Pair nonNullPair = new Pair(\"Test\", \"Test\");\n\n final ValidationResult validationResult = FieldUtil.validateRequiredFields(nonNullPair);\n\n final Set<String> expected = new LinkedHashSet<>();\n assertEquals(expected, vali...
{ "fields": [], "file": "core/common-util/src/main/java/uk/gov/gchq/gaffer/commonutil/FieldUtil.java", "identifier": "FieldUtil", "interfaces": "", "methods": [ { "class_method_signature": "FieldUtil.FieldUtil()", "constructor": true, "full_signature": "private FieldUtil()", "iden...
{ "body": "@SafeVarargs\n public static ValidationResult validateRequiredFields(final Pair<String, Object>... fields) {\n final ValidationResult validationResult = new ValidationResult();\n for (final Pair field : fields) {\n if (null == field.getSecond()) {\n validationResu...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_511
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/CollectionUtilTest.java", "identifier": "CollectionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFalseWhenCollectionDoesNotContainsAProvidedValue() {\n // Given\n final Collection<Integer> collection = Sets.newHashSet(10, 20, 30);\n final Object[] values = new Object[] {1, 2, 3};\n\n // When\n final boolean result = CollectionUtil.c...
{ "fields": [], "file": "core/common-util/src/main/java/uk/gov/gchq/gaffer/commonutil/CollectionUtil.java", "identifier": "CollectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtil.CollectionUtil()", "constructor": true, "full_signature": "private Colle...
{ "body": "public static boolean containsAny(final Collection collection, final Object[] objects) {\n boolean result = false;\n if (null != collection && null != objects) {\n for (final Object object : objects) {\n if (collection.contains(object)) {\n result ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_141
{ "fields": [ { "declarator": "SCHEMA = Schema.fromJson(StreamUtil.schemas(AccumuloAddElementsFromHdfsJobFactoryTest.class))", "modifier": "private static final", "original_string": "private static final Schema SCHEMA = Schema.fromJson(StreamUtil.schemas(AccumuloAddElementsFromHdfsJobFactoryTest...
{ "body": "@Test\n public void shouldSetNumberOfReducersBetweenMinAndMaxSpecified() throws IOException, StoreException, OperationException {\n // Given\n store.initialise(\"graphId\", SCHEMA, PROPERTIES);\n final JobConf localConf = createLocalConf();\n final FileSystem fs = FileSystem....
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AccumuloAddElementsFromHdfsJobFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AccumuloAddElementsFromHdfsJobFactory.class);", "type": "Logge...
{ "body": "@Override\n public void setupJob(final Job job, final AddElementsFromHdfs operation, final String mapperGenerator, final Store store) throws IOException {\n job.setJarByClass(getClass());\n job.setJobName(getJobName(mapperGenerator, operation.getOutputPath()));\n\n setupMapper(job);...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_842
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToListHandlerTest.java", "identifier": "ToListHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldHandleNullInput() throws OperationException {\n // Given\n final ToListHandler handler = new ToListHandler();\n final ToList<Integer> operation = mock(ToList.class);\n\n given(operation.getInput()).willReturn(null);\n\n //When\n final I...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToListHandler.java", "identifier": "ToListHandler", "interfaces": "implements OutputOperationHandler<ToList<T>, List<? extends T>>", "methods": [ { "class_method_signature": "ToListHandler.doOperation...
{ "body": "@Override\n public List<T> doOperation(final ToList<T> operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getInput()) {\n return null;\n }\n\n return Streams.toStream(operation.getInput())\n .colle...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1169
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/function/FromElementIdTest.java", "identifier": "FromElementIdTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldUnwrapIfInputIsAnEntitySeed() {\n // Given\n final EntitySeed input = new EntitySeed(\"item\");\n final FromElementId function = new FromElementId();\n\n // When\n final Object output = function.apply(input);\n\n // Then\n assert...
{ "fields": [], "file": "core/operation/src/main/java/uk/gov/gchq/gaffer/operation/function/FromElementId.java", "identifier": "FromElementId", "interfaces": "", "methods": [ { "class_method_signature": "FromElementId.apply(final ElementId e)", "constructor": false, "full_signature": "@O...
{ "body": "@Override\n public Object apply(final ElementId e) {\n if (null == e) {\n return null;\n }\n return e instanceof EntityId ? ((EntityId) e).getVertex() : e;\n }", "class_method_signature": "FromElementId.apply(final ElementId e)", "constructor": false, "full_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_268
{ "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 shouldReturnTrueWhenViewHasPreAggEdgeFilters() {\n // Given\n final View view = new View.Builder()\n .entity(TestGroups.ENTITY)\n .edge(TestGroups.EDGE, new ViewElementDefinition.Builder()\n .preAggregationFilter(new ...
{ "fields": [ { "declarator": "globalElements", "modifier": "private", "original_string": "private List<GlobalViewElementDefinition> globalElements;", "type": "List<GlobalViewElementDefinition>", "var_name": "globalElements" }, { "declarator": "globalEntities", "m...
{ "body": "public boolean hasPreAggregationFilters() {\n return hasFilters(ViewElementDefinition::hasPreAggregationFilters);\n }", "class_method_signature": "View.hasPreAggregationFilters()", "constructor": false, "full_signature": "public boolean hasPreAggregationFilters()", "identifier": "hasPreAg...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_792
{ "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 shouldFilterInputBasedOnGroupAndCount() throws OperationException {\n // Given\n given(store.getSchema()).willReturn(SCHEMA);\n\n final Edge edge = new Edge.Builder()\n .group(TestGroups.EDGE)\n .source(\"junctionA\")\n ...
{ "fields": [ { "declarator": "validator = new FilterValidator()", "modifier": "private final", "original_string": "private final FunctionValidator<Filter> validator = new FilterValidator();", "type": "FunctionValidator<Filter>", "var_name": "validator" } ], "file": "core/sto...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final Filter operation, final Context context, final Store store) throws OperationException {\n return doOperation(operation, store.getSchema());\n }", "class_method_signature": "FilterHandler.doOperation(final Filter operation, fina...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_638
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/SerialisationFactoryTest.java", "identifier": "SerialisationFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowExceptionIfNoSerialiserFound() throws SerialisationException {\n // Given\n final SerialisationFactory factory = new SerialisationFactory();\n final Class<?> clazz = Object.class;\n\n // When / Then\n try {\n factory.getSeriali...
{ "fields": [ { "declarator": "serialisers", "modifier": "private final", "original_string": "private final List<Serialiser> serialisers;", "type": "List<Serialiser>", "var_name": "serialisers" }, { "declarator": "LAST_RESORT_FINALISER = new JavaSerialiser()", "mo...
{ "body": "public Serialiser getSerialiser(final Class<?> objClass) {\n return getSerialiser(objClass, false, false);\n }", "class_method_signature": "SerialisationFactory.getSerialiser(final Class<?> objClass)", "constructor": false, "full_signature": "public Serialiser getSerialiser(final Class<?> o...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1240
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/OperationChainTest.java", "identifier": "OperationChainTest", "interfaces": "", "superclass": "extends OperationsTest<OperationChain>" }
{ "body": "@Test\n public void shouldSerialiseAndDeserialiseOperationChain() throws SerialisationException {\n // Given\n final OperationChain opChain = new Builder()\n .first(new OperationImpl())\n .then(new OperationImpl())\n .build();\n\n // When...
{ "fields": [ { "declarator": "operations", "modifier": "private", "original_string": "private List<Operation> operations;", "type": "List<Operation>", "var_name": "operations" }, { "declarator": "options", "modifier": "private", "original_string": "private ...
{ "body": "@Override\n @JsonIgnore\n public List<Operation> getOperations() {\n return operations;\n }", "class_method_signature": "OperationChain.getOperations()", "constructor": false, "full_signature": "@Override @JsonIgnore public List<Operation> getOperations()", "identifier": "getOperati...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1305
{ "fields": [], "file": "library/time-library/src/test/java/uk/gov/gchq/gaffer/time/LongTimeSeriesTest.java", "identifier": "LongTimeSeriesTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<LongTimeSeries>" }
{ "body": "@Test\n public void testHashcode() {\n // Given\n final LongTimeSeries timeSeries1 = new LongTimeSeries(TimeBucket.MINUTE);\n timeSeries1.upsert(Instant.ofEpochMilli(1000L), 1000L);\n timeSeries1.upsert(Instant.ofEpochMilli(10000L), 10000L);\n final int hashCode1 = tim...
{ "fields": [ { "declarator": "VALID_TIME_BUCKETS = Sets.newHashSet(\n MILLISECOND,\n SECOND,\n MINUTE,\n HOUR,\n DAY,\n WEEK,\n MONTH,\n YEAR\n )", "modifier": "private static final", "original_string": "...
{ "body": "@Override\n public int hashCode() {\n return new HashCodeBuilder(21, 3)\n .append(timeBucket)\n .append(timeSeries)\n .toHashCode();\n }", "class_method_signature": "LongTimeSeries.hashCode()", "constructor": false, "full_signature": "@Overrid...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_287
{ "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 shouldAddGlobalPropertiesToEdgeGroup() {\n // Given\n final View view = new View.Builder()\n .globalEdges(new GlobalViewElementDefinition.Builder()\n .groups(TestGroups.EDGE)\n .properties(TestPropertyNames.PR...
{ "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_403
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ElementAggregatorTest.java", "identifier": "ElementAggregatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldAggregateElementUsingLambdaBinaryOperator() {\n // Given\n final String propertyReference = \"reference1\";\n\n final BinaryOperator<String> function = (a, b) -> a + \",\" + b;\n final ElementAggregator aggregator = new ElementAggregator.Builder()\n ...
{ "fields": [ { "declarator": "stateTuple = new PropertiesTuple()", "modifier": "private final", "original_string": "private final PropertiesTuple stateTuple = new PropertiesTuple();", "type": "PropertiesTuple", "var_name": "stateTuple" }, { "declarator": "propertiesTup...
{ "body": "public Element apply(final Element state, final Element element) {\n if (null == state) {\n return element;\n }\n\n apply(state.getProperties(), element.getProperties());\n return state;\n }", "class_method_signature": "ElementAggregator.apply(final Element state...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_950
{ "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 shouldReturnTrueWhenSchemaHasValidatorEntityFilters() {\n // Given\n final Schema schema = new Schema.Builder()\n .entity(TestGroups.ENTITY, new SchemaEntityDefinition.Builder()\n ...
{ "fields": [ { "declarator": "unknownType = new TypeDefinition()", "modifier": "private final", "original_string": "private final TypeDefinition unknownType = new TypeDefinition();", "type": "TypeDefinition", "var_name": "unknownType" }, { "declarator": "id", "mo...
{ "body": "public boolean hasValidation() {\n for (final SchemaElementDefinition elementDef : new ChainedIterable<SchemaElementDefinition>(getEntities().values(), getEdges().values())) {\n if (null != elementDef) {\n if (elementDef.hasValidation()) {\n return true;\...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_815
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToEntitySeedsHandlerTest.java", "identifier": "ToEntitySeedsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldBeAbleToIterableOverTheResultsMultipleTimes() throws OperationException {\n // Given\n final Object vertex1 = \"vertex1\";\n final Object vertex2 = \"vertex2\";\n\n final Iterable originalResults = new WrappedCloseableIterable<>(Arrays.asList(vertex1...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToEntitySeedsHandler.java", "identifier": "ToEntitySeedsHandler", "interfaces": "implements OutputOperationHandler<ToEntitySeeds, Iterable<? extends EntitySeed>>", "methods": [ { "class_method_signatu...
{ "body": "@Override\n public Iterable<EntitySeed> doOperation(final ToEntitySeeds operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getInput()) {\n return null;\n }\n\n return new StreamMapIterable<>(\n operation...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1094
{ "fields": [ { "declarator": "OP_CHAIN_LIMITER_PATH = \"opChainLimiter.json\"", "modifier": "private static final", "original_string": "private static final String OP_CHAIN_LIMITER_PATH = \"opChainLimiter.json\";", "type": "String", "var_name": "OP_CHAIN_LIMITER_PATH" } ], "...
{ "body": "@Test\n public void shouldAcceptOperationChainWhenUserHasAuthScoreEqualToChainScore() {\n // Given\n final OperationChainLimiter hook = fromJson(OP_CHAIN_LIMITER_PATH);\n final OperationChain opChain = new OperationChain.Builder()\n .first(new GetAdjacentIds())\n ...
{ "fields": [ { "declarator": "scorer = new ScoreOperationChainHandler()", "modifier": "private", "original_string": "private ScoreOperationChainHandler scorer = new ScoreOperationChainHandler();", "type": "ScoreOperationChainHandler", "var_name": "scorer" } ], "file": "core/...
{ "body": "@Override\n public void preExecute(final OperationChain<?> opChain, final Context context) {\n if (null != opChain) {\n Integer chainScore = scorer.getChainScore(opChain, context.getUser());\n Integer maxAuthScore = scorer.getMaxUserAuthScore(context.getUser().getOpAuths());...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_116
{ "fields": [ { "declarator": "a", "modifier": "private", "original_string": "private byte[] a;", "type": "byte[]", "var_name": "a" }, { "declarator": "b", "modifier": "private", "original_string": "private byte[] b;", "type": "byte[]", "var_name...
{ "body": "@Test\n public void shouldFailWithSameArraysAndMismatchedRange() throws Exception {\n br1 = new BytesAndRange(a, 0, a.length - 1);\n br2 = new BytesAndRange(a, 1, a.length);\n assertFalse(ByteUtils.areKeyBytesEqual(br1, br2));\n }", "class_method_signature": "ByteUtilsTest.shou...
{ "fields": [], "file": "store-implementation/accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/utils/ByteUtils.java", "identifier": "ByteUtils", "interfaces": "", "methods": [ { "class_method_signature": "ByteUtils.ByteUtils()", "constructor": true, "full_signature": "privat...
{ "body": "public static boolean areKeyBytesEqual(final byte[] bytes1, final byte[] bytes2) {\n if (Arrays.equals(bytes1, bytes2)) {\n return true;\n }\n\n int last = bytes1.length;\n\n if (last != bytes2.length) {\n return false;\n }\n\n if (last == 0) ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_546
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/iterable/LimitedInMemorySortedIterableTest.java", "identifier": "LimitedInMemorySortedIterableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotDeduplicateEntries() {\n final LimitedInMemorySortedIterable<Integer> list = new LimitedInMemorySortedIterable<Integer>(Comparator.naturalOrder(), 100, false);\n\n list.add(1);\n list.add(1);\n\n assertEquals(Arrays.asList(1, 1), Lists.newArrayLis...
{ "fields": [ { "declarator": "comparator", "modifier": "private final", "original_string": "private final Comparator<E> comparator;", "type": "Comparator<E>", "var_name": "comparator" }, { "declarator": "deduplicate", "modifier": "private final", "original_...
{ "body": "public boolean add(final E e) {\n boolean result = false;\n\n final OneOrMore<E> values = backingMap.get(e);\n // Skip the item if we are deduplicating and the item already exists\n boolean skipItem = (deduplicate && null != values && values.contains(e));\n if (!skipItem)...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1217
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/get/GetElementsTest.java", "identifier": "GetElementsTest", "interfaces": "", "superclass": "extends OperationTest<GetElements>" }
{ "body": "@Test\n public void shouldSerialiseAndDeserialiseOperationWithElementIds() throws SerialisationException {\n // Given\n final ElementSeed elementSeed1 = new EntitySeed(\"identifier\");\n final ElementSeed elementSeed2 = new EdgeSeed(\"source2\", \"destination2\", true);\n fin...
{ "fields": [ { "declarator": "seedMatching", "modifier": "private", "original_string": "private SeedMatchingType seedMatching;", "type": "SeedMatchingType", "var_name": "seedMatching" }, { "declarator": "view", "modifier": "private", "original_string": "pri...
{ "body": "@Override\n public Iterable<? extends ElementId> getInput() {\n return input;\n }", "class_method_signature": "GetElements.getInput()", "constructor": false, "full_signature": "@Override public Iterable<? extends ElementId> getInput()", "identifier": "getInput", "invocations": [], ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_48
{ "fields": [ { "declarator": "TEST_ENTITY = \"TestEntity\"", "modifier": "public static final", "original_string": "public static final String TEST_ENTITY = \"TestEntity\";", "type": "String", "var_name": "TEST_ENTITY" }, { "declarator": "TEST_GRAPH_ID = \"testGraphId\...
{ "body": "@Test\n public void shouldMergeResultsFromFieldObjectsWithGivenGraphIds() throws Exception {\n // Given\n final OP op = getExampleOperation();\n op.addOption(KEY_OPERATION_OPTIONS_GRAPH_IDS, \"1,3\");\n\n Schema unusedSchema = new Schema.Builder().build();\n StorePrope...
{ "fields": [], "file": "store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/operation/handler/FederatedOperationOutputHandler.java", "identifier": "FederatedOperationOutputHandler", "interfaces": "implements OutputOperationHandler<OP, O>", "methods": [ { "class_meth...
{ "body": "@Override\n public O doOperation(final OP operation, final Context context, final Store store) throws OperationException {\n final Collection<Graph> graphs = ((FederatedStore) store).getGraphs(context.getUser(), operation.getOption(KEY_OPERATION_OPTIONS_GRAPH_IDS), operation);\n final List...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_395
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ElementFilterTest.java", "identifier": "ElementFilterTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<ElementFilter>" }
{ "body": "@Test\n public void shouldTestElementOnInlinePredicate() {\n // Given\n final ElementFilter filter = new ElementFilter.Builder()\n .select(TestPropertyNames.PROP_1)\n .execute(\"value\"::equals)\n .build();\n\n final Entity element1 = mak...
{ "fields": [ { "declarator": "elementTuple = new ElementTuple()", "modifier": "private final", "original_string": "private final ElementTuple elementTuple = new ElementTuple();", "type": "ElementTuple", "var_name": "elementTuple" }, { "declarator": "readOnly", "m...
{ "body": "public boolean test(final Element element) {\n elementTuple.setElement(element);\n return test(elementTuple);\n }", "class_method_signature": "ElementFilter.test(final Element element)", "constructor": false, "full_signature": "public boolean test(final Element element)", "identifi...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_680
{ "fields": [ { "declarator": "GROUP1 = \"GROUP1\"", "modifier": "private static final", "original_string": "private static final String GROUP1 = \"GROUP1\";", "type": "String", "var_name": "GROUP1" }, { "declarator": "GROUP2 = \"GROUP2\"", "modifier": "private st...
{ "body": "@Test\n public void shouldReturnNoCountsIfElementsAreNull() throws OperationException, IOException {\n // Given\n final CountGroupsHandler handler = new CountGroupsHandler();\n final Store store = mock(Store.class);\n final CountGroups countGroups = mock(CountGroups.class);\n...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/CountGroupsHandler.java", "identifier": "CountGroupsHandler", "interfaces": "implements OutputOperationHandler<CountGroups, GroupCounts>", "methods": [ { "class_method_signature": "CountGroupsHandler.doOpera...
{ "body": "@Override\n public GroupCounts doOperation(final CountGroups operation,\n final Context context, final Store store)\n throws OperationException {\n final GroupCounts groupCounts = new GroupCounts();\n try {\n int count = 0;\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1352
{ "fields": [], "file": "library/sketches-library/src/test/java/uk/gov/gchq/gaffer/sketches/datasketches/frequencies/serialisation/StringsSketchSerialiserTest.java", "identifier": "StringsSketchSerialiserTest", "interfaces": "", "superclass": "extends ViaCalculatedValueSerialiserTest<ItemsSketch<String>, Long...
{ "body": "@Test\n public void testCanHandleItemsSketch() {\n assertTrue(serialiser.canHandle(ItemsSketch.class));\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "StringsSketchSerialiserTest.testCanHandleItemsSketch()", "constructor": false, "full_signatur...
{ "fields": [ { "declarator": "serialVersionUID = 5678687223070030982L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5678687223070030982L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "SERIA...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return ItemsSketch.class.equals(clazz);\n }", "class_method_signature": "StringsSketchSerialiser.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_1325
{ "fields": [ { "declarator": "instant", "modifier": "private", "original_string": "private Instant instant;", "type": "Instant", "var_name": "instant" }, { "declarator": "maskTimestampSetByTimeRange = new MaskTimestampSetByTimeRange()", "modifier": "private", ...
{ "body": "@Test\n public void shouldBeAbleToChangeTimeUnit() {\n\n // Given\n final RBMBackedTimestampSet timestampSet = createTimestampSet();\n\n final long instantInDays = instant.toEpochMilli() / 1000 / 60 / 60 / 24;\n\n final MaskTimestampSetByTimeRange mask = new MaskTimestampSetB...
{ "fields": [ { "declarator": "startTime", "modifier": "private", "original_string": "private Long startTime;", "type": "Long", "var_name": "startTime" }, { "declarator": "endTime", "modifier": "private", "original_string": "private Long endTime;", "ty...
{ "body": "@Override\n public RBMBackedTimestampSet apply(final RBMBackedTimestampSet rbmBackedTimestampSet) {\n RBMBackedTimestampSet cloned = rbmBackedTimestampSet.getShallowClone();\n cloned.applyTimeRangeMask(timeUnit.asMilliSeconds(startTime), timeUnit.asMilliSeconds(endTime));\n return 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_248
{ "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 shouldGetElementGenerators() throws IOException {\n // When\n final Set<Class> classes = service.getElementGenerators();\n\n // Then\n assertTrue(!classes.isEmpty());\n }", "class_method_signature": "GraphConfigurationServiceTest.shouldGetElementGener...
{ "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> getElementGenerators() {\n return ReflectionUtil.getSubTypes(ElementGenerator.class);\n }", "class_method_signature": "GraphConfigurationService.getElementGenerators()", "constructor": false, "full_signature": "@Override public Set<Class> getElementGenerator...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_618
{ "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": "EntityIdSerialiserTest.testPreserveObjectOrdering()", "constructor": false, "full_signature": "@Test public void t...
{ "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 preservesObjectOrdering() {\n return null != vertexSerialiser && vertexSerialiser.preservesObjectOrdering();\n }", "class_method_signature": "EntityIdSerialiser.preservesObjectOrdering()", "constructor": false, "full_signature": "@Override public boolean preser...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1260
{ "fields": [ { "declarator": "USER = \"User\"", "modifier": "public static final", "original_string": "public static final String USER = \"User\";", "type": "String", "var_name": "USER" }, { "declarator": "OPERATION_CHAIN = new OperationChain.Builder().first(new GetAdj...
{ "body": "@Test\n public void shouldGetOperationsWhenNoDefaultParameter() {\n // Given\n final AddNamedOperation addNamedOperation = new AddNamedOperation.Builder()\n .operationChain(\"{\\\"operations\\\":[{\\\"class\\\": \\\"uk.gov.gchq.gaffer.operation.impl.get.GetAdjacentIds\\\", \...
{ "fields": [ { "declarator": "operations", "modifier": "@Required\n private", "original_string": "@Required\n private String operations;", "type": "String", "var_name": "operations" }, { "declarator": "operationName", "modifier": "private", "original_...
{ "body": "@Override\n @JsonIgnore\n public Collection<Operation> getOperations() {\n return getOperationsWithDefaultParams();\n }", "class_method_signature": "AddNamedOperation.getOperations()", "constructor": false, "full_signature": "@Override @JsonIgnore public Collection<Operation> 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_531
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/iterable/ChainedIterableTest.java", "identifier": "ChainedIterableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldThrowNSEXWhenNoNextIterableWhenOneElementAndNo2ndNext() {\n final Iterable<Integer> chainedIterable = new ChainedIterable<>(Collections.singletonList(1));\n final Iterator<Integer> iterator = chainedIterable.iterator();\n\n iterator.next();\n\n // No...
{ "fields": [ { "declarator": "itrs", "modifier": "private final", "original_string": "private final Iterable<T>[] itrs;", "type": "Iterable<T>[]", "var_name": "itrs" }, { "declarator": "n", "modifier": "private final", "original_string": "private final int ...
{ "body": "@Override\n public CloseableIterator<T> iterator() {\n return new IteratorWrapper();\n }", "class_method_signature": "ChainedIterable.iterator()", "constructor": false, "full_signature": "@Override public CloseableIterator<T> iterator()", "identifier": "iterator", "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_161
{ "fields": [ { "declarator": "serialisation", "modifier": "private", "original_string": "private ElementSerialisation serialisation;", "type": "ElementSerialisation", "var_name": "serialisation" } ], "file": "store-implementation/hbase-store/src/test/java/uk/gov/gchq/gaffer/...
{ "body": "@Test\n public void shouldBuildRandomTimeBasedTimestampWhenPropertyIsNull() throws Exception {\n // Given\n // add extra timestamp property to schema\n final Schema schema = new Schema.Builder().json(StreamUtil.schemas(getClass())).build();\n serialisation = new ElementSerial...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ElementSerialisation.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ElementSerialisation.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "public long getTimestamp(final Element element) throws SerialisationException {\n return getTimestamp(element.getProperties());\n }", "class_method_signature": "ElementSerialisation.getTimestamp(final Element element)", "constructor": false, "full_signature": "public long getTimestamp(final...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_862
{ "fields": [ { "declarator": "cache", "modifier": "private static", "original_string": "private static NamedViewCache cache;", "type": "NamedViewCache", "var_name": "cache" }, { "declarator": "GAFFER_USER = \"gaffer user\"", "modifier": "private static final", ...
{ "body": "@Test\n public void shouldThrowExceptionWhenGettingIfKeyIsNull() throws CacheOperationFailedException {\n try {\n cache.getNamedView(null, standardUser);\n fail(EXCEPTION_EXPECTED);\n } catch (CacheOperationFailedException e) {\n assertTrue(e.getMessage().c...
{ "fields": [ { "declarator": "CACHE_NAME = \"NamedView\"", "modifier": "private static final", "original_string": "private static final String CACHE_NAME = \"NamedView\";", "type": "String", "var_name": "CACHE_NAME" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/s...
{ "body": "@Deprecated\n public NamedViewDetail getNamedView(final String name) throws CacheOperationFailedException {\n if (null != name) {\n return getFromCache(name);\n } else {\n throw new CacheOperationFailedException(\"NamedView name cannot be null\");\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_1149
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/data/EntitySeedTest.java", "identifier": "EntitySeedTest", "interfaces": "", "superclass": "extends JSONSerialisationTest<EntitySeed>" }
{ "body": "@Test\n public void shouldSerialiseAndDeserialiseIntegersAndLongs() throws SerialisationException {\n // Given\n final Long vertex1 = 1L;\n final Integer vertex2 = 2;\n final EntityId seed1 = new EntitySeed(vertex1);\n final EntityId seed2 = new EntitySeed(vertex2);\n\...
{ "fields": [ { "declarator": "serialVersionUID = -1668220155074029644L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1668220155074029644L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ver...
{ "body": "@Override\n public Object getVertex() {\n return vertex;\n }", "class_method_signature": "EntitySeed.getVertex()", "constructor": false, "full_signature": "@Override public Object getVertex()", "identifier": "getVertex", "invocations": [], "modifiers": "@Override public", "parame...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_927
{ "fields": [ { "declarator": "ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values())", "modifier": "public static final", "original_string": "public static final Set<StoreTrait> ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values());", "type": "Set<StoreTrait>", "var_name": "ALL_S...
{ "body": "@Test\n public void shouldValidateAndReturnTrueNoGroupByProperties() {\n // Given\n final ViewValidator validator = new ViewValidator();\n final View view = new View.Builder()\n .entity(TestGroups.ENTITY)\n .edge(TestGroups.EDGE)\n .build...
{ "fields": [ { "declarator": "SKIP_VIEW_VALIDATION = \"skipViewValidation\"", "modifier": "public static final", "original_string": "public static final String SKIP_VIEW_VALIDATION = \"skipViewValidation\";", "type": "String", "var_name": "SKIP_VIEW_VALIDATION" }, { "d...
{ "body": "public ValidationResult validate(final View view, final Schema schema, final Set<StoreTrait> storeTraits) {\n final boolean isStoreOrdered = storeTraits.contains(StoreTrait.ORDERED);\n\n final ValidationResult result = new ValidationResult();\n\n if (null != view) {\n valida...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_474
{ "fields": [ { "declarator": "abs", "modifier": "", "original_string": "ArrayByteSequence abs;", "type": "ArrayByteSequence", "var_name": "abs" }, { "declarator": "data", "modifier": "", "original_string": "byte[] data;", "type": "byte[]", "var_...
{ "body": "@Test\n public void testFromReadOnlyByteBuffer() {\n final ByteBuffer bb = ByteBuffer.wrap(data, 1, 4).asReadOnlyBuffer();\n abs = new ArrayByteSequence(bb);\n\n assertEquals(\"mile\", abs.toString());\n }", "class_method_signature": "ArrayByteSequenceTest.testFromReadOnlyByteB...
{ "fields": [ { "declarator": "serialVersionUID = 4850846929226802566L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 4850846929226802566L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "data"...
{ "body": "public String toString() {\n return new String(this.data, this.offset, this.length, StandardCharsets.UTF_8);\n }", "class_method_signature": "ArrayByteSequence.toString()", "constructor": false, "full_signature": "public String toString()", "identifier": "toString", "invocations": [], ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_87
{ "fields": [], "file": "store-implementation/parquet-store/src/test/java/uk/gov/gchq/gaffer/parquetstore/partitioner/GroupPartitionerTest.java", "identifier": "GroupPartitionerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetIthPartitionKey() {\n // Given\n final PartitionKey key1 = new PartitionKey(new Object[]{1L, \"B\"});\n final PartitionKey key2 = new PartitionKey(new Object[]{5L, \"A\"});\n final PartitionKey key3 = new PartitionKey(new Object[]{100L, \"Z\"});\n ...
{ "fields": [ { "declarator": "group", "modifier": "private final", "original_string": "private final String group;", "type": "String", "var_name": "group" }, { "declarator": "splitPoints", "modifier": "private final", "original_string": "private final List<...
{ "body": "public PartitionKey getIthPartitionKey(final int i) {\n return splitPoints.get(i);\n }", "class_method_signature": "GroupPartitioner.getIthPartitionKey(final int i)", "constructor": false, "full_signature": "public PartitionKey getIthPartitionKey(final int i)", "identifier": "getIthPartit...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1372
{ "fields": [], "file": "library/sketches-library/src/test/java/uk/gov/gchq/gaffer/sketches/clearspring/cardinality/serialisation/HyperLogLogPlusSerialiserTest.java", "identifier": "HyperLogLogPlusSerialiserTest", "interfaces": "", "superclass": "extends ViaCalculatedValueSerialiserTest<HyperLogLogPlus, Long>...
{ "body": "@Test\n public void testDeserialiseEmptyBytesReturnsNull() throws SerialisationException {\n // Given\n final HyperLogLogPlus hllp = serialiser.deserialiseEmpty();\n\n // Then\n assertNull(hllp);\n }", "class_method_signature": "HyperLogLogPlusSerialiserTest.testDeserial...
{ "fields": [ { "declarator": "serialVersionUID = 2782098698280905174L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 2782098698280905174L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/sketches-...
{ "body": "@Override\n public HyperLogLogPlus deserialiseEmpty() throws SerialisationException {\n return null;\n }", "class_method_signature": "HyperLogLogPlusSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public HyperLogLogPlus deserialiseEmpty()", "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_1237
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/IfTest.java", "identifier": "IfTest", "interfaces": "", "superclass": "extends OperationTest<If>" }
{ "body": "@Test\n public void testShallowClone() {\n // Given\n final Object input = \"testInput\";\n final GetAllElements getAllElements = new GetAllElements();\n\n final If<Object, Object> ifOp = new If.Builder<>()\n .input(input)\n .then(getAllElements)...
{ "fields": [ { "declarator": "condition", "modifier": "private", "original_string": "private Boolean condition;", "type": "Boolean", "var_name": "condition" }, { "declarator": "conditional", "modifier": "private", "original_string": "private Conditional con...
{ "body": "@Override\n public If<I, O> shallowClone() throws CloneFailedException {\n If.Builder<I, O> builder = new If.Builder<I, O>()\n .input(getInput())\n .condition(condition)\n .conditional(conditional)\n .then(then)\n .otherwi...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_68
{ "fields": [ { "declarator": "PATH_MAP_STORE_PROPERTIES = \"properties/singleUseMiniAccStore.properties\"", "modifier": "private static final", "original_string": "private static final String PATH_MAP_STORE_PROPERTIES = \"properties/singleUseMiniAccStore.properties\";", "type": "String", ...
{ "body": "@Test\n public void shouldThrowExceptionIfGraphAlreadyExistsInCache() throws CacheOperationException {\n federatedStoreCache.addGraphToCache(testGraph, null, false);\n try {\n federatedStoreCache.addGraphToCache(testGraph, null, false);\n fail(\"Exception expected\");...
{ "fields": [ { "declarator": "ERROR_ADDING_GRAPH_TO_CACHE_GRAPH_ID_S = \"Error adding graph to cache. graphId: %s\"", "modifier": "public static final", "original_string": "public static final String ERROR_ADDING_GRAPH_TO_CACHE_GRAPH_ID_S = \"Error adding graph to cache. graphId: %s\";", ...
{ "body": "public void addGraphToCache(final Graph graph, final FederatedAccess access, final boolean overwrite) throws CacheOperationException {\n String graphId = graph.getGraphId();\n Pair<GraphSerialisable, FederatedAccess> pair = new Pair<>(new GraphSerialisable.Builder().graph(graph).build(), acce...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_835
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToMapHandlerTest.java", "identifier": "ToMapHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldHandleNullInput() throws OperationException {\n // Given\n final ToMapHandler handler = new ToMapHandler();\n final ToMap operation = mock(ToMap.class);\n\n given(operation.getInput()).willReturn(null);\n\n //When\n final Iterable<? ext...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToMapHandler.java", "identifier": "ToMapHandler", "interfaces": "implements OutputOperationHandler<ToMap, Iterable<? extends Map<String, Object>>>", "methods": [ { "class_method_signature": "ToMapHand...
{ "body": "@Override\n public Iterable<? extends Map<String, Object>> doOperation(final ToMap operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getInput()) {\n return null;\n }\n\n return operation.getElementGenerator().apply(op...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_136
{ "fields": [ { "declarator": "GRAPH_ID = \"graph1\"", "modifier": "private static final", "original_string": "private static final String GRAPH_ID = \"graph1\";", "type": "String", "var_name": "GRAPH_ID" }, { "declarator": "LOCALITY_GRAPH_ID = \"localityTest\"", ...
{ "body": "@Test\n public void shouldThrowExceptionIfTableNameIsNotSpecified() throws StoreException {\n // Given\n final Schema schema = new Schema.Builder()\n .type(\"int\", Integer.class)\n .type(\"string\", String.class)\n .type(\"boolean\", Boolean.cl...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(TableUtils.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(TableUtils.class);", "type": "Logger", "var_name": "LOGGER" }, { "dec...
{ "body": "public static void ensureTableExists(final AccumuloStore store) throws StoreException {\n final String tableName = store.getTableName();\n if (null == tableName) {\n throw new AccumuloRuntimeException(\"Table name is required.\");\n }\n final Connector connector = sto...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_566
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/serialisation/IntegerFreqMapSerialiserTest.java", "identifier": "IntegerFreqMapSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<IntegerFreqMap>" }
{ "body": "@Test\n @Override\n public void shouldDeserialiseEmpty() throws SerialisationException {\n assertEquals(new IntegerFreqMap(), serialiser.deserialiseEmpty());\n }", "class_method_signature": "IntegerFreqMapSerialiserTest.shouldDeserialiseEmpty()", "constructor": false, "full_signature"...
{ "fields": [ { "declarator": "serialVersionUID = 3772387954385745791L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 3772387954385745791L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "SEPER...
{ "body": "@Override\n public IntegerFreqMap deserialiseEmpty() throws SerialisationException {\n return new IntegerFreqMap();\n }", "class_method_signature": "IntegerFreqMapSerialiser.deserialiseEmpty()", "constructor": false, "full_signature": "@Override public IntegerFreqMap deserialiseEmpty()",...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_589
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/types/function/ToTypeValueTest.java", "identifier": "ToTypeValueTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldConvertNullToTypeValue() {\n // Given\n final ToTypeValue function = new ToTypeValue();\n\n // When\n final TypeValue result = function.apply(null);\n\n // Then\n assertEquals(new TypeValue(null, null), result);\n }", "class_method...
{ "fields": [], "file": "core/type/src/main/java/uk/gov/gchq/gaffer/types/function/ToTypeValue.java", "identifier": "ToTypeValue", "interfaces": "", "methods": [ { "class_method_signature": "ToTypeValue.apply(final Object value)", "constructor": false, "full_signature": "@Override public...
{ "body": "@Override\n public TypeValue apply(final Object value) {\n return new TypeValue(null, null != value ? value.toString() : null);\n }", "class_method_signature": "ToTypeValue.apply(final Object value)", "constructor": false, "full_signature": "@Override public TypeValue apply(final Object ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_423
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ExtractGroupTest.java", "identifier": "ExtractGroupTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldReturnNullForNullElement() {\n // Given\n final ExtractGroup function = new ExtractGroup();\n\n // When\n final String result = function.apply(null);\n\n // Then\n assertNull(result);\n }", "class_method_signature": "ExtractGroupTe...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/function/ExtractGroup.java", "identifier": "ExtractGroup", "interfaces": "", "methods": [ { "class_method_signature": "ExtractGroup.apply(final Element element)", "constructor": false, "full_signature": "@Ov...
{ "body": "@Override\n public String apply(final Element element) {\n return null != element ? element.getGroup() : null;\n }", "class_method_signature": "ExtractGroup.apply(final Element element)", "constructor": false, "full_signature": "@Override public String apply(final Element element)", "i...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_970
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/schema/SchemaElementDefinitionValidatorTest.java", "identifier": "SchemaElementDefinitionValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidateAndReturnFalseWhenNoAggregatorByGroupBysSet() {\n // Given\n Set<String> groupBys = new HashSet<>();\n groupBys.add(\"int\");\n final SchemaElementDefinition elementDef = mock(SchemaElementDefinition.class);\n final SchemaElementDefini...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class);", "type": "Logger", ...
{ "body": "public ValidationResult validate(final SchemaElementDefinition elementDef) {\n final ValidationResult result = new ValidationResult();\n\n final ElementFilter validator = elementDef.getValidator();\n final ElementAggregator aggregator = elementDef.getFullAggregator();\n result.a...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1364
{ "fields": [ { "declarator": "SERIALISER = new HllUnionSerialiser()", "modifier": "private static final", "original_string": "private static final HllUnionSerialiser SERIALISER = new HllUnionSerialiser();", "type": "HllUnionSerialiser", "var_name": "SERIALISER" }, { "d...
{ "body": "@Test\n public void testCanHandleUnion() {\n assertTrue(SERIALISER.canHandle(Union.class));\n assertFalse(SERIALISER.canHandle(String.class));\n }", "class_method_signature": "HllUnionSerialiserTest.testCanHandleUnion()", "constructor": false, "full_signature": "@Test public void ...
{ "fields": [ { "declarator": "serialVersionUID = 224563354444113561L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 224563354444113561L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/sketches-li...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return Union.class.equals(clazz);\n }", "class_method_signature": "HllUnionSerialiser.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_91
{ "fields": [], "file": "store-implementation/parquet-store/src/test/java/uk/gov/gchq/gaffer/parquetstore/partitioner/GroupPartitionerTest.java", "identifier": "GroupPartitionerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetPartitionsEmptyList() {\n // Given\n final GroupPartitioner partitioner = new GroupPartitioner(\"GROUP\", new ArrayList<>());\n\n // When\n final List<Partition> partitions = partitioner.getPartitions();\n\n // Then\n assertEquals(1, p...
{ "fields": [ { "declarator": "group", "modifier": "private final", "original_string": "private final String group;", "type": "String", "var_name": "group" }, { "declarator": "splitPoints", "modifier": "private final", "original_string": "private final List<...
{ "body": "public List<Partition> getPartitions() {\n return this.partitions;\n }", "class_method_signature": "GroupPartitioner.getPartitions()", "constructor": false, "full_signature": "public List<Partition> getPartitions()", "identifier": "getPartitions", "invocations": [], "modifiers": "publ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_209
{ "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 PreAggregationFilterProcessor processor = new PreAggregationFilterProcessor(VIEW);\n assertEquals(VIEW, processor.getView());\n }", "class_method_signature": "PreAggregationFilter...
{ "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": "PreAggregationFilterProcessor.getView()", "constructor": false, "full_signature": "public View getView()", "identifier": "getView", "invocations": [ "getView" ], "modifiers": "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_659
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/resolver/WhileScoreResolverTest.java", "identifier": "WhileScoreResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetDefaultScoreWithNoOperationScores() {\n // Given\n final WhileScoreResolver resolver = new WhileScoreResolver();\n final DefaultScoreResolver defaultResolver = new DefaultScoreResolver(new LinkedHashMap<>());\n\n final While operation = new While(...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(WhileScoreResolver.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(WhileScoreResolver.class);", "type": "Logger", "var_name": "LOGGER" } ...
{ "body": "@Override\n public Integer getScore(final While operation) {\n throw new UnsupportedOperationException(\"Default Score Resolver has not been provided.\");\n }", "class_method_signature": "WhileScoreResolver.getScore(final While operation)", "constructor": false, "full_signature": "@Overr...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1221
{ "fields": [], "file": "core/operation/src/test/java/uk/gov/gchq/gaffer/operation/impl/get/GetElementsTest.java", "identifier": "GetElementsTest", "interfaces": "", "superclass": "extends OperationTest<GetElements>" }
{ "body": "@Test\n public void shouldSetDirectedTypeToBoth() {\n // When\n final GetElements op = new GetElements.Builder()\n .directedType(DirectedType.EITHER)\n .input(new EntitySeed())\n .build();\n\n // Then\n assertEquals(DirectedType.EI...
{ "fields": [ { "declarator": "seedMatching", "modifier": "private", "original_string": "private SeedMatchingType seedMatching;", "type": "SeedMatchingType", "var_name": "seedMatching" }, { "declarator": "view", "modifier": "private", "original_string": "pri...
{ "body": "@Override\n public DirectedType getDirectedType() {\n return directedType;\n }", "class_method_signature": "GetElements.getDirectedType()", "constructor": false, "full_signature": "@Override public DirectedType getDirectedType()", "identifier": "getDirectedType", "invocations": [], ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_570
{ "fields": [], "file": "core/type/src/test/java/uk/gov/gchq/gaffer/types/CustomMapTest.java", "identifier": "CustomMapTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldJSONSerialiseStringInteger() throws IOException {\n //given\n final CustomMap<String, Integer> expectedMap = new CustomMap<>(new StringSerialiser(), new IntegerSerialiser());\n expectedMap.put(\"one\", 1111);\n expectedMap.put(\"two\", 2222);\n ...
{ "fields": [ { "declarator": "keySerialiser", "modifier": "private final", "original_string": "private final ToBytesSerialiser<? super K> keySerialiser;", "type": "ToBytesSerialiser<? super K>", "var_name": "keySerialiser" }, { "declarator": "valueSerialiser", "m...
{ "body": "public V put(final K key, final V value) {\n return delegateMap.put(key, value);\n }", "class_method_signature": "CustomMap.put(final K key, final V value)", "constructor": false, "full_signature": "public V put(final K key, final V value)", "identifier": "put", "invocations": [ "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_120
{ "fields": [ { "declarator": "a", "modifier": "private", "original_string": "private byte[] a;", "type": "byte[]", "var_name": "a" }, { "declarator": "b", "modifier": "private", "original_string": "private byte[] b;", "type": "byte[]", "var_name...
{ "body": "@Test\n public void shouldPassWithOffsets() throws Exception {\n br1 = new BytesAndRange(e, 1, 4);\n br2 = new BytesAndRange(a, 1, 4);\n assertTrue(ByteUtils.areKeyBytesEqual(br1, br2));\n }", "class_method_signature": "ByteUtilsTest.shouldPassWithOffsets()", "constructor": f...
{ "fields": [], "file": "store-implementation/accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/utils/ByteUtils.java", "identifier": "ByteUtils", "interfaces": "", "methods": [ { "class_method_signature": "ByteUtils.ByteUtils()", "constructor": true, "full_signature": "privat...
{ "body": "public static boolean areKeyBytesEqual(final byte[] bytes1, final byte[] bytes2) {\n if (Arrays.equals(bytes1, bytes2)) {\n return true;\n }\n\n int last = bytes1.length;\n\n if (last != bytes2.length) {\n return false;\n }\n\n if (last == 0) ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_989
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/util/JsonSerialisationUtilTest.java", "identifier": "JsonSerialisationUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testClassWithCreator() {\n // Given\n final String className = ClassWithCreator.class.getName();\n\n // When\n final Map<String, String> result = JsonSerialisationUtil.getSerialisedFieldClasses(className);\n\n // Then\n final Map<String, Stri...
{ "fields": [ { "declarator": "cache = Collections.emptyMap()", "modifier": "private static", "original_string": "private static Map<String, Map<String, String>> cache = Collections.emptyMap();", "type": "Map<String, Map<String, String>>", "var_name": "cache" } ], "file": "co...
{ "body": "public static Map<String, String> getSerialisedFieldClasses(final String className) {\n final Map<String, String> cachedResult = cache.get(className);\n if (null != cachedResult) {\n return cachedResult;\n }\n\n final Class<?> clazz;\n try {\n clazz ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_823
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToArrayHandlerTest.java", "identifier": "ToArrayHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConvertIterableToArray() throws OperationException {\n // Given\n final Integer[] originalArray = new Integer[]{1, 2, 3};\n\n final Iterable<Integer> originalResults = new WrappedCloseableIterable<>(Arrays.asList(originalArray));\n final ToArrayHandl...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/output/ToArrayHandler.java", "identifier": "ToArrayHandler", "interfaces": "implements OutputOperationHandler<ToArray<T>, T[]>", "methods": [ { "class_method_signature": "ToArrayHandler.doOperation(final ToA...
{ "body": "@SuppressFBWarnings(value = \"PZLA_PREFER_ZERO_LENGTH_ARRAYS\")\n @Override\n public T[] doOperation(final ToArray<T> operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getInput() || Iterables.isEmpty(operation.getInput())) {\n r...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1108
{ "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 shouldBuildFullViewWhenAViewToBeMergedIsSupplied() throws CacheOperationFailedException {\n // Given\n final View viewToMerge = new View.Builder().edge(TestGroups.EDGE).build();\n final View finalExpectedView = new View.Builder()\n .edge(TestGroups...
{ "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_966
{ "fields": [], "file": "core/store/src/test/java/uk/gov/gchq/gaffer/store/schema/SchemaElementDefinitionValidatorTest.java", "identifier": "SchemaElementDefinitionValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldValidateFunctionSelectionsAndReturnTrueWhenAllFunctionsAreValid() {\n // Given\n final SchemaElementDefinition elementDef = mock(SchemaElementDefinition.class);\n given(elementDef.getPropertyClass(\"selectionStr\")).willReturn((Class) String.class);\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SchemaElementDefinitionValidator.class);", "type": "Logger", ...
{ "body": "protected ValidationResult validateFunctionArgumentTypes(\n final ElementFilter filter, final SchemaElementDefinition schemaElDef) {\n final ValidationResult result = new ValidationResult();\n if (null != filter && null != filter.getComponents()) {\n for (final TupleAdap...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_435
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/LazyEdgeTest.java", "identifier": "LazyEdgeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetLazyProperties() {\n // Given\n final Edge edge = new Edge.Builder().build();\n final ElementValueLoader edgeLoader = mock(ElementValueLoader.class);\n final LazyEdge lazyEdge = new LazyEdge(edge, edgeLoader);\n\n // When\n final Laz...
{ "fields": [ { "declarator": "serialVersionUID = 3950963135470686691L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 3950963135470686691L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "edge"...
{ "body": "@Override\n public LazyProperties getProperties() {\n return lazyProperties;\n }", "class_method_signature": "LazyEdge.getProperties()", "constructor": false, "full_signature": "@Override public LazyProperties getProperties()", "identifier": "getProperties", "invocations": [], "mod...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1299
{ "fields": [ { "declarator": "timestamps", "modifier": "private", "original_string": "private RBMBackedTimestampSet timestamps;", "type": "RBMBackedTimestampSet", "var_name": "timestamps" }, { "declarator": "predicate", "modifier": "private", "original_stri...
{ "body": "@Test\n public void shouldSetTimeUnitToMillisecondsIfNotSpecifiedInTheJson() throws IOException {\n // Given\n String serialised = \"{\" +\n \"\\\"class\\\":\\\"uk.gov.gchq.gaffer.time.predicate.RBMBackedTimestampSetInRange\\\",\" +\n \"\\\"startTime\\\":10,\"...
{ "fields": [ { "declarator": "startTime", "modifier": "private", "original_string": "private Number startTime;", "type": "Number", "var_name": "startTime" }, { "declarator": "endTime", "modifier": "private", "original_string": "private Number endTime;", ...
{ "body": "public TimeUnit getTimeUnit() {\n return timeUnit;\n }", "class_method_signature": "RBMBackedTimestampSetInRange.getTimeUnit()", "constructor": false, "full_signature": "public TimeUnit getTimeUnit()", "identifier": "getTimeUnit", "invocations": [], "modifiers": "public", "parameter...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1333
{ "fields": [], "file": "library/spark/spark-library/src/test/java/uk/gov/gchq/gaffer/spark/operation/graphframe/GetGraphFrameOfElementsTest.java", "identifier": "GetGraphFrameOfElementsTest", "interfaces": "", "superclass": "extends OperationTest<GetGraphFrameOfElements>" }
{ "body": "@Test\n public void shouldValidateOperation() {\n // Given\n final Operation op = new GetGraphFrameOfElements.Builder()\n .view(new View.Builder()\n .edge(TestGroups.EDGE)\n .entity(TestGroups.ENTITY)\n .bu...
{ "fields": [ { "declarator": "converters", "modifier": "private", "original_string": "private List<Converter> converters;", "type": "List<Converter>", "var_name": "converters" }, { "declarator": "options", "modifier": "private", "original_string": "private ...
{ "body": "@Override\n public ValidationResult validate() {\n final ValidationResult result = Output.super.validate();\n\n if (result.isValid() && !view.hasEdges() && !view.hasEntities()) {\n result.addError(\"Cannot create a GraphFrame unless the View contains edges or entities.\");\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1276
{ "fields": [ { "declarator": "service = new JcsCacheService()", "modifier": "private", "original_string": "private JcsCacheService service = new JcsCacheService();", "type": "JcsCacheService", "var_name": "service" }, { "declarator": "TEST_REGION = \"test\"", "mo...
{ "body": "@Test\n public void shouldAgeOffValues() throws CacheOperationException {\n // given\n String filePath = new File(\"src/test/resources/cache.ccf\").getAbsolutePath();\n serviceProps.setProperty(CacheProperties.CACHE_CONFIG_FILE, filePath);\n service.initialise(serviceProps);\...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(JcsCacheService.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(JcsCacheService.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Override\n public void initialise(final Properties properties) {\n String configFile = properties.getProperty(CacheProperties.CACHE_CONFIG_FILE);\n manager = CompositeCacheManager.getUnconfiguredInstance();\n\n if (null != configFile) {\n try {\n Propertie...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_29
{ "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 shouldTakeCompleteSchemaFromTwoFiles() throws Exception {\n // Given\n int before = store.getGraphs(blankUser, null, ignore).size();\n addGraphWithPaths(ACC_ID_1, PROPERTIES_ALT, PATH_INCOMPLETE_SCHEMA, PATH_INCOMPLETE_SCHEMA_PART_2);\n\n // When\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Store.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Store.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": ...
{ "body": "public Collection<Graph> getGraphs(final User user, final String graphIdsCsv, final Operation operation) {\n Collection<Graph> rtn = new ArrayList<>();\n if (nonNull(operation)) {\n String optionKey = FEDERATED_STORE_PROCESSED + id;\n boolean isIdFound = !operation.getOp...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_874
{ "fields": [ { "declarator": "namedViewCache = new NamedViewCache()", "modifier": "private final", "original_string": "private final NamedViewCache namedViewCache = new NamedViewCache();", "type": "NamedViewCache", "var_name": "namedViewCache" }, { "declarator": "handl...
{ "body": "@Test\n public void shouldNotAddNamedViewWithNoName() throws OperationException {\n addNamedView.setName(null);\n\n try {\n handler.doOperation(addNamedView, context, store);\n } catch (final IllegalArgumentException e) {\n assertTrue(e.getMessage().equals(\"Na...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedViewCache cache;", "type": "NamedViewCache", "var_name": "cache" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/named/AddNamedViewHand...
{ "body": "@Override\n public Object doOperation(final AddNamedView operation, final Context context, final Store store) throws OperationException {\n if (null == operation.getName() || operation.getName().isEmpty()) {\n throw new IllegalArgumentException(\"NamedView name must be set and not empt...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_3
{ "fields": [ { "declarator": "TEST_USER = new User.Builder().userId(\"TestUser\").opAuths(\"auth1\", \"auth2\").build()", "modifier": "private static final", "original_string": "private static final User TEST_USER = new User.Builder().userId(\"TestUser\").opAuths(\"auth1\", \"auth2\").build();"...
{ "body": "@Test\n public void shouldReturnTrueForAdministrator() {\n assertTrue(createAccessPredicate(TEST_USER.getUserId(), NO_AUTHS, NON_PUBLIC).test(new User.Builder().userId(\"AdminUser\").opAuths(\"auth1\", \"auth2\").build(), \"auth1\"));\n }", "class_method_signature": "FederatedGraphReadAccess...
{ "fields": [], "file": "store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/access/predicate/FederatedGraphReadAccessPredicate.java", "identifier": "FederatedGraphReadAccessPredicate", "interfaces": "", "methods": [ { "class_method_signature": "FederatedGraphReadAcc...
{ "body": "@Override\n public boolean test(final User user, final String adminAuth) {\n return super.test(user, adminAuth);\n }", "class_method_signature": "FederatedGraphReadAccessPredicate.test(final User user, final String adminAuth)", "constructor": false, "full_signature": "@Override public bo...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_177
{ "fields": [], "file": "store-implementation/hbase-store/src/test/java/uk/gov/gchq/gaffer/hbasestore/operation/handler/GetAllElementsHandlerTest.java", "identifier": "GetAllElementsHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnHBaseRetriever() throws OperationException, StoreException {\n // Given\n final Context context = mock(Context.class);\n final User user = mock(User.class);\n final HBaseStore store = mock(HBaseStore.class);\n final HBaseRetriever<GetAll...
{ "fields": [], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasestore/operation/handler/GetAllElementsHandler.java", "identifier": "GetAllElementsHandler", "interfaces": "implements OutputOperationHandler<GetAllElements, CloseableIterable<? extends Element>>", "methods": [ ...
{ "body": "@Override\n public CloseableIterable<? extends Element> doOperation(final GetAllElements operation, final Context context, final Store store)\n throws OperationException {\n return doOperation(operation, context.getUser(), (HBaseStore) store);\n }", "class_method_signature": "GetA...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_527
{ "fields": [ { "declarator": "INVALID_STRING = \"inv@l1dStr|ng&^\"", "modifier": "private static final", "original_string": "private static final String INVALID_STRING = \"inv@l1dStr|ng&^\";", "type": "String", "var_name": "INVALID_STRING" }, { "declarator": "VALID_STR...
{ "body": "@Test\n public void shouldPassValidationWithValidStringName() {\n assertDoesNotThrow(() -> GroupUtil.validateName(VALID_STRING));\n }", "class_method_signature": "GroupUtilTest.shouldPassValidationWithValidStringName()", "constructor": false, "full_signature": "@Test public void shouldPa...
{ "fields": [ { "declarator": "PROPERTY_ALLOWED_CHARACTERS = Pattern.compile(\"[a-zA-Z0-9|-]*\")", "modifier": "private static final", "original_string": "private static final Pattern PROPERTY_ALLOWED_CHARACTERS = Pattern.compile(\"[a-zA-Z0-9|-]*\");", "type": "Pattern", "var_name": ...
{ "body": "public static void validateName(final String group) {\n if (!PROPERTY_ALLOWED_CHARACTERS.matcher(group).matches()) {\n throw new IllegalArgumentException(\"Group is invalid: \" + group + \", it must match regex: \" + PROPERTY_ALLOWED_CHARACTERS);\n }\n }", "class_method_signat...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_462
{ "fields": [], "file": "core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/JsonUtilTest.java", "identifier": "JsonUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFalseWhenJsonArraysAreDifferentSizes() {\n final String json1 = \"[1,2,3]\";\n final String json2 = \"[1,2,3,4]\";\n\n assertFalse(JsonUtil.equals(json1, json2));\n assertFalse(JsonUtil.equals(json1.getBytes(), json2.getBytes()));\n\n Js...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(JsonUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(JsonUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "declara...
{ "body": "public static boolean equals(final String expectedJson, final String actualJson) {\n try {\n final Map expectedSchemaMap = null != expectedJson ? OBJECT_MAPPER.readValue(expectedJson, Map.class) : Collections.emptyMap();\n final Map actualSchemaMap = null != actualJson ? OBJECT...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_198
{ "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 shouldSkipDeletedAndRemoveInvalidElements() throws OperationException, SerialisationException {\n // Given\n final FilterProcessor processor = new FilterProcessor() {\n @Override\n public boolean test(final LazyElementCell elementCell) {\n ...
{ "fields": [], "file": "store-implementation/hbase-store/src/main/java/uk/gov/gchq/gaffer/hbasestore/coprocessor/processor/FilterProcessor.java", "identifier": "FilterProcessor", "interfaces": "implements GafferScannerProcessor, Predicate<LazyElementCell>", "methods": [ { "class_method_signature": ...
{ "body": "@Override\n public List<LazyElementCell> process(final List<LazyElementCell> elementCells) {\n // If we filter out a deleted element when compacting then the deleted\n // flag will not be persisted and the element will not get deleted.\n // When querying, deleted cells will have alr...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_931
{ "fields": [ { "declarator": "ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values())", "modifier": "public static final", "original_string": "public static final Set<StoreTrait> ALL_STORE_TRAITS = Sets.newHashSet(StoreTrait.values());", "type": "Set<StoreTrait>", "var_name": "ALL_S...
{ "body": "@Test\n public void shouldValidateAndReturnFalseWhenGroupByPropertyNotInSchema() {\n // Given\n final ViewValidator validator = new ViewValidator();\n final View view = new View.Builder()\n .entity(TestGroups.ENTITY, new ViewElementDefinition.Builder()\n ...
{ "fields": [ { "declarator": "SKIP_VIEW_VALIDATION = \"skipViewValidation\"", "modifier": "public static final", "original_string": "public static final String SKIP_VIEW_VALIDATION = \"skipViewValidation\";", "type": "String", "var_name": "SKIP_VIEW_VALIDATION" }, { "d...
{ "body": "public ValidationResult validate(final View view, final Schema schema, final Set<StoreTrait> storeTraits) {\n final boolean isStoreOrdered = storeTraits.contains(StoreTrait.ORDERED);\n\n final ValidationResult result = new ValidationResult();\n\n if (null != view) {\n valida...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_52
{ "fields": [ { "declarator": "TEST_GRAPH_ID = \"testGraphId\"", "modifier": "private static final", "original_string": "private static final String TEST_GRAPH_ID = \"testGraphId\";", "type": "String", "var_name": "TEST_GRAPH_ID" }, { "declarator": "user", "modifi...
{ "body": "@Test\n public final void shouldMergeResultsFromFieldObjects() throws Exception {\n // Given\n final Operation op = mock(Operation.class);\n final Operation opClone = mock(Operation.class);\n given(op.shallowClone()).willReturn(opClone);\n final OperationChain<?> opCha...
{ "fields": [], "file": "store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/operation/handler/FederatedOperationHandler.java", "identifier": "FederatedOperationHandler", "interfaces": "implements OperationHandler<Operation>", "methods": [ { "class_method_signature":...
{ "body": "public Object doOperation(final Operation operation, final Context context, final Store store) throws OperationException {\n final Collection<Graph> graphs = ((FederatedStore) store).getGraphs(context.getUser(), operation.getOption(KEY_OPERATION_OPTIONS_GRAPH_IDS), operation);\n for (final Gr...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_675
{ "fields": [ { "declarator": "schema = new Schema.Builder()\n .entity(TestGroups.ENTITY, new SchemaEntityDefinition.Builder()\n .vertex(TestTypes.ID_STRING)\n .build())\n .edge(TestGroups.EDGE, new SchemaEdgeDefinition.Builder()\n ...
{ "body": "@Test\n public void shouldUseFullSampleOfAllElementsByDefault() throws OperationException {\n // Given\n final int numSplits = 3;\n final List<Element> elements =\n IntStream.range(0, numSplits)\n .mapToObj(i -> new Entity(TestGroups.ENTITY, \"v...
{ "fields": [ { "declarator": "MAX_SAMPLED_ELEMENTS_DEFAULT = 10000000", "modifier": "public static final", "original_string": "public static final int MAX_SAMPLED_ELEMENTS_DEFAULT = 10000000;", "type": "int", "var_name": "MAX_SAMPLED_ELEMENTS_DEFAULT" }, { "declarator"...
{ "body": "@Override\n public List<T> doOperation(final SampleElementsForSplitPoints<T> operation, final Context context, final Store store) throws OperationException {\n final S typedStore = (S) store;\n\n validate(operation, typedStore);\n\n final Integer numSplits = getNumSplits(operation, ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_225
{ "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 shouldGetFilterFunctions() {\n // When\n final Set<Class> classes = (Set<Class>) service.getFilterFunction(null).getEntity();\n\n // Then\n assertThat(classes, IsCollectionContaining.hasItem(IsA.class));\n }", "class_method_signature": "GraphConfigura...
{ "fields": [ { "declarator": "graphFactory", "modifier": "@Inject\n private", "original_string": "@Inject\n private GraphFactory graphFactory;", "type": "GraphFactory", "var_name": "graphFactory" }, { "declarator": "userFactory", "modifier": "@Inject\n p...
{ "body": "@Override\n public Response getFilterFunction() {\n return Response.ok(ReflectionUtil.getSubTypes(Predicate.class))\n .header(GAFFER_MEDIA_TYPE_HEADER, GAFFER_MEDIA_TYPE)\n .build();\n }", "class_method_signature": "GraphConfigurationServiceV2.getFilterFunction(...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_730
{ "fields": [ { "declarator": "context", "modifier": "private", "original_string": "private Context context;", "type": "Context", "var_name": "context" }, { "declarator": "store", "modifier": "private", "original_string": "private Store store;", "type"...
{ "body": "@Test\n public void shouldFlatMapMultipleObjects() throws OperationException {\n // Given\n final MapHandler<Iterable<Iterable<Integer>>, Iterable<Integer>> handler = new MapHandler<>();\n\n final Map<Iterable<Iterable<Integer>>, Iterable<Integer>> operation = new Map.Builder<Iterab...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/MapHandler.java", "identifier": "MapHandler", "interfaces": "implements OutputOperationHandler<Map<I, O>, O>", "methods": [ { "class_method_signature": "MapHandler.doOperation(final Map<I, O> operation, fina...
{ "body": "@Override\n public O doOperation(final Map<I, O> operation, final Context context, final Store store) throws OperationException {\n if (null == operation) {\n throw new OperationException(\"Operation cannot be null\");\n }\n\n Object input = operation.getInput();\n\n ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_360
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/comparison/ComparableOrToStringComparatorTest.java", "identifier": "ComparableOrToStringComparatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldMatchStringComparisonInReverse() {\n final ComparableOrToStringComparator comparator = new ComparableOrToStringComparator();\n\n final int result = comparator.compare(\"2\", \"1\");\n\n assertTrue(result > 0, \"Both should be less than 0\");\n }", "cla...
{ "fields": [], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/comparison/ComparableOrToStringComparator.java", "identifier": "ComparableOrToStringComparator", "interfaces": "implements Comparator<Object>, Serializable", "methods": [ { "class_method_signature": "ComparableOrToStrin...
{ "body": "@Override\n public int compare(final Object vertex1, final Object vertex2) {\n if (null == vertex1) {\n if (null == vertex2) {\n return 0;\n }\n return 1;\n }\n\n if (null == vertex2) {\n return -1;\n }\n\n if ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1348
{ "fields": [], "file": "library/sketches-library/src/test/java/uk/gov/gchq/gaffer/sketches/datasketches/sampling/serialisation/ReservoirNumbersUnionSerialiserTest.java", "identifier": "ReservoirNumbersUnionSerialiserTest", "interfaces": "", "superclass": "extends ViaCalculatedArrayValueSerialiserTest<Reservo...
{ "body": "@Test\n public void testCanHandleReservoirItemsUnion() {\n assertTrue(serialiser.canHandle(ReservoirItemsUnion.class));\n assertFalse(serialiser.canHandle(String.class));\n }", "class_method_signature": "ReservoirNumbersUnionSerialiserTest.testCanHandleReservoirItemsUnion()", "const...
{ "fields": [ { "declarator": "serialVersionUID = -1935225742362536044L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1935225742362536044L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "SER...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return ReservoirItemsUnion.class.equals(clazz);\n }", "class_method_signature": "ReservoirNumbersUnionSerialiser.canHandle(final Class clazz)", "constructor": false, "full_signature": "@Override public boolean canHandle(final Cl...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_419
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/element/function/ExtractIdTest.java", "identifier": "ExtractIdTest", "interfaces": "", "superclass": "extends FunctionTest" }
{ "body": "@Test\n public void shouldReturnValueOfIdentifierType() {\n final Element element = mock(Element.class);\n final IdentifierType type = IdentifierType.SOURCE;\n final String value = \"testSource\";\n\n final ExtractId extractor = new ExtractId(type);\n\n given(element.g...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private IdentifierType id;", "type": "IdentifierType", "var_name": "id" } ], "file": "core/data/src/main/java/uk/gov/gchq/gaffer/data/element/function/ExtractId.java", "identifier": "ExtractId", ...
{ "body": "@Override\n public Object apply(final Element element) {\n return null != element ? element.getIdentifier(id) : null;\n }", "class_method_signature": "ExtractId.apply(final Element element)", "constructor": false, "full_signature": "@Override public Object apply(final Element element)", ...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1061
{ "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 shouldThrowExceptionWhenUpdateInstanceWithInvalidClassName() throws Exception {\n // Given\n System.setProperty(JSONSerialiser.JSON_SERIALISER_CLASS_KEY, \"invalidClassName\");\n\n // When / Then\n try {\n JSONSerialiser.update();\n f...
{ "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": "@Deprecated\n public static void update(final String jsonSerialiserClass, final String jsonSerialiserModules) {\n update(jsonSerialiserClass, jsonSerialiserModules, null);\n }", "class_method_signature": "JSONSerialiser.update(final String jsonSerialiserClass, final String jsonSerialiserModu...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1124
{ "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 shouldAddAllOperationsWithFirstAuthsGivenPath() throws IOException {\n // Given\n AddOperationsToChain hook = fromJson(ADD_OPERATIONS_TO_CHAIN_RESOURCE_PATH);\n\n User user = new User.Builder().opAuths(\"auth1\", \"auth2\").build();\n\n Operation discardOu...
{ "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_272
{ "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 shouldReturnTrueWhenViewHasPostAggEdgeFilters() {\n // Given\n final View view = new View.Builder()\n .entity(TestGroups.ENTITY)\n .edge(TestGroups.EDGE, new ViewElementDefinition.Builder()\n .postAggregationFilter(ne...
{ "fields": [ { "declarator": "globalElements", "modifier": "private", "original_string": "private List<GlobalViewElementDefinition> globalElements;", "type": "List<GlobalViewElementDefinition>", "var_name": "globalElements" }, { "declarator": "globalEntities", "m...
{ "body": "public boolean hasPostAggregationFilters() {\n return hasFilters(ViewElementDefinition::hasPostAggregationFilters);\n }", "class_method_signature": "View.hasPostAggregationFilters()", "constructor": false, "full_signature": "public boolean hasPostAggregationFilters()", "identifier": "hasP...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_788
{ "fields": [ { "declarator": "store = mock(Store.class)", "modifier": "private final", "original_string": "private final Store store = mock(Store.class);", "type": "Store", "var_name": "store" }, { "declarator": "context = new Context()", "modifier": "private fin...
{ "body": "@Test\n public void shouldFailValidationWhenSchemaElementDefinitionsAreNull() {\n // Given\n given(store.getSchema()).willReturn(new Schema());\n\n input.add(edge);\n input.add(edge1);\n\n edges.put(TestGroups.EDGE, new AggregatePair());\n\n final Aggregate aggr...
{ "fields": [ { "declarator": "validator = new AggregateValidator()", "modifier": "private final", "original_string": "private final FunctionValidator<Aggregate> validator = new AggregateValidator();", "type": "FunctionValidator<Aggregate>", "var_name": "validator" } ], "file...
{ "body": "@Override\n public Iterable<? extends Element> doOperation(final Aggregate operation, final Context context, final Store store) throws OperationException {\n return doOperation(operation, store.getSchema());\n }", "class_method_signature": "AggregateHandler.doOperation(final Aggregate operat...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_622
{ "fields": [ { "declarator": "user = new User(\"user01\")", "modifier": "private final", "original_string": "private final User user = new User(\"user01\");", "type": "User", "var_name": "user" }, { "declarator": "context = new Context(user)", "modifier": "privat...
{ "body": "@Test\n public void shouldUpdateJsonSerialiser() throws StoreException {\n // Given\n final StoreProperties properties = mock(StoreProperties.class);\n given(properties.getJsonSerialiserClass()).willReturn(TestCustomJsonSerialiser1.class.getName());\n given(properties.getJson...
{ "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 initialise(final String graphId, final Schema schema, final StoreProperties properties) throws StoreException {\n LOGGER.debug(\"Initialising {}\", getClass().getSimpleName());\n if (null == graphId) {\n throw new IllegalArgumentException(\"graphId is required\");\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_337
{ "fields": [], "file": "core/data/src/test/java/uk/gov/gchq/gaffer/data/graph/adjacency/PrunedAdjacencyMapsTest.java", "identifier": "PrunedAdjacencyMapsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldPruneRecursively() {\n // Given\n final AdjacencyMaps adjacencyMaps = new PrunedAdjacencyMaps();\n\n final AdjacencyMap first = new AdjacencyMap();\n first.putEdge(1, 2, makeEdge(1, 2));\n first.putEdge(1, 3, makeEdge(1, 3));\n\n final ...
{ "fields": [ { "declarator": "adjacencyMaps = new ArrayList<>()", "modifier": "private final", "original_string": "private final List<AdjacencyMap> adjacencyMaps = new ArrayList<>();", "type": "List<AdjacencyMap>", "var_name": "adjacencyMaps" } ], "file": "core/data/src/main...
{ "body": "@Override\n public void add(final AdjacencyMap adjacencyMap) {\n removeOrphans(adjacencyMaps, adjacencyMap);\n adjacencyMaps.add(adjacencyMap);\n }", "class_method_signature": "PrunedAdjacencyMaps.add(final AdjacencyMap adjacencyMap)", "constructor": false, "full_signature": "@Ove...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_767
{ "fields": [ { "declarator": "store = mock(Store.class)", "modifier": "private final", "original_string": "private final Store store = mock(Store.class);", "type": "Store", "var_name": "store" }, { "declarator": "context = new Context(new User())", "modifier": "p...
{ "body": "@Test\n public void shouldReturnInitialInputForNullOperations() throws OperationException {\n // Given\n final Object input = Arrays.asList(new EntitySeed(\"1\"), new EntitySeed(\"2\"));\n final Conditional conditional = mock(Conditional.class);\n final Predicate<Object> pred...
{ "fields": [], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/IfHandler.java", "identifier": "IfHandler", "interfaces": "implements OutputOperationHandler<If<Object, Object>, Object>", "methods": [ { "class_method_signature": "IfHandler.doOperation(final If operation, ...
{ "body": "@Override\n public Object doOperation(final If operation, final Context context, final Store store) throws OperationException {\n final Object input = operation.getInput();\n\n boolean computedCondition;\n\n if (null == operation.getCondition()) {\n if (null == operation....
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...
47973088_1036
{ "fields": [], "file": "core/serialisation/src/test/java/uk/gov/gchq/gaffer/serialisation/implementation/TreeSetStringSerialiserTest.java", "identifier": "TreeSetStringSerialiserTest", "interfaces": "", "superclass": "extends ToBytesSerialisationTest<TreeSet<String>>" }
{ "body": "@Test\n public void shouldNotBeAbleToHandleAHashSet() {\n // Given\n final Class testClass = HashSet.class;\n\n // When\n final boolean canHandle = serialiser.canHandle(testClass);\n\n // Then\n assertFalse(canHandle);\n }", "class_method_signature": "TreeS...
{ "fields": [ { "declarator": "serialVersionUID = -8241328807929077861L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8241328807929077861L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "COM...
{ "body": "@Override\n public boolean canHandle(final Class clazz) {\n return TreeSet.class.isAssignableFrom(clazz);\n }", "class_method_signature": "TreeSetStringSerialiser.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_858
{ "fields": [ { "declarator": "EMPTY_ADMIN_AUTH = \"\"", "modifier": "private static final", "original_string": "private static final String EMPTY_ADMIN_AUTH = \"\";", "type": "String", "var_name": "EMPTY_ADMIN_AUTH" }, { "declarator": "mockCache = mock(NamedOperationCa...
{ "body": "@Test\n public void shouldAddNamedOperationFieldsToNamedOperationDetailCorrectly() throws OperationException, CacheOperationFailedException {\n final List<String> readAuths = asList(\"readAuth1\", \"readAuth2\");\n final List<String> writeAuths = asList(\"writeAuth1\", \"writeAuth2\");\n ...
{ "fields": [ { "declarator": "cache", "modifier": "private final", "original_string": "private final NamedOperationCache cache;", "type": "NamedOperationCache", "var_name": "cache" } ], "file": "core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/named/AddNam...
{ "body": "@Override\n public Void doOperation(final AddNamedOperation operation, final Context context, final Store store) throws OperationException {\n try {\n final NamedOperationDetail namedOperationDetail = new NamedOperationDetail.Builder()\n .operationChain(operation.get...
{ "created": "12/14/2015 12:12:39 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 47973088, "size": null, "stargazer_count": null, "stars": 1568, "updates": "2020-01-27T21:51:26+00:00", "url": "https://github.com/gchq/Gaffer" ...