id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
85239682_174 | {
"fields": [
{
"declarator": "compositeRequestHandler",
"modifier": "private",
"original_string": "private CompositeRequestHandler compositeRequestHandler;",
"type": "CompositeRequestHandler",
"var_name": "compositeRequestHandler"
},
{
"declarator": "requestHandlers = ... | {
"body": "@Test\n public void exceptionHandlerShallBeInvokedWhenNoRequestHandlerIsGiven() {\n when(exceptionHandler.handleException(any(), any(), any())).thenReturn(Flux.empty());\n IllegalArgumentException illegalArgumentException = new IllegalArgumentException(\"expected exception\");\n whe... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(CompositeRequestHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(CompositeRequestHandler.class);",
"type": "Logger",
"var_name": "log"
},... | {
"body": "@Override\n public Publisher<Void> apply(HttpServerRequest request, HttpServerResponse response) {\n final long requestStartTime = System.currentTimeMillis();\n try {\n for (RequestHandler handler : handlers) {\n Publisher<Void> result = handler.apply(request, res... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_83 | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private Getter<GenericFieldSubclass, Integer> value;",
"type": "Getter<GenericFieldSubclass, Integer>",
"var_name": "value"
},
{
"declarator": "longObservable",
"modifier": "private"... | {
"body": "@Test\n public void shouldGetReturnType() {\n assertThat(value.getReturnType()).isEqualTo(Integer.class);\n assertThat(genericSuperKey.getReturnType()).isEqualTo(String.class);\n assertThat(genericSuperValue.getReturnType()).isEqualTo(Integer.class);\n assertThat(superKey.get... | {
"fields": [
{
"declarator": "fieldLambda",
"modifier": "private final",
"original_string": "private final Function<I,T> fieldLambda;",
"type": "Function<I,T>",
"var_name": "fieldLambda"
},
{
"declarator": "returnType",
"modifier": "private final",
"origina... | {
"body": "@Override\n public Class<?> getReturnType() {\n return returnType;\n }",
"class_method_signature": "FieldGetter.getReturnType()",
"constructor": false,
"full_signature": "@Override public Class<?> getReturnType()",
"identifier": "getReturnType",
"invocations": [],
"modifiers": "@Ov... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_123 | {
"fields": [],
"file": "dao/src/test/java/se/fortnox/reactivewizard/binding/scanners/DaoClassScannerTest.java",
"identifier": "DaoClassScannerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDaoClassScanner() {\n ClassGraph classGraph = new ClassGraph()\n .whitelistPackages(\"se.fortnox.reactivewizard.binding.scanners\")\n .enableAnnotationInfo()\n .enableMethodInfo()\n .enableAllInfo();\n DaoC... | {
"fields": [],
"file": "dao/src/main/java/se/fortnox/reactivewizard/binding/scanners/DaoClassScanner.java",
"identifier": "DaoClassScanner",
"interfaces": "",
"methods": [
{
"class_method_signature": "DaoClassScanner.visit(ClassScanner classScanner)",
"constructor": false,
"full_signatu... | {
"body": "@Override\n public void visit(ClassScanner classScanner) {\n classScanner.findClassesWithMethodAnnotation(Query.class).forEach(this::addIfInterface);\n classScanner.findClassesWithMethodAnnotation(Update.class).forEach(this::addIfInterface);\n }",
"class_method_signature": "DaoClassSc... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_67 | {
"fields": [],
"file": "config/src/test/java/se/fortnox/reactivewizard/config/ConfigReaderTest.java",
"identifier": "ConfigReaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldSupportEmptyConfig() {\n EmptyConfig testConfig = ConfigReader.fromFile(\"src/test/resources/testconfig.yml\", EmptyConfig.class);\n assertThat(testConfig).isNotNull();\n }",
"class_method_signature": "ConfigReaderTest.shouldSupportEmptyConfig()",
"construc... | {
"fields": [
{
"declarator": "UTF_8 = Charset.forName(\"UTF-8\")",
"modifier": "private static final",
"original_string": "private static final Charset UTF_8 = Charset.forName(\"UTF-8\");",
"type": "Charset",
"var_name": "UTF_8"
},
{
"declarato... | {
"body": "public static <T> T fromFile(String configFile, Class<T> cls) {\n try {\n return fromTree(readTree(configFile), cls);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"class_method_signature": "ConfigReader.fromFile(String configFile, Clas... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_88 | {
"fields": [],
"file": "utils/src/test/java/se/fortnox/reactivewizard/util/rx/RxUtilsTest.java",
"identifier": "RxUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSum() {\n Double sum = RxUtils.sum(just(3d, 3d, 3d))\n .toBlocking()\n .single();\n assertThat(sum).isEqualTo(9d);\n }",
"class_method_signature": "RxUtilsTest.testSum()",
"constructor": false,
"full_signature": "@Test public void test... | {
"fields": [],
"file": "utils/src/main/java/se/fortnox/reactivewizard/util/rx/RxUtils.java",
"identifier": "RxUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "RxUtils.first(Observable<?> doFirst)",
"constructor": false,
"full_signature": "public static FirstThen first... | {
"body": "public static Observable<Double> sum(Observable<Double> observable) {\n return observable.scan((valueA, valueB) -> valueA + valueB).lastOrDefault(0d);\n }",
"class_method_signature": "RxUtils.sum(Observable<Double> observable)",
"constructor": false,
"full_signature": "public static Observa... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_128 | {
"fields": [],
"file": "jaxrs-api/src/test/java/se/fortnox/reactivewizard/jaxrs/WebExceptionTest.java",
"identifier": "WebExceptionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldSetWarnLoggingForAnythingElse() {\n WebException webException = new WebException(CONTINUE);\n assertThat(webException.getLogLevel()).isEqualTo(WARN);\n }",
"class_method_signature": "WebExceptionTest.shouldSetWarnLoggingForAnythingElse()",
"constructor": fa... | {
"fields": [
{
"declarator": "id",
"modifier": "private",
"original_string": "private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "error",
"modifier": "private",
"original_string": "private String error;",
... | {
"body": "public Level getLogLevel() {\n return logLevel;\n }",
"class_method_signature": "WebException.getLogLevel()",
"constructor": false,
"full_signature": "public Level getLogLevel()",
"identifier": "getLogLevel",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_30 | {
"fields": [
{
"declarator": "DESERIALIZER = new EnumDeserializer<>(TestEnum.class)",
"modifier": "private final static",
"original_string": "private final static Deserializer<TestEnum> DESERIALIZER = new EnumDeserializer<>(TestEnum.class);",
"type": "Deserializer<TestEnum>",
"var_n... | {
"body": "@Test\n public void shouldDeserializeNull() throws DeserializerException {\n TestEnum deserialized = DESERIALIZER.deserialize(null);\n assertThat(deserialized).isNull();\n }",
"class_method_signature": "EnumDeserializerTest.shouldDeserializeNull()",
"constructor": false,
"full_sig... | {
"fields": [
{
"declarator": "paramType",
"modifier": "private final",
"original_string": "private final Class<T> paramType;",
"type": "Class<T>",
"var_name": "paramType"
}
],
"file": "jaxrs/src/main/java/se/fortnox/reactivewizard/jaxrs/params/deserializing/EnumDeserializer.... | {
"body": "@Override\n public T deserialize(String value) throws DeserializerException {\n if (value == null || value.isEmpty()) {\n return null;\n }\n try {\n return Enum.valueOf(paramType, value);\n } catch (Exception parseException) {\n try {\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_26 | {
"fields": [
{
"declarator": "DESERIALIZER = new LocalTimeDeserializer()",
"modifier": "private final static",
"original_string": "private final static Deserializer<LocalTime> DESERIALIZER = new LocalTimeDeserializer();",
"type": "Deserializer<LocalTime>",
"var_name": "DESERIALIZER"... | {
"body": "@Test\n public void shouldDeserialize() throws DeserializerException {\n LocalTime deserialized = DESERIALIZER.deserialize(\"14:10:15\");\n assertThat(deserialized.toString()).isEqualTo(\"14:10:15\");\n }",
"class_method_signature": "LocalTimeDeserializerTest.shouldDeserialize()",
"... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(LocalTimeDeserializer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(LocalTimeDeserializer.class);",
"type": "Logger",
"var_name": "LOG"
}
],... | {
"body": "@Override\n public LocalTime deserialize(String value) throws DeserializerException {\n if (value == null || value.length() == 0) {\n return null;\n }\n\n try {\n return LocalTime.parse(value);\n } catch (DateTimeParseException e) {\n LOG.warn... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_169 | {
"fields": [
{
"declarator": "connectionCounter",
"modifier": "@Mock",
"original_string": "@Mock\n ConnectionCounter connectionCounter;",
"type": "ConnectionCounter",
"var_name": "connectionCounter"
},
{
"declarator": "compositeRequestHandler",
"modifier": "@M... | {
"body": "@Test\n public void shouldStartTheServerIfConfigSaysEnabled() throws InterruptedException {\n ServerConfig serverConfig = new ServerConfig();\n serverConfig.setPort(0);\n AtomicInteger startInvocedNumberOfTimes = new AtomicInteger(0);\n\n RwServer rwServer = nul... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(RwServer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(RwServer.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "co... | {
"body": "public DisposableServer getServer() {\n return server;\n }",
"class_method_signature": "RwServer.getServer()",
"constructor": false,
"full_signature": "public DisposableServer getServer()",
"identifier": "getServer",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"r... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_71 | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private Setter value;",
"type": "Setter",
"var_name": "value"
},
{
"declarator": "longObservable",
"modifier": "private",
"original_string": "private Setter longObservable;",
... | {
"body": "@Test\n public void shouldSetValue() throws Exception {\n GenericMethodSubclass foo = new GenericMethodSubclass(1);\n value.invoke(foo, 9);\n assertThat(foo.getValue()).isEqualTo(9);\n\n genericSuperKey.invoke(foo, \"9\");\n assertThat(foo.getSuperKey()).isEqualTo(\"9\... | {
"fields": [
{
"declarator": "setterLambda",
"modifier": "private final",
"original_string": "private final BiConsumer<I, T> setterLambda;",
"type": "BiConsumer<I, T>",
"var_name": "setterLambda"
},
{
"declarator": "parameterType",
"modifier": "private final",
... | {
"body": "@Override\n public void invoke(I instance, T value) {\n setterLambda.accept(instance, value);\n }",
"class_method_signature": "MethodSetter.invoke(I instance, T value)",
"constructor": false,
"full_signature": "@Override public void invoke(I instance, T value)",
"identifier": "invoke",... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_0 | {
"fields": [],
"file": "metrics/src/test/java/se/fortnox/reactivewizard/metrics/HealthRecorderTest.java",
"identifier": "HealthRecorderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnHealthyWhenNoStatusIsRecorded() {\n HealthRecorder healthRecorder = new HealthRecorder();\n assertThat(healthRecorder.isHealthy()).isTrue();\n }",
"class_method_signature": "HealthRecorderTest.shouldReturnHealthyWhenNoStatusIsRecorded()",
"constructor... | {
"fields": [
{
"declarator": "statusPerMeasurement = new ConcurrentHashMap<>()",
"modifier": "private final",
"original_string": "private final ConcurrentHashMap<Object, Boolean> statusPerMeasurement = new ConcurrentHashMap<>();",
"type": "ConcurrentHashMap<Object, Boolean>",
"var_n... | {
"body": "public boolean isHealthy() {\n return healthy.get();\n }",
"class_method_signature": "HealthRecorder.isHealthy()",
"constructor": false,
"full_signature": "public boolean isHealthy()",
"identifier": "isHealthy",
"invocations": [
"get"
],
"modifiers": "public",
"parameters": "(... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_145 | {
"fields": [
{
"declarator": "healthRecorder = new HealthRecorder()",
"modifier": "private",
"original_string": "private HealthRecorder healthRecorder = new HealthRecorder();",
"type": "HealthRecorder",
"var_name": "healthRecorder"
},
{
"declarator": "mockAppender",
... | {
"body": "@Test\n public void shouldEncodePathWithSlash() throws Exception {\n HttpClient client = new HttpClient(new HttpClientConfig(\"localhost\"));\n Method method = TestResource.class.getMethod(\"withPathAndQueryParam\", String.class, String.class);\n String path = client.getPa... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HttpClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HttpClient.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "protected String getPath(Method method, Object[] arguments, JaxRsMeta meta) {\n String path = meta.getFullPath();\n\n StringBuilder query = null;\n Class<?>[] types = method.getParameterTypes();\n List<Object> args = new ArrayList<>(asList(arguments));\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_112 | {
"fields": [],
"file": "utils/src/test/java/se/fortnox/reactivewizard/util/CompoundKeyTest.java",
"identifier": "CompoundKeyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldBeComparableWhenDifferent() {\n CompoundKey key1 = new CompoundKey(\"one\", \"two\", \"three\");\n CompoundKey key2 = new CompoundKey(\"one\", \"two\", \"four\");\n\n assertThat(key1).isNotEqualTo(key2);\n assertThat(key1.hashCode()).isNotEqualTo(key... | {
"fields": [
{
"declarator": "keys",
"modifier": "private",
"original_string": "private Object[] keys;",
"type": "Object[]",
"var_name": "keys"
}
],
"file": "utils/src/main/java/se/fortnox/reactivewizard/util/CompoundKey.java",
"identifier": "CompoundKey",
"interfaces": ... | {
"body": "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n for (Object k : keys) {\n result = result * prime + (k == null ? 0 : k.hashCode());\n }\n return result;\n }",
"class_method_signature": "CompoundKey.hashCode()",
"... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_104 | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private Setter value;",
"type": "Setter",
"var_name": "value"
},
{
"declarator": "longObservable",
"modifier": "private",
"original_string": "private Setter longObservable;",
... | {
"body": "@Test\n public void shouldSupportSetterLambda() {\n GenericFieldSubclass foo = new GenericFieldSubclass(1);\n BiConsumer<GenericFieldSubclass, Integer> setter = value.setterFunction();\n setter.accept(foo, 9);\n assertThat(foo.value).isEqualTo(9);\n }",
"class_method_sig... | {
"fields": [
{
"declarator": "field",
"modifier": "private final",
"original_string": "private final Field field;",
"type": "Field",
"var_name": "field"
},
{
"declarator": "setter",
"modifier": "private final",
"original_string": "private final Bi... | {
"body": "@Override\n public BiConsumer<I,T> setterFunction() {\n return setter;\n }",
"class_method_signature": "FieldSetter.setterFunction()",
"constructor": false,
"full_signature": "@Override public BiConsumer<I,T> setterFunction()",
"identifier": "setterFunction",
"invocations": [],
"mo... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_153 | {
"fields": [
{
"declarator": "healthRecorder = new HealthRecorder()",
"modifier": "private",
"original_string": "private HealthRecorder healthRecorder = new HealthRecorder();",
"type": "HealthRecorder",
"var_name": "healthRecorder"
},
{
"declarator": "mockAppender",
... | {
"body": "@Test\n public void shouldNotRetryOnTimeout() {\n AtomicLong callCount = new AtomicLong();\n DisposableServer server = startSlowServer(HttpResponseStatus.NOT_FOUND, 1000, r -> callCount.incrementAndGet());\n\n TestResource resource = getHttpProxy(server.port());\n HttpClient.... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HttpClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HttpClient.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "public static void setTimeout(Object proxy, int timeout, ChronoUnit timeoutUnit) {\n if (Proxy.isProxyClass(proxy.getClass())) {\n Object handler = Proxy.getInvocationHandler(proxy);\n if (handler instanceof HttpClient) {\n ((HttpClient)handler).setTimeout(timeou... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_124 | {
"fields": [],
"file": "dbmigrate/src/test/java/se/fortnox/reactivewizard/dbmigrate/LiquibaseMigrateProviderTest.java",
"identifier": "LiquibaseMigrateProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldGetLiquibaseMigrateInstance() {\n LiquibaseConfig liquibaseConfig = mock(LiquibaseConfig.class);\n\n when(liquibaseConfig.getUrl()).thenReturn(\"jdbc:h2:mem:test\");\n when(liquibaseConfig.getMigrationsFile()).thenReturn(\"migrations.xml\");\n\n Conf... | {
"fields": [
{
"declarator": "liquibaseMigrate",
"modifier": "private",
"original_string": "private LiquibaseMigrate liquibaseMigrate;",
"type": "LiquibaseMigrate",
"var_name": "liquibaseMigrate"
},
{
"declarator": "liquibaseConfig",
"modifier": "private final",
... | {
"body": "LiquibaseMigrate get() {\n if (liquibaseMigrate == null) {\n try {\n liquibaseMigrate = new LiquibaseMigrate(liquibaseConfig);\n } catch (LiquibaseException | IOException e) {\n throw new IllegalStateException(e);\n }\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_84 | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private Getter<GenericFieldSubclass, Integer> value;",
"type": "Getter<GenericFieldSubclass, Integer>",
"var_name": "value"
},
{
"declarator": "longObservable",
"modifier": "private"... | {
"body": "@Test\n public void shouldGetGenericReturnType() {\n assertThat(longObservable.getGenericReturnType().toString()).isEqualTo(\"rx.Observable<java.lang.Long>\");\n assertThat(genericSuperKey.getGenericReturnType().toString()).isEqualTo(\"class java.lang.String\");\n assertThat(generic... | {
"fields": [
{
"declarator": "fieldLambda",
"modifier": "private final",
"original_string": "private final Function<I,T> fieldLambda;",
"type": "Function<I,T>",
"var_name": "fieldLambda"
},
{
"declarator": "returnType",
"modifier": "private final",
"origina... | {
"body": "@Override\n public Type getGenericReturnType() {\n return genericReturnType;\n }",
"class_method_signature": "FieldGetter.getGenericReturnType()",
"constructor": false,
"full_signature": "@Override public Type getGenericReturnType()",
"identifier": "getGenericReturnType",
"invocation... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_173 | {
"fields": [
{
"declarator": "compositeRequestHandler",
"modifier": "private",
"original_string": "private CompositeRequestHandler compositeRequestHandler;",
"type": "CompositeRequestHandler",
"var_name": "compositeRequestHandler"
},
{
"declarator": "requestHandlers = ... | {
"body": "@Test\n public void exceptionHandlerShallBeInvokedByRuntimeException() {\n IllegalArgumentException illegalArgumentException = new IllegalArgumentException(\"expected exception\");\n when(exceptionHandler.handleException(request, response, illegalArgumentException)).thenReturn(Flux.empty()... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(CompositeRequestHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(CompositeRequestHandler.class);",
"type": "Logger",
"var_name": "log"
},... | {
"body": "@Override\n public Publisher<Void> apply(HttpServerRequest request, HttpServerResponse response) {\n final long requestStartTime = System.currentTimeMillis();\n try {\n for (RequestHandler handler : handlers) {\n Publisher<Void> result = handler.apply(request, res... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_165 | {
"fields": [
{
"declarator": "healthRecorder = new HealthRecorder()",
"modifier": "private",
"original_string": "private HealthRecorder healthRecorder = new HealthRecorder();",
"type": "HealthRecorder",
"var_name": "healthRecorder"
},
{
"declarator": "mockAppender",
... | {
"body": "@Test\n public void shouldFailIfBodyIsNotStringOrBytes() {\n AtomicReference<HttpServerRequest> recordedRequest = new AtomicReference<>();\n AtomicReference<String> recordedRequestBody = new AtomicReference<>();\n\n DisposableServer server = HttpServer.create... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HttpClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HttpClient.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@SuppressWarnings(\"unchecked\")\n public <T> T create(Class<T> jaxRsInterface) {\n return (T)Proxy.newProxyInstance(jaxRsInterface.getClassLoader(), new Class[]{jaxRsInterface}, this);\n }",
"class_method_signature": "HttpClient.create(Class<T> jaxRsInterface)",
"constructor": false,
"f... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_132 | {
"fields": [],
"file": "jaxrs-api/src/test/java/se/fortnox/reactivewizard/jaxrs/WebExceptionTest.java",
"identifier": "WebExceptionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldSetBadRequestWhenInitializedWithFieldErrors() {\n WebException webException = new WebException(FieldError.notNull(\"dummy\"));\n assertThat(webException.getStatus()).isEqualTo(BAD_REQUEST);\n }",
"class_method_signature": "WebExceptionTest.shouldSetBadRequest... | {
"fields": [
{
"declarator": "id",
"modifier": "private",
"original_string": "private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "error",
"modifier": "private",
"original_string": "private String error;",
... | {
"body": "@JsonIgnore\n public HttpResponseStatus getStatus() {\n return status;\n }",
"class_method_signature": "WebException.getStatus()",
"constructor": false,
"full_signature": "@JsonIgnore public HttpResponseStatus getStatus()",
"identifier": "getStatus",
"invocations": [],
"modifiers":... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_92 | {
"fields": [],
"file": "utils/src/test/java/se/fortnox/reactivewizard/util/rx/RxUtilsTest.java",
"identifier": "RxUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConsolidate() {\n Bar bar1;\n Bar bar2;\n Observable<Foo> fooObservable = Observable.just(new Foo(), new Foo());\n Observable<Bar> barObservable = Observable.just(bar1 = new Bar(), bar2 = new Bar());\n\n Observable<Foo> f... | {
"fields": [],
"file": "utils/src/main/java/se/fortnox/reactivewizard/util/rx/RxUtils.java",
"identifier": "RxUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "RxUtils.first(Observable<?> doFirst)",
"constructor": false,
"full_signature": "public static FirstThen first... | {
"body": "public static <T1, T2> Observable<T1> consolidate(Observable<T1> observableLeft, Observable<T2> observableRight, Action2<T1, T2> action) {\n return Observable.zip(observableLeft, observableRight, (leftObj, rightObj) -> {\n action.call(leftObj, rightObj);\n return leftObj;\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_149 | {
"fields": [
{
"declarator": "healthRecorder = new HealthRecorder()",
"modifier": "private",
"original_string": "private HealthRecorder healthRecorder = new HealthRecorder();",
"type": "HealthRecorder",
"var_name": "healthRecorder"
},
{
"declarator": "mockAppender",
... | {
"body": "@Test\n public void shouldReturnFullResponseFromEmptyObservable() {\n DisposableServer server = startServer(HttpResponseStatus.OK, Mono.just(\"\"), httpServerRequest -> {}, httpServerResponse -> {\n httpServerResponse.addCookie(new DefaultCookie(\"cookieName\", \"cookieValue\"));\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HttpClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HttpClient.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "public static <T> Observable<Response<T>> getFullResponse(Observable<T> source) {\n if (!(source instanceof ObservableWithResponse)) {\n throw new IllegalArgumentException(\"Must be used with observable returned from api call\");\n }\n\n return source.map(data -> new Respons... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_51 | {
"fields": [
{
"declarator": "DESERIALIZER = new BooleanNotNullDeserializer()",
"modifier": "private final static",
"original_string": "private final static Deserializer<Boolean> DESERIALIZER = new BooleanNotNullDeserializer();",
"type": "Deserializer<Boolean>",
"var_name": "DESERIA... | {
"body": "@Test\n public void shouldDeserializeTrue() throws DeserializerException {\n assertThat(DESERIALIZER.deserialize(\"true\")).isEqualTo(true);\n assertThat(DESERIALIZER.deserialize(\"TRUE\")).isEqualTo(true);\n assertThat(DESERIALIZER.deserialize(\"True\")).isEqualTo(true);\n }",
... | {
"fields": [],
"file": "jaxrs/src/main/java/se/fortnox/reactivewizard/jaxrs/params/deserializing/BooleanNotNullDeserializer.java",
"identifier": "BooleanNotNullDeserializer",
"interfaces": "implements Deserializer<Boolean>",
"methods": [
{
"class_method_signature": "BooleanNotNullDeserializer.deser... | {
"body": "@Override\n public Boolean deserialize(String value) throws DeserializerException {\n if (value == null) {\n throw new DeserializerException(\"invalid.boolean\");\n }\n return Boolean.valueOf(value.trim());\n }",
"class_method_signature": "BooleanNotNullDeserializer.... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_108 | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private Getter value;",
"type": "Getter",
"var_name": "value"
},
{
"declarator": "longObservable",
"modifier": "private",
"original_string": "private Getter longObservable;",
... | {
"body": "@Test\n public void shouldGetValue() throws Exception {\n assertThat(value.invoke(new GenericMethodSubclass(5))).isEqualTo(5);\n assertThat(genericSuperKey.invoke(new GenericMethodSubclass(5))).isEqualTo(\"5\");\n assertThat(genericSuperValue.invoke(new GenericMethodSubclass(5))).is... | {
"fields": [
{
"declarator": "getterLambda",
"modifier": "private final",
"original_string": "private final Function<I, T> getterLambda;",
"type": "Function<I, T>",
"var_name": "getterLambda"
},
{
"declarator": "returnType",
"modifier": "private final",
"or... | {
"body": "@Override\n public T invoke(I instance) {\n return getterLambda.apply(instance);\n }",
"class_method_signature": "MethodGetter.invoke(I instance)",
"constructor": false,
"full_signature": "@Override public T invoke(I instance)",
"identifier": "invoke",
"invocations": [
"apply"
... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_47 | {
"fields": [
{
"declarator": "DESERIALIZER = new DateDeserializer(StdDateFormat::new)",
"modifier": "private final static",
"original_string": "private final static Deserializer<Date> DESERIALIZER = new DateDeserializer(StdDateFormat::new);",
"type": "Deserializer<Date>",
"var_name"... | {
"body": "@Test\n public void shouldThrowDeserializerExceptionForBadDates() {\n try {\n DESERIALIZER.deserialize(\"not a date\");\n fail(\"Expected exception, but none was thrown\");\n } catch (Exception exception) {\n assertThat(exception).isInstanceOf(Deserializer... | {
"fields": [
{
"declarator": "dateFormatProvider",
"modifier": "private",
"original_string": "private Provider<DateFormat> dateFormatProvider;",
"type": "Provider<DateFormat>",
"var_name": "dateFormatProvider"
}
],
"file": "jaxrs/src/main/java/se/fortnox/reactivewizard/jaxrs... | {
"body": "@Override\n public Date deserialize(String value) throws DeserializerException {\n if (value == null) {\n return null;\n }\n try {\n return new Date(Long.parseLong(value));\n } catch (NumberFormatException e) {\n try {\n return ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_10 | {
"fields": [
{
"declarator": "serializerFactory",
"modifier": "private",
"original_string": "private JsonSerializerFactory serializerFactory;",
"type": "JsonSerializerFactory",
"var_name": "serializerFactory"
},
{
"declarator": "deserializerFactory",
"modifier"... | {
"body": "@Test\n public void shouldSerializeAndDeserializeImmutableObjectsByTypeReferenceToAndFromByteArrays() {\n Function<ImmutableEntity, String> serializer = serializerFactory.createStringSerializer(immutableEntityTypeReference);\n String json = serializer.apply(immutableEntity);\n\n Fun... | {
"fields": [
{
"declarator": "mapper",
"modifier": "private final",
"original_string": "private final ObjectMapper mapper;",
"type": "ObjectMapper",
"var_name": "mapper"
}
],
"file": "json/src/main/java/se/fortnox/reactivewizard/json/JsonDeserializerFactory.java",
"identif... | {
"body": "public <T> Function<String, T> createDeserializer(TypeReference<T> typeReference) {\n return createDeserializer(mapper.readerFor(typeReference));\n }",
"class_method_signature": "JsonDeserializerFactory.createDeserializer(TypeReference<T> typeReference)",
"constructor": false,
"full_signatu... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_11 | {
"fields": [
{
"declarator": "serializerFactory",
"modifier": "private",
"original_string": "private JsonSerializerFactory serializerFactory;",
"type": "JsonSerializerFactory",
"var_name": "serializerFactory"
},
{
"declarator": "deserializerFactory",
"modifier"... | {
"body": "@Test\n public void shouldSerializeAndDeserializeToAndFromByteArrays() {\n Function<ImmutableEntity, byte[]> serializer = serializerFactory.createByteSerializer(ImmutableEntity.class);\n byte[] json = serializer.apply(immutableEntity);\n\n Function<byte[], ImmutableEntity> deseriali... | {
"fields": [
{
"declarator": "mapper",
"modifier": "private final",
"original_string": "private final ObjectMapper mapper;",
"type": "ObjectMapper",
"var_name": "mapper"
}
],
"file": "json/src/main/java/se/fortnox/reactivewizard/json/JsonDeserializerFactory.java",
"identif... | {
"body": "public <T> Function<byte[], T> createByteDeserializer(TypeReference<T> typeReference) {\n return createByteDeserializer(mapper.readerFor(typeReference));\n }",
"class_method_signature": "JsonDeserializerFactory.createByteDeserializer(TypeReference<T> typeReference)",
"constructor": false,
"... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_46 | {
"fields": [
{
"declarator": "DESERIALIZER = new DateDeserializer(StdDateFormat::new)",
"modifier": "private final static",
"original_string": "private final static Deserializer<Date> DESERIALIZER = new DateDeserializer(StdDateFormat::new);",
"type": "Deserializer<Date>",
"var_name"... | {
"body": "@Test\n public void shouldDeserializeNull() throws DeserializerException {\n Date deserialized = DESERIALIZER.deserialize(null);\n assertThat(deserialized).isNull();\n }",
"class_method_signature": "DateDeserializerTest.shouldDeserializeNull()",
"constructor": false,
"full_signatu... | {
"fields": [
{
"declarator": "dateFormatProvider",
"modifier": "private",
"original_string": "private Provider<DateFormat> dateFormatProvider;",
"type": "Provider<DateFormat>",
"var_name": "dateFormatProvider"
}
],
"file": "jaxrs/src/main/java/se/fortnox/reactivewizard/jaxrs... | {
"body": "@Override\n public Date deserialize(String value) throws DeserializerException {\n if (value == null) {\n return null;\n }\n try {\n return new Date(Long.parseLong(value));\n } catch (NumberFormatException e) {\n try {\n return ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_109 | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private Getter value;",
"type": "Getter",
"var_name": "value"
},
{
"declarator": "longObservable",
"modifier": "private",
"original_string": "private Getter longObservable;",
... | {
"body": "@Test\n public void shouldGetReturnType() {\n assertThat(value.getReturnType()).isEqualTo(Integer.class);\n assertThat(genericSuperKey.getReturnType()).isEqualTo(String.class);\n assertThat(genericSuperValue.getReturnType()).isEqualTo(Integer.class);\n assertThat(superKey.get... | {
"fields": [
{
"declarator": "getterLambda",
"modifier": "private final",
"original_string": "private final Function<I, T> getterLambda;",
"type": "Function<I, T>",
"var_name": "getterLambda"
},
{
"declarator": "returnType",
"modifier": "private final",
"or... | {
"body": "@Override\n public Class<?> getReturnType() {\n return returnType;\n }",
"class_method_signature": "MethodGetter.getReturnType()",
"constructor": false,
"full_signature": "@Override public Class<?> getReturnType()",
"identifier": "getReturnType",
"invocations": [],
"modifiers": "@O... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_50 | {
"fields": [
{
"declarator": "DESERIALIZER = new ArrayDeserializer((str) -> str, String.class)",
"modifier": "private final static",
"original_string": "private final static Deserializer<String[]> DESERIALIZER = new ArrayDeserializer((str) -> str, String.class);",
"type": "Deserializer<St... | {
"body": "@Test\n public void shouldDeserializeNull() throws DeserializerException {\n assertThat(DESERIALIZER.deserialize(null)).isNull();\n }",
"class_method_signature": "ArrayDeserializerTest.shouldDeserializeNull()",
"constructor": false,
"full_signature": "@Test public void shouldDeserializeN... | {
"fields": [
{
"declarator": "inner",
"modifier": "private final",
"original_string": "private final Deserializer<T> inner;",
"type": "Deserializer<T>",
"var_name": "inner"
},
{
"declarator": "arrayType",
"modifier": "private final",
"original_string": "pri... | {
"body": "@Override\n public T[] deserialize(String value) throws DeserializerException {\n if (value == null) {\n return null;\n }\n String[] rawValues = value.split(\",\");\n try {\n T[] deserialized = (T[])Array.newInstance(arrayType, rawValues.length);\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_148 | {
"fields": [
{
"declarator": "healthRecorder = new HealthRecorder()",
"modifier": "private",
"original_string": "private HealthRecorder healthRecorder = new HealthRecorder();",
"type": "HealthRecorder",
"var_name": "healthRecorder"
},
{
"declarator": "mockAppender",
... | {
"body": "@Test\n public void shouldReturnFullResponseFromObservable() {\n DisposableServer server = startServer(HttpResponseStatus.OK, Mono.just(\"\\\"OK\\\"\"), httpServerRequest -> {}, httpServerResponse -> {\n httpServerResponse.addCookie(new DefaultCookie(\"cookieName\", \"cookieValue\"));\... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HttpClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HttpClient.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "public static <T> Observable<Response<T>> getFullResponse(Observable<T> source) {\n if (!(source instanceof ObservableWithResponse)) {\n throw new IllegalArgumentException(\"Must be used with observable returned from api call\");\n }\n\n return source.map(data -> new Respons... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_93 | {
"fields": [],
"file": "utils/src/test/java/se/fortnox/reactivewizard/util/rx/RxUtilsTest.java",
"identifier": "RxUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAsync() {\n List<Integer> input = Arrays.asList(0, 4, 3, 1, 2);\n List<Integer> expectedResult = Arrays.asList(0, 1, 2, 3, 4);\n\n List<Integer> actualResult = RxUtils.async(input)\n .flatMap(i -> Observable.just(i).delay(i * 100, TimeUnit... | {
"fields": [],
"file": "utils/src/main/java/se/fortnox/reactivewizard/util/rx/RxUtils.java",
"identifier": "RxUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "RxUtils.first(Observable<?> doFirst)",
"constructor": false,
"full_signature": "public static FirstThen first... | {
"body": "public static <T> Observable<T> async(List<T> list) {\n return async(Observable.from(list));\n }",
"class_method_signature": "RxUtils.async(List<T> list)",
"constructor": false,
"full_signature": "public static Observable<T> async(List<T> list)",
"identifier": "async",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_133 | {
"fields": [],
"file": "jaxrs-api/src/test/java/se/fortnox/reactivewizard/jaxrs/WebExceptionTest.java",
"identifier": "WebExceptionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldUsePassedStatusWhenInitializedWithFieldErrorsAndStatus() {\n WebException webException = new WebException(METHOD_NOT_ALLOWED, FieldError.notNull(\"dummy\"));\n assertThat(webException.getStatus()).isEqualTo(METHOD_NOT_ALLOWED);\n }",
"class_method_signature":... | {
"fields": [
{
"declarator": "id",
"modifier": "private",
"original_string": "private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "error",
"modifier": "private",
"original_string": "private String error;",
... | {
"body": "@JsonIgnore\n public HttpResponseStatus getStatus() {\n return status;\n }",
"class_method_signature": "WebException.getStatus()",
"constructor": false,
"full_signature": "@JsonIgnore public HttpResponseStatus getStatus()",
"identifier": "getStatus",
"invocations": [],
"modifiers":... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_164 | {
"fields": [
{
"declarator": "healthRecorder = new HealthRecorder()",
"modifier": "private",
"original_string": "private HealthRecorder healthRecorder = new HealthRecorder();",
"type": "HealthRecorder",
"var_name": "healthRecorder"
},
{
"declarator": "mockAppender",
... | {
"body": "@Test\n public void shouldSupportSendingXmlAsBytes() {\n AtomicReference<HttpServerRequest> recordedRequest = new AtomicReference<>();\n AtomicReference<String> recordedRequestBody = new AtomicReference<>();\n\n DisposableServer server = HttpServer.create().port(0).ha... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HttpClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HttpClient.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@SuppressWarnings(\"unchecked\")\n public <T> T create(Class<T> jaxRsInterface) {\n return (T)Proxy.newProxyInstance(jaxRsInterface.getClassLoader(), new Class[]{jaxRsInterface}, this);\n }",
"class_method_signature": "HttpClient.create(Class<T> jaxRsInterface)",
"constructor": false,
"f... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_172 | {
"fields": [
{
"declarator": "compositeRequestHandler",
"modifier": "private",
"original_string": "private CompositeRequestHandler compositeRequestHandler;",
"type": "CompositeRequestHandler",
"var_name": "compositeRequestHandler"
},
{
"declarator": "requestHandlers = ... | {
"body": "@Test\n public void shouldOnlyCallOneRequestHandler() {\n AtomicInteger callCounter = new AtomicInteger();\n requestHandlers.add((request, response) -> {\n callCounter.incrementAndGet();\n return Flux.empty();\n });\n requestHandlers.add((request, respon... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(CompositeRequestHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(CompositeRequestHandler.class);",
"type": "Logger",
"var_name": "log"
},... | {
"body": "@Override\n public Publisher<Void> apply(HttpServerRequest request, HttpServerResponse response) {\n final long requestStartTime = System.currentTimeMillis();\n try {\n for (RequestHandler handler : handlers) {\n Publisher<Void> result = handler.apply(request, res... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_85 | {
"fields": [],
"file": "utils/src/test/java/se/fortnox/reactivewizard/util/ManifestUtilTest.java",
"identifier": "ManifestUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldLoadTestManifest() {\n // Execution\n Optional<ManifestUtil.ManifestValues> manifestValuesOptional = ManifestUtil.getManifestValues();\n\n // Verification\n assertThat(manifestValuesOptional.isPresent()).isTrue();\n\n ManifestUtil.ManifestValu... | {
"fields": [
{
"declarator": "META_INF_ARTIFACT_ID = \"ArtifactId\"",
"modifier": "private static final",
"original_string": "private static final String META_INF_ARTIFACT_ID = \"ArtifactId\";",
"type": "String",
"var_name": "META_INF_ARTIFACT_ID"
},
{
"declarator": "V... | {
"body": "public static Optional<ManifestValues> getManifestValues() {\n return Optional.ofNullable(manifestValues);\n }",
"class_method_signature": "ManifestUtil.getManifestValues()",
"constructor": false,
"full_signature": "public static Optional<ManifestValues> getManifestValues()",
"identifier"... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_125 | {
"fields": [],
"file": "jaxrs-api/src/test/java/se/fortnox/reactivewizard/jaxrs/WebExceptionTest.java",
"identifier": "WebExceptionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldGetIdWhenIntializedWithStatus() {\n WebException webException = new WebException(BAD_GATEWAY);\n assertUuid(webException.getId());\n }",
"class_method_signature": "WebExceptionTest.shouldGetIdWhenIntializedWithStatus()",
"constructor": false,
"full_signat... | {
"fields": [
{
"declarator": "id",
"modifier": "private",
"original_string": "private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "error",
"modifier": "private",
"original_string": "private String error;",
... | {
"body": "public String getId() {\n return id;\n }",
"class_method_signature": "WebException.getId()",
"constructor": false,
"full_signature": "public String getId()",
"identifier": "getId",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "St... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_152 | {
"fields": [
{
"declarator": "healthRecorder = new HealthRecorder()",
"modifier": "private",
"original_string": "private HealthRecorder healthRecorder = new HealthRecorder();",
"type": "HealthRecorder",
"var_name": "healthRecorder"
},
{
"declarator": "mockAppender",
... | {
"body": "@Test\n @SuppressWarnings(\"unchecked\")\n public void shouldWrapAndReturnNewFullResponseSingle() {\n DisposableServer server = startServer(HttpResponseStatus.OK, \"\\\"OK\\\"\");\n\n TestResource resource = getHttpProxy(server.port());\n\n Single<String> hello = resource.getSing... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HttpClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HttpClient.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "public static <T> Observable<Response<T>> getFullResponse(Observable<T> source) {\n if (!(source instanceof ObservableWithResponse)) {\n throw new IllegalArgumentException(\"Must be used with observable returned from api call\");\n }\n\n return source.map(data -> new Respons... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_105 | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private Setter value;",
"type": "Setter",
"var_name": "value"
},
{
"declarator": "longObservable",
"modifier": "private",
"original_string": "private Setter longObservable;",
... | {
"body": "@Test\n public void shouldGetParameterType() {\n assertThat(value.getParameterType()).isEqualTo(Integer.class);\n assertThat(genericSuperKey.getParameterType()).isEqualTo(String.class);\n assertThat(genericSuperValue.getParameterType()).isEqualTo(Integer.class);\n assertThat(... | {
"fields": [
{
"declarator": "field",
"modifier": "private final",
"original_string": "private final Field field;",
"type": "Field",
"var_name": "field"
},
{
"declarator": "setter",
"modifier": "private final",
"original_string": "private final Bi... | {
"body": "@Override\n public Class<?> getParameterType() {\n return parameterType;\n }",
"class_method_signature": "FieldSetter.getParameterType()",
"constructor": false,
"full_signature": "@Override public Class<?> getParameterType()",
"identifier": "getParameterType",
"invocations": [],
"m... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_113 | {
"fields": [],
"file": "utils/src/test/java/se/fortnox/reactivewizard/util/CompoundKeyTest.java",
"identifier": "CompoundKeyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldCompareKeysWithDifferentLength() {\n CompoundKey key1 = new CompoundKey(\"one\", \"two\", \"three\");\n CompoundKey key2 = new CompoundKey(\"one\", \"two\");\n\n assertThat(key1).isNotEqualTo(key2);\n assertThat(key1.hashCode()).isNotEqualTo(key2.has... | {
"fields": [
{
"declarator": "keys",
"modifier": "private",
"original_string": "private Object[] keys;",
"type": "Object[]",
"var_name": "keys"
}
],
"file": "utils/src/main/java/se/fortnox/reactivewizard/util/CompoundKey.java",
"identifier": "CompoundKey",
"interfaces": ... | {
"body": "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n for (Object k : keys) {\n result = result * prime + (k == null ? 0 : k.hashCode());\n }\n return result;\n }",
"class_method_signature": "CompoundKey.hashCode()",
"... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_1 | {
"fields": [
{
"declarator": "serializerFactory = new JsonSerializerFactory()",
"modifier": "private",
"original_string": "private JsonSerializerFactory serializerFactory = new JsonSerializerFactory();",
"type": "JsonSerializerFactory",
"var_name": "serializerFactory"
}
],
... | {
"body": "@Test\n\tpublic void shouldSerializeUsingProtectedProp() {\n\t\tPrivateEntity entity = new PrivateEntity();\n\t\tentity.setProtectedProp(\"hello\");\n\t\tFunction<PrivateEntity, String> serializer = serializerFactory.createStringSerializer(PrivateEntity.class);\n\n\t\tassertThat(serializer.apply(entity)).i... | {
"fields": [
{
"declarator": "mapper",
"modifier": "private final",
"original_string": "private final ObjectMapper mapper;",
"type": "ObjectMapper",
"var_name": "mapper"
}
],
"file": "json/src/main/java/se/fortnox/reactivewizard/json/JsonSerializerFactory.java",
"identifie... | {
"body": "public <T> Function<T, String> createStringSerializer(TypeReference<T> paramType) {\n return createStringSerializer(mapper.writerFor(paramType));\n }",
"class_method_signature": "JsonSerializerFactory.createStringSerializer(TypeReference<T> paramType)",
"constructor": false,
"full_signature... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_144 | {
"fields": [
{
"declarator": "healthRecorder = new HealthRecorder()",
"modifier": "private",
"original_string": "private HealthRecorder healthRecorder = new HealthRecorder();",
"type": "HealthRecorder",
"var_name": "healthRecorder"
},
{
"declarator": "mockAppender",
... | {
"body": "@Test\n public void shouldNotEncodePathWithSlash() throws Exception {\n HttpClient client = new HttpClient(new HttpClientConfig(\"localhost\"));\n Method method = TestResource.class.getMethod(\"withRegExpPathAndQueryParam\", String.class, String.class);\n String path = cli... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HttpClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HttpClient.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "protected String getPath(Method method, Object[] arguments, JaxRsMeta meta) {\n String path = meta.getFullPath();\n\n StringBuilder query = null;\n Class<?>[] types = method.getParameterTypes();\n List<Object> args = new ArrayList<>(asList(arguments));\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_70 | {
"fields": [],
"file": "config/src/test/java/se/fortnox/reactivewizard/config/ConfigFactoryTest.java",
"identifier": "ConfigFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConfigFactory() {\n try {\n new ConfigFactory(\"\");\n } catch (Exception e) {\n assertTrue(e instanceof IllegalArgumentException || e.getCause() instanceof IOException);\n }\n }",
"class_method_signature": "ConfigFactoryTest.testCo... | {
"fields": [
{
"declarator": "tree",
"modifier": "private",
"original_string": "private JsonNode tree;",
"type": "JsonNode",
"var_name": "tree"
}
],
"file": "config/src/main/java/se/fortnox/reactivewizard/config/ConfigFactory.java",
"identifier": "ConfigFactory",
"interf... | {
"body": "@Inject\n public ConfigFactory(@Named(\"args\") String[] args) {\n this(args.length == 0 ? null : args[args.length - 1]);\n }",
"class_method_signature": "ConfigFactory.ConfigFactory(@Named(\"args\") String[] args)",
"constructor": true,
"full_signature": "@Inject public ConfigFactory(@... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_168 | {
"fields": [
{
"declarator": "connectionCounter",
"modifier": "@Mock",
"original_string": "@Mock\n ConnectionCounter connectionCounter;",
"type": "ConnectionCounter",
"var_name": "connectionCounter"
},
{
"declarator": "compositeRequestHandler",
"modifier": "@M... | {
"body": "@Test\n public void shouldSetServerToNullIfConfigSaysDisabled() throws InterruptedException {\n ServerConfig serverConfig = new ServerConfig();\n serverConfig.setEnabled(false);\n serverConfig.setPort(0);\n\n RwServer rwServer = new RwServer(serverConfig, compositeRequestHand... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(RwServer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(RwServer.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "co... | {
"body": "public DisposableServer getServer() {\n return server;\n }",
"class_method_signature": "RwServer.getServer()",
"constructor": false,
"full_signature": "public DisposableServer getServer()",
"identifier": "getServer",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"r... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_27 | {
"fields": [
{
"declarator": "DESERIALIZER = new LocalTimeDeserializer()",
"modifier": "private final static",
"original_string": "private final static Deserializer<LocalTime> DESERIALIZER = new LocalTimeDeserializer();",
"type": "Deserializer<LocalTime>",
"var_name": "DESERIALIZER"... | {
"body": "@Test\n public void shouldDeserializeNull() throws DeserializerException {\n LocalTime deserialized = DESERIALIZER.deserialize(null);\n assertThat(deserialized).isNull();\n }",
"class_method_signature": "LocalTimeDeserializerTest.shouldDeserializeNull()",
"constructor": false,
"fu... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(LocalTimeDeserializer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(LocalTimeDeserializer.class);",
"type": "Logger",
"var_name": "LOG"
}
],... | {
"body": "@Override\n public LocalTime deserialize(String value) throws DeserializerException {\n if (value == null || value.length() == 0) {\n return null;\n }\n\n try {\n return LocalTime.parse(value);\n } catch (DateTimeParseException e) {\n LOG.warn... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_31 | {
"fields": [
{
"declarator": "DESERIALIZER = new EnumDeserializer<>(TestEnum.class)",
"modifier": "private final static",
"original_string": "private final static Deserializer<TestEnum> DESERIALIZER = new EnumDeserializer<>(TestEnum.class);",
"type": "Deserializer<TestEnum>",
"var_n... | {
"body": "@Test\n public void shouldBeCaseInsensitive() throws DeserializerException {\n TestEnum deserialized = DESERIALIZER.deserialize(\"first\");\n assertThat(deserialized).isEqualTo(TestEnum.FIRST);\n }",
"class_method_signature": "EnumDeserializerTest.shouldBeCaseInsensitive()",
"constr... | {
"fields": [
{
"declarator": "paramType",
"modifier": "private final",
"original_string": "private final Class<T> paramType;",
"type": "Class<T>",
"var_name": "paramType"
}
],
"file": "jaxrs/src/main/java/se/fortnox/reactivewizard/jaxrs/params/deserializing/EnumDeserializer.... | {
"body": "@Override\n public T deserialize(String value) throws DeserializerException {\n if (value == null || value.isEmpty()) {\n return null;\n }\n try {\n return Enum.valueOf(paramType, value);\n } catch (Exception parseException) {\n try {\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_129 | {
"fields": [],
"file": "jaxrs-api/src/test/java/se/fortnox/reactivewizard/jaxrs/WebExceptionTest.java",
"identifier": "WebExceptionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldSetErrorCode() {\n WebException webException = new WebException(NOT_FOUND, \"entry.not.found\");\n assertThat(webException.getError()).isEqualTo(\"entry.not.found\");\n }",
"class_method_signature": "WebExceptionTest.shouldSetErrorCode()",
"constructor": fa... | {
"fields": [
{
"declarator": "id",
"modifier": "private",
"original_string": "private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "error",
"modifier": "private",
"original_string": "private String error;",
... | {
"body": "public String getError() {\n return error;\n }",
"class_method_signature": "WebException.getError()",
"constructor": false,
"full_signature": "public String getError()",
"identifier": "getError",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_66 | {
"fields": [],
"file": "config/src/test/java/se/fortnox/reactivewizard/config/ConfigReaderTest.java",
"identifier": "ConfigReaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldQuoteReplacementString() {\n Map<String, String> env = new HashMap<>(System.getenv());\n env.put(\"CUSTOM_ENV_VAR\", \"^THIS.IS.A.\\\\d{6}T\\\\d{7}.REGEX1$\");\n setEnv(env);\n\n TestConfig testConfig = ConfigReader.fromFile(\"src/test/resources/test... | {
"fields": [
{
"declarator": "UTF_8 = Charset.forName(\"UTF-8\")",
"modifier": "private static final",
"original_string": "private static final Charset UTF_8 = Charset.forName(\"UTF-8\");",
"type": "Charset",
"var_name": "UTF_8"
},
{
"declarato... | {
"body": "public static <T> T fromFile(String configFile, Class<T> cls) {\n try {\n return fromTree(readTree(configFile), cls);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"class_method_signature": "ConfigReader.fromFile(String configFile, Clas... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
85239682_89 | {
"fields": [],
"file": "utils/src/test/java/se/fortnox/reactivewizard/util/rx/RxUtilsTest.java",
"identifier": "RxUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldNotDoIfObservableIsEmpty() {\n Observable<Boolean> observable = just(true, false, true);\n\n Consumer<Boolean> thenMock = mock(Consumer.class);\n RxUtils.doIfEmpty(observable, () -> thenMock.accept(true)).toBlocking().subscribe();\n\n verify(thenMock... | {
"fields": [],
"file": "utils/src/main/java/se/fortnox/reactivewizard/util/rx/RxUtils.java",
"identifier": "RxUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "RxUtils.first(Observable<?> doFirst)",
"constructor": false,
"full_signature": "public static FirstThen first... | {
"body": "public static <T> Observable<T> doIfEmpty(Observable<T> output, Action0 action) {\n return output.doOnEach(new Observer<T>() {\n AtomicBoolean empty = new AtomicBoolean(true);\n\n @Override\n public void onCompleted() {\n if (empty.get()) {\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "MIT License",
"repo_id": 85239682,
"size": 1121,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/FortnoxAB/reactive-wizard"
} |
9349893_1 | {
"fields": [],
"file": "libreoffice-launcher-applet/src/test/java/com/redpill_linpro/libreoffice/LibreOfficeLauncherHelperTest.java",
"identifier": "LibreOfficeLauncherHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGenerateLibreOfficeOpenUrl() throws UnsupportedEncodingException {\n assertEquals(\"vnd.libreoffice.cmis://http%3A%2F%2Flocalhost%3A8080%2Falfresco%2Fcmisatom%23be392f77-bc41-4794-9367-f5b1cf00984b/Sites/libreoffice-test/documentLibrary/Testdocument.odt\",\n LibreOfficeLa... | {
"fields": [
{
"declarator": "OS_WINDOWS = \"Windows\"",
"modifier": "public static final",
"original_string": "public static final String OS_WINDOWS = \"Windows\";",
"type": "String",
"var_name": "OS_WINDOWS"
},
{
"declarator": "OS_LINUX = \"Linux\"",
"modifier"... | {
"body": "public static String generateLibreOfficeOpenUrl(String cmisUrl, String repositoryId, String filePath) throws UnsupportedEncodingException {\n StringBuilder openUrlSb = new StringBuilder();\n openUrlSb.append(LibreOfficeLauncherHelper.LIBREOFFICE_HANDLER);\n openUrlSb.append(\"://\");\n\n String... | {
"created": null,
"fork": null,
"fork_count": 25,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9349893,
"size": 218,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/Redpill-Linpro/alfresco-libreoffice-online-edit"
} |
9349893_0 | {
"fields": [],
"file": "libreoffice-launcher-applet/src/test/java/com/redpill_linpro/libreoffice/LibreOfficeLauncherHelperTest.java",
"identifier": "LibreOfficeLauncherHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetOperatingSystem() {\n assertEquals(LibreOfficeLauncherHelper.OS_LINUX, LibreOfficeLauncherHelper.getOperatingSystem(\"linux\"));\n assertEquals(LibreOfficeLauncherHelper.OS_LINUX, LibreOfficeLauncherHelper.getOperatingSystem(\"Linux\"));\n\n assertEquals(LibreOfficeLaun... | {
"fields": [
{
"declarator": "OS_WINDOWS = \"Windows\"",
"modifier": "public static final",
"original_string": "public static final String OS_WINDOWS = \"Windows\";",
"type": "String",
"var_name": "OS_WINDOWS"
},
{
"declarator": "OS_LINUX = \"Linux\"",
"modifier"... | {
"body": "public static String getOperatingSystem(String operatingSystemIndentifier) {\n // JOptionPane.showMessageDialog(null, operatingSystemIndentifier, \"Info\",\n // JOptionPane.ERROR_MESSAGE);\n if (\"linux\".equalsIgnoreCase(operatingSystemIndentifier)) {\n return OS_LINUX;\n }\n if (opera... | {
"created": null,
"fork": null,
"fork_count": 25,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9349893,
"size": 218,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/Redpill-Linpro/alfresco-libreoffice-online-edit"
} |
107304223_10 | {
"fields": [
{
"declarator": "encoder = new Base62Encoder()",
"modifier": "private final",
"original_string": "private final Base62Encoder encoder = new Base62Encoder();",
"type": "Base62Encoder",
"var_name": "encoder"
}
],
"file": "idem-core/src/test/java/net/mguenther/idem... | {
"body": "@Test\n public void encodeWithNoRemainingBitsYieldsCorrectResult() {\n // 6 bytes * 8 bit/byte = 8 symbols * 6 bit/symbol\n // no padding required in this case\n final ByteBuffer byteBuffer = ByteBuffer.allocate(6);\n byteBuffer\n .put((byte) 0x00)\n ... | {
"fields": [
{
"declarator": "BIT_MASK_255 = 0xFF",
"modifier": "private static final",
"original_string": "private static final int BIT_MASK_255 = 0xFF;",
"type": "int",
"var_name": "BIT_MASK_255"
},
{
"declarator": "BIT_MASK_LSB = 0x01",
"modifier": "private st... | {
"body": "@Override\n public String encode(final ByteBuffer unencodedData) {\n final int maxBytes = unencodedData.limit();\n final StringBuilder sb = new StringBuilder();\n\n int bitSource = nextByte(unencodedData);\n int unencodedBits = bitSource >> 2; // init unencodedBits with first... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
107304223_0 | {
"fields": [],
"file": "idem-core/src/test/java/net/mguenther/idem/sequence/SequenceTest.java",
"identifier": "SequenceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void nextSequenceNumberShouldIncreaseSequenceNumberLinearly() {\n\n final Sequence provider = new Sequence(useDefaults(65536));\n final Map<Long, List<SequenceNumber>> groupedByTick = Stream.iterate(0, i -> i + 1)\n .limit(100)\n .map(i -> provi... | {
"fields": [
{
"declarator": "lock = new Object()",
"modifier": "private final",
"original_string": "private final Object lock = new Object();",
"type": "Object",
"var_name": "lock"
},
{
"declarator": "timeProvider",
"modifier": "private final",
"original_s... | {
"body": "public SequenceNumber nextSequenceNumber() {\n synchronized (lock) {\n final long tick = updateCounter();\n return new SequenceNumber(tick, sequenceToByteArray());\n }\n }",
"class_method_signature": "Sequence.nextSequenceNumber()",
"constructor": false,
"full_s... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
107304223_1 | {
"fields": [],
"file": "idem-core/src/test/java/net/mguenther/idem/sequence/SequenceTest.java",
"identifier": "SequenceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = OutOfSequenceNumbersException.class)\n public void nextSequenceNumberShouldThrowOutOfSequenceNumbersExceptionIfPoolIsExhausted() {\n\n final SequenceConfig config = create(1)\n .withMaxWaitTime(0, TimeUnit.MILLISECONDS)\n .build();\n final Seq... | {
"fields": [
{
"declarator": "lock = new Object()",
"modifier": "private final",
"original_string": "private final Object lock = new Object();",
"type": "Object",
"var_name": "lock"
},
{
"declarator": "timeProvider",
"modifier": "private final",
"original_s... | {
"body": "public SequenceNumber nextSequenceNumber() {\n synchronized (lock) {\n final long tick = updateCounter();\n return new SequenceNumber(tick, sequenceToByteArray());\n }\n }",
"class_method_signature": "Sequence.nextSequenceNumber()",
"constructor": false,
"full_s... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
107304223_11 | {
"fields": [
{
"declarator": "encoder = new Base62Encoder()",
"modifier": "private final",
"original_string": "private final Base62Encoder encoder = new Base62Encoder();",
"type": "Base62Encoder",
"var_name": "encoder"
}
],
"file": "idem-core/src/test/java/net/mguenther/idem... | {
"body": "@Test\n public void encodeShouldYieldValidBase62StringForPaperExample() {\n // these 3 bytes are taken from the paper\n // \"A Secure, Lossless, and Compressed Base62 Encoding\" by\n // He et al.\n // the resulting base62 encoding is different, because\n // He et al. u... | {
"fields": [
{
"declarator": "BIT_MASK_255 = 0xFF",
"modifier": "private static final",
"original_string": "private static final int BIT_MASK_255 = 0xFF;",
"type": "int",
"var_name": "BIT_MASK_255"
},
{
"declarator": "BIT_MASK_LSB = 0x01",
"modifier": "private st... | {
"body": "@Override\n public String encode(final ByteBuffer unencodedData) {\n final int maxBytes = unencodedData.limit();\n final StringBuilder sb = new StringBuilder();\n\n int bitSource = nextByte(unencodedData);\n int unencodedBits = bitSource >> 2; // init unencodedBits with first... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
107304223_6 | {
"fields": [
{
"declarator": "encoder = new Base62Encoder()",
"modifier": "private final",
"original_string": "private final Base62Encoder encoder = new Base62Encoder();",
"type": "Base62Encoder",
"var_name": "encoder"
}
],
"file": "idem-core/src/test/java/net/mguenther/idem... | {
"body": "@Test\n public void encodeShouldYieldValidBase62CharacterSimpleSubstitution() {\n final ByteBuffer byteBuffer = ByteBuffer.allocate(1);\n byteBuffer\n .put((byte) 0x53)\n .flip();\n assertThat(encoder.encode(byteBuffer), is(\"UD\"));\n }",
"class_m... | {
"fields": [
{
"declarator": "BIT_MASK_255 = 0xFF",
"modifier": "private static final",
"original_string": "private static final int BIT_MASK_255 = 0xFF;",
"type": "int",
"var_name": "BIT_MASK_255"
},
{
"declarator": "BIT_MASK_LSB = 0x01",
"modifier": "private st... | {
"body": "@Override\n public String encode(final ByteBuffer unencodedData) {\n final int maxBytes = unencodedData.limit();\n final StringBuilder sb = new StringBuilder();\n\n int bitSource = nextByte(unencodedData);\n int unencodedBits = bitSource >> 2; // init unencodedBits with first... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
107304223_7 | {
"fields": [
{
"declarator": "encoder = new Base62Encoder()",
"modifier": "private final",
"original_string": "private final Base62Encoder encoder = new Base62Encoder();",
"type": "Base62Encoder",
"var_name": "encoder"
}
],
"file": "idem-core/src/test/java/net/mguenther/idem... | {
"body": "@Test\n public void encodeByteWithFiveLeadingSetOnesYieldsCorrectResult() {\n final ByteBuffer byteBuffer = ByteBuffer.allocate(1);\n byteBuffer\n .put((byte) 0xF9)\n .flip();\n assertThat(encoder.encode(byteBuffer), is(\"9B\"));\n\n final ByteBu... | {
"fields": [
{
"declarator": "BIT_MASK_255 = 0xFF",
"modifier": "private static final",
"original_string": "private static final int BIT_MASK_255 = 0xFF;",
"type": "int",
"var_name": "BIT_MASK_255"
},
{
"declarator": "BIT_MASK_LSB = 0x01",
"modifier": "private st... | {
"body": "@Override\n public String encode(final ByteBuffer unencodedData) {\n final int maxBytes = unencodedData.limit();\n final StringBuilder sb = new StringBuilder();\n\n int bitSource = nextByte(unencodedData);\n int unencodedBits = bitSource >> 2; // init unencodedBits with first... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
107304223_8 | {
"fields": [
{
"declarator": "encoder = new Base62Encoder()",
"modifier": "private final",
"original_string": "private final Base62Encoder encoder = new Base62Encoder();",
"type": "Base62Encoder",
"var_name": "encoder"
}
],
"file": "idem-core/src/test/java/net/mguenther/idem... | {
"body": "@Test\n public void encodeByteWithFourLeadingOnesYieldsCorrectResult() {\n final ByteBuffer byteBuffer = ByteBuffer.allocate(1);\n byteBuffer\n .put((byte) 0xF0)\n .flip();\n assertThat(encoder.encode(byteBuffer), is(\"8A\"));\n }",
"class_method_s... | {
"fields": [
{
"declarator": "BIT_MASK_255 = 0xFF",
"modifier": "private static final",
"original_string": "private static final int BIT_MASK_255 = 0xFF;",
"type": "int",
"var_name": "BIT_MASK_255"
},
{
"declarator": "BIT_MASK_LSB = 0x01",
"modifier": "private st... | {
"body": "@Override\n public String encode(final ByteBuffer unencodedData) {\n final int maxBytes = unencodedData.limit();\n final StringBuilder sb = new StringBuilder();\n\n int bitSource = nextByte(unencodedData);\n int unencodedBits = bitSource >> 2; // init unencodedBits with first... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
107304223_4 | {
"fields": [
{
"declarator": "timeProvider = new LinearTimeProvider()",
"modifier": "private final",
"original_string": "private final TimeProvider timeProvider = new LinearTimeProvider();",
"type": "TimeProvider",
"var_name": "timeProvider"
},
{
"declarator": "flake",... | {
"body": "@Test\n public void idsThatHaveBeenGeneratedASecondApartAlsoAreASecondApartInIdSpace() throws InterruptedException {\n\n Long id1 = flake.nextId();\n\n Wait.delay(1, TimeUnit.SECONDS);\n\n Long id2 = flake.nextId();\n\n long timestampFromId1 = id1 >> 22;\n long timesta... | {
"fields": [
{
"declarator": "encoder",
"modifier": "private final",
"original_string": "private final Encoder<ByteBuffer, Long> encoder;",
"type": "Encoder<ByteBuffer, Long>",
"var_name": "encoder"
}
],
"file": "idem-core/src/main/java/net/mguenther/idem/flake/Flake64L.java... | {
"body": "@Override\n public Long nextId() {\n\n final SequenceNumber sequenceNumber = getSequence().nextSequenceNumber();\n final ByteBuffer bb = (ByteBuffer) toByteBuffer(sequenceNumber);\n\n return encoder.encode(bb);\n }",
"class_method_signature": "Flake64L.nextId()",
"constructor... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
107304223_5 | {
"fields": [
{
"declarator": "encoder = new Base62Encoder()",
"modifier": "private final",
"original_string": "private final Base62Encoder encoder = new Base62Encoder();",
"type": "Base62Encoder",
"var_name": "encoder"
}
],
"file": "idem-core/src/test/java/net/mguenther/idem... | {
"body": "@Test\n public void encodeWithSpecialCharacterAtEndPadsCorrectlyToNextCharacter() {\n final ByteBuffer byteBuffer = ByteBuffer.allocate(6);\n byteBuffer\n .put((byte) 0x07)\n .put((byte) 0x59)\n .put((byte) 0x06)\n .put((byte) 0x6... | {
"fields": [
{
"declarator": "BIT_MASK_255 = 0xFF",
"modifier": "private static final",
"original_string": "private static final int BIT_MASK_255 = 0xFF;",
"type": "int",
"var_name": "BIT_MASK_255"
},
{
"declarator": "BIT_MASK_LSB = 0x01",
"modifier": "private st... | {
"body": "@Override\n public String encode(final ByteBuffer unencodedData) {\n final int maxBytes = unencodedData.limit();\n final StringBuilder sb = new StringBuilder();\n\n int bitSource = nextByte(unencodedData);\n int unencodedBits = bitSource >> 2; // init unencodedBits with first... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
107304223_9 | {
"fields": [
{
"declarator": "encoder = new Base62Encoder()",
"modifier": "private final",
"original_string": "private final Base62Encoder encoder = new Base62Encoder();",
"type": "Base62Encoder",
"var_name": "encoder"
}
],
"file": "idem-core/src/test/java/net/mguenther/idem... | {
"body": "@Test\n public void encodeByteWithZeroValuedRemainingBitsYieldsCorrectResult() {\n final ByteBuffer byteBuffer = ByteBuffer.allocate(1);\n byteBuffer\n .put((byte) 0xF8)\n .flip();\n assertThat(encoder.encode(byteBuffer), is(\"9A\"));\n }",
"class_... | {
"fields": [
{
"declarator": "BIT_MASK_255 = 0xFF",
"modifier": "private static final",
"original_string": "private static final int BIT_MASK_255 = 0xFF;",
"type": "int",
"var_name": "BIT_MASK_255"
},
{
"declarator": "BIT_MASK_LSB = 0x01",
"modifier": "private st... | {
"body": "@Override\n public String encode(final ByteBuffer unencodedData) {\n final int maxBytes = unencodedData.limit();\n final StringBuilder sb = new StringBuilder();\n\n int bitSource = nextByte(unencodedData);\n int unencodedBits = bitSource >> 2; // init unencodedBits with first... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
107304223_2 | {
"fields": [],
"file": "idem-core/src/test/java/net/mguenther/idem/sequence/SequenceTest.java",
"identifier": "SequenceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = BackwardsClockDriftException.class)\n public void nextSequenceNumberShouldThrowBackwardsClockDriftExceptionIfDriftIsDetected() {\n\n final SequenceConfig config = SequenceConfig.create(65536)\n .withTimeProvider(new DriftingTimeProvider())\n .build()... | {
"fields": [
{
"declarator": "lock = new Object()",
"modifier": "private final",
"original_string": "private final Object lock = new Object();",
"type": "Object",
"var_name": "lock"
},
{
"declarator": "timeProvider",
"modifier": "private final",
"original_s... | {
"body": "public SequenceNumber nextSequenceNumber() {\n synchronized (lock) {\n final long tick = updateCounter();\n return new SequenceNumber(tick, sequenceToByteArray());\n }\n }",
"class_method_signature": "Sequence.nextSequenceNumber()",
"constructor": false,
"full_s... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
107304223_3 | {
"fields": [
{
"declarator": "timeProvider = new LinearTimeProvider()",
"modifier": "private final",
"original_string": "private final TimeProvider timeProvider = new LinearTimeProvider();",
"type": "TimeProvider",
"var_name": "timeProvider"
},
{
"declarator": "flake",... | {
"body": "@Test\n public void generatedIdsShouldBeLinearlyIncreasingAcrossTimeSlots() {\n List<Long> generatedIds = new ArrayList<>();\n long started = System.nanoTime();\n while (System.nanoTime() - started < 200_000_000L) {\n generatedIds.add(flake.nextId());\n }\n ... | {
"fields": [
{
"declarator": "encoder",
"modifier": "private final",
"original_string": "private final Encoder<ByteBuffer, Long> encoder;",
"type": "Encoder<ByteBuffer, Long>",
"var_name": "encoder"
}
],
"file": "idem-core/src/main/java/net/mguenther/idem/flake/Flake64L.java... | {
"body": "@Override\n public Long nextId() {\n\n final SequenceNumber sequenceNumber = getSequence().nextSequenceNumber();\n final ByteBuffer bb = (ByteBuffer) toByteBuffer(sequenceNumber);\n\n return encoder.encode(bb);\n }",
"class_method_signature": "Flake64L.nextId()",
"constructor... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 107304223,
"size": 57,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/mguenther/idem"
} |
147324252_12 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void skipLoggingOfBadEntries() throws Exception\n {\n badFile().delete();\n // GIVEN\n List<String> nodeIds = asList( \"a\", \"b\", \"c\" );\n Configuration config = Configuration.COMMAS;\n File nodeData = nodeData( true, config, nodeIds, TRUE );\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_28 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldRespectDbConfig() throws Exception\n {\n // GIVEN\n int arrayBlockSize = 10;\n int stringBlockSize = 12;\n File dbConfig = file( \"db.properties\" );\n\n List<String> nodeIds = nodeIds();\n\n // WHEN\n importTool(\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_6 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldImportGroupsOfOverlappingIds() throws Exception\n {\n // GIVEN\n List<String> groupOneNodeIds = asList( \"1\", \"2\", \"3\" );\n List<String> groupTwoNodeIds = asList( \"4\", \"5\", \"2\" );\n List<RelationshipDataLine> rels = asList(\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_32 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldFailOnInvalidMaxMemoryPercentageSetting() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds( 10 );\n\n try\n {\n // WHEN\n importTool( \"--into\", graphDbDir().getAbsolutePath(), \"--nodes:\" + node_label,\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_24 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldReportBadDelimiterConfiguration() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds();\n Configuration config = Configuration.TABS;\n\n // WHEN\n try\n {\n importTool(\n \"--into\", graphD... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_25 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldAcceptRawEscapedAsciiCodeAsQuoteConfiguration() throws Exception\n {\n // GIVEN\n char weirdDelimiter = 1; // not '1', just the character represented with code 1, which seems to be SOH\n String name1 = weirdDelimiter + \"Weird\" + weirdDelimiter;\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static DataFactory data( final Decorator decorator,\n final Charset charset, final File... files )\n {\n if ( files.length == 0 )\n {\n throw new IllegalArgumentException( \"No files specified\" );\n }\n\n return config -> ... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_33 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldRespectMaxMemorySuffixedSetting() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds( 10 );\n\n // WHEN\n importTool(\n \"--into\", graphDbDir().getAbsolutePath(),\n \"--nodes:\" + node_label, nodeData( ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_7 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldBeAbleToMixSpecifiedAndUnspecifiedGroups() throws Exception\n {\n // GIVEN\n List<String> groupOneNodeIds = asList( \"1\", \"2\", \"3\" );\n List<String> groupTwoNodeIds = asList( \"4\", \"5\", \"2\" );\n Configuration config = Configuration.COMMA... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_29 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void useProvidedAdditionalConfig() throws Exception\n {\n // GIVEN\n int arrayBlockSize = 10;\n int stringBlockSize = 12;\n File dbConfig = file( \"db.properties\" );\n\n List<String> nodeIds = nodeIds();\n\n // WHEN\n importTool(\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_13 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldImportFromInputDataEncodedWithSpecificCharset() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds();\n Configuration config = Configuration.COMMAS;\n Charset charset = Charset.forName( \"UTF-16\" );\n\n // WHEN\n impor... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_18 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldAllowMultilineFieldsWhenEnabled() throws Exception\n {\n // GIVEN\n File data = data( \"id:ID,name\", \"1,\\\"This is a line with\\nnewlines in\\\"\" );\n\n // WHEN\n importTool(\n \"--into\", graphDbDir().getAbsolutePath(),\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static DataFactory data( final Decorator decorator,\n final Charset charset, final File... files )\n {\n if ( files.length == 0 )\n {\n throw new IllegalArgumentException( \"No files specified\" );\n }\n\n return config -> ... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_0 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldImportWithAsManyDefaultsAsAvailable() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds();\n Configuration config = Configuration.COMMAS;\n\n // WHEN\n importTool(\n \"--into\",\n graphDbDir().ge... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_34 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldTreatRelationshipWithMissingStartOrEndIdOrTypeAsBadRelationship() throws Exception\n {\n // GIVEN\n List<String> nodeIds = asList( \"a\", \"b\", \"c\" );\n Configuration config = Configuration.COMMAS;\n File nodeData = nodeData( true, config, node... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_22 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldAcceptRawAsciiCharacterCodeAsQuoteConfiguration() throws Exception\n {\n // GIVEN\n char weirdDelimiter = 1; // not '1', just the character represented with code 1, which seems to be SOH\n String name1 = weirdDelimiter + \"Weird\" + weirdDelimiter;\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static DataFactory data( final Decorator decorator,\n final Charset charset, final File... files )\n {\n if ( files.length == 0 )\n {\n throw new IllegalArgumentException( \"No files specified\" );\n }\n\n return config -> ... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_14 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldBeAbleToImportAnonymousNodes() throws Exception\n {\n // GIVEN\n List<String> nodeIds = asList( \"1\", \"\", \"\", \"\", \"3\", \"\", \"\", \"\", \"\", \"\", \"5\" );\n Configuration config = Configuration.COMMAS;\n List<RelationshipDataLine> rela... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_15 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldNotTrimStringsByDefault() throws Exception\n {\n // GIVEN\n String name = \" This is a line with leading and trailing whitespaces \";\n File data = data( \"id:ID,name\", \"1,\\\"\" + name + \"\\\"\");\n\n // WHEN\n importTool(\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static DataFactory data( final Decorator decorator,\n final Charset charset, final File... files )\n {\n if ( files.length == 0 )\n {\n throw new IllegalArgumentException( \"No files specified\" );\n }\n\n return config -> ... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_23 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldAcceptSpecialTabCharacterAsDelimiterConfiguration() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds();\n Configuration config = Configuration.TABS;\n\n // WHEN\n importTool(\n \"--into\", graphDbDir().getAbso... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_19 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldSkipEmptyFiles() throws Exception\n {\n // GIVEN\n File data = data( \"\" );\n\n // WHEN\n importTool( \"--into\", graphDbDir().getAbsolutePath(),\n \"--nodes:\" + node_label, data.getAbsolutePath() );\n }",
"class_method_signa... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static DataFactory data( final Decorator decorator,\n final Charset charset, final File... files )\n {\n if ( files.length == 0 )\n {\n throw new IllegalArgumentException( \"No files specified\" );\n }\n\n return config -> ... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_1 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldImportWithHeadersBeingInSeparateFiles() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds();\n Configuration config = Configuration.TABS;\n\n // WHEN\n importTool(\n \"--into\", graphDbDir().getAbsolutePath(),\... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_20 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldIgnoreEmptyQuotedStringsIfConfiguredTo() throws Exception\n {\n // GIVEN\n File data = data(\n \"id:ID,one,two,three\",\n \"1,\\\"\\\",,value\" );\n\n // WHEN\n importTool(\n \"--into\", graphDbDir().ge... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static DataFactory data( final Decorator decorator,\n final Charset charset, final File... files )\n {\n if ( files.length == 0 )\n {\n throw new IllegalArgumentException( \"No files specified\" );\n }\n\n return config -> ... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_2 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldFailIfHeaderHasLessColumnsThanData() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds();\n Configuration config = Configuration.TABS;\n\n // WHEN data file contains more columns than header file\n int extraColumns = 3;\n\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_16 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldTrimStringsIfConfiguredTo() throws Exception\n {\n // GIVEN\n String name = \" This is a line with leading and trailing whitespaces \";\n File data = data(\n \"id:ID,name\",\n \"1,\\\"\" + name + \"\\\"\",\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static DataFactory data( final Decorator decorator,\n final Charset charset, final File... files )\n {\n if ( files.length == 0 )\n {\n throw new IllegalArgumentException( \"No files specified\" );\n }\n\n return config -> ... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_17 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldCollectUnlimitedNumberOfBadEntries() throws Exception\n {\n // GIVEN\n List<String> nodeIds = Collections.nCopies( 10_000, \"A\" );\n\n // WHEN\n importTool(\n \"--into\", graphDbDir().getAbsolutePath(),\n \"--nodes:\... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_3 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldWarnIfHeaderHasLessColumnsThanDataWhenToldTo() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds();\n Configuration config = Configuration.TABS;\n File bad = badFile();\n\n // WHEN data file contains more columns than header ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_21 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldPrintUserFriendlyMessageAboutUnsupportedMultilineFields() throws Exception\n {\n // GIVEN\n File data = data(\n \"id:ID,name\",\n \"1,\\\"one\\ntwo\\nthree\\\"\",\n \"2,four\" );\n\n try\n {\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static DataFactory data( final Decorator decorator,\n final Charset charset, final File... files )\n {\n if ( files.length == 0 )\n {\n throw new IllegalArgumentException( \"No files specified\" );\n }\n\n return config -> ... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_8 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldImportWithoutTypeSpecifiedInRelationshipHeaderbutWithDefaultTypeInArgument() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds();\n Configuration config = Configuration.COMMAS;\n String type = randomType();\n\n // WHEN\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_10 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldSkipDuplicateNodesIfToldTo() throws Exception\n {\n // GIVEN\n List<String> nodeIds = asList( \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"a\", \"g\" );\n Configuration config = Configuration.COMMAS;\n File nodeHeaderFile = nodeHeader( config );\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_26 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldBeEquivalentToUseRawAsciiOrCharacterAsQuoteConfiguration1() throws Exception\n {\n // GIVEN\n char weirdDelimiter = 126; // 126 ~ (tilde)\n String weirdStringDelimiter = \"\\\\126\";\n String name1 = weirdDelimiter + \"Weird\" + weirdDelimiter;\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static DataFactory data( final Decorator decorator,\n final Charset charset, final File... files )\n {\n if ( files.length == 0 )\n {\n throw new IllegalArgumentException( \"No files specified\" );\n }\n\n return config -> ... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_30 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldRespectBufferSizeSetting() throws Exception\n {\n // GIVEN\n List<String> lines = new ArrayList<>();\n lines.add( \"id:ID,name,:LABEL\" );\n lines.add( \"id,\" + repeat( 'l', 2_000 ) + \",Person\" );\n\n // WHEN\n try\n {\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static DataFactory data( final Decorator decorator,\n final Charset charset, final File... files )\n {\n if ( files.length == 0 )\n {\n throw new IllegalArgumentException( \"No files specified\" );\n }\n\n return config -> ... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_4 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldImportSplitInputFiles() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds();\n Configuration config = Configuration.COMMAS;\n\n // WHEN\n importTool(\n \"--into\", graphDbDir().getAbsolutePath(),\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_5 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldImportMultipleInputsWithAddedLabelsAndDefaultRelationshipType() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds();\n Configuration config = Configuration.COMMAS;\n final String[] firstLabels = {\"AddedOne\", \"AddedTwo\"};\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_31 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldRespectMaxMemoryPercentageSetting() throws Exception\n {\n // GIVEN\n List<String> nodeIds = nodeIds( 10 );\n\n // WHEN\n importTool(\n \"--into\", graphDbDir().getAbsolutePath(),\n \"--nodes:\" + node_label, nodeData... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_27 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldBeEquivalentToUseRawAsciiOrCharacterAsQuoteConfiguration2() throws Exception\n {\n // GIVEN\n char weirdDelimiter = 126; // 126 ~ (tilde)\n String weirdStringDelimiter = \"~\";\n String name1 = weirdDelimiter + \"Weird\" + weirdDelimiter;\n ... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static DataFactory data( final Decorator decorator,\n final Charset charset, final File... files )\n {\n if ( files.length == 0 )\n {\n throw new IllegalArgumentException( \"No files specified\" );\n }\n\n return config -> ... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_9 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldIncludeSourceInformationInNodeIdCollisionError() throws Exception\n {\n // GIVEN\n List<String> nodeIds = asList( \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"a\", \"g\" );\n Configuration config = Configuration.COMMAS;\n File nodeHeaderFile = node... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
147324252_11 | {
"fields": [
{
"declarator": "MAX_LABEL_ID = 4",
"modifier": "private static final",
"original_string": "private static final int MAX_LABEL_ID = 4;",
"type": "int",
"var_name": "MAX_LABEL_ID"
},
{
"declarator": "RELATIONSHIP_COUNT = 10_000",
"modifier": "private ... | {
"body": "@Test\n public void shouldLogRelationshipsReferringToMissingNode() throws Exception\n {\n // GIVEN\n List<String> nodeIds = asList( \"a\", \"b\", \"c\" );\n Configuration config = Configuration.COMMAS;\n File nodeData = nodeData( true, config, nodeIds, TRUE );\n Lis... | {
"fields": [
{
"declarator": "MULTI_FILE_DELIMITER = \",\"",
"modifier": "static final",
"original_string": "static final String MULTI_FILE_DELIMITER = \",\";",
"type": "String",
"var_name": "MULTI_FILE_DELIMITER"
},
{
"declarator": "TO_ID_TYPE = from -> IdType.valueOf... | {
"body": "public static Iterable<DataFactory> nodeData(final Charset encoding,\n Collection<Args.Option<File[]>> nodesFiles )\n {\n return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles )\n {\n @Override\n protec... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 147324252,
"size": 362,
"stargazer_count": 65,
"stars": null,
"updates": null,
"url": "https://github.com/dengziming/janusgraph-util"
} |
66266995_15 | {
"fields": [
{
"declarator": "mData",
"modifier": "@Nonnull\n private final",
"original_string": "@Nonnull\n private final TestData mData;",
"type": "TestData",
"var_name": "mData"
},
{
"declarator": "mNetworkManager",
"modifier": "@Nonnull\n private",
... | {
"body": "@Test\n public void networkIsNotConfigured_CanAdd_ReturnsId() throws Exception {\n whenNetworkCanBeAdded();\n\n assertEquals(NET_ID, mNetworkManager.createNetwork(UNSECURE_PARAMS));\n }",
"class_method_signature": "NetworkManagerTest.networkIsNotConfigured_CanAdd_ReturnsId()",
"cons... | {
"fields": [
{
"declarator": "NO_ID = -1",
"modifier": "static final",
"original_string": "static final int NO_ID = -1;",
"type": "int",
"var_name": "NO_ID"
},
{
"declarator": "mWifiManager",
"modifier": "@Nonnull\n private final",
"original_string": "@N... | {
"body": "int createNetwork(Params params) throws Exception {\n Log.d(Tag.NAME, \"Get connected network id...\");\n int connectedNetId = getConnectedNetworkWithSsid(params.quotedSsid);\n if (connectedNetId != NO_ID) {\n Log.d(Tag.NAME, \"Configured network found. It is connected\");\n... | {
"created": null,
"fork": null,
"fork_count": 3,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 66266995,
"size": 119,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/yandex-qatools/android-wifitool"
} |
66266995_19 | {
"fields": [
{
"declarator": "mIntentService",
"modifier": "private final",
"original_string": "private final WifiIntentService mIntentService;",
"type": "WifiIntentService",
"var_name": "mIntentService"
},
{
"declarator": "mContinuationTask",
"modifier": "@Mock\... | {
"body": "@Test\n public void validIntentParams_WifiEnabled_Succeeds() throws Exception {\n Intent intent = new Intent();\n intent.putExtra(ParamNames.SSID, SOME_SSID);\n\n doReturn(WifiManager.WIFI_STATE_ENABLED).when(mWifiManager).getWifiState();\n\n mIntentService.onHandleIntent(int... | {
"fields": [
{
"declarator": "mRetryConnectorProvider",
"modifier": "@Inject",
"original_string": "@Inject\n Provider<RetryConnector> mRetryConnectorProvider;",
"type": "Provider<RetryConnector>",
"var_name": "mRetryConnectorProvider"
}
],
"file": "wifitool/src/main/java/... | {
"body": "@Override\n protected void onHandleIntent(Intent intent) {\n try {\n handle(intent);\n } catch (InterruptedException e) {\n Log.e(Tag.FAIL, \"Process got interrupted\", e);\n Thread.currentThread().interrupt();\n }\n }",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 3,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 66266995,
"size": 119,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/yandex-qatools/android-wifitool"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.