id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
63372616_53
{ "fields": [ { "declarator": "supplier", "modifier": "private", "original_string": "private CollectionSupplier<?> supplier;", "type": "CollectionSupplier<?>", "var_name": "supplier" } ], "file": "artemis/artemis-core/src/test/java/org/eclipse/jnosql/artemis/reflection/collec...
{ "body": "@Test\n public void shouldGet() {\n final Collection<?> collection = this.supplier.get();\n Assertions.assertNotNull(collection);\n Assertions.assertTrue(collection instanceof TreeSet);\n }", "class_method_signature": "TreeSetSupplierTest.shouldGet()", "constructor": false, ...
{ "fields": [], "file": "artemis/artemis-core/src/main/java/org/eclipse/jnosql/artemis/reflection/collection/TreeSetSupplier.java", "identifier": "TreeSetSupplier", "interfaces": "implements CollectionSupplier<TreeSet<?>>", "methods": [ { "class_method_signature": "TreeSetSupplier.test(Class<?> type...
{ "body": "@Override\n public TreeSet<?> get() {\n return new TreeSet<>();\n }", "class_method_signature": "TreeSetSupplier.get()", "constructor": false, "full_signature": "@Override public TreeSet<?> get()", "identifier": "get", "invocations": [], "modifiers": "@Override public", "paramete...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_259
{ "fields": [], "file": "diana/diana-key-value/src/test/java/org/eclipse/jnosql/diana/keyvalue/DefaultKeyValueEntityTest.java", "identifier": "DefaultKeyValueEntityTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetValue() {\n Value value = Value.of(\"value\");\n KeyValueEntity entity = KeyValueEntity.of(\"key\", value);\n assertNotNull(entity);\n assertEquals(\"value\", entity.getValue());\n }", "class_method_signature": "DefaultKeyValueEntityTest.shou...
{ "fields": [ { "declarator": "key", "modifier": "private final", "original_string": "private final Object key;", "type": "Object", "var_name": "key" }, { "declarator": "value", "modifier": "private final", "original_string": "private final Value value;", ...
{ "body": "@Override\n public Object getValue() {\n return value.get();\n }", "class_method_signature": "DefaultKeyValueEntity.getValue()", "constructor": false, "full_signature": "@Override public Object getValue()", "identifier": "getValue", "invocations": [ "get" ], "modifiers": "@Ov...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_170
{ "fields": [], "file": "artemis/artemis-graph/src/test/java/org/eclipse/jnosql/artemis/graph/DefaultVertexTraversalTest.java", "identifier": "DefaultVertexTraversalTest", "interfaces": "", "superclass": "extends AbstractTraversalTest" }
{ "body": "@Test\n public void shouldDefineLimit2() {\n List<Person> people = graphTemplate.getTraversalVertex(otavio.getId(), poliana.getId(), paulo.getId()).\n <Person>next(2)\n .collect(toList());\n\n assertEquals(2, people.size());\n assertThat(people, Matcher...
{ "fields": [ { "declarator": "IS_EMPTY = String::isEmpty", "modifier": "private static final", "original_string": "private static final Predicate<String> IS_EMPTY = String::isEmpty;", "type": "Predicate<String>", "var_name": "IS_EMPTY" }, { "declarator": "NOT_EMPTY = I...
{ "body": "@Override\n public <T> Optional<T> next() {\n Optional<Vertex> vertex = flow.apply(supplier.get()).tryNext();\n return vertex.map(converter::toEntity);\n }", "class_method_signature": "DefaultVertexTraversal.next()", "constructor": false, "full_signature": "@Override public Option...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_127
{ "fields": [], "file": "artemis/artemis-graph/src/test/java/org/eclipse/jnosql/artemis/graph/DefaultEdgeTraversalTest.java", "identifier": "DefaultEdgeTraversalTest", "interfaces": "", "superclass": "extends AbstractTraversalTest" }
{ "body": "@Test\n public void shouldReturnBothEWithSupplier() {\n List<EdgeEntity> edges = graphTemplate.getTraversalVertex().bothE(() -> READS)\n .stream()\n .collect(toList());\n\n assertEquals(6, edges.size());\n }", "class_method_signature": "DefaultEdgeTravers...
{ "fields": [], "file": "artemis/artemis-graph/src/main/java/org/eclipse/jnosql/artemis/graph/DefaultEdgeTraversal.java", "identifier": "DefaultEdgeTraversal", "interfaces": "implements EdgeTraversal", "methods": [ { "class_method_signature": "DefaultEdgeTraversal.DefaultEdgeTraversal(Supplier<Graph...
{ "body": "@Override\n public Stream<EdgeEntity> stream() {\n return flow.apply(supplier.get()).toList().stream().map(converter::toEdgeEntity);\n }", "class_method_signature": "DefaultEdgeTraversal.stream()", "constructor": false, "full_signature": "@Override public Stream<EdgeEntity> stream()", ...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_12
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n private", "original_string": "@Inject\n private ColumnEntityConverter converter;", "type": "ColumnEntityConverter", "var_name": "converter" }, { "declarator": "classMappings", "modifier": "@In...
{ "body": "@Test\n public void shouldGetAsStream() {\n Pagination pagination = Pagination.page(1).size(1);\n Page<Person> page = createPage(pagination);\n\n Stream<Person> stream = page.get();\n assertNotNull(stream);\n assertEquals(1L, stream.count());\n }", "class_method_s...
{ "fields": [ { "declarator": "template", "modifier": "private final", "original_string": "private final ColumnTemplate template;", "type": "ColumnTemplate", "var_name": "template" }, { "declarator": "entities", "modifier": "private final", "original_string"...
{ "body": "@Override\n public Stream<T> get() {\n return getEntities();\n }", "class_method_signature": "ColumnPage.get()", "constructor": false, "full_signature": "@Override public Stream<T> get()", "identifier": "get", "invocations": [ "getEntities" ], "modifiers": "@Override public",...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_218
{ "fields": [], "file": "artemis/artemis-graph/src/test/java/org/eclipse/jnosql/artemis/graph/GraphTransactionUtilTest.java", "identifier": "GraphTransactionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFalse() {\n synchronized (GraphTransactionUtil.class) {\n System.setProperty(GraphTransactionUtil.TRANSACTION_KEY, Boolean.FALSE.toString());\n Assertions.assertFalse(GraphTransactionUtil.isAutomatic());\n System.clearProperty(Graph...
{ "fields": [ { "declarator": "TRANSACTION_KEY = \"jakarta.nosql.transaction.automatic\"", "modifier": "static final", "original_string": "static final String TRANSACTION_KEY = \"jakarta.nosql.transaction.automatic\";", "type": "String", "var_name": "TRANSACTION_KEY" }, { ...
{ "body": "static boolean isAutomatic() {\n return SettingsPriority.get(TRANSACTION_KEY)\n .map(Object::toString)\n .map(Boolean::valueOf)\n .orElse(true);\n }", "class_method_signature": "GraphTransactionUtil.isAutomatic()", "constructor": false, "full_sig...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_131
{ "fields": [], "file": "artemis/artemis-graph/src/test/java/org/eclipse/jnosql/artemis/graph/DefaultEdgeTraversalTest.java", "identifier": "DefaultEdgeTraversalTest", "interfaces": "", "superclass": "extends AbstractTraversalTest" }
{ "body": "@Test\n public void shouldReturnErrorWhenHasNotIsNull() {\n assertThrows(NullPointerException.class, () -> graphTemplate.getTraversalVertex().outE(READS).hasNot((String) null));\n }", "class_method_signature": "DefaultEdgeTraversalTest.shouldReturnErrorWhenHasNotIsNull()", "constructor": f...
{ "fields": [], "file": "artemis/artemis-graph/src/main/java/org/eclipse/jnosql/artemis/graph/DefaultEdgeTraversal.java", "identifier": "DefaultEdgeTraversal", "interfaces": "implements EdgeTraversal", "methods": [ { "class_method_signature": "DefaultEdgeTraversal.DefaultEdgeTraversal(Supplier<Graph...
{ "body": "@Override\n public EdgeTraversal hasNot(String propertyKey) {\n requireNonNull(propertyKey, \"propertyKey is required\");\n return new DefaultEdgeTraversal(supplier, flow.andThen(g -> g.hasNot(propertyKey)), converter);\n }", "class_method_signature": "DefaultEdgeTraversal.hasNot(Stri...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_45
{ "fields": [ { "declarator": "readerFactory", "modifier": "@Inject\n private", "original_string": "@Inject\n private ReflectionFieldReaderFactory readerFactory;", "type": "ReflectionFieldReaderFactory", "var_name": "readerFactory" } ], "file": "artemis/artemis-core/src...
{ "body": "@Test\n public void shouldReturnFieldReader() {\n Person person = Person.builder().withId(10L).withAge(10).withName(\"Ada\").withPhones(singletonList(\"234234324\")).build();\n Field[] fields = Person.class.getDeclaredFields();\n Field id = Stream.of(fields).filter(f -> f.getName()....
{ "fields": [ { "declarator": "reflections", "modifier": "private", "original_string": "private Reflections reflections;", "type": "Reflections", "var_name": "reflections" } ], "file": "artemis/artemis-core/src/main/java/org/eclipse/jnosql/artemis/reflection/ReflectionFieldRe...
{ "body": "@Override\n public FieldReader apply(Field field) {\n Objects.requireNonNull(field, \"field is required\");\n return bean -> reflections.getValue(bean, field);\n }", "class_method_signature": "ReflectionFieldReaderFactory.apply(Field field)", "constructor": false, "full_signature"...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_166
{ "fields": [ { "declarator": "subject", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private DefaultGraphEventPersistManager subject;", "type": "DefaultGraphEventPersistManager", "var_name": "subject" }, { "declarator": "graphEntityPre...
{ "body": "@Test\n public void shouldFirePostEntity() {\n Jedi jedi = new Jedi();\n jedi.name = \"Luke\";\n subject.firePostEntity(jedi);\n ArgumentCaptor<EntityPostPersit> captor = ArgumentCaptor.forClass(EntityPostPersit.class);\n verify(entityPostPersistEvent).fire(captor.capt...
{ "fields": [ { "declarator": "graphEntityPrePersistEvent", "modifier": "@Inject\n private", "original_string": "@Inject\n private Event<GraphEntityPrePersist> graphEntityPrePersistEvent;", "type": "Event<GraphEntityPrePersist>", "var_name": "graphEntityPrePersistEvent" }, ...
{ "body": "@Override\n public <T> void firePostEntity(T entity) {\n entityPostPersistEvent.fire(new DefaultEntityPostPersist(entity));\n }", "class_method_signature": "DefaultGraphEventPersistManager.firePostEntity(T entity)", "constructor": false, "full_signature": "@Override public void firePostE...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_189
{ "fields": [], "file": "artemis/artemis-graph/src/test/java/org/eclipse/jnosql/artemis/graph/AbstractGraphConverterTest.java", "identifier": "AbstractGraphConverterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldConvertEntityToTinkerPopVertexUsingNativeName() {\n Movie movie = new Movie(\"Matrix\", 1999, null);\n Vertex vertex = getConverter().toVertex(movie);\n\n assertEquals(\"movie\", vertex.label());\n assertEquals(1999, ((Number) vertex.value(\"movie_ye...
{ "fields": [], "file": "artemis/artemis-graph/src/main/java/org/eclipse/jnosql/artemis/graph/AbstractGraphConverter.java", "identifier": "AbstractGraphConverter", "interfaces": "implements GraphConverter", "methods": [ { "class_method_signature": "AbstractGraphConverter.getClassMappings()", "...
{ "body": "@Override\n public <T> Vertex toVertex(T entity) {\n requireNonNull(entity, \"entity is required\");\n\n ClassMapping mapping = getClassMappings().get(entity.getClass());\n String label = mapping.getName();\n\n List<FieldGraph> fields = mapping.getFields().stream()\n ...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_234
{ "fields": [ { "declarator": "subject", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private DefaultDocumentEventPersistManager subject;", "type": "DefaultDocumentEventPersistManager", "var_name": "subject" }, { "declarator": "document...
{ "body": "@Test\n public void shouldFirePreDocumentEntity() {\n Jedi jedi = new Jedi();\n jedi.name = \"Luke\";\n subject.firePreDocumentEntity(jedi);\n ArgumentCaptor<EntityDocumentPrePersist> captor = ArgumentCaptor.forClass(EntityDocumentPrePersist.class);\n verify(entityDocu...
{ "fields": [ { "declarator": "documentEntityPrePersistEvent", "modifier": "@Inject\n private", "original_string": "@Inject\n private Event<DocumentEntityPrePersist> documentEntityPrePersistEvent;", "type": "Event<DocumentEntityPrePersist>", "var_name": "documentEntityPrePersis...
{ "body": "@Override\n public <T> void firePreDocumentEntity(T entity) {\n entityDocumentPrePersist.fire(new DefaultEntityDocumentPrePersist(entity));\n }", "class_method_signature": "DefaultDocumentEventPersistManager.firePreDocumentEntity(T entity)", "constructor": false, "full_signature": "@Over...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_371
{ "fields": [], "file": "diana/diana-core/src/test/java/org/eclipse/jnosql/diana/DefaultSettingsTest.java", "identifier": "DefaultSettingsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnErrorWhenPrefixIsNull() {\n Settings settings = Settings.builder()\n .put(\"host\", \"host\")\n .put(\"host-1\", \"host-1\")\n .put(\"host-2\", \"host-2\")\n .put(\"host-3\", \"host-3\")\n ....
{ "fields": [ { "declarator": "configurations", "modifier": "private final", "original_string": "private final Map<String, Object> configurations;", "type": "Map<String, Object>", "var_name": "configurations" } ], "file": "diana/diana-core/src/main/java/org/eclipse/jnosql/dia...
{ "body": "@Override\n public List<Object> prefix(String prefix) {\n Objects.requireNonNull(prefix, \"prefix is required\");\n return configurations.entrySet().stream()\n .filter(e -> e.getKey().startsWith(prefix))\n .sorted(Comparator.comparing(Map.Entry::getKey))\n ...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_263
{ "fields": [], "file": "diana/diana-query/src/test/java/org/eclipse/jnosql/diana/query/method/MethodQueryTest.java", "identifier": "MethodQueryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnNullWhenQueryIsNull() {\n Assertions.assertThrows(NullPointerException.class, () -> MethodQuery.of(null));\n }", "class_method_signature": "MethodQueryTest.shouldReturnNullWhenQueryIsNull()", "constructor": false, "full_signature": "@Test public void shoul...
{ "fields": [ { "declarator": "value", "modifier": "private final", "original_string": "private final String value;", "type": "String", "var_name": "value" }, { "declarator": "PATTERN = Pattern.compile(\"findBy|deleteBy|OrderBy|And|Or(?!der)|Not|Equals|GreaterThanEqual|...
{ "body": "public static MethodQuery of(String query) {\n Objects.requireNonNull(query, \"query is required\");\n String value = CACHE.get(query);\n if (Objects.isNull(value)) {\n value = PATTERN.matcher(query).replaceAll(\" $0 \").trim();\n CACHE.put(query, value);\n ...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_86
{ "fields": [], "file": "artemis/artemis-core/src/test/java/org/eclipse/jnosql/artemis/repository/DynamicReturnTest.java", "identifier": "DynamicReturnTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldShouldFindSortsAtMethod() {\n Sort name = Sort.asc(\"name\");\n Sort age = Sort.desc(\"age\");\n List<Sort> sorts = DynamicReturn.findSorts(new Object[]{\"Otavio\", 23, Pagination.page(2).size(2), sorts().add(name).add(age)});\n assertThat(sorts, Mat...
{ "fields": [ { "declarator": "IS_PAGINATION = Pagination.class::isInstance", "modifier": "private static final", "original_string": "private static final Predicate<Object> IS_PAGINATION = Pagination.class::isInstance;", "type": "Predicate<Object>", "var_name": "IS_PAGINATION" },...
{ "body": "public static List<Sort> findSorts(Object[] params) {\n if (params == null || params.length == 0) {\n return Collections.emptyList();\n }\n\n List<Sort> sorts = new ArrayList<>();\n for (Object param : Arrays.asList(params)) {\n if (param instanceof Sort) {...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_326
{ "fields": [ { "declarator": "referenceReader = new ListTypeReferenceReader()", "modifier": "private", "original_string": "private TypeReferenceReader referenceReader = new ListTypeReferenceReader();", "type": "TypeReferenceReader", "var_name": "referenceReader" } ], "file":...
{ "body": "@Test\n public void shouldNotBeCompatible() {\n assertFalse(referenceReader.test(new TypeReference<ArrayList<BigDecimal>>() {\n }));\n assertFalse(referenceReader.test(new TypeReference<String>() {\n }));\n assertFalse(referenceReader.test(new TypeReference<Set<String>...
{ "fields": [ { "declarator": "SERVICE_PROVIDER = ValueReaderDecorator.getInstance()", "modifier": "private static final transient", "original_string": "private static final transient ValueReader SERVICE_PROVIDER = ValueReaderDecorator.getInstance();", "type": "ValueReader", "var_nam...
{ "body": "@Override\n public boolean test(TypeSupplier<?> typeReference) {\n Type type = typeReference.get();\n if (ParameterizedType.class.isInstance(type)) {\n ParameterizedType parameterizedType = ParameterizedType.class.cast(type);\n\n return (List.class.equals(parameterize...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_69
{ "fields": [], "file": "artemis/artemis-core/src/test/java/org/eclipse/jnosql/artemis/reflection/FieldTypeUtilTest.java", "identifier": "FieldTypeUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnEmbedded() throws NoSuchFieldException{\n Field field = Worker.class.getDeclaredField(\"job\");\n assertEquals(FieldType.EMBEDDED, FieldTypeUtil.of(field));\n }", "class_method_signature": "FieldTypeUtilTest.shouldReturnEmbedded()", "constructor": fal...
{ "fields": [], "file": "artemis/artemis-core/src/main/java/org/eclipse/jnosql/artemis/reflection/FieldTypeUtil.java", "identifier": "FieldTypeUtil", "interfaces": "", "methods": [ { "class_method_signature": "FieldTypeUtil.FieldTypeUtil()", "constructor": true, "full_signature": "privat...
{ "body": "public static FieldType of(Field field) {\n if (Collection.class.isAssignableFrom(field.getType())) {\n return FieldType.COLLECTION;\n }\n if (Map.class.isAssignableFrom(field.getType())) {\n return FieldType.MAP;\n }\n if (field.getType().isAnnotati...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_90
{ "fields": [ { "declarator": "repositoryReturn = new QueueRepositoryReturn()", "modifier": "private final", "original_string": "private final RepositoryReturn repositoryReturn = new QueueRepositoryReturn();", "type": "RepositoryReturn", "var_name": "repositoryReturn" }, { ...
{ "body": "@Test\n public void shouldReturnLinkedListPage() {\n Person ada = new Person(\"Ada\");\n DynamicReturn<Person> dynamic = DynamicReturn.builder()\n .withClassSource(Person.class)\n .withSingleResult(Optional::empty)\n .withResult(Collections::emp...
{ "fields": [], "file": "artemis/artemis-core/src/main/java/org/eclipse/jnosql/artemis/repository/returns/QueueRepositoryReturn.java", "identifier": "QueueRepositoryReturn", "interfaces": "", "methods": [ { "class_method_signature": "QueueRepositoryReturn.QueueRepositoryReturn()", "constructor...
{ "body": "@Override\n public <T> Object convertPageable(DynamicReturn<T> dynamicReturn) {\n return dynamicReturn.streamPagination().collect(Collectors.toCollection(LinkedList::new));\n }", "class_method_signature": "QueueRepositoryReturn.convertPageable(DynamicReturn<T> dynamicReturn)", "constructor...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_275
{ "fields": [], "file": "diana/diana-core/src/test/java/org/eclipse/jnosql/diana/DefaultValueTest.java", "identifier": "DefaultValueTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldIsInstanceOf() {\n Assertions.assertTrue(Value.of(\"12\").isInstanceOf(String.class));\n Assertions.assertFalse(Value.of(\"12\").isInstanceOf(Integer.class));\n }", "class_method_signature": "DefaultValueTest.shouldIsInstanceOf()", "constructor": false, "...
{ "fields": [ { "declarator": "SERVICE_PROVIDER = ValueReaderDecorator.getInstance()", "modifier": "private static final transient", "original_string": "private static final transient ValueReader SERVICE_PROVIDER = ValueReaderDecorator.getInstance();", "type": "ValueReader", "var_nam...
{ "body": "@Override\n public boolean isInstanceOf(Class<?> typeClass) {\n Objects.requireNonNull(typeClass, \"typeClass is required\");\n return typeClass.isInstance(value);\n }", "class_method_signature": "DefaultValue.isInstanceOf(Class<?> typeClass)", "constructor": false, "full_signatur...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_330
{ "fields": [ { "declarator": "valueReader", "modifier": "private", "original_string": "private ValueReader valueReader;", "type": "ValueReader", "var_name": "valueReader" } ], "file": "diana/diana-core/src/test/java/org/eclipse/jnosql/diana/reader/BigDecimalReaderTest.java",...
{ "body": "@Test\n public void shouldValidateCompatibility() {\n assertTrue(valueReader.test(BigDecimal.class));\n assertFalse(valueReader.test(AtomicBoolean.class));\n assertFalse(valueReader.test(Boolean.class));\n }", "class_method_signature": "BigDecimalReaderTest.shouldValidateCompat...
{ "fields": [], "file": "diana/diana-core/src/main/java/org/eclipse/jnosql/diana/reader/BigDecimalReader.java", "identifier": "BigDecimalReader", "interfaces": "implements ValueReader", "methods": [ { "class_method_signature": "BigDecimalReader.test(Class<?> type)", "constructor": false, ...
{ "body": "@Override\n public boolean test(Class<?> type) {\n return BigDecimal.class.equals(type);\n }", "class_method_signature": "BigDecimalReader.test(Class<?> type)", "constructor": false, "full_signature": "@Override public boolean test(Class<?> type)", "identifier": "test", "invocations"...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_222
{ "fields": [ { "declarator": "queryMapper", "modifier": "@Inject\n private", "original_string": "@Inject\n private DocumentQueryMapper queryMapper;", "type": "DocumentQueryMapper", "var_name": "queryMapper" } ], "file": "artemis/artemis-document/src/test/java/org/eclip...
{ "body": "@Test\n public void shouldReturnDeleteFrom() {\n DocumentMapperDeleteFrom deleteFrom = queryMapper.deleteFrom(Person.class);\n assertNotNull(deleteFrom);\n }", "class_method_signature": "DefaultDocumentQueryMapperTest.shouldReturnDeleteFrom()", "constructor": false, "full_signatur...
{ "fields": [ { "declarator": "mappings", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<ClassMappings> mappings;", "type": "Instance<ClassMappings>", "var_name": "mappings" }, { "declarator": "converters", "modifier": "@Inje...
{ "body": "@Override\n public <T> DocumentMapperDeleteFrom deleteFrom(Class<T> entityClass) {\n requireNonNull(entityClass, \"entity is required\");\n ClassMapping mapping = mappings.get().get(entityClass);\n return new DefaultDocumentMapperDeleteBuilder(mapping, converters.get());\n }", ...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_388
{ "fields": [ { "declarator": "lte = ColumnCondition.lte(Column.of(\"salary\", 10.32))", "modifier": "private final", "original_string": "private final ColumnCondition lte = ColumnCondition.lte(Column.of(\"salary\", 10.32));", "type": "ColumnCondition", "var_name": "lte" } ], ...
{ "body": "@Test\n public void shouldReturnErrorWhenColumnIsNull() {\n assertThrows(NullPointerException.class, () -> DefaultColumnCondition.of(null, Condition.AND));\n }", "class_method_signature": "DefaultColumnConditionTest.shouldReturnErrorWhenColumnIsNull()", "constructor": false, "full_signat...
{ "fields": [ { "declarator": "column", "modifier": "private final", "original_string": "private final Column column;", "type": "Column", "var_name": "column" }, { "declarator": "condition", "modifier": "private final", "original_string": "private final Cond...
{ "body": "static DefaultColumnCondition of(Column column, Condition condition) {\n return new DefaultColumnCondition(requireNonNull(column, \"Column is required\"), condition);\n }", "class_method_signature": "DefaultColumnCondition.of(Column column, Condition condition)", "constructor": false, "full...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_28
{ "fields": [ { "declarator": "subject", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private DefaultColumnEventPersistManager subject;", "type": "DefaultColumnEventPersistManager", "var_name": "subject" }, { "declarator": "columnEntity...
{ "body": "@Test\n public void shouldFirePreColumnEntity() {\n Jedi jedi = new Jedi();\n jedi.name = \"Luke\";\n subject.firePreColumnEntity(jedi);\n ArgumentCaptor<EntityColumnPrePersist> captor = ArgumentCaptor.forClass(EntityColumnPrePersist.class);\n verify(entityColumnPrePer...
{ "fields": [ { "declarator": "columnEntityPrePersistEvent", "modifier": "@Inject\n private", "original_string": "@Inject\n private Event<ColumnEntityPrePersist> columnEntityPrePersistEvent;", "type": "Event<ColumnEntityPrePersist>", "var_name": "columnEntityPrePersistEvent" ...
{ "body": "@Override\n public <T> void firePreColumnEntity(T entity) {\n entityColumnPrePersist.fire(new DefaultEntityColumnPrePersist(entity));\n }", "class_method_signature": "DefaultColumnEventPersistManager.firePreColumnEntity(T entity)", "constructor": false, "full_signature": "@Override publi...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_367
{ "fields": [], "file": "diana/diana-core/src/test/java/org/eclipse/jnosql/diana/DefaultSettingsTest.java", "identifier": "DefaultSettingsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldSize() {\n Settings settings = Settings.of(singletonMap(\"key\", \"value\"));\n assertEquals(1, settings.size());\n settings = Settings.of(Collections.emptyMap());\n assertEquals(0, settings.size());\n }", "class_method_signature": "DefaultSetti...
{ "fields": [ { "declarator": "configurations", "modifier": "private final", "original_string": "private final Map<String, Object> configurations;", "type": "Map<String, Object>", "var_name": "configurations" } ], "file": "diana/diana-core/src/main/java/org/eclipse/jnosql/dia...
{ "body": "@Override\n public int size() {\n return configurations.size();\n }", "class_method_signature": "DefaultSettings.size()", "constructor": false, "full_signature": "@Override public int size()", "identifier": "size", "invocations": [ "size" ], "modifiers": "@Override public", ...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_193
{ "fields": [], "file": "artemis/artemis-graph/src/test/java/org/eclipse/jnosql/artemis/graph/AbstractGraphConverterTest.java", "identifier": "AbstractGraphConverterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnToEdgeErrorWhenIsNull() {\n assertThrows(NullPointerException.class, () -> getConverter().toEdge(null));\n }", "class_method_signature": "AbstractGraphConverterTest.shouldReturnToEdgeErrorWhenIsNull()", "constructor": false, "full_signature": "@Test public...
{ "fields": [], "file": "artemis/artemis-graph/src/main/java/org/eclipse/jnosql/artemis/graph/AbstractGraphConverter.java", "identifier": "AbstractGraphConverter", "interfaces": "implements GraphConverter", "methods": [ { "class_method_signature": "AbstractGraphConverter.getClassMappings()", "...
{ "body": "@Override\n public Edge toEdge(EdgeEntity edge) {\n requireNonNull(edge, \"vertex is required\");\n Object id = edge.getId();\n Iterator<Edge> edges = getGraph().edges(id);\n if (edges.hasNext()) {\n return edges.next();\n }\n throw new EntityNotFound...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_310
{ "fields": [ { "declarator": "valueReader", "modifier": "private", "original_string": "private ValueReader valueReader;", "type": "ValueReader", "var_name": "valueReader" } ], "file": "diana/diana-core/src/test/java/org/eclipse/jnosql/diana/reader/BooleanReaderTest.java", ...
{ "body": "@Test\n public void shouldValidateCompatibility() {\n assertTrue(valueReader.test(AtomicBoolean.class));\n assertTrue(valueReader.test(Boolean.class));\n assertFalse(valueReader.test(Number.class));\n }", "class_method_signature": "BooleanReaderTest.shouldValidateCompatibility(...
{ "fields": [], "file": "diana/diana-core/src/main/java/org/eclipse/jnosql/diana/reader/BooleanReader.java", "identifier": "BooleanReader", "interfaces": "implements ValueReader", "methods": [ { "class_method_signature": "BooleanReader.test(Class<?> type)", "constructor": false, "full_si...
{ "body": "@Override\n public boolean test(Class<?> type) {\n return Boolean.class.equals(type) ||\n AtomicBoolean.class.equals(type) ||\n boolean.class.equals(type);\n }", "class_method_signature": "BooleanReader.test(Class<?> type)", "constructor": false, "full_signa...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_255
{ "fields": [ { "declarator": "producer", "modifier": "@Inject\n private", "original_string": "@Inject\n private ReactiveDocumentTemplateProducer producer;", "type": "ReactiveDocumentTemplateProducer", "var_name": "producer" } ], "file": "artemis/artemis-reactive/artemi...
{ "body": "@Test\n public void shouldReturnNPEWhenTemplateIsNull() {\n Assertions.assertThrows(NullPointerException.class, () -> producer.get(null));\n }", "class_method_signature": "DefaultReactiveDocumentTemplateProducerTest.shouldReturnNPEWhenTemplateIsNull()", "constructor": false, "full_signat...
{ "fields": [], "file": "artemis/artemis-reactive/artemis-reactive-document/src/main/java/org/eclipse/jnosql/artemis/document/reactive/DefaultReactiveDocumentTemplateProducer.java", "identifier": "DefaultReactiveDocumentTemplateProducer", "interfaces": "implements ReactiveDocumentTemplateProducer", "methods":...
{ "body": "@Override\n public ReactiveDocumentTemplate get(DocumentTemplate template) {\n Objects.requireNonNull(template, \"template is required\");\n return new ProducerDocumentTemplate(template);\n }", "class_method_signature": "DefaultReactiveDocumentTemplateProducer.get(DocumentTemplate tem...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_347
{ "fields": [ { "declarator": "referenceReader = new MapTypeReferenceReader()", "modifier": "private", "original_string": "private TypeReferenceReader referenceReader = new MapTypeReferenceReader();", "type": "TypeReferenceReader", "var_name": "referenceReader" } ], "file": "...
{ "body": "@Test\n public void shouldConvert() {\n assertEquals(new HashMap<>(singletonMap(\"123\", \"123\")), referenceReader.convert(new TypeReference<Map<String, String>>(){}, singletonMap(123, 123L)));\n assertEquals(singletonMap(123L, 123), referenceReader.convert(new TypeReference<Map<Long, Int...
{ "fields": [ { "declarator": "SERVICE_PROVIDER = ValueReaderDecorator.getInstance()", "modifier": "private static final transient", "original_string": "private static final transient ValueReader SERVICE_PROVIDER = ValueReaderDecorator.getInstance();", "type": "ValueReader", "var_nam...
{ "body": "@Override\n public <T> T convert(TypeSupplier<T> typeReference, Object value) {\n Type type = typeReference.get();\n ParameterizedType parameterizedType = ParameterizedType.class.cast(type);\n Class<?> keyType = (Class<?>) parameterizedType.getActualTypeArguments()[0];\n Clas...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_202
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n private", "original_string": "@Inject\n private GraphConverter converter;", "type": "GraphConverter", "var_name": "converter" }, { "declarator": "graph", "modifier": "@Inject\n private", ...
{ "body": "@Test\n public void shouldExecuteQueryVertex5() {\n List<Person> people = executor.<Person>executeGremlin(graph.traversal(), \"g.V().in('loves').toStream()\")\n .collect(toList());\n List<String> names = people.stream().map(Person::getName).collect(toList());\n assert...
{ "fields": [ { "declarator": "converter", "modifier": "private final", "original_string": "private final GraphConverter converter;", "type": "GraphConverter", "var_name": "converter" }, { "declarator": "ENGINE = new GremlinGroovyScriptEngine()", "modifier": "priv...
{ "body": "<T> Stream<T> executeGremlin(GraphTraversalSource traversalSource, String gremlin) {\n return executeGremlin(traversalSource, gremlin, Collections.emptyMap());\n }", "class_method_signature": "GremlinExecutor.executeGremlin(GraphTraversalSource traversalSource, String gremlin)", "constructor"...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_351
{ "fields": [ { "declarator": "referenceReader = new MapTypeReferenceReader()", "modifier": "private", "original_string": "private TypeReferenceReader referenceReader = new MapTypeReferenceReader();", "type": "TypeReferenceReader", "var_name": "referenceReader" } ], "file": "...
{ "body": "@Test\n public void shouldConvertSubEntryToMap() {\n Entry subEntry = new EntryTest(\"key\", Value.of(\"value\"));\n Entry entry = new EntryTest(\"key\", Value.of(subEntry));\n\n Map<String, Map<String, String>> map = referenceReader.convert(new TypeReference<Map<String, Map<String,...
{ "fields": [ { "declarator": "SERVICE_PROVIDER = ValueReaderDecorator.getInstance()", "modifier": "private static final transient", "original_string": "private static final transient ValueReader SERVICE_PROVIDER = ValueReaderDecorator.getInstance();", "type": "ValueReader", "var_nam...
{ "body": "@Override\n public <T> T convert(TypeSupplier<T> typeReference, Object value) {\n Type type = typeReference.get();\n ParameterizedType parameterizedType = ParameterizedType.class.cast(type);\n Class<?> keyType = (Class<?>) parameterizedType.getActualTypeArguments()[0];\n Clas...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_214
{ "fields": [ { "declarator": "producer", "modifier": "@Inject\n private", "original_string": "@Inject\n private GraphTemplateProducer producer;", "type": "GraphTemplateProducer", "var_name": "producer" } ], "file": "artemis/artemis-graph/src/test/java/org/eclipse/jnosq...
{ "body": "@Test\n public void shouldReturnErrorWhenManagerNull() {\n assertThrows(NullPointerException.class, () -> producer.get((Graph) null));\n assertThrows(NullPointerException.class, () -> producer.get((GraphTraversalSourceSupplier) null));\n }", "class_method_signature": "DefaultGraphTemp...
{ "fields": [ { "declarator": "classMappings", "modifier": "@Inject\n private", "original_string": "@Inject\n private ClassMappings classMappings;", "type": "ClassMappings", "var_name": "classMappings" }, { "declarator": "converters", "modifier": "@Inject\n ...
{ "body": "@Override\n public GraphTemplate get(Graph graph) {\n requireNonNull(graph, \"graph is required\");\n\n SingleInstance<Graph> instance = new SingleInstance<>(graph);\n\n GraphConverter converter = new DefaultGraphConverter(classMappings,\n converters,\n ...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_185
{ "fields": [], "file": "artemis/artemis-graph/src/test/java/org/eclipse/jnosql/artemis/graph/AbstractGraphConverterTest.java", "identifier": "AbstractGraphConverterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnErrorWhenToEntityHasNullParameter() {\n assertThrows(NullPointerException.class, () -> getConverter().toEntity(null));\n }", "class_method_signature": "AbstractGraphConverterTest.shouldReturnErrorWhenToEntityHasNullParameter()", "constructor": false, "full...
{ "fields": [], "file": "artemis/artemis-graph/src/main/java/org/eclipse/jnosql/artemis/graph/AbstractGraphConverter.java", "identifier": "AbstractGraphConverter", "interfaces": "implements GraphConverter", "methods": [ { "class_method_signature": "AbstractGraphConverter.getClassMappings()", "...
{ "body": "@Override\n public <T> T toEntity(Vertex vertex) {\n requireNonNull(vertex, \"vertex is required\");\n ClassMapping mapping = getClassMappings().findByName(vertex.label());\n\n List<Property> properties = vertex.keys().stream().map(k -> DefaultProperty.of(k, vertex.value(k))).collec...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_306
{ "fields": [ { "declarator": "referenceReader = new NavigableSetTypeReferenceReader()", "modifier": "private", "original_string": "private TypeReferenceReader referenceReader = new NavigableSetTypeReferenceReader();", "type": "TypeReferenceReader", "var_name": "referenceReader" ...
{ "body": "@Test\n public void shouldConvertAndBeMutable() {\n NavigableSet<String> strings = referenceReader.convert(new TypeReference<NavigableSet<String>>() {\n }, \"123\");\n strings.add(\"456\");\n Assertions.assertEquals(2, strings.size());\n }", "class_method_signature": "Na...
{ "fields": [ { "declarator": "SERVICE_PROVIDER = ValueReaderDecorator.getInstance()", "modifier": "private static final transient", "original_string": "private static final transient ValueReader SERVICE_PROVIDER = ValueReaderDecorator.getInstance();", "type": "ValueReader", "var_nam...
{ "body": "@Override\n public <T> T convert(TypeSupplier<T> typeReference, Object value) {\n Type type = typeReference.get();\n ParameterizedType parameterizedType = ParameterizedType.class.cast(type);\n Class<?> classType = (Class<?>) parameterizedType.getActualTypeArguments()[0];\n if...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_49
{ "fields": [ { "declarator": "instanceSupplier", "modifier": "@Inject\n private", "original_string": "@Inject\n private ReflectionInstanceSupplierFactory instanceSupplier;", "type": "ReflectionInstanceSupplierFactory", "var_name": "instanceSupplier" } ], "file": "artem...
{ "body": "@Test\n public void shouldCreateInstanceSupplier() {\n Constructor<?>[] declaredConstructors = Person.class.getDeclaredConstructors();\n Constructor<?> constructor = Stream.of(declaredConstructors).filter(c -> c.getParameterCount() == 0)\n .findFirst().get();\n\n Inst...
{ "fields": [ { "declarator": "reflections", "modifier": "private", "original_string": "private Reflections reflections;", "type": "Reflections", "var_name": "reflections" } ], "file": "artemis/artemis-core/src/main/java/org/eclipse/jnosql/artemis/reflection/ReflectionInstanc...
{ "body": "@Override\n public InstanceSupplier apply(Constructor<?> constructor) {\n return () -> reflections.newInstance(constructor);\n }", "class_method_signature": "ReflectionInstanceSupplierFactory.apply(Constructor<?> constructor)", "constructor": false, "full_signature": "@Override public In...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_243
{ "fields": [ { "declarator": "repositoryReturn = new ObservableRepositoryReturn()", "modifier": "private final", "original_string": "private final RepositoryReturn repositoryReturn = new ObservableRepositoryReturn();", "type": "RepositoryReturn", "var_name": "repositoryReturn" }...
{ "body": "@Test\n public void shouldReturnIsCompatible() {\n Assertions.assertTrue(repositoryReturn.isCompatible(Person.class, Observable.class));\n assertFalse(repositoryReturn.isCompatible(Object.class, Person.class));\n assertFalse(repositoryReturn.isCompatible(Person.class, Object.class))...
{ "fields": [], "file": "artemis/artemis-reactive/artemis-reactive-core/src/main/java/org/eclipse/jnosql/artemis/reactive/ObservableRepositoryReturn.java", "identifier": "ObservableRepositoryReturn", "interfaces": "implements RepositoryReturn", "methods": [ { "class_method_signature": "ObservableRep...
{ "body": "@Override\n public boolean isCompatible(Class<?> entityClass, Class<?> returnType) {\n return Observable.class.equals(returnType);\n }", "class_method_signature": "ObservableRepositoryReturn.isCompatible(Class<?> entityClass, Class<?> returnType)", "constructor": false, "full_signature":...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_404
{ "fields": [], "file": "diana/diana-document/src/test/java/org/eclipse/jnosql/diana/document/DefaultDocumentConditionTest.java", "identifier": "DefaultDocumentConditionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnErrorWhenCreateOrWithNullValues() {\n assertThrows(NullPointerException.class, () -> DefaultDocumentCondition.or((DocumentCondition[]) null));\n }", "class_method_signature": "DefaultDocumentConditionTest.shouldReturnErrorWhenCreateOrWithNullValues()", "cons...
{ "fields": [ { "declarator": "document", "modifier": "private final", "original_string": "private final Document document;", "type": "Document", "var_name": "document" }, { "declarator": "condition", "modifier": "private final", "original_string": "private ...
{ "body": "static DefaultDocumentCondition or(DocumentCondition... conditions) {\n requireNonNull(conditions, \"condition is required\");\n Document document = Document.of(Condition.OR.getNameField(), asList(conditions));\n return DefaultDocumentCondition.of(document, Condition.OR);\n }", "c...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_0
{ "fields": [ { "declarator": "producer", "modifier": "@Inject\n private", "original_string": "@Inject\n private KeyValueRepositoryProducer producer;", "type": "KeyValueRepositoryProducer", "var_name": "producer" } ], "file": "artemis/artemis-key-value/src/test/java/org...
{ "body": "@Test\n public void shouldCreateFromManager() {\n BucketManager manager = Mockito.mock(BucketManager.class);\n PersonRepository personRepository = producer.get(PersonRepository.class, manager);\n assertNotNull(personRepository);\n }", "class_method_signature": "DefaultKeyValueR...
{ "fields": [ { "declarator": "producer", "modifier": "@Inject\n private", "original_string": "@Inject\n private KeyValueTemplateProducer producer;", "type": "KeyValueTemplateProducer", "var_name": "producer" } ], "file": "artemis/artemis-key-value/src/main/java/org/ecl...
{ "body": "@Override\n public <T, K, R extends Repository<T, K>> R get(Class<R> repositoryClass, BucketManager manager) {\n Objects.requireNonNull(repositoryClass, \"repository class is required\");\n Objects.requireNonNull(manager, \"manager class is required\");\n KeyValueTemplate template =...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_111
{ "fields": [ { "declarator": "repositoryReturn = new InstanceRepositoryReturn()", "modifier": "private final", "original_string": "private final RepositoryReturn repositoryReturn = new InstanceRepositoryReturn();", "type": "RepositoryReturn", "var_name": "repositoryReturn" }, ...
{ "body": "@Test\n public void shouldReturnInstancePage() {\n\n Person ada = new Person(\"Ada\");\n DynamicReturn<Person> dynamic = DynamicReturn.builder()\n .withClassSource(Person.class)\n .withSingleResult(Optional::empty)\n .withResult(Collections::emp...
{ "fields": [], "file": "artemis/artemis-core/src/main/java/org/eclipse/jnosql/artemis/repository/returns/InstanceRepositoryReturn.java", "identifier": "InstanceRepositoryReturn", "interfaces": "implements RepositoryReturn", "methods": [ { "class_method_signature": "InstanceRepositoryReturn.isCompat...
{ "body": "@Override\n public <T> Object convertPageable(DynamicReturn<T> dynamic) {\n Optional<T> optional = dynamic.singleResultPagination();\n return optional.orElse(null);\n }", "class_method_signature": "InstanceRepositoryReturn.convertPageable(DynamicReturn<T> dynamic)", "constructor": f...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_238
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n private", "original_string": "@Inject\n private DocumentEntityConverter converter;", "type": "DocumentEntityConverter", "var_name": "converter" }, { "declarator": "classMappings", "modifier": ...
{ "body": "@Test\n public void shouldExecutePagination() {\n Pagination pagination = Pagination.page(1).size(1);\n DocumentQueryPagination query = DocumentQueryPagination.of(select().from(\"person\").build(), pagination);\n Page<Person> page = subject.select(query);\n\n verify(managerMo...
{ "fields": [ { "declarator": "template", "modifier": "private final", "original_string": "private final DocumentTemplate template;", "type": "DocumentTemplate", "var_name": "template" }, { "declarator": "entities", "modifier": "private final", "original_str...
{ "body": "@Override\n public Pagination getPagination() {\n return query.getPagination();\n }", "class_method_signature": "DocumentPage.getPagination()", "constructor": false, "full_signature": "@Override public Pagination getPagination()", "identifier": "getPagination", "invocations": [ "...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_392
{ "fields": [], "file": "diana/diana-document/src/test/java/org/eclipse/jnosql/diana/document/DocumentsTest.java", "identifier": "DocumentsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCreateDocument() {\n Document column = Documents.of(\"name\", \"Ada\");\n assertEquals(\"name\", column.getName());\n assertEquals(\"Ada\", column.get());\n }", "class_method_signature": "DocumentsTest.shouldCreateDocument()", "constructor": false, ...
{ "fields": [ { "declarator": "IS_VALUE_NULL = e -> Objects.nonNull(e.getValue())", "modifier": "private static final", "original_string": "private static final Predicate<Map.Entry<String, ?>> IS_VALUE_NULL = e -> Objects.nonNull(e.getValue());", "type": "Predicate<Map.Entry<String, ?>>", ...
{ "body": "public static Document of(String name, Object value) {\n return Document.of(name, Value.of(value));\n }", "class_method_signature": "Documents.of(String name, Object value)", "constructor": false, "full_signature": "public static Document of(String name, Object value)", "identifier": "of"...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_32
{ "fields": [ { "declarator": "producer", "modifier": "@Inject\n private", "original_string": "@Inject\n private ColumnTemplateProducer producer;", "type": "ColumnTemplateProducer", "var_name": "producer" } ], "file": "artemis/artemis-column/src/test/java/org/eclipse/jn...
{ "body": "@Test\n public void shouldReturnErrorWhenColumnFamilyManagerNull() {\n Assertions.assertThrows(NullPointerException.class, () -> producer.get(null));\n }", "class_method_signature": "DefaultColumnTemplateProducerTest.shouldReturnErrorWhenColumnFamilyManagerNull()", "constructor": false, ...
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n private", "original_string": "@Inject\n private ColumnEntityConverter converter;", "type": "ColumnEntityConverter", "var_name": "converter" }, { "declarator": "columnWorkflow", "modifier": "@I...
{ "body": "@Override\n public ColumnTemplate get(ColumnFamilyManager columnFamilyManager) {\n Objects.requireNonNull(columnFamilyManager, \"columnFamilyManager is required\");\n return new ProducerColumnTemplate(converter, columnWorkflow, columnFamilyManager,\n eventManager, classMappi...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_146
{ "fields": [], "file": "artemis/artemis-graph/src/test/java/org/eclipse/jnosql/artemis/graph/AbstractGraphTemplateTest.java", "identifier": "AbstractGraphTemplateTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnErrorWhenGetEdgesIdHasNullId() {\n assertThrows(NullPointerException.class, () -> getGraphTemplate().getEdgesById(null, Direction.BOTH));\n }", "class_method_signature": "AbstractGraphTemplateTest.shouldReturnErrorWhenGetEdgesIdHasNullId()", "constructor": f...
{ "fields": [ { "declarator": "INITIAL_VERTEX =\n g -> (GraphTraversal<Vertex, Vertex>) g", "modifier": "private static final", "original_string": "private static final Function<GraphTraversal<?, ?>, GraphTraversal<Vertex, Vertex>> INITIAL_VERTEX =\n g -> (GraphTraversal<Ve...
{ "body": "@Override\n public <K> Collection<EdgeEntity> getEdgesById(K id, Direction direction, String... labels) {\n return getEdgesByIdImpl(id, direction, labels);\n }", "class_method_signature": "AbstractGraphTemplate.getEdgesById(K id, Direction direction, String... labels)", "constructor": fals...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_280
{ "fields": [ { "declarator": "valueReader", "modifier": "private", "original_string": "private ValueReader valueReader;", "type": "ValueReader", "var_name": "valueReader" } ], "file": "diana/diana-core/src/test/java/org/eclipse/jnosql/diana/reader/YearReaderTest.java", "id...
{ "body": "@Test\n public void shouldValidateCompatibility() {\n assertTrue(valueReader.test(Year.class));\n assertFalse(valueReader.test(String.class));\n assertFalse(valueReader.test(Long.class));\n }", "class_method_signature": "YearReaderTest.shouldValidateCompatibility()", "constru...
{ "fields": [], "file": "diana/diana-core/src/main/java/org/eclipse/jnosql/diana/reader/YearReader.java", "identifier": "YearReader", "interfaces": "implements ValueReader", "methods": [ { "class_method_signature": "YearReader.test(Class<?> type)", "constructor": false, "full_signature":...
{ "body": "@Override\n public boolean test(Class<?> type) {\n return Year.class.equals(type);\n }", "class_method_signature": "YearReader.test(Class<?> type)", "constructor": false, "full_signature": "@Override public boolean test(Class<?> type)", "identifier": "test", "invocations": [ "equ...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_65
{ "fields": [], "file": "artemis/artemis-core/src/test/java/org/eclipse/jnosql/artemis/reflection/FieldTypeUtilTest.java", "identifier": "FieldTypeUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnList() throws NoSuchFieldException {\n Field field = Person.class.getDeclaredField(\"phones\");\n assertEquals(FieldType.COLLECTION, FieldTypeUtil.of(field));\n }", "class_method_signature": "FieldTypeUtilTest.shouldReturnList()", "constructor": false...
{ "fields": [], "file": "artemis/artemis-core/src/main/java/org/eclipse/jnosql/artemis/reflection/FieldTypeUtil.java", "identifier": "FieldTypeUtil", "interfaces": "", "methods": [ { "class_method_signature": "FieldTypeUtil.FieldTypeUtil()", "constructor": true, "full_signature": "privat...
{ "body": "public static FieldType of(Field field) {\n if (Collection.class.isAssignableFrom(field.getType())) {\n return FieldType.COLLECTION;\n }\n if (Map.class.isAssignableFrom(field.getType())) {\n return FieldType.MAP;\n }\n if (field.getType().isAnnotati...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_150
{ "fields": [], "file": "artemis/artemis-graph/src/test/java/org/eclipse/jnosql/artemis/graph/AbstractGraphTemplateTest.java", "identifier": "AbstractGraphTemplateTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnErrorWhenGetEdgesHasNullId2() {\n assertThrows(IllegalStateException.class, () -> {\n Person otavio = Person.builder().withAge().withName(\"Otavio\").build();\n getGraphTemplate().getEdges(otavio, Direction.BOTH);\n });\n }", "clas...
{ "fields": [ { "declarator": "INITIAL_VERTEX =\n g -> (GraphTraversal<Vertex, Vertex>) g", "modifier": "private static final", "original_string": "private static final Function<GraphTraversal<?, ?>, GraphTraversal<Vertex, Vertex>> INITIAL_VERTEX =\n g -> (GraphTraversal<Ve...
{ "body": "@Override\n public <T> Collection<EdgeEntity> getEdges(T entity, Direction direction) {\n return getEdgesImpl(entity, direction);\n }", "class_method_signature": "AbstractGraphTemplate.getEdges(T entity, Direction direction)", "constructor": false, "full_signature": "@Override public Col...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_279
{ "fields": [ { "declarator": "dateReader", "modifier": "private", "original_string": "private LocalTimeReader dateReader;", "type": "LocalTimeReader", "var_name": "dateReader" } ], "file": "diana/diana-core/src/test/java/org/eclipse/jnosql/diana/reader/LocalTimeReaderTest.ja...
{ "body": "@Test\n public void shouldConvert() {\n final LocalTime now = LocalTime.now();\n final Date date = new Date();\n final Calendar calendar = Calendar.getInstance();\n\n assertEquals(now, dateReader.read(LocalTime.class, now));\n assertEquals(date.toInstant().atZone(ZoneI...
{ "fields": [], "file": "diana/diana-core/src/main/java/org/eclipse/jnosql/diana/reader/LocalTimeReader.java", "identifier": "LocalTimeReader", "interfaces": "implements ValueReader", "methods": [ { "class_method_signature": "LocalTimeReader.test(Class<?> type)", "constructor": false, "f...
{ "body": "@Override\n public <T> T read(Class<T> clazz, Object value) {\n if (LocalTime.class.isInstance(value)) {\n return (T) value;\n }\n\n if (Calendar.class.isInstance(value)) {\n return (T) ((Calendar) value).toInstant().atZone(ZoneId.systemDefault()).toLocalTime()...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_73
{ "fields": [], "file": "artemis/artemis-core/src/test/java/org/eclipse/jnosql/artemis/DatabaseQualifierTest.java", "identifier": "DatabaseQualifierTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnErrorWhenKeyValueNull() {\n Assertions.assertThrows(NullPointerException.class, () -> DatabaseQualifier.ofKeyValue(null));\n }", "class_method_signature": "DatabaseQualifierTest.shouldReturnErrorWhenKeyValueNull()", "constructor": false, "full_signature": ...
{ "fields": [ { "declarator": "DEFAULT_DOCUMENT_PROVIDER = new DatabaseQualifier(\"\", DOCUMENT)", "modifier": "private static final", "original_string": "private static final DatabaseQualifier DEFAULT_DOCUMENT_PROVIDER = new DatabaseQualifier(\"\", DOCUMENT);", "type": "DatabaseQualifier"...
{ "body": "public static DatabaseQualifier ofKeyValue() {\n return DEFAULT_KEY_VALUE_PROVIDER;\n }", "class_method_signature": "DatabaseQualifier.ofKeyValue()", "constructor": false, "full_signature": "public static DatabaseQualifier ofKeyValue()", "identifier": "ofKeyValue", "invocations": [], ...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_296
{ "fields": [ { "declarator": "valueReader", "modifier": "private", "original_string": "private ValueReader valueReader;", "type": "ValueReader", "var_name": "valueReader" } ], "file": "diana/diana-core/src/test/java/org/eclipse/jnosql/diana/reader/EnumReaderTest.java", "id...
{ "body": "@Test\n public void shouldConvert() {\n ExampleNumber value = ExampleNumber.ONE;\n assertEquals(value, valueReader.read(ExampleNumber.class, value));\n assertEquals(value, valueReader.read(ExampleNumber.class, 0));\n assertEquals(value, valueReader.read(ExampleNumber.class, \...
{ "fields": [], "file": "diana/diana-core/src/main/java/org/eclipse/jnosql/diana/reader/EnumReader.java", "identifier": "EnumReader", "interfaces": "implements ValueReader", "methods": [ { "class_method_signature": "EnumReader.test(Class<?> type)", "constructor": false, "full_signature":...
{ "body": "@Override\n public <T> T read(Class<T> clazz, Object value) {\n\n\n if (clazz.isInstance(value)) {\n return (T) value;\n }\n if (!Enum.class.isAssignableFrom(clazz)) {\n throw new IllegalArgumentException(\"The informed class isn't an enum type: \" + clazz);\n ...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_107
{ "fields": [ { "declarator": "repositoryReturn = new ListRepositoryReturn()", "modifier": "private final", "original_string": "private final RepositoryReturn repositoryReturn = new ListRepositoryReturn();", "type": "RepositoryReturn", "var_name": "repositoryReturn" }, { ...
{ "body": "@Test\n public void shouldReturnListPage() {\n Person ada = new Person(\"Ada\");\n DynamicReturn<Person> dynamic = DynamicReturn.builder()\n .withClassSource(Person.class)\n .withSingleResult(Optional::empty)\n .withResult(Collections::emptyList...
{ "fields": [], "file": "artemis/artemis-core/src/main/java/org/eclipse/jnosql/artemis/repository/returns/ListRepositoryReturn.java", "identifier": "ListRepositoryReturn", "interfaces": "", "methods": [ { "class_method_signature": "ListRepositoryReturn.ListRepositoryReturn()", "constructor": t...
{ "body": "@Override\n public <T> Object convertPageable(DynamicReturn<T> dynamicReturn) {\n return dynamicReturn.streamPagination().collect(Collectors.toList());\n }", "class_method_signature": "ListRepositoryReturn.convertPageable(DynamicReturn<T> dynamicReturn)", "constructor": false, "full_sign...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_384
{ "fields": [], "file": "diana/diana-column/src/test/java/org/eclipse/jnosql/diana/column/query/DefaultDeleteQueryBuilderTest.java", "identifier": "DefaultDeleteQueryBuilderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnErrorWhenHasNullElementInSelect() {\n Assertions.assertThrows(NullPointerException.class, () -> delete(\"column\", \"column\", null));\n }", "class_method_signature": "DefaultDeleteQueryBuilderTest.shouldReturnErrorWhenHasNullElementInSelect()", "constructor...
{ "fields": [ { "declarator": "columnFamily", "modifier": "private", "original_string": "private String columnFamily;", "type": "String", "var_name": "columnFamily" }, { "declarator": "columns", "modifier": "private final", "original_string": "private final ...
{ "body": "@Override\n public void delete(ColumnFamilyManager manager) {\n requireNonNull(manager, \"manager is required\");\n manager.delete(this.build());\n }", "class_method_signature": "DefaultDeleteQueryBuilder.delete(ColumnFamilyManager manager)", "constructor": false, "full_signature"...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
63372616_24
{ "fields": [ { "declarator": "subject", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private DefaultColumnEventPersistManager subject;", "type": "DefaultColumnEventPersistManager", "var_name": "subject" }, { "declarator": "columnEntity...
{ "body": "@Test\n public void shouldFirePreColumn() {\n ColumnEntity entity = ColumnEntity.of(\"columnFamily\");\n subject.firePreColumn(entity);\n ArgumentCaptor<ColumnEntityPrePersist> captor = ArgumentCaptor.forClass(ColumnEntityPrePersist.class);\n verify(columnEntityPrePersistEven...
{ "fields": [ { "declarator": "columnEntityPrePersistEvent", "modifier": "@Inject\n private", "original_string": "@Inject\n private Event<ColumnEntityPrePersist> columnEntityPrePersistEvent;", "type": "Event<ColumnEntityPrePersist>", "var_name": "columnEntityPrePersistEvent" ...
{ "body": "@Override\n public void firePreColumn(ColumnEntity entity) {\n columnEntityPrePersistEvent.fire(new DefaultColumnEntityPrePersist(entity));\n }", "class_method_signature": "DefaultColumnEventPersistManager.firePreColumn(ColumnEntity entity)", "constructor": false, "full_signature": "@Ove...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 63372616, "size": 5857, "stargazer_count": 137, "stars": null, "updates": null, "url": "https://github.com/eclipse/jnosql" }
174097909_32
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetCurrentAllocatedMips() {\n\t\t// ArrayList<Integer> currentAllocatedMips = new ArrayList<Integer>();\n\t\t// assertEquals(currentAllocatedMips, vm.getCurrentAllocatedMips());\n\t\tassertNull(vm.getCurrentAllocatedMips());\n\t}", "class_method_signature": "VmTest.testGetCurrent...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public List<Double> getCurrentAllocatedMips() {\n\t\treturn currentAllocatedMips;\n\t}", "class_method_signature": "Vm.getCurrentAllocatedMips()", "constructor": false, "full_signature": "public List<Double> getCurrentAllocatedMips()", "identifier": "getCurrentAllocatedMips", "invocations": [], ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_24
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testIsInMigration() {\n\t\tassertFalse(vm.isInMigration());\n\t\tvm.setInMigration(true);\n\t\tassertTrue(vm.isInMigration());\n\t}", "class_method_signature": "VmTest.testIsInMigration()", "constructor": false, "full_signature": "@Test public void testIsInMigration()", "identi...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public boolean isInMigration() {\n\t\treturn inMigration;\n\t}", "class_method_signature": "Vm.isInMigration()", "constructor": false, "full_signature": "public boolean isInMigration()", "identifier": "isInMigration", "invocations": [], "modifiers": "public", "parameters": "()", "return": "...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_28
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testUpdateVmProcessing() {\n\t\tassertEquals(0, vm.updateVmProcessing(0, null), 0);\n\t\tArrayList<Double> mipsShare1 = new ArrayList<Double>();\n\t\tmipsShare1.add(1.0);\n\t\tArrayList<Double> mipsShare2 = new ArrayList<Double>();\n\t\tmipsShare2.add(1.0);\n\t\tassertEquals(vmSchedule...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public double updateVmProcessing(double currentTime, List<Double> mipsShare) {\n\t\tif (mipsShare != null) {\n\t\t\treturn getCloudletScheduler().updateVmProcessing(currentTime, mipsShare);\n\t\t}\n\t\treturn 0.0;\n\t}", "class_method_signature": "Vm.updateVmProcessing(double currentTime, List<Double> mi...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_29
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetCurrentAllocatedSize() {\n\t\tassertEquals(0, vm.getCurrentAllocatedSize());\n\t\tvm.setCurrentAllocatedSize(SIZE);\n\t\tassertEquals(SIZE, vm.getCurrentAllocatedSize());\n\t}", "class_method_signature": "VmTest.testGetCurrentAllocatedSize()", "constructor": false, "full_s...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public long getCurrentAllocatedSize() {\n\t\treturn currentAllocatedSize;\n\t}", "class_method_signature": "Vm.getCurrentAllocatedSize()", "constructor": false, "full_signature": "public long getCurrentAllocatedSize()", "identifier": "getCurrentAllocatedSize", "invocations": [], "modifiers": "p...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_25
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetTotalUtilization() {\n\t\tassertEquals(0, vm.getTotalUtilizationOfCpu(0), 0);\n\t}", "class_method_signature": "VmTest.testGetTotalUtilization()", "constructor": false, "full_signature": "@Test public void testGetTotalUtilization()", "identifier": "testGetTotalUtilizatio...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public double getTotalUtilizationOfCpu(double time) {\n\t\treturn getCloudletScheduler().getTotalUtilizationOfCpu(time);\n\t}", "class_method_signature": "Vm.getTotalUtilizationOfCpu(double time)", "constructor": false, "full_signature": "public double getTotalUtilizationOfCpu(double time)", "ident...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_33
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testIsBeingInstantiated() {\n\t\tassertTrue(vm.isBeingInstantiated());\n\t\tvm.setBeingInstantiated(false);\n\t\tassertFalse(vm.isBeingInstantiated());\n\t}", "class_method_signature": "VmTest.testIsBeingInstantiated()", "constructor": false, "full_signature": "@Test public void ...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public boolean isBeingInstantiated() {\n\t\treturn beingInstantiated;\n\t}", "class_method_signature": "Vm.isBeingInstantiated()", "constructor": false, "full_signature": "public boolean isBeingInstantiated()", "identifier": "isBeingInstantiated", "invocations": [], "modifiers": "public", "pa...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_18
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetNumberOfPes() {\n\t\tassertEquals(PES_NUMBER, vm.getNumberOfPes());\n\t}", "class_method_signature": "VmTest.testGetNumberOfPes()", "constructor": false, "full_signature": "@Test public void testGetNumberOfPes()", "identifier": "testGetNumberOfPes", "invocations": [ ...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public int getNumberOfPes() {\n\t\treturn numberOfPes;\n\t}", "class_method_signature": "Vm.getNumberOfPes()", "constructor": false, "full_signature": "public int getNumberOfPes()", "identifier": "getNumberOfPes", "invocations": [], "modifiers": "public", "parameters": "()", "return": "int"...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_34
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetCurrentRequestedMips() {\n\t\tCloudletScheduler cloudletScheduler = createMock(CloudletScheduler.class);\n\t\tVm vm = new Vm(ID, USER_ID, MIPS, PES_NUMBER, RAM, BW, SIZE, VMM, cloudletScheduler);\n\t\tvm.setBeingInstantiated(false);\n\n\t\tList<Double> expectedCurrentMips = new ...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public List<Double> getCurrentRequestedMips() {\n\t\tList<Double> currentRequestedMips = getCloudletScheduler().getCurrentRequestedMips();\n\t\tif (isBeingInstantiated()) {\n\t\t\tcurrentRequestedMips = new ArrayList<Double>();\n\t\t\tfor (int i = 0; i < getNumberOfPes(); i++) {\n\t\t\t\tcurrentRequestedMi...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_22
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetVmm() {\n\t\tassertEquals(VMM, vm.getVmm());\n\t}", "class_method_signature": "VmTest.testGetVmm()", "constructor": false, "full_signature": "@Test public void testGetVmm()", "identifier": "testGetVmm", "invocations": [ "assertEquals", "getVmm" ], "modifier...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public String getVmm() {\n\t\treturn vmm;\n\t}", "class_method_signature": "Vm.getVmm()", "constructor": false, "full_signature": "public String getVmm()", "identifier": "getVmm", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "signature": "String getVmm...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_23
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetHost() {\n\t\tassertEquals(null, vm.getHost());\n\t\tHost host = new Host(0, null, null, 0, new ArrayList<Pe>(), null);\n\t\tvm.setHost(host);\n\t\tassertEquals(host, vm.getHost());\n\t}", "class_method_signature": "VmTest.testGetHost()", "constructor": false, "full_signat...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public Host getHost() {\n\t\treturn host;\n\t}", "class_method_signature": "Vm.getHost()", "constructor": false, "full_signature": "public Host getHost()", "identifier": "getHost", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Host", "signature": "Host getHost()...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_35
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetCurrentRequestedTotalMips() {\n\t\tCloudletScheduler cloudletScheduler = createMock(CloudletScheduler.class);\n\t\tVm vm = new Vm(ID, USER_ID, MIPS, PES_NUMBER, RAM, BW, SIZE, VMM, cloudletScheduler);\n\n\t\tArrayList<Double> currentMips = new ArrayList<Double>();\n\t\tcurrentMi...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public double getCurrentRequestedTotalMips() {\n\t\tdouble totalRequestedMips = 0;\n\t\tfor (double mips : getCurrentRequestedMips()) {\n\t\t\ttotalRequestedMips += mips;\n\t\t}\n\t\treturn totalRequestedMips;\n\t}", "class_method_signature": "Vm.getCurrentRequestedTotalMips()", "constructor": false, ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_19
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetRam() {\n\t\tassertEquals(RAM, vm.getRam());\n\t}", "class_method_signature": "VmTest.testGetRam()", "constructor": false, "full_signature": "@Test public void testGetRam()", "identifier": "testGetRam", "invocations": [ "assertEquals", "getRam" ], "modifier...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public int getRam() {\n\t\treturn ram;\n\t}", "class_method_signature": "Vm.getRam()", "constructor": false, "full_signature": "public int getRam()", "identifier": "getRam", "invocations": [], "modifiers": "public", "parameters": "()", "return": "int", "signature": "int getRam()", "test...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_16
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetMips() {\n\t\tassertEquals(MIPS, vm.getMips(), 0);\n\t}", "class_method_signature": "VmTest.testGetMips()", "constructor": false, "full_signature": "@Test public void testGetMips()", "identifier": "testGetMips", "invocations": [ "assertEquals", "getMips" ], ...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public double getMips() {\n\t\treturn mips;\n\t}", "class_method_signature": "Vm.getMips()", "constructor": false, "full_signature": "public double getMips()", "identifier": "getMips", "invocations": [], "modifiers": "public", "parameters": "()", "return": "double", "signature": "double g...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_20
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetBw() {\n\t\tassertEquals(BW, vm.getBw());\n\t}", "class_method_signature": "VmTest.testGetBw()", "constructor": false, "full_signature": "@Test public void testGetBw()", "identifier": "testGetBw", "invocations": [ "assertEquals", "getBw" ], "modifiers": "@T...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public long getBw() {\n\t\treturn bw;\n\t}", "class_method_signature": "Vm.getBw()", "constructor": false, "full_signature": "public long getBw()", "identifier": "getBw", "invocations": [], "modifiers": "public", "parameters": "()", "return": "long", "signature": "long getBw()", "testca...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_21
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetSize() {\n\t\tassertEquals(SIZE, vm.getSize());\n\t}", "class_method_signature": "VmTest.testGetSize()", "constructor": false, "full_signature": "@Test public void testGetSize()", "identifier": "testGetSize", "invocations": [ "assertEquals", "getSize" ], "m...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public long getSize() {\n\t\treturn size;\n\t}", "class_method_signature": "Vm.getSize()", "constructor": false, "full_signature": "public long getSize()", "identifier": "getSize", "invocations": [], "modifiers": "public", "parameters": "()", "return": "long", "signature": "long getSize()...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_17
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testSetMips() {\n\t\tvm.setMips(MIPS / 2);\n\t\tassertEquals(MIPS / 2, vm.getMips(), 0);\n\t}", "class_method_signature": "VmTest.testSetMips()", "constructor": false, "full_signature": "@Test public void testSetMips()", "identifier": "testSetMips", "invocations": [ "setM...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "protected void setMips(double mips) {\n\t\tthis.mips = mips;\n\t}", "class_method_signature": "Vm.setMips(double mips)", "constructor": false, "full_signature": "protected void setMips(double mips)", "identifier": "setMips", "invocations": [], "modifiers": "protected", "parameters": "(double ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_26
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetTotalUtilizationMips() {\n\t\tassertEquals(0, vm.getTotalUtilizationOfCpuMips(0), 0);\n\t}", "class_method_signature": "VmTest.testGetTotalUtilizationMips()", "constructor": false, "full_signature": "@Test public void testGetTotalUtilizationMips()", "identifier": "testGe...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public double getTotalUtilizationOfCpuMips(double time) {\n\t\treturn getTotalUtilizationOfCpu(time) * getMips();\n\t}", "class_method_signature": "Vm.getTotalUtilizationOfCpuMips(double time)", "constructor": false, "full_signature": "public double getTotalUtilizationOfCpuMips(double time)", "iden...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_30
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetCurrentAllocatedRam() {\n\t\tassertEquals(0, vm.getCurrentAllocatedRam());\n\t\tvm.setCurrentAllocatedRam(RAM);\n\t\tassertEquals(RAM, vm.getCurrentAllocatedRam());\n\t}", "class_method_signature": "VmTest.testGetCurrentAllocatedRam()", "constructor": false, "full_signatur...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public int getCurrentAllocatedRam() {\n\t\treturn currentAllocatedRam;\n\t}", "class_method_signature": "Vm.getCurrentAllocatedRam()", "constructor": false, "full_signature": "public int getCurrentAllocatedRam()", "identifier": "getCurrentAllocatedRam", "invocations": [], "modifiers": "public",...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_31
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetCurrentAllocatedBw() {\n\t\tassertEquals(0, vm.getCurrentAllocatedBw());\n\t\tvm.setCurrentAllocatedBw(BW);\n\t\tassertEquals(BW, vm.getCurrentAllocatedBw());\n\t}", "class_method_signature": "VmTest.testGetCurrentAllocatedBw()", "constructor": false, "full_signature": "@T...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public long getCurrentAllocatedBw() {\n\t\treturn currentAllocatedBw;\n\t}", "class_method_signature": "Vm.getCurrentAllocatedBw()", "constructor": false, "full_signature": "public long getCurrentAllocatedBw()", "identifier": "getCurrentAllocatedBw", "invocations": [], "modifiers": "public", ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
174097909_27
{ "fields": [ { "declarator": "ID = 1", "modifier": "private static final", "original_string": "private static final int ID = 1;", "type": "int", "var_name": "ID" }, { "declarator": "USER_ID = 1", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n\tpublic void testGetUid() {\n\t\tassertEquals(USER_ID + \"-\" + ID, vm.getUid());\n\t}", "class_method_signature": "VmTest.testGetUid()", "constructor": false, "full_signature": "@Test public void testGetUid()", "identifier": "testGetUid", "invocations": [ "assertEquals", "getUid"...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private int id;", "type": "int", "var_name": "id" }, { "declarator": "userId", "modifier": "private", "original_string": "private int userId;", "type": "int", "var_nam...
{ "body": "public String getUid() {\n\t\treturn uid;\n\t}", "class_method_signature": "Vm.getUid()", "constructor": false, "full_signature": "public String getUid()", "identifier": "getUid", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "signature": "String getUid...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 174097909, "size": 6285, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/ScorpioLzl/cloudsim" }
5455474_2
{ "fields": [], "file": "core/domain/src/test/java/org/mobicents/smsc/domain/HomeRoutingManagementTest.java", "identifier": "HomeRoutingManagementTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = { \"HomeRoutingManagement\" })\n public void testFunc() throws Exception {\n\n CcMccmncCollection original = new CcMccmncCollection();\n original.addCcMccmnc(new CcMccmncImpl(\"1111\", \"222\", \"00001\"));\n original.addCcMccmnc(new CcMccmncImpl(\"\", \"555\", \"\"))...
{ "fields": [ { "declarator": "logger = Logger.getLogger(HomeRoutingManagement.class)", "modifier": "private static final", "original_string": "private static final Logger logger = Logger.getLogger(HomeRoutingManagement.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "@Override\n public void addCcMccmnc(String countryCode, String mccMnc, String smsc) throws Exception {\n CcMccmncImpl ccMccmnc = new CcMccmncImpl(countryCode, mccMnc, smsc);\n ccMccmncCollection.addCcMccmnc(ccMccmnc);\n this.store();\n }", "class_method_signature": "HomeRouting...
{ "created": null, "fork": null, "fork_count": 84, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5455474, "size": 11861, "stargazer_count": 78, "stars": null, "updates": null, "url": "https://github.com/RestComm/smscgateway" }
5455474_3
{ "fields": [], "file": "core/domain/src/test/java/org/mobicents/smsc/domain/SmscCongestionControlTest.java", "identifier": "SmscCongestionControlTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = { \"SmscCongestionControl\" })\n public void testSmscCongestionControl() throws Exception {\n SmscCongestionControl smscCongestionControl = new SmscCongestionControl();\n\n assertFalse(smscCongestionControl.isMaxActivityCount1_0Threshold());\n assertFalse(smscCongesti...
{ "fields": [ { "declarator": "logger = Logger.getLogger(SmscManagement.class)", "modifier": "private static final", "original_string": "private static final Logger logger = Logger.getLogger(SmscManagement.class);", "type": "Logger", "var_name": "logger" }, { "declarato...
{ "body": "public SmscCongestionControl() {\n }", "class_method_signature": "SmscCongestionControl.SmscCongestionControl()", "constructor": true, "full_signature": "public SmscCongestionControl()", "identifier": "SmscCongestionControl", "invocations": [], "modifiers": "public", "parameters": "()", ...
{ "created": null, "fork": null, "fork_count": 84, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5455474, "size": 11861, "stargazer_count": 78, "stars": null, "updates": null, "url": "https://github.com/RestComm/smscgateway" }
5455474_0
{ "fields": [ { "declarator": "msgShort = \"01230123\"", "modifier": "private", "original_string": "private String msgShort = \"01230123\";", "type": "String", "var_name": "msgShort" }, { "declarator": "msdnDig1 = \"555501\"", "modifier": "private", "origina...
{ "body": "@Test(groups = { \"SmsSet\" })\n public void testAddSmsSet() throws Exception {\n DBOperations_C2_Proxy db = new DBOperations_C2_Proxy();\n\n SmsSet smsSet1 = createEmptySmsSet(ta1);\n SmsSet smsSet2 = createEmptySmsSet(ta1);\n SmsSet smsSet3 = createEmptySmsSet(ta2);\n ...
{ "fields": [ { "declarator": "SMSSET_MSG_PRO_SEGMENT_LIMIT = 50", "modifier": "public static", "original_string": "public static int SMSSET_MSG_PRO_SEGMENT_LIMIT = 50;", "type": "int", "var_name": "SMSSET_MSG_PRO_SEGMENT_LIMIT" }, { "declarator": "SMSSET_FREE_SEGMENT_C...
{ "body": "public TargetAddress addSmsSet(TargetAddress ta) {\n\t\tsynchronized (lstSmsSetUnderAtomicOper) {\n\t\t\tTargetAddressContainer cont = lstSmsSetUnderAtomicOper.get(ta);\n\t\t\tif (cont != null) {\n\t\t\t\tcont.count++;\n\t\t\t\treturn cont.targetAddress;\n\n\t\t\t} else {\n\t\t\t\tcont = new TargetAddressC...
{ "created": null, "fork": null, "fork_count": 84, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5455474, "size": 11861, "stargazer_count": 78, "stars": null, "updates": null, "url": "https://github.com/RestComm/smscgateway" }
5455474_1
{ "fields": [], "file": "core/domain/src/test/java/org/mobicents/smsc/domain/MapVersionCacheTest.java", "identifier": "MapVersionCacheTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = { \"cassandra\" })\n public void testMapVersionCache() throws Exception {\n MapVersionCache cache = MapVersionCache.getInstance(\"Test\");\n\n MAPApplicationContextVersion v = cache.getMAPApplicationContextVersion(\"111\");\n assertNull(v);\n\n cache.setMAPAppl...
{ "fields": [ { "declarator": "cache = new FastMap<String, MapVersionNeg>()\n\t\t\t.shared()", "modifier": "private", "original_string": "private FastMap<String, MapVersionNeg> cache = new FastMap<String, MapVersionNeg>()\n\t\t\t.shared();", "type": "FastMap<String, MapVersionNeg>", ...
{ "body": "private MapVersionCache(String name) {\n\t\tthis.name = name;\n\t}", "class_method_signature": "MapVersionCache.MapVersionCache(String name)", "constructor": true, "full_signature": "private MapVersionCache(String name)", "identifier": "MapVersionCache", "invocations": [], "modifiers": "privat...
{ "created": null, "fork": null, "fork_count": 84, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5455474, "size": 11861, "stargazer_count": 78, "stars": null, "updates": null, "url": "https://github.com/RestComm/smscgateway" }
149281309_3
{ "fields": [ { "declarator": "DN = \"CN=Gabi,CN=Users,OU=ITP\"", "modifier": "private static final", "original_string": "private static final String DN = \"CN=Gabi,CN=Users,OU=ITP\";", "type": "String", "var_name": "DN" }, { "declarator": "converter", "modifier":...
{ "body": "@Test\n public void testToApacheSearchRequestPaged() throws LdapException {\n QueryRequest search = mock(QueryRequest.class);\n Endpoint endpoint = mock(Endpoint.class);\n when(search.getPageChunkSize()).thenReturn(1000);\n when(search.getTimeLimit()).thenReturn(1000);\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName());", "type": "Logger", "var_nam...
{ "body": "SearchRequest toSearchRequest(QueryRequest queryRequest, String baseSearchPath) throws LdapException {\n SearchRequest search = new SearchRequestImpl();\n\n search.setScope(SearchScope.SUBTREE);\n String[] translatedRequestedFieldsArray = toStringArray(queryRequest.getRequestedFields()...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_11
{ "fields": [ { "declarator": "queryRequestPagedExecutor", "modifier": "private", "original_string": "private QueryRequestPagedExecutor queryRequestPagedExecutor;", "type": "QueryRequestPagedExecutor", "var_name": "queryRequestPagedExecutor" }, { "declarator": "queryReq...
{ "body": "@Test\n public void testRetrieveCookie() {\n SearchCursor cursor = mock(SearchCursor.class);\n SearchResultDone searchResultDone = mock(SearchResultDone.class);\n PagedResults pagedSearchControl = mock(PagedResults.class);\n LdapResult ldapResult = mock(LdapResult.class);\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryRequestPagedExecutor.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryRequestPagedExecutor.class.getName());", "type": "Logger", ...
{ "body": "Object retrieveCookie(SearchCursor cursor) {\n SearchResultDone result = cursor.getSearchResultDone();\n\n PagedResults pagedSearchControl = (PagedResults) result.getControl(PagedResults.OID);\n LOGGER.trace(\"Retrieving cookie. Page control: {}\", pagedSearchControl);\n\n Resul...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_10
{ "fields": [ { "declarator": "queryRequestPagedExecutor", "modifier": "private", "original_string": "private QueryRequestPagedExecutor queryRequestPagedExecutor;", "type": "QueryRequestPagedExecutor", "var_name": "queryRequestPagedExecutor" }, { "declarator": "queryReq...
{ "body": "@Test\n public void testCollectData() {\n try {\n SearchRequest searchRequest = mock(SearchRequest.class);\n SearchCursor cursor = mock(SearchCursor.class);\n List<Entry> entries = new ArrayList<>();\n Entry entry1 = mock(Entry.class);\n entr...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryRequestPagedExecutor.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryRequestPagedExecutor.class.getName());", "type": "Logger", ...
{ "body": "RoundtripResult collectData(LdapConnection connection, SearchRequest searchRequest) {\n RoundtripResult roundtripResult = new RoundtripResult();\n List<Entry> results = new ArrayList<>();\n SearchCursor cursor = null;\n try {\n cursor = connection.search(searchRequest...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_2
{ "fields": [ { "declarator": "DN = \"CN=Gabi,CN=Users,OU=ITP\"", "modifier": "private static final", "original_string": "private static final String DN = \"CN=Gabi,CN=Users,OU=ITP\";", "type": "String", "var_name": "DN" }, { "declarator": "converter", "modifier":...
{ "body": "@Test\n public void testToApacheSearchRequest() throws LdapException {\n QueryRequest search = mock(QueryRequest.class);\n Endpoint endpoint = mock(Endpoint.class);\n\n when(search.getTimeLimit()).thenReturn(1000);\n when(search.getSizeLimit()).thenReturn(1000);\n when...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName());", "type": "Logger", "var_nam...
{ "body": "SearchRequest toSearchRequest(QueryRequest queryRequest, String baseSearchPath) throws LdapException {\n SearchRequest search = new SearchRequestImpl();\n\n search.setScope(SearchScope.SUBTREE);\n String[] translatedRequestedFieldsArray = toStringArray(queryRequest.getRequestedFields()...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_17
{ "fields": [], "file": "source/ddc-core/src/test/java/com/imperva/ddc/core/language/searchcriteria/SearchCriteriaFactoryTest.java", "identifier": "SearchCriteriaFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreate() {\n SearchCriteriaBuilder SearchCriteriaBuilder = SearchCriteriaFactory.create(DirectoryType.MS_ACTIVE_DIRECTORY);\n assertTrue(SearchCriteriaBuilder instanceof ActiveDirectorySearchCriteriaBuilderImpl);\n }", "class_method_signature": "SearchCriteriaF...
{ "fields": [], "file": "source/ddc-core/src/main/java/com/imperva/ddc/core/language/searchcriteria/SearchCriteriaFactory.java", "identifier": "SearchCriteriaFactory", "interfaces": "", "methods": [ { "class_method_signature": "SearchCriteriaFactory.create(DirectoryType directoryType)", "const...
{ "body": "public static SearchCriteriaBuilder create(DirectoryType directoryType){\n SearchCriteriaBuilder searchCriteriaBuilder;\n switch (directoryType) {\n case MS_ACTIVE_DIRECTORY:\n searchCriteriaBuilder = new ActiveDirectorySearchCriteriaBuilderImpl();\n b...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_9
{ "fields": [ { "declarator": "queryRequestPagedExecutor", "modifier": "private", "original_string": "private QueryRequestPagedExecutor queryRequestPagedExecutor;", "type": "QueryRequestPagedExecutor", "var_name": "queryRequestPagedExecutor" }, { "declarator": "queryReq...
{ "body": "@Test\n public void testExecute() throws LdapException {\n ApacheAPIConverter apacheAPIConverter = mock(ApacheAPIConverter.class);\n List<Endpoint> endpoints = new ArrayList<>();\n Endpoint endpoint1 = mock(Endpoint.class);\n endpoints.add(endpoint1);\n SearchRequest s...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryRequestPagedExecutor.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryRequestPagedExecutor.class.getName());", "type": "Logger", ...
{ "body": "@Override\n QueryResponse execute() {\n QueryResponse response = new QueryResponse();\n for (Endpoint endpoint : this.queryRequest.getEndpoints()) {\n //* Prepare result obj\n PartitionResponse partitionResponse = new PartitionResponse();\n response.addPart...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_21
{ "fields": [ { "declarator": "queryRequestNonPagedExecutor", "modifier": "private", "original_string": "private QueryRequestNonPagedExecutor queryRequestNonPagedExecutor;", "type": "QueryRequestNonPagedExecutor", "var_name": "queryRequestNonPagedExecutor" }, { "declara...
{ "body": "@Test\n public void testCollectDataFailed() {\n try {\n LdapException ldapException = mock(LdapException.class);\n SearchRequest searchRequest = new SearchRequestImpl();\n doThrow(ldapException).when(ldapConnection).search(searchRequest);\n\n queryReque...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryRequestNonPagedExecutor.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryRequestNonPagedExecutor.class.getName());", "type": "Log...
{ "body": "RoundtripResult collectData(LdapConnection connection, SearchRequest search) {\n RoundtripResult roundtripResult = new RoundtripResult();\n SearchCursor cursor = null;\n List<Entry> result = new ArrayList<>();\n try {\n cursor = connection.search(search);\n ...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_5
{ "fields": [ { "declarator": "DN = \"CN=Gabi,CN=Users,OU=ITP\"", "modifier": "private static final", "original_string": "private static final String DN = \"CN=Gabi,CN=Users,OU=ITP\";", "type": "String", "var_name": "DN" }, { "declarator": "converter", "modifier":...
{ "body": "@Test\n public void testToModificationRemoveAttributeWithValue() {\n final String value = \"some group\";\n final Field field = new Field(FieldType.GROUP, value);\n field.setName(\"memberOf\");\n final RemoveModificationDetails details = new RemoveModificationDetails(DN, fiel...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName());", "type": "Logger", "var_nam...
{ "body": "public Modification toModification(ModificationDetails modificationDetails) {\n final String value = null == modificationDetails.getValue()\n ? null\n : modificationDetails.getValue().toString();\n Operation operation = modificationDetails.getOperation();\n ...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_4
{ "fields": [ { "declarator": "DN = \"CN=Gabi,CN=Users,OU=ITP\"", "modifier": "private static final", "original_string": "private static final String DN = \"CN=Gabi,CN=Users,OU=ITP\";", "type": "String", "var_name": "DN" }, { "declarator": "converter", "modifier":...
{ "body": "@Test\n public void testToEntityResponse() {\n try {\n List<Entry> entries = new ArrayList<>();\n Entry entry = new DefaultEntry();\n entry.setDn(DN);\n entry.add(\"givenName\", \"gabi\");\n entries.add(entry);\n\n List<Field> fiel...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName());", "type": "Logger", "var_nam...
{ "body": "List<EntityResponse> toEntityResponse(List<Entry> entries, List<Field> requestedFields) {\n List<EntityResponse> entResponses = new ArrayList<>();\n for (Entry ent : entries) {\n EntityResponse entResponse = new EntityResponse();\n entResponse.setKey(ent.getDn().getName(...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_20
{ "fields": [ { "declarator": "queryRequestNonPagedExecutor", "modifier": "private", "original_string": "private QueryRequestNonPagedExecutor queryRequestNonPagedExecutor;", "type": "QueryRequestNonPagedExecutor", "var_name": "queryRequestNonPagedExecutor" }, { "declara...
{ "body": "@Test\n public void testCollectData() {\n try {\n when(ldapConnection.search(any(SearchRequest.class))).thenReturn(mock(SearchCursor.class));\n doReturn(null).when(queryRequestNonPagedExecutor).run(any(SearchCursor.class));\n RoundtripResult roundtripResult = quer...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryRequestNonPagedExecutor.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryRequestNonPagedExecutor.class.getName());", "type": "Log...
{ "body": "RoundtripResult collectData(LdapConnection connection, SearchRequest search) {\n RoundtripResult roundtripResult = new RoundtripResult();\n SearchCursor cursor = null;\n List<Entry> result = new ArrayList<>();\n try {\n cursor = connection.search(search);\n ...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_8
{ "fields": [ { "declarator": "requestExecutorFactory", "modifier": "private", "original_string": "private RequestExecutorFactory requestExecutorFactory;", "type": "RequestExecutorFactory", "var_name": "requestExecutorFactory" }, { "declarator": "queryRequest", "m...
{ "body": "@Test\n public void testNonPagedExecutorCreated() {\n when(queryRequest.isPaged()).thenReturn(false);\n when(queryRequest.getSearchText()).thenReturn(\"(l=TLV)\");\n QueryRequestExecutor executor = requestExecutorFactory.create(queryRequest);\n assertTrue(executor instanceof ...
{ "fields": [], "file": "source/ddc-core/src/main/java/com/imperva/ddc/core/RequestExecutorFactory.java", "identifier": "RequestExecutorFactory", "interfaces": "", "methods": [ { "class_method_signature": "RequestExecutorFactory.create(QueryRequest queryRequest)", "constructor": false, "...
{ "body": "QueryRequestExecutor create(QueryRequest queryRequest){\n QueryRequestExecutor executor;\n if (!queryRequest.isPaged()) {\n executor = new QueryRequestNonPagedExecutor(queryRequest);\n } else {\n executor = new QueryRequestPagedExecutor(queryRequest);\n }\n...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_16
{ "fields": [ { "declarator": "activeDirectorySearchCriteriaBuilder", "modifier": "private", "original_string": "private ActiveDirectorySearchCriteriaBuilderImpl activeDirectorySearchCriteriaBuilder;", "type": "ActiveDirectorySearchCriteriaBuilderImpl", "var_name": "activeDirectorySe...
{ "body": "@Test(expected = ParsingException.class)\n public void testTranslateEmptyFilterPhrase() {\n Phrase phrase = null;\n doReturn(\"\").when(activeDirectorySearchCriteriaBuilder).translatePhrase(phrase);\n activeDirectorySearchCriteriaBuilder.translateFilter(phrase);\n verify(acti...
{ "fields": [ { "declarator": "translatedRequestedFields", "modifier": "private", "original_string": "private List<Field> translatedRequestedFields;", "type": "List<Field>", "var_name": "translatedRequestedFields" }, { "declarator": "translatedRequestedSortKeys", ...
{ "body": "@Override\n public void translateFilter() {\n\n String searchTest = getQueryRequest().getSearchText();\n if (searchTest != null && !searchTest.isEmpty()) {\n this.searchFilter = searchTest;\n return;\n }\n this.searchFilter = translateFilter(getQueryRequ...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_15
{ "fields": [ { "declarator": "activeDirectorySearchCriteriaBuilder", "modifier": "private", "original_string": "private ActiveDirectorySearchCriteriaBuilderImpl activeDirectorySearchCriteriaBuilder;", "type": "ActiveDirectorySearchCriteriaBuilderImpl", "var_name": "activeDirectorySe...
{ "body": "@Test(expected = ParsingException.class)\n public void testTranslateEmptyFilterPhraseValue() {\n Phrase phrase = mock(Phrase.class);\n doReturn(\"\").when(activeDirectorySearchCriteriaBuilder).translatePhrase(phrase);\n activeDirectorySearchCriteriaBuilder.translateFilter(phrase);\n...
{ "fields": [ { "declarator": "translatedRequestedFields", "modifier": "private", "original_string": "private List<Field> translatedRequestedFields;", "type": "List<Field>", "var_name": "translatedRequestedFields" }, { "declarator": "translatedRequestedSortKeys", ...
{ "body": "@Override\n public void translateFilter() {\n\n String searchTest = getQueryRequest().getSearchText();\n if (searchTest != null && !searchTest.isEmpty()) {\n this.searchFilter = searchTest;\n return;\n }\n this.searchFilter = translateFilter(getQueryRequ...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_7
{ "fields": [ { "declarator": "requestExecutorFactory", "modifier": "private", "original_string": "private RequestExecutorFactory requestExecutorFactory;", "type": "RequestExecutorFactory", "var_name": "requestExecutorFactory" }, { "declarator": "queryRequest", "m...
{ "body": "@Test\n public void testPagedExecutorCreated() {\n when(queryRequest.isPaged()).thenReturn(true);\n when(queryRequest.getSearchText()).thenReturn(\"(l=TLV)\");\n QueryRequestExecutor executor = requestExecutorFactory.create(queryRequest);\n assertTrue(executor instanceof Quer...
{ "fields": [], "file": "source/ddc-core/src/main/java/com/imperva/ddc/core/RequestExecutorFactory.java", "identifier": "RequestExecutorFactory", "interfaces": "", "methods": [ { "class_method_signature": "RequestExecutorFactory.create(QueryRequest queryRequest)", "constructor": false, "...
{ "body": "QueryRequestExecutor create(QueryRequest queryRequest){\n QueryRequestExecutor executor;\n if (!queryRequest.isPaged()) {\n executor = new QueryRequestNonPagedExecutor(queryRequest);\n } else {\n executor = new QueryRequestPagedExecutor(queryRequest);\n }\n...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_19
{ "fields": [ { "declarator": "queryRequestNonPagedExecutor", "modifier": "private", "original_string": "private QueryRequestNonPagedExecutor queryRequestNonPagedExecutor;", "type": "QueryRequestNonPagedExecutor", "var_name": "queryRequestNonPagedExecutor" }, { "declara...
{ "body": "@Test\n @Ignore\n public void testExecute() {\n List<Endpoint> endpoints = new ArrayList<>();\n SearchRequest searchRequest = mock(SearchRequest.class);\n Endpoint endpoint1 = mock(Endpoint.class);\n Endpoint endpoint2 = mock(Endpoint.class);\n endpoints.add(endpoin...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryRequestNonPagedExecutor.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryRequestNonPagedExecutor.class.getName());", "type": "Log...
{ "body": "@Override\n QueryResponse execute() {\n QueryResponse response = new QueryResponse();\n List<PartitionResponse> result = new ArrayList<>();\n for (Endpoint endpoint : queryRequest.getEndpoints()) {\n String host = endpoint.getHost();\n\n try {\n ...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_18
{ "fields": [ { "declarator": "changeRequestExecutor", "modifier": "private", "original_string": "private ChangeRequestExecutor changeRequestExecutor;", "type": "ChangeRequestExecutor", "var_name": "changeRequestExecutor" }, { "declarator": "changeRequest", "modif...
{ "body": "@Test\n @Ignore\n public void testExecute() {\n SearchRequest searchRequest = mock(SearchRequest.class);\n Endpoint endpoint = mock(Endpoint.class);\n ModificationDetails modificationDetails= mock(ModificationDetails.class);\n List<ModificationDetails> modificationDetailsL...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ChangeRequestExecutor.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ChangeRequestExecutor.class.getName());", "type": "Logger", "v...
{ "body": "void execute() {\n Endpoint endpoint=changeRequest.getEndpoint();\n String host = endpoint.getHost();\n try {\n LOGGER.debug(\"Executing request for: \" + host);\n\n // Connection for each endpoint\n LdapConnectionResult ldapConn...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_6
{ "fields": [ { "declarator": "DN = \"CN=Gabi,CN=Users,OU=ITP\"", "modifier": "private static final", "original_string": "private static final String DN = \"CN=Gabi,CN=Users,OU=ITP\";", "type": "String", "var_name": "DN" }, { "declarator": "converter", "modifier":...
{ "body": "@Test\n public void testToModificationRemoveAttributeNoValue() {\n final Field field = new Field();\n field.setType(FieldType.GROUP);\n field.setName(\"memberOf\");\n final RemoveModificationDetails details = new RemoveModificationDetails(DN, field);\n\n final Modifica...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName());", "type": "Logger", "var_nam...
{ "body": "public Modification toModification(ModificationDetails modificationDetails) {\n final String value = null == modificationDetails.getValue()\n ? null\n : modificationDetails.getValue().toString();\n Operation operation = modificationDetails.getOperation();\n ...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_14
{ "fields": [ { "declarator": "activeDirectorySearchCriteriaBuilder", "modifier": "private", "original_string": "private ActiveDirectorySearchCriteriaBuilderImpl activeDirectorySearchCriteriaBuilder;", "type": "ActiveDirectorySearchCriteriaBuilderImpl", "var_name": "activeDirectorySe...
{ "body": "@Test\n public void testTranslateFields() {\n Field field = new Field();\n field.setType(FieldType.FIRST_NAME);\n Field field2 = new Field();\n field2.setType(FieldType.CITY);\n List<Field> fields = new ArrayList<>();\n fields.add(field);\n fields.add(fie...
{ "fields": [ { "declarator": "translatedRequestedFields", "modifier": "private", "original_string": "private List<Field> translatedRequestedFields;", "type": "List<Field>", "var_name": "translatedRequestedFields" }, { "declarator": "translatedRequestedSortKeys", ...
{ "body": "@Override\n public void translateFields() {\n List<Field> fields = getQueryRequest().getRequestedFields();\n for (Iterator<Field> i = fields.iterator(); i.hasNext(); ) {\n Field field = i.next();\n translateField(field);\n }\n translatedRequestedFields =...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_1
{ "fields": [ { "declarator": "DN = \"CN=Gabi,CN=Users,OU=ITP\"", "modifier": "private static final", "original_string": "private static final String DN = \"CN=Gabi,CN=Users,OU=ITP\";", "type": "String", "var_name": "DN" }, { "declarator": "converter", "modifier":...
{ "body": "@Test\n public void testNullToStringArray() {\n String[] st = new ApacheAPIConverter().toStringArray(null);\n assertTrue(st[0].equals(\"*\"));\n }", "class_method_signature": "ApacheAPIConverterTest.testNullToStringArray()", "constructor": false, "full_signature": "@Test public vo...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName());", "type": "Logger", "var_nam...
{ "body": "String[] toStringArray(List<Field> entities) {\n if (entities == null || entities.isEmpty()) {\n String[] result = new String[1];\n result[0] = \"*\";\n return result;\n }\n String[] result = new String[entities.size()];\n for (int i = 0; i < ent...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_13
{ "fields": [ { "declarator": "activeDirectorySearchCriteriaBuilder", "modifier": "private", "original_string": "private ActiveDirectorySearchCriteriaBuilderImpl activeDirectorySearchCriteriaBuilder;", "type": "ActiveDirectorySearchCriteriaBuilderImpl", "var_name": "activeDirectorySe...
{ "body": "@Test\n public void testTranslateFilter() {\n\n when(queryRequest.getSearchText()).thenReturn(null);\n QueryAssembler assembler = new QueryAssembler();\n Sentence gabiSentence = assembler.addPhrase(FieldType.FIRST_NAME, PhraseOperator.EQUAL, \"gabi\")\n .addPhrase(Fie...
{ "fields": [ { "declarator": "translatedRequestedFields", "modifier": "private", "original_string": "private List<Field> translatedRequestedFields;", "type": "List<Field>", "var_name": "translatedRequestedFields" }, { "declarator": "translatedRequestedSortKeys", ...
{ "body": "@Override\n public void translateFilter() {\n\n String searchTest = getQueryRequest().getSearchText();\n if (searchTest != null && !searchTest.isEmpty()) {\n this.searchFilter = searchTest;\n return;\n }\n this.searchFilter = translateFilter(getQueryRequ...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_12
{ "fields": [ { "declarator": "activeDirectorySearchCriteriaBuilder", "modifier": "private", "original_string": "private ActiveDirectorySearchCriteriaBuilderImpl activeDirectorySearchCriteriaBuilder;", "type": "ActiveDirectorySearchCriteriaBuilderImpl", "var_name": "activeDirectorySe...
{ "body": "@Test\n public void testTranslateFilterInjectedByUser() {\n when(queryRequest.getSearchText()).thenReturn(\"STAM\");\n activeDirectorySearchCriteriaBuilder.translateFilter();\n verify(activeDirectorySearchCriteriaBuilder, times(0)).translateFilter(any(Word.class));\n }", "class...
{ "fields": [ { "declarator": "translatedRequestedFields", "modifier": "private", "original_string": "private List<Field> translatedRequestedFields;", "type": "List<Field>", "var_name": "translatedRequestedFields" }, { "declarator": "translatedRequestedSortKeys", ...
{ "body": "@Override\n public void translateFilter() {\n\n String searchTest = getQueryRequest().getSearchText();\n if (searchTest != null && !searchTest.isEmpty()) {\n this.searchFilter = searchTest;\n return;\n }\n this.searchFilter = translateFilter(getQueryRequ...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
149281309_0
{ "fields": [ { "declarator": "DN = \"CN=Gabi,CN=Users,OU=ITP\"", "modifier": "private static final", "original_string": "private static final String DN = \"CN=Gabi,CN=Users,OU=ITP\";", "type": "String", "var_name": "DN" }, { "declarator": "converter", "modifier":...
{ "body": "@Test\n public void testToStringArray() {\n List<Field> fields = new ArrayList<>();\n Field fieldName = new Field();\n fieldName.setName(\"givenName\");\n Field field2Location = new Field();\n field2Location.setName(\"l\");\n fields.add(fieldName);\n fiel...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ApacheAPIConverter.class.getName());", "type": "Logger", "var_nam...
{ "body": "String[] toStringArray(List<Field> entities) {\n if (entities == null || entities.isEmpty()) {\n String[] result = new String[1];\n result[0] = \"*\";\n return result;\n }\n String[] result = new String[entities.size()];\n for (int i = 0; i < ent...
{ "created": null, "fork": null, "fork_count": 17, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 149281309, "size": 185, "stargazer_count": 45, "stars": null, "updates": null, "url": "https://github.com/imperva/domain-directory-controller" }
36490910_3
{ "fields": [ { "declarator": "wheelIndicatorView", "modifier": "private", "original_string": "private WheelIndicatorView wheelIndicatorView;", "type": "WheelIndicatorView", "var_name": "wheelIndicatorView" } ], "file": "WheelIndicatorView/src/test/java/com/dlazaro66/wheelind...
{ "body": "@Test (expected = IllegalArgumentException.class)\n public void setNegativeLineWidthThowsException() {\n wheelIndicatorView.setItemsLineWidth(-2);\n }", "class_method_signature": "WheelIndicatorViewTest.setNegativeLineWidthThowsException()", "constructor": false, "full_signature": "@Test...
{ "fields": [ { "declarator": "ANGLE_INIT_OFFSET = -90", "modifier": "private final static", "original_string": "private final static int ANGLE_INIT_OFFSET = -90;", "type": "int", "var_name": "ANGLE_INIT_OFFSET" }, { "declarator": "DEFAULT_FILLED_PERCENT = 100", "...
{ "body": "public void setItemsLineWidth(int itemLineWidth) {\n if (itemLineWidth <= 0)\n throw new IllegalArgumentException(\"itemLineWidth must be greater than 0\");\n this.itemsLineWidth = itemLineWidth;\n invalidate();\n }", "class_method_signature": "WheelIndicatorView.setIte...
{ "created": null, "fork": null, "fork_count": 66, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 36490910, "size": 898, "stargazer_count": 402, "stars": null, "updates": null, "url": "https://github.com/dlazaro66/WheelIndicatorView" }
36490910_2
{ "fields": [ { "declarator": "wheelIndicatorView", "modifier": "private", "original_string": "private WheelIndicatorView wheelIndicatorView;", "type": "WheelIndicatorView", "var_name": "wheelIndicatorView" } ], "file": "WheelIndicatorView/src/test/java/com/dlazaro66/wheelind...
{ "body": "@Test (expected = IllegalArgumentException.class)\n public void addNullWheelIndicatorItemsThowsException() {\n wheelIndicatorView.addWheelIndicatorItem(null);\n }", "class_method_signature": "WheelIndicatorViewTest.addNullWheelIndicatorItemsThowsException()", "constructor": false, "full_...
{ "fields": [ { "declarator": "ANGLE_INIT_OFFSET = -90", "modifier": "private final static", "original_string": "private final static int ANGLE_INIT_OFFSET = -90;", "type": "int", "var_name": "ANGLE_INIT_OFFSET" }, { "declarator": "DEFAULT_FILLED_PERCENT = 100", "...
{ "body": "public void addWheelIndicatorItem(WheelIndicatorItem indicatorItem) {\n if (indicatorItem == null)\n throw new IllegalArgumentException(\"wheelIndicatorItems cannot be null\");\n\n this.wheelIndicatorItems.add(indicatorItem);\n recalculateItemsAngles();\n invalidate()...
{ "created": null, "fork": null, "fork_count": 66, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 36490910, "size": 898, "stargazer_count": 402, "stars": null, "updates": null, "url": "https://github.com/dlazaro66/WheelIndicatorView" }
36490910_4
{ "fields": [ { "declarator": "wheelIndicatorView", "modifier": "private", "original_string": "private WheelIndicatorView wheelIndicatorView;", "type": "WheelIndicatorView", "var_name": "wheelIndicatorView" } ], "file": "WheelIndicatorView/src/test/java/com/dlazaro66/wheelind...
{ "body": "@Test (expected = IllegalArgumentException.class)\n public void setLineWidthToZeroThowsException() {\n wheelIndicatorView.setItemsLineWidth(0);\n }", "class_method_signature": "WheelIndicatorViewTest.setLineWidthToZeroThowsException()", "constructor": false, "full_signature": "@Test (exp...
{ "fields": [ { "declarator": "ANGLE_INIT_OFFSET = -90", "modifier": "private final static", "original_string": "private final static int ANGLE_INIT_OFFSET = -90;", "type": "int", "var_name": "ANGLE_INIT_OFFSET" }, { "declarator": "DEFAULT_FILLED_PERCENT = 100", "...
{ "body": "public void setItemsLineWidth(int itemLineWidth) {\n if (itemLineWidth <= 0)\n throw new IllegalArgumentException(\"itemLineWidth must be greater than 0\");\n this.itemsLineWidth = itemLineWidth;\n invalidate();\n }", "class_method_signature": "WheelIndicatorView.setIte...
{ "created": null, "fork": null, "fork_count": 66, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 36490910, "size": 898, "stargazer_count": 402, "stars": null, "updates": null, "url": "https://github.com/dlazaro66/WheelIndicatorView" }
36490910_1
{ "fields": [ { "declarator": "wheelIndicatorView", "modifier": "private", "original_string": "private WheelIndicatorView wheelIndicatorView;", "type": "WheelIndicatorView", "var_name": "wheelIndicatorView" } ], "file": "WheelIndicatorView/src/test/java/com/dlazaro66/wheelind...
{ "body": "@Test (expected = IllegalArgumentException.class)\n public void setNullWheelIndicatorItemsThowsException() {\n wheelIndicatorView.setWheelIndicatorItems(null);\n }", "class_method_signature": "WheelIndicatorViewTest.setNullWheelIndicatorItemsThowsException()", "constructor": false, "full...
{ "fields": [ { "declarator": "ANGLE_INIT_OFFSET = -90", "modifier": "private final static", "original_string": "private final static int ANGLE_INIT_OFFSET = -90;", "type": "int", "var_name": "ANGLE_INIT_OFFSET" }, { "declarator": "DEFAULT_FILLED_PERCENT = 100", "...
{ "body": "public void setWheelIndicatorItems(List<WheelIndicatorItem> wheelIndicatorItems) {\n if (wheelIndicatorItems == null)\n throw new IllegalArgumentException(\"wheelIndicatorItems cannot be null\");\n this.wheelIndicatorItems = wheelIndicatorItems;\n recalculateItemsAngles();\n...
{ "created": null, "fork": null, "fork_count": 66, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 36490910, "size": 898, "stargazer_count": 402, "stars": null, "updates": null, "url": "https://github.com/dlazaro66/WheelIndicatorView" }