id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
3460824_44 | {
"fields": [
{
"declarator": "configPropertyParser = new ConfigPropertyParser()",
"modifier": "private",
"original_string": "private ConfigPropertyParser configPropertyParser = new ConfigPropertyParser();",
"type": "ConfigPropertyParser",
"var_name": "configPropertyParser"
}
]... | {
"body": "@Test\n public void testConfigSettersWhichHavePrimitiveArgumentAreDescribedUsingTheEquivalentWrapperType() throws ConfigBuilderException {\n List<ConfigurationProperty> properties = configPropertyParser.getConfigProperties(ConfigBeanWithASetterWithPrimitiveTypeParameter.class);\n assertEqu... | {
"fields": [],
"file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyParser.java",
"identifier": "ConfigPropertyParser",
"interfaces": "",
"methods": [
{
"class_method_signature": "ConfigPropertyParser.getConfigPropertiesByName(Class... | {
"body": "public List<ConfigurationProperty> getConfigProperties(Class configClass) throws ConfigBuilderException {\n Method[] methods = getMethodsFromConfigClass(configClass);\n\n List<ConfigurationProperty> result = new LinkedList<>();\n List<Method> l = Arrays.stream(methods)\n ... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3460824,
"size": 6796,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/Chorus-bdd/Chorus"
} |
3460824_13 | {
"fields": [],
"file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/PolledAssertionTest.java",
"identifier": "PolledAssertionTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void testCheckedConditionFails() throws Exception {\n final boolean[] condition = {false};\n final AtomicLong count = new AtomicLong();\n\n try {\n new PolledAssertion() {\n protected void validate() {\n count.incrementAndG... | {
"fields": [],
"file": "interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java",
"identifier": "PolledAssertion",
"interfaces": "",
"methods": [
{
"class_method_signature": "PolledAssertion.getTimeoutSeconds()",
"constructor": false,
"full_signature": "prot... | {
"body": "public int check() {\n return check(getTimeoutSeconds());\n }",
"class_method_signature": "PolledAssertion.check()",
"constructor": false,
"full_signature": "public int check()",
"identifier": "check",
"invocations": [
"check",
"getTimeoutSeconds"
],
"modifiers": "public",
... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3460824,
"size": 6796,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/Chorus-bdd/Chorus"
} |
3460824_29 | {
"fields": [
{
"declarator": "configBuilder = new ConfigBuilder()",
"modifier": "private",
"original_string": "private ConfigBuilder configBuilder = new ConfigBuilder();",
"type": "ConfigBuilder",
"var_name": "configBuilder"
}
],
"file": "interpreter/chorus-handlerconfig/src... | {
"body": "@Test\n public void testValidationRulesAreAppliedToMyProvidedValue() {\n Properties p = new Properties();\n p.setProperty(\"stringProperty\", \"This value will not validate\");\n try {\n configBuilder.buildConfig(ConfigClassWithSimpleProperty.class, p);\n fail(... | {
"fields": [
{
"declarator": "log = ChorusLogFactory.getLog(ConfigBuilder.class)",
"modifier": "private",
"original_string": "private ChorusLog log = ChorusLogFactory.getLog(ConfigBuilder.class);",
"type": "ChorusLog",
"var_name": "log"
},
{
"declarator": "configProper... | {
"body": "public <C> C buildConfig(Class<C> configClass, Properties properties) throws ConfigBuilderException {\n\n Map<String, ConfigurationProperty> configPropertiesByName = configPropertyParser.getConfigPropertiesByName(configClass);\n\n C configInstance;\n try {\n configInstance =... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3460824,
"size": 6796,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/Chorus-bdd/Chorus"
} |
3460824_4 | {
"fields": [
{
"declarator": "chorusLog = Mockito.mock(ChorusLog.class)",
"modifier": "private",
"original_string": "private ChorusLog chorusLog = Mockito.mock(ChorusLog.class);",
"type": "ChorusLog",
"var_name": "chorusLog"
},
{
"declarator": "subsystemDiscovery = new... | {
"body": "@Test\n public void checkTheSubsystemImplClassMustExtendTheInterface() throws Exception {\n HashMap<String, Class> scanResult = subsystemDiscovery.discoverSubsystems(asList(\"org.chorusbdd.chorus.subsystem.badmocktheimplementationclassdoesnotimplement\"), chorusLog);\n\n verify(chorusLog).... | {
"fields": [
{
"declarator": "log = ChorusLogFactory.getLog(SubsystemDiscovery.class)",
"modifier": "private",
"original_string": "private ChorusLog log = ChorusLogFactory.getLog(SubsystemDiscovery.class);",
"type": "ChorusLog",
"var_name": "log"
}
],
"file": "interpreter/ch... | {
"body": "public HashMap<String, Class> discoverSubsystems(List<String> basePackages) {\n return discoverSubsystems(basePackages, log);\n }",
"class_method_signature": "SubsystemDiscovery.discoverSubsystems(List<String> basePackages)",
"constructor": false,
"full_signature": "public HashMap<String, C... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3460824,
"size": 6796,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/Chorus-bdd/Chorus"
} |
42452274_2 | {
"fields": [
{
"declarator": "APP_NAME = \"Example122\"",
"modifier": "private static final",
"original_string": "private static final String APP_NAME = \"Example122\";",
"type": "String",
"var_name": "APP_NAME"
},
{
"declarator": "mMockContext",
"modifier": "@Mo... | {
"body": "@Test\n public void readAppNameFromContext(){\n when(mMockContext.getString(R.string.app_name)).thenReturn(APP_NAME);\n\n Utils utils = new Utils(mMockContext);\n String appName = utils.getAppName();\n assertThat(appName,is(APP_NAME));\n }",
"class_method_signature": "Ut... | {
"fields": [
{
"declarator": "mContext",
"modifier": "private",
"original_string": "private Context mContext;",
"type": "Context",
"var_name": "mContext"
}
],
"file": "chapter12/example122/src/main/java/org/flysnow/app/example122/Utils.java",
"identifier": "Utils",
"inte... | {
"body": "public String getAppName(){\n return String.valueOf(mContext.getString(R.string.app_name));\n }",
"class_method_signature": "Utils.getAppName()",
"constructor": false,
"full_signature": "public String getAppName()",
"identifier": "getAppName",
"invocations": [
"valueOf",
"getStr... | {
"created": null,
"fork": null,
"fork_count": 88,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42452274,
"size": 282,
"stargazer_count": 250,
"stars": null,
"updates": null,
"url": "https://github.com/rujews/android-gradle-book-code"
} |
42452274_1 | {
"fields": [],
"file": "chapter12/example122/src/test/java/org/flysnow/app/example122/EmailValidatorTest.java",
"identifier": "EmailValidatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void emailValidator_CorrectEmailSimple_ReturnsFalse() {\n assertThat(EmailValidator.isValidEmail(\"name\"), is(false));\n }",
"class_method_signature": "EmailValidatorTest.emailValidator_CorrectEmailSimple_ReturnsFalse()",
"constructor": false,
"full_signature": "@Test pub... | {
"fields": [],
"file": "chapter12/example122/src/main/java/org/flysnow/app/example122/EmailValidator.java",
"identifier": "EmailValidator",
"interfaces": "",
"methods": [
{
"class_method_signature": "EmailValidator.isValidEmail(String email)",
"constructor": false,
"full_signature": "pu... | {
"body": "public static boolean isValidEmail(String email){\n if (null==email || \"\".equals(email)) return false;\n //Pattern p = Pattern.compile(\"\\\\w+@(\\\\w+.)+[a-z]{2,3}\"); //简单匹配\n Pattern p = Pattern.compile(\"\\\\w+([-+.]\\\\w+)*@\\\\w+([-.]\\\\w+)*\\\\.\\\\w+([-.]\\\\w+)*\");//复杂匹配\... | {
"created": null,
"fork": null,
"fork_count": 88,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42452274,
"size": 282,
"stargazer_count": 250,
"stars": null,
"updates": null,
"url": "https://github.com/rujews/android-gradle-book-code"
} |
42452274_0 | {
"fields": [],
"file": "chapter12/example122/src/test/java/org/flysnow/app/example122/EmailValidatorTest.java",
"identifier": "EmailValidatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void emailValidator_CorrectEmailSimple_ReturnsTrue() {\n assertThat(EmailValidator.isValidEmail(\"name@email.com\"), is(true));\n }",
"class_method_signature": "EmailValidatorTest.emailValidator_CorrectEmailSimple_ReturnsTrue()",
"constructor": false,
"full_signature": "@T... | {
"fields": [],
"file": "chapter12/example122/src/main/java/org/flysnow/app/example122/EmailValidator.java",
"identifier": "EmailValidator",
"interfaces": "",
"methods": [
{
"class_method_signature": "EmailValidator.isValidEmail(String email)",
"constructor": false,
"full_signature": "pu... | {
"body": "public static boolean isValidEmail(String email){\n if (null==email || \"\".equals(email)) return false;\n //Pattern p = Pattern.compile(\"\\\\w+@(\\\\w+.)+[a-z]{2,3}\"); //简单匹配\n Pattern p = Pattern.compile(\"\\\\w+([-+.]\\\\w+)*@\\\\w+([-.]\\\\w+)*\\\\.\\\\w+([-.]\\\\w+)*\");//复杂匹配\... | {
"created": null,
"fork": null,
"fork_count": 88,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42452274,
"size": 282,
"stargazer_count": 250,
"stars": null,
"updates": null,
"url": "https://github.com/rujews/android-gradle-book-code"
} |
25979437_30 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testIntegerList() throws Exception {\n assertEquals(Arrays.asList(200, 400, 600), new ParameterValue(\"200\", \"400\", \"600\").toList(Integer.class));\n }",
"class_method_signature": "ParameterValueTest.testIntegerList()",
"constructor": false,
"full_signature": "@Te... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public List<String> toList() {\n return toList(Collections.emptyList());\n }",
"class_method_signature": "ParameterValue.toList()",
"constructor": false,
"full_signature": "public List<String> toList()",
"identifier": "toList",
"invocations": [
"toList",
"emptyList"
],
"modi... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_88 | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "KEY = \"KEY\"",
"modifier... | {
"body": "@Test\n public void testSave() {\n System.out.println(\"save\");\n EhcacheSessionDataStorage instance = new EhcacheSessionDataStorage();\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALUE);\n ins... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public void save(SessionData sessionData) {\n this.sessions.put(new Element(sessionData.getId(), sessionData));\n }",
"class_method_signature": "EhcacheSessionDataStorage.save(SessionData sessionData)",
"constructor": false,
"full_signature": "@Override public void save(Sessi... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_67 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testGet() {\n System.out.println(\"get\");\n MongoDBSessionDataStorage instance = new MongoDBSessionDataStorage(mongoClient.getDatabase(DATABASE_NAME));\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessi... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "IDLE_TIME = DefaultSessionData.... | {
"body": "@Override\n public SessionData get(String sessionId) {\n Document doc = this.sessions\n .find(eq(SESSION_ID, sessionId))\n .projection(include(SESSION_DATA))\n .first();\n if (doc == null) {\n return null;\n }\n String s... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_71 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testGet() {\n System.out.println(\"get\");\n InfinispanSessionDataStorage instance = new InfinispanSessionDataStorage(cacheManager);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALU... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public SessionData get(String sessionId) {\n return this.sessions.get(sessionId);\n }",
"class_method_signature": "InfinispanSessionDataStorage.get(String sessionId)",
"constructor": false,
"full_signature": "@Override public SessionData get(String sessionId)",
"identifier"... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_26 | {
"fields": [
{
"declarator": "emptyHandler = new EmptyHandler()",
"modifier": "private static final",
"original_string": "private static final RouteHandler emptyHandler = new EmptyHandler();",
"type": "RouteHandler",
"var_name": "emptyHandler"
},
{
"declarator": "route... | {
"body": "@Test\n public void testRemoveRoute() throws Exception {\n Route route = Route.GET(\"/.*\", emptyHandler);\n router.addRoute(route);\n\n assertEquals(1, router.getRoutes().size());\n assertEquals(1, router.getRoutes(HttpConstants.Method.GET).size());\n\n router.removeR... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DefaultRouter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DefaultRouter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declar... | {
"body": "@Override\n public void removeRoute(Route route) {\n log.debug(\"Removing route for {} '{}'\", route.getRequestMethod(), route.getUriPattern());\n boolean removed = routes.remove(route);\n if (removed) {\n // updates cache\n List<Route> cacheEntry = routesCache... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_2 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldGetRequestParameterWithSpecifiedName() {\n String expectedParameterName = \"foo\";\n String expectedParameterValue = \"bar\";\n\n when(mockHttpRequest.getParameterNames()).thenReturn(\n makeParameterNamesEnumeration(expectedParameterName));\n ... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public String getRequestParameter(String name) {\n ParameterValue parameter = getRequest().getParameter(name);\n return parameter.isNull() ? null : parameter.toString();\n }",
"class_method_signature": "PippoWebContext.getRequestParameter(String name)",
"constructor": fa... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_84 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testSave() {\n System.out.println(\"save\");\n XmemcachedSessionDataStorage instance = new XmemcachedSessionDataStorage(client, IDLE_TIME);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KE... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(XmemcachedSessionDataStorage.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(XmemcachedSessionDataStorage.class);",
"type": "Logger",
"var_name": "l... | {
"body": "@Override\n public void save(SessionData sessionData) {\n try {\n this.sessions.set(sessionData.getId(), idleTime, sessionData);\n } catch (TimeoutException | InterruptedException | MemcachedException ex) {\n log.error(\"An error occurred when saved SessionData.\", ex... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_92 | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "KEY = \"KEY\"",
"modifier... | {
"body": "@Test\n public void testSave() {\n HazelcastInstance hazelcastInstance1 = Hazelcast.newHazelcastInstance();\n HazelcastInstance hazelcastInstance2 = Hazelcast.newHazelcastInstance();\n System.out.println(\"save\");\n HazelcastSessionDataStorage instance = new HazelcastSession... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public void save(SessionData sessionData) {\n this.sessions.put(sessionData.getId(), sessionData);\n }",
"class_method_signature": "HazelcastSessionDataStorage.save(SessionData sessionData)",
"constructor": false,
"full_signature": "@Override public void save(SessionData sess... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_106 | {
"fields": [
{
"declarator": "controllerRegistry",
"modifier": "private",
"original_string": "private ControllerRegistry controllerRegistry;",
"type": "ControllerRegistry",
"var_name": "controllerRegistry"
},
{
"declarator": "thrown = ExpectedException.none()",
"... | {
"body": "@Test\n public void testWithPathWithMultiValue() throws Exception {\n controllerRegistry.register(WithPathWithMultiValueController.class);\n assertThat(getUriPatterns(controllerRegistry),\n containsInAnyOrder(WithPathWithMultiValueController.expectedUriPatterns()));\n }",... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ControllerRegistry.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(ControllerRegistry.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public void register(Package... packages) {\n String[] packageNames = Arrays.stream(packages)\n .map(Package::getName)\n .toArray(String[]::new);\n\n register(packageNames);\n }",
"class_method_signature": "ControllerRegistry.register(Package... packages)",
"const... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_51 | {
"fields": [
{
"declarator": "pippoSettings = Mockito.mock(PippoSettings.class)",
"modifier": "private",
"original_string": "private PippoSettings pippoSettings = Mockito.mock(PippoSettings.class);",
"type": "PippoSettings",
"var_name": "pippoSettings"
}
],
"file": "pippo-co... | {
"body": "@Test\n public void testGetDoubles() {\n // tests would similar for getFloats(String, String)\n Mockito.doReturn(\" [1234, 123, value3]\").when(pippoSettings)\n .getString(\"key\", null);\n Mockito.doCallRealMethod().when(pippoSettings).getStrings(\"key\", \",\");\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(PippoSettings.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(PippoSettings.class);",
"type": "Logger",
"var_name": "log"
},
{
"declar... | {
"body": "public List<Double> getDoubles(String name) {\n return getDoubles(name, DEFAULT_LIST_DELIMITER);\n }",
"class_method_signature": "PippoSettings.getDoubles(String name)",
"constructor": false,
"full_signature": "public List<Double> getDoubles(String name)",
"identifier": "getDoubles",
"i... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_10 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldReturnWhetherOrNotRequestIsSecureFromUnderlyingRequest() {\n boolean expectedSecureStatus = true;\n\n when(mockHttpRequest.isSecure()).thenReturn(expectedSecureStatus);\n\n PippoWebContext context = makePippoWebContext();\n\n assertThat(context.isSec... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public boolean isSecure() {\n return getRequest().isSecure();\n }",
"class_method_signature": "PippoWebContext.isSecure()",
"constructor": false,
"full_signature": "@Override public boolean isSecure()",
"identifier": "isSecure",
"invocations": [
"isSecure",
"getRe... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_47 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testEncodedArray3() throws Exception {\n int [] myArray = { 600, 400, 200 };\n assertTrue(Arrays.equals(myArray, new ParameterValue(\"600| 400|200\").to(int[].class)));\n }",
"class_method_signature": "ParameterValueTest.testEncodedArray3()",
"constructor": false... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public <T> T to(Class<T> classOfT) {\n return to(classOfT, null);\n }",
"class_method_signature": "ParameterValue.to(Class<T> classOfT)",
"constructor": false,
"full_signature": "public T to(Class<T> classOfT)",
"identifier": "to",
"invocations": [
"to"
],
"modifiers": "public",... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_46 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testEncodedArray2() throws Exception {\n int [] myArray = { 600, 400, 200 };\n assertTrue(Arrays.equals(myArray, new ParameterValue(\"600, 400,200\").to(int[].class)));\n }",
"class_method_signature": "ParameterValueTest.testEncodedArray2()",
"constructor": false... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public <T> T to(Class<T> classOfT) {\n return to(classOfT, null);\n }",
"class_method_signature": "ParameterValue.to(Class<T> classOfT)",
"constructor": false,
"full_signature": "public T to(Class<T> classOfT)",
"identifier": "to",
"invocations": [
"to"
],
"modifiers": "public",... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_11 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldReturnUrlFromUnderlyingRequestAsFullRequestUrl() {\n String expectedUrl = \"https://foo.example.com/2324/lists\";\n\n when(mockHttpRequest.getRequestURL()).thenReturn(new StringBuffer(expectedUrl));\n\n PippoWebContext context = makePippoWebContext();\n\n ... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public String getFullRequestURL() {\n return getRequest().getUrl();\n }",
"class_method_signature": "PippoWebContext.getFullRequestURL()",
"constructor": false,
"full_signature": "@Override public String getFullRequestURL()",
"identifier": "getFullRequestURL",
"invocation... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_50 | {
"fields": [
{
"declarator": "pippoSettings = Mockito.mock(PippoSettings.class)",
"modifier": "private",
"original_string": "private PippoSettings pippoSettings = Mockito.mock(PippoSettings.class);",
"type": "PippoSettings",
"var_name": "pippoSettings"
}
],
"file": "pippo-co... | {
"body": "@Test\n public void testGetIntegers() {\n Mockito.doReturn(\" [1234, 123, value3]\").when(pippoSettings)\n .getString(\"key\", null);\n Mockito.doCallRealMethod().when(pippoSettings).getStrings(\"key\", \",\");\n Mockito.doCallRealMethod().when(pippoSettings).getIntegers(... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(PippoSettings.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(PippoSettings.class);",
"type": "Logger",
"var_name": "log"
},
{
"declar... | {
"body": "public List<Integer> getIntegers(String name) {\n return getIntegers(name, DEFAULT_LIST_DELIMITER);\n }",
"class_method_signature": "PippoSettings.getIntegers(String name)",
"constructor": false,
"full_signature": "public List<Integer> getIntegers(String name)",
"identifier": "getIntegers... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_93 | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "KEY = \"KEY\"",
"modifier... | {
"body": "@Test\n public void testGet() {\n System.out.println(\"get\");\n HazelcastSessionDataStorage instance = new HazelcastSessionDataStorage(Hazelcast.newHazelcastInstance());\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n session... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public SessionData get(String sessionId) {\n return this.sessions.get(sessionId);\n }",
"class_method_signature": "HazelcastSessionDataStorage.get(String sessionId)",
"constructor": false,
"full_signature": "@Override public SessionData get(String sessionId)",
"identifier":... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_107 | {
"fields": [
{
"declarator": "controllerRegistry",
"modifier": "private",
"original_string": "private ControllerRegistry controllerRegistry;",
"type": "ControllerRegistry",
"var_name": "controllerRegistry"
},
{
"declarator": "thrown = ExpectedException.none()",
"... | {
"body": "@Test\n public void testRegisterComplexControllerWithInheritance() throws Exception {\n controllerRegistry.register(WithPathWithMultiValueAndInheritanceController.class);\n assertThat(getUriPatterns(controllerRegistry),\n containsInAnyOrder(WithPathWithMultiValueAndInheritan... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ControllerRegistry.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(ControllerRegistry.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public void register(Package... packages) {\n String[] packageNames = Arrays.stream(packages)\n .map(Package::getName)\n .toArray(String[]::new);\n\n register(packageNames);\n }",
"class_method_signature": "ControllerRegistry.register(Package... packages)",
"const... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_85 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testGet() {\n System.out.println(\"get\");\n XmemcachedSessionDataStorage instance = new XmemcachedSessionDataStorage(client, IDLE_TIME);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY,... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(XmemcachedSessionDataStorage.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(XmemcachedSessionDataStorage.class);",
"type": "Logger",
"var_name": "l... | {
"body": "@Override\n public SessionData get(String sessionId) {\n try {\n return this.sessions.get(sessionId);\n } catch (TimeoutException | InterruptedException | MemcachedException ex) {\n log.error(\"An error occurred when get SessionData.\", ex);\n return null;\... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_3 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldReturnNullValueIfNoRequestParameterWithSpecifiedNameWasFound() {\n String expectedParameterName = \"foo\";\n\n when(mockHttpRequest.getParameterNames()).thenReturn(\n makeParameterNamesEnumeration(expectedParameterName));\n when(mockHttpRequest.g... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public String getRequestParameter(String name) {\n ParameterValue parameter = getRequest().getParameter(name);\n return parameter.isNull() ? null : parameter.toString();\n }",
"class_method_signature": "PippoWebContext.getRequestParameter(String name)",
"constructor": fa... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_27 | {
"fields": [
{
"declarator": "emptyHandler = new EmptyHandler()",
"modifier": "private static final",
"original_string": "private static final RouteHandler emptyHandler = new EmptyHandler();",
"type": "RouteHandler",
"var_name": "emptyHandler"
},
{
"declarator": "route... | {
"body": "@Test\n public void testFindRoutes() throws Exception {\n Route route = Route.GET(\"/contact\", emptyHandler);\n router.addRoute(route);\n\n List<RouteMatch> routeMatches = router.findRoutes(HttpConstants.Method.GET, \"/contact\");\n assertNotNull(routeMatches);\n asse... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DefaultRouter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DefaultRouter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declar... | {
"body": "@Override\n public List<RouteMatch> findRoutes(String requestMethod, String requestUri) {\n log.trace(\"Finding route matches for {} '{}'\", requestMethod, requestUri);\n\n // force compile routes\n compileRoutes();\n\n List<RouteMatch> routeMatches = new ArrayList<>();\n ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_70 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testSave() {\n System.out.println(\"save\");\n InfinispanSessionDataStorage instance = new InfinispanSessionDataStorage(cacheManager);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VA... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public void save(SessionData sessionData) {\n this.sessions.put(sessionData.getId(), sessionData);\n }",
"class_method_signature": "InfinispanSessionDataStorage.save(SessionData sessionData)",
"constructor": false,
"full_signature": "@Override public void save(SessionData ses... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_89 | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "KEY = \"KEY\"",
"modifier... | {
"body": "@Test\n public void testGet() {\n System.out.println(\"get\");\n EhcacheSessionDataStorage instance = new EhcacheSessionDataStorage();\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALUE);\n insta... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public SessionData get(String sessionId) {\n Element element = this.sessions.get(sessionId);\n return element == null ? null : (SessionData) element.getObjectValue();\n }",
"class_method_signature": "EhcacheSessionDataStorage.get(String sessionId)",
"constructor": false,... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_66 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testSave() {\n System.out.println(\"save\");\n MongoDBSessionDataStorage instance = new MongoDBSessionDataStorage(mongoClient.getDatabase(DATABASE_NAME));\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n ses... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "IDLE_TIME = DefaultSessionData.... | {
"body": "@Override\n public void save(SessionData sessionData) {\n String sessionId = sessionData.getId();\n this.sessions.updateOne(\n eq(SESSION_ID, sessionId),\n combine(\n set(SESSION_ID, sessionId),\n set(SESSION_TTL, ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_31 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testEmptySet() throws Exception {\n assertEquals(Collections.emptySet(), new ParameterValue(\"\").toSet());\n assertEquals(Collections.emptySet(), new ParameterValue(\" \").toSet());\n assertEquals(Collections.emptySet(), new ParameterValue(\" \").toSet(Integer.... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public Set<String> toSet() {\n return toSet(Collections.emptySet());\n }",
"class_method_signature": "ParameterValue.toSet()",
"constructor": false,
"full_signature": "public Set<String> toSet()",
"identifier": "toSet",
"invocations": [
"toSet",
"emptySet"
],
"modifiers": "p... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_82 | {
"fields": [
{
"declarator": "HOST = \"localhost:11211\"",
"modifier": "private static final",
"original_string": "private static final String HOST = \"localhost:11211\";",
"type": "String",
"var_name": "HOST"
},
{
"declarator": "PORT = 11211",
"modifier": "priva... | {
"body": "@Test\n public void testCreate_5args() throws IOException {\n System.out.println(\"create\");\n CommandFactory protocol = new BinaryCommandFactory();\n String user = \"\";\n String pass = \"\";\n String[] authMechanisms = new String[]{\"PLAIN\"};\n MemcachedClie... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(XmemcachedFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(XmemcachedFactory.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public static MemcachedClient create(final PippoSettings settings) {\n String host = settings.getString(HOST, \"localhost:11211\");\n String prot = settings.getString(PROT, \"BINARY\");\n CommandFactory protocol;\n switch (prot) {\n case \"BINARY\":\n p... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_100 | {
"fields": [
{
"declarator": "tmpFolder",
"modifier": "private static",
"original_string": "private static Path tmpFolder;",
"type": "Path",
"var_name": "tmpFolder"
},
{
"declarator": "dynamicJar",
"modifier": "private static",
"original_string": "private s... | {
"body": "@Test\n public void test_getClassesFromFileSystem_withoutSubpackage() throws MalformedURLException {\n // Given (Input): Test preparation like creating data or configure mocks\n final String packageString = \"ro.pippo.controller.util.data.package2\";\n mockClassUtils(packageString, ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ClassUtils.class)",
"modifier": "private final static",
"original_string": "private final static Logger log = LoggerFactory.getLogger(ClassUtils.class);",
"type": "Logger",
"var_name": "log"
}
],
"file": "pippo-cont... | {
"body": "public static Collection<Class<?>> getClasses(String... packageNames) {\n Set<Class<?>> classes = new HashSet<>();\n for (String packageName : packageNames) {\n final String packagePath = packageName.replace('.', '/');\n final String packagePrefix = packageName + '.';\n ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_94 | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "KEY = \"KEY\"",
"modifier... | {
"body": "@Test\n public void testDelete() {\n System.out.println(\"delete\");\n HazelcastSessionDataStorage instance = new HazelcastSessionDataStorage(Hazelcast.newHazelcastInstance());\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n s... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public void delete(String sessionId) {\n this.sessions.remove(sessionId);\n }",
"class_method_signature": "HazelcastSessionDataStorage.delete(String sessionId)",
"constructor": false,
"full_signature": "@Override public void delete(String sessionId)",
"identifier": "delete"... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_57 | {
"fields": [
{
"declarator": "jaxbEngine",
"modifier": "private",
"original_string": "private JaxbEngine jaxbEngine;",
"type": "JaxbEngine",
"var_name": "jaxbEngine"
},
{
"declarator": "watcher = new TestWatcher() {\n protected void starting(Description descripti... | {
"body": "@Test\n public void test_fromString_BillionLaughsAttack() throws IOException {\n String payload = IoUtils.getResourceAsString(\"/attack_BillionLaughsAttack.xml\");\n\n PippoRuntimeException exception = assertThrows(PippoRuntimeException.class, () -> {\n jaxbEngine.fromString(pay... | {
"fields": [
{
"declarator": "prettyPrint",
"modifier": "",
"original_string": "boolean prettyPrint;",
"type": "boolean",
"var_name": "prettyPrint"
},
{
"declarator": "xmlInputFactory",
"modifier": "private final",
"original_string": "private final XMLInput... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public <T> T fromString(String content, Class<T> classOfT) {\n try (StringReader reader = new StringReader(content)) {\n JAXBContext jaxbContext = JAXBContext.newInstance(classOfT);\n\n XMLStreamReader xmlStreamReader = xmlIn... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_16 | {
"fields": [
{
"declarator": "mockPippoWebContext",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private PippoWebContext mockPippoWebContext;",
"type": "PippoWebContext",
"var_name": "mockPippoWebContext"
},
{
"declarator": "mockRouteContext",
... | {
"body": "@Test\n public void shouldAskRouteContextToRecreateSessionOnRenewSession() {\n when(mockPippoWebContext.getRouteContext()).thenReturn(mockRouteContext);\n\n PippoSessionStore sessionStore = new PippoSessionStore();\n\n assertThat(sessionStore.renewSession(mockPippoWebContext), is(tr... | {
"fields": [],
"file": "pippo-security-parent/pippo-pac4j/src/main/java/ro/pippo/pac4j/PippoSessionStore.java",
"identifier": "PippoSessionStore",
"interfaces": "implements SessionStore<PippoWebContext>",
"methods": [
{
"class_method_signature": "PippoSessionStore.getOrCreateSessionId(PippoWebConte... | {
"body": "public boolean renewSession(PippoWebContext pippoWebContext) {\n pippoWebContext.getRouteContext().recreateSession();\n\n return true;\n }",
"class_method_signature": "PippoSessionStore.renewSession(PippoWebContext pippoWebContext)",
"constructor": false,
"full_signature": "public bo... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_41 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testIntegerArrayList() throws Exception {\n List<Integer> myList = new ArrayList<>(Arrays.asList(600, 400, 200));\n assertEquals(myList, new ParameterValue(\"600\", \"400\", \"200\").toList(Integer.class));\n }",
"class_method_signature": "ParameterValueTest.testIn... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public List<String> toList() {\n return toList(Collections.emptyList());\n }",
"class_method_signature": "ParameterValue.toList()",
"constructor": false,
"full_signature": "public List<String> toList()",
"identifier": "toList",
"invocations": [
"toList",
"emptyList"
],
"modi... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_8 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldGetServerPortFromUnderlyingRequest() {\n int expectedServerPort = 8080;\n\n when(mockHttpRequest.getServerPort()).thenReturn(expectedServerPort);\n\n PippoWebContext context = makePippoWebContext();\n\n assertThat(context.getServerPort(), is(expected... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public int getServerPort() {\n return getRequest().getHttpServletRequest().getServerPort();\n }",
"class_method_signature": "PippoWebContext.getServerPort()",
"constructor": false,
"full_signature": "@Override public int getServerPort()",
"identifier": "getServerPort",
"i... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_36 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testStringTreeSet() throws Exception {\n TreeSet<String> mySet = new TreeSet<>(Arrays.asList(\"C\", \"B\", \"A\"));\n assertEquals(mySet, new ParameterValue(\"C\", \"A\", \"B\", \"A\").toCollection(TreeSet.class, String.class, null));\n }",
"class_method_signature"... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "@SuppressWarnings(\"unchecked\")\n public <X extends Collection<T>, T> X toCollection(Class<? extends Collection> collectionClass, Class<T> classOfT, String pattern) {\n if (collectionClass == null || classOfT == null) {\n return null;\n }\n\n try {\n // reflec... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_61 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testGet() {\n System.out.println(\"get\");\n SpymemcachedSessionDataStorage instance = new SpymemcachedSessionDataStorage(client, IDLE_TIME);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(... | {
"fields": [
{
"declarator": "IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS",
"modifier": "private static final",
"original_string": "private static final int IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS;",
"type": "int",
"var_name": "I... | {
"body": "@Override\n public SessionData get(String sessionId) {\n return (SessionData) this.sessions.get(sessionId);\n }",
"class_method_signature": "SpymemcachedSessionDataStorage.get(String sessionId)",
"constructor": false,
"full_signature": "@Override public SessionData get(String sessionId)"... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_98 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testDelete() {\n System.out.println(\"delete\");\n JDBCSessionDataStorage instance = new JDBCSessionDataStorage(dataSource);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALUE);\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(JDBCSessionDataStorage.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(JDBCSessionDataStorage.class);",
"type": "Logger",
"var_name": "log"
},
... | {
"body": "@Override\n public void delete(String sessionId) {\n executeUpdate(delete, sessionId);\n }",
"class_method_signature": "JDBCSessionDataStorage.delete(String sessionId)",
"constructor": false,
"full_signature": "@Override public void delete(String sessionId)",
"identifier": "delete",
... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_77 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testCreate() {\n System.out.println(\"create\");\n JedisSessionDataStorage instance = new JedisSessionDataStorage(jedisPool);\n SessionData sessionData = instance.create();\n sessionData.put(KEY, VALUE);\n assertNotNull(sessionData);\n assert... | {
"fields": [
{
"declarator": "IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS",
"modifier": "private static final",
"original_string": "private static final int IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS;",
"type": "int",
"var_name": "I... | {
"body": "@Override\n public SessionData create() {\n return new DefaultSessionData();\n }",
"class_method_signature": "JedisSessionDataStorage.create()",
"constructor": false,
"full_signature": "@Override public SessionData create()",
"identifier": "create",
"invocations": [],
"modifiers": ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_20 | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private",
"original_string": "private RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "response",
"modifier": "private",
"original_string": "private... | {
"body": "@Test\n public void test_OnlyHeaderAllowOrigin() {\n // arrange\n String originExpected = \"http://fake.address.com\";\n\n CorsHandler corsHandler = new CorsHandler(originExpected);\n\n doReturn(\"GET\").when(routeContext).getRequestMethod();\n\n // act\n corsHa... | {
"fields": [
{
"declarator": "allowOrigin",
"modifier": "private",
"original_string": "private String allowOrigin;",
"type": "String",
"var_name": "allowOrigin"
},
{
"declarator": "exposeHeaders",
"modifier": "private",
"original_string": "private String ex... | {
"body": "@Override\n public void handle(RouteContext context) {\n final Response response = context.getResponse();\n\n response.header(HttpConstants.Header.ACCESS_CONTROL_ALLOW_ORIGIN, allowOrigin);\n\n if (exposeHeaders != null) {\n response.header(HttpConstants.Header.ACCESS_CON... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_4 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldReturnRequestParametersWithParametersFromUnderlyingRequest() {\n String fooParamName = \"fooKEY\";\n String barParamName = \"barKEY\";\n\n when(mockHttpRequest.getParameterNames()).thenReturn(makeParameterNamesEnumeration(fooParamName, barParamName));\n ... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public Map<String, String[]> getRequestParameters() {\n Map<String, ParameterValue> parameters = getRequest().getParameters();\n final Map<String, String[]> result = new HashMap<>();\n\n parameters.forEach((s, parameterValue) -> result.put(s, parameterValue.getValues()))... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_5 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldGetRequestAttributeFromUnderlyingHttpServletRequestWithSpecifiedName() {\n String expectedAttributeName = \"foo\";\n String expectedAttributeValue = \"bar\";\n\n when(mockHttpRequest.getAttribute(anyString())).thenReturn(expectedAttributeValue);\n\n ... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public Object getRequestAttribute(String name) {\n return getRequest().getHttpServletRequest().getAttribute(name);\n }",
"class_method_signature": "PippoWebContext.getRequestAttribute(String name)",
"constructor": false,
"full_signature": "@Override public Object getRequestAt... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_21 | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private",
"original_string": "private RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "response",
"modifier": "private",
"original_string": "private... | {
"body": "@Test\n public void test_RequestMethodOptions() {\n // arrange\n String originExpected = \"*\";\n\n CorsHandler corsHandler = new CorsHandler(originExpected);\n\n doReturn(\"OPTIONS\").when(routeContext).getRequestMethod();\n\n // act\n corsHandler.handle(routeC... | {
"fields": [
{
"declarator": "allowOrigin",
"modifier": "private",
"original_string": "private String allowOrigin;",
"type": "String",
"var_name": "allowOrigin"
},
{
"declarator": "exposeHeaders",
"modifier": "private",
"original_string": "private String ex... | {
"body": "@Override\n public void handle(RouteContext context) {\n final Response response = context.getResponse();\n\n response.header(HttpConstants.Header.ACCESS_CONTROL_ALLOW_ORIGIN, allowOrigin);\n\n if (exposeHeaders != null) {\n response.header(HttpConstants.Header.ACCESS_CON... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_99 | {
"fields": [
{
"declarator": "tmpFolder",
"modifier": "private static",
"original_string": "private static Path tmpFolder;",
"type": "Path",
"var_name": "tmpFolder"
},
{
"declarator": "dynamicJar",
"modifier": "private static",
"original_string": "private s... | {
"body": "@Test\n public void test_getClassesFromFileSystem_withSubpackage() throws MalformedURLException {\n // Given (Input): Test preparation like creating data or configure mocks\n final String packageString = \"ro.pippo.controller.util.data\";\n mockClassUtils(packageString, false);\n\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ClassUtils.class)",
"modifier": "private final static",
"original_string": "private final static Logger log = LoggerFactory.getLogger(ClassUtils.class);",
"type": "Logger",
"var_name": "log"
}
],
"file": "pippo-cont... | {
"body": "public static Collection<Class<?>> getClasses(String... packageNames) {\n Set<Class<?>> classes = new HashSet<>();\n for (String packageName : packageNames) {\n final String packagePath = packageName.replace('.', '/');\n final String packagePrefix = packageName + '.';\n ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_76 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testDelete() {\n System.out.println(\"delete\");\n EhcacheSessionDataStorage instance = new EhcacheSessionDataStorage(cacheManager);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALU... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public void delete(String sessionId) {\n this.sessions.remove(sessionId);\n }",
"class_method_signature": "EhcacheSessionDataStorage.delete(String sessionId)",
"constructor": false,
"full_signature": "@Override public void delete(String sessionId)",
"identifier": "delete",
... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_60 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testSave() {\n System.out.println(\"save\");\n SpymemcachedSessionDataStorage instance = new SpymemcachedSessionDataStorage(client, IDLE_TIME);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.pu... | {
"fields": [
{
"declarator": "IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS",
"modifier": "private static final",
"original_string": "private static final int IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS;",
"type": "int",
"var_name": "I... | {
"body": "@Override\n public void save(SessionData sessionData) {\n this.sessions.set(sessionData.getId(), idleTime, sessionData);\n }",
"class_method_signature": "SpymemcachedSessionDataStorage.save(SessionData sessionData)",
"constructor": false,
"full_signature": "@Override public void save(Ses... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_37 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testIntegerTreeSet() throws Exception {\n TreeSet<Integer> mySet = new TreeSet<>(Arrays.asList(600, 200, 400, 200));\n assertEquals(mySet, new ParameterValue(\"600\", \"200\", \"400\", \"200\").toCollection(TreeSet.class, Integer.class, null));\n }",
"class_method_... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "@SuppressWarnings(\"unchecked\")\n public <X extends Collection<T>, T> X toCollection(Class<? extends Collection> collectionClass, Class<T> classOfT, String pattern) {\n if (collectionClass == null || classOfT == null) {\n return null;\n }\n\n try {\n // reflec... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_40 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testStringArrayList() throws Exception {\n List<String> myList = new ArrayList<>(Arrays.asList(\"C\", \"B\", \"A\"));\n assertEquals(myList, new ParameterValue(\"C\", \"B\", \"A\").toList(String.class));\n }",
"class_method_signature": "ParameterValueTest.testStrin... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public List<String> toList() {\n return toList(Collections.emptyList());\n }",
"class_method_signature": "ParameterValue.toList()",
"constructor": false,
"full_signature": "public List<String> toList()",
"identifier": "toList",
"invocations": [
"toList",
"emptyList"
],
"modi... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_9 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldGetSchemeFromUnderlyingRequest() {\n String expectedScheme = \"https\";\n\n when(mockHttpRequest.getScheme()).thenReturn(expectedScheme);\n\n PippoWebContext context = makePippoWebContext();\n\n assertThat(context.getScheme(), is(expectedScheme));\n\... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public String getScheme() {\n return getRequest().getScheme();\n }",
"class_method_signature": "PippoWebContext.getScheme()",
"constructor": false,
"full_signature": "@Override public String getScheme()",
"identifier": "getScheme",
"invocations": [
"getScheme",
"g... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_17 | {
"fields": [],
"file": "pippo-core/src/test/java/ro/pippo/core/RequestTest.java",
"identifier": "RequestTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void createEntityTest() {\n // mock servlet request\n HttpServletRequest servletRequest = mock(HttpServletRequest.class);\n when(servletRequest.getParameterNames()).thenReturn(Collections.enumeration(Collections.singletonList(\"name\")));\n// when(servletReques... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(Request.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(Request.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "http... | {
"body": "public <T> T createEntityFromParameters(Class<T> entityClass) {\n T entity;\n try {\n entity = entityClass.newInstance();\n } catch (Exception e) {\n log.error(\"Cannot create new instance of class '{}'\", entityClass.getName(), e);\n return null;\n ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_56 | {
"fields": [
{
"declarator": "jaxbEngine",
"modifier": "private",
"original_string": "private JaxbEngine jaxbEngine;",
"type": "JaxbEngine",
"var_name": "jaxbEngine"
},
{
"declarator": "watcher = new TestWatcher() {\n protected void starting(Description descripti... | {
"body": "@Test\n public void test_fromString_DTD() throws IOException {\n String payload = IoUtils.getResourceAsString(\"/regular_dtd.xml\");\n\n Person p = jaxbEngine.fromString(payload, Person.class);\n\n assertThat(p, isA(Person.class));\n assertEquals(\"Pippo\", p.name);\n }",
... | {
"fields": [
{
"declarator": "prettyPrint",
"modifier": "",
"original_string": "boolean prettyPrint;",
"type": "boolean",
"var_name": "prettyPrint"
},
{
"declarator": "xmlInputFactory",
"modifier": "private final",
"original_string": "private final XMLInput... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public <T> T fromString(String content, Class<T> classOfT) {\n try (StringReader reader = new StringReader(content)) {\n JAXBContext jaxbContext = JAXBContext.newInstance(classOfT);\n\n XMLStreamReader xmlStreamReader = xmlIn... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_101 | {
"fields": [
{
"declarator": "tmpFolder",
"modifier": "private static",
"original_string": "private static Path tmpFolder;",
"type": "Path",
"var_name": "tmpFolder"
},
{
"declarator": "dynamicJar",
"modifier": "private static",
"original_string": "private s... | {
"body": "@Test\n public void test_getClassesFromJar_withSubpackage() throws IOException {\n // Given (Input): Test preparation like creating data or configure mocks\n final String packageString = \"ro.pippo.controller.util.data\";\n mockClassUtils(packageString, true);\n\n // When (Ac... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ClassUtils.class)",
"modifier": "private final static",
"original_string": "private final static Logger log = LoggerFactory.getLogger(ClassUtils.class);",
"type": "Logger",
"var_name": "log"
}
],
"file": "pippo-cont... | {
"body": "public static Collection<Class<?>> getClasses(String... packageNames) {\n Set<Class<?>> classes = new HashSet<>();\n for (String packageName : packageNames) {\n final String packagePath = packageName.replace('.', '/');\n final String packagePrefix = packageName + '.';\n ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_95 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testCreate() {\n System.out.println(\"create\");\n JDBCSessionDataStorage instance = new JDBCSessionDataStorage(dataSource);\n SessionData sessionData = instance.create();\n sessionData.put(KEY, VALUE);\n assertNotNull(sessionData);\n assertN... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(JDBCSessionDataStorage.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(JDBCSessionDataStorage.class);",
"type": "Logger",
"var_name": "log"
},
... | {
"body": "@Override\n public SessionData create() {\n return new DefaultSessionData();\n }",
"class_method_signature": "JDBCSessionDataStorage.create()",
"constructor": false,
"full_signature": "@Override public SessionData create()",
"identifier": "create",
"invocations": [],
"modifiers": "... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_83 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testCreate() {\n System.out.println(\"create\");\n XmemcachedSessionDataStorage instance = new XmemcachedSessionDataStorage(client, IDLE_TIME);\n SessionData sessionData = instance.create();\n sessionData.put(KEY, VALUE);\n assertNotNull(sessionData... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(XmemcachedSessionDataStorage.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(XmemcachedSessionDataStorage.class);",
"type": "Logger",
"var_name": "l... | {
"body": "@Override\n public SessionData create() {\n return new DefaultSessionData();\n }",
"class_method_signature": "XmemcachedSessionDataStorage.create()",
"constructor": false,
"full_signature": "@Override public SessionData create()",
"identifier": "create",
"invocations": [],
"modifie... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_43 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testEncodedArrayList2() throws Exception {\n List<Integer> myList = new ArrayList<>(Arrays.asList(600, 400, 200));\n assertEquals(myList, new ParameterValue(\"600, 400,200\").toList(Integer.class));\n }",
"class_method_signature": "ParameterValueTest.testEncodedArr... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public List<String> toList() {\n return toList(Collections.emptyList());\n }",
"class_method_signature": "ParameterValue.toList()",
"constructor": false,
"full_signature": "public List<String> toList()",
"identifier": "toList",
"invocations": [
"toList",
"emptyList"
],
"modi... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_14 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldReturnEmptyCollectionIfNoCookiesInUnderlyingRequest() {\n when(mockHttpRequest.getCookies())\n .thenReturn(new javax.servlet.http.Cookie[0]);\n\n PippoWebContext context = makePippoWebContext();\n\n Collection<Cookie> cookies = context.getRequest... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public Collection<Cookie> getRequestCookies() {\n return getRequest().getCookies().stream().map(c -> {\n Cookie cookie = new Cookie(c.getName(), c.getValue());\n cookie.setComment(c.getComment());\n cookie.setSecure(c.getSecure());\n cookie.... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_55 | {
"fields": [
{
"declarator": "jaxbEngine",
"modifier": "private",
"original_string": "private JaxbEngine jaxbEngine;",
"type": "JaxbEngine",
"var_name": "jaxbEngine"
},
{
"declarator": "watcher = new TestWatcher() {\n protected void starting(Description descripti... | {
"body": "@Test\n public void test_fromString_noDTD() throws IOException {\n String payload = IoUtils.getResourceAsString(\"/regular_no_dtd.xml\");\n\n Person p = jaxbEngine.fromString(payload, Person.class);\n\n assertThat(p, isA(Person.class));\n assertEquals(\"Pippo\", p.name);\n ... | {
"fields": [
{
"declarator": "prettyPrint",
"modifier": "",
"original_string": "boolean prettyPrint;",
"type": "boolean",
"var_name": "prettyPrint"
},
{
"declarator": "xmlInputFactory",
"modifier": "private final",
"original_string": "private final XMLInput... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public <T> T fromString(String content, Class<T> classOfT) {\n try (StringReader reader = new StringReader(content)) {\n JAXBContext jaxbContext = JAXBContext.newInstance(classOfT);\n\n XMLStreamReader xmlStreamReader = xmlIn... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_79 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testGet() {\n System.out.println(\"get\");\n JedisSessionDataStorage instance = new JedisSessionDataStorage(jedisPool);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALUE);\n ... | {
"fields": [
{
"declarator": "IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS",
"modifier": "private static final",
"original_string": "private static final int IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS;",
"type": "int",
"var_name": "I... | {
"body": "@Override\n public SessionData get(String sessionId) {\n try (Jedis jedis = sessions.getResource()) {\n String sessionStored = jedis.get(sessionId);\n if (sessionStored == null) {\n return null;\n }\n jedis.expire(sessionId, idleTime);\n ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_96 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testSave() {\n System.out.println(\"save\");\n JDBCSessionDataStorage instance = new JDBCSessionDataStorage(dataSource);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALUE);\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(JDBCSessionDataStorage.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(JDBCSessionDataStorage.class);",
"type": "Logger",
"var_name": "log"
},
... | {
"body": "@Override\n public void save(SessionData sessionData) {\n String id = sessionData.getId();\n Timestamp time = new Timestamp(System.currentTimeMillis());\n String data = transcoder.encode(sessionData);\n if (executeUpdate(update, time, data, id) == 0) {\n executeUpd... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_102 | {
"fields": [
{
"declarator": "tmpFolder",
"modifier": "private static",
"original_string": "private static Path tmpFolder;",
"type": "Path",
"var_name": "tmpFolder"
},
{
"declarator": "dynamicJar",
"modifier": "private static",
"original_string": "private s... | {
"body": "@Test\n public void test_getClassesFromJar_withoutSubpackage() throws MalformedURLException {\n // Given (Input): Test preparation like creating data or configure mocks\n final String packageString = \"ro.pippo.controller.util.data.package2\";\n mockClassUtils(packageString, true);\... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ClassUtils.class)",
"modifier": "private final static",
"original_string": "private final static Logger log = LoggerFactory.getLogger(ClassUtils.class);",
"type": "Logger",
"var_name": "log"
}
],
"file": "pippo-cont... | {
"body": "public static Collection<Class<?>> getClasses(String... packageNames) {\n Set<Class<?>> classes = new HashSet<>();\n for (String packageName : packageNames) {\n final String packagePath = packageName.replace('.', '/');\n final String packagePrefix = packageName + '.';\n ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_80 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testDelete() {\n System.out.println(\"delete\");\n JedisSessionDataStorage instance = new JedisSessionDataStorage(jedisPool);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALUE);\n ... | {
"fields": [
{
"declarator": "IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS",
"modifier": "private static final",
"original_string": "private static final int IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS;",
"type": "int",
"var_name": "I... | {
"body": "@Override\n public void delete(String sessionId) {\n try (Jedis jedis = sessions.getResource()) {\n jedis.del(sessionId);\n }\n }",
"class_method_signature": "JedisSessionDataStorage.delete(String sessionId)",
"constructor": false,
"full_signature": "@Override public vo... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_38 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testEncodedTreeSet() throws Exception {\n TreeSet<Integer> mySet = new TreeSet<>(Arrays.asList(600, 200, 400, 200));\n assertEquals(mySet, new ParameterValue(\"[600, 400, 200]\").toCollection(TreeSet.class, Integer.class, null));\n }",
"class_method_signature": "Pa... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "@SuppressWarnings(\"unchecked\")\n public <X extends Collection<T>, T> X toCollection(Class<? extends Collection> collectionClass, Class<T> classOfT, String pattern) {\n if (collectionClass == null || classOfT == null) {\n return null;\n }\n\n try {\n // reflec... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_6 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldReturnNullIfNoRequestAttributeFoundInUnderlyingHttpServletRequestWithSpecifiedName() {\n String expectedAttributeName = \"foo\";\n\n when(mockHttpRequest.getAttribute(anyString())).thenReturn(null);\n\n PippoWebContext context = makePippoWebContext();\n\n ... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public Object getRequestAttribute(String name) {\n return getRequest().getHttpServletRequest().getAttribute(name);\n }",
"class_method_signature": "PippoWebContext.getRequestAttribute(String name)",
"constructor": false,
"full_signature": "@Override public Object getRequestAt... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_18 | {
"fields": [
{
"declarator": "uriMatcher",
"modifier": "private",
"original_string": "private DefaultUriMatcher uriMatcher;",
"type": "DefaultUriMatcher",
"var_name": "uriMatcher"
},
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n pub... | {
"body": "@Test\n public void testNoBinding() {\n thrown.expect(PippoRuntimeException.class);\n thrown.expectMessage(\"No binding for '/contact/{id}'. Create binding with 'addUriPattern'\");\n uriMatcher.match(\"/contact/1\", \"/contact/{id}\");\n }",
"class_method_signature": "DefaultUr... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DefaultUriMatcher.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DefaultUriMatcher.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Map<String, String> match(String requestUri, String uriPattern) {\n UriPatternBinding binding = bindings.get(uriPattern);\n if (binding == null) {\n // something is wrong\n throw new PippoRuntimeException(\"No binding for '{}'. Create binding with '... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_59 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testCreate() {\n System.out.println(\"create\");\n SpymemcachedSessionDataStorage instance = new SpymemcachedSessionDataStorage(client, IDLE_TIME);\n SessionData sessionData = instance.create();\n sessionData.put(KEY, VALUE);\n assertNotNull(session... | {
"fields": [
{
"declarator": "IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS",
"modifier": "private static final",
"original_string": "private static final int IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS;",
"type": "int",
"var_name": "I... | {
"body": "@Override\n public SessionData create() {\n return new DefaultSessionData();\n }",
"class_method_signature": "SpymemcachedSessionDataStorage.create()",
"constructor": false,
"full_signature": "@Override public SessionData create()",
"identifier": "create",
"invocations": [],
"modif... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_22 | {
"fields": [
{
"declarator": "emptyHandler = new EmptyHandler()",
"modifier": "private static final",
"original_string": "private static final RouteHandler emptyHandler = new EmptyHandler();",
"type": "RouteHandler",
"var_name": "emptyHandler"
},
{
"declarator": "route... | {
"body": "@Test\n public void testNullUriPatternRoute() throws Exception {\n Route route = Route.GET(null, emptyHandler);\n thrown.expect(Exception.class);\n thrown.expectMessage(\"The uri pattern cannot be null or empty\");\n router.addRoute(route);\n }",
"class_method_signature"... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DefaultRouter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DefaultRouter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declar... | {
"body": "@Override\n public void addRoute(Route route) {\n log.debug(\"Add route for {} '{}'\", route.getRequestMethod(), route.getUriPattern());\n validateRoute(route);\n routes.add(route);\n\n // update cache\n List<Route> cacheEntry = routesCache.get(route.getRequestMethod()... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_75 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testGet() {\n System.out.println(\"get\");\n EhcacheSessionDataStorage instance = new EhcacheSessionDataStorage(cacheManager);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALUE);\n ... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public SessionData get(String sessionId) {\n return this.sessions.get(sessionId);\n }",
"class_method_signature": "EhcacheSessionDataStorage.get(String sessionId)",
"constructor": false,
"full_signature": "@Override public SessionData get(String sessionId)",
"identifier": "... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_63 | {
"fields": [
{
"declarator": "HOST = \"localhost:11211\"",
"modifier": "private static final",
"original_string": "private static final String HOST = \"localhost:11211\";",
"type": "String",
"var_name": "HOST"
},
{
"declarator": "PORT = 11211",
"modifier": "priva... | {
"body": "@Test\n public void testCreate_PippoSettings() {\n System.out.println(\"create\");\n MemcachedClient result = SpymemcachedFactory.create(application.getPippoSettings());\n assertNotNull(result);\n result.shutdown();\n }",
"class_method_signature": "SpymemcachedFactoryTes... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(SpymemcachedFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(SpymemcachedFactory.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public static final MemcachedClient create(final PippoSettings settings) {\n String host = settings.getString(HOST, \"localhost:11211\");\n String prot = settings.getString(PROT, \"BINARY\");\n Protocol protocol = Protocol.valueOf(prot);\n String user = settings.getString(USER, ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_34 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testEncodedHashSet() throws Exception {\n Set<Integer> mySet = new HashSet<>(Arrays.asList(200, 400, 600));\n assertEquals(mySet, new ParameterValue(\"[600,200, 400,200]\").toSet(Integer.class));\n }",
"class_method_signature": "ParameterValueTest.testEncodedHashSe... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public Set<String> toSet() {\n return toSet(Collections.emptySet());\n }",
"class_method_signature": "ParameterValue.toSet()",
"constructor": false,
"full_signature": "public Set<String> toSet()",
"identifier": "toSet",
"invocations": [
"toSet",
"emptySet"
],
"modifiers": "p... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_35 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testHashSet() throws Exception {\n Set<String> mySet = new HashSet<>(Arrays.asList(\"200\", \"400\", \"600\"));\n assertEquals(mySet, new ParameterValue(\"600\", \"200\", \"400\", \"200\").toSet());\n\n // when values contains single entry\n mySet = new Ha... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public Set<String> toSet() {\n return toSet(Collections.emptySet());\n }",
"class_method_signature": "ParameterValue.toSet()",
"constructor": false,
"full_signature": "public Set<String> toSet()",
"identifier": "toSet",
"invocations": [
"toSet",
"emptySet"
],
"modifiers": "p... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_62 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testDelete() {\n System.out.println(\"delete\");\n SpymemcachedSessionDataStorage instance = new SpymemcachedSessionDataStorage(client, IDLE_TIME);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionDat... | {
"fields": [
{
"declarator": "IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS",
"modifier": "private static final",
"original_string": "private static final int IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS;",
"type": "int",
"var_name": "I... | {
"body": "@Override\n public void delete(String sessionId) {\n this.sessions.delete(sessionId);\n }",
"class_method_signature": "SpymemcachedSessionDataStorage.delete(String sessionId)",
"constructor": false,
"full_signature": "@Override public void delete(String sessionId)",
"identifier": "dele... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_74 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testSave() {\n System.out.println(\"save\");\n EhcacheSessionDataStorage instance = new EhcacheSessionDataStorage(cacheManager);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALUE);\... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public void save(SessionData sessionData) {\n this.sessions.put(sessionData.getId(), sessionData);\n }",
"class_method_signature": "EhcacheSessionDataStorage.save(SessionData sessionData)",
"constructor": false,
"full_signature": "@Override public void save(SessionData sessio... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_23 | {
"fields": [
{
"declarator": "emptyHandler = new EmptyHandler()",
"modifier": "private static final",
"original_string": "private static final RouteHandler emptyHandler = new EmptyHandler();",
"type": "RouteHandler",
"var_name": "emptyHandler"
},
{
"declarator": "route... | {
"body": "@Test\n public void testEmptyUriPatternRoute() throws Exception {\n Route route = Route.GET(\"\", emptyHandler);\n thrown.expect(Exception.class);\n thrown.expectMessage(\"The uri pattern cannot be null or empty\");\n router.addRoute(route);\n }",
"class_method_signature... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DefaultRouter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DefaultRouter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declar... | {
"body": "@Override\n public void addRoute(Route route) {\n log.debug(\"Add route for {} '{}'\", route.getRequestMethod(), route.getUriPattern());\n validateRoute(route);\n routes.add(route);\n\n // update cache\n List<Route> cacheEntry = routesCache.get(route.getRequestMethod()... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_58 | {
"fields": [
{
"declarator": "jaxbEngine",
"modifier": "private",
"original_string": "private JaxbEngine jaxbEngine;",
"type": "JaxbEngine",
"var_name": "jaxbEngine"
},
{
"declarator": "watcher = new TestWatcher() {\n protected void starting(Description descripti... | {
"body": "@Test\n public void test_fromString_QuadraticBlowupAttack() throws IOException {\n String payload = IoUtils.getResourceAsString(\"/attack_QuadraticBlowupAttack.xml\");\n\n PippoRuntimeException exception = assertThrows(PippoRuntimeException.class, () -> {\n jaxbEngine.fromString... | {
"fields": [
{
"declarator": "prettyPrint",
"modifier": "",
"original_string": "boolean prettyPrint;",
"type": "boolean",
"var_name": "prettyPrint"
},
{
"declarator": "xmlInputFactory",
"modifier": "private final",
"original_string": "private final XMLInput... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public <T> T fromString(String content, Class<T> classOfT) {\n try (StringReader reader = new StringReader(content)) {\n JAXBContext jaxbContext = JAXBContext.newInstance(classOfT);\n\n XMLStreamReader xmlStreamReader = xmlIn... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_19 | {
"fields": [
{
"declarator": "uriMatcher",
"modifier": "private",
"original_string": "private DefaultUriMatcher uriMatcher;",
"type": "DefaultUriMatcher",
"var_name": "uriMatcher"
},
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n pub... | {
"body": "@Test\n public void testMatch() throws Exception {\n uriMatcher.addUriPattern(\"/login\");\n Map<String, String> params = uriMatcher.match(\"/login\", \"/login\");\n assertNotNull(params);\n assertTrue(params.isEmpty());\n }",
"class_method_signature": "DefaultUriMatcher... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DefaultUriMatcher.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DefaultUriMatcher.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Map<String, String> match(String requestUri, String uriPattern) {\n UriPatternBinding binding = bindings.get(uriPattern);\n if (binding == null) {\n // something is wrong\n throw new PippoRuntimeException(\"No binding for '{}'. Create binding with '... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_7 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldGetServerNameFromUnderlyingRequest() {\n String expectedServerName = \"localhost\";\n\n when(mockHttpRequest.getServerName()).thenReturn(expectedServerName);\n\n PippoWebContext context = makePippoWebContext();\n\n assertThat(context.getServerName(),... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public String getServerName() {\n return getRequest().getHttpServletRequest().getServerName();\n }",
"class_method_signature": "PippoWebContext.getServerName()",
"constructor": false,
"full_signature": "@Override public String getServerName()",
"identifier": "getServerName"... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_39 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testEmptyArrayList() throws Exception {\n assertEquals(Collections.emptyList(), new ParameterValue(\"\").toList());\n assertEquals(Collections.emptyList(), new ParameterValue(\" \").toList());\n assertEquals(Collections.emptyList(), new ParameterValue(\" \").toL... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public List<String> toList() {\n return toList(Collections.emptyList());\n }",
"class_method_signature": "ParameterValue.toList()",
"constructor": false,
"full_signature": "public List<String> toList()",
"identifier": "toList",
"invocations": [
"toList",
"emptyList"
],
"modi... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_81 | {
"fields": [
{
"declarator": "HOST = \"localhost:11211\"",
"modifier": "private static final",
"original_string": "private static final String HOST = \"localhost:11211\";",
"type": "String",
"var_name": "HOST"
},
{
"declarator": "PORT = 11211",
"modifier": "priva... | {
"body": "@Test\n public void testCreate_PippoSettings() throws IOException {\n System.out.println(\"create\");\n MemcachedClient result = XmemcachedFactory.create(application.getPippoSettings());\n assertNotNull(result);\n assertFalse(result.isShutdown());\n result.shutdown();\... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(XmemcachedFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(XmemcachedFactory.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public static MemcachedClient create(final PippoSettings settings) {\n String host = settings.getString(HOST, \"localhost:11211\");\n String prot = settings.getString(PROT, \"BINARY\");\n CommandFactory protocol;\n switch (prot) {\n case \"BINARY\":\n p... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_78 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testSave() {\n System.out.println(\"save\");\n JedisSessionDataStorage instance = new JedisSessionDataStorage(jedisPool);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALUE);\n ... | {
"fields": [
{
"declarator": "IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS",
"modifier": "private static final",
"original_string": "private static final int IDLE_TIME = DefaultSessionData.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS;",
"type": "int",
"var_name": "I... | {
"body": "@Override\n public void save(SessionData sessionData) {\n try (Jedis jedis = sessions.getResource()) {\n jedis.setex(\n sessionData.getId(),\n idleTime,\n transcoder.encode(sessionData));\n }\n }",
"class_method_signa... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_97 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testGet() {\n System.out.println(\"get\");\n JDBCSessionDataStorage instance = new JDBCSessionDataStorage(dataSource);\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALUE);\n i... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(JDBCSessionDataStorage.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(JDBCSessionDataStorage.class);",
"type": "Logger",
"var_name": "log"
},
... | {
"body": "@Override\n public SessionData get(String sessionId) {\n String sessionStored = executeSelect(select, sessionId);\n if (sessionStored == null) {\n return null;\n }\n SessionData sessionData = transcoder.decode(sessionStored);\n return sessionData;\n }",
... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_103 | {
"fields": [
{
"declarator": "controllerRegistry",
"modifier": "private",
"original_string": "private ControllerRegistry controllerRegistry;",
"type": "ControllerRegistry",
"var_name": "controllerRegistry"
},
{
"declarator": "thrown = ExpectedException.none()",
"... | {
"body": "@Test\n public void testWithoutPath() throws Exception {\n controllerRegistry.register(WithoutPathController.class);\n assertThat(getUriPatterns(controllerRegistry), containsInAnyOrder(WithoutPathController.expectedUriPatterns()));\n }",
"class_method_signature": "ControllerRegistryTe... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ControllerRegistry.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(ControllerRegistry.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public void register(Package... packages) {\n String[] packageNames = Arrays.stream(packages)\n .map(Package::getName)\n .toArray(String[]::new);\n\n register(packageNames);\n }",
"class_method_signature": "ControllerRegistry.register(Package... packages)",
"const... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_54 | {
"fields": [
{
"declarator": "expected = \"id,sku,description,uuid,lastRestock\\n\" +\n \"1,12345,Oranges,a0765bce-5d81-4b7c-8d28-b7f1efcb355b,2016-12-12\\n\" +\n \"2,12345,Apples,25bc5325-6ce0-4e68-a5d9-4a5cfc6fb148,2015-12-12\\n\" +\n \"3,12345,Bananas,e73b5a3d-e244-4b91-ae00-8fb6bb2... | {
"body": "@Test\n public void testFromArray() {\n CsvEngine csvEngine = new CsvEngine();\n String generated = csvEngine.toString(Product.get()).replace(\"\\r\\n\", \"\\n\").trim();\n\n assertEquals(\"Generated CSV is not the same\", expected, generated);\n }",
"class_method_signature": "... | {
"fields": [
{
"declarator": "TEXT_CSV = \"text/csv\"",
"modifier": "public final static",
"original_string": "public final static String TEXT_CSV = \"text/csv\";",
"type": "String",
"var_name": "TEXT_CSV"
},
{
"declarator": "log = LoggerFactory.getLogger(CsvEngine.cla... | {
"body": "@Override\n public String toString(Object object) {\n if (object instanceof Csv) {\n return toCsv((Csv) object);\n } else if (object.getClass().isArray() && Csv.class.isAssignableFrom(object.getClass().getComponentType())) {\n return toCsv((Csv[]) object);\n } ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_15 | {
"fields": [
{
"declarator": "mockPippoWebContext",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private PippoWebContext mockPippoWebContext;",
"type": "PippoWebContext",
"var_name": "mockPippoWebContext"
},
{
"declarator": "mockRouteContext",
... | {
"body": "@Test\n public void shouldGetSessionFromSuppliedPippoWebContext() {\n when(mockRouteContext.getSession()).thenReturn(mockSession);\n when(mockPippoWebContext.getRouteContext()).thenReturn(mockRouteContext);\n\n PippoSessionStore sessionStore = new PippoSessionStore();\n Sessi... | {
"fields": [],
"file": "pippo-security-parent/pippo-pac4j/src/main/java/ro/pippo/pac4j/PippoSessionStore.java",
"identifier": "PippoSessionStore",
"interfaces": "implements SessionStore<PippoWebContext>",
"methods": [
{
"class_method_signature": "PippoSessionStore.getOrCreateSessionId(PippoWebConte... | {
"body": "protected Session getSession(PippoWebContext pippoWebContext) {\n return pippoWebContext.getRouteContext().getSession();\n }",
"class_method_signature": "PippoSessionStore.getSession(PippoWebContext pippoWebContext)",
"constructor": false,
"full_signature": "protected Session getSession(Pip... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_42 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testEncodedArrayList() throws Exception {\n List<Integer> myList = new ArrayList<>(Arrays.asList(600, 400, 200));\n assertEquals(myList, new ParameterValue(\"[600, 400, 200]\").toList(Integer.class));\n }",
"class_method_signature": "ParameterValueTest.testEncodedA... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public List<String> toList() {\n return toList(Collections.emptyList());\n }",
"class_method_signature": "ParameterValue.toList()",
"constructor": false,
"full_signature": "public List<String> toList()",
"identifier": "toList",
"invocations": [
"toList",
"emptyList"
],
"modi... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_0 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldReturnPippoSessionStoreWhenAccessed() {\n PippoWebContext context = makePippoWebContext();\n\n SessionStore<PippoWebContext> sessionStore = context.getSessionStore();\n assertThat(sessionStore, instanceOf(PippoSessionStore.class));\n assertThat(sessi... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public SessionStore<PippoWebContext> getSessionStore() {\n return sessionStore;\n }",
"class_method_signature": "PippoWebContext.getSessionStore()",
"constructor": false,
"full_signature": "@Override public SessionStore<PippoWebContext> getSessionStore()",
"identifier": "ge... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_49 | {
"fields": [
{
"declarator": "pippoSettings = Mockito.mock(PippoSettings.class)",
"modifier": "private",
"original_string": "private PippoSettings pippoSettings = Mockito.mock(PippoSettings.class);",
"type": "PippoSettings",
"var_name": "pippoSettings"
}
],
"file": "pippo-co... | {
"body": "@Test\n public void testGetStrings() {\n Mockito.doReturn(\" [value1, value2, value3]\").when(pippoSettings)\n .getString(\"key\", null);\n Mockito.doCallRealMethod().when(pippoSettings).getStrings(\"key\", \",\");\n\n // using default delimiter, since it is private pass ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(PippoSettings.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(PippoSettings.class);",
"type": "Logger",
"var_name": "log"
},
{
"declar... | {
"body": "public List<String> getStrings(String name) {\n return getStrings(name, DEFAULT_LIST_DELIMITER);\n }",
"class_method_signature": "PippoSettings.getStrings(String name)",
"constructor": false,
"full_signature": "public List<String> getStrings(String name)",
"identifier": "getStrings",
"i... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_24 | {
"fields": [
{
"declarator": "emptyHandler = new EmptyHandler()",
"modifier": "private static final",
"original_string": "private static final RouteHandler emptyHandler = new EmptyHandler();",
"type": "RouteHandler",
"var_name": "emptyHandler"
},
{
"declarator": "route... | {
"body": "@Test\n public void testUnspecifiedMethodRequestRoute() throws Exception {\n Route route = new Route(\"\", \"/.*\", emptyHandler);\n thrown.expect(Exception.class);\n thrown.expectMessage(\"Unspecified request method\");\n router.addRoute(route);\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DefaultRouter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DefaultRouter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declar... | {
"body": "@Override\n public void addRoute(Route route) {\n log.debug(\"Add route for {} '{}'\", route.getRequestMethod(), route.getUriPattern());\n validateRoute(route);\n routes.add(route);\n\n // update cache\n List<Route> cacheEntry = routesCache.get(route.getRequestMethod()... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_73 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testCreate() {\n System.out.println(\"create\");\n EhcacheSessionDataStorage instance = new EhcacheSessionDataStorage(cacheManager);\n SessionData sessionData = instance.create();\n sessionData.put(KEY, VALUE);\n assertNotNull(sessionData);\n ... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public SessionData create() {\n return new DefaultSessionData();\n }",
"class_method_signature": "EhcacheSessionDataStorage.create()",
"constructor": false,
"full_signature": "@Override public SessionData create()",
"identifier": "create",
"invocations": [],
"modifiers"... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_108 | {
"fields": [
{
"declarator": "controllerRegistry",
"modifier": "private",
"original_string": "private ControllerRegistry controllerRegistry;",
"type": "ControllerRegistry",
"var_name": "controllerRegistry"
},
{
"declarator": "thrown = ExpectedException.none()",
"... | {
"body": "@Test\n public void testRegisterControllerWithMethodPath() throws Exception {\n controllerRegistry.register(new WithPathButWithEmptyMethodPathController());\n assertThat(getUriPatterns(controllerRegistry),\n containsInAnyOrder(WithPathButWithEmptyMethodPathController.expectedUri... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ControllerRegistry.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(ControllerRegistry.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public void register(Package... packages) {\n String[] packageNames = Arrays.stream(packages)\n .map(Package::getName)\n .toArray(String[]::new);\n\n register(packageNames);\n }",
"class_method_signature": "ControllerRegistry.register(Package... packages)",
"const... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_65 | {
"fields": [
{
"declarator": "KEY = \"KEY\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"KEY\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"VALUE\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testCreate() {\n System.out.println(\"create\");\n MongoDBSessionDataStorage instance = new MongoDBSessionDataStorage(mongoClient.getDatabase(DATABASE_NAME));\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n ... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "IDLE_TIME = DefaultSessionData.... | {
"body": "@Override\n public SessionData create() {\n return new DefaultSessionData();\n }",
"class_method_signature": "MongoDBSessionDataStorage.create()",
"constructor": false,
"full_signature": "@Override public SessionData create()",
"identifier": "create",
"invocations": [],
"modifiers"... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_32 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testStringHashSet() throws Exception {\n Set<String> mySet = new HashSet<>(Arrays.asList(\"A\", \"B\", \"C\"));\n Set<String> targetSet = new ParameterValue(\"C\", \"B\", \"A\").toSet(String.class);\n assertEquals(mySet, targetSet);\n }",
"class_method_signa... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public Set<String> toSet() {\n return toSet(Collections.emptySet());\n }",
"class_method_signature": "ParameterValue.toSet()",
"constructor": false,
"full_signature": "public Set<String> toSet()",
"identifier": "toSet",
"invocations": [
"toSet",
"emptySet"
],
"modifiers": "p... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_45 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "pippo-core/src/test... | {
"body": "@Test\n public void testEncodedArray() throws Exception {\n int [] myArray = { 600, 400, 200 };\n assertTrue(Arrays.equals(myArray, new ParameterValue(\"[600, 400, 200]\").to(int[].class)));\n }",
"class_method_signature": "ParameterValueTest.testEncodedArray()",
"constructor": fals... | {
"fields": [
{
"declarator": "locale",
"modifier": "private final",
"original_string": "private final Locale locale;",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final String[... | {
"body": "public <T> T to(Class<T> classOfT) {\n return to(classOfT, null);\n }",
"class_method_signature": "ParameterValue.to(Class<T> classOfT)",
"constructor": false,
"full_signature": "public T to(Class<T> classOfT)",
"identifier": "to",
"invocations": [
"to"
],
"modifiers": "public",... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_12 | {
"fields": [
{
"declarator": "DEFAULT_APPLICATION_PATH = \"/mock\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_APPLICATION_PATH = \"/mock\";",
"type": "String",
"var_name": "DEFAULT_APPLICATION_PATH"
},
{
"declarator": ... | {
"body": "@Test\n public void shouldReturnPathFromUnderlyingRequest() {\n String expectedPath = \"/2324/lists/43/foo\";\n StringBuffer expectedUrl = new StringBuffer(\"https://foo.example.com\")\n .append(DEFAULT_APPLICATION_PATH)\n .append(expectedPath);\n\n when(mockRo... | {
"fields": [
{
"declarator": "routeContext",
"modifier": "private final",
"original_string": "private final RouteContext routeContext;",
"type": "RouteContext",
"var_name": "routeContext"
},
{
"declarator": "sessionStore",
"modifier": "private final",
"orig... | {
"body": "@Override\n public String getPath() {\n return getRequest().getPath();\n }",
"class_method_signature": "PippoWebContext.getPath()",
"constructor": false,
"full_signature": "@Override public String getPath()",
"identifier": "getPath",
"invocations": [
"getPath",
"getRequest"
... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_53 | {
"fields": [
{
"declarator": "expected = \"id,sku,description,uuid,lastRestock\\n\" +\n \"1,12345,Oranges,a0765bce-5d81-4b7c-8d28-b7f1efcb355b,2016-12-12\\n\" +\n \"2,12345,Apples,25bc5325-6ce0-4e68-a5d9-4a5cfc6fb148,2015-12-12\\n\" +\n \"3,12345,Bananas,e73b5a3d-e244-4b91-ae00-8fb6bb2... | {
"body": "@Test\n public void testFromCollection() {\n CsvEngine csvEngine = new CsvEngine();\n String generated = csvEngine.toString(Arrays.asList(Product.get())).replace(\"\\r\\n\", \"\\n\").trim();\n\n assertEquals(\"Generated CSV is not the same\", expected, generated);\n }",
"class_... | {
"fields": [
{
"declarator": "TEXT_CSV = \"text/csv\"",
"modifier": "public final static",
"original_string": "public final static String TEXT_CSV = \"text/csv\";",
"type": "String",
"var_name": "TEXT_CSV"
},
{
"declarator": "log = LoggerFactory.getLogger(CsvEngine.cla... | {
"body": "@Override\n public String toString(Object object) {\n if (object instanceof Csv) {\n return toCsv((Csv) object);\n } else if (object.getClass().isArray() && Csv.class.isAssignableFrom(object.getClass().getComponentType())) {\n return toCsv((Csv[]) object);\n } ... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_28 | {
"fields": [],
"file": "pippo-core/src/test/java/ro/pippo/core/gzip/GZipRequestResponseFactoryTest.java",
"identifier": "GZipRequestResponseFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAcceptGzipEncoding() {\n GZipRequestResponseFactory requestResponseFactory = new GZipRequestResponseFactory(new Application());\n HttpServletRequest httpServletRequest = Mockito.mock(HttpServletRequest.class);\n\n // Accept-Encoding not specified\n Moc... | {
"fields": [],
"file": "pippo-core/src/main/java/ro/pippo/core/gzip/GZipRequestResponseFactory.java",
"identifier": "GZipRequestResponseFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "GZipRequestResponseFactory.GZipRequestResponseFactory(Application application)",
"const... | {
"body": "protected boolean acceptsGZipEncoding(HttpServletRequest httpServletRequest) {\n String acceptEncoding = httpServletRequest.getHeader(\"accept-encoding\");\n\n return !StringUtils.isNullOrEmpty(acceptEncoding) && (\n acceptEncoding.contains(\"gzip\") || acceptEncoding.contains(\"*\... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_104 | {
"fields": [
{
"declarator": "controllerRegistry",
"modifier": "private",
"original_string": "private ControllerRegistry controllerRegistry;",
"type": "ControllerRegistry",
"var_name": "controllerRegistry"
},
{
"declarator": "thrown = ExpectedException.none()",
"... | {
"body": "@Test\n public void testWithPathWithoutValue() throws Exception {\n controllerRegistry.register(WithPathWithoutValueController.class);\n assertThat(getUriPatterns(controllerRegistry),\n containsInAnyOrder(WithPathWithoutValueController.expectedUriPatterns()));\n }",
"cl... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ControllerRegistry.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(ControllerRegistry.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public void register(Package... packages) {\n String[] packageNames = Arrays.stream(packages)\n .map(Package::getName)\n .toArray(String[]::new);\n\n register(packageNames);\n }",
"class_method_signature": "ControllerRegistry.register(Package... packages)",
"const... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
25979437_90 | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "KEY = \"KEY\"",
"modifier... | {
"body": "@Test\n public void testDelete() {\n System.out.println(\"delete\");\n EhcacheSessionDataStorage instance = new EhcacheSessionDataStorage();\n SessionData sessionData = instance.create();\n String sessionId = sessionData.getId();\n sessionData.put(KEY, VALUE);\n ... | {
"fields": [
{
"declarator": "SESSION_NAME = \"session\"",
"modifier": "private static final",
"original_string": "private static final String SESSION_NAME = \"session\";",
"type": "String",
"var_name": "SESSION_NAME"
},
{
"declarator": "sessions",
"modifier": "p... | {
"body": "@Override\n public void delete(String sessionId) {\n this.sessions.remove(sessionId);\n }",
"class_method_signature": "EhcacheSessionDataStorage.delete(String sessionId)",
"constructor": false,
"full_signature": "@Override public void delete(String sessionId)",
"identifier": "delete",
... | {
"created": "10/30/2014 4:23:30 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 25979437,
"size": null,
"stargazer_count": null,
"stars": 722,
"updates": "2020-01-21T13:15:40+00:00",
"url": "https://github.com/pippo-java/pipp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.